Skip to content

Commit 106ce70

Browse files
add sfsort tracker (#2225)
1 parent e59dac3 commit 106ce70

File tree

14 files changed

+540
-19
lines changed

14 files changed

+540
-19
lines changed

.github/workflows/benchmark.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest]
2222
python-version: ['3.12']
23-
tracker: ["ocsort", "bytetrack", "botsort", "deepocsort", "hybridsort", "strongsort", "boosttrack"]
23+
tracker: ["ocsort", "bytetrack", "botsort", "deepocsort", "hybridsort", "strongsort", "boosttrack", "sfsort"]
2424
timeout-minutes: 50
2525

2626
steps:
@@ -84,12 +84,13 @@ jobs:
8484
else
8585
declare -A tracker_fps
8686
tracker_fps["deepocsort"]=12
87-
tracker_fps["bytetrack"]=1265
88-
tracker_fps["ocsort"]=1483
89-
tracker_fps["strongsort"]=17
90-
tracker_fps["botsort"]=46
87+
tracker_fps["bytetrack"]=720
88+
tracker_fps["ocsort"]=890
89+
tracker_fps["strongsort"]=11
90+
tracker_fps["botsort"]=12
9191
tracker_fps["hybridsort"]=25
92-
tracker_fps["boosttrack"]=25
92+
tracker_fps["boosttrack"]=13
93+
tracker_fps["sfsort"]="6000"
9394
fps=${tracker_fps[$TRACKER_NAME]}
9495
fi
9596
@@ -154,6 +155,7 @@ jobs:
154155
paper_links["strongsort"]="https://arxiv.org/abs/2202.13514"
155156
paper_links["botsort"]="https://arxiv.org/abs/2206.14651"
156157
paper_links["hybridsort"]="https://arxiv.org/abs/2308.00783"
158+
paper_links["sfsort"]="https://arxiv.org/pdf/2404.07553"
157159
158160
new_table="| Tracker | Status | HOTA↑ | MOTA↑ | IDF1↑ | FPS |\n"
159161
new_table+="| :-----: | :-----: | :---: | :---: | :---: | :---: |\n"

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
os: [ubuntu-latest, macos-14] # skip windows-latest for
2525
python-version: ['3.12']
2626
env:
27-
TRACKERS: "ocsort bytetrack botsort deepocsort strongsort boosttrack hybridsort"
27+
TRACKERS: "ocsort bytetrack botsort deepocsort strongsort boosttrack hybridsort sfsort"
2828
IMG: ./assets/MOT17-mini/train/MOT17-02-FRCNN/img1/000001.jpg
2929

3030
# Timeout: https://stackoverflow.com/a/59076067/4521646
@@ -89,7 +89,7 @@ jobs:
8989
outputs:
9090
status: ${{ job.status }}
9191
env:
92-
TRACKERS: "ocsort bytetrack botsort deepocsort strongsort boosttrack hybridsort"
92+
TRACKERS: "ocsort bytetrack botsort deepocsort strongsort boosttrack hybridsort sfsort"
9393

9494
# Timeout: https://stackoverflow.com/a/59076067/4521646
9595
timeout-minutes: 50

AGENTS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,31 @@ Sometimes the provided environment is missing GPUs, large datasets, or external
186186
- Where practical:
187187
- Use deterministic or seeded behavior for tests/examples.
188188
- Avoid unnecessary heavy computation in unit tests.
189+
190+
## 9. Integrating a New Tracker (Checklist)
191+
192+
1) Implement the tracker
193+
- Add a new module under `boxmot/trackers/<name>/` (e.g., `sfsort.py`).
194+
- Implement a tracker class that subclasses `BaseTracker` and defines `update()`.
195+
196+
2) Register the tracker
197+
- Add the tracker to `TRACKER_MAPPING` in `boxmot/trackers/tracker_zoo.py`.
198+
- Export it in `boxmot/trackers/__init__.py` and `boxmot/__init__.py`.
199+
- Add the tracker name to the `TRACKERS` list in `boxmot/__init__.py`.
200+
201+
3) Add default configuration
202+
- Create `boxmot/configs/trackers/<name>.yaml` with default parameters and tuning ranges.
203+
204+
4) Update docs
205+
- Add a tracker doc page in `docs/trackers/<name>.md`.
206+
- Add the tracker to `mkdocs.yml` nav.
207+
- Mention it in `docs/index.md` and `README.md` where trackers are listed.
208+
209+
5) Update tests
210+
- Register the tracker in `tests/test_config.py` lists so it’s covered by unit tests.
211+
212+
6) Update CI/benchmarks
213+
- Add the tracker name to workflow matrices/lists in `.github/workflows/`.
214+
215+
7) Commit new files
216+
- Ensure new tracker code, config, and docs are staged and pushed.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
| [bytetrack](https://arxiv.org/abs/2110.06864) || 67.68 | 78.039 | 79.157 | 1265 |
5757
| [hybridsort](https://arxiv.org/abs/2308.00783) || 67.39 | 74.127 | 79.105 | 25 |
5858
| [ocsort](https://arxiv.org/abs/2203.14360) || 66.441 | 74.548 | 77.899 | 1483 |
59+
| sfsort ||||||
5960

6061
<!-- END TRACKER TABLE -->
6162

@@ -87,7 +88,7 @@ Where:
8788
MODE (required) one of [track, eval, tune, generate, export]
8889
DETECTOR (optional) YOLO model like yolov8n, yolov9c, yolo11m, yolox_x
8990
REID (optional) ReID model like osnet_x0_25_msmt17, mobilenetv2_x1_4
90-
TRACKER (optional) one of [deepocsort, botsort, bytetrack, strongsort, ocsort, hybridsort, boosttrack]
91+
TRACKER (optional) one of [deepocsort, botsort, bytetrack, strongsort, ocsort, hybridsort, boosttrack, sfsort]
9192
ARGS (optional) 'arg=value' pairs that override defaults
9293
```
9394

@@ -212,6 +213,7 @@ boxmot track yolov8n osnet_x0_25_msmt17 bytetrack
212213
boxmot track yolov8n osnet_x0_25_msmt17 botsort
213214
boxmot track yolov8n osnet_x0_25_msmt17 boosttrack
214215
boxmot track yolov8n osnet_x0_25_msmt17 hybridsort
216+
boxmot track yolov8n osnet_x0_25_msmt17 sfsort
215217
```
216218

217219
</details>

boxmot/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from boxmot.trackers.deepocsort.deepocsort import DeepOcSort
1111
from boxmot.trackers.hybridsort.hybridsort import HybridSort
1212
from boxmot.trackers.ocsort.ocsort import OcSort
13+
from boxmot.trackers.sfsort.sfsort import SFSORT
1314
from boxmot.trackers.strongsort.strongsort import StrongSort
1415
from boxmot.trackers.tracker_zoo import create_tracker, get_tracker_config
1516

@@ -21,6 +22,7 @@
2122
"deepocsort",
2223
"hybridsort",
2324
"boosttrack",
25+
"sfsort",
2426
]
2527

2628
__all__ = (
@@ -32,6 +34,7 @@
3234
"DeepOcSort",
3335
"HybridSort",
3436
"BoostTrack",
37+
"SFSORT",
3538
"create_tracker",
3639
"get_tracker_config",
3740
"gsi",
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
high_th:
2+
type: uniform
3+
default: 0.6
4+
range: [0.4, 0.9]
5+
6+
match_th_first:
7+
type: uniform
8+
default: 0.67
9+
range: [0.4, 0.67]
10+
11+
new_track_th:
12+
type: uniform
13+
default: 0.7
14+
range: [0.6, 0.95]
15+
16+
low_th:
17+
type: uniform
18+
default: 0.1
19+
range: [0.05, 0.4]
20+
21+
match_th_second:
22+
type: uniform
23+
default: 0.3
24+
range: [0.1, 0.6]
25+
26+
dynamic_tuning:
27+
type: choice
28+
default: false
29+
options: [true, false]
30+
31+
cth:
32+
type: uniform
33+
default: 0.5
34+
range: [0.2, 0.8]
35+
36+
high_th_m:
37+
type: uniform
38+
default: 0.0
39+
range: [0.02, 0.1]
40+
41+
new_track_th_m:
42+
type: uniform
43+
default: 0.0
44+
range: [0.02, 0.08]
45+
46+
match_th_first_m:
47+
type: uniform
48+
default: 0.0
49+
range: [0.02, 0.08]
50+
51+
marginal_timeout:
52+
type: qrandint
53+
default: 0
54+
range: [0, 501, 50]
55+
56+
central_timeout:
57+
type: qrandint
58+
default: 0
59+
range: [0, 1001, 100]
60+
61+
horizontal_margin:
62+
type: qrandint
63+
default: 0
64+
range: [0, 641, 50]
65+
66+
vertical_margin:
67+
type: qrandint
68+
default: 0
69+
range: [0, 641, 50]

boxmot/trackers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
from boxmot.trackers.deepocsort.deepocsort import DeepOcSort
55
from boxmot.trackers.hybridsort.hybridsort import HybridSort
66
from boxmot.trackers.ocsort.ocsort import OcSort
7+
from boxmot.trackers.sfsort.sfsort import SFSORT
78
from boxmot.trackers.strongsort.strongsort import StrongSort

boxmot/trackers/sfsort/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Mikel Broström 🔥 BoxMOT 🧾 AGPL-3.0 license

0 commit comments

Comments
 (0)