- Linux with Python
$\ge$ 3.6 - PyTorch
$\ge$ 1.8 and torchvision that matches the PyTorch version. Please install them together at pytorch.org. Note, please check PyTorch version matches that is required by Detectron2. - Detectron2: Please follow Detectron2 installation instructions.
- PyDenseCRF: PartDistillation uses PyDenseCRF. Please follow PyDenseCRF to install.
- Detic-dependency: PartDistillation uses Detic. Please follow Detic to install properly.
NOTE: CUDA_HOME
must be defined and points to the directory of the installed CUDA toolkit.
conda create --name part_distillation python=3.9 -y
conda activate part_distillation
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch -c nvidia
pip install git+https://github.com/lucasb-eyer/pydensecrf.git
cd YOUR_WORKING_DIRECTORY
git clone git@github.com:facebookresearch/detectron2.git
cd detectron2
pip install -e .
cd ..
git clone git@github.com:fairinternal/ozi_partdiscovery.git # Change it later to public repo.
cd ozi_partdiscovery
pip install -r requirements.txt
cd part_distillation/modeling/pixel_decoder/ops
sh make.sh # CUDA_HOME must be defined and points to the directory of the installed CUDA toolkit.
# detic
cd ../../../..
git clone https://github.com/facebookresearch/Detic.git --recurse-submodules
cd Detic
pip install -r requirements.txt
For FAIR internal: for compiling MSDeformAttn, do the following
cd part_distillation/modeling/pixel_decoder/ops
module unload cuda
module load cuda/11.3
sh make.sh