PCML-WangZhe commented on issue #4831: Difficulty training RCNN on other 
datasets adhering to VOC format: RPNL1Loss=nan
URL: 
https://github.com/apache/incubator-mxnet/issues/4831#issuecomment-377665892
 
 
   but after you delete "-1", it will make a new problem:
   INFO:root:voc_2020_trainval append flipped images to roidb
   Traceback (most recent call last):
     File "/home/lab3/wz/incubator-mxnet-master/example/rcnn/train_end2end.py", 
line 195, in <module>
       main()
     File "/home/lab3/wz/incubator-mxnet-master/example/rcnn/train_end2end.py", 
line 192, in main
       lr=args.lr, lr_step=args.lr_step)
     File "/home/lab3/wz/incubator-mxnet-master/example/rcnn/train_end2end.py", 
line 56, in train_net
       for image_set in image_sets]
     File 
"/home/lab3/wz/incubator-mxnet-master/example/rcnn/rcnn/utils/load_data.py", 
line 30, in load_gt_roidb
       roidb = imdb.append_flipped_images(roidb)
     File 
"/home/lab3/wz/incubator-mxnet-master/example/rcnn/rcnn/dataset/imdb.py", line 
190, in append_flipped_images
       assert (boxes[:, 2] >= boxes[:, 0]).all()
   AssertionError
   
   in these code:
       def append_flipped_images(self, roidb):
           """
           append flipped images to an roidb
           flip boxes coordinates, images will be actually flipped when loading 
into network
           :param roidb: [image_index]['boxes', 'gt_classes', 'gt_overlaps', 
'flipped']
           :return: roidb: [image_index]['boxes', 'gt_classes', 'gt_overlaps', 
'flipped']
           """
           logger.info('%s append flipped images to roidb' % self.name)
           assert self.num_images == len(roidb)
           for i in range(self.num_images):
               roi_rec = roidb[i]
               boxes = roi_rec['boxes'].copy()
               oldx1 = boxes[:, 0].copy()
               oldx2 = boxes[:, 2].copy()
               boxes[:, 0] = roi_rec['width'] - oldx2 - 1
               boxes[:, 2] = roi_rec['width'] - oldx1 - 1
               # boxes[:, 0] = roi_rec['width'] - oldx2
               # boxes[:, 2] = roi_rec['width'] - oldx1
               assert (boxes[:, 2] >= boxes[:, 0]).all()
               entry = {'image': roi_rec['image'],
                        'height': roi_rec['height'],
                        'width': roi_rec['width'],
                        'boxes': boxes,
                        'gt_classes': roidb[i]['gt_classes'],
                        'gt_overlaps': roidb[i]['gt_overlaps'],
                        'max_classes': roidb[i]['max_classes'],
                        'max_overlaps': roidb[i]['max_overlaps'],
                        'flipped': True}
               roidb.append(entry)
   how to fix it?
   delete "-1" as before?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to