feat(multicamera): add world-plane HOTA - #556
Draft
AlexBodner wants to merge 9 commits into
Draft
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>
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.
What does this PR do?
Adds AI City Challenge 2024 multicamera evaluation on world-plane coordinates. The implementation reads the benchmark's nine-column text format, evaluates each scene with HOTA using a 2 m zero-distance, and reports the protocol's unweighted mean across scenes.
This differs from MOT evaluation in three ways:
max(0, 1 - euclidean_distance / 2 m)on world coordinates rounded to three decimals.(frame_id, object_id)rows are removed; the first row is kept.Dataset download support is deferred to the dataset PR. The evaluation CLI and example remain in the follow-up CLI PR.
Scope
load_multicamera_fileandload_scene_camera_mapfor AI City 2024 inputs.trackers.eval.multicameramodule.MulticameraBenchmarkResultandSceneMeanHOTAso the benchmark row carries exactly the four fields the protocol defines, leaving the shared MOT result types untouched.The public evaluator expects per-scene inputs:
Missing prediction files raise an error so scenes cannot be skipped silently. An existing but empty prediction file is valid and produces a zero score for that scene.
Public API
evaluate_multicamera_scenereturns a normalSequenceResultcontaining full HOTA metrics.evaluate_multicamera_scenesreturns aMulticameraBenchmarkResult, whosesceneshold per-sceneSequenceResultobjects and whoseaggregateis aSceneMeanHOTAwith HOTA, DetA, AssA, and LocA.The protocol defines no benchmark-level recall, precision, or detection counts under an unweighted mean, so those fields are absent from the aggregate rather than serialized as
null.HOTAMetricsandBenchmarkResultare unchanged, MOT result JSON is unaffected, and the two serialized shapes are self-identifying: multicamera files have a top-levelsceneskey, MOT files havesequences.Reviewer guide
src/trackers/io/multicamera.pysrc/trackers/eval/multicamera.pysrc/trackers/eval/evaluate.pyis byte-identical todevelop; MOT evaluation is not touched.src/trackers/eval/results.py_format_metric_rows, the fixed-width table renderer now shared by the MOT and multicamera tables.scripts/verify_multicamera_eval.pyandtests/data/multicamera/The existing HOTA computation kernel is unchanged.
How to try it
Run the committed two-scene fixture:
Run direct parity against NVIDIA revision
1eebcf0f74a510994fe4c886f4fa77fbc6724ea8:uv run --with pandas python scripts/verify_multicamera_eval.py \ --nvidia-eval-dir /path/to/MTMC_Tracking_2024/evalTo check NVIDIA's monolithic full sample too, add:
The script creates temporary per-scene files for that check; this conversion is not part of the public API.
Verification
develop: 1,471 passed, 5 skipped.mkdocs build --strict.develop.tests/data/multicamera/tier3_comparison.jsonlat1e-4relative and absolute tolerance.git diff --check.The recorded full-benchmark headline values are HOTA 49.2825, DetA 49.1998, AssA 49.3655, and LocA 77.0547.
Type of change