出现:"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
.
本文最后更新于2020年1月20日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
最新评论
该评论为私密评论
域名卖吗?加个QQ864716046好友,长期收域名,想卖随时可以找我
谢谢分享
WireGuard配置文件还有吗
我是激活的visio2016,里面显示KMS服务器好像是被屏蔽了,最后也会出现错误0xC004F074。试了2次都不行……
学习了。
学习学习了,涨姿势了。
网站卖吗?加QQ864716046好友想卖随时找我