Rescaled CIFAR-10 dataset

Fuente: Zenodo
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Perzanowski, Andrzej, Lindeberg, Tony
Format: Recurso digital
Sprache:Englisch
Veröffentlicht: Zenodo 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866902021658902528
author Perzanowski, Andrzej
Lindeberg, Tony
author_facet Perzanowski, Andrzej
Lindeberg, Tony
contents <h3><strong>Motivation</strong></h3> <p>The goal of introducing the Rescaled CIFAR-10 dataset is to provide a dataset that contains scale variations (up to a factor of 4), to evaluate the ability of networks to generalise to scales not present in the training data.</p> <p>The Rescaled CIFAR-10 dataset was introduced in the paper:</p> <p>[1] A. Perzanowski and T. Lindeberg (2025) "Scale generalisation properties of extended scale-covariant and scale-invariant Gaussian derivative networks on image datasets with spatial scaling variations”, Journal of Mathematical Imaging and Vision, 67(29), https://doi.org/10.1007/s10851-025-01245-x.</p> <p>with a pre-print available at arXiv:</p> <p>[2] Perzanowski and Lindeberg (2024) "Scale generalisation properties of extended scale-covariant and scale-invariant Gaussian derivative networks on image datasets with spatial scaling variations”, arXiv preprint arXiv:2409.11140.</p> <p>Importantly, the Rescaled CIFAR-10 dataset contains substantially more natural textures and patterns than the MNIST Large Scale dataset, introduced in:</p> <p>[3] Y. Jansson and T. Lindeberg (2022) "Scale-invariant scale-channel networks: Deep networks that generalise to previously unseen scales", Journal of Mathematical Imaging and Vision, 64(5): 506-536,  https://doi.org/10.1007/s10851-022-01082-2</p> <p>and is therefore significantly more challenging.</p> <h3><strong>Access and rights</strong></h3> <p>The Rescaled CIFAR-10 dataset is provided on the condition that you provide proper citation for the original CIFAR-10 dataset:</p> <p>[4] Krizhevsky, A. and Hinton, G. (2009). Learning multiple layers of features from tiny images. Tech. rep., University of Toronto.</p> <p>and also for this new rescaled version, using the reference [1] above. </p> <p>The data set is made available on request. If you would be interested in trying out this data set, please make a request in the system below, and we will grant you access as soon as possible.</p> <h3><strong>The dataset</strong></h3> <p>The Rescaled CIFAR-10 dataset is generated by rescaling 32×32 RGB images of animals and vehicles from the original CIFAR-10 dataset [4]. The scale variations are up to a factor of 4. In order to have all test images have the same resolution, mirror extension is used to extend the images to size 64x64. The imresize() function in Matlab was used for the rescaling, with default anti-aliasing turned on, and bicubic interpolation overshoot removed by clipping to the [0, 255] range. The details of how the dataset was created can be found in [1].</p> <p>There are 10 distinct classes in the dataset: “airplane”, “automobile”, “bird”, “cat”, “deer”, “dog”, “frog”, “horse”, “ship” and “truck”.  In the dataset, these are represented by integer labels in the range [0, 9].</p> <p>The dataset is split into 40 000 training samples, 10 000 validation samples and 10 000 testing samples. The training dataset is generated using the initial 40 000 samples from the original CIFAR-10 training set. The validation dataset, on the other hand, is formed from the final 10 000 image batch of that same training set. For testing, all test datasets are built from the 10 000 images contained in the original CIFAR-10 test set.</p> <h3><strong>The h5 files containing the dataset</strong></h3> <p>The training dataset file (~5.9 GB) for scale 1, which also contains the corresponding validation and test data for the same scale, is:</p> <p>    cifar10_with_scale_variations_tr40000_vl10000_te10000_outsize64-64_scte1p000_scte1p000.h5</p> <p>Additionally, for the Rescaled CIFAR-10 dataset, there are 9 datasets (~1 GB each) for testing <strong><em>scale generalisation</em></strong> at scales not present in the training set. Each of these datasets is rescaled using a different image scaling factor, 2<sup>k/4</sup>, with k being integers in the range [-4, 4]:</p> <p>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p500.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p595.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p707.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p841.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p000.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p189.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p414.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p682.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte2p000.h5  </p> <p>These dataset files were used for the experiments presented in Figures 9, 10, 15, 16, 20 and 24 in [1].</p> <h3><strong>Instructions for loading the data set</strong></h3> <p>The datasets are saved in HDF5 format, with the partitions in the respective h5 files named as<br>('/x_train', '/x_val', '/x_test', '/y_train', '/y_test', '/y_val'); which ones exist depends on which data split is used.</p> <p>The training dataset can be loaded in Python as:</p> <p>with h5py.File(`<filename>`, 'r') as f:</p> <p>    x_train = np.array( f["/x_train"], dtype=np.float32)  <br>    x_val = np.array( f["/x_val"], dtype=np.float32)  <br>    x_test = np.array( f["/x_test"], dtype=np.float32)  <br>    y_train = np.array( f["/y_train"], dtype=np.int32)  <br>    y_val = np.array( f["/y_val"], dtype=np.int32)  <br>    y_test = np.array( f["/y_test"], dtype=np.int32)  </p> <p>We also need to permute the data, since Pytorch uses the format [num_samples, channels, width, height], while the data is saved as [num_samples, width, height, channels]:  </p> <p>    x_train = np.transpose(x_train, (0, 3, 1, 2))  <br>    x_val = np.transpose(x_val, (0, 3, 1, 2))  <br>    x_test = np.transpose(x_test, (0, 3, 1, 2))  </p> <p>The test datasets can be loaded in Python as:</p> <p>with h5py.File(`<filename>`, 'r') as f:   </p> <p>    x_test = np.array( f["/x_test"], dtype=np.float32)  <br>    y_test = np.array( f["/y_test"], dtype=np.int32)  </p> <p>The test datasets can be loaded in Matlab as:<br>  <br>    x_test = h5read(`<filename>`,'/x_test');  <br>    y_test = h5read(`<filename>`,'/y_test');  </p> <p>The images are stored as [num_samples, x_dim, y_dim, channels] in HDF5 files. The pixel intensity values are not normalised, and are in a [0, 255] range.</p>
format Recurso digital
id zenodo_https___doi_org_10_5281_zenodo_15188748
institution Zenodo
language eng
publishDate 2025
publisher Zenodo
record_format zenodo
spellingShingle Rescaled CIFAR-10 dataset
Perzanowski, Andrzej
Lindeberg, Tony
Deep learning
Scale invariance
Scale covariance
Scale equivariance
Scale generalisation
CIFAR-10
<h3><strong>Motivation</strong></h3> <p>The goal of introducing the Rescaled CIFAR-10 dataset is to provide a dataset that contains scale variations (up to a factor of 4), to evaluate the ability of networks to generalise to scales not present in the training data.</p> <p>The Rescaled CIFAR-10 dataset was introduced in the paper:</p> <p>[1] A. Perzanowski and T. Lindeberg (2025) "Scale generalisation properties of extended scale-covariant and scale-invariant Gaussian derivative networks on image datasets with spatial scaling variations”, Journal of Mathematical Imaging and Vision, 67(29), https://doi.org/10.1007/s10851-025-01245-x.</p> <p>with a pre-print available at arXiv:</p> <p>[2] Perzanowski and Lindeberg (2024) "Scale generalisation properties of extended scale-covariant and scale-invariant Gaussian derivative networks on image datasets with spatial scaling variations”, arXiv preprint arXiv:2409.11140.</p> <p>Importantly, the Rescaled CIFAR-10 dataset contains substantially more natural textures and patterns than the MNIST Large Scale dataset, introduced in:</p> <p>[3] Y. Jansson and T. Lindeberg (2022) "Scale-invariant scale-channel networks: Deep networks that generalise to previously unseen scales", Journal of Mathematical Imaging and Vision, 64(5): 506-536,  https://doi.org/10.1007/s10851-022-01082-2</p> <p>and is therefore significantly more challenging.</p> <h3><strong>Access and rights</strong></h3> <p>The Rescaled CIFAR-10 dataset is provided on the condition that you provide proper citation for the original CIFAR-10 dataset:</p> <p>[4] Krizhevsky, A. and Hinton, G. (2009). Learning multiple layers of features from tiny images. Tech. rep., University of Toronto.</p> <p>and also for this new rescaled version, using the reference [1] above. </p> <p>The data set is made available on request. If you would be interested in trying out this data set, please make a request in the system below, and we will grant you access as soon as possible.</p> <h3><strong>The dataset</strong></h3> <p>The Rescaled CIFAR-10 dataset is generated by rescaling 32×32 RGB images of animals and vehicles from the original CIFAR-10 dataset [4]. The scale variations are up to a factor of 4. In order to have all test images have the same resolution, mirror extension is used to extend the images to size 64x64. The imresize() function in Matlab was used for the rescaling, with default anti-aliasing turned on, and bicubic interpolation overshoot removed by clipping to the [0, 255] range. The details of how the dataset was created can be found in [1].</p> <p>There are 10 distinct classes in the dataset: “airplane”, “automobile”, “bird”, “cat”, “deer”, “dog”, “frog”, “horse”, “ship” and “truck”.  In the dataset, these are represented by integer labels in the range [0, 9].</p> <p>The dataset is split into 40 000 training samples, 10 000 validation samples and 10 000 testing samples. The training dataset is generated using the initial 40 000 samples from the original CIFAR-10 training set. The validation dataset, on the other hand, is formed from the final 10 000 image batch of that same training set. For testing, all test datasets are built from the 10 000 images contained in the original CIFAR-10 test set.</p> <h3><strong>The h5 files containing the dataset</strong></h3> <p>The training dataset file (~5.9 GB) for scale 1, which also contains the corresponding validation and test data for the same scale, is:</p> <p>    cifar10_with_scale_variations_tr40000_vl10000_te10000_outsize64-64_scte1p000_scte1p000.h5</p> <p>Additionally, for the Rescaled CIFAR-10 dataset, there are 9 datasets (~1 GB each) for testing <strong><em>scale generalisation</em></strong> at scales not present in the training set. Each of these datasets is rescaled using a different image scaling factor, 2<sup>k/4</sup>, with k being integers in the range [-4, 4]:</p> <p>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p500.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p595.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p707.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte0p841.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p000.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p189.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p414.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte1p682.h5  <br>    cifar10_with_scale_variations_te10000_outsize64-64_scte2p000.h5  </p> <p>These dataset files were used for the experiments presented in Figures 9, 10, 15, 16, 20 and 24 in [1].</p> <h3><strong>Instructions for loading the data set</strong></h3> <p>The datasets are saved in HDF5 format, with the partitions in the respective h5 files named as<br>('/x_train', '/x_val', '/x_test', '/y_train', '/y_test', '/y_val'); which ones exist depends on which data split is used.</p> <p>The training dataset can be loaded in Python as:</p> <p>with h5py.File(`<filename>`, 'r') as f:</p> <p>    x_train = np.array( f["/x_train"], dtype=np.float32)  <br>    x_val = np.array( f["/x_val"], dtype=np.float32)  <br>    x_test = np.array( f["/x_test"], dtype=np.float32)  <br>    y_train = np.array( f["/y_train"], dtype=np.int32)  <br>    y_val = np.array( f["/y_val"], dtype=np.int32)  <br>    y_test = np.array( f["/y_test"], dtype=np.int32)  </p> <p>We also need to permute the data, since Pytorch uses the format [num_samples, channels, width, height], while the data is saved as [num_samples, width, height, channels]:  </p> <p>    x_train = np.transpose(x_train, (0, 3, 1, 2))  <br>    x_val = np.transpose(x_val, (0, 3, 1, 2))  <br>    x_test = np.transpose(x_test, (0, 3, 1, 2))  </p> <p>The test datasets can be loaded in Python as:</p> <p>with h5py.File(`<filename>`, 'r') as f:   </p> <p>    x_test = np.array( f["/x_test"], dtype=np.float32)  <br>    y_test = np.array( f["/y_test"], dtype=np.int32)  </p> <p>The test datasets can be loaded in Matlab as:<br>  <br>    x_test = h5read(`<filename>`,'/x_test');  <br>    y_test = h5read(`<filename>`,'/y_test');  </p> <p>The images are stored as [num_samples, x_dim, y_dim, channels] in HDF5 files. The pixel intensity values are not normalised, and are in a [0, 255] range.</p>
title Rescaled CIFAR-10 dataset
topic Deep learning
Scale invariance
Scale covariance
Scale equivariance
Scale generalisation
CIFAR-10
url https://doi.org/10.5281/zenodo.15188748