Skip to content

v2.7.1: Faster SORT and ByteTrack, sturdier evaluation and I/O

Latest

Choose a tag to compare

@Borda Borda released this 27 Nov 07:02
642d6bf

v2.7.1 speeds up SORT and ByteTrack and fixes a batch of evaluation, tuning and file-loading bugs.

  • ByteTrack and SORT track faster: the Kalman update is batched, with identical IDs and boxes in contributor-run tests.
  • trackers eval now refuses ground truth with classes below 1 instead of silently dropping those rows.
  • Tuning accepts MOT-layout ground truth, and evaluation handles empty results files and seqmaps stored inside the ground-truth folder.
  • MOT and detection files with a UTF-8 BOM and images at non-ASCII Windows paths now load.
  • trackers --help now describes every command and option, and downloads verify before replacing your cache.

Your tracking code upgrades as is. If your ground truth has classes below 1, evaluation now raises an error (see Migration guide). The install also adds docstring-parser.

✨ Spotlights / highlights

SORT and ByteTrack batch the Kalman update

Matched tracks in each frame are now corrected in one stacked pass instead of one small update per track. Your code doesn't change. (#657)

from trackers import ByteTrackTracker

tracker = ByteTrackTracker()
tracked = tracker.update(detections)  # same call, less work per frame

It falls back to per-track update() for mixed estimator types, differing measurement models, or subclasses that override update. The contributor reports 30.7% more FPS for ByteTrack and 41.6% for SORT on the MOT17-val tracking stage, with identical IDs and boxes on 7,939 frames. We didn't re-run these numbers.

Evaluation refuses ground truth with classes below 1

MOT15-style files carry -1 in column 8, which the loader reads as the class. Those rows matched no scored class and were dropped silently, so a file of all -1 rows scored MOTA 0. Now evaluate_mot_sequence, evaluate_mot_sequences, trackers eval and Tuner.run() raise an error that names the file and the classes, and gives you a class_config to paste. To score those rows, name the class. (#661)

trackers eval \
    --gt gt.txt \
    --predictions predictions.txt \
    --class_config '{"scored_classes": [1, -1]}'

--help describes commands and options

track, eval, tune and download used to show Python function reprs, and dataclass options showed only a type and a default. They now read their descriptions from docstrings, which adds the runtime dependency docstring-parser>=0.17. (#670)

trackers --help
trackers track --help

🔄 Migration guide

No API removals or signature changes in this release. One evaluation change needs your attention when you upgrade from v2.7.0. If your ground-truth file has a class below 1 in a row not marked ignored, and your class_config doesn't name that class, evaluation now raises ValueError. Before, it dropped those rows without a warning. MOT15-style files with -1 in column 8 are the usual case. trackers tune has no class_config option, so there you need to fix the file. (#661)

Before, in v2.7.0, rows with class -1 were dropped without a warning:

trackers eval --gt gt.txt --predictions predictions.txt

After, in v2.7.1, name the class to score those rows alongside class 1:

trackers eval --gt gt.txt --predictions predictions.txt --class_config '{"scored_classes": [1, -1]}'

In Python, import MOTClassConfig from trackers.eval and pass class_config=MOTClassConfig(scored_classes=(1, -1)) to evaluate_mot_sequence or evaluate_mot_sequences.

📝 Notable changes

🌱 Changed

  • SORT and ByteTrack now batch the Kalman correction across matched tracklets, using new internal helpers (KalmanFilter.update_batch, BaseStateEstimator.update_batch, BaseTracklet.update_batch and BaseTracklet.mark_updated) that aren't part of the public API. (#657)
  • Runtime dependency pydeprecate now requires >=0.12.0 (was >=0.8.0), and McByte deprecation shims now pass message_template. (#676)

🔧 Fixed

  • Evaluation, tuning and re-ID:
    • evaluate_mot_sequence and evaluate_mot_sequences raise ValueError for ground-truth classes below 1 that class_config doesn't name, instead of dropping those rows. (#661)
    • Evaluation tables skip columns with no computed value and warn by name, instead of printing 0. (#660)
    • trackers eval scores a results file with no rows as a tracker that output nothing, instead of aborting the benchmark. An empty ground-truth file is still an error. (#659)
    • evaluate_mot_sequences(..., seqmap=...) resolves the layout from the selected sequences, so a seqmap stored inside gt_dir no longer forces the flat layout. (#668)
    • Tuner accepts MOT-layout ground truth ({seq}/gt/gt.txt) as well as flat {seq}.txt. (#563)
    • Tuner skips hidden files such as macOS ._MOT17-02.txt when discovering detection sequences without a seqmap. (#675)
    • extract_ground_truth_embeddings skips hidden directories when discovering sequences. (#654)
    • A results file holding only a UTF-8 byte order mark scores as a tracker that output nothing instead of raising No valid data found, and a seqmap that starts with a byte order mark keeps its first sequence name. (#678)
    • Tuner no longer parses a seqmap stored in gt_dir as ground truth, keeps the sequences and ground-truth paths it validated at construction even if the seqmap is edited mid-study, and reads a BOM seqmap correctly. (#678)
  • Motion and annotators:
    • CMC keeps XYXYStateEstimator velocities with their corners, so a shrinking box is no longer predicted as growing after a CMC step in BoT-SORT, McByte and OC-SORT when they use XYXYStateEstimator. (#662)
    • CMC moves the XYXYStateEstimator covariance together with the corners after a reflection or an inverted box, so variances stay on the edge they describe. Rotation and shear still leave the covariance unchanged. (#678)
    • MotionAwareTraceAnnotator preserves offscreen trajectory segments instead of drawing shortcuts across them. (#667)
  • CLI and I/O:
    • trackers --help describes commands and options from their docstrings. (#670)
    • Image-folder sources, MOT img1 frames and trackers inspect read and write images at non-ASCII paths on Windows. Video files aren't covered yet. (#669)
    • MOT and detection files saved with a UTF-8 byte order mark load. (#656)
    • Downloads stage into their own temporary directory, verify the MD5 and replace the destination atomically. Concurrent downloads no longer share a .tmp path, and a failed download no longer deletes a cached file first. (#674)
  • Docs site: corrected JSON-LD structured data. Docs-only, no package change. (#584)
  • Docs: corrected the tuning, McByte, C-BIoU iou_variant, trackers eval default metric and evaluation-table claims to match current behavior. Docs-only, no package change. (#678)

🏆 Contributors

  • Ryn Wang (@rynwang) — batched the Kalman correction across matched tracklets in SORT and ByteTrack for faster tracking.
  • Vlad Voropaev (@voropaevv, LinkedIn) — safer verified downloads, seqmap-aware MOT layout detection in evaluation, and offscreen trajectory segments in the trace annotator.
  • Barsam Ershadi (@BarsamErshadi, LinkedIn) — CMC XYXY velocity fix, rejection of ground-truth classes below 1, and skipping evaluation table columns with no value.
  • NIKHIL (@Nikhi00718, LinkedIn) — CLI --help text from docstrings, and scoring empty results files in trackers eval.
  • Alexander Bodner (@AlexBodner, LinkedIn) — MOT-layout ground truth in the Tuner, and docs-site JSON-LD structured-data fixes.
  • Yusef Syed (@YusefSyed, LinkedIn) — Tuner skips hidden files when discovering detection sequences.
  • Maidul Hasan Masum (@mh-masum6875, LinkedIn) — image read/write at non-ASCII paths on Windows.
  • Jyotishman Das (@rishi02102017, LinkedIn) — loading MOT and detection files saved with a UTF-8 BOM.
  • Mohith Gajjela (@Mohith26, LinkedIn) — Re-ID ground-truth discovery skips hidden directories.
  • Tarun (@TarunSinghChauhan, LinkedIn) — docstrings for SAMAsset.
  • Jirka Borovec (@Borda, LinkedIn) — maintainer: release preparation, changelog and repository housekeeping.

Automated contributions: dependabot, pre-commit-ci, Claude, Copilot and Codex assisted with dependency bumps, formatting, and code review/co-authoring.


Full changelog: 2.7.0...2.7.1

Drafted by /oss:release, an AI skill in AI Rig. If it saved you time, a ⭐ helps others find it.

What's Changed

  • ⬆️ bump the uv-lock group with 6 updates by @dependabot[bot] in #665
  • fix(reid): skip hidden directories when discovering ground-truth sequences by @Mohith26 in #654
  • ⬆️ bump the uv-lock group with 4 updates by @dependabot[bot] in #671
  • ⬆️ bump the uv-lock group with 4 updates by @dependabot[bot] in #676
  • fix(tune): accept MOT-layout ground truth in Tuner validation by @AlexBodner in #563
  • fix(docs): correct structured-data defects in JSON-LD output by @AlexBodner in #584
  • fix(io): read MOT and detection files saved with a UTF-8 BOM by @rishi02102017 in #656
  • fix(eval): score a results file with no rows instead of aborting by @Nikhi00718 in #659
  • fix(eval): reject table columns that have no computed value by @BarsamErshadi in #660
  • fix(eval): reject ground-truth classes below 1 instead of dropping the rows by @BarsamErshadi in #661
  • fix(cmc): keep XYXY velocities with their corners by @BarsamErshadi in #662
  • fix(annotators): preserve offscreen trajectory segments by @voropaevv in #667
  • fix(eval): resolve MOT layout from selected seqmap entries by @voropaevv in #668
  • fix(io): read and write images at non-ASCII paths on Windows by @mh-masum6875 in #669
  • fix(cli): describe commands and options in --help from their docstrings by @Nikhi00718 in #670
  • docs(masks): add docstrings to SAMAsset by @TarunSinghChauhan in #673
  • fix(download): isolate and verify temporary payloads by @voropaevv in #674
  • fix(tune): skip hidden files when discovering detection sequences by @YusefSyed in #675
  • perf(core): batch the Kalman update across matched tracklets by @rynwang in #657
  • fix: resolve pre-release audit findings by @Borda in #678
  • releasing 2.7.1 by @Borda in #679

New Contributors

Full Changelog: 2.7.0...2.7.1