Creates TFRecord Files and Labelmap protobuffer text files

Create TFRecord Files

create_tfrecord_entry[source]

create_tfrecord_entry(categories, annotation)

Create tfrecord entry with annotations for one file / image. categories: the categories used annotation: the annotation of a file / image return: the tfrecord entry

create_tfrecord_file[source]

create_tfrecord_file(output_path, categories, annotations)

Create a tfrecord file for a sub-data-set, which can be one of the following: training, validation, test output_path: the path including the filename of the tfrecord file categories: the categories used annotations: the annotations of the files / images

Utility functions for creating TFRecord data sets

int64_feature[source]

int64_feature(value)

int64_list_feature[source]

int64_list_feature(value)

bytes_feature[source]

bytes_feature(value)

bytes_list_feature[source]

bytes_list_feature(value)

float_list_feature[source]

float_list_feature(value)

Create Labelmap Protobuffer Text File

create_labelmap_file[source]

create_labelmap_file(output_path, categories, start=1)

Create labelmap protobuffer text file containing the categories. Format is compatible with Tensorflow Object Detection API. For object detection data-sets, the categories should exclude the background class and start should be 1. output_path: the path including the filename of the protobuffer text file categories: a list of the categories to write start: the category index for the first category