File size: 2,241 Bytes
032f0fd
 
 
 
 
 
 
 
 
 
 
6058f17
032f0fd
 
6058f17
032f0fd
 
 
 
 
6058f17
032f0fd
6058f17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
dataset_info:
  features:
  - name: __key__
    dtype: string
  - name: __url__
    dtype: string
  - name: jpg
    dtype: image
  splits:
  - name: train
    num_bytes: 1128223519
    num_examples: 476118
  download_size: 879225634
  dataset_size: 1128223519
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
license: gpl-3.0
---
# Dataset Summary
This is a simple dataset that I crawled (with labels) from the Internet.
As its title suggests, the dataset contains Captcha images.
One downloads and uses this dataset as usual:

```ipython
In [1]: from datasets import load_dataset

In [2]: dataset = load_dataset("phunc20/nj_biergarten_captcha)
```

The structure of the dataset is depicted in the following code

```ipython
In [3]: dataset
Out[3]:
DatasetDict({
    train: Dataset({
        features: ['__key__', '__url__', 'jpg'],
        num_rows: 476118
    })
})

In [4]: dataset["train"][0]["__key__"]
Out[4]: '001/2024-10-08T18:21:10.578994_y2jhuv'

In [5]: dataset["train"][0]["__url__"]
Out[5]: '/home/phunc20/git-repos/huggingface_hub/phunc20/nj_biergarten_captcha/001.tar'

In [6]: dataset["train"][0]["jpg"]
Out[6]: <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=140x50>
```

- The `__key__` key's value contains part of the file's path; in particular,
  the groundtruth Captcha (aka label) lies in this string,
  which, in the above example, is `y2jhuv`, right after the understore sign `'_'`.
  This retrieval pattern of label is universal across the entire dataset.
    - One thing to notice is that the set of symbols appearing in this Captcha
      dataset is `[a-z][1-9]`, or in Python's term, `string.ascii_lowercase + string.digits[1:]`.
      `0` is excluded on purpose because this Captcha generator generates hard-to-distinguish
      zeros and little-oh-s.
- The `__url__` key is normally of no interesting usage.
- The `"jpg"` key's value is a `PIL.Image` (obtained from the original JPEG file).

An immediate usage of the dataset is to train a Captcha cracker.


# Citation Information

```
@ONLINE{nj_biergarten_captcha,
    author = "phunc20",
    title  = "nj_biergarten_captcha",
    url    = "https://huggingface.co/datasets/phunc20/nj_biergarten_captcha"
}
```