feat: scope detection QA to inference coverage
This commit is contained in:
@@ -525,6 +525,20 @@ if not data.get("quality_check_id"):
|
||||
raise SystemExit("Detection QA did not persist a quality_check_id")
|
||||
if int(data.get("reference_feature_count") or 0) < 1:
|
||||
raise SystemExit("Detection QA reference feature count is empty")
|
||||
coverage = data.get("coverage") or {}
|
||||
if coverage.get("applied") is not True:
|
||||
raise SystemExit("Detection QA did not apply persisted tile-manifest coverage")
|
||||
if coverage.get("mode") != "persisted_tile_manifest_union":
|
||||
raise SystemExit("Detection QA returned an unexpected coverage mode")
|
||||
if int(coverage.get("tile_count") or 0) < 1:
|
||||
raise SystemExit("Detection QA coverage did not report persisted tiles")
|
||||
if int(coverage.get("reference_raw_count") or 0) < int(coverage.get("reference_evaluated_count") or 0):
|
||||
raise SystemExit("Detection QA evaluated more references than the raw population")
|
||||
diagnostics = data.get("box_to_footprint_diagnostics") or {}
|
||||
if diagnostics.get("diagnostic_only") is not True:
|
||||
raise SystemExit("Detection QA did not return box-to-footprint diagnostics")
|
||||
if diagnostics.get("canonical_method") != "candidate_polygon_vs_reference_footprint_iou":
|
||||
raise SystemExit("Detection QA canonical matching method changed unexpectedly")
|
||||
for key in ("matches", "false_positives", "false_negatives"):
|
||||
if int(data.get(key) or 0) < 0:
|
||||
raise SystemExit(f"Detection QA returned a negative {key}")
|
||||
|
||||
Reference in New Issue
Block a user