phunc20's picture
First update on the dataset card
6058f17 verified
metadata
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:

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

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"
}