Vadzim Kashko commited on
Commit
bcd7de6
•
1 Parent(s): 827c601

refactor: all data

Browse files
.gitattributes CHANGED
@@ -62,3 +62,4 @@ live_videos/0001d815c0--61f82a2956ef241fa1f94ff0.mp4 filter=lfs diff=lfs merge=l
62
  live_videos/0001d815c0--6203fa2ad1a403449593c5cb.mp4 filter=lfs diff=lfs merge=lfs -text
63
  live_videos/0001d815c0--620984e9f002b8749797ec67.mp4 filter=lfs diff=lfs merge=lfs -text
64
  live_videos/0001db3fa7--61e8f5380569a62870798ef9.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
62
  live_videos/0001d815c0--6203fa2ad1a403449593c5cb.mp4 filter=lfs diff=lfs merge=lfs -text
63
  live_videos/0001d815c0--620984e9f002b8749797ec67.mp4 filter=lfs diff=lfs merge=lfs -text
64
  live_videos/0001db3fa7--61e8f5380569a62870798ef9.mp4 filter=lfs diff=lfs merge=lfs -text
65
+ data filter=lfs diff=lfs merge=lfs -text
file_info.csv → data/high_quality_webcam_video_attacks.csv RENAMED
File without changes
live_videos/0001d815c0--61dd5f24a14d0d2b3b211c83.mp4 → data/videos.tar.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:13bb75305d9c14800a9d2fd639e767cd529058909f3e11833762d01f772a5509
3
- size 65447112
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6fe0dfdf56eeb5aad7ca23c3240974c2c18d1fae83d3dcc37bc7fe558d16e5d
3
+ size 623355125
high_quality_webcam_video_attacks.py ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ import pandas as pd
3
+
4
+ _CITATION = """\
5
+ @InProceedings{huggingface:dataset,
6
+ title = {high_quality_webcam_video_attacks},
7
+ author = {TrainingDataPro},
8
+ year = {2023}
9
+ }
10
+ """
11
+
12
+ _DESCRIPTION = """\
13
+ The dataset is primarly intended to dentify and predict the positions of major
14
+ joints of a human body in an image. It consists of people's photographs with
15
+ body part labeled with keypoints.
16
+ """
17
+ _NAME = 'high_quality_webcam_video_attacks'
18
+
19
+ _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
20
+
21
+ _LICENSE = "cc-by-nc-nd-4.0"
22
+
23
+ _DATA = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}/resolve/main/data/"
24
+
25
+
26
+ class HighQualityWebcamVideoAttacks(datasets.GeneratorBasedBuilder):
27
+
28
+ def _info(self):
29
+ return datasets.DatasetInfo(
30
+ description=_DESCRIPTION,
31
+ features=datasets.Features({
32
+ 'video_file': datasets.Value('string'),
33
+ 'assignment_id': datasets.Value('string'),
34
+ 'worker_id': datasets.Value('string'),
35
+ 'gender': datasets.Value('string'),
36
+ 'age': datasets.Value('uint8'),
37
+ 'country': datasets.Value('string'),
38
+ 'resolution': datasets.Value('string')
39
+ }),
40
+ supervised_keys=None,
41
+ homepage=_HOMEPAGE,
42
+ citation=_CITATION,
43
+ license=_LICENSE)
44
+
45
+ def _split_generators(self, dl_manager):
46
+ videos = dl_manager.download(f"{_DATA}videos.tar.gz")
47
+ annotations = dl_manager.download(f"{_DATA}{_NAME}.csv")
48
+ videos = dl_manager.iter_archive(videos)
49
+ return [
50
+ datasets.SplitGenerator(name=datasets.Split.TRAIN,
51
+ gen_kwargs={
52
+ "videos": videos,
53
+ 'annotations': annotations
54
+ }),
55
+ ]
56
+
57
+ def _generate_examples(self, videos, annotations):
58
+ annotations_df = pd.read_csv(annotations, sep=',')
59
+ for idx, (image_path, video) in enumerate(videos):
60
+ file_name = image_path.split('/')[-1]
61
+ assignment_id = file_name.split('.')[0]
62
+
63
+ yield idx, {
64
+ "video_file":
65
+ file_name,
66
+ 'assignment_id':
67
+ assignment_id,
68
+ 'worker_id':
69
+ annotations_df.loc[
70
+ annotations_df['assignment_id'] == assignment_id]
71
+ ['worker_id'].values[0],
72
+ 'gender':
73
+ annotations_df.loc[
74
+ annotations_df['assignment_id'] == assignment_id]
75
+ ['gender'].values[0],
76
+ 'age':
77
+ annotations_df.loc[
78
+ annotations_df['assignment_id'] == assignment_id]
79
+ ['age'].values[0],
80
+ 'country':
81
+ annotations_df.loc[
82
+ annotations_df['assignment_id'] == assignment_id]
83
+ ['country'].values[0],
84
+ 'resolution':
85
+ annotations_df.loc[
86
+ annotations_df['assignment_id'] == assignment_id]
87
+ ['resolution'].values[0]
88
+ }
live_videos/0001d815c0--61de4edf6292055ac305e885.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:583ee962e6c5e4f406dc2c083b5a43e43a605184004e164767ad7e2ae0a82566
3
- size 30703676
 
 
 
 
live_videos/0001d815c0--61e28d132e6cac25f79a3346.MOV DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:59d1a297c56e845417229ee505754e2f6f0fd3ffb36400b489bf7217f75bb905
3
- size 54247784
 
 
 
 
live_videos/0001d815c0--61ece94de8e9ba2b3bc01c59.mkv DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8410f693bf0ebfac2f40ed5d95e7bf0718f461d111501125b3433d07c1696a9d
3
- size 25606758
 
 
 
 
live_videos/0001d815c0--61f276f01c8b5c57e89244a1.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2806432bc6b7fac652d068ddc5070b22c7627958d80cb111672b8459f9d898cb
3
- size 36724015
 
 
 
 
live_videos/0001d815c0--61f5617b66629e059dbeaef5.webm DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b9101750b785d8fe46bedd90488c5a8efe2e70f782d2cdedbb845411865a355c
3
- size 27138944
 
 
 
 
live_videos/0001d815c0--61f82a2956ef241fa1f94ff0.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0c2472597e2895930c357d22cfe5433d1ab77321e60c930f76c768e4b9495988
3
- size 67986366
 
 
 
 
live_videos/0001d815c0--6203fa2ad1a403449593c5cb.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:809319c877813055cceec3b78541678d9de08a7cf1630397f48113621317ad1c
3
- size 26046279
 
 
 
 
live_videos/0001d815c0--620984e9f002b8749797ec67.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4fe602ff1ffeb9ae43d0aa8a10c4bcb8de456fd1dc1bb711c471389bfbc7b042
3
- size 209650613
 
 
 
 
live_videos/0001db3fa7--61e8f5380569a62870798ef9.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a82c01bfb309a6870fc2e64a54647654be4741ec48b7496041afcfeacd109f03
3
- size 85351030