官方安装教程:
https://github.com/facebookresearch/detectron2/blob/main/INSTALL.md
我一般使用下面的命令
git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
python -m pip install -e .
如果遇到下面的问题:
python setup.py egg_info did not run successfully.
看这篇博客解决:
解决报错:python setup.py egg_info did not run successfully