a gold outline the reviewer kept from the model's proposal is not judged
CI / ledger-and-tools (push) Successful in 19s

454 of the 1 029 gold outlines are a proposal kept unchanged (loop 159 of 317, pin 140 of
224, face 140 of 295, crystal 14 of 149): the pre-labelling model's own masks. The
evaluation now ignores them object by object for every model, like a crowd region: they
leave the gold, and an unmatched prediction on one of them is not a false alarm.
tools/gold_kept.py finds them against the studio's batch proposals (mask IoU >= 0.98) and
writes data/gold/kept_machine.json; evaluate_image, evaluate_dirs and gate_stats.per_frame
read it. With it, the frame-level exclusion of 845bd87 is no longer applied (it stays as
the fallback without the file), so the gold set can grow with frames the active model
pre-labelled. Every registry model is measured again on this basis and the three v5 runs
are re-gated, without promotion.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013uu3Bxsu5JqFhaWa9Ftu6z
This commit is contained in:
jungfrauandClaude Fable 5.1 committed 2026-10-25 09:48:20 +01:00
1 parent 845bd87bb3
commit 63ee07fe61
38 files changed
+4800 -3173

No files matched your search

+8 -2
View File
@@ -14,7 +14,7 @@ from pathlib import Path
from typing import Dict, List
from src.eval.metrics import aggregate, evaluate_image, full_report
from src.eval.yolo_labels import load_class_names, read_label_file
from src.eval.yolo_labels import load_class_names, read_kept_outlines, read_label_file
def _stems(label_dir: Path) -> Dict[str, Path]:
@@ -26,17 +26,22 @@ def evaluate_dirs(pred_dir, gold_dir, iou_thr: float = 0.5,
pred_dir, gold_dir = Path(pred_dir), Path(gold_dir)
gold_files = _stems(gold_dir)
pred_files = _stems(pred_dir)
# outlines a model proposed and the reviewer kept are not judged (see evaluate_image)
kept = read_kept_outlines(gold_dir.parent)
# Gold defines the evaluation set; a missing prediction counts as all-FN.
per_image = []
missing_pred = 0
ignored = 0
for stem, gpath in sorted(gold_files.items()):
gold = read_label_file(gpath)
ppath = pred_files.get(stem)
pred = read_label_file(ppath) if ppath else []
if ppath is None:
missing_pred += 1
per_image.append(evaluate_image(gold, pred, iou_thr))
ign = kept.get(stem, ())
ignored += len(ign)
per_image.append(evaluate_image(gold, pred, iou_thr, ignore=ign))
report = full_report(aggregate(per_image), names)
report["dataset"] = {
@@ -44,6 +49,7 @@ def evaluate_dirs(pred_dir, gold_dir, iou_thr: float = 0.5,
"pred_images": len(pred_files),
"missing_predictions": missing_pred,
"iou_threshold": iou_thr,
"ignored_objects": ignored,
}
return report