mindspore.dataset

This module provides APIs to load and process various common datasets such as MNIST, CIFAR-10, CIFAR-100, VOC, ImageNet, CelebA, etc. It also supports datasets in standard format, including MindRecord, TFRecord, Manifest, etc. Users can also define their own datasets with this module.

Besides, this module provides APIs to sample data while loading.

Please notice that cache is not supported on Windows platform yet. Please do not use it while loading and processing data on Windows.

Vision

mindspore.dataset.CelebADataset

A source dataset for reading and parsing CelebA dataset.

mindspore.dataset.Cifar100Dataset

A source dataset that reads cifar100 data.

mindspore.dataset.Cifar10Dataset

A source dataset that reads cifar10 data.

mindspore.dataset.CocoDataset

A source dataset for reading and parsing COCO dataset.

mindspore.dataset.ImageFolderDataset

A source dataset that reads images from a tree of directories.

mindspore.dataset.MnistDataset

A source dataset for reading and parsing the MNIST dataset.

mindspore.dataset.VOCDataset

A source dataset for reading and parsing VOC dataset.

Text

mindspore.dataset.CLUEDataset

A source dataset that reads and parses CLUE datasets.

Graph

mindspore.dataset.GraphData

Reads the graph dataset used for GNN training from the shared file and database.

Standard Format

mindspore.dataset.CSVDataset

A source dataset that reads and parses comma-separated values (CSV) datasets.

mindspore.dataset.ManifestDataset

A source dataset that reads images from a manifest file.

mindspore.dataset.MindDataset

A source dataset that reads MindRecord files.

mindspore.dataset.TextFileDataset

A source dataset that reads and parses datasets stored on disk in text format.

mindspore.dataset.TFRecordDataset

A source dataset that reads and parses datasets stored on disk in TFData format.

User Defined

mindspore.dataset.GeneratorDataset

A source dataset that generates data from Python by invoking Python data source each epoch.

mindspore.dataset.NumpySlicesDataset

Create a dataset with given data slices, mainly for loading Python data into dataset.

mindspore.dataset.PaddedDataset

Create a dataset with fake data provided by user.

Sampler

mindspore.dataset.DistributedSampler

A sampler that accesses a shard of the dataset.

mindspore.dataset.PKSampler

Samples K elements for each P class in the dataset.

mindspore.dataset.RandomSampler

Samples the elements randomly.

mindspore.dataset.SequentialSampler

Samples the dataset elements sequentially, same as not having a sampler.

mindspore.dataset.SubsetRandomSampler

Samples the elements randomly from a sequence of indices.

mindspore.dataset.WeightedRandomSampler

Samples the elements from [0, len(weights) - 1] randomly with the given weights (probabilities).

Others

mindspore.dataset.DatasetCache

A client to interface with tensor caching service.

mindspore.dataset.Schema

Class to represent a schema of a dataset.

mindspore.dataset.zip

Zip the datasets in the input tuple of datasets.