Datasets:
ArXiv:
DOI:
License:
Commit
·
0dfdc3b
1
Parent(s):
30467d3
Update VGGFace2.py
Browse files- VGGFace2.py +18 -3
VGGFace2.py
CHANGED
@@ -83,7 +83,7 @@ class VGGFace2(datasets.GeneratorBasedBuilder):
|
|
83 |
"class_id": datasets.Value("string"),
|
84 |
"identity": datasets.Value("string"),
|
85 |
'gender': dataset.Value("string"),
|
86 |
-
'sample_num':dataset.Value("
|
87 |
'flag':dataset.Value("bool"),
|
88 |
"male": datasets.Value("bool"),
|
89 |
"black_hair": datasets.Value("bool"),
|
@@ -159,14 +159,29 @@ class VGGFace2(datasets.GeneratorBasedBuilder):
|
|
159 |
|
160 |
temp.drop(columns=['Image_Path'], inplace=True)
|
161 |
|
162 |
-
|
163 |
for file_path, file_obj in paths:
|
164 |
raise Exception(file_path)
|
165 |
|
166 |
label = file_path.split("/")[2]
|
167 |
yield file_path, {
|
168 |
"image": {"path": file_path, "bytes": file_obj.read()},
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
key+= 1
|
172 |
|
|
|
83 |
"class_id": datasets.Value("string"),
|
84 |
"identity": datasets.Value("string"),
|
85 |
'gender': dataset.Value("string"),
|
86 |
+
'sample_num':dataset.Value("uint64"),
|
87 |
'flag':dataset.Value("bool"),
|
88 |
"male": datasets.Value("bool"),
|
89 |
"black_hair": datasets.Value("bool"),
|
|
|
159 |
|
160 |
temp.drop(columns=['Image_Path'], inplace=True)
|
161 |
|
162 |
+
meta = meta.merge(temp, on='Class_ID', how='outer')
|
163 |
for file_path, file_obj in paths:
|
164 |
raise Exception(file_path)
|
165 |
|
166 |
label = file_path.split("/")[2]
|
167 |
yield file_path, {
|
168 |
"image": {"path": file_path, "bytes": file_obj.read()},
|
169 |
+
# "image_id": datasets.Value("string"),
|
170 |
+
# "class_id": datasets.Value("string"),
|
171 |
+
# "identity": datasets.Value("string"),
|
172 |
+
# 'gender': dataset.Value("string"),
|
173 |
+
# 'sample_num':dataset.Value("uint64"),
|
174 |
+
# 'flag':dataset.Value("bool"),
|
175 |
+
# "male": datasets.Value("bool"),
|
176 |
+
# "black_hair": datasets.Value("bool"),
|
177 |
+
# "gray_hair": datasets.Value("bool"),
|
178 |
+
# "blond_hair": datasets.Value("bool"),
|
179 |
+
# "long_hair": datasets.Value("bool"),
|
180 |
+
# "mustache_or_beard": datasets.Value("bool"),
|
181 |
+
# "wearing_hat": datasets.Value("bool"),
|
182 |
+
# "eyeglasses": datasets.Value("bool"),
|
183 |
+
# "sunglasses": datasets.Value("bool"),
|
184 |
+
#"mouth_open": datasets.Value("bool")
|
185 |
}
|
186 |
key+= 1
|
187 |
|