This folder contains a standalone version of KPConvX code.
Our code was tested with multiple environments and should be straightforward to setup. Addapt the following lines to your environment and version of CUDA:
conda create -n kpconvx python=3.10
conda activate kpconvx
conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pytorch-cuda=12.1 -c pytorch -c nvidia
pip install easydict h5py matplotlib numpy scikit-learn timm pykeops
pip install 'pyvista[all,trame]' jupyterlab
We use the preprocessed data from Pointcept that you can download here. Please agree with the official license before downloading it. From the s3dis.tar.gz
archive, extract the s3dis
folder to the Standalone/data
directory.
We use the h5_files from official website. Download the preprocessed version and place it in the Standalone/data
directory. Rename the folder h5_files
to ScanObjectNN
. You should have (and only need) the three following files:
data/ScanObjectNN/main_split/test_objectdataset_augmentedrot_scale75_1024_fps.pkl
data/ScanObjectNN/main_split/test_objectdataset_augmentedrot_scale75.h5
data/ScanObjectNN/main_split/training_objectdataset_augmentedrot_scale75.h5
We provide scripts to train our model on ScanObjectNN or S3DIS.
# Training on ScanObjectNN
./train_ScanObjectNN.sh
# Training on S3DIS
./train_S3DIS.sh
Follow instructions in these scripts to change parameters.
We provide plotting functions to plot the performances during and after training. They are in the plot_ScanObj.py
and plot_S3DIS.py
script. Here are
- Step 1: Define the dates of the logs you want to plot in the experiment functions. See example functions
experiment_name_1()
andexperiment_name_2()
def experiment_name_1():
...
start = 'Log_2020-04-22_11-52-58'
end = 'Log_2023-07-29_12-40-27'
...
- Step 2: Choose the log to show
# Choose the logs to show
logs, logs_names = experiment_name_1()
- Step 3: Run the script
python3 experiments/ScanObjectNN/plot_ScanObj.py
# or
python3 experiments/S3DIS/plot_S3DIS.py
Once the trainings are finished, you can change to test mode with perform_test = True
. This will start tests for the selected trained weights and show a summary of the test results.
You can also directly test a trained network with the following scripts.
# Test a model on ScanObjectNN
./test_ScanObjectNN.sh
# Test a model on S3DIS
./test_S3DIS.sh
More detailed instructions are in these scripts.
We provide the following pretrained models:
Model | Benchmark | OA | mAcc | Size | Archive |
---|---|---|---|---|---|
KPConvD-L | ScanObjectNN | 89.7% | 88.5% | 80 MB | link |
KPConvX-L | ScanObjectNN | 89.1% | 87.6% | 138 MB | link |
Model | Benchmark | Val mIoU | Size | Archive |
---|---|---|---|---|
KPConvD-L | S3DIS (Area5) | 72.3% | 151 MB | link |
KPConvX-L | S3DIS (Area5) | 73.5% | 169 MB | link |
You can download and extract them to the result folder and use our scripts to test them.