使用py-faster-rcnn训练自己的数据集

具体流程按照这篇博客的内容来的:
http://blog.csdn.net/sinat_30071459/article/details/51332084
但是在训练过程中还是出现了一些问题,建议提前将这些改好再训练。
1. 首先是这个问题:
b2.text_format.Merge(f.read(), self.solver_param) AttributeError: ‘module’ object has no attribute ‘text_format’
解决方法:在文件./lib/fast_rcnn/train.py增加一行import google.protobuf.text_format 即可解决问题

2.然后又出现了这个问题
TypeError numpy.float64 object cannot be interpreted as an index
解决方法:有文章说把numpy的版本由高版本如1.12.0降为1.11.0问题得以解决。
sudo pip install -U numpy==1.11.0
但是用了这种方法还是有问题,我又将其升级到高版本,按照这篇文章的方法将语法不对的地方做了修改
http://blog.csdn.net/a8039974/article/details/77628717
除了这篇文章提到的地方,还需要修改下面这些错误提示的地方,修改方法和上面相同
File “/home/zhouqin/py-faster-rcnn/tools/../lib/roi_data_layer/minibatch.py”, line 125, in _sample_rois
roidb[‘bbox_targets’][keep_inds, :], num_classes)
File “/home/zhouqin/py-faster-rcnn/tools/../lib/roi_data_layer/minibatch.py”, line 176, in _get_bbox_regression_labels
bbox_targets[ind, start:end] = bbox_target_data[ind, 1:]
TypeError: slice indices must be integers or None or have an index method

3.还有就是这个问题
F1221 12:36:42.488387 16329 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory
大概是电脑配置不够,按照这篇文章的方法来修改就可以运行了
http://blog.csdn.net/u012283902/article/details/63255301

注:还有一些值得参考的博文
http://blog.csdn.net/awq520tt1314/article/details/72629867

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值