DsL
commited on
Commit
·
6d37281
1
Parent(s):
b31a43e
Add full static BUILDER_CONFIGS list
Browse files- dataset.py +66 -50
dataset.py
CHANGED
|
@@ -22,60 +22,76 @@ It includes both real-world recordings and rendered synthetic scenes demonstrati
|
|
| 22 |
_HOMEPAGE = "https://huggingface.co/datasets/LLDDSS/Causal3D"
|
| 23 |
_LICENSE = "CC-BY-4.0"
|
| 24 |
|
| 25 |
-
# Automatically discover configs from folder names
|
| 26 |
-
def _discover_configs(base_dir: str) -> List[datasets.BuilderConfig]:
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
def _discover_configs(base_dir: str) -> List[datasets.BuilderConfig]:
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
|
| 65 |
|
| 66 |
class Causal3D(datasets.GeneratorBasedBuilder):
|
| 67 |
BUILDER_CONFIGS = [
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
),
|
| 73 |
-
datasets.BuilderConfig(
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
),
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
def _info(self):
|
| 81 |
return datasets.DatasetInfo(
|
|
|
|
| 22 |
_HOMEPAGE = "https://huggingface.co/datasets/LLDDSS/Causal3D"
|
| 23 |
_LICENSE = "CC-BY-4.0"
|
| 24 |
|
| 25 |
+
# # Automatically discover configs from folder names
|
| 26 |
+
# def _discover_configs(base_dir: str) -> List[datasets.BuilderConfig]:
|
| 27 |
+
# configs = []
|
| 28 |
+
# for root_folder in ["real_scenes", "hypothetical_scenes"]:
|
| 29 |
+
# full_path = os.path.join(base_dir, root_folder)
|
| 30 |
+
# if not os.path.exists(full_path):
|
| 31 |
+
# continue
|
| 32 |
+
# for scene in sorted(os.listdir(full_path)):
|
| 33 |
+
# scene_path = os.path.join(full_path, scene)
|
| 34 |
+
# if os.path.isdir(scene_path):
|
| 35 |
+
# config_name = f"{root_folder}_{scene}"
|
| 36 |
+
# configs.append(
|
| 37 |
+
# datasets.BuilderConfig(
|
| 38 |
+
# name=config_name,
|
| 39 |
+
# version=datasets.Version("1.0.0"),
|
| 40 |
+
# description=f"{scene} in {root_folder}",
|
| 41 |
+
# )
|
| 42 |
+
# )
|
| 43 |
+
# return configs
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# def _discover_configs(base_dir: str) -> List[datasets.BuilderConfig]:
|
| 47 |
+
# configs = []
|
| 48 |
+
# for root_folder in ["real_scenes", "hypothetical_scenes"]:
|
| 49 |
+
# full_path = os.path.join(base_dir, root_folder)
|
| 50 |
+
# if not os.path.exists(full_path):
|
| 51 |
+
# continue
|
| 52 |
+
# for scene in sorted(os.listdir(full_path)):
|
| 53 |
+
# scene_path = os.path.join(full_path, scene)
|
| 54 |
+
# if os.path.isdir(scene_path):
|
| 55 |
+
# config_name = f"{root_folder}_{scene}"
|
| 56 |
+
# configs.append(
|
| 57 |
+
# datasets.BuilderConfig(
|
| 58 |
+
# name=config_name,
|
| 59 |
+
# version=datasets.Version("1.0.0"),
|
| 60 |
+
# description=f"{scene} in {root_folder}",
|
| 61 |
+
# )
|
| 62 |
+
# )
|
| 63 |
+
# return configs
|
| 64 |
|
| 65 |
|
| 66 |
class Causal3D(datasets.GeneratorBasedBuilder):
|
| 67 |
BUILDER_CONFIGS = [
|
| 68 |
+
# hypothetical_scenes
|
| 69 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v2_linear", version=datasets.Version("1.0.0"), description="Hypothetic_v2_linear scene"),
|
| 70 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v2_nonlinear", version=datasets.Version("1.0.0"), description="Hypothetic_v2_nonlinear scene"),
|
| 71 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v3_fully_connected_linear", version=datasets.Version("1.0.0"), description="Hypothetic_v3_fully_connected_linear scene"),
|
| 72 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v4_linear_full_connected", version=datasets.Version("1.0.0"), description="Hypothetic_v4_linear_full_connected scene"),
|
| 73 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v4_linear_v", version=datasets.Version("1.0.0"), description="Hypothetic_v4_linear_v scene"),
|
| 74 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v4_nonlinear_v", version=datasets.Version("1.0.0"), description="Hypothetic_v4_nonlinear_v scene"),
|
| 75 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v5_linear", version=datasets.Version("1.0.0"), description="Hypothetic_v5_linear scene"),
|
| 76 |
+
datasets.BuilderConfig(name="hypothetical_scenes_Hypothetic_v5_linear_full_connected", version=datasets.Version("1.0.0"), description="Hypothetic_v5_linear_full_connected scene"),
|
| 77 |
+
datasets.BuilderConfig(name="hypothetical_scenes_rendered_h3_linear_128P", version=datasets.Version("1.0.0"), description="rendered_h3_linear_128P scene"),
|
| 78 |
+
datasets.BuilderConfig(name="hypothetical_scenes_rendered_h3_nonlinear_128P", version=datasets.Version("1.0.0"), description="rendered_h3_nonlinear_128P scene"),
|
| 79 |
+
datasets.BuilderConfig(name="hypothetical_scenes_rendered_h5_nonlinear", version=datasets.Version("1.0.0"), description="rendered_h5_nonlinear scene"),
|
| 80 |
+
|
| 81 |
+
# real_scenes
|
| 82 |
+
datasets.BuilderConfig(name="real_scenes_Real_Parabola", version=datasets.Version("1.0.0"), description="Real_Parabola scene"),
|
| 83 |
+
datasets.BuilderConfig(name="real_scenes_Real_magnet_v3", version=datasets.Version("1.0.0"), description="Real_magnet_v3 scene"),
|
| 84 |
+
datasets.BuilderConfig(name="real_scenes_Real_magnet_v3_5", version=datasets.Version("1.0.0"), description="Real_magnet_v3_5 scene"),
|
| 85 |
+
datasets.BuilderConfig(name="real_scenes_Real_parabola_multi_view", version=datasets.Version("1.0.0"), description="Real_parabola_multi_view scene"),
|
| 86 |
+
datasets.BuilderConfig(name="real_scenes_Real_spring_v3_256P", version=datasets.Version("1.0.0"), description="Real_spring_v3_256P scene"),
|
| 87 |
+
datasets.BuilderConfig(name="real_scenes_Water_flow_scene_render", version=datasets.Version("1.0.0"), description="Water_flow_scene_render scene"),
|
| 88 |
+
datasets.BuilderConfig(name="real_scenes_convex_len_render_images", version=datasets.Version("1.0.0"), description="convex_len_render_images scene"),
|
| 89 |
+
datasets.BuilderConfig(name="real_scenes_real_pendulum", version=datasets.Version("1.0.0"), description="real_pendulum scene"),
|
| 90 |
+
datasets.BuilderConfig(name="real_scenes_rendered_magnetic_128", version=datasets.Version("1.0.0"), description="rendered_magnetic_128 scene"),
|
| 91 |
+
datasets.BuilderConfig(name="real_scenes_rendered_reflection_128P", version=datasets.Version("1.0.0"), description="rendered_reflection_128P scene"),
|
| 92 |
+
datasets.BuilderConfig(name="real_scenes_seesaw_scene_128P", version=datasets.Version("1.0.0"), description="seesaw_scene_128P scene"),
|
| 93 |
+
datasets.BuilderConfig(name="real_scenes_spring_scene_128P", version=datasets.Version("1.0.0"), description="spring_scene_128P scene"),
|
| 94 |
+
]
|
| 95 |
|
| 96 |
def _info(self):
|
| 97 |
return datasets.DatasetInfo(
|