fix: honor official RELLIS train sequence split

This commit is contained in:
DCCONSTRUCTIONS
2026-07-25 21:20:13 +03:00
parent 41e347d20a
commit 15821a1c98
2 changed files with 48 additions and 2 deletions
+8 -2
View File
@@ -437,8 +437,14 @@ def _stratified_pairs(
groups: dict[str, list[tuple[str, str]]] = {}
for pair in pairs:
groups.setdefault(pair[0].split("/", 1)[0], []).append(pair)
if sorted(groups) != ["00000", "00001", "00002", "00003", "00004"]:
raise RellisAdmissionError("RELLIS train split does not cover every sequence")
if (
len(groups) < 2
or any(
sequence not in {"00000", "00001", "00002", "00003", "00004"}
for sequence in groups
)
):
raise RellisAdmissionError("RELLIS train split sequence coverage is incompatible")
selected: list[tuple[str, str]] = []
remaining = frame_count
sequence_ids = sorted(groups)