Update ACT-Thor.py
Browse files- ACT-Thor.py +5 -5
ACT-Thor.py
CHANGED
@@ -115,11 +115,11 @@ class ACTThor(datasets.GeneratorBasedBuilder):
|
|
115 |
df = df.drop(['sample_split', 'object_split', 'scene_split'], axis='columns')
|
116 |
for example in df.to_dict('records'):
|
117 |
order = ast.literal_eval(example['order'])
|
118 |
-
example["before_image"] = os.path.join(images_dir, "
|
119 |
-
example["after_image_0"] = os.path.join(images_dir, "
|
120 |
-
example["after_image_1"] = os.path.join(images_dir, "
|
121 |
-
example["after_image_2"] = os.path.join(images_dir, "
|
122 |
-
example["after_image_3"] = os.path.join(images_dir, "
|
123 |
id_ = example["id"]
|
124 |
del example['order']
|
125 |
yield id_, example
|
|
|
115 |
df = df.drop(['sample_split', 'object_split', 'scene_split'], axis='columns')
|
116 |
for example in df.to_dict('records'):
|
117 |
order = ast.literal_eval(example['order'])
|
118 |
+
example["before_image"] = os.path.join(images_dir, "before_images", Path(example["before_image"]).name)
|
119 |
+
example["after_image_0"] = os.path.join(images_dir, "after_images", Path(example[f"after_image_{order[0]}"]).name)
|
120 |
+
example["after_image_1"] = os.path.join(images_dir, "after_images", Path(example[f"after_image_{order[1]}"]).name)
|
121 |
+
example["after_image_2"] = os.path.join(images_dir, "after_images", Path(example[f"after_image_{order[2]}"]).name)
|
122 |
+
example["after_image_3"] = os.path.join(images_dir, "after_images", Path(example[f"after_image_{order[3]}"]).name)
|
123 |
id_ = example["id"]
|
124 |
del example['order']
|
125 |
yield id_, example
|