# CIFAR-10 (2009)

> 60,000 tiny 32×32 color images in 10 classes.

Page: https://mralbu.github.io/ai-datasets/d/cifar10

## Key facts

- Category: Vision
- Task: Image classification (10 everyday classes)
- Creators: Alex Krizhevsky, Vinod Nair, Geoffrey Hinton
- Size: 60,000 images (6,000 per class)
- Splits: train 50,000, test 10,000
- Input: 32×32 RGB image
- Labels: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
- License: No formal license (free for research)
- Paper: [Learning Multiple Layers of Features from Tiny Images](https://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf)
- Homepage: https://www.cs.toronto.edu/~kriz/cifar.html
- Hugging Face: [uoft-cs/cifar10](https://huggingface.co/datasets/uoft-cs/cifar10)
- Sampled at Hub revision 0b2714987fa478483af9968de7c934580d0bb9a2 (2026-11-07)

## Why it matters

The step up from MNIST: real photos, in color, but still tiny enough to train on in minutes. It became the standard testbed for new architectures and training tricks (ResNets were first stress-tested on it), and it is still the default "does my idea work at all?" benchmark.

## Worth knowing

- At 32×32 pixels, even people find some images hard to classify. Toggle "Actual pixel size" to see how small they are.
- Classes are mutually exclusive by design: "automobile" and "truck" never overlap, and pickup trucks are in neither.
- It is a hand-labeled subset of the 80 Million Tiny Images collection, which was withdrawn in 2020 over offensive labels. CIFAR's own labels were checked by hand and are unaffected.
- CIFAR-10.1 (2018) built a new test set the same way, and accuracy dropped by about 4–10 points. The authors found this was not overfitting to the test set but brittleness to a small shift in the data.

## Get the data

```bash
# pip install -U huggingface_hub
hf download uoft-cs/cifar10 --repo-type dataset \
  --local-dir cifar10
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("uoft-cs/cifar10", "plain_text")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/uoft-cs/cifar10@~parquet/plain_text/test/*.parquet")
print(df.shape)
```

## Related datasets

- [CIFAR-100](https://huggingface.co/datasets/uoft-cs/cifar100): 2009, same image style, 100 fine-grained classes
- [CIFAR-10.1](https://github.com/modestyachts/CIFAR-10.1): 2018, fresh test set
- [CINIC-10](https://huggingface.co/datasets/flwrlabs/cinic10): 2018, CIFAR plus downsampled ImageNet
- [SVHN](https://huggingface.co/datasets/ufldl-stanford/svhn): 2011, real-world house-number digits at the same 32×32 size (on this site: https://mralbu.github.io/ai-datasets/d/svhn)

## Landmark papers

- [Deep Residual Learning for Image Recognition (ResNet)](https://arxiv.org/abs/1512.03385) (2015)
- [Do CIFAR-10 Classifiers Generalize to CIFAR-10?](https://arxiv.org/abs/1806.00451) (2018)

## Papers on this site that use it

- [Xavier initialization (2010)](https://mralbu.github.io/ai-datasets/p/xavier-init.md): Why deep networks were hard to train, and a way to set the starting weights so signals neither vanish nor explode.
- [Adam (2014)](https://mralbu.github.io/ai-datasets/p/adam.md): The optimizer that trains most neural networks, with defaults that work without tuning.
- [Dropout (2014)](https://mralbu.github.io/ai-datasets/p/dropout.md): Switch off random neurons during training, and a network stops memorizing its training data.
- [GAN (2014)](https://mralbu.github.io/ai-datasets/p/gan.md): Train a generator against a discriminator that tries to tell its fakes from real data.
- [DCGAN (2015)](https://mralbu.github.io/ai-datasets/p/dcgan.md): A short list of architecture rules that made convolutional GANs train reliably, and showed what their latent space had learned.
- [ResNet (2015)](https://mralbu.github.io/ai-datasets/p/resnet.md): Skip connections that let networks grow from about 20 layers to more than 150.
- [AdamW (2017)](https://mralbu.github.io/ai-datasets/p/adamw.md): Shows that L2 regularization and weight decay differ in Adam, and that decaying weights directly makes Adam generalize nearly as well as SGD.
- [Shampoo (2018)](https://mralbu.github.io/ai-datasets/p/shampoo.md): Preconditions each weight matrix with two small matrices, one for its rows and one for its columns, instead of treating its weights as independent numbers.
- [BYOL (2020)](https://mralbu.github.io/ai-datasets/p/byol.md): Learned strong image representations without any negative pairs by training an online network to predict a slowly moving copy of itself.
- [DDPM (2020)](https://mralbu.github.io/ai-datasets/p/ddpm.md): Learn to undo noise one small step at a time, and generate images by denoising pure noise.
- [SimCLR (2020)](https://mralbu.github.io/ai-datasets/p/simclr.md): Showed that plain contrastive learning without queues or memory banks matches supervised ResNet-50 when paired with strong augmentations, a nonlinear projection head and large batches.
- [ViT (2020)](https://mralbu.github.io/ai-datasets/p/vit.md): Cut an image into 16×16 patches, treat them as words, and a plain Transformer matches the best convolutional networks.
- [DINO (2021)](https://mralbu.github.io/ai-datasets/p/dino.md): Applied label-free student–teacher self-distillation to Vision Transformers and uncovered emergent object segmentation in their attention maps.
