安装fvcore:
pip install fvcore
安装pycocotools:
直接安装:
pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
或者:
git clone https://github.com/cocodataset/cocoapi.git cd cocoapi/PythonAPI python3 setup.py install安装detectron2:
由于在本地编译detectron2总是不成功,所以直接安装编译好的二进制文件,/cu111/表示cuda版本是11.1,要改成本地的cuda版本。
pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/index.html
上述命令安装完成后,还是会报下面的错误
from detectron2 import _C ImportError: /usr/local/lib/python3.7/dist-packages/detectron2/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol:
解决
git clone https://github.com/facebookresearch/detectron2.git python -m pip install -e detectron2



