Skip to content

Commit 5f05879

Browse files
SkalskiPjuan-cobosBordaCopilotdependabot[bot]
authored
Trackers 2.2.0 release (#247)
* Change ByteTrack by ByteTrackTracker in README examples (#203) * fix ByteTrack code snippets. use ByteTrackTracker over ByteTrack. (#204) * Add Apache 2.0 license headers to source files (#205) * chore: Redundant types from docstrings (#206) * drop redundant types * update docstrings * CI: Resolve tag patterns in workflows for consistency (#209) * Update publish-docs workflow to support 'develop' & custom tags (#196) * Enhance publish-docs workflow to allow custom ref deployments via workflow_dispatch * Update .github/workflows/publish-docs.yml --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * 🔄 Bump astral-sh/setup-uv in the github-actions group (#213) Bumps the github-actions group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv). Updates `astral-sh/setup-uv` from 7.2.0 to 7.2.1 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/61cb8a9741eeb8a550a1b8544337180c0fc8476b...803947b9bd8e9f986429fa0c5a41c367cd732b41) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 7.2.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * :arrow_up: Bump twine from 6.1.0 to 6.2.0 (#216) Bumps [twine](https://github.com/pypa/twine) from 6.1.0 to 6.2.0. - [Release notes](https://github.com/pypa/twine/releases) - [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst) - [Commits](https://github.com/pypa/twine/compare/6.1.0...6.2.0) --- updated-dependencies: - dependency-name: twine dependency-version: 6.2.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * :arrow_up: Bump mkdocs-material from 9.6.13 to 9.7.1 (#217) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.13 to 9.7.1. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.13...9.7.1) --- updated-dependencies: - dependency-name: mkdocs-material dependency-version: 9.7.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * :arrow_up: Bump pre-commit from 4.2.0 to 4.5.1 (#218) Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.2.0 to 4.5.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.2.0...v4.5.1) --- updated-dependencies: - dependency-name: pre-commit dependency-version: 4.5.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * :arrow_up: Bump build from 1.2.2.post1 to 1.4.0 (#219) Bumps [build](https://github.com/pypa/build) from 1.2.2.post1 to 1.4.0. - [Release notes](https://github.com/pypa/build/releases) - [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pypa/build/compare/1.2.2.post1...1.4.0) --- updated-dependencies: - dependency-name: build dependency-version: 1.4.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * :arrow_up: Bump mkdocs-glightbox from 0.4.0 to 0.5.2 (#220) Bumps [mkdocs-glightbox](https://github.com/blueswen/mkdocs-glightbox) from 0.4.0 to 0.5.2. - [Release notes](https://github.com/blueswen/mkdocs-glightbox/releases) - [Changelog](https://github.com/blueswen/mkdocs-glightbox/blob/main/CHANGELOG) - [Commits](https://github.com/blueswen/mkdocs-glightbox/compare/v0.4.0...v0.5.2) --- updated-dependencies: - dependency-name: mkdocs-glightbox dependency-version: 0.5.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add evaluation module with box IoU/IoA calculations (TrackEval Part 1) (#210) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add Hungarian matching utility for detection assignment (TrackEval Part 2) (#211) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add CLEAR metrics module (MOTA, MOTP, IDSW, MT/PT/ML) (TrackEval Part 3) (#212) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * fix(pre_commit): 🎨 auto format pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add MOT format file loading and sequence preparation for evaluation (TrackEval Part 4) (#214) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add MOT format file loading and sequence preparation for E2E evaluation - Add MOTFrameData dataclass for per-frame detection data - Add MOTSequenceData dataclass for prepared sequence data ready for metrics - Add load_mot_file() to parse MOT Challenge format files - Add prepare_mot_sequence() to compute IoU and remap IDs for evaluation - Update __init__.py to export new types and functions - Add comprehensive unit tests (20 tests for io module) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add integration tests for CLEAR metrics validation against TrackEval - Add test/conftest.py with fixture to download and cache SoccerNet test data - Add test/eval/test_integration.py with 49 parametrized tests for all sequences - Add ci-integration-tests.yml workflow that runs only on eval code changes - Update ci-tests.yml to exclude integration tests from regular CI - Add integration marker to pyproject.toml pytest config All 49 sequences pass with exact numerical parity to TrackEval for: - Integer metrics: CLR_TP, CLR_FN, CLR_FP, IDSW, MT, PT, ML, Frag - Float metrics: MOTA, MOTP, MTR, PTR, MLR * Refactor integration tests and improve code quality - Rename CI job to 'TrackEval Parity Validation' for clarity - Derive sequence names dynamically from expected_results.json - Simplify test_io.py from 21 to 10 test cases while maintaining coverage - Restore useful comments in io.py around ID remapping and IoU computation - Clean up conftest.py and test_integration.py docstrings * fix(pre_commit): 🎨 auto format pre-commit hooks * Update integration tests to use SportsMOT and DanceTrack datasets (#221) * Update integration tests to use SportsMOT and DanceTrack data Replace SoccerNet test data with SportsMOT (45 sequences) and DanceTrack (25 sequences) datasets. The tests now validate CLEAR metrics against TrackEval results for 70 total sequences. - Update URLs to new GCS-hosted test data zips - Add multi-dataset fixture support in conftest.py - Parametrize tests across both datasets - Fix metric comparison (new format uses fractions, not percentages) * Fix mypy conftest module name conflict Use a pytest fixture instead of directly importing from conftest.py to avoid mypy seeing the file under two module names ("conftest" and "test.conftest"). * Add type annotation for test_cases variable --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add high-level evaluation API and CLI (TrackEval Part 5) (#215) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add MOT format file loading and sequence preparation for E2E evaluation - Add MOTFrameData dataclass for per-frame detection data - Add MOTSequenceData dataclass for prepared sequence data ready for metrics - Add load_mot_file() to parse MOT Challenge format files - Add prepare_mot_sequence() to compute IoU and remap IDs for evaluation - Update __init__.py to export new types and functions - Add comprehensive unit tests (20 tests for io module) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add integration tests for CLEAR metrics validation against TrackEval - Add test/conftest.py with fixture to download and cache SoccerNet test data - Add test/eval/test_integration.py with 49 parametrized tests for all sequences - Add ci-integration-tests.yml workflow that runs only on eval code changes - Update ci-tests.yml to exclude integration tests from regular CI - Add integration marker to pyproject.toml pytest config All 49 sequences pass with exact numerical parity to TrackEval for: - Integer metrics: CLR_TP, CLR_FN, CLR_FP, IDSW, MT, PT, ML, Frag - Float metrics: MOTA, MOTP, MTR, PTR, MLR * Refactor integration tests and improve code quality - Rename CI job to 'TrackEval Parity Validation' for clarity - Derive sequence names dynamically from expected_results.json - Simplify test_io.py from 21 to 10 test cases while maintaining coverage - Restore useful comments in io.py around ID remapping and IoU computation - Clean up conftest.py and test_integration.py docstrings * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Update integration tests to use SportsMOT and DanceTrack datasets (#221) * Update integration tests to use SportsMOT and DanceTrack data Replace SoccerNet test data with SportsMOT (45 sequences) and DanceTrack (25 sequences) datasets. The tests now validate CLEAR metrics against TrackEval results for 70 total sequences. - Update URLs to new GCS-hosted test data zips - Add multi-dataset fixture support in conftest.py - Parametrize tests across both datasets - Fix metric comparison (new format uses fractions, not percentages) * Fix mypy conftest module name conflict Use a pytest fixture instead of directly importing from conftest.py to avoid mypy seeing the file under two module names ("conftest" and "test.conftest"). * Add type annotation for test_cases variable * Add smart auto-detection and structured result objects to evaluation API (#222) * Add smart auto-detection and structured result objects to evaluation API - Remove data_format parameter from SDK and --data-format flag from CLI - Add smart detection: auto-detect format (flat vs MOT17), benchmark, split, and tracker name - Log detection results for transparency; error helpfully when ambiguous - Add BenchmarkResult and SequenceResult dataclasses with json/table/save/load methods - Add all CLEAR metrics (MOTA, MOTP, MODA, CLR_Re, CLR_Pr, MTR, PTR, MLR, sMOTA, etc.) - Simplify test fixtures to use auto-detection instead of explicit format parameters * fix(pre_commit): 🎨 auto format pre-commit hooks * Simplify CLI table output to use SDK result.table() method - Remove custom Rich table formatting that truncated columns - Use result.table(columns) for consistent, readable output - Set sensible default columns: MOTA, MOTP, IDSW, CLR_FP, CLR_FN, MT, ML - Remove unused Rich imports and helper functions --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add HOTA (Higher Order Tracking Accuracy) metrics (TrackEval Part 6) (#223) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add MOT format file loading and sequence preparation for E2E evaluation - Add MOTFrameData dataclass for per-frame detection data - Add MOTSequenceData dataclass for prepared sequence data ready for metrics - Add load_mot_file() to parse MOT Challenge format files - Add prepare_mot_sequence() to compute IoU and remap IDs for evaluation - Update __init__.py to export new types and functions - Add comprehensive unit tests (20 tests for io module) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add integration tests for CLEAR metrics validation against TrackEval - Add test/conftest.py with fixture to download and cache SoccerNet test data - Add test/eval/test_integration.py with 49 parametrized tests for all sequences - Add ci-integration-tests.yml workflow that runs only on eval code changes - Update ci-tests.yml to exclude integration tests from regular CI - Add integration marker to pyproject.toml pytest config All 49 sequences pass with exact numerical parity to TrackEval for: - Integer metrics: CLR_TP, CLR_FN, CLR_FP, IDSW, MT, PT, ML, Frag - Float metrics: MOTA, MOTP, MTR, PTR, MLR * Refactor integration tests and improve code quality - Rename CI job to 'TrackEval Parity Validation' for clarity - Derive sequence names dynamically from expected_results.json - Simplify test_io.py from 21 to 10 test cases while maintaining coverage - Restore useful comments in io.py around ID remapping and IoU computation - Clean up conftest.py and test_integration.py docstrings * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Update integration tests to use SportsMOT and DanceTrack datasets (#221) * Update integration tests to use SportsMOT and DanceTrack data Replace SoccerNet test data with SportsMOT (45 sequences) and DanceTrack (25 sequences) datasets. The tests now validate CLEAR metrics against TrackEval results for 70 total sequences. - Update URLs to new GCS-hosted test data zips - Add multi-dataset fixture support in conftest.py - Parametrize tests across both datasets - Fix metric comparison (new format uses fractions, not percentages) * Fix mypy conftest module name conflict Use a pytest fixture instead of directly importing from conftest.py to avoid mypy seeing the file under two module names ("conftest" and "test.conftest"). * Add type annotation for test_cases variable * Add smart auto-detection and structured result objects to evaluation API (#222) * Add smart auto-detection and structured result objects to evaluation API - Remove data_format parameter from SDK and --data-format flag from CLI - Add smart detection: auto-detect format (flat vs MOT17), benchmark, split, and tracker name - Log detection results for transparency; error helpfully when ambiguous - Add BenchmarkResult and SequenceResult dataclasses with json/table/save/load methods - Add all CLEAR metrics (MOTA, MOTP, MODA, CLR_Re, CLR_Pr, MTR, PTR, MLR, sMOTA, etc.) - Simplify test fixtures to use auto-detection instead of explicit format parameters * fix(pre_commit): 🎨 auto format pre-commit hooks * Simplify CLI table output to use SDK result.table() method - Remove custom Rich table formatting that truncated columns - Use result.table(columns) for consistent, readable output - Set sensible default columns: MOTA, MOTP, IDSW, CLR_FP, CLR_FN, MT, ML - Remove unused Rich imports and helper functions --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add HOTA (Higher Order Tracking Accuracy) metrics - Create trackers/eval/hota.py with compute_hota_metrics() and aggregate_hota_metrics() functions implementing HOTA algorithm - Add HOTAMetrics dataclass for storing HOTA results - Update SequenceResult and BenchmarkResult to support optional HOTA metrics - Integrate HOTA computation into evaluate_mot_sequence and evaluate_benchmark - Update CLI to support --metrics HOTA option - Add comprehensive unit tests for HOTA computation and aggregation HOTA evaluates tracking at multiple IoU thresholds (0.05-0.95) and computes: - Detection metrics: DetA, DetRe, DetPr - Association metrics: AssA, AssRe, AssPr - Combined HOTA = sqrt(DetA * AssA) - Localization accuracy: LocA * fix(pre_commit): 🎨 auto format pre-commit hooks * Add HOTA (Higher Order Tracking Accuracy) metrics - Create trackers/eval/hota.py with compute_hota_metrics() and aggregate_hota_metrics() functions implementing HOTA algorithm - Add HOTAMetrics dataclass for storing HOTA results - Update SequenceResult and BenchmarkResult to support optional HOTA metrics - Integrate HOTA computation into evaluate_mot_sequence and evaluate_benchmark - Update CLI to support --metrics HOTA option - Add comprehensive unit tests for HOTA computation and aggregation HOTA evaluates tracking at multiple IoU thresholds (0.05-0.95) and computes: - Detection metrics: DetA, DetRe, DetPr - Association metrics: AssA, AssRe, AssPr - Combined HOTA = sqrt(DetA * AssA) - Localization accuracy: LocA * fix(pre_commit): 🎨 auto format pre-commit hooks * Show all metrics by default in table output Remove the column limitation that was originally added as a workaround for Rich table truncation. Now using plain-text tables that don't truncate, so show all available metrics by default: - CLEAR-only: 17 metrics - HOTA+CLEAR: 28 metrics (11 HOTA + 17 CLEAR) Users can still limit columns via the columns parameter if desired. * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix HOTA aggregation TypeError with numpy arrays HOTAMetrics.to_dict() was converting numpy arrays to lists for JSON serialization, but aggregate_hota_metrics() needs numpy arrays for weighted averaging math. Added arrays_as_list parameter to to_dict() to control this behavior: - arrays_as_list=True (default): convert to lists for JSON - arrays_as_list=False: keep as numpy arrays for aggregation * Add HOTA verification to integration tests Update all 4 integration tests to: - Pass metrics=["CLEAR", "HOTA"] to evaluate_benchmark() - Verify HOTA metrics (HOTA, DetA, AssA, LocA) against TrackEval expected results This ensures numerical parity is verified for both CLEAR and HOTA metrics. * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix HOTA expected values in test data Update test data URLs to use regenerated zips with correct HOTA metrics. The previous expected_results.json files incorrectly used HOTA(0) (value at alpha=0.05) instead of the mean HOTA across all alpha thresholds. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add Identity metrics (IDF1, IDR, IDP) to evaluation module (TrackEval Part 7) (#224) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add MOT format file loading and sequence preparation for E2E evaluation - Add MOTFrameData dataclass for per-frame detection data - Add MOTSequenceData dataclass for prepared sequence data ready for metrics - Add load_mot_file() to parse MOT Challenge format files - Add prepare_mot_sequence() to compute IoU and remap IDs for evaluation - Update __init__.py to export new types and functions - Add comprehensive unit tests (20 tests for io module) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add integration tests for CLEAR metrics validation against TrackEval - Add test/conftest.py with fixture to download and cache SoccerNet test data - Add test/eval/test_integration.py with 49 parametrized tests for all sequences - Add ci-integration-tests.yml workflow that runs only on eval code changes - Update ci-tests.yml to exclude integration tests from regular CI - Add integration marker to pyproject.toml pytest config All 49 sequences pass with exact numerical parity to TrackEval for: - Integer metrics: CLR_TP, CLR_FN, CLR_FP, IDSW, MT, PT, ML, Frag - Float metrics: MOTA, MOTP, MTR, PTR, MLR * Refactor integration tests and improve code quality - Rename CI job to 'TrackEval Parity Validation' for clarity - Derive sequence names dynamically from expected_results.json - Simplify test_io.py from 21 to 10 test cases while maintaining coverage - Restore useful comments in io.py around ID remapping and IoU computation - Clean up conftest.py and test_integration.py docstrings * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Update integration tests to use SportsMOT and DanceTrack datasets (#221) * Update integration tests to use SportsMOT and DanceTrack data Replace SoccerNet test data with SportsMOT (45 sequences) and DanceTrack (25 sequences) datasets. The tests now validate CLEAR metrics against TrackEval results for 70 total sequences. - Update URLs to new GCS-hosted test data zips - Add multi-dataset fixture support in conftest.py - Parametrize tests across both datasets - Fix metric comparison (new format uses fractions, not percentages) * Fix mypy conftest module name conflict Use a pytest fixture instead of directly importing from conftest.py to avoid mypy seeing the file under two module names ("conftest" and "test.conftest"). * Add type annotation for test_cases variable * Add smart auto-detection and structured result objects to evaluation API (#222) * Add smart auto-detection and structured result objects to evaluation API - Remove data_format parameter from SDK and --data-format flag from CLI - Add smart detection: auto-detect format (flat vs MOT17), benchmark, split, and tracker name - Log detection results for transparency; error helpfully when ambiguous - Add BenchmarkResult and SequenceResult dataclasses with json/table/save/load methods - Add all CLEAR metrics (MOTA, MOTP, MODA, CLR_Re, CLR_Pr, MTR, PTR, MLR, sMOTA, etc.) - Simplify test fixtures to use auto-detection instead of explicit format parameters * fix(pre_commit): 🎨 auto format pre-commit hooks * Simplify CLI table output to use SDK result.table() method - Remove custom Rich table formatting that truncated columns - Use result.table(columns) for consistent, readable output - Set sensible default columns: MOTA, MOTP, IDSW, CLR_FP, CLR_FN, MT, ML - Remove unused Rich imports and helper functions --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add HOTA (Higher Order Tracking Accuracy) metrics - Create trackers/eval/hota.py with compute_hota_metrics() and aggregate_hota_metrics() functions implementing HOTA algorithm - Add HOTAMetrics dataclass for storing HOTA results - Update SequenceResult and BenchmarkResult to support optional HOTA metrics - Integrate HOTA computation into evaluate_mot_sequence and evaluate_benchmark - Update CLI to support --metrics HOTA option - Add comprehensive unit tests for HOTA computation and aggregation HOTA evaluates tracking at multiple IoU thresholds (0.05-0.95) and computes: - Detection metrics: DetA, DetRe, DetPr - Association metrics: AssA, AssRe, AssPr - Combined HOTA = sqrt(DetA * AssA) - Localization accuracy: LocA * fix(pre_commit): 🎨 auto format pre-commit hooks * Add HOTA (Higher Order Tracking Accuracy) metrics - Create trackers/eval/hota.py with compute_hota_metrics() and aggregate_hota_metrics() functions implementing HOTA algorithm - Add HOTAMetrics dataclass for storing HOTA results - Update SequenceResult and BenchmarkResult to support optional HOTA metrics - Integrate HOTA computation into evaluate_mot_sequence and evaluate_benchmark - Update CLI to support --metrics HOTA option - Add comprehensive unit tests for HOTA computation and aggregation HOTA evaluates tracking at multiple IoU thresholds (0.05-0.95) and computes: - Detection metrics: DetA, DetRe, DetPr - Association metrics: AssA, AssRe, AssPr - Combined HOTA = sqrt(DetA * AssA) - Localization accuracy: LocA * fix(pre_commit): 🎨 auto format pre-commit hooks * Show all metrics by default in table output Remove the column limitation that was originally added as a workaround for Rich table truncation. Now using plain-text tables that don't truncate, so show all available metrics by default: - CLEAR-only: 17 metrics - HOTA+CLEAR: 28 metrics (11 HOTA + 17 CLEAR) Users can still limit columns via the columns parameter if desired. * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix HOTA aggregation TypeError with numpy arrays HOTAMetrics.to_dict() was converting numpy arrays to lists for JSON serialization, but aggregate_hota_metrics() needs numpy arrays for weighted averaging math. Added arrays_as_list parameter to to_dict() to control this behavior: - arrays_as_list=True (default): convert to lists for JSON - arrays_as_list=False: keep as numpy arrays for aggregation * Add HOTA verification to integration tests Update all 4 integration tests to: - Pass metrics=["CLEAR", "HOTA"] to evaluate_benchmark() - Verify HOTA metrics (HOTA, DetA, AssA, LocA) against TrackEval expected results This ensures numerical parity is verified for both CLEAR and HOTA metrics. * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix HOTA expected values in test data Update test data URLs to use regenerated zips with correct HOTA metrics. The previous expected_results.json files incorrectly used HOTA(0) (value at alpha=0.05) instead of the mean HOTA across all alpha thresholds. * Add Identity metrics (IDF1, IDR, IDP) implementation Implements Identity metrics following TrackEval's algorithm: - compute_identity_metrics() for single sequence evaluation - aggregate_identity_metrics() for benchmark aggregation - IdentityMetrics dataclass for structured results Updates evaluate_mot_sequence and evaluate_benchmark to support metrics=["Identity"] alongside CLEAR and HOTA. Integration tests now verify CLEAR, HOTA, and Identity metrics against TrackEval precomputed values. * Add Identity metrics support to CLI Update --metrics argument to accept Identity alongside CLEAR and HOTA. * code review pt1 * fix(pre_commit): 🎨 auto format pre-commit hooks * code review pt2 * Remove unused match_detections utility The match_detections function was not used by any metric internally. Each metric (CLEAR, HOTA, Identity) implements specialized matching logic that cannot be generalized into a shared utility. Deleted: - trackers/eval/matching.py - test/eval/test_matching.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Trackeval integration part8 (#226) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add MOT format file loading and sequence preparation for E2E evaluation - Add MOTFrameData dataclass for per-frame detection data - Add MOTSequenceData dataclass for prepared sequence data ready for metrics - Add load_mot_file() to parse MOT Challenge format files - Add prepare_mot_sequence() to compute IoU and remap IDs for evaluation - Update __init__.py to export new types and functions - Add comprehensive unit tests (20 tests for io module) * fix(pre_commit): 🎨 auto format pre-commit hooks * Add integration tests for CLEAR metrics validation against TrackEval - Add test/conftest.py with fixture to download and cache SoccerNet test data - Add test/eval/test_integration.py with 49 parametrized tests for all sequences - Add ci-integration-tests.yml workflow that runs only on eval code changes - Update ci-tests.yml to exclude integration tests from regular CI - Add integration marker to pyproject.toml pytest config All 49 sequences pass with exact numerical parity to TrackEval for: - Integer metrics: CLR_TP, CLR_FN, CLR_FP, IDSW, MT, PT, ML, Frag - Float metrics: MOTA, MOTP, MTR, PTR, MLR * Refactor integration tests and improve code quality - Rename CI job to 'TrackEval Parity Validation' for clarity - Derive sequence names dynamically from expected_results.json - Simplify test_io.py from 21 to 10 test cases while maintaining coverage - Restore useful comments in io.py around ID remapping and IoU computation - Clean up conftest.py and test_integration.py docstrings * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Add high-level evaluation API and CLI for tracker evaluation Introduce SDK functions and CLI for evaluating multi-object tracking results against ground truth using MOT Challenge format data. SDK: - evaluate_mot_sequence(): Evaluate single sequence, returns CLEAR metrics - evaluate_benchmark(): Evaluate multiple sequences with aggregation CLI (beta): - `trackers eval --gt <file> --tracker <file>` for single sequence - `trackers eval --gt-dir <dir> --tracker-dir <dir>` for benchmarks - Optional rich output with `pip install trackers[cli]` - Beta warning displayed on CLI usage * fix(pre_commit): 🎨 auto format pre-commit hooks * Update integration tests to use SportsMOT and DanceTrack datasets (#221) * Update integration tests to use SportsMOT and DanceTrack data Replace SoccerNet test data with SportsMOT (45 sequences) and DanceTrack (25 sequences) datasets. The tests now validate CLEAR metrics against TrackEval results for 70 total sequences. - Update URLs to new GCS-hosted test data zips - Add multi-dataset fixture support in conftest.py - Parametrize tests across both datasets - Fix metric comparison (new format uses fractions, not percentages) * Fix mypy conftest module name conflict Use a pytest fixture instead of directly importing from conftest.py to avoid mypy seeing the file under two module names ("conftest" and "test.conftest"). * Add type annotation for test_cases variable * Add smart auto-detection and structured result objects to evaluation API (#222) * Add smart auto-detection and structured result objects to evaluation API - Remove data_format parameter from SDK and --data-format flag from CLI - Add smart detection: auto-detect format (flat vs MOT17), benchmark, split, and tracker name - Log detection results for transparency; error helpfully when ambiguous - Add BenchmarkResult and SequenceResult dataclasses with json/table/save/load methods - Add all CLEAR metrics (MOTA, MOTP, MODA, CLR_Re, CLR_Pr, MTR, PTR, MLR, sMOTA, etc.) - Simplify test fixtures to use auto-detection instead of explicit format parameters * fix(pre_commit): 🎨 auto format pre-commit hooks * Simplify CLI table output to use SDK result.table() method - Remove custom Rich table formatting that truncated columns - Use result.table(columns) for consistent, readable output - Set sensible default columns: MOTA, MOTP, IDSW, CLR_FP, CLR_FN, MT, ML - Remove unused Rich imports and helper functions --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add HOTA (Higher Order Tracking Accuracy) metrics - Create trackers/eval/hota.py with compute_hota_metrics() and aggregate_hota_metrics() functions implementing HOTA algorithm - Add HOTAMetrics dataclass for storing HOTA results - Update SequenceResult and BenchmarkResult to support optional HOTA metrics - Integrate HOTA computation into evaluate_mot_sequence and evaluate_benchmark - Update CLI to support --metrics HOTA option - Add comprehensive unit tests for HOTA computation and aggregation HOTA evaluates tracking at multiple IoU thresholds (0.05-0.95) and computes: - Detection metrics: DetA, DetRe, DetPr - Association metrics: AssA, AssRe, AssPr - Combined HOTA = sqrt(DetA * AssA) - Localization accuracy: LocA * fix(pre_commit): 🎨 auto format pre-commit hooks * Add HOTA (Higher Order Tracking Accuracy) metrics - Create trackers/eval/hota.py with compute_hota_metrics() and aggregate_hota_metrics() functions implementing HOTA algorithm - Add HOTAMetrics dataclass for storing HOTA results - Update SequenceResult and BenchmarkResult to support optional HOTA metrics - Integrate HOTA computation into evaluate_mot_sequence and evaluate_benchmark - Update CLI to support --metrics HOTA option - Add comprehensive unit tests for HOTA computation and aggregation HOTA evaluates tracking at multiple IoU thresholds (0.05-0.95) and computes: - Detection metrics: DetA, DetRe, DetPr - Association metrics: AssA, AssRe, AssPr - Combined HOTA = sqrt(DetA * AssA) - Localization accuracy: LocA * fix(pre_commit): 🎨 auto format pre-commit hooks * Show all metrics by default in table output Remove the column limitation that was originally added as a workaround for Rich table truncation. Now using plain-text tables that don't truncate, so show all available metrics by default: - CLEAR-only: 17 metrics - HOTA+CLEAR: 28 metrics (11 HOTA + 17 CLEAR) Users can still limit columns via the columns parameter if desired. * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix HOTA aggregation TypeError with numpy arrays HOTAMetrics.to_dict() was converting numpy arrays to lists for JSON serialization, but aggregate_hota_metrics() needs numpy arrays for weighted averaging math. Added arrays_as_list parameter to to_dict() to control this behavior: - arrays_as_list=True (default): convert to lists for JSON - arrays_as_list=False: keep as numpy arrays for aggregation * Add HOTA verification to integration tests Update all 4 integration tests to: - Pass metrics=["CLEAR", "HOTA"] to evaluate_benchmark() - Verify HOTA metrics (HOTA, DetA, AssA, LocA) against TrackEval expected results This ensures numerical parity is verified for both CLEAR and HOTA metrics. * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix HOTA expected values in test data Update test data URLs to use regenerated zips with correct HOTA metrics. The previous expected_results.json files incorrectly used HOTA(0) (value at alpha=0.05) instead of the mean HOTA across all alpha thresholds. * Add Identity metrics (IDF1, IDR, IDP) implementation Implements Identity metrics following TrackEval's algorithm: - compute_identity_metrics() for single sequence evaluation - aggregate_identity_metrics() for benchmark aggregation - IdentityMetrics dataclass for structured results Updates evaluate_mot_sequence and evaluate_benchmark to support metrics=["Identity"] alongside CLEAR and HOTA. Integration tests now verify CLEAR, HOTA, and Identity metrics against TrackEval precomputed values. * Add Identity metrics support to CLI Update --metrics argument to accept Identity alongside CLEAR and HOTA. * code review pt1 * fix(pre_commit): 🎨 auto format pre-commit hooks * code review pt2 * Remove unused match_detections utility The match_detections function was not used by any metric internally. Each metric (CLEAR, HOTA, Identity) implements specialized matching logic that cannot be generalized into a shared utility. Deleted: - trackers/eval/matching.py - test/eval/test_matching.py * Add comprehensive evaluation documentation and API reference (TrackEval Part 8) * fix(pre_commit): 🎨 auto format pre-commit hooks * Refine evaluation docs and unify docstring style - Remove premature CLI and Python quickstart pages - Fix copy-code.js to handle empty continuation lines (>>>) - Remove broken links to cli.md from evaluate.md - Remove duplicate API sections from SORT/ByteTrack pages - Unify docstring style in results.py to match evaluate.py - Remove examples from results.py docstrings for consistency - Standardize attribute documentation format (no backticks on names) * Revamp documentation with Stripe-style formatting - Rewrite evaluate.md with concise intro, "What you'll learn" section, clean tabs for Python/CLI, and collapsible troubleshooting - Apply same style to install.md for consistency - Add full-width table CSS styling - Remove help.md page from navigation * fix(pre_commit): 🎨 auto format pre-commit hooks * Revamp documentation with Stripe-style formatting - Rewrite evaluate.md with concise intro, "What you'll learn" section, clean tabs for Python/CLI, and collapsible troubleshooting - Apply same style to install.md for consistency - Add full-width table CSS styling - Remove help.md page from navigation * Add comprehensive evaluation documentation and API reference (TrackEval Part 8) * fix(pre_commit): 🎨 auto format pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * bump version from `2.1.0` to `2.2.0rc0` * Enable mdformat and codespell pre-commit hooks (#227) * Add TrackEval-compatible evaluation metrics (CLEAR, HOTA, Identity) with SDK and CLI (#225) * Add evaluation module with box IoU/IoA calculations (TrackEval Part 1) (#210) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add Hungarian matching utility for detection assignment (TrackEval Part 2) (#211) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add CLEAR metrics module (MOTA, MOTP, IDSW, MT/PT/ML) (TrackEval Part 3) (#212) * Add box IoU/IoA calculation module from TrackEval - Add box_iou() for Intersection over Union calculation - Add box_ioa() for Intersection over Area calculation - Support both xyxy and xywh box formats - Include 32 unit tests covering edge cases and floating point precision - Adapted from TrackEval with MIT license attribution * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix ruff and mypy linting errors - Add S101 ignore for test files in pyproject.toml - Split error test cases into separate test functions - Remove type: ignore comments by simplifying type hints - Clean up unused imports * Add Hungarian matching utility for detection assignment - Add match_detections() using Jonker-Volgenant algorithm (scipy) - Maximize similarity with threshold filtering - Return matched/unmatched indices for GT and tracker detections - Include 17 unit tests covering edge cases and scipy consistency - Adapted from TrackEval matching patterns * fix(pre_commit): 🎨 auto format pre-commit hooks * Fix unused variable warnings in tests * Fix remaining unused variable warning * Add diverse test cases for match_detections - Off-diagonal matches (GT0->TR2, GT1->TR0, etc.) - Swapped/reversed matches - Sparse non-sequential matches - Very unbalanced sizes (1 GT vs 5 trackers, 5 GTs vs 1 tracker) - Only middle/corner elements matching - Threshold edge cases - Optimal vs greedy assignment tests * Remove redundant tests from test_matching.py * Add CLEAR metrics module for multi-object tracking evaluation Implement compute_clear_metrics function adapted from TrackEval with exact numerical parity. The function computes standard CLEAR metrics including MOTA, MOTP, IDSW, and track quality metrics (MT/PT/ML). Key implementation details: - Score matrix construction with IDSW prioritization (1000x bonus) - Hungarian matching with proper threshold filtering - ID switch detection based on previous tracker associations - MT/PT/ML thresholds (>80%, >=20%, <20%) - Fragmentation counting for track interruptions - Vectorized GT ID mapping using np.searchsorted Tests are fully parametrized and only test the public API. Reference: trackeval/metrics/clear.py:38-129 (eval_sequence method) * fix(pre_commit): 🎨 auto format pre-commit hooks…
1 parent 4cbf89d commit 5f05879

85 files changed

Lines changed: 13761 additions & 950 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ jobs:
1919
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020

2121
- name: 🐍 Install uv and set Python version ${{ inputs.python-version }}
22-
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
22+
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
2323
with:
2424
python-version: ${{ inputs.python-version }}
2525
activate-environment: true
2626

2727
- name: 🏗️ Build source and wheel distributions
2828
run: |
29-
uv pip install -r pyproject.toml --group build
29+
uv sync --frozen --group build
3030
uv build
3131
uv run twine check --strict dist/*
3232

.github/workflows/ci-build-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
fetch-depth: 0
2222

2323
- name: 🐍 Install uv and set Python
24-
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
24+
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
2525
with:
2626
python-version: "3.10"
2727
activate-environment: true
2828

2929
- name: 🏗️ Install dependencies
30-
run: uv pip install -r pyproject.toml --group docs
30+
run: uv sync --frozen --group docs
3131

3232
- name: 🧪 Test Docs Build
3333
run: uv run mkdocs build --verbose
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Integration Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'trackers/eval/**'
7+
- 'test/eval/**'
8+
- 'test/conftest.py'
9+
10+
jobs:
11+
integration-tests:
12+
name: TrackEval Parity Validation
13+
timeout-minutes: 15
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: 📥 Checkout the repository
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
20+
- name: 🐍 Install uv and set Python version
21+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
22+
with:
23+
python-version: "3.12"
24+
activate-environment: true
25+
26+
- name: 🚀 Install Packages
27+
run: uv sync --frozen --group dev
28+
29+
- name: 🧪 Run Integration Tests
30+
run: uv run pytest -m integration -v --tb=short

.github/workflows/ci-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121

2222
- name: 🐍 Install uv and set Python version ${{ matrix.python-version }}
23-
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
23+
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
activate-environment: true
2727
# TODO(https://github.com/astral-sh/setup-uv/issues/226): Remove this.
2828
prune-cache: ${{ matrix.os != 'windows-latest' }}
2929

3030
- name: 🚀 Install Packages
31-
run: uv pip install -r pyproject.toml --group dev
31+
run: uv sync --frozen --group dev
3232

3333
- name: 🧪 Run the Import test
3434
run: uv run python -c "import trackers"
@@ -37,7 +37,7 @@ jobs:
3737
shell: bash
3838
run: |
3939
if [ -d test ] && [ "$(find test -type f \( -name 'test_*.py' -o -name '*_test.py' \) | wc -l)" -gt 0 ]; then
40-
uv run pytest
40+
uv run pytest -m "not integration"
4141
else
4242
echo "No tests found. Skipping pytest."
4343
fi

.github/workflows/publish-docs.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ name: Docs/Build and Publish
22

33
on:
44
push:
5-
branches:
6-
- develop
5+
branches: [main, develop]
76
workflow_dispatch:
7+
inputs:
8+
ref:
9+
description: 'Branch or tag to deploy'
10+
required: false
11+
default: 'main'
812
release:
913
types: [published]
1014

1115
# Ensure only one concurrent deployment
1216
concurrency:
13-
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref}}
14-
cancel-in-progress: true
17+
group: ${{ github.workflow }}
18+
cancel-in-progress: false
1519

1620
# Restrict permissions by default
1721
permissions:
@@ -29,27 +33,37 @@ jobs:
2933
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3034
with:
3135
fetch-depth: 0
36+
ref: ${{ github.event.inputs.ref || github.ref }}
3237

3338
- name: 🐍 Install uv and set Python
34-
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
39+
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
3540
with:
3641
python-version: "3.10"
3742
activate-environment: true
3843

3944
- name: 🏗️ Install dependencies
40-
run: uv pip install -r pyproject.toml --group docs
45+
run: uv sync --frozen --group docs
4146

4247
- name: ⚙️ Configure git for github-actions
4348
run: |
4449
git config --global user.name "${{ github.actor }}"
4550
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
4651
4752
- name: 🚀 Deploy Development Docs
48-
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch'
53+
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop')
54+
env:
55+
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
56+
run: uv run mike deploy --push develop
57+
58+
- name: 🚀 Deploy Custom Ref Docs
59+
if: github.event_name == 'workflow_dispatch'
4960
env:
5061
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
5162
run: |
52-
uv run mike deploy --push develop
63+
REF_NAME="${{ github.event.inputs.ref }}"
64+
# If it's a full ref like refs/heads/branch or refs/tags/tag, extract the name
65+
CLEAN_REF=$(echo "$REF_NAME" | sed 's|^refs/[^/]*/||')
66+
uv run mike deploy --push $CLEAN_REF
5367
5468
- name: 🚀 Deploy Release Docs
5569
if: github.event_name == 'release' && github.event.action == 'published'
@@ -58,3 +72,4 @@ jobs:
5872
run: |
5973
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
6074
uv run mike deploy --push --update-aliases $latest_tag latest
75+
uv run mike set-default --push latest

.github/workflows/publish-pre-release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ name: Publish Trackers Pre-Releases to PyPI
33
on:
44
push:
55
tags:
6-
- "[0-9]+.[0-9]+[0-9]+.[0-9]+a[0-9]"
7-
- "[0-9]+.[0-9]+[0-9]+.[0-9]+b[0-9]"
8-
- "[0-9]+.[0-9]+[0-9]+.[0-9]+rc[0-9]"
6+
- "[0-9]+.[0-9]+.[0-9]+a[0-9]+"
7+
- "[0-9]+.[0-9]+.[0-9]+b[0-9]+"
8+
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
9+
- "[0-9]+.[0-9]+.[0-9]+.a[0-9]+"
10+
- "[0-9]+.[0-9]+.[0-9]+.b[0-9]+"
11+
- "[0-9]+.[0-9]+.[0-9]+.rc[0-9]+"
912
workflow_dispatch:
1013
pull_request:
1114
branches: [main, develop]

.github/workflows/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish Trackers Releases to PyPI
33
on:
44
push:
55
tags:
6-
- "[0-9]+.[0-9]+[0-9]+.[0-9]"
6+
- "[0-9]+.[0-9]+.[0-9]+"
77
workflow_dispatch:
88
pull_request:
99
branches: [main, develop]

.pre-commit-config.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,30 @@ repos:
2121
- id: mixed-line-ending
2222

2323
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.14.14
24+
rev: v0.15.1
2525
hooks:
2626
- id: ruff-check
2727
args: [--fix]
2828
- id: ruff-format
2929
types_or: [python, pyi, jupyter]
3030

31+
- repo: https://github.com/executablebooks/mdformat
32+
rev: 1.0.0
33+
hooks:
34+
- id: mdformat
35+
exclude: ^docs/reference/
36+
additional_dependencies:
37+
- "mdformat-mkdocs[recommended]>=2.1.0"
38+
- "mdformat-ruff"
39+
args: ["--number"]
40+
41+
- repo: https://github.com/codespell-project/codespell
42+
rev: v2.4.1
43+
hooks:
44+
- id: codespell
45+
additional_dependencies:
46+
- tomli
47+
3148
- repo: https://github.com/pre-commit/mirrors-mypy
3249
rev: 'v1.19.1'
3350
hooks:

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ community include:
2121
- Being respectful of differing opinions, viewpoints, and experiences
2222
- Giving and gracefully accepting constructive feedback
2323
- Accepting responsibility and apologizing to those affected by our mistakes,
24-
and learning from the experience
24+
and learning from the experience
2525
- Focusing on what is best not just for us as individuals, but for the overall
26-
community
26+
community
2727

2828
Examples of unacceptable behavior include:
2929

3030
- The use of sexualized language or imagery, and sexual attention or advances of
31-
any kind
31+
any kind
3232
- Trolling, insulting or derogatory comments, and personal or political attacks
3333
- Public or private harassment
3434
- Publishing others' private information, such as a physical or email address,
35-
without their explicit permission
35+
without their explicit permission
3636
- Other conduct which could reasonably be considered inappropriate in a
37-
professional setting
37+
professional setting
3838

3939
## Enforcement Responsibilities
4040

CONTRIBUTING.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,73 @@ Thank you for your interest in contributing to the Trackers library! Your help
55
## Table of Contents
66

77
1. [How to Contribute](#how-to-contribute)
8-
2. [CLA Signing](#cla-signing)
9-
3. [Clean Room Requirements](#clean-room-requirements)
10-
4. [Google-Style Docstrings and Type Hints](#google-style-docstrings-and-type-hints)
11-
5. [Reporting Bugs](#reporting-bugs)
12-
6. [License](#license)
8+
2. [Running Tests](#running-tests)
9+
3. [CLA Signing](#cla-signing)
10+
4. [Clean Room Requirements](#clean-room-requirements)
11+
5. [Google-Style Docstrings and Type Hints](#google-style-docstrings-and-type-hints)
12+
6. [Reporting Bugs](#reporting-bugs)
13+
7. [License](#license)
1314

1415
## How to Contribute
1516

1617
Contributions come in many forms: improving features, fixing bugs, suggesting ideas, improving documentation, or adding new tracking methods. Here’s a high-level overview to get you started:
1718

1819
1. [Fork the Repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo): Click the “Fork” button on our GitHub page to create your own copy.
20+
1921
2. [Clone Locally](https://docs.github.com/en/enterprise-server@3.11/repositories/creating-and-managing-repositories/cloning-a-repository): Download your fork to your local development environment.
22+
2023
3. [Create a Branch](https://docs.github.com/en/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop): Use a descriptive name to create a new branch:
2124

22-
```bash
23-
git checkout -b feature/your-descriptive-name
24-
```
25+
```bash
26+
git checkout -b feature/your-descriptive-name
27+
```
2528

2629
4. Develop Your Changes: Make your updates, ensuring your commit messages clearly describe your modifications.
30+
2731
5. [Commit and Push](https://docs.github.com/en/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop): Run:
2832

29-
```bash
30-
git add .
31-
git commit -m "A brief description of your changes"
32-
git push -u origin your-descriptive-name
33-
```
33+
```bash
34+
git add .
35+
git commit -m "A brief description of your changes"
36+
git push -u origin your-descriptive-name
37+
```
3438

3539
6. [Open a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request): Submit your pull request against the main development branch. Please detail your changes and link any related issues.
3640

3741
Before merging, check that all tests pass and that your changes adhere to our development and documentation standards.
3842

43+
## Running Tests
44+
45+
Install development dependencies:
46+
47+
```bash
48+
uv sync --group dev
49+
```
50+
51+
1. **Unit Tests**: Run the standard test suite:
52+
53+
```bash
54+
uv run pytest
55+
```
56+
57+
2. **Doctests**: Run only doctests from docstrings:
58+
59+
```bash
60+
uv run pytest --doctest-modules trackers/ --ignore=test/
61+
```
62+
63+
3. **Integration Tests**: Integration tests validate that our evaluation metrics match TrackEval's results on real MOT datasets. Run integration tests (requires downloading ~50MB of test data):
64+
65+
```bash
66+
uv run pytest -m integration
67+
```
68+
69+
4. **All Tests**: Run all tests including integration:
70+
71+
```bash
72+
uv run pytest -m ""
73+
```
74+
3975
## CLA Signing
4076
4177
In order to maintain the integrity of our project, every pull request must include a signed Contributor License Agreement (CLA). This confirms that your contributions are properly licensed under our Apache 2.0 License. After opening your pull request, simply add a comment stating:

0 commit comments

Comments
 (0)