---
title: svhn
canonical_url: "https://www.modelscope.cn/datasets/Genius-Society/svhn"
md_url: "https://www.modelscope.cn/datasets/Genius-Society/svhn.md"
repository: Genius-Society/svhn
chinese_name: "街景门牌号数据集"
last_updated: 2026-08-06
license: "MIT License"
storage_size: "655 MB"
domain:
  - image
tasks:
  - image-to-text
size_scale:
  - 10k-1m
downloads: 3598
stars: 23
---

# svhn

> svhn - Genius-Society 在 ModelScope 开源的数据集。Street View House Numbers (SVHN) 数据集是一个为机器学习和物体识别算法开发设计的真实世界图像数据集，其特点是对数据预处理和格式化的要求较低。与 MNIST 类似，SVHN 包含了小型裁剪数字的图像，但在标记数据方面，SVHN 的规模比 MNIST 大一个数量级，包括超过 600,000 张数字图像。与 MNIST 不同，SVHN…

Genius-Society/svhn 是 ModelScope 魔搭社区上的image-to-text数据集，涉及 image 领域，存储大小 655 MB，采用 MIT License 许可。

- **Repository**: Genius-Society/svhn
- **License**: MIT License
- **Tasks**: image-to-text
- **Domain**: image
- **Storage size**: 655 MB
- **Downloads**: 3598
- **Stars**: 23
- **Last updated**: 2026-08-06

Source: https://www.modelscope.cn/datasets/Genius-Society/svhn

---

# 简介
Street View House Numbers (SVHN) 数据集是一个为机器学习和物体识别算法开发设计的真实世界图像数据集，其特点是对数据预处理和格式化的要求较低。与 MNIST 类似，SVHN 包含了小型裁剪数字的图像，但在标记数据方面，SVHN 的规模比 MNIST 大一个数量级，包括超过 600,000 张数字图像。与 MNIST 不同，SVHN 处理的是一个更具挑战性且未解决的真实世界问题：在自然场景图像中识别数字和数字串。该数据集源自于在 Google Street View 图像中捕获的房屋编号。

![](./data/examples_new.png)

## 原始数据结构
```txt
- data
  - train
    - *.png
    - digitStruct.mat
    - see_bboxes.m

  - test
    - *.png
    - digitStruct.mat
    - see_bboxes.m
```

## 数据预览
<https://www.modelscope.cn/datasets/Genius-Society/svhn/dataPeview>

## 使用
### 非 API 方式使用
```python
import os
import zipfile
import requests

def download_file(url, save_path):
    response = requests.get(url, stream=True)
    with open(save_path, 'wb') as file:
        for chunk in response.iter_content(chunk_size=1024):
            if chunk:
                file.write(chunk)

def unzip(zip_file_path, extract_to):
    with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
        for member in zip_ref.infolist():
            zip_ref.extract(member, extract_to)

if not os.path.exists('./data.zip'):
    download_file(
        'https://www.modelscope.cn/datasets/Genius-Society/svhn/resolve/master/data/svhn.zip',
        'data.zip'
    )

if not os.path.exists('./data'):
    unzip('data.zip', './')
```

### API 方式调用
:modelscope-code[]{type="sdk"}

## 维护
#### 跳过大文件
```bash
GIT_LFS_SKIP_SMUDGE=1 
```

:modelscope-code[]{type="git"}

## 镜像
<https://huggingface.co/datasets/Genius-Society/svhn>

## 致谢
 - [The Street View House Numbers (SVHN) Dataset](http://ufldl.stanford.edu/housenumbers)
 - <https://github.com/Genius-Society/svhn_recognition>

<div style="display:none">
