The code has been tested with python 3.10, torch==2.4.0, torchvision==0.19.0 and torchsparse==2.1.0, with CUDA 12.4. We provide different options to set up the environment and repreduce the results.
Create a virtual environment and install packages from the requirements.txt file:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtInstall PyTorch 2.4.0 with CUDA 12.4:
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124Clone and build TorchSparse 2.1.0:
git clone https://github.com/mit-han-lab/torchsparse.git && cd torchsparse
pip install -r requirements.txt
python setup.py installInstall remaining dependencies:
pip install pyyaml opencv-python-headless matplotlib tensorboard fvcore timm scipy strictyaml scikit-learn tqdm easydictWe provide a pre-built Singularity image for a quick setup and usage of the code. You can find the image in this Drive folder.
singularity exec --nv ubuntu_cuda124_torchsparse.sif <script>We provide a .def file to build from scratch a singularity image with the required packages to reproduce and use the code.
### build singularity image
singularity build --fakeroot ubuntu_cuda124_torchsparse.sif ubuntu_cuda124_torchsparse.def
### run the script with the singularity image
singularity exec --nv ubuntu_cuda124_torchsparse.sif <script>