# SVHN (2011)

> 600k digits cropped from Google Street View photos of house numbers.

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

## Key facts

- Category: Vision
- Task: Digit classification in real-world photos
- Creators: Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, Andrew Y. Ng
- Size: 630,420 digit images (73k train, 26k test, 531k extra)
- Splits: train 73,257, test 26,032, extra 531,131
- Input: 32×32 RGB crop centered on one digit
- Labels: Digit 0–9
- License: Non-commercial use
- Paper: [Reading Digits in Natural Images with Unsupervised Feature Learning](http://ufldl.stanford.edu/housenumbers/nips2011_housenumbers.pdf)
- Homepage: http://ufldl.stanford.edu/housenumbers/
- Hugging Face: [ufldl-stanford/svhn](https://huggingface.co/datasets/ufldl-stanford/svhn)
- Sampled at Hub revision f9e1717d73324ebbc1ece84267ccd80d0aca0690 (2026-11-07)

## Why it matters

MNIST's task with real photos: digits on house fronts, in any font and color, blurred, tilted, badly lit and often with other digits squeezed in at the sides. It became the third standard small-image benchmark after MNIST and CIFAR-10, and its huge "extra" split made it a favorite for semi-supervised learning. Reading whole house numbers with one deep network (Goodfellow et al., 2013) was an early real-world win for deep learning at Google.

## Worth knowing

- The label is the digit in the center. Neighboring digits often show at the edges as distractors.
- In the original .mat files, the digit 0 is stored as label 10.
- The 531k "extra" images are described as somewhat easier than the core training set.
- A "full numbers" version keeps the whole photo with a box around every digit.

## Get the data

```bash
# pip install -U huggingface_hub
hf download ufldl-stanford/svhn --repo-type dataset \
  --include "cropped_digits/*" \
  --local-dir svhn
```

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

ds = load_dataset("ufldl-stanford/svhn", "cropped_digits")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/ufldl-stanford/svhn@~parquet/cropped_digits/test/*.parquet")
print(df.shape)
```

## Related datasets

- [MNIST](https://huggingface.co/datasets/ylecun/mnist): 1998, clean handwritten digits (on this site: https://mralbu.github.io/ai-datasets/d/mnist)
- [CIFAR-10](https://huggingface.co/datasets/uoft-cs/cifar10): 2009, tiny color photos of objects (on this site: https://mralbu.github.io/ai-datasets/d/cifar10)

## Landmark papers

- [Maxout Networks](https://arxiv.org/abs/1302.4389) (2013)
- [Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks](https://arxiv.org/abs/1312.6082) (2013)

## Papers on this site that use it

- [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.
- [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.
