Update aphantasia_drawing_dataset.py
Browse files
aphantasia_drawing_dataset.py
CHANGED
@@ -145,11 +145,6 @@ class AphantasiaDrawingDataset(datasets.GeneratorBasedBuilder):
|
|
145 |
image = Image.open(image_buffer)
|
146 |
return image
|
147 |
return None
|
148 |
-
print(filepath)
|
149 |
-
try:
|
150 |
-
subjects_data = pd.read_parquet(subjects_file)
|
151 |
-
except:
|
152 |
-
print("onto something")
|
153 |
|
154 |
with open(filepath, "rb") as subjects_file:
|
155 |
subjects_data = pd.read_parquet(subjects_file)
|
@@ -176,7 +171,7 @@ class AphantasiaDrawingDataset(datasets.GeneratorBasedBuilder):
|
|
176 |
# subjects_data[sub]["image"][room] = img.resize((500,500))
|
177 |
# idx += 1
|
178 |
age = int(sub_row["demographics.age"]) if sub_row["demographics.age"] else np.nan
|
179 |
-
yield {
|
180 |
"subject_id": sub_row["subject_id"],
|
181 |
"treatment": sub_row["treatment"],
|
182 |
"demographics": {
|
|
|
145 |
image = Image.open(image_buffer)
|
146 |
return image
|
147 |
return None
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
with open(filepath, "rb") as subjects_file:
|
150 |
subjects_data = pd.read_parquet(subjects_file)
|
|
|
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"] else np.nan
|
174 |
+
yield idx, {
|
175 |
"subject_id": sub_row["subject_id"],
|
176 |
"treatment": sub_row["treatment"],
|
177 |
"demographics": {
|