服务器:RTX 3090
conda create --name detectron2 python=3.8
conda activate detectron2
pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install opencv-python
pip install cython
pip install pycocotools -i https://pypi.python.org/simple
显卡是3090,修改setup.py, 将最后一行的cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, 改为cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension.with_options(use_ninja=False)},
不进入目录,python -m pip install -e detectron2即可安装
conda list
运行python demo/demo.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml --input 1.jpg --opts MODEL.WEIGHTS model_final_a54504.pkl进行测试即可