Datasets:
fix: images rotation
Browse files- README.md +24 -0
- face_masks.py +5 -5
README.md
CHANGED
|
@@ -7,6 +7,30 @@ language:
|
|
| 7 |
tags:
|
| 8 |
- finance
|
| 9 |
- code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
# Face Mask Detection
|
| 12 |
Dataset includes 250 000 images, 4 types of mask worn on 28 000 unique faces. All images were collected using the Toloka.ai crowdsourcing service and validated by TrainingData.pro
|
|
|
|
| 7 |
tags:
|
| 8 |
- finance
|
| 9 |
- code
|
| 10 |
+
dataset_info:
|
| 11 |
+
features:
|
| 12 |
+
- name: photo_1
|
| 13 |
+
dtype: image
|
| 14 |
+
- name: photo_2
|
| 15 |
+
dtype: image
|
| 16 |
+
- name: photo_3
|
| 17 |
+
dtype: image
|
| 18 |
+
- name: photo_4
|
| 19 |
+
dtype: image
|
| 20 |
+
- name: worker_id
|
| 21 |
+
dtype: string
|
| 22 |
+
- name: age
|
| 23 |
+
dtype: int8
|
| 24 |
+
- name: country
|
| 25 |
+
dtype: string
|
| 26 |
+
- name: sex
|
| 27 |
+
dtype: string
|
| 28 |
+
splits:
|
| 29 |
+
- name: train
|
| 30 |
+
num_bytes: 341007536
|
| 31 |
+
num_examples: 10
|
| 32 |
+
download_size: 100871449
|
| 33 |
+
dataset_size: 341007536
|
| 34 |
---
|
| 35 |
# Face Mask Detection
|
| 36 |
Dataset includes 250 000 images, 4 types of mask worn on 28 000 unique faces. All images were collected using the Toloka.ai crowdsourcing service and validated by TrainingData.pro
|
face_masks.py
CHANGED
|
@@ -118,7 +118,7 @@ class FaceMasks(datasets.GeneratorBasedBuilder):
|
|
| 118 |
|
| 119 |
def _generate_examples(self, images, annotations):
|
| 120 |
annotations_df = pd.read_csv(annotations, sep=',')
|
| 121 |
-
images_data = pd.DataFrame(columns=['Link', '
|
| 122 |
for idx, image_path in enumerate(images):
|
| 123 |
images_data.loc[idx] = {
|
| 124 |
'Link': '/'.join(image_path.split('/')[-2:]),
|
|
@@ -138,12 +138,12 @@ class FaceMasks(datasets.GeneratorBasedBuilder):
|
|
| 138 |
for row in annotation.itertuples()
|
| 139 |
}
|
| 140 |
|
| 141 |
-
age = annotation.loc[annotation['Type'] ==
|
| 142 |
country = annotation.loc[annotation['Type'] ==
|
| 143 |
-
|
| 144 |
-
sex = annotation.loc[annotation['Type'] ==
|
| 145 |
|
| 146 |
-
data['
|
| 147 |
data['age'] = age
|
| 148 |
data['country'] = country
|
| 149 |
data['sex'] = sex
|
|
|
|
| 118 |
|
| 119 |
def _generate_examples(self, images, annotations):
|
| 120 |
annotations_df = pd.read_csv(annotations, sep=',')
|
| 121 |
+
images_data = pd.DataFrame(columns=['Link', 'Path'])
|
| 122 |
for idx, image_path in enumerate(images):
|
| 123 |
images_data.loc[idx] = {
|
| 124 |
'Link': '/'.join(image_path.split('/')[-2:]),
|
|
|
|
| 138 |
for row in annotation.itertuples()
|
| 139 |
}
|
| 140 |
|
| 141 |
+
age = annotation.loc[annotation['Type'] == 1]['Age'].values[0]
|
| 142 |
country = annotation.loc[annotation['Type'] ==
|
| 143 |
+
1]['Country'].values[0]
|
| 144 |
+
sex = annotation.loc[annotation['Type'] == 1]['Sex'].values[0]
|
| 145 |
|
| 146 |
+
data['worker_id'] = worker_id
|
| 147 |
data['age'] = age
|
| 148 |
data['country'] = country
|
| 149 |
data['sex'] = sex
|