Vadzim Kashko commited on
Commit
c3126ae
1 Parent(s): e1e5cf8

refactor: all data

Browse files
Files changed (33) hide show
  1. .gitattributes +1 -0
  2. anti-spoofing_replay.py +87 -0
  3. Replay_30.csv → data/anti-spoofing_replay.csv +0 -0
  4. img/0001ffba3c--6287e2f608ea00759b5c156e/replay_video.mp4 → data/videos.tar.gz +2 -2
  5. img/0001ffba3c--62880080572a894c5df8f427/replay_video.mp4 +0 -3
  6. img/0001ffba3c--62887f049bdab7061555fd99/replay_video.mp4 +0 -3
  7. img/0001ffba3c--6288bb0ae5f8af70ce83a28a/replay_video.mp4 +0 -3
  8. img/0001ffba3c--6288edb3dfbf29134f7c3012/replay_video.mp4 +0 -3
  9. img/0001ffba3c--6289196875a5cf63cd0cb302/replay_video.mp4 +0 -3
  10. img/0001ffba3c--6289d29083bc27584c65e943/replay_video.mp4 +0 -3
  11. img/0001ffba3c--628a50ad08ea00759b6e5f8b/replay_video.mp4 +0 -3
  12. img/0001ffba3c--628a68b5180bc205cf8704d2/replay_video.mp4 +0 -3
  13. img/0001ffba3c--628befdf75a5cf63cd2c633b/replay_video.mp4 +0 -3
  14. img/0001ffba3c--628c4ed4572a894c5d1f9737/replay_video.mp4 +0 -3
  15. img/0001ffba3c--628c9dbb2579312f1ac7ee6f/replay_video.mp4 +0 -3
  16. img/0001ffba3c--628cc2211b4d6738e8ba8f01/replay_video.mp4 +0 -3
  17. img/0001ffba3c--628ce0878d34a916af69632c/replay_video.mp4 +0 -3
  18. img/0001ffba3c--628cf4bd1b4d6738e8be182d/replay_video.mp4 +0 -3
  19. img/0001ffba3c--62e07940dc9a541ecee54262/replay_video.mp4 +0 -3
  20. img/0001ffba3c--62ec773002bd766f640a8f89/replay_video.mp4 +0 -3
  21. img/0001fffbd2--629e521084888b2b81b3ac64/replay_video.mp4 +0 -3
  22. img/0001fffbd2--62aef2b0913966743ab8c9d5/replay_video.mp4 +0 -3
  23. img/0001fffbd2--6308fa26a22771012d91606c/replay_video.mp4 +0 -3
  24. img/0001fffbd2--630b66fab961b45a3ceb1ca9/replay_video.mp4 +0 -3
  25. img/0001fffbd2--630b6ba7e3a4854c648025ea/replay_video.mp4 +0 -3
  26. img/0001fffbd2--630e1f3ae371414f32846a04/replay_video.mp4 +0 -3
  27. img/0001fffbd2--6321679c014598092a3db5fd/replay_video.mp4 +0 -3
  28. img/0001fffbd2--632191ab697aa430ec399453/replay_video.mp4 +0 -3
  29. img/0001fffbd2--63298657068b1b4bbfcf7e1a/replay_video.mp4 +0 -3
  30. img/0001fffbd2--63329806626295715caa9f89/replay_video.mp4 +0 -3
  31. img/0001fffbd2--633bddecfc74d91be0d4f30f/replay_video.MOV +0 -3
  32. img/0001fffbd2--633c46dd38f9495ed344be8d/replay_video.mp4 +0 -3
  33. img/0001fffbd2--63792b6b19c2d72a00bf9afa/replay_video.mp4 +0 -3
.gitattributes CHANGED
@@ -82,3 +82,4 @@ img/0001fffbd2--63329806626295715caa9f89/replay_video.mp4 filter=lfs diff=lfs me
82
  img/0001fffbd2--633bddecfc74d91be0d4f30f/replay_video.MOV filter=lfs diff=lfs merge=lfs -text
83
  img/0001fffbd2--633c46dd38f9495ed344be8d/replay_video.mp4 filter=lfs diff=lfs merge=lfs -text
84
  img/0001fffbd2--63792b6b19c2d72a00bf9afa/replay_video.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
82
  img/0001fffbd2--633bddecfc74d91be0d4f30f/replay_video.MOV filter=lfs diff=lfs merge=lfs -text
83
  img/0001fffbd2--633c46dd38f9495ed344be8d/replay_video.mp4 filter=lfs diff=lfs merge=lfs -text
84
  img/0001fffbd2--63792b6b19c2d72a00bf9afa/replay_video.mp4 filter=lfs diff=lfs merge=lfs -text
85
+ data filter=lfs diff=lfs merge=lfs -text
anti-spoofing_replay.py ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ import pandas as pd
3
+
4
+ _CITATION = """\
5
+ @InProceedings{huggingface:dataset,
6
+ title = {anti-spoofing_replay},
7
+ author = {TrainingDataPro},
8
+ year = {2023}
9
+ }
10
+ """
11
+
12
+ _DESCRIPTION = """\
13
+ The dataset includes live-recorded Anti-Spoofing videos from around the world,
14
+ captured via low-quality webcams with resolutions like QVGA, QQVGA and QCIF.
15
+ """
16
+ _NAME = 'anti-spoofing_replay'
17
+
18
+ _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
19
+
20
+ _LICENSE = "cc-by-nc-nd-4.0"
21
+
22
+ _DATA = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}/resolve/main/data/"
23
+
24
+
25
+ class AntiSpoofingReplay(datasets.GeneratorBasedBuilder):
26
+
27
+ def _info(self):
28
+ return datasets.DatasetInfo(
29
+ description=_DESCRIPTION,
30
+ features=datasets.Features({
31
+ 'video_file': datasets.Value('string'),
32
+ 'assignment_id': datasets.Value('string'),
33
+ 'worker_id': datasets.Value('string'),
34
+ 'gender': datasets.Value('string'),
35
+ 'age': datasets.Value('uint8'),
36
+ 'country': datasets.Value('string'),
37
+ 'resolution': datasets.Value('string')
38
+ }),
39
+ supervised_keys=None,
40
+ homepage=_HOMEPAGE,
41
+ citation=_CITATION,
42
+ license=_LICENSE)
43
+
44
+ def _split_generators(self, dl_manager):
45
+ videos = dl_manager.download(f"{_DATA}videos.tar.gz")
46
+ annotations = dl_manager.download(f"{_DATA}{_NAME}.csv")
47
+ videos = dl_manager.iter_archive(videos)
48
+ return [
49
+ datasets.SplitGenerator(name=datasets.Split.TRAIN,
50
+ gen_kwargs={
51
+ "videos": videos,
52
+ 'annotations': annotations
53
+ }),
54
+ ]
55
+
56
+ def _generate_examples(self, videos, annotations):
57
+ annotations_df = pd.read_csv(annotations, sep=';')
58
+ for idx, (image_path, video) in enumerate(videos):
59
+ file_name = image_path.split('/')[-1]
60
+ assignment_id = file_name.split('.')[0]
61
+
62
+ yield idx, {
63
+ "video_file":
64
+ file_name,
65
+ 'assignment_id':
66
+ assignment_id,
67
+ 'worker_id':
68
+ annotations_df.loc[
69
+ annotations_df['assignment_id'] == assignment_id]
70
+ ['worker_id'].values[0],
71
+ 'gender':
72
+ annotations_df.loc[
73
+ annotations_df['assignment_id'] == assignment_id]
74
+ ['gender'].values[0],
75
+ 'age':
76
+ annotations_df.loc[
77
+ annotations_df['assignment_id'] == assignment_id]
78
+ ['age'].values[0],
79
+ 'country':
80
+ annotations_df.loc[
81
+ annotations_df['assignment_id'] == assignment_id]
82
+ ['country'].values[0],
83
+ 'resolution':
84
+ annotations_df.loc[
85
+ annotations_df['assignment_id'] == assignment_id]
86
+ ['resolution'].values[0]
87
+ }
Replay_30.csv → data/anti-spoofing_replay.csv RENAMED
File without changes
img/0001ffba3c--6287e2f608ea00759b5c156e/replay_video.mp4 → data/videos.tar.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9f985e89e0b7e82087637eb21d9d8c7df5aa78b6ac5bbb64d8770a741e443d58
3
- size 29895291
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a84ba26ca6363b193388e19f7ecb83790d901095c8dc5a13728d73050107953b
3
+ size 735623363
img/0001ffba3c--62880080572a894c5df8f427/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7bcf5606b2b5c27337ab00de8021862d7f9e231a515c53bfe06773795aa122c2
3
- size 27500314
 
 
 
 
img/0001ffba3c--62887f049bdab7061555fd99/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2e8002a60af5b2ac0f2688e62b0c0a05eb78bdbcc742de276eb29ba50b7441e2
3
- size 33732809
 
 
 
 
img/0001ffba3c--6288bb0ae5f8af70ce83a28a/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:da56138825ed787754667da7cf711830ca01335dc2235b27966f4300f54eaa08
3
- size 39531125
 
 
 
 
img/0001ffba3c--6288edb3dfbf29134f7c3012/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6acbab62c97147319916863e127c10a119ef5789d75fe4ed4583c02e27ffa709
3
- size 17129481
 
 
 
 
img/0001ffba3c--6289196875a5cf63cd0cb302/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0eb6c094c0ad4c0bdcc5a53a37a828af3458b2b7bf55c84e3af0225a45edfea1
3
- size 38896096
 
 
 
 
img/0001ffba3c--6289d29083bc27584c65e943/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:fc4cc848dc7f3c57c4a6bc1085a28c5a383ce9927e3501c19b45f9379f38737f
3
- size 24134577
 
 
 
 
img/0001ffba3c--628a50ad08ea00759b6e5f8b/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5e5d4f05658a3f5242d49508f55b54a7bcea9c9c6b8fdd739343ddf6d55c2685
3
- size 24001472
 
 
 
 
img/0001ffba3c--628a68b5180bc205cf8704d2/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:11b117c28fb1354ba5cab74834e60e8e56e76c6dccfac5f5754d51954ffefd1d
3
- size 23691094
 
 
 
 
img/0001ffba3c--628befdf75a5cf63cd2c633b/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2355b7f9cc42bb11de371083e9d7478b2615fabcfb6ddac09bf9198c8a445531
3
- size 2415174
 
 
 
 
img/0001ffba3c--628c4ed4572a894c5d1f9737/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:69e5b5cacff1fe9c865bd111e13e7707dcd200012cee5a557cc51b8d222661cf
3
- size 11631082
 
 
 
 
img/0001ffba3c--628c9dbb2579312f1ac7ee6f/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:26661e31e6d5c806cf155f4fb52c76bd70efc39c88644363c4a7030fdf8c2e81
3
- size 22052606
 
 
 
 
img/0001ffba3c--628cc2211b4d6738e8ba8f01/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:85ffecd11b63649ea98b464abe5cda31e5f36a3847d3763a7e14968d69ab13df
3
- size 27773695
 
 
 
 
img/0001ffba3c--628ce0878d34a916af69632c/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:aa7542442dd99b6fd86a242081f60052d3fa467c12a4968eee3265e348415f88
3
- size 41427062
 
 
 
 
img/0001ffba3c--628cf4bd1b4d6738e8be182d/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6eec571d433e32938c901f4ec77cdf58fc74ec3bd02d999afde9caeb814cedbb
3
- size 28369363
 
 
 
 
img/0001ffba3c--62e07940dc9a541ecee54262/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b7012ab395b51a931e44458b8f26b699433003b018429c70484aa7b393f924d2
3
- size 24478054
 
 
 
 
img/0001ffba3c--62ec773002bd766f640a8f89/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4e9669b58c5d2cb3d666fe3b6b3cfb486848e13a73b92c71cc8e3a6949adb1b2
3
- size 22463079
 
 
 
 
img/0001fffbd2--629e521084888b2b81b3ac64/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f83d598c78976952e2c48ce1847dc1f5f0f0a9e2a74f072d2a0620d5ab453e1f
3
- size 33795320
 
 
 
 
img/0001fffbd2--62aef2b0913966743ab8c9d5/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c16ee4ce00e2fe695f42c234ce56211a8c97425acfea948abb4133582de2a32d
3
- size 23761077
 
 
 
 
img/0001fffbd2--6308fa26a22771012d91606c/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e9930bd25db1e612b251b79b7181ca53c4f37ced57eecd28bb433782051c3f73
3
- size 11410530
 
 
 
 
img/0001fffbd2--630b66fab961b45a3ceb1ca9/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:da2cfaa308ecac006c033ba06a12f4ccda0b85868658513af7d0f50fdb10166e
3
- size 3705513
 
 
 
 
img/0001fffbd2--630b6ba7e3a4854c648025ea/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:661c8070e16bbddaa889ac8e42ee49e7960cf51efaa2ca2a1069d8af77b5d3c6
3
- size 3944082
 
 
 
 
img/0001fffbd2--630e1f3ae371414f32846a04/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8c1a420adb5c23b30672f8c7c781344b5f6eda0589f73eded8c385501d4c42ec
3
- size 66947160
 
 
 
 
img/0001fffbd2--6321679c014598092a3db5fd/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:dac41ab4295be2766175439c3a676f73dfed5ca20ded0982a0376ee41797cdb9
3
- size 30359738
 
 
 
 
img/0001fffbd2--632191ab697aa430ec399453/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:982587b9dcbd6e0d00ab8afbf0ba4cc817edcb542f9ba15099198ded3c91196c
3
- size 34855351
 
 
 
 
img/0001fffbd2--63298657068b1b4bbfcf7e1a/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:94182739327509287503a4579cf41888bf295036e4e057100a7d584476f7a829
3
- size 5629112
 
 
 
 
img/0001fffbd2--63329806626295715caa9f89/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bc9a992d2ebed971d4a083ff5f27171833b376fb29eb9595167810feca9a8f6e
3
- size 21627017
 
 
 
 
img/0001fffbd2--633bddecfc74d91be0d4f30f/replay_video.MOV DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c8df7e29ae3d7930abfbb24817be76554485f611ed63f814d1785245e6c589ee
3
- size 1739302
 
 
 
 
img/0001fffbd2--633c46dd38f9495ed344be8d/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8cb630534bf8256d9502e63feaa4cdd1e2220ca6019d187b612cfecd4057bdca
3
- size 27324658
 
 
 
 
img/0001fffbd2--63792b6b19c2d72a00bf9afa/replay_video.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5ba887b2987de6295dc8e185aacc8a3fbc0b328727eb86a01a45e91a56ed5f54
3
- size 41932892