Compact person re-identification model (11.36 MB FP16 ONNX, 5.7M parameters, 512-d L2-normalized embeddings) for multi-object tracking (nltrack, botsort, boosttrack) and cross-exit track merging (--reid-merge), built for Trackflow. Apache-2.0, trained only on commercially usable CC-BY / public-domain data.
Standard person Re-ID checkpoints (such as osnet_ain_x1_0 on MSMT17) carry academic-only dataset terms and struggle on non-surveillance scenes like dance and sports. This model distills an Apache-2.0 DINOv2-Base teacher fine-tuned on commercial-safe video and image person crops into a fast vit_tiny_patch16_224 student with a CLS + GAP + 4-stripe vertical part head, beating 2019 MSMT17 osnet across all 81 official MOT validation videos while running 38% faster on Apple Silicon CoreML.
pip install trackflow-python
trackflow run video.mp4 --tracker nltrack --reid vit-tiny --postprocess
trackflow run mall.mp4 --tracker nltrack --reid vit-tiny --reid-merge
Trackflow nltrack + --postprocess (+pp), HOTA / AssA / IDSW across DanceTrack-val (25), SportsMOT-val (45), MOT17-val (7), and MOT20-val (4). No frames from MOT17, MOT20, DanceTrack, SportsMOT, MSMT17, Market-1501, DukeMTMC, CUHK03, CrowdHuman, or Objects365 were used in training.
rtdetr-v2-r18| Re-ID Model | DanceTrack-val (HOTA / AssA) | SportsMOT-val (HOTA / AssA) | MOT17-val (HOTA / AssA) | MOT20-val (HOTA / AssA) | Mean Re-ID ms/f (M4 Pro CoreML) |
|---|---|---|---|---|---|
osnet (MSMT17, NC) |
47.46 / 36.31 | 52.54 / 56.92 | 50.76 / 62.61 | 27.86 / 38.70 | 30.41 |
this model (onnx/model_fp16.onnx) |
47.82 / 37.18 | 53.76 / 59.51 | 50.64 / 62.38 | 27.75 / 38.68 | 18.93 |
dfine-s-person| Re-ID Model | DanceTrack-val (HOTA / AssA) | SportsMOT-val (HOTA / AssA) | MOT17-val (HOTA / AssA) | MOT20-val (HOTA / AssA) | Mean Re-ID ms/f (M4 Pro CoreML) |
|---|---|---|---|---|---|
osnet (MSMT17, NC) |
50.21 / 38.12 | 38.62 / 62.39 | 53.00 / 62.33 | 40.66 / 43.98 | 44.68 |
this model (onnx/model_fp16.onnx) |
51.65 / 40.20 | 39.56 / 65.24 | 53.21 / 62.87 | 40.82 / 44.30 | 28.97 |
Across all 1,126 fragmented ground-truth tracks in the 81 validation videos (--reid-merge probe), this model improves Rank-1 from 69.63% to 76.11% and Best F1 from 45.04% to 59.03% (SportsMOT Merge F1@0.80: 23.74% -> 47.95% at 97.6% precision).
Static batch B=8, input [8, 3, 256, 128].
| File | Size | M4 Pro CPU (B=8) |
M4 Pro CoreML (B=8) |
CoreML vs CPU (cos_min) |
T4 CUDA (B=8, cos_min) |
|---|---|---|---|---|---|
onnx/model_fp16.onnx |
11.36 MB (10.83 MiB) | 48.41 ms | 8.35 ms | 0.999999 (max_diff 0.00026) |
7.75 ms (1.000000) |
onnx/model.onnx (FP32) |
22.53 MB (21.49 MiB) | 20.95 ms | 9.40 ms | 1.000000 (max_diff 0.00000) |
10.34 ms (1.000000) |
FP32 vs FP16 cosine similarity at B=8: cos_min = 0.999999 (max_abs_diff = 0.000284).
Exported with fused_attn=False and static batch B=8 so Apple CoreML MLProgram compiles 462/465 nodes cleanly into 3 partitions (ReduceMean, Pow, Sqrt, LpNormalization, and Div kept in FP32 during FP16 conversion).
vit_tiny_patch16_224.augreg_in21k_ft_in1k (Apache-2.0) + CLS + GAP + 4-stripe vertical part projection head (512-d).facebook/dinov2-with-registers-base (Apache-2.0), fine-tuned on the same commercial-safe corpus (86.71% MEVID val Rank-1), precomputed flip-averaged embeddings distilled across all 182,696 crops.182,696 real person crops + 3,000 RGBA person occluders, 100% commercial-safe):license in {4, 7, 8} — CC BY 2.0 and Public Domain only, excluding all NC/ND/SA images): 10,056 multi-person scenes plus single-person crops and 3,000 RGBA person masks for Copy-Paste occlusion augmentation.images, float32, static shape [8, 3, 256, 128], RGB ImageNet-normalized (mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]). Pad batches smaller than 8 with zeros and slice the first N rows of the output.embeddings, [8, 512] (float16 in model_fp16.onnx, float32 in model.onnx), L2-normalized per row.onnx/model.onnx 21 MiBonnx/model_fp16.onnx 11 MiB