mediapipe_model_maker.model_util.dataset.Dataset

A generic dataset class for loading model training and evaluation dataset.

For each ML task, such as image classification, text classification etc., a subclass can be derived from this class to provide task-specific data loading utilities.

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.

size Returns the size of the dataset.

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

Methods

gen_tf_dataset

View source