我正在使用 py_faster_rcnn 为一类(“人”)训练系统。最初,它给了我一个类似于这篇文章 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'