NAME

AI::MXNet::Gluon::Data::Vision::DownloadedDataSet::MNIST

DESCRIPTION

MNIST handwritten digits dataset from `http://yann.lecun.com/exdb/mnist`_.

Each sample is an image (in 3D NDArray) with shape (28, 28, 1).

Parameters
----------
root : str
    Path to temp folder for storing data.
    Defaults to ~/.mxnet/datasets/mnist
train : bool
    Whether to load the training or testing set.
    Defaults to True
transform : function
    A user defined callback that transforms each instance. For example

transform => sub { my ($data, $label) = @_; return ($data->astype('float32')/255, $label) }

NAME

AI::MXNet::Gluon::Data::Vision::DownloadedDataSet::FashionMNIST

DESCRIPTION

A dataset of Zalando's article images consisting of fashion products,
a drop-in replacement of the original MNIST dataset from
`https://github.com/zalandoresearch/fashion-mnist`_.

Each sample is an image (in 3D NDArray) with shape (28, 28, 1).

Parameters
----------
root : str
    Path to temp folder for storing data.
    Defaults to ~/.mxnet/datasets/mnist
train : bool
    Whether to load the training or testing set.
    Defaults to True
transform : function
    A user defined callback that transforms each instance. For example

transform => sub { my ($data, $label) = @_; return ($data->astype('float32')/255, $label) }

NAME

AI::MXNet::Gluon::Data::Vision::DownloadedDataSet::CIFAR10

DESCRIPTION

CIFAR10 image classification dataset from `https://www.cs.toronto.edu/~kriz/cifar.html`_.

Each sample is an image (in 3D NDArray) with shape (32, 32, 1).

Parameters
----------
root : str
    Path to temp folder for storing data.
train : bool
    Whether to load the training or testing set.
transform : function
    A user defined callback that transforms each instance. For example:

transform => sub { my ($data, $label) = @_; return ($data->astype('float32')/255, $label) }

NAME

AI::MXNet::Gluon::Data::Vision::RecordFileSet::ImageRecordDataset

DESCRIPTION

A dataset wrapping over a RecordIO file containing images.

Each sample is an image and its corresponding label.

Parameters
----------
filename : str
    Path to rec file.
flag : {0, 1}, default 1
    If 0, always convert images to greyscale.

    If 1, always convert images to colored (RGB).
transform : function
    A user defined callback that transforms each instance. For example::

NAME

AI::MXNet::Gluon::Data::Vision::ImageFolderDataset

DESCRIPTION

A dataset for loading image files stored in a folder structure like::

    root/car/0001.jpg
    root/car/xxxa.jpg
    root/car/yyyb.jpg
    root/bus/123.jpg
    root/bus/023.jpg
    root/bus/wwww.jpg

Parameters
----------
root : str
    Path to root directory.
flag : {0, 1}, default 1
    If 0, always convert loaded images to greyscale (1 channel).
    If 1, always convert loaded images to colored (3 channels).
transform : callable
    A function that takes data and label and transforms them::

        transform = lambda data, label: (data.astype(np.float32)/255, label)

Attributes
----------
synsets : list
    List of class names. `synsets[i]` is the name for the integer label `i`
items : list of tuples
    List of all images in (filename, label) pairs.