记录安装mmdetection

参考:
https://zhuanlan.zhihu.com/p/101983661
安装mmdetection后训练模型出现

'COCO' object has no attribute 'get_cat_ids'

这个错,查询资料发现,pycotools的问题。
解决方案 在conda激活环境的前提下
执行下面命令
pip install "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools"
镜像:
pip install "git+https://gitee.com/likyoo/cocoapi-mmlab.git#subdirectory=pycocotools"

若网络问题出错,可手动下载git文件解压

cocoapi-master/pycocotools/pycocotools
中的文件复制到
home/superfly/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/pycocotools
替换即可

posted @ 2020-08-13 02:24  Suppperfly  阅读(241)  评论(0编辑  收藏  举报