vkashko commited on
Commit
dd8aa7d
·
1 Parent(s): f8e38de

refactor: all data

Browse files
.gitattributes CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ data filter=lfs diff=lfs merge=lfs -text
data/generated-vietnamese-passeports-dataset.csv ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ image_id,image
2
+ 0,images/0.png
3
+ 1,images/1.png
4
+ 2,images/2.png
5
+ 3,images/3.png
6
+ 4,images/4.png
7
+ 5,images/5.png
8
+ 6,images/6.png
9
+ 7,images/7.png
10
+ 8,images/8.png
11
+ 9,images/9.png
12
+ 10,images/10.png
13
+ 11,images/11.png
14
+ 12,images/12.png
15
+ 13,images/13.png
16
+ 14,images/14.png
17
+ 15,images/15.png
18
+ 16,images/16.png
19
+ 17,images/17.png
20
+ 18,images/18.png
21
+ 19,images/19.png
images/0.png → data/images.tar.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e4abcd0ebd969217397ffbccb40e2e26f8c6463ac3cbfd74118a69e20e54ba05
3
- size 1629996
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58db7f24fdf48a252f1bc347fccad939bee6a1630b4822d4daef4858109aabbb
3
+ size 28741603
generated-vietnamese-passeports-dataset.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ import pandas as pd
3
+
4
+ _CITATION = """\
5
+ @InProceedings{huggingface:dataset,
6
+ title = {generated-vietnamese-passeports-dataset},
7
+ author = {TrainingDataPro},
8
+ year = {2023}
9
+ }
10
+ """
11
+
12
+ _DESCRIPTION = """\
13
+ Data generation in machine learning involves creating or manipulating data to train
14
+ and evaluate machine learning models. The purpose of data generation is to provide
15
+ diverse and representative examples that cover a wide range of scenarios, ensuring the
16
+ model's robustness and generalization.
17
+ The dataset contains GENERATED Vietnamese passports, which are replicas of official
18
+ passports but with randomly generated details, such as name, date of birth etc.
19
+ The primary intention of generating these fake passports is to demonstrate the
20
+ structure and content of a typical passport document and to train the neural network to
21
+ identify this type of document.
22
+ Generated passports can assist in conducting research without accessing or compromising
23
+ real user data that is often sensitive and subject to privacy regulations. Synthetic
24
+ data generation allows researchers to *develop and refine models using simulated
25
+ passport data without risking privacy leaks*.
26
+ """
27
+ _NAME = "generated-vietnamese-passeports-dataset"
28
+
29
+ _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
30
+
31
+ _LICENSE = ""
32
+
33
+ _DATA = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}/resolve/main/data/"
34
+
35
+
36
+ class GeneratedVietnamesePasseportsDataset(datasets.GeneratorBasedBuilder):
37
+ def _info(self):
38
+ return datasets.DatasetInfo(
39
+ description=_DESCRIPTION,
40
+ features=datasets.Features(
41
+ {
42
+ "id": datasets.Value("int32"),
43
+ "image": datasets.Image()
44
+ }
45
+ ),
46
+ supervised_keys=None,
47
+ homepage=_HOMEPAGE,
48
+ citation=_CITATION,
49
+ )
50
+
51
+ def _split_generators(self, dl_manager):
52
+ images = dl_manager.download(f"{_DATA}images.tar.gz")
53
+ annotations = dl_manager.download(f"{_DATA}{_NAME}.csv")
54
+ images = dl_manager.iter_archive(images)
55
+ return [
56
+ datasets.SplitGenerator(
57
+ name=datasets.Split.TRAIN,
58
+ gen_kwargs={
59
+ "images": images,
60
+ "annotations": annotations,
61
+ },
62
+ ),
63
+ ]
64
+
65
+ def _generate_examples(self, images, masks, annotations):
66
+ annotations_df = pd.read_csv(annotations)
67
+
68
+ for idx, (image_path, image) in enumerate(
69
+ zip(images, masks)
70
+ ):
71
+ yield idx, {
72
+ "id": annotations_df["image_id"].iloc[idx],
73
+ "image": {"path": image_path, "bytes": image.read()}
74
+ }
images/1.png DELETED

Git LFS Details

  • SHA256: 6b3b6b51e00ab78c68b5cdd0ba5f64ca729e3a34863f6f5c7abf6c37f907e922
  • Pointer size: 132 Bytes
  • Size of remote file: 1.45 MB
images/10.png DELETED

Git LFS Details

  • SHA256: bfd7f0ab0a05d95c9ead5de4707e412e2ef00e1b341a59f3b707f487321ebc0c
  • Pointer size: 131 Bytes
  • Size of remote file: 799 kB
images/11.png DELETED

Git LFS Details

  • SHA256: f1029a3e23a07911e7bbdced3171e68b21491e6ebd699f2efba02b1c2f8534b2
  • Pointer size: 131 Bytes
  • Size of remote file: 886 kB
images/12.png DELETED

Git LFS Details

  • SHA256: 529dc62851d41aea6819e955564890a5a5b4e483760ee9736b99a07e2d822188
  • Pointer size: 132 Bytes
  • Size of remote file: 1.92 MB
images/13.png DELETED

Git LFS Details

  • SHA256: 060bb0b638e13970e382d1c1478ef9f23895d0b317b6f342ad23e4f017a0a3b3
  • Pointer size: 132 Bytes
  • Size of remote file: 1.14 MB
images/14.png DELETED

Git LFS Details

  • SHA256: f44df597750b27431a73e08600faa340ad27de25a26bbfbf0974003b306a20c5
  • Pointer size: 132 Bytes
  • Size of remote file: 1.68 MB
images/15.png DELETED

Git LFS Details

  • SHA256: 527ba2b25a6ac439b245331f93ba07bf21dc900eefbb8b11a54c621cb7c8dbd8
  • Pointer size: 132 Bytes
  • Size of remote file: 1.38 MB
images/16.png DELETED

Git LFS Details

  • SHA256: ca1695956e9376f7a1e643296228e302f78531b15962708fae342fee929d0c69
  • Pointer size: 132 Bytes
  • Size of remote file: 1.69 MB
images/17.png DELETED

Git LFS Details

  • SHA256: 0748cf56a0448ad79a8ced9e8c6fcf236402e4bf4905274835e3355aee564a9c
  • Pointer size: 131 Bytes
  • Size of remote file: 980 kB
images/18.png DELETED

Git LFS Details

  • SHA256: 70a1e8898a7c2c856a00ec3335ae0a9ef42e776e34a3c5a1c0f92097119ca51f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.62 MB
images/19.png DELETED

Git LFS Details

  • SHA256: c2c34580a634da2346c706634b5cba383f913b75fbbf5a67d93b1a8db7d9cecc
  • Pointer size: 132 Bytes
  • Size of remote file: 1.12 MB
images/2.png DELETED

Git LFS Details

  • SHA256: 7aee7f59fcb78490ac92612a76e2f15dc9c48ffc3800cd21db581c9bfd2a8f4b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.49 MB
images/3.png DELETED

Git LFS Details

  • SHA256: 2e0130d3ce944a3200cfa603ecf01b6c91459b0fe85b9ddc705420e9c77cb609
  • Pointer size: 132 Bytes
  • Size of remote file: 1.2 MB
images/4.png DELETED

Git LFS Details

  • SHA256: e2d4c40d0609e90762c1d91eb4afc6fb7d859d85a7634a910e43720cc6dfffea
  • Pointer size: 132 Bytes
  • Size of remote file: 1.31 MB
images/5.png DELETED

Git LFS Details

  • SHA256: 0e7164dd560072ac52b9242be83f45fcd714c56acbc7b25041bbc78919304cf0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.75 MB
images/6.png DELETED

Git LFS Details

  • SHA256: feded3c7b07ee427936a60ba3bb5b05e598fe1ee30ed5677bfb49c27bd6f7508
  • Pointer size: 132 Bytes
  • Size of remote file: 1.96 MB
images/7.png DELETED

Git LFS Details

  • SHA256: 20ffb2b472efff731170e636d43b6d52b0bd4abd47e2100564fa1889f202fa72
  • Pointer size: 132 Bytes
  • Size of remote file: 1.54 MB
images/8.png DELETED

Git LFS Details

  • SHA256: 04cab3debab82713ace9feae6c25a85c123d3b2a29d3fba220e99e45bb7cb345
  • Pointer size: 132 Bytes
  • Size of remote file: 1.9 MB
images/9.png DELETED

Git LFS Details

  • SHA256: 00961b3b6525446daa86c8f01278ded9c47dd58f5469d78316fc44eab9400066
  • Pointer size: 132 Bytes
  • Size of remote file: 1.29 MB
passports.csv DELETED
@@ -1,21 +0,0 @@
1
- image
2
- images/0.png
3
- images/1.png
4
- images/2.png
5
- images/3.png
6
- images/4.png
7
- images/5.png
8
- images/6.png
9
- images/7.png
10
- images/8.png
11
- images/9.png
12
- images/10.png
13
- images/11.png
14
- images/12.png
15
- images/13.png
16
- images/14.png
17
- images/15.png
18
- images/16.png
19
- images/17.png
20
- images/18.png
21
- images/19.png