(filename_pattern, ann_dict)
return image_data, ann_dict['shape'], bboxes, labels, iscrowd
Process a image and annotation file.

    Args:
      filename: string, path to an image file e.g., '/path/to/example.JPG'.
      coder: instance of ImageCoder to provide TensorFlow image coding utils.
    Returns:
      image_buffer: string, JPEG encoding of RGB image.
      height: integer, image height in pixels.
      width: integer, image width in pixels.
Process a image and annotation file.
Process a image and annotation file .
def _process_image(filename_pattern, ann_dict):
    """Process a image and annotation file.

    Args:
      filename: string, path to an image file e.g., '/path/to/example.JPG'.
      coder: instance of ImageCoder to provide TensorFlow image coding utils.
    Returns:
      image_buffer: string, JPEG encoding of RGB image.
      height: integer, image height in pixels.
      width: integer, image width in pixels.
    """
    # Read the image file.
    filename = filename_pattern.format(ann_dict['filaname'])
    image_data = tf.gfile.FastGFile(filename, 'rb').read()

    # Find annotations.
    bboxes = []
    labels = []
    iscrowd = []
    for index in range(ann_dict['boxes'].shape[0]):
        labels.append(int(ann_dict['gt_classes'][index]))
        iscrowd.append(int(ann_dict['gt_iscrowd'][index]))

        bboxes.append((ann_dict['boxes'][index, 0], ann_dict['boxes'][index, 1], ann_dict['boxes'][index, 2], ann_dict['boxes'][index, 3]
                       ))
    return image_data, ann_dict['shape'], bboxes, labels, iscrowd
def _process_image ( filename_pattern , ann_dict ) : # Read the image file. filename = filename_pattern . format ( ann_dict [ 'filaname' ] ) image_data = tf . gfile . FastGFile ( filename , 'rb' ) . read ( ) # Find annotations. bboxes = [ ] labels = [ ] iscrowd = [ ] for index in range ( ann_dict [ 'boxes' ] . shape [ 0 ] ) : labels . append ( int ( ann_dict [ 'gt_classes' ] [ index ] ) ) iscrowd . append ( int ( ann_dict [ 'gt_iscrowd' ] [ index ] ) ) bboxes . append ( ( ann_dict [ 'boxes' ] [ index , 0 ] , ann_dict [ 'boxes' ] [ index , 1 ] , ann_dict [ 'boxes' ] [ index , 2 ] , ann_dict [ 'boxes' ] [ index , 3 ] ) ) return image_data , ann_dict [ 'shape' ] , bboxes , labels , iscrowd