Add How to Add ReID to Trackers notebook - #449
Conversation
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>
|
Check out this pull request on 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>
|
Fixed sample-frame viz: set |
|
Updated notebook links to official docs hosts ( |
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>
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>
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>
There was a problem hiding this comment.
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.mdto include the new notebook and update the notebook count. - Registered the notebook in
automation/notebooks-table-data.csvfor 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
_MOTOutputto write predictions. To avoid relying on privatetrackersinternals, write the MOTChallenge prediction file directly here. While touching this line, usingframe=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.
| "For threshold selection and MOT17 / SoccerNet results, see the\n", | ||
| "[ReID appearance guide](https://trackers.roboflow.com/latest/learn/reid/)." |
| "from pathlib import Path\n", | ||
| "\n", | ||
| "REPO_ROOT = Path(\"..\")\n", | ||
| "\n", | ||
| "VAL_SEQUENCES = [\n", |
| "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", |
| "!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" |
Summary
trackers[reid]and thereidpackageautomation/notebooks-table-data.csvand regenerates the tracker tutorials table inREADME.mdPR checklist
trackersships a release with the ReID extra (expectedtrackers[reid]==2.6.0or similar), switch the install cell from the git pin (feat/core/reid-consume-reid-package) to the PyPI extraTest plan
Docs / release checklist
reidpackage links currently point at GitHub (https://github.com/roboflow/re-ID); that is fine. Optionally switch training-guide links toreid.roboflow.comonce that docs site is live