Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.59 KB

File metadata and controls

46 lines (37 loc) · 1.59 KB

Installation

Requirements

  • Linux with Python ≥ 3.10.
  • PyTorch ≥ 2.0 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.
  • pip install -e .

CUDA kernel for MSDeformAttn

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 objectrelator/model/mask_decoder/Mask2Former_Simplify/modeling/pixel_decoder/ops
sh make.sh

Example conda environment setup

conda create --name objectrelator python=3.10 -y
conda activate psalm
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia

# under your working directory
git clone git@github.com:facebookresearch/detectron2.git
cd detectron2
pip install .
pip install git+https://github.com/cocodataset/panopticapi.git
pip install git+https://github.com/mcordts/cityscapesScripts.git

cd ..
git clone https://github.com/lovelyqian/ObjectRelator.git
cd ObjectRelator
pip install -e .
pip install opencv-python addict
cd psalm/model/mask_decoder/Mask2Former_Simplify/modeling/pixel_decoder/ops
sh make.sh
pip install natsort
pip install scikit-image
pip install numpy==1.23.5