mediapipe_model_maker.object_detector.Dataset

Dataset library for object detector.

Inherits From: ClassificationDataset, Dataset

tf_dataset A tf.data.Dataset object that contains a potentially large set of elements, where each element is a pair of (input_data, target). The input_data means the raw input data, like an image, a text etc., while the target means the ground truth of the raw input data, e.g. the classification label of the image etc.
size The size of the dataset. tf.data.Dataset donesn't support a function to get the length directly since it's lazy-loaded and may be infinite.

label_names

num_classes

size Returns the size of the dataset.

Same functionality as calling len. See the len method definition for more information.

Methods

from_cache

View source

Loads the TFRecord data from cache.

Args
tfrecord_cache_files The TFRecordCacheFiles object containing the already cached TFRecord and metadata files.

Returns
ObjectDetectorDataset object.

Raises
ValueError if tfrecord_cache_files are not already cached.

from_coco_folder

View source