Feat/core/CBioU tracker#417
Conversation
- New `CBIoUTracker` subclass of `BoTSORTTracker` registered as "cbiou" - CMC permanently disabled; `buffer_ratio` elevated as first-class param - `update()` emits UserWarning when frame is passed (CMC off) - `search_space` covers all tunable params + buffer_ratio [0.0, 0.5] - 13 dedicated tests in tests/core/test_cbiou_tracker.py - `IOC_TRACKER_IDS` in shared_ids.py excludes CBIoU from iou= injection test - Exported from top-level trackers package Co-authored-by: Cursor <cursoragent@cursor.com>
Plans are working documents and should not be tracked in the repository. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Adds a new CBIoU tracker as a BoT-SORT-derived tracker that disables CMC and uses Buffered IoU for association, then exposes it through the package API and shared tracker test coverage.
Changes:
- Adds
CBIoUTrackerimplementation and package entry point. - Exports CBIoU from
trackers. - Extends tracker registration/shared behavior tests and adds CBIoU-specific tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/trackers/core/cbiou/tracker.py |
Implements the CBIoU tracker wrapper around BoT-SORT with BIoU and CMC disabled. |
src/trackers/core/cbiou/__init__.py |
Adds the new CBIoU package. |
src/trackers/__init__.py |
Exposes CBIoUTracker from the top-level package. |
tests/core/shared_ids.py |
Adds cbiou to shared tracker IDs and separates IoU-configurable trackers. |
tests/core/test_trackers.py |
Excludes CBIoU from the configurable-IoU test. |
tests/core/test_registration.py |
Includes CBIoU in registration/search-space coverage. |
tests/core/test_cbiou_tracker.py |
Adds CBIoU-specific construction, warning, association, and search-space tests. |
…/trackers into feat/core/cbiou-tracker
|
Let's mark as resolved the comment which you already addressed, so we know what is left |
…/trackers into feat/core/cbiou-tracker
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (2)
docs/trackers/comparison.md:187
- The comparison page lists
enable_cmc: falseunder the C-BIoU configuration, but CBIoUTracker.init does not accept an enable_cmc parameter (CMC is always disabled internally). Remove this key from the example config (or reword it as a note) to avoid suggesting an invalid constructor argument.
high_conf_det_threshold: 0.6
track_activation_threshold: 0.7
buffer_ratio_first: 0.3
buffer_ratio_second: 0.5
enable_cmc: false
docs/trackers/comparison.md:367
- The comparison page lists
enable_cmc: falseunder the C-BIoU configuration, but CBIoUTracker.init does not accept an enable_cmc parameter (CMC is always disabled internally). Remove this key from the example config (or reword it as a note) to avoid suggesting an invalid constructor argument.
high_conf_det_threshold: 0.36
track_activation_threshold: 0.83
buffer_ratio_first: 0.23
buffer_ratio_second: 0.33
enable_cmc: false
|
|
||
| C-BIoU keeps the [ByteTrack](bytetrack.md)-style association pipeline used in [BoT-SORT](botsort.md) but replaces plain IoU with **cascaded Buffered IoU** at each association step. | ||
|
|
||
| **First association (b1).** High-confidence detections are matched to confirmed and lost tracks using BIoU with `buffer_ratio_first` (paper **b1**, small buffer). Costs are fused with detection confidence. |
There was a problem hiding this comment.
If you say "paper b1" here, you might provide the link to the reference section below: ## Reference
Same for "paper b2" below.
There was a problem hiding this comment.
do we have to provide the reference every time we mention it?
| self.iou_first = BIoU(buffer_ratio=buffer_ratio_first) | ||
| self.iou_second = BIoU(buffer_ratio=buffer_ratio_second) | ||
| self.buffer_ratio_first = buffer_ratio_first | ||
| self.buffer_ratio_second = buffer_ratio_second |
There was a problem hiding this comment.
Should we consider some warning for the user if ultimately self.buffer_ratio_first becomes higher or equal to self.buffer_ratio_second?
There was a problem hiding this comment.
dont think so, it is just recommended by paper authors, but like you pointed over Slack, if it works better or the user sees fit using a higher threshold first should be fine
| class TestCBIoUAssociationTolerance: | ||
| """BIoU should associate near-miss detections that plain IoU would miss.""" | ||
|
|
||
| def test_near_miss_associated_with_buffer(self) -> None: |
There was a problem hiding this comment.
Nice test to demonstrate, but it actually safe? And not too number/case-specific?
There was a problem hiding this comment.
it is very specific, but it tests what we want right? what seems off to you?
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
[resolve R3] /review finding by foundry:perf-optimizer (report: .reports/review/2026-06-09T13-31-20Z/review-report.md): - `import supervision as sv` was inside BIoU._compute() and IoU._compute() — called 2-3x per frame in the hot association path; moved to module top --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve #40/#41] @Copilot (gh): - CBIoUTracker forces enable_cmc=False internally; key misleads users into thinking it is a valid config parameter - Removed from MOT17/DanceTrack block (line 101) and SportsMOT block (line 187) --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve R1] /review finding by foundry:doc-scribe (report: .reports/review/2026-06-09T13-31-20Z/review-report.md): - SoccerNet tuned config ships b1=0.68 > b2=0.50, contradicting the b1 < b2 warning in cbiou.md - Added admonition callout explaining the empirical exception rather than removing the tuned result --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve R2] /review finding by foundry:sw-engineer (report: .reports/review/2026-06-09T13-31-20Z/review-report.md): - Added class-level Note and updated update() Returns section to document that unmatched low-confidence detections appear with tracker_id=-1 - Added TestCBIoUUnmatchedLowConfidence.test_unmatched_low_conf_detection_has_minus_one_tracker_id exercising the undocumented path --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve #17] @tstanczyk95 (gh): - 'paper b1' and 'paper b2' in the How it works section now link to ## Reference anchor --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve #23] @tstanczyk95 (gh): - 'similar appearances' → 'fast or irregular motion' (more precise use-case framing) - 'It is strongest on' → 'it leads on'; 'reaches the highest' → 'achieves the highest' [resolve #25] @tstanczyk95 (gh): tracker.py:24 is the paper title — kept verbatim as citation --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve #26] @tstanczyk95 (gh): buffer_ratio_second bullet now names the track set ('remaining confirmed tracks') for clarity [resolve S2] /review finding by foundry:doc-scribe (report: .reports/review/2026-06-09T13-31-20Z/review-report.md): added Example: section to class docstring (project convention) [resolve S3] /review finding by foundry:doc-scribe (report: .reports/review/2026-06-09T13-31-20Z/review-report.md): added Raises: section documenting ValueError from BIoU.__init__ for negative buffer_ratio --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
[resolve S1] /review finding by foundry:doc-scribe (report: .reports/review/2026-06-09T13-31-20Z/review-report.md): - 'irregualar' → 'irregular' in YAML description field --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
CBIoUTracker (added in roboflow#417) still called the removed BoTSORTTracklet.get_next_tracker_id() classmethod at three sites in update() — breaking all 12 CI matrix runs with AttributeError since PR roboflow#419 deleted that classmethod. Replace all three with self._allocate_tracker_id(), which is already available via BoTSORTTracker -> BaseTracker inheritance. --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
- Stamp CHANGELOG [Unreleased] → [2.5.0] — 2026-06-22; add missing entries: CBIoUTracker (#417), py.typed, Tuner params (#427), HOTA eval fixes (#462, #466) - Bump version 2.4.0 → 2.5.0 in pyproject.toml - Add C-BIoU row to README algorithms table and intro text (MOT17=63.0, SportsMOT=73.1, SoccerNet=82.6, DanceTrack=56.7) --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
What does this PR do?
Adding CBIoU tracker as wrapper of IoU variants BIoU and BoTsort without cmc (which would be original bytetrack).
Still missing the metrics
Type of Change
Testing
Test details:
Checklist
Additional Context