1.下载源代码
git clone git@github.com:aim-uofa/AdelaiDet.git
2.安装环境
python3.9torchdetectron2pip install torch1.8.0+cu111 torchvision0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
AdelaiDetpython -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
cd AdelaiDet
python setup.py build develop
还挺简单的,现在基本环境就搭建好了。然后就是跑具体的算法
3.跑通solov2
#先下载模型wget https://cloudstor.aarnet.edu.au/plus/s/chF3VKQT4RDoEqC/download -O SOLOv2_R50_3x.pthwget https://cloudstor.aarnet.edu.au/plus/s/chF3VKQT4RDoEqC/download -O SOLOv2_R101_3x.pthpython demo/demo.py --config-file configs/SOLOv2/R50_3x.yaml --input demo/demo.jpg --opts MODEL.WEIGHTS models/solov2/SOLOv2_R50_3x.pth