最新目录‹
出现:"ImportError: cannot import name '_C'",请build并且install detectron2。
安装方法:
Requirements
- Linux or macOS
- Python ≥ 3.6
- PyTorch ≥ 1.3
- torchvision that matches the PyTorch installation. You can install them together at pytorch.org to make sure of this.
- OpenCV, optional, needed by demo and visualization
- pycocotools:
pip install cython; pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' - gcc & g++ ≥ 4.9
具有以上依赖性之后,运行:
|
1 2 3 4 5 6 7 8 9 |
pip install 'git+https://github.com/facebookresearch/detectron2.git' # (add --user if you don't have permission) # Or, to install it from a local clone: git clone https://github.com/facebookresearch/detectron2.git cd detectron2 && pip install -e . # Or if you are on macOS # MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ pip install -e . |
一般来说,重装pytorch之后,需要重新安装detectron2.






最新评论
站长您好,亚马逊云咨询推广资源,望建立联系,可邮件,谢谢。
换友情链接吗?
看你的站做的挺不错的
恭喜!!太强了,硕博连读啊
雁过留毛,人过留名。
看不懂但大受震撼
每天都在战争,希望2026和平.
ZeroTier 看过多篇帖子,目前群辉、飞牛os、win11 、安卓、ubuntu ≥18.04 顺利通过,这篇相对于简单 实用、特来感谢 🙄