- Python ≥ 3.6
- PyTorch ≥ 1.9 and torchvision that matches the PyTorch installation. Install them together at pytorch.org to make sure of this. Note, please check PyTorch version matches that is required by Detectron2.
- Detectron2: follow Detectron2 installation instructions.
- OpenCV is optional but needed by demo and visualization
- Panopticapi:
pip install git+https://github.com/cocodataset/panopticapi.git
pip install -r requirements.txt
After preparing the required environment, run the following command to compile CUDA kernel for MSDeformAttn:
CUDA_HOME
must be defined and points to the directory of the installed CUDA toolkit.
cd mask2former/modeling/pixel_decoder/ops
sh make.sh
conda create --name dvis python=3.8 -y
conda activate dvis
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install -U opencv-python
# install detectron2
python -m pip install detectron2 -f \
https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.9/index.html
# install panoptic api
pip install git+https://github.com/cocodataset/panopticapi.git
git clone git@https://github.com/zhang-tao-whu/DVIS.git
cd DVIS
pip install -r requirements.txt
cd mask2former/modeling/pixel_decoder/ops
sh make.sh