feat(depth): persist depth metadata

This commit is contained in:
CarolinePascal
2026-05-19 16:11:21 +02:00
parent 119169e417
commit 01081d2156
2 changed files with 44 additions and 0 deletions
+13
View File
@@ -337,6 +337,19 @@ class LeRobotDatasetMetadata:
"""Keys to access visual modalities stored as videos."""
return [key for key, ft in self.features.items() if ft["dtype"] == "video"]
@property
def depth_keys(self) -> list[str]:
"""Keys to access depth-map modalities stored as videos or images.
A depth key is a feature whose ``info`` dict carries ``"<dtype>.is_depth_map": True``.
"""
return [
key
for key, ft in self.features.items()
# TODO(CarolinePascal): Make sure the legacy video_info works here as well.
if (ft.get("info") or {}).get(ft["dtype"] + ".is_depth_map", False)
]
@property
def camera_keys(self) -> list[str]:
"""Keys to access visual modalities (regardless of their storage method)."""