File size: 1,899 Bytes
8616e89
 
00c489a
 
 
 
 
 
 
 
 
61d15d7
 
 
 
 
 
 
 
c2a9240
61d15d7
 
 
 
6f6a97b
 
 
61d15d7
6f6a97b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8c8a702
 
ab8f1c6
 
 
8c8a702
5200112
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
license: mit
task_categories:
- text-classification
language:
- en
tags:
- legal
pretty_name: The Street View House Numbers (SVHN) Dataset
size_categories:
- 10K<n<100K
---

# Dataset card for SVHN
The Street View House Numbers (SVHN) dataset serves as a real-world image dataset designed for the development of machine learning and object recognition algorithms, characterized by minimal requirements on data preprocessing and formatting. Similar in essence to MNIST, featuring small cropped digits, SVHN surpasses MNIST by an order of magnitude in labeled data, comprising over 600,000 digit images. Unlike MNIST, SVHN tackles a considerably more challenging and unsolved real-world problem—recognizing digits and numbers within natural scene images. This dataset is derived from house numbers captured in Google Street View images.

## Maintenance
```bash
GIT_LFS_SKIP_SMUDGE=1 git clone git@hf.co:datasets/MuGeminorum/svhn
cd svhn
```

## Usage
```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://huggingface.co/datasets/MuGeminorum/svhn/resolve/main/data.zip',
        'data.zip'
    )

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

## Mirror
<https://www.modelscope.cn/datasets/MuGeminorum/svhn>

## Reference
[1] <a href="http://ufldl.stanford.edu/housenumbers">The Street View House Numbers (SVHN) Dataset</a><br>
[2] <https://github.com/MuGeminorum/SVHN-Recognition>