releasing 2.4.0#394
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Finalizes the trackers package release by promoting the project version from the 2.4.0.rc0 release candidate to the stable 2.4.0 in the packaging metadata.
Changes:
- Update
pyproject.tomlproject version to2.4.0for the stable release.
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.
v2.4.0: BoT-SORT & hyperparameter tuning
Summary
trackers 2.4.0 ships the fourth tracker — BoT-SORT, built around camera motion compensation (CMC) — alongside a first-class hyperparameter tuning workflow, a unified Kalman implementation shared by all trackers, and a
tracked_objectsproperty on every tracker that exposes alive tracks even through occlusions.All existing
tracker.update(detections)calls continue to work without changes. One true breaking change:SORTTracker.update()no longer assignstracker_idon the input object — read it from the returned value. Spawn order is now deterministic. See the Migration guide and Behaviour shifts below.Spotlights
BoT-SORT tracker
BoT-SORT is designed for footage where the camera itself moves — handheld, drone, sport. Camera motion compensation (CMC) is what makes BoT-SORT distinct: it estimates the inter-frame homography and corrects Kalman predictions before association, so stationary subjects stay stationary in track coordinates even when the camera pans. CMC is on by default (
enable_cmc=True); setenable_cmc=Falseonly when the camera is fixed, though at that point BoT-SORT reduces to a ByteTrack variant with a different Kalman state estimator. Four CMC backends:sparseOptFlow(default),orb,sift,ecc. (#386)MOT17 and SportsMOT use YOLOX detections. SoccerNet and DanceTrack use oracle (ground-truth) detections.
Note: Pass the raw video frame as the second argument to
BoTSORTTracker.update()when CMC is enabled (the default). Without it, CMC silently no-ops and Kalman predictions may diverge. Existing calls to SORT, ByteTrack, and OC-SORT withoutframeare unaffected.CLI:
trackers track --tracker botsort ...— discoverable automatically.Hyperparameter tuning
Each tracker now declares a
search_spaceClassVar.Tuneruses Optuna — a Bayesian hyperparameter optimisation framework — to sample from that space, runs the tracker over MOT sequences with pre-computed detections, evaluates with HOTA / MOTA / IDF1, and returns the best parameter set. (#301, #374)trackers tune --tracker bytetrack \ --gt-dir data/gt/ --detections-dir data/det/ \ --objective HOTA --n-trials 200tracked_objects— every confirmed track, including between detectionstracker.update(detections)returns only the tracks matched to a detection on the current frame. The newtracked_objectsproperty returns every confirmed track still alive in the buffer, including those not matched on this frame — subjects temporarily occluded or skipped by the detector. Boxes come from the Kalman state (get_state_bbox()), not from a detection, so position may drift slightly for unmatched tracks.Tracks stay in the result until
time_since_updateexceedslost_track_bufferframes (scaled byframe_rate). After that they are pruned and will not appear intracked_objects.confidenceandclass_idareNoneon this result —sv.LabelAnnotatorand other annotators that read those fields will raiseTypeErrorunless guarded. (#373)Migration guide
SORTTracker.update()no longer assignstracker_idon the input objectSORTTrackerpreviously wrotetracker_iddirectly onto the caller'ssv.Detectionsobject and returned that same instance. It now returns a fresh indexed copy — matching ByteTrack and OC-SORT. Code that readdetections.tracker_idafter callingtracker.update(detections)without using the return value will now getNone. (#360)Behaviour shifts
These changes affect reproducibility or numerical outputs but do not break correct usage of the public API.
Spawn order is now deterministic
Track IDs assigned to detections that spawn in the same frame are now sorted rather than dependent on CPython set iteration order — reproducible across machines and Python versions for the first time. One-time impact: re-record any raw ID baselines compared against v2.3.0. (#361)
Notable changes
🚀 Added
BoTSORTTracker) — camera-motion-aware tracker with CMC on by default (enable_cmc=True), configurable backends (sparseOptFlow,orb,sift,ecc), and three-stage score-fused association. (Feature: adding BoT-SORT tracker #386)tracked_objectsproperty onBaseTracker— returns every confirmed alive track (withinlost_track_buffer) with Kalman-predicted boxes, not just tracks matched on the current frame.confidenceandclass_idareNone; guard before using supervision annotators. (Return all alive tracks #373)Tunerclass (trackers.tune.Tuner) — Optuna-based hyperparameter optimisation with HOTA / MOTA / IDF1 objectives over MOT ground-truth and pre-computed detections. (AddTunerclass #301)trackers tuneCLI subcommand — wiresTunerinto the CLI. (Add tune cli #374)load_mot_fileis now public — exported fromtrackers.io.motfor custom evaluation and tuning scripts. (AddTunerclass #301, Add tune cli #374)frameparameter onBaseTracker.update()—update(detections, frame=None). Required by BoT-SORT with CMC enabled; SORT/ByteTrack/OC-SORT emitUserWarningifframeis provided but not used. (Feature: adding BoT-SORT tracker #386)BaseStateEstimator,XCYCWHStateEstimator,XCYCSRStateEstimator,XYXYStateEstimatorintrackers.utils.state_representations. (Feat/core/refactor tracklet kalman filter #310)search_spaceClassVar on every tracker — declarative hyperparameter spaces consumed byTuner. (AddTunerclass #301)TrackletProtocolstructural type — formalises the tracklet contract used byBaseTracker.tracks.SORTTracker.update()no longer assignstracker_idon the input object — previously wrotetracker_idonto the caller'ssv.Detectionsin-place; now returns a fresh indexed copy. Code readingdetections.tracker_idwithout using the return value will getNone. (Avoid input mutation in SortTracker.update #360)🌱 Changed
BaseStateEstimator. Tracklet classes handle association and lifecycle only. (Feat/core/refactor tracklet kalman filter #310)number_of_successful_consecutive_updatesinstead of totalnumber_of_updates, matching the original paper; public API and numerical outputs unchanged. (Feat/core/refactor tracklet kalman filter #310, fix(bytetrack): prune unmatched tracks after kalman refactor #376)__getattr__forevaluate_mot_sequenceto avoid circular imports.time_since_updatenow increments insidepredict()rather than via an explicittracklet.update(None)call. CustomOCSORTTrackletsubclasses that overrodeupdate()to handleNonedetections must move that logic intopredict(). (Removed dependency on tracklet.update(None) for all the trackers, handling it in predict #383)🔧 Fixed
time_since_updateadvances on unmatched tracks and_get_alive_trackletsrespectslost_track_buffer. (fix(bytetrack): prune unmatched tracks after kalman refactor #376)🏆 Contributors
This release is brought to you by five community contributors and the maintainer team.
Tunerclass,tuneCLI,tracked_objects, ByteTrack fix, type hintsAutomated contributions: @dependabot, @pre-commit-ci, @copilot-swe-agent
Full changelog: 2.3.0...2.4.0