fix(perception): reuse M4.8 for vegetation evidence
This commit is contained in:
@@ -16,6 +16,16 @@ WORKER_SCHEMA: Final = "missioncore.lab-v1-goose-vegetation-run/v1"
|
||||
RESULT_PREFIX: Final = "lab-v1-vegetation-shadow-"
|
||||
_CANDIDATES: Final = ("ddrnet", "ppliteseg")
|
||||
_MODES: Final = ("goose", "ravnoves")
|
||||
_FOCUS_ORDER: Final = (
|
||||
"high_grass",
|
||||
"low_grass",
|
||||
"bush",
|
||||
"tree_trunk",
|
||||
"tree_crown",
|
||||
"hedge",
|
||||
"forest",
|
||||
"crops",
|
||||
)
|
||||
_IMAGE_KEYS: Final = (
|
||||
"source",
|
||||
"prediction_semantic",
|
||||
@@ -93,6 +103,22 @@ def _case_map(result: dict[str, Any], label: str) -> dict[str, dict[str, Any]]:
|
||||
return rows
|
||||
|
||||
|
||||
def _visual_case_order(row: dict[str, Any]) -> tuple[int, int, str]:
|
||||
focus = _object(row.get("focus"), "GOOSE visual focus")
|
||||
class_name = focus.get("class_name")
|
||||
stratum_rank = focus.get("stratum_rank")
|
||||
case_id = row.get("case_id")
|
||||
if (
|
||||
not isinstance(class_name, str)
|
||||
or class_name not in _FOCUS_ORDER
|
||||
or not isinstance(stratum_rank, int)
|
||||
or stratum_rank <= 0
|
||||
or not isinstance(case_id, str)
|
||||
):
|
||||
raise VegetationShadowLabError("GOOSE visual focus ordering is invalid")
|
||||
return _FOCUS_ORDER.index(class_name), stratum_rank, case_id
|
||||
|
||||
|
||||
def _file_from_case(
|
||||
root: Path,
|
||||
case: dict[str, Any],
|
||||
@@ -198,8 +224,14 @@ def seal_vegetation_shadow_lab(
|
||||
artifacts: list[dict[str, object]] = []
|
||||
catalogs: dict[str, list[dict[str, object]]] = {"goose": [], "ravnoves": []}
|
||||
try:
|
||||
for mode in _MODES:
|
||||
for case_id in sorted(cases[("ddrnet", mode)]):
|
||||
# RAVNOVES is retained in the immutable Worker proof and timing summary,
|
||||
# but it has no vegetation truth island. Publishing those urban frames
|
||||
# as primary visual cases would misrepresent the operator question.
|
||||
for mode in ("goose",):
|
||||
for case_id in sorted(
|
||||
cases[("ddrnet", mode)],
|
||||
key=lambda value: _visual_case_order(cases[("ddrnet", mode)][value]),
|
||||
):
|
||||
ddr_case = cases[("ddrnet", mode)][case_id]
|
||||
pplite_case = cases[("ppliteseg", mode)][case_id]
|
||||
row: dict[str, object] = {
|
||||
@@ -209,8 +241,13 @@ def seal_vegetation_shadow_lab(
|
||||
"height": ddr_case.get("source_height"),
|
||||
"center_crop_xyxy": ddr_case.get("center_crop_xyxy"),
|
||||
"outside_crop_state": ddr_case.get("outside_crop_state"),
|
||||
"focus": ddr_case.get("focus"),
|
||||
"assets": {},
|
||||
}
|
||||
if ddr_case.get("focus") != pplite_case.get("focus"):
|
||||
raise VegetationShadowLabError(
|
||||
f"{mode} case {case_id} focus contract differs between candidates"
|
||||
)
|
||||
asset_map = _object(row["assets"], "sealed assets")
|
||||
sources: list[tuple[str, str, dict[str, Any], str]] = [
|
||||
("source", "ddrnet", ddr_case, "source"),
|
||||
@@ -218,7 +255,23 @@ def seal_vegetation_shadow_lab(
|
||||
("ppliteseg", "ppliteseg", pplite_case, "prediction_semantic"),
|
||||
]
|
||||
if mode == "goose":
|
||||
sources.append(("truth", "ddrnet", ddr_case, "truth_semantic"))
|
||||
sources.extend(
|
||||
(
|
||||
("truth", "ddrnet", ddr_case, "truth_semantic"),
|
||||
(
|
||||
"ddrnet_error",
|
||||
"ddrnet",
|
||||
ddr_case,
|
||||
"vegetation_material_error",
|
||||
),
|
||||
(
|
||||
"ppliteseg_error",
|
||||
"ppliteseg",
|
||||
pplite_case,
|
||||
"vegetation_material_error",
|
||||
),
|
||||
)
|
||||
)
|
||||
else:
|
||||
selected_case = cases[(selected, mode)][case_id]
|
||||
sources.extend(
|
||||
@@ -328,7 +381,7 @@ def seal_vegetation_shadow_lab(
|
||||
},
|
||||
"limitations": [
|
||||
"GOOSE validation is external-domain qualification, not RAVNOVES ground truth.",
|
||||
"The RAVNOVES island is visual shadow evidence without independent labels.",
|
||||
"The RAVNOVES shadow remains in Worker proofs and is not catalogued as vegetation evidence because it has no independent labels.",
|
||||
"Vegetation semantics never clears rigid LiDAR/TGS occupancy.",
|
||||
"Undefined pixels outside the 600x600 center crop remain fail-closed.",
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user