fix: file_name in script docs: readme
Browse files- MacBook-Attacks-Dataset.py +13 -10
- README.md +20 -0
MacBook-Attacks-Dataset.py
CHANGED
@@ -10,9 +10,12 @@ year = {2023}
|
|
10 |
"""
|
11 |
|
12 |
_DESCRIPTION = """\
|
13 |
-
The dataset consists of
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
16 |
"""
|
17 |
_NAME = 'MacBook-Attacks-Dataset'
|
18 |
|
@@ -55,29 +58,29 @@ class MacBookAttacksDataset(datasets.GeneratorBasedBuilder):
|
|
55 |
def _generate_examples(self, attacks, annotations):
|
56 |
annotations_df = pd.read_csv(annotations, sep=';')
|
57 |
for idx, (video_path, video) in enumerate(attacks):
|
58 |
-
file_name = '/'.join(video_path.split('/')[-2:])
|
59 |
|
60 |
yield idx, {
|
61 |
'file':
|
62 |
-
|
63 |
'phone':
|
64 |
annotations_df.loc[
|
65 |
-
annotations_df['file'].
|
66 |
['phone'].values[0],
|
67 |
'computer':
|
68 |
annotations_df.loc[
|
69 |
-
annotations_df['file'].
|
70 |
['computer'].values[0],
|
71 |
'gender':
|
72 |
annotations_df.loc[
|
73 |
-
annotations_df['file'].
|
74 |
['gender'].values[0],
|
75 |
'age':
|
76 |
annotations_df.loc[
|
77 |
-
annotations_df['file'].
|
78 |
['age'].values[0],
|
79 |
'country':
|
80 |
annotations_df.loc[
|
81 |
-
annotations_df['file'].
|
82 |
['country'].values[0]
|
83 |
}
|
|
|
10 |
"""
|
11 |
|
12 |
_DESCRIPTION = """\
|
13 |
+
The dataset consists of videos of replay attacks played on different
|
14 |
+
models of MacBooks. The dataset solves tasks in the field of anti-spoofing and
|
15 |
+
it is useful for buisness and safety systems.
|
16 |
+
|
17 |
+
The dataset includes: **replay attacks** - videos of real people played on
|
18 |
+
a computer and filmed on the phone.
|
19 |
"""
|
20 |
_NAME = 'MacBook-Attacks-Dataset'
|
21 |
|
|
|
58 |
def _generate_examples(self, attacks, annotations):
|
59 |
annotations_df = pd.read_csv(annotations, sep=';')
|
60 |
for idx, (video_path, video) in enumerate(attacks):
|
61 |
+
# file_name = '/'.join(video_path.split('/')[-2:])
|
62 |
|
63 |
yield idx, {
|
64 |
'file':
|
65 |
+
video_path,
|
66 |
'phone':
|
67 |
annotations_df.loc[
|
68 |
+
annotations_df['file'] == video_path.lower()]
|
69 |
['phone'].values[0],
|
70 |
'computer':
|
71 |
annotations_df.loc[
|
72 |
+
annotations_df['file'] == video_path.lower()]
|
73 |
['computer'].values[0],
|
74 |
'gender':
|
75 |
annotations_df.loc[
|
76 |
+
annotations_df['file'] == video_path.lower()]
|
77 |
['gender'].values[0],
|
78 |
'age':
|
79 |
annotations_df.loc[
|
80 |
+
annotations_df['file'] == video_path.lower()]
|
81 |
['age'].values[0],
|
82 |
'country':
|
83 |
annotations_df.loc[
|
84 |
+
annotations_df['file'] == video_path.lower()]
|
85 |
['country'].values[0]
|
86 |
}
|
README.md
CHANGED
@@ -6,6 +6,26 @@ language:
|
|
6 |
- en
|
7 |
tags:
|
8 |
- finance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
---
|
10 |
|
11 |
# Antispoofing Replay Dataset
|
|
|
6 |
- en
|
7 |
tags:
|
8 |
- finance
|
9 |
+
dataset_info:
|
10 |
+
features:
|
11 |
+
- name: file
|
12 |
+
dtype: string
|
13 |
+
- name: phone
|
14 |
+
dtype: string
|
15 |
+
- name: computer
|
16 |
+
dtype: string
|
17 |
+
- name: gender
|
18 |
+
dtype: string
|
19 |
+
- name: age
|
20 |
+
dtype: int16
|
21 |
+
- name: country
|
22 |
+
dtype: string
|
23 |
+
splits:
|
24 |
+
- name: train
|
25 |
+
num_bytes: 1418
|
26 |
+
num_examples: 24
|
27 |
+
download_size: 573934283
|
28 |
+
dataset_size: 1418
|
29 |
---
|
30 |
|
31 |
# Antispoofing Replay Dataset
|