遇见数据集

Rescaled CIFAR-10 dataset

收藏
Zenodo2025-06-27 更新2026-05-26 收录
官方服务:

资源简介:

Motivation 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. The Rescaled CIFAR-10 dataset was introduced in the paper: [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. with a pre-print available at arXiv: [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. Importantly, the Rescaled CIFAR-10 dataset contains substantially more natural textures and patterns than the MNIST Large Scale dataset, introduced in: [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 and is therefore significantly more challenging. Access and rights The Rescaled CIFAR-10 dataset is provided on the condition that you provide proper citation for the original CIFAR-10 dataset: [4] Krizhevsky, A. and Hinton, G. (2009). Learning multiple layers of features from tiny images. Tech. rep., University of Toronto. and also for this new rescaled version, using the reference [1] above. 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. The dataset 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]. 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]. 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. The h5 files containing the dataset The training dataset file (~5.9 GB) for scale 1, which also contains the corresponding validation and test data for the same scale, is: cifar10_with_scale_variations_tr40000_vl10000_te10000_outsize64-64_scte1p000_scte1p000.h5 Additionally, for the Rescaled CIFAR-10 dataset, there are 9 datasets (~1 GB each) for testing scale generalisation at scales not present in the training set. Each of these datasets is rescaled using a different image scaling factor, 2k/4, with k being integers in the range [-4, 4]: cifar10_with_scale_variations_te10000_outsize64-64_scte0p500.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte0p595.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte0p707.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte0p841.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte1p000.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte1p189.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte1p414.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte1p682.h5 cifar10_with_scale_variations_te10000_outsize64-64_scte2p000.h5 These dataset files were used for the experiments presented in Figures 9, 10, 15, 16, 20 and 24 in [1]. Instructions for loading the data set The datasets are saved in HDF5 format, with the partitions in the respective h5 files named as('/x_train', '/x_val', '/x_test', '/y_train', '/y_test', '/y_val'); which ones exist depends on which data split is used. The training dataset can be loaded in Python as: with h5py.File(`<filename>`, 'r') as f: x_train = np.array( f["/x_train"], dtype=np.float32) x_val = np.array( f["/x_val"], dtype=np.float32) x_test = np.array( f["/x_test"], dtype=np.float32) y_train = np.array( f["/y_train"], dtype=np.int32) y_val = np.array( f["/y_val"], dtype=np.int32) y_test = np.array( f["/y_test"], dtype=np.int32) 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]: x_train = np.transpose(x_train, (0, 3, 1, 2)) x_val = np.transpose(x_val, (0, 3, 1, 2)) x_test = np.transpose(x_test, (0, 3, 1, 2)) The test datasets can be loaded in Python as: with h5py.File(`<filename>`, 'r') as f: x_test = np.array( f["/x_test"], dtype=np.float32) y_test = np.array( f["/y_test"], dtype=np.int32) The test datasets can be loaded in Matlab as: x_test = h5read(`<filename>`,'/x_test'); y_test = h5read(`<filename>`,'/y_test'); 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.

研究动机 提出缩放版CIFAR-10(Rescaled CIFAR-10)数据集的目的,是构建一个包含最高4倍尺度变化的数据集,用于评估神经网络泛化至训练集中未出现尺度的能力。 缩放版CIFAR-10数据集首次提出于以下论文: [1] A. Perzanowski 与 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. 其预印本可在arXiv获取: [2] Perzanowski 与 Lindeberg (2024) "Scale generalisation properties of extended scale-covariant and scale-invariant Gaussian derivative networks on image datasets with spatial scaling variations", arXiv预印本 arXiv:2409.11140. 值得注意的是,相较于2022年提出的MNIST Large Scale数据集(MNIST Large Scale dataset)(参考文献[3]),缩放版CIFAR-10数据集包含了更为丰富的自然纹理与图案,因此其泛化任务的挑战性显著更高。 [3] Y. Jansson 与 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 获取与使用权限 使用缩放版CIFAR-10数据集的前提是,需正确引用原始CIFAR-10数据集(CIFAR-10 dataset): [4] Krizhevsky, A. 与 Hinton, G. (2009). Learning multiple layers of features from tiny images. Tech. rep., University of Toronto. 同时需引用本文提出的缩放版数据集,即参考文献[1]。 该数据集需通过申请获取。若您希望试用该数据集,请通过下方系统提交申请,我们将尽快为您开通访问权限。 数据集详情 缩放版CIFAR-10数据集通过对原始CIFAR-10数据集(CIFAR-10 dataset)[4]中动物与车辆类别的32×32 RGB图像进行缩放生成,尺度变化范围最高可达4倍。为确保所有测试图像分辨率一致,采用镜像扩展方式将图像尺寸统一至64×64。缩放过程使用Matlab中的`imresize()`函数,默认开启抗锯齿,并通过将像素值裁剪至[0, 255]范围消除双三次插值的过冲现象。数据集的具体构建细节可参考文献[1]。 该数据集共包含10个类别:"airplane(飞机)"、"automobile(汽车)"、"bird(鸟类)"、"cat(猫)"、"deer(鹿)"、"dog(狗)"、"frog(青蛙)"、"horse(马)"、"ship(船)"与"truck(卡车)",在数据集中以[0, 9]区间内的整数标签表示。 数据集划分为40000个训练样本、10000个验证样本与10000个测试样本:训练集取自原始CIFAR-10训练集的前40000个样本;验证集取自该原始训练集的最后10000个图像批次;测试集则全部取自原始CIFAR-10测试集的10000张图像。 数据集HDF5文件 用于尺度1的训练数据集文件(约5.9 GB,同时包含该尺度下对应的验证与测试数据)为: `cifar10_with_scale_variations_tr40000_vl10000_te10000_outsize64-64_scte1p000_scte1p000.h5` 此外,针对缩放版CIFAR-10数据集,另有9个单尺度测试数据集(每个约1 GB),用于评估模型在训练集未出现尺度下的泛化能力。每个数据集采用不同的图像缩放因子`2k/4`生成,其中`k`为[-4, 4]区间内的整数,对应文件如下: `cifar10_with_scale_variations_te10000_outsize64-64_scte0p500.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte0p595.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte0p707.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte0p841.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte1p000.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte1p189.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte1p414.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte1p682.h5` `cifar10_with_scale_variations_te10000_outsize64-64_scte2p000.h5` 上述数据集文件用于参考文献[1]中图9、10、15、16、20与24对应的实验。 数据集加载指南 数据集以HDF5格式存储,各数据分区在对应的h5文件中的键名为`/x_train`、`/x_val`、`/x_test`、`/y_train`、`/y_test`、`/y_val`,具体包含哪些分区取决于所使用的数据划分方式。 可通过以下代码在Python中加载训练数据集: python with h5py.File(`<filename>`, 'r') as f: x_train = np.array( f["/x_train"], dtype=np.float32) x_val = np.array( f["/x_val"], dtype=np.float32) x_test = np.array( f["/x_test"], dtype=np.float32) y_train = np.array( f["/y_train"], dtype=np.int32) y_val = np.array( f["/y_val"], dtype=np.int32) y_test = np.array( f["/y_test"], dtype=np.int32) 由于PyTorch采用`[num_samples, channels, width, height]`的张量格式,而数据存储格式为`[num_samples, width, height, channels]`,因此需要对图像数据进行转置: python x_train = np.transpose(x_train, (0, 3, 1, 2)) x_val = np.transpose(x_val, (0, 3, 1, 2)) x_test = np.transpose(x_test, (0, 3, 1, 2)) 可通过以下代码在Python中加载测试数据集: python with h5py.File(`<filename>`, 'r') as f: x_test = np.array( f["/x_test"], dtype=np.float32) y_test = np.array( f["/y_test"], dtype=np.int32) 可通过以下代码在Matlab中加载测试数据集: matlab x_test = h5read(`<filename>`,'/x_test'); y_test = h5read(`<filename>`,'/y_test'); 图像在HDF5文件中的存储格式为`[num_samples, x_dim, y_dim, channels]`,像素强度值未进行归一化,取值范围为[0, 255]。

提供机构:
Zenodo
创建时间:
2025-04-10
二维码
社区交流群
二维码
科研交流群
商业服务