Skip to content

Add How to Add ReID to Trackers notebook - #449

Open
AlexBodner wants to merge 7 commits into
roboflow:mainfrom
AlexBodner:feat/how-to-add-reid-to-trackers
Open

Add How to Add ReID to Trackers notebook#449
AlexBodner wants to merge 7 commits into
roboflow:mainfrom
AlexBodner:feat/how-to-add-reid-to-trackers

Conversation

@AlexBodner

@AlexBodner AlexBodner commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • Adds a Colab-ready tutorial for enabling appearance ReID on BoT-SORT via trackers[reid] and the reid package
  • Runs BoT-SORT + ReID on MOT17 val-half (YOLOX dets), shows appearance-distance diagnostics, and compares scores to paper / study references
  • Registers the notebook in automation/notebooks-table-data.csv and regenerates the tracker tutorials table in README.md

PR checklist

  • After trackers ships a release with the ReID extra (expected trackers[reid]==2.6.0 or similar), switch the install cell from the git pin (feat/core/reid-consume-reid-package) to the PyPI extra

Test plan

  • Open notebook in Colab / local Jupyter
  • Install + download cells succeed
  • BoT-SORT + ReID run completes on MOT17 val
  • README tracker tutorials count shows 4 notebooks and links resolve

Docs / release checklist

  • Note: https://trackers.roboflow.com/latest/learn/reid/ does not exist yet (404). Ship the trackers docs deploy (from the ReID trackers PR) so that page resolves, then re-check the notebook "ReID appearance guide" links
  • reid package links currently point at GitHub (https://github.com/roboflow/re-ID); that is fine. Optionally switch training-guide links to reid.roboflow.com once that docs site is live
  • Re-check notebook links after docs are live and update paths if the final URL scheme differs

AlexBodner and others added 2 commits July 30, 2026 10:49
Port the MOT17 BoT-SORT appearance-ReID tutorial from roboflow/trackers as a
starting point for the Roboflow notebooks collection.

Co-authored-by: Cursor <cursoragent@cursor.com>
Focus the tutorial on BoT-SORT + ReID usage, trim helper/histogram code, and add the notebook to the tracker tutorials table.

Co-authored-by: Cursor <cursoragent@cursor.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

BoxAnnotator/LabelAnnotator default to class colors, but MOT preds have no class_id.

Co-authored-by: Cursor <cursoragent@cursor.com>
@AlexBodner

Copy link
Copy Markdown
Author

Fixed sample-frame viz: set color_lookup=sv.ColorLookup.TRACK on BoxAnnotator/LabelAnnotator (preds have tracker_id, not class_id).

@AlexBodner

Copy link
Copy Markdown
Author

Updated notebook links to official docs hosts (trackers.roboflow.com/latest/learn/reid/, reid.roboflow.com/latest/, training guide). Added a PR checklist to release/publish those docs and re-verify URLs if paths change.

AlexBodner and others added 2 commits July 30, 2026 13:35
Use trackers.roboflow.com and reid.roboflow.com instead of GitHub blob paths where docs exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the trackers ReID appearance guide URL as the intended docs path; package and training refs can use the re-ID repo until docs sites are fully live.

Co-authored-by: Cursor <cursoragent@cursor.com>
AlexBodner added a commit to AlexBodner/notebooks that referenced this pull request Jul 30, 2026
Point the closing link at PR roboflow#449 instead of a main-branch Colab URL that is not published yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
AlexBodner and others added 2 commits July 30, 2026 14:14
0.25 is the BoT-SORT / trackers default appearance threshold; keep paper references for the published MOT tables only.

Co-authored-by: Cursor <cursoragent@cursor.com>
0.25 is the BoT-SORT / trackers default appearance threshold; keep paper references for the published MOT tables only.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new tracker-focused tutorial notebook showing how to enable and evaluate appearance ReID with BoT-SORT via the trackers[reid] extra, and registers it in the repo’s notebook listings.

Changes:

  • Added a new Colab-oriented notebook: “How to Add ReID to Trackers” (BoT-SORT + ReID on MOT17 val-half, plus appearance-distance diagnostics).
  • Updated the tracker tutorials section in README.md to include the new notebook and update the notebook count.
  • Registered the notebook in automation/notebooks-table-data.csv for automated table generation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
README.md Updates the tracker tutorials table/count and adds the new notebook link.
notebooks/how-to-add-reid-to-trackers.ipynb New end-to-end tutorial notebook for BoT-SORT + ReID, evaluation, and diagnostics.
automation/notebooks-table-data.csv Adds a new row so the notebook is included in generated tables.
Comments suppressed due to low confidence (2)

notebooks/how-to-add-reid-to-trackers.ipynb:670

  • This outro also links to https://trackers.roboflow.com/latest/learn/reid/ (noted in the PR description as currently 404). Consider removing the link or marking it as coming soon until the docs deploy is live.
                "Ready to go deeper? Explore the [ReID appearance guide](https://trackers.roboflow.com/latest/learn/reid/),\n",

notebooks/how-to-add-reid-to-trackers.ipynb:353

  • This block depends on _MOTOutput to write predictions. To avoid relying on private trackers internals, write the MOTChallenge prediction file directly here. While touching this line, using frame=frame (keyword) matches the notebook text and is more resilient to signature changes than a positional argument.
                "    with _MOTOutput(pred_dir / f\"{seq}.txt\") as out:\n",
                "        for frame_idx in range(1, spec[\"n_frames\"] + 1):\n",
                "            frame = cv2.imread(str(images[frame_idx - 1]))\n",
                "            tracked = tracker.update(dets.get(frame_idx, sv.Detections.empty()), frame)\n",
                "            if tracked.tracker_id is not None:\n",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +18
"For threshold selection and MOT17 / SoccerNet results, see the\n",
"[ReID appearance guide](https://trackers.roboflow.com/latest/learn/reid/)."
Comment on lines +156 to +160
"from pathlib import Path\n",
"\n",
"REPO_ROOT = Path(\"..\")\n",
"\n",
"VAL_SEQUENCES = [\n",
Comment on lines +272 to +276
"from trackers import BoTSORTTracker\n",
"from trackers.eval import evaluate_mot_sequences\n",
"from trackers.io.frames import load_mot_frame_image\n",
"from trackers.io.mot import _MOTOutput, load_mot_file\n",
"\n",
Comment on lines +111 to +112
"!pip install -q matplotlib gdown\n",
"!pip install -q \"trackers[reid] @ git+https://github.com/roboflow/trackers.git@feat/core/reid-consume-reid-package\"\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants