[LAB 09 · 检测几何:框、匹配、NMS 与 AP](/course/notebooks/90d213b4e1e04c7e889ee6fc042b2358.html) # 运行记录 · 实现代码 [独立阅读](/course/notebook-blocks/66bcd9627b4841bfbeed4228ff02efd7.html) 并入相关学习路径 固定框匹配、PR/AP、NMS误删相邻对象反例 展开完整实现代码 ``` artifact_names = ["lab09.py", "notebook.json", "teaching.md", "results.json", "geometry.svg", "precision_recall.svg", "nms_tradeoff.svg"] artifact_hashes = {name: hashlib.sha256((OUT / name).read_bytes()).hexdigest() for name in artifact_names if (OUT / name).exists()} input_json = json.dumps({"gt": GT.tolist(), "pred": PRED.tolist(), "scores": SCORES.tolist(), "nms_threshold": NMS_THRESHOLD, "eval_thresholds": EVAL_THRESHOLDS}, sort_keys=True, separators=(",", ":")) manifest = {"notebook_id": "90d213b4e1e04c7e889ee6fc042b2358", "notebook_name": "LAB 09 · 检测几何:框、匹配、NMS 与 AP", "started_at_utc": STARTED_AT, "finished_at_utc": datetime.now(timezone.utc).isoformat(), "elapsed_seconds": time.perf_counter() - STARTED_CLOCK, "execution": "actual local Python execution", "status": "passed", "command": "python lab09.py", "python_version": platform.python_version(), "numpy_version": np.__version__, "input_sha256": hashlib.sha256(input_json.encode()).hexdigest(), "sha256": artifact_hashes, "key_results": {"AP50": baseline["AP50"]["ap"], "AP75": baseline["AP75"]["ap"], "nms_AP50": after_nms["AP50"]["ap"], "nms_AP75": after_nms["AP75"]["ap"], "neighbor_nms_AP50": neighbor_after["ap"], "protocol_duplicate_AP50": protocol_standard["ap"], "alternative_best_unused_AP50": alternative_ap}} (OUT / "run.json").write_text(json.dumps(manifest, ensure_ascii=False, indent=2), encoding="utf-8") print("Assertions: passed. Saved results.json, 3 SVG figures and run.json.") ```