- Linux with Python ≥ 3.9
- PyTorch ≥ 1.10.1 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
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 mdqe/models/ops
sh make.sh
To build on a system that does not have a GPU device but provide the drivers:
TORCH_CUDA_ARCH_LIST='8.0' FORCE_CUDA=1 python setup.py build install
conda create --name mdqe python=3.9 -y
conda activate mdqe
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
pip install -U opencv-python
python -m pip install detectron2 -f \
https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
# under your working directory
git clone https://github.com/MinghanLi/MDQE_CVPR2023.git
cd MDQE
pip install -r requirements.txt
cd mdqe/models/ops
sh make.sh
# pycocotools.ytvos
git clone https://github.com/youtubevos/cocoapi.git
cd PythonAPI
# To compile and install locally
python setup.py build_ext --inplace
# To install library to Python site-packages
python setup.py build_ext install
Our code is largely based on Detectron2, IFC, Deformable DETR and VITA. We are truly grateful for their excellent work.