Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
daea238
feat(reid): add roboflow-reid extra and numpy-only association glue
AlexBodner Jul 21, 2026
8d8faf7
feat(reid): wire BoT-SORT appearance association, CLI, docs, and tests
AlexBodner Jul 21, 2026
fbbe664
refactor(reid): L2-normalize FeatureBank EMA and vectorize row normalize
AlexBodner Jul 21, 2026
8297820
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 21, 2026
fa0d248
Add MOT17 BoT-SORT ± ReID benchmark notebook for reid package integra…
AlexBodner Jul 21, 2026
c8e18a4
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 21, 2026
ea2c16f
Fix CI for private roboflow-reid git dependency.
AlexBodner Jul 21, 2026
7e5e1af
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 21, 2026
de2d419
Keep roboflow-reid out of default dev sync in CI.
AlexBodner Jul 21, 2026
c76b864
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 21, 2026
c32edbc
docs: rewrite reid API page to match trackers style
AlexBodner Jul 21, 2026
86e57e1
docs: add ReID comparison table and tighten BoT-SORT ReID section
AlexBodner Jul 21, 2026
2980574
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 21, 2026
47001a1
Fix MOT17 ReID notebook side-by-side video render.
AlexBodner Jul 22, 2026
eaa023c
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 22, 2026
4a22cdf
ci: restore default install commands now that reid is optional-only
AlexBodner Jul 22, 2026
d69143e
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 22, 2026
8683b99
ci: install trackers[reid] in test and integration workflows
AlexBodner Jul 22, 2026
1351cd9
refactor(reid): drop _reid seam and merge BoT-SORT ReID tests
AlexBodner Jul 22, 2026
c6696a1
fix(botsort): exclude reid_model from CLI param reflection only
AlexBodner Jul 22, 2026
a17749a
docs(reid): cite BoT-SORT for FeatureBank L2/EMA policy
AlexBodner Jul 22, 2026
2f860c8
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 22, 2026
1d5b0b1
docs(reid): trim FeatureBank attribution prose
AlexBodner Jul 22, 2026
8d4e63b
test(reid): clarify BoT-SORT fusion and embedding extraction tests
AlexBodner Jul 22, 2026
116bd80
refactor(botsort): make proximity IoU optional in ReID fusion
AlexBodner Jul 22, 2026
f55a063
perf(botsort): reuse raw IoU for proximity when using standard IoU
AlexBodner Jul 22, 2026
ed74d88
refactor(botsort): drop always-on proximity IoU instance
AlexBodner Jul 22, 2026
14a6d09
refactor(botsort): consolidate ReID association path in tracker
AlexBodner Jul 22, 2026
9b9116b
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 22, 2026
36e4248
refactor(cli): single path for ReID validation and model load
AlexBodner Jul 22, 2026
2f46154
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 22, 2026
0ee51cb
fix(reid): pin standalone reid package and harden optional-extra CI
AlexBodner Jul 23, 2026
a2556cb
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 23, 2026
a7ebc45
refactor(reid): slim FeatureBank and ReID CLI wiring
AlexBodner Jul 23, 2026
68ee592
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 23, 2026
eba0916
docs(reid): cite BoT-SORT update_features on FeatureBank
AlexBodner Jul 23, 2026
275e56a
Update reid.md
AlexBodner Jul 27, 2026
6d47682
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 27, 2026
413f0ee
Update install.md
AlexBodner Jul 27, 2026
02b16b3
docs(reid): add MOT17 with/without ReID test and val scores
AlexBodner Jul 27, 2026
e7ada23
docs(reid): link Use with BoT-SORT to the reid training guide
AlexBodner Jul 28, 2026
ba32be8
docs(reid): add threshold guide with MOT17 and SoccerNet distance plots
AlexBodner Jul 28, 2026
50ee04a
Update reid.md
AlexBodner Jul 28, 2026
3fa5c46
docs(reid): add SoccerNet OSNet θ=0.1 vs θ=0.2 scores
AlexBodner Jul 28, 2026
859dd04
docs(reid): plot appearance distances as counts, not density
AlexBodner Jul 28, 2026
a4a68fe
docs(reid): restore probability-density appearance distance plots
AlexBodner Jul 28, 2026
b499f62
docs(reid): mark only the appearance thresholds used in the tables
AlexBodner Jul 28, 2026
6691325
docs(reid): use neutral colors for appearance threshold lines
AlexBodner Jul 28, 2026
7674438
docs(reid): plot appearance distances as fraction of samples per bin
AlexBodner Jul 28, 2026
dacd545
docs: resolve mkdocstrings from src/ for local API docs
AlexBodner Jul 28, 2026
b9108d8
docs(reid): split ReID guide out of the API reference page
AlexBodner Jul 28, 2026
1cfb91e
docs(reid): correct extra contents and align ReID pages with siblings
AlexBodner Jul 29, 2026
e6b3e38
docs(reid): describe appearance fusion as cost lowering, not rejection
AlexBodner Jul 29, 2026
fd17f03
docs(botsort): fix appearance_threshold docstring framing
AlexBodner Jul 29, 2026
bddbcb3
Add paper-style d_app fraction histogram to MOT17 ReID eval notebook.
AlexBodner Jul 29, 2026
d3d9821
Fix Colab install for private reid in eval_trackers_reid.
AlexBodner Jul 29, 2026
71b8cdb
Apply suggestions from code review
Borda Jul 29, 2026
74b29ca
deps(reid): pin trackers[reid] to PyPI 0.1.0.dev0
AlexBodner Jul 29, 2026
ed40597
notebooks: install reid from PyPI in MOT17 ReID eval Colab setup
AlexBodner Jul 29, 2026
ecfd066
docs(reid): refresh association-local appearance distance plots
AlexBodner Jul 29, 2026
e201135
chore(reid): retitle association package docstring
AlexBodner Jul 29, 2026
4983195
merge(develop): resolve conflicts for reid + McByte extras
AlexBodner Jul 29, 2026
ce1571c
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 29, 2026
491b988
fix(reid): clear pre-commit findings in ReID notebooks
AlexBodner Jul 29, 2026
b4392ce
fix(reid): clear pre-commit findings after develop merge
AlexBodner Jul 29, 2026
db59706
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 29, 2026
1adbc0e
fix(notebook): stabilize pretty-format-json for ReID eval notebook
AlexBodner Jul 29, 2026
518cd4b
Potential fix for pull request finding
AlexBodner Jul 30, 2026
e986ace
docs(reid): note frame= requirement for appearance association
AlexBodner Jul 30, 2026
1749b62
notebooks(reid): install trackers[reid] from PyPI in Colab setup
AlexBodner Jul 30, 2026
1b7c3bb
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jul 30, 2026
170e171
notebooks(reid): reshape How to Add ReID to Trackers tutorial
AlexBodner Jul 30, 2026
7467abe
fix(reid): sample appearance-distance pairs without sequence bias
AlexBodner Aug 10, 2026
d804121
docs(reid): explain what the ROC AUC panel measures
AlexBodner Aug 10, 2026
b84fff0
docs(reid): drop the tutorial notebook, it belongs in roboflow/notebooks
AlexBodner Aug 10, 2026
cc9fb24
docs(reid): simplify the frame-gap sweep figure
AlexBodner Aug 10, 2026
7e1d30a
docs(reid): say that separability is not the shaded overlap
AlexBodner Aug 10, 2026
66b12ec
docs(reid): say why separability is measured as ROC AUC
AlexBodner Aug 11, 2026
c708dfc
fix(reid): drop the repo-wide codespell exception for one docstring
AlexBodner Aug 13, 2026
46e2330
Merge remote-tracking branch 'origin/develop' into feat/core/reid-con…
AlexBodner Aug 13, 2026
e7422ee
refactor(reid): port the ReID CLI onto the jsonargparse track command
AlexBodner Aug 13, 2026
43b734e
Merge remote-tracking branch 'origin/develop' into feat/core/reid-con…
AlexBodner Aug 13, 2026
e5cd3e6
style(readme): apply mdformat wrapping to the merged feature list
AlexBodner Aug 13, 2026
1dc0127
test(reid): split the tracker-agnostic ReID tests out of the BoT-SORT…
AlexBodner Aug 13, 2026
29484bb
feat(reid): ship the appearance threshold-selection plots as library …
AlexBodner Aug 13, 2026
8153c87
docs(reid): add the ReID cookbook, rebuilt on the library helpers
AlexBodner Aug 13, 2026
2b85164
Merge branch 'develop' into feat/core/reid-consume-reid-package
Borda Aug 13, 2026
f2a0d4b
correctness: hoist frame validation, fix ZeroDivisionError, narrow ex…
Borda Aug 13, 2026
1230c3e
test-coverage: cover _load_reid_model raises, --source guard, unconfi…
Borda Aug 13, 2026
ed24227
perf: batch L2-normalize in ReID appearance path
Borda Aug 13, 2026
c4747c0
docs: fix unrunnable examples, cookbook offset, and ReID docstrings
Borda Aug 13, 2026
e10f75a
deps-decision: add scheduled CI job to catch breaking reid pre-releases
Borda Aug 13, 2026
abf56da
data-integrity: preserve non-int labels, fix pair-sampling bias, wide…
Borda Aug 13, 2026
c2669c3
feat(reid): extract MOT GT crop embeddings
AlexBodner Aug 13, 2026
4021677
api-design: root-export ReID API, rename threshold params, add ADR, w…
Borda Aug 13, 2026
f875466
Merge remote-tracking branch 'origin/feat/core/reid-consume-reid-pack…
AlexBodner Aug 13, 2026
be5b65d
fix(reid): correct extract_detection_embeddings doctest expected output
Borda Aug 14, 2026
4f20658
Merge branch 'feat/core/reid-consume-reid-package' of https://github.…
Borda Aug 14, 2026
a507ec5
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Aug 14, 2026
ec806b2
refactor(reid): move appearance fusion to core/reid
AlexBodner Aug 14, 2026
ab852da
refactor(reid): simplify appearance threshold sampling and metric
AlexBodner Aug 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
activate-environment: true

- name: 🚀 Install Packages
run: uv sync --frozen --group dev
run: uv sync --frozen --group dev --extra reid


- name: 🧪 Run Integration Tests
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ci-reid-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ReID Pre-release Compatibility

on:
schedule:
- cron: "17 6 * * 1"
workflow_dispatch:

permissions:
contents: read

jobs:
reid-integration-smoke:
name: ReID Integration Smoke
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: 🐍 Install uv and set Python version
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: "3.12"
activate-environment: true

- name: 🚀 Install Packages with the latest allowed reid pre-release
run: uv sync --group dev --extra reid --upgrade-package reid

- name: 🧪 Smoke-test the trackers to reid boundary
run: uv run pytest tests/core/test_botsort_reid.py::TestBoTSORTTrackerReID::test_real_reid_model_runs_over_frames -v --tb=short
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- **Benchmarked across four datasets.** MOT17, SportsMOT, SoccerNet, and DanceTrack — at default parameters and after hyperparameter tuning (McByte: defaults only, by design), so you know what to expect before you deploy.
- **Tunable with one extra.** Optuna-based hyperparameter search via `trackers tune` (`pip install "trackers[tune]"`) so you can optimize for your specific scene and detector.
- **Camera motion compensation.** BoT-SORT and McByte handle moving cameras natively, keeping track IDs stable even when the whole frame shifts.
- **Optional appearance ReID.** BoT-SORT can fuse visual embeddings with motion for harder association scenes: install `trackers[reid]` (pulls in the [`reid`](https://github.com/roboflow/re-ID) package), pass a `reid.ReIDModel` as `reid_model`, and supply `frame=` to `update()`.

## Install

Expand Down
33 changes: 33 additions & 0 deletions docs/adr/0001-model-backend-externalization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: 'ADR: Model-backend externalization: vendor vs external package'
description: Decision criteria for keeping model-backend integration in Trackers or consuming it from a separate package.
---

# Model-backend externalization: vendor vs external package

- Status: Accepted
- Date: 2026-08-14

## Context

Trackers needs learned-model backends without making them part of its core tracking API. The existing mask pipeline keeps its SAM and Cutie integration in `trackers.core.masks`: Trackers owns checkpoint discovery, preprocessing, inference lifecycle, and conversion to the mask protocols. The upstream model packages and weights remain optional dependencies; “vendor” here means owning the backend integration code, not copying upstream model source.

Appearance ReID has a different boundary. Trackers owns the `ReIDEncoder` protocol, feature bank, association helpers, and threshold-analysis tools. Model architectures, pretrained checkpoints, preprocessing, training, and gallery evaluation live in the standalone `reid` package, installed by the `reid` extra.

## Decision

Keep the ReID model backend in the external `reid` package. Trackers consumes it through the small `ReIDEncoder.extract_features(detections, frame)` contract and does not duplicate model-loading or model-catalog code.

Choose the ownership boundary for future learned backends using these criteria:

- Keep integration in Trackers when it is tightly coupled to tracker state or frame-to-frame lifecycle, and a small, stable set of backends implements a Trackers-owned protocol.
- Use an external package when model architectures, training, preprocessing, checkpoint catalogs, or release cadence form a substantial product surface independent of multi-object tracking.
- In both cases, import heavy optional dependencies lazily, expose a lightweight protocol from Trackers, and keep tracker behavior usable without the extra.
- Revisit an in-repo backend if its integration grows an independently useful model API; revisit an external backend if its boundary cannot express required tracker lifecycle semantics without leaking implementation details.

## Consequences

- `trackers` stays focused on tracking and association while `reid` can evolve models and training independently.
- Users install `trackers[reid]` for the supported ReID backend; custom encoders may implement `ReIDEncoder` without depending on that package.
- Compatibility is enforced at the protocol and optional-dependency version range, so cross-package changes require coordinated tests and releases.
- The masks and ReID layouts remain intentionally asymmetric: mask lifecycle adapters are Trackers-owned, while ReID model implementations are external.
75 changes: 75 additions & 0 deletions docs/api/reid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
description: Python API reference for the ReID encoder protocol, feature bank, appearance association utilities, and threshold-selection plots in Roboflow Trackers.
---

# ReID API

Requires the `reid` extra (`pip install "trackers[reid]"`, see the [install guide](../guides/install.md)).

This page covers the `ReIDEncoder` protocol, `FeatureBank`, appearance association helpers, and the threshold-selection plots in `trackers.core.reid`. For enabling appearance on BoT-SORT and for benchmark results, see the [ReID appearance guide](../guides/reid.md). Model loading and gallery evaluation are in the standalone [`reid`](https://github.com/roboflow/re-ID) package.

## ReIDEncoder

::: trackers.core.reid.encoder.ReIDEncoder

## FeatureBank

::: trackers.core.reid.feature_bank.FeatureBank

## appearance_similarity

::: trackers.core.reid.appearance.appearance_similarity

## extract_detection_embeddings

::: trackers.core.reid.appearance.extract_detection_embeddings

## Choosing a threshold

Measure your own encoder on your own footage instead of inheriting a threshold from a paper. These helpers embed a labeled dataset, sample the distances a tracker actually sees, plot them, and report separability. Plotting needs `matplotlib`, which ships with the `reid` extra.

Both plot functions take their reference lines as `ThresholdLines`, either a sequence of values or a mapping from value to annotation.

```python
from trackers.core.reid import (
extract_ground_truth_embeddings,
plot_appearance_distances,
plot_frame_gap_sweep,
sample_appearance_distances,
sweep_frame_gap,
)

embeddings, ids, frame_ids, sequence_ids = extract_ground_truth_embeddings(model, "mot17/val", keep_classes=(1,))
distances = sample_appearance_distances(embeddings, ids, frame_ids, sequence_ids)
same_id_rate, different_id_rate = distances.rates_at(0.25)
plot_appearance_distances(distances, thresholds={0.20: "selected", 0.25: "default"})
plot_frame_gap_sweep(sweep_frame_gap(embeddings, ids, frame_ids, sequence_ids))
```

### extract_ground_truth_embeddings

::: trackers.core.reid.appearance.extract_ground_truth_embeddings

### AppearanceDistances

::: trackers.core.reid.thresholds.AppearanceDistances

### sample_appearance_distances

::: trackers.core.reid.thresholds.sample_appearance_distances

### sweep_frame_gap

::: trackers.core.reid.thresholds.sweep_frame_gap

### roc_auc

::: trackers.core.reid.thresholds.roc_auc

### plot_appearance_distances

::: trackers.core.reid.thresholds.plot_appearance_distances

### plot_frame_gap_sweep

::: trackers.core.reid.thresholds.plot_frame_gap_sweep
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading