Computer Vision#

FGVC Aircraft Dataset Provider#

class archai.datasets.cv.aircraft_dataset_provider.AircraftDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

FGVC Aircraft dataset provider.

get_train_dataset(annotation_level: str | None = 'variant', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(annotation_level: str | None = 'variant', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(annotation_level: str | None = 'variant', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

Caltech-Based Dataset Provider#

class archai.datasets.cv.caltech_dataset_provider.CaltechDatasetProvider(dataset: str | None = 'caltech101', root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

Caltech-based dataset provider.

SUPPORTED_DATASETS = {'caltech101': <class 'torchvision.datasets.caltech.Caltech101'>, 'caltech256': <class 'torchvision.datasets.caltech.Caltech256'>}#
get_train_dataset(target_type: str | List[str] | None = 'category', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(target_type: str | List[str] | None = 'category', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(target_type: str | List[str] | None = 'category', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

CIFAR-Based Dataset Provider#

class archai.datasets.cv.cifar_dataset_provider.CifarDatasetProvider(dataset: str | None = 'cifar10', root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

CIFAR-based dataset provider.

SUPPORTED_DATASETS = {'cifar10': <class 'torchvision.datasets.cifar.CIFAR10'>, 'cifar100': <class 'torchvision.datasets.cifar.CIFAR100'>}#
get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

Cityscapes Dataset Provider#

class archai.datasets.cv.cityscapes_dataset_provider.CityscapesDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

Cityscapes dataset provider.

get_train_dataset(target_type: str | None = 'instance', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(target_type: str | None = 'instance', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(target_type: str | None = 'instance', transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

COCO-Based Dataset Provider#

class archai.datasets.cv.coco_dataset_provider.CocoDatasetProvider(dataset: str | None = 'coco_captions', root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

COCO-based dataset provider.

SUPPORTED_DATASETS = {'coco_captions': <class 'torchvision.datasets.coco.CocoCaptions'>, 'coco_detection': <class 'torchvision.datasets.coco.CocoDetection'>}#
get_train_dataset(ann_file: str, transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(ann_file: str, transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(ann_file: str, transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

Oxford 102 Flower Dataset Provider#

class archai.datasets.cv.flowers102_dataset_provider.Flowers102DatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

Oxford 102 Flower dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

Food-101 Dataset Provider#

class archai.datasets.cv.food101_dataset_provider.Food101DatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

Food-101 dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

Image Folder Dataset Provider#

class archai.datasets.cv.image_folder_dataset_provider.ImageFolderDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

Image Folder dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None, loader: Callable | None = None, is_valid_file: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None, loader: Callable | None = None, is_valid_file: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None, loader: Callable | None = None, is_valid_file: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

ImageNet Dataset Provider#

class archai.datasets.cv.imagenet_dataset_provider.ImageNetDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

ImageNet dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None, loader: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None, loader: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None, loader: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

MNIST-Based Dataset Provider#

class archai.datasets.cv.mnist_dataset_provider.MnistDatasetProvider(dataset: str | None = 'mnist', root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

MNIST-based dataset provider.

SUPPORTED_DATASETS = {'fashion_mnist': <class 'torchvision.datasets.mnist.FashionMNIST'>, 'kmnist': <class 'torchvision.datasets.mnist.KMNIST'>, 'mnist': <class 'torchvision.datasets.mnist.MNIST'>, 'qmnist': <class 'torchvision.datasets.mnist.QMNIST'>}#
get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

Stanford Cars Dataset Provider#

class archai.datasets.cv.stanford_cars_dataset_provider.StanfordCarsDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

Stanford Cars dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

SVHN Dataset Provider#

class archai.datasets.cv.svhn_dataset_provider.SVHNDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

SVHN dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

TensorPack LMDB Dataset Provider#

class archai.datasets.cv.tensorpack_lmdb_dataset_provider.TensorpackLmdbDatasetProvider(img_key: str, train_lmdb_file_path: str, val_lmdb_file_path: str | None = None, test_lmdb_file_path: str | None = None)[source]#

Bases: DatasetProvider

Tensorpack LMDB dataset provider.

get_train_dataset(mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0) TensorpackLmdbDataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0) TensorpackLmdbDataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0) TensorpackLmdbDataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

class archai.datasets.cv.tensorpack_lmdb_dataset_provider.MultiFileTensorpackLmdbDatasetProvider(img_key: List[str], train_lmdb_file_path: List[str], val_lmdb_file_path: List[str] | None = None, test_lmdb_file_path: List[str] | None = None)[source]#

Bases: DatasetProvider

Multi-file Tensorpack LMDB dataset provider.

get_train_dataset(mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0) ConcatDataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0) ConcatDataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0) ConcatDataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.

TensorPack LMDB Dataset Provider (Utilities)#

class archai.datasets.cv.tensorpack_lmdb_dataset_provider_utils.TensorpackLmdbDataset(lmdb_file_path: str, img_key: str, mask_key: str | None = None, serializer: str | None = 'msgpack', img_size: Tuple[int, ...] | None = None, img_format: str | None = 'numpy', ones_mask: bool | None = False, zeroes_mask: bool | None = False, raise_errors: bool | None = True, is_bgr: bool | None = True, valid_resolutions: List[Tuple] | None = None, augmentation_fn: Callable | None = None, mask_interpolation_method: int = 0)[source]#

Bases: Dataset

Tensorpack LMDB dataset.

USPS Dataset Provider#

class archai.datasets.cv.usps_dataset_provider.USPSDatasetProvider(root: str | None = 'dataroot')[source]#

Bases: DatasetProvider

USPS dataset provider.

get_train_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a training dataset.

Returns:

An instance of a training dataset.

get_val_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a validation dataset.

Returns:

An instance of a validation dataset, or the training dataset if validation dataset is not available.

get_test_dataset(transform: Callable | None = None, target_transform: Callable | None = None) Dataset[source]#

Get a testing dataset.

Returns:

An instance of a testing dataset, or the training/validation dataset if testing dataset is not available.