jmc255 commited on
Commit
6f5a56d
1 Parent(s): 2db59bf

Update aphantasia_drawing_dataset.py

Browse files
Files changed (1) hide show
  1. aphantasia_drawing_dataset.py +1 -1
aphantasia_drawing_dataset.py CHANGED
@@ -170,7 +170,7 @@ class AphantasiaDrawingDataset(datasets.GeneratorBasedBuilder):
170
  # img = Image.open(io.BytesIO(img_byt))
171
  # subjects_data[sub]["image"][room] = img.resize((500,500))
172
  # idx += 1
173
-
174
  yield idx, {
175
  "subject_id": sub_row["subject_id"],
176
  "treatment": sub_row["treatment"],
 
170
  # img = Image.open(io.BytesIO(img_byt))
171
  # subjects_data[sub]["image"][room] = img.resize((500,500))
172
  # idx += 1
173
+ age = int(sub_row["demographics.age"]) if sub_row["demographics.age"] and sub_row["demographics.age"] is not np.nan else None
174
  yield idx, {
175
  "subject_id": sub_row["subject_id"],
176
  "treatment": sub_row["treatment"],