tlt.datasets.image_classification.tfds_image_classification_dataset.TFDSImageClassificationDataset¶
- class tlt.datasets.image_classification.tfds_image_classification_dataset.TFDSImageClassificationDataset(dataset_dir, dataset_name, split=['train'], as_supervised=True, shuffle_files=True, seed=None, **kwargs)[source]¶
An image classification dataset from the TensorFlow datasets catalog
- __init__(dataset_dir, dataset_name, split=['train'], as_supervised=True, shuffle_files=True, seed=None, **kwargs)[source]¶
Class constructor
Methods
__init__(dataset_dir, dataset_name[, split, ...])Class constructor
get_batch([subset])Get a single batch of images and labels from the dataset.
get_inc_dataloaders()preprocess(image_size, batch_size[, ...])Preprocess the dataset to convert to float32, resize, and batch the images
shuffle_split([train_pct, val_pct, ...])Randomly split the dataset into train, validation, and test subsets with a pseudo-random seed option.
Attributes
class_namesReturns the list of class names
datasetReturns the framework dataset object (tf.data.Dataset)
dataset_catalogThe string name of the dataset catalog (or None)
dataset_dirHost directory containing the dataset files
dataset_nameName of the dataset
infoReturns a dictionary of information about the dataset
test_subsetA subset of the dataset held out for final testing/evaluation
train_subsetA subset of the dataset used for training
validation_subsetA subset of the dataset used for validation/evaluation