Repository navigation
feat(multicamera): add world-plane HOTA - #556
Draft
AlexBodner wants to merge 10 commits into
Draft
AlexBodner wants to merge 10 commits into
AlexBodner wants to merge 10 commits into
Conversation
- Add streaming AI City 2024 multicamera loaders and single-/multi-scene world-plane HOTA evaluation APIs with explicit scene-mean coverage semantics. - Verify hermetic, truncated real-scene, and full 30-scene parity against the pinned official NVIDIA evaluator, with authenticated fixtures and provenance. - Extend benchmark results with aggregation modes, strict JSON serialization, coverage round-tripping, table labels, and typed incompatibility errors. - Wire focused unit/integration coverage, required external test-data handling, API docs, CI paths, and the Hugging Face development dependency. --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
- Keep API docs and exports focused on supported entry points while making allocation guards private. - Persist compact per-scene NVIDIA parity evidence with portable, hash-authenticated provenance. - Update tests to enforce the narrowed surface and auditable full-benchmark receipt. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
- Integrate the pre-commit autofix commit while preserving compact Tier 3 provenance. - Measure evaluator memory above package-import overhead so the integration guard is portable across CI environments. - Avoid the Python 3.10 docformatter tokenizer conflict in the subprocess test harness. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds AI City 2024 multicamera world-plane HOTA evaluation, including streaming input preparation, scene-mean aggregation, and NVIDIA parity validation.
Changes:
- Adds multicamera parsing and Euclidean HOTA evaluation APIs.
- Adds aggregation and benchmark-coverage metadata.
- Adds fixtures, parity tooling, tests, documentation, and CI integration.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/trackers/io/multicamera.py |
Implements multicamera parsing and preparation. |
src/trackers/eval/evaluate.py |
Adds scene and benchmark evaluation. |
src/trackers/eval/results.py |
Adds aggregation and coverage metadata. |
src/trackers/eval/hota.py |
Validates aggregation arrays. |
src/trackers/eval/errors.py |
Defines aggregation exception. |
src/trackers/eval/__init__.py |
Exports new public APIs. |
scripts/verify_multicamera_eval.py |
Adds NVIDIA parity harness. |
tests/io/test_multicamera.py |
Tests parsing and preparation. |
tests/eval/test_evaluate.py |
Tests multicamera evaluation. |
tests/eval/test_results.py |
Tests result semantics and serialization. |
tests/eval/test_integration.py |
Adds real-scene parity coverage. |
tests/cli/test_verify_multicamera_eval.py |
Tests verification tooling. |
tests/conftest.py |
Adds pinned fixture downloads. |
tests/data/multicamera/tier3_validation.md |
Records Tier 3 validation summary. |
tests/data/multicamera/tier2_expected.json |
Stores Tier 2 recipe and golden. |
tests/data/multicamera/provenance.json |
Records validation provenance. |
tests/data/multicamera/expected_results.json |
Stores Tier 1 goldens. |
tests/data/multicamera/scene_camera_map.json |
Defines synthetic scene mapping. |
tests/data/multicamera/scene_a_gt.txt |
Adds scene A ground truth. |
tests/data/multicamera/scene_a_pred.txt |
Adds scene A predictions. |
tests/data/multicamera/scene_b_gt.txt |
Adds scene B ground truth. |
tests/data/multicamera/scene_b_pred.txt |
Adds scene B predictions. |
tests/data/multicamera/combined_gt.txt |
Adds combined oracle ground truth. |
tests/data/multicamera/combined_pred.txt |
Adds combined oracle predictions. |
tests/data/multicamera/gt/scene_a/ground_truth.txt |
Adds benchmark-layout scene A GT. |
tests/data/multicamera/gt/scene_b/ground_truth.txt |
Adds benchmark-layout scene B GT. |
tests/data/multicamera/pred/scene_a.txt |
Adds benchmark-layout scene A predictions. |
tests/data/multicamera/pred/scene_b.txt |
Adds benchmark-layout scene B predictions. |
docs/api/io.md |
Documents multicamera loaders. |
docs/api/evals.md |
Documents evaluation APIs and results. |
.github/workflows/ci-integrations.yml |
Requires external integration fixtures. |
pyproject.toml |
Adds Hugging Face development dependency. |
uv.lock |
Locks the new dependency. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+608
to
+612
| pred_prepared = _load_prepared_multicamera_file( | ||
| pred_path, | ||
| file_format=file_format, | ||
| camera_ids=camera_ids, | ||
| ) |
| - AssA: 49.3655 | ||
| - LocA: 77.0546 | ||
|
|
||
| Per-scene numeric values were not retained and are not reconstructed here. The source validator report was `.reports/review/2026-08-11T17-59-13Z/validate-qa-tier3.md`. |
Comment on lines
+429
to
+432
| def _scene_camera_map_sha256(camera_map: dict[str, list[int]]) -> str: | ||
| """Hash normalized map semantics independently of JSON formatting.""" | ||
| encoded = json.dumps(camera_map, sort_keys=True, separators=(",", ":")).encode() | ||
| return hashlib.sha256(encoded).hexdigest() |
Remove deferred acquisition, coverage, and re-aggregation machinery while preserving AI City world-plane HOTA and its minimal parity evidence.
Make the first ground-truth and prediction examples self-explanatory without changing their parsed values.
Name the metadata file after the NVIDIA verification evidence it records.
The AI City 2024 benchmark row defines only HOTA, DetA, AssA, and LocA, and expressing that through the shared MOT types forced eight HOTAMetrics fields to become optional plus an aggregation discriminator on BenchmarkResult. Every MOT consumer paid for one four-number row. Move the feature into eval/multicamera.py with SceneMeanHOTA for the aggregate and MulticameraBenchmarkResult holding per-scene SequenceResult objects that keep full, strict HOTA metrics. HOTAMetrics, BenchmarkResult, and evaluate.py return to their develop state; results.py keeps only an extracted table renderer shared by both benchmark tables, verified to render byte-identical output. Also drop the committed combined_*.txt fixtures: the parity script now builds NVIDIA's monolithic layout from the per-scene files, so the rows no longer live in the repo twice and cannot drift. Co-authored-by: Cursor <cursoragent@cursor.com>
- compute world-plane similarity with scipy cdist; the Gram-matrix form flipped alpha-threshold ties at world-plane magnitudes (30/30 scenes drifted one-directionally vs NVIDIA) - reuse io.mot._remap_ids; validate zero_distance once per public entry point before any I/O - evaluate_multicamera_scene keeps MOT argument order with scene keyword-only; Literal file_format on all three signatures; Sequence/Mapping input types - export loaders from trackers.io; add __dir__ for lazy eval names; drop two unreachable guards; from_dict rejects MOT payloads - complete Raises/Examples docstrings, document NVIDIA divergences and the LocA=1.0 empty-prediction rule - tests: prediction-side camera filter, alpha-boundary regression, half-to-even tie value, table golden; scripts/ added to mypy files - rename tier3_comparison.jsonl to nvidia_scene_comparison.jsonl; script gains --comparison-out to regenerate it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds AI City Challenge 2024 Track 1 evaluation: world-plane HOTA per scene and the protocol's unweighted scene mean. Every number is checked directly against NVIDIA's pinned evaluator (
nvidia/PhysicalAI-SmartSpaces@1eebcf0f).Multicamera evaluation differs from MOT in three ways, and the code follows NVIDIA on each:
max(0, 1 - euclidean / 2 m)on world coordinates rounded to three decimals, computed withscipy.spatial.distance.cdist. A Gram-matrix form was measured to flip alpha-threshold ties at world-plane magnitudes and was replaced.(frame_id, obj_id)rows keep the first occurrence, then frame ids shift by+1.SceneMeanHOTAcarries exactly those four fields.A missing prediction file raises so a scene cannot be skipped silently; an empty one scores HOTA/DetA/AssA as zero with LocA
1.0per TrackEval.HOTAMetrics,BenchmarkResultandeval/evaluate.pyare untouched; the only change toresults.pyis sharing the table renderer, with MOT output byte-identical todevelopand now pinned by a test.Public API
evaluate_multicamera_scenereturns aSequenceResultwith full HOTA metrics.evaluate_multicamera_scenesreturns aMulticameraBenchmarkResultwhosesceneshold per-scene results and whoseaggregateis theSceneMeanHOTA. Inputs are per-scene files:How to try it
Parity against NVIDIA's evaluator, on the committed fixture and optionally the full 30-scene sample:
uv run --with pandas python scripts/verify_multicamera_eval.py \ --nvidia-eval-dir /path/to/MTMC_Tracking_2024/eval [--sample-dir /path/to/sample]Full-benchmark headline: HOTA 49.2825, DetA 49.1998, AssA 49.3655, LocA 77.0547, all 30 scenes within 1e-4 (
tests/data/multicamera/nvidia_scene_comparison.jsonl).Dataset download, the eval CLI and the user-facing protocol page are follow-up PRs.
🤖 Generated with Claude Code