Faster R-CNN训练自己数据集遇到的问题

代码链接:https://github.com/endernewton/tf-faster-rcnn

(1)TypeError: write() argument must be str, not bytes:

          lib / datasets / voc_eval.py  第105行改为

cachefile = os.path.join(cachedir, '%s_annots.pkl' % imagesetfile.split("/")[-1].split(".")[0])

          第121行修改为

with open(cachefile, 'wb') as f:

(2)InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [4096,21] rhs shape= [4096,3]

         tools/demo.py 第141行中的21改为自己数据集的(类别数+1),比如类别数为10,就改为

net.create_architecture("TEST", 11, tag='default', anchor_scales=[8, 16, 32])

(3)This application failed to start because it could not find or load the Qt platform plugin "xcb"

         安装pyqt库:conda install pyqt

(4)ImportError: No module named pycocotools.coco

        如果数据集制作成voc格式的话,就在代码中注释掉pycocotools。在/lib/datasets/coco.py 的23~25行:

#from pycocotools.coco import COCO
#from pycocotools.cocoeval import COCOeval
#from pycocotools import mask as COCOmask

(5)TypeError: load() got an unexpected keyword argument 'encoding'

         训练前删除data/cache  ; 测试前删除 data/VOCdevkit2007/annotations_cache

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值