使用一个类

时间:2015-12-04 18:32:31

标签: python deep-learning pycaffe

我正在使用py_faster_rcnn来训练一个班级的系统(' person')。最初,它给了我类似于这篇文章的断言错误 How to train new fast-rcnn imageset

所以我对imdb.py文件进行了以下更改:

for b in range(len(boxes)):
    if boxes[b][2] < boxes[b][0]:
       boxes[b][0] = 0
assert (boxes[:,2] >= boxes[:,0]).all()

经过上述更改后,我收到了这个新错误。有没有人遇到过这个错误或者我可能做错了什么?

Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "./tools/train_faster_rcnn_alt_opt.py", line 130, in train_rpn
max_iters=max_iters)
File "/home/microway/test/pytest/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 134, in train_net
pretrained_model=pretrained_model)
File "/home/microway/test/pytest/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 53, in __init__
self.solver.net.layers[0].set_roidb(roidb)
File "/home/microway/test/pytest/py-faster-rcnn/tools/../lib/roi_data_layer/layer.py", line 68, in set_roidb
self._shuffle_roidb_inds()
File "/home/microway/test/pytest/py-faster-rcnn/tools/../lib/roi_data_layer/layer.py", line 26, in _shuffle_roidb_inds
widths = np.array([r['width'] for r in self._roidb])
KeyError: 'width'

0 个答案:

没有答案