(dataset_dir, name, tfrecord_writer)
Loads data from image and annotations files and add them to a TFRecord.

    Args:
      dataset_dir: Dataset directory;
      name: Image name to add to the TFRecord;
      tfrecord_writer: The TFRecord writer to use for writing.
Loads data from image and annotations files and add them to a TFRecord.
Loads data from image and annotations files and add them to a TFRecord .
def _add_to_tfrecord(dataset_dir, name, tfrecord_writer):
    """Loads data from image and annotations files and add them to a TFRecord.

    Args:
      dataset_dir: Dataset directory;
      name: Image name to add to the TFRecord;
      tfrecord_writer: The TFRecord writer to use for writing.
    """
    image_data, shape, bboxes, labels, labels_text, difficult, truncated = \
        _process_image(dataset_dir, name)
    example = _convert_to_example(image_data, labels, labels_text,
                                  bboxes, shape, difficult, truncated)
    tfrecord_writer.write(example.SerializeToString())
def _add_to_tfrecord ( dataset_dir , name , tfrecord_writer ) : image_data , shape , bboxes , labels , labels_text , difficult , truncated = _process_image ( dataset_dir , name ) example = _convert_to_example ( image_data , labels , labels_text , bboxes , shape , difficult , truncated ) tfrecord_writer . write ( example . SerializeToString ( ) )