builder: list episodes by video, not by raw HDF5
Browse files
scripts/build_probe_testset.py
CHANGED
|
@@ -27,11 +27,9 @@ from pathlib import Path
|
|
| 27 |
|
| 28 |
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
| 29 |
|
| 30 |
-
from react_paths import force_meta,
|
| 31 |
|
| 32 |
import cv2 # noqa: E402
|
| 33 |
-
import h5py # noqa: E402
|
| 34 |
-
import hdf5plugin # noqa: E402,F401
|
| 35 |
import numpy as np # noqa: E402
|
| 36 |
import pyarrow.parquet as pq # noqa: E402
|
| 37 |
|
|
@@ -40,7 +38,6 @@ from react_toolbox.probe_eval import project_gt # noqa: E402
|
|
| 40 |
from twm.calib_epoch import calib_dir, world_residual # noqa: E402
|
| 41 |
|
| 42 |
REL = force_meta("motherboard")
|
| 43 |
-
H5R = raw_root("motherboard")
|
| 44 |
CAM_H5 = {"left": 1, "middle": 2, "right": 0}
|
| 45 |
VIEWS = ("left", "middle", "right")
|
| 46 |
# The context a tactile world model conditions on is not three camera views.
|
|
@@ -75,7 +72,12 @@ def _episodes():
|
|
| 75 |
if d.name not in TRUSTED:
|
| 76 |
continue
|
| 77 |
for p in sorted(d.glob("*.parquet")):
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
out.append((d.name, p.stem))
|
| 80 |
return out
|
| 81 |
|
|
|
|
| 27 |
|
| 28 |
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
| 29 |
|
| 30 |
+
from react_paths import force_meta, release_root, testset_root # noqa: E402
|
| 31 |
|
| 32 |
import cv2 # noqa: E402
|
|
|
|
|
|
|
| 33 |
import numpy as np # noqa: E402
|
| 34 |
import pyarrow.parquet as pq # noqa: E402
|
| 35 |
|
|
|
|
| 38 |
from twm.calib_epoch import calib_dir, world_residual # noqa: E402
|
| 39 |
|
| 40 |
REL = force_meta("motherboard")
|
|
|
|
| 41 |
CAM_H5 = {"left": 1, "middle": 2, "right": 0}
|
| 42 |
VIEWS = ("left", "middle", "right")
|
| 43 |
# The context a tactile world model conditions on is not three camera views.
|
|
|
|
| 72 |
if d.name not in TRUSTED:
|
| 73 |
continue
|
| 74 |
for p in sorted(d.glob("*.parquet")):
|
| 75 |
+
# gated on the VIDEOS, not the raw HDF5. The frame reading moved
|
| 76 |
+
# to the published videos but this filter did not, so a clean-room
|
| 77 |
+
# run found zero usable episodes and reported "0 probes over 0
|
| 78 |
+
# start frames" — success-shaped output for a total failure.
|
| 79 |
+
vids = release_root("motherboard") / "videos" / d.name / p.stem
|
| 80 |
+
if all((vids / f"{s}.mp4").is_file() for s in STREAMS):
|
| 81 |
out.append((d.name, p.stem))
|
| 82 |
return out
|
| 83 |
|