parameters: (self, roidb)
return_statement: return roidb
docstring: 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']
docstring_summary: 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']
docstring_tokens: 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 ]
function: 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
              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)
  
          self.image_set_index *= 2
          return roidb
function_tokens: def append_flipped_images ( self , roidb ) : 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 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 ) self . image_set_index *= 2 return roidb