project-sloth commited on
Commit
eeaf2b6
1 Parent(s): 0bb51d4
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .ipynb_checkpoints
LICENSE ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2004 Sam Hocevar <[email protected]>
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
README.md CHANGED
@@ -1,3 +1,41 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: wtfpl
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ dataset_info:
3
+ features:
4
+ - name: image
5
+ dtype: image
6
+ - name: solution
7
+ dtype: string
8
+ splits:
9
+ - name: train
10
+ num_bytes: 24564698
11
+ num_examples: 6000
12
+ - name: validation
13
+ num_bytes: 8195367
14
+ num_examples: 2000
15
+ - name: test
16
+ num_bytes: 8186295
17
+ num_examples: 2000
18
+ download_size: 28857965
19
+ dataset_size: 40946360
20
  license: wtfpl
21
+ task_categories:
22
+ - image-to-text
23
+ tags:
24
+ - captcha
25
+ - ocr
26
+ size_categories:
27
+ - 1K<n<10K
28
  ---
29
+
30
+ # Captcha dataset
31
+
32
+ ## Data
33
+ Captcha images with solutions of exactly 6 digit numbers
34
+
35
+ ## Splits
36
+ * Train: 6000 images
37
+ * Validation: 2000 images
38
+ * Test: 2000 images
39
+
40
+ ## Example
41
+ ![Example image](example.jpg "Example image")
captcha-images.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from pathlib import Path
3
+
4
+ import datasets
5
+
6
+ _DESCRIPTION = """\
7
+ Captcha images dataset.
8
+ """
9
+ _LICENSE = "wtfpl"
10
+ _DATA_DIR = "data"
11
+
12
+ class Captcha(datasets.GeneratorBasedBuilder):
13
+ def _info(self):
14
+ return datasets.DatasetInfo(
15
+ description=_DESCRIPTION,
16
+ features=datasets.Features(
17
+ {
18
+ "image": datasets.Image(),
19
+ "solution": datasets.Value("string"),
20
+ }
21
+ ),
22
+ license=_LICENSE,
23
+ )
24
+
25
+ def _split_generators(self, dl_manager):
26
+ return [
27
+ datasets.SplitGenerator(
28
+ name=datasets.Split.TRAIN,
29
+ gen_kwargs={
30
+ "images": dl_manager.iter_archive(dl_manager.download(os.path.join(_DATA_DIR, "train.tar.gz"))),
31
+ },
32
+ ),
33
+ datasets.SplitGenerator(
34
+ name=datasets.Split.VALIDATION,
35
+ gen_kwargs={
36
+ "images": dl_manager.iter_archive(dl_manager.download(os.path.join(_DATA_DIR, "validation.tar.gz"))),
37
+ },
38
+ ),
39
+ datasets.SplitGenerator(
40
+ name=datasets.Split.TEST,
41
+ gen_kwargs={
42
+ "images": dl_manager.iter_archive(dl_manager.download(os.path.join(_DATA_DIR, "test.tar.gz"))),
43
+ },
44
+ ),
45
+ ]
46
+
47
+ def _generate_examples(self, images):
48
+ for file_path, file_obj in images:
49
+ yield file_path, {
50
+ "image": {"path": file_path, "bytes": file_obj.read()},
51
+ "solution": Path(file_path).name.split('.')[0],
52
+ }
data/test.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:730bf94a1b857caa1de00bc7b5d9840c25bcd9767718f91ba9f8a3d5fd2a1912
3
+ size 5773266
data/train.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a8c388a990aa5a5f04b3e2503f87ecc2a0f8da1fdb70de368298e218490eb55
3
+ size 17319828
data/validation.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68d339c89403682ce2844d2d94524c15afcf990c057cba055dc6a985de42ea91
3
+ size 5764871
example.jpg ADDED

Git LFS Details

  • SHA256: f86cda5aad62639d951ef21c4e173351bd15015b8c7d33967d3aabbaa44b7bb2
  • Pointer size: 129 Bytes
  • Size of remote file: 4.01 kB
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ datasets
2
+ Pillow