torchelie.datasets¶
Debug datasets¶
A dataset of precedurally generated images of columns randomly colorized. |
|
A dataset of precedurally generated images of rows randomly colorized. |
|
Paired images datasets made for the Pix2Pix paper for paired image translation. |
|
Imagenette by Jeremy Howards ( https://github.com/fastai/imagenette ). |
|
Imagewoof by Jeremy Howards ( https://github.com/fastai/imagenette ). |
Loaders¶
Load an ImageFolder dataset faster by caching the file list the first time it is accessed. |
|
Serve all the images contained in a directory and subdirectories without any labels and structure constraint. |
|
Serve all the images given in |
|
Dataset for side-by-side images. |
Datasets wrappers¶
A dataset that returns all possible pairs of samples of two datasets |
|
|
|
Linearly mixes two samples and labels from a dataset according to the MixUp algorithm |
|
Create a subset that is a random ratio of a dataset. |
|
Wrap a dataset and absorbs the exceptions it raises. |
|
Wrap a dataset. |
|
Wrap a dataset. |
|
Concatenates multiple datasets. |
|
Functions¶
-
torchelie.datasets.
mixup
(x1, x2, y1, y2, num_classes, mixer=None, alpha=0.4)¶ Mixes samples x1 and x2 with respective labels y1 and y2 according to MixUp
\(\lambda \sim \text{Beta}(\alpha, \alpha)\)
\(x = \lambda x_1 + (1-\lambda) x_2\)
\(y = \lambda y_1 + (1 - \lambda) y_2\)
- Parameters
x1 (tensor) – sample 1
x2 (tensor) – sample 2
y1 (tensor) – label 1
y2 (tensor) – label 2
num_classes (int) – number of classes
mixer (Distribution, optional) – a distribution to sample lambda from. If unspecified, the distribution will be a Beta(alpha, alpha)
alpha (float) – if mixer is unspecified, used to parameterize the Beta distribution