Update aphantasia_drawing_dataset.py
Browse files- aphantasia_drawing_dataset.py +20 -20
aphantasia_drawing_dataset.py
CHANGED
@@ -171,39 +171,39 @@ class AphantasiaDrawingDataset(datasets.GeneratorBasedBuilder):
|
|
171 |
# subjects_data[sub]["image"][room] = img.resize((500,500))
|
172 |
# idx += 1
|
173 |
|
174 |
-
try:
|
175 |
-
|
176 |
-
except:
|
177 |
-
|
178 |
-
try:
|
179 |
-
|
180 |
-
except:
|
181 |
-
|
182 |
-
try:
|
183 |
-
|
184 |
-
except:
|
185 |
-
|
186 |
-
try:
|
187 |
-
|
188 |
-
except:
|
189 |
-
|
190 |
# age = int(sub_row["demographics.age"]) if sub_row["demographics.age"] and sub_row["demographics.age"] is not np.nan else None
|
191 |
yield idx, {
|
192 |
"subject_id": sub_row["subject_id"],
|
193 |
"treatment": sub_row["treatment"],
|
194 |
"demographics": {
|
195 |
"country": sub_row["demographics.country"],
|
196 |
-
"age":
|
197 |
"gender": sub_row["demographics.gender"],
|
198 |
"occupation": sub_row["demographics.occupation"],
|
199 |
-
"art_ability":
|
200 |
"art_experience": sub_row["demographics.art_experience"],
|
201 |
"device": sub_row["demographics.device"],
|
202 |
"input": sub_row["demographics.input"],
|
203 |
"difficult": sub_row["demographics.difficult"],
|
204 |
"diff_explanation": sub_row["demographics.diff_explanation"],
|
205 |
-
"vviq_score":
|
206 |
-
"osiq_score":
|
207 |
},
|
208 |
"drawings": {
|
209 |
"kitchen": {
|
|
|
171 |
# subjects_data[sub]["image"][room] = img.resize((500,500))
|
172 |
# idx += 1
|
173 |
|
174 |
+
# try:
|
175 |
+
# age = int(sub_row["demographics.age"])
|
176 |
+
# except:
|
177 |
+
# age = -1
|
178 |
+
# try:
|
179 |
+
# art_ability = int(sub_row["demographics.art_ability"])
|
180 |
+
# except:
|
181 |
+
# art_ability = -1
|
182 |
+
# try:
|
183 |
+
# vviq_score = int(sub_row["demographics.vviq_score"])
|
184 |
+
# except:
|
185 |
+
# vviq_score = -1
|
186 |
+
# try:
|
187 |
+
# osiq_score = int(sub_row["demographics.osiq_score"])
|
188 |
+
# except:
|
189 |
+
# osiq_score = -1
|
190 |
# age = int(sub_row["demographics.age"]) if sub_row["demographics.age"] and sub_row["demographics.age"] is not np.nan else None
|
191 |
yield idx, {
|
192 |
"subject_id": sub_row["subject_id"],
|
193 |
"treatment": sub_row["treatment"],
|
194 |
"demographics": {
|
195 |
"country": sub_row["demographics.country"],
|
196 |
+
"age": sub_row["demographics.age"],
|
197 |
"gender": sub_row["demographics.gender"],
|
198 |
"occupation": sub_row["demographics.occupation"],
|
199 |
+
"art_ability": sub_row["demographics.art_ability"],
|
200 |
"art_experience": sub_row["demographics.art_experience"],
|
201 |
"device": sub_row["demographics.device"],
|
202 |
"input": sub_row["demographics.input"],
|
203 |
"difficult": sub_row["demographics.difficult"],
|
204 |
"diff_explanation": sub_row["demographics.diff_explanation"],
|
205 |
+
"vviq_score": sub_row["demographics.vviq_score"],
|
206 |
+
"osiq_score": sub_row["demographics.osiq_score"]
|
207 |
},
|
208 |
"drawings": {
|
209 |
"kitchen": {
|