owned this note
owned this note
Published
Linked with GitHub
# CIFAR-10

## Summary
* [Introduction](#introduction)
* [Dataset Structure](#dataset_structure)
* [Reference](#reference)
* [License](#license)
* [Citation](#citation)
## Introduction
The CIFAR-10 dataset is composed of 60,000 color images with a resolution of 32x32 pixels, categorized into 10 distinct classes. Each class consists of 6,000 images, evenly distributed. The dataset is further divided into 50,000 training images and 10,000 test images.
To be more specific, the dataset is split into five training batches, with each batch containing 10,000 images. Additionally, there is one separate test batch consisting of 10,000 images. In the test batch, there are precisely 1,000 randomly selected images from each class, ensuring equal representation. The training batches are organized randomly, and some batches may have varying quantities of images from each class. However, collectively, the training batches contain exactly 5,000 images for each class.
## Dataset Structure
### Data Instances
A sample from the training set is provided below:
```
{
'img': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=32x32 at 0x201FA6EE748>,
'label': 0
}
```
### Data Fields
- **img**: The image data is represented as a PIL.Image.Image object with a resolution of 32x32 pixels. It's important to note that when accessing the image column using the syntax dataset[0]["image"], the image file is automatically decoded. However, decoding a large number of image files can be time-consuming. Therefore, it is recommended to first query the sample index before accessing the "image" column. In other words, using dataset[0]["image"] is preferred over dataset["image"][0] to optimize the decoding process.
- **label**: The numbers 0 to 9 in the dataset correspond to the following categories: airplane(0), automobile(1), bird(2), cat(3), deer(4), dog(5), frog(6), horse(7), ship(8), truck(9).

## Reference
We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-10 dataset as a valuable resource for the computer vision and machine learning research community. For more information about the CIFAR-10 dataset and its creator, please visit [the CIFAR-10 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html).
## License
The dataset has been released under MIT license.
## Citation
```
@TECHREPORT{Krizhevsky09learningmultiple,
author = {Alex Krizhevsky},
title = {Learning multiple layers of features from tiny images},
institution = {},
year = {2009}
}
```