This codebase is tested with torch==1.10.0
and torchvision==0.11.0
, with CUDA 11.3
and gcc 7.3.0
. In order to successfully reproduce the results reported in our paper, we recommend you to follow the exact same configuation with us. However, similar versions that came out lately should be good as well.
conda create -n pcseg python=3.7
conda activate pcseg
conda install pytorch==1.10.0 torchvision==0.11.0 cudatoolkit=11.3 -c pytorch -c conda-forge
4.1 - nuScenes devkit
🚘 Note: This toolkit is required in order to run experiments on the nuScenes dataset.
pip install nuscenes-devkit
4.2 - PyTorch Scatter
conda install pytorch-scatter -c pyg
4.3 - TorchSparse
Note: The following steps are required in order to use the voxel
and fusion
backbones in this codebase.
- Make a directory named
torchsparse_dir
cd package/
mkdir torchsparse_dir/
- Unzip the
.zip
files inpackage/
unzip sparsehash.zip
unzip torchsparse.zip
mv sparsehash-master/ sparsehash/
- Setup
sparsehash
(Note that${ROOT}
should be your home path to thePCSeg
folder)
cd sparsehash/
./configure --prefix=/${ROOT}/PCSeg/package/torchsparse_dir/sphash/
make
make install
- Compile
torchsparse
cd ..
pip install ./torchsparse
- It takes a while to build wheels. After successfully building
torchsparse
, you should see the following:
Successfully built torchsparse
Installing collected packages: torchsparse
Successfully installed torchsparse-1.4.0
cd package/
- Unzip the
range_lib.zip
file inpackage/
unzip range_lib.zip
cd range_lib/
python setup.py install
- After successfully building
range_lib
, you should see the following:
Processing dependencies for rangelib==1.0.0
Finished processing dependencies for rangelib==1.0.0
pip install pyyaml easydict numba torchpack strictyaml llvmlite easydict scikit-image tqdm SharedArray prettytable opencv-python
pip uninstall setuptools
pip install setuptools==59.5.0
Inside PCSeg
directory:
python setup.py develop