ubuntu下py-fast-rcnn训练自己数据出现问题

新手一枚,训练自己数据过程中出现如下问题,各位大神都是怎么解决的?
 
zjt@zjt:~/py-faster-rcnn$ ./tools/train_net.py --weights data/imagenet_models/ZF.v2.caffemodel --gpu 0
Called with args:
Namespace(cfg_file=None, gpu_id=0, imdb_name='voc_2007_trainval', max_iters=40000, pretrained_model='data/imagenet_models/ZF.v2.caffemodel', randomize=False, set_cfgs=None, solver=None)
Using config:
{'DATA_DIR': '/home/zjt/py-faster-rcnn/data',
 'DEDUP_BOXES': 0.0625,
 'EPS': 1e-14,
 'EXP_DIR': 'default',
 'GPU_ID': 0,
 'MATLAB': 'matlab',
 'MODELS_DIR': '/home/zjt/py-faster-rcnn/models/pascal_voc',
 'PIXEL_MEANS': array([[[ 102.9801,  115.9465,  122.7717]]]),
 'RNG_SEED': 3,
 'ROOT_DIR': '/home/zjt/py-faster-rcnn',
 'TEST': {'BBOX_REG': True,
          'HAS_RPN': False,
          'MAX_SIZE': 1000,
          'NMS': 0.3,
          'PROPOSAL_METHOD': 'selective_search',
          'RPN_MIN_SIZE': 16,
          'RPN_NMS_THRESH': 0.7,
          'RPN_POST_NMS_TOP_N': 300,
          'RPN_PRE_NMS_TOP_N': 6000,
          'SCALES': [600],
          'SVM': False},
 'TRAIN': {'ASPECT_GROUPING': True,
           'BATCH_SIZE': 128,
           'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
           'BBOX_NORMALIZE_MEANS': [0.0, 0.0, 0.0, 0.0],
           'BBOX_NORMALIZE_STDS': [0.1, 0.1, 0.2, 0.2],
           'BBOX_NORMALIZE_TARGETS': True,
           'BBOX_NORMALIZE_TARGETS_PRECOMPUTED': False,
           'BBOX_REG': True,
           'BBOX_THRESH': 0.5,
           'BG_THRESH_HI': 0.5,
           'BG_THRESH_LO': 0.1,
           'FG_FRACTION': 0.25,
           'FG_THRESH': 0.5,
           'HAS_RPN': False,
           'IMS_PER_BATCH': 2,
           'MAX_SIZE': 1000,
           'PROPOSAL_METHOD': 'selective_search',
           'RPN_BATCHSIZE': 256,
           'RPN_BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
           'RPN_CLOBBER_POSITIVES': False,
           'RPN_FG_FRACTION': 0.5,
           'RPN_MIN_SIZE': 16,
           'RPN_NEGATIVE_OVERLAP': 0.3,
           'RPN_NMS_THRESH': 0.7,
           'RPN_POSITIVE_OVERLAP': 0.7,
           'RPN_POSITIVE_WEIGHT': -1.0,
           'RPN_POST_NMS_TOP_N': 2000,
           'RPN_PRE_NMS_TOP_N': 12000,
           'SCALES': [600],
           'SNAPSHOT_INFIX': '',
           'SNAPSHOT_ITERS': 10000,
           'USE_FLIPPED': True,
           'USE_PREFETCH': False},
 'USE_GPU_NMS': True}
Loaded dataset `voc_2007_trainval` for training
Set proposal method: selective_search
Appending horizontally-flipped training examples...
wrote gt roidb to /home/zjt/py-faster-rcnn/data/cache/voc_2007_trainval_gt_roidb.pkl
Traceback (most recent call last):
  File "./tools/train_net.py", line 104, in <module>
    imdb, roidb = combined_roidb(args.imdb_name)
  File "./tools/train_net.py", line 69, in combined_roidb
    roidbs = [get_roidb(s) for s in imdb_names.split('+')]
  File "./tools/train_net.py", line 66, in get_roidb
    roidb = get_training_roidb(imdb)
  File "/home/zjt/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 118, in get_training_roidb
    imdb.append_flipped_images()
  File "/home/zjt/py-faster-rcnn/tools/../lib/datasets/imdb.py", line 106, in append_flipped_images
    boxes = self.roidb[i]['boxes'].copy()
  File "/home/zjt/py-faster-rcnn/tools/../lib/datasets/imdb.py", line 67, in roidb
    self._roidb = self.roidb_handler()
  File "/home/zjt/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 142, in selective_search_roidb
    ss_roidb = self._load_selective_search_roidb(gt_roidb)
  File "/home/zjt/py-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 188, in _load_selective_search_roidb
    return self.create_roidb_from_box_list(box_list, gt_roidb)
  File "/home/zjt/py-faster-rcnn/tools/../lib/datasets/imdb.py", line 214, in create_roidb_from_box_list
    'Number of boxes must match number of ground-truth images'
AssertionError: Number of boxes must match number of ground-truth images
 
已邀请:

JuliusC

赞同来自:

bouding boxes的数量和图片数量不一致,检查下数据,图片或者标签是否有缺失。

要回复问题请先登录注册