mmdection--COCO object has no attribute get_cat_ids

在配置好mmdection后,训练一下的时候,出现了下面的问题:

AttributeError: COCO object has no attribute get_cat_ids

按照官方的解释,是因为numpy版本和pycocotools的版本冲突问题,官方建议降低pycocotools的版本。而一些人给出的方法是如下2种方案:

1、git checkout 206107 -- mmdet/datasets/coco.py
2、pip install -U "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools"

第一种方法是回退代码coco.py的版本
第二种方法就是要卸载重装(更新)cocoAPI。但是,在进行第二种方法的时候,需要访问外网,一直下载不成功。但是发现可以手动到该网站https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools下载,然后把它放到mmdection文件夹下,然后进入conda对应环境,进入对应文件夹pycocotools,然后pip install -e .

cd cocoapi-master/pycocotools
source activate mmlab
pip uninstall pycocotools
pip install -e .

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值