系统:本人使用系统为Ubuntu20.04,显卡驱动为525(对应cuda12.0)
1.配置cuda环境:cuda11.1(CUDA Toolkit 11.1 Update 1 Downloads) + 对应的cudnn(Download cuDNN v8.0.5 (November gth, 2020), for CUDA 11.1),pytorch版本如下:
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111
2.
mkdir ws (创建一个工作空间)
3.
git clone github.com:facebookresearch/detectron2.git
4.
cd detectron2
5.
pip install -e . (体现第1步的重要性)
6.
cd ..
7.
git clone https://github.com/facebookresearch/Detic.git --recurse-submodules (下载另外两个子模块)
8.
cd Detic
9.
pip install -r requirements.txt
10.
pip3 install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111
11.设置demo.py中的参数
12.运行demo.py即可。