D-FINE-S Crowd (Commercial-Safe, 640Γ960, ONNX)
Single-class person detector (43.2 MB FP32 ONNX, 10.2M parameters) for dense crowds, built for Trackflow. Apache-2.0, trained only on commercially usable data.
It is a crowd-focused sibling of obendidi/dfine-s-person-ONNX. On MOT20, a dense-crowd benchmark, it scores 42.3 HOTA against 34.9 for dfine-s-person, with no loss on MOT17 or DanceTrack. The cost is sports footage: it also detects spectators, so SportsMOT drops about 10 HOTA. Use dfine-s-person for sports, mixed or general footage, and this model when the scene is a crowd.
Use with Trackflow
pip install trackflow-python
trackflow run crowd.mp4 --model obendidi/dfine-s-crowd-ONNX --device coreml --threshold 0.50
--threshold 0.50: dense crowds (best MOT20).--threshold 0.60: mixed footage; best average over the four benchmarks below.
Tracking Benchmarks
Trackflow scripts/eval_benchmarks.py, HOTA / DetA. No frames from MOT17, MOT20, DanceTrack or SportsMOT were used in training.
| Detector | Tracker, threshold | MOT17-val | MOT20-val | DanceTrack-dev | SportsMOT-dev | Mean HOTA |
|---|---|---|---|---|---|---|
dfine-s-person |
ocsort, 0.50 | 50.47 / 45.09 | 34.86 / 32.32 | 47.65 / 59.77 | 42.52 / 32.02 | 43.87 |
| this model | ocsort, 0.50 | 50.54 / 45.65 | 42.26 / 44.06 | 48.64 / 60.16 | 31.95 / 18.90 | 43.35 |
| this model | ocsort, 0.60 | 49.81 / 45.27 | 40.93 / 42.14 | 50.13 / 60.09 | 35.81 / 22.70 | 44.17 |
| this model | botsort, 0.50 | 50.09 / 45.74 | 42.59 / 45.01 | 47.56 / 60.80 | 31.09 / 17.57 | 42.83 |
| this model | botsort, 0.60 | 49.76 / 45.87 | 41.80 / 43.20 | 47.75 / 61.26 | 34.67 / 21.50 | 43.49 |
Known limitation: on sports broadcasts it detects spectators, which SportsMOT does not label, so SportsMOT scores are about 10 HOTA below dfine-s-person.
Speed and Parity (Apple M4 Pro)
20 crowded 1080p frames from MOT17-val and MOT20-val, batch 1, through Trackflow's ONNX detector, compared with FP32 on CPU.
| File | Device | Speed | Detections matched to FP32 CPU | Mean IoU | Max Ξconf |
|---|---|---|---|---|---|
onnx/model.onnx |
CPU | 15.7 FPS (63.5 ms) | reference (924) | β | β |
onnx/model.onnx |
CoreML | 43.1 FPS (23.2 ms) | 924/924 | 1.0000 | 0.0000 |
onnx/model_fp16.onnx |
CoreML | 54.3 FPS (18.4 ms) | 99.5% | 0.9888 | 0.086 |
onnx/model_int8.onnx |
CPU | 16.9 FPS (59.2 ms) | 95.1% | 0.9631 | 0.295 |
Exported from the PyTorch EMA weights through Hugging Face DFineForObjectDetection (transformers==4.52.4, opset 16) and simplified with onnxslim for a static [1, 3, 640, 960] input. The static shape is what lets CoreML run the graph on the GPU.
Precision variants
| File | Trackflow flag | Size | How it was made | HOTA change vs FP32 (botsort / ocsort, threshold 0.50) |
|---|---|---|---|---|
onnx/model.onnx |
--precision fp32 |
43.2 MB | export above | reference |
onnx/model_fp16.onnx |
--precision fp16 |
21.8 MB | onnxconverter-common float16, float32 inputs/outputs kept |
MOT17 β0.39 / β0.12, MOT20 +0.15 / β0.01, DanceTrack β0.70 / β0.97, SportsMOT +0.15 / +0.26 |
onnx/model_int8.onnx |
--precision int8 |
27.2 MB | ONNX Runtime dynamic quantization of MatMul/Gemm weights (signed int8); convolutions stay FP32 | MOT17 β0.37 / β0.38, MOT20 β0.75 / β0.68, DanceTrack β0.59 / β2.09, SportsMOT +1.13 / +0.93 |
INT8 runs at FP32 speed on M4 Pro CPU and is mainly a smaller download.
Training Data and License
- Architecture and init:
D-FINE-S(Apache-2.0). The weight lineage starts from COCO-onlydfine_s_coco.pth(no Objects365 pretraining) and continues fromdfine-s-person. - Data (46,117 images):
- Everything
dfine-s-personwas trained on: 8,000 dense Open Images V6 person scenes (CC BY 2.0 images, CC BY 4.0 annotations), 5,000 synthetic crowds pasted from Open Images person masks, 4,500 COCO 2017 person images and 800 COCO negatives (CC BY 4.0 annotations). - 27,817 Open Images V6 train images whose crowds are annotated only as a group box (
IsGroupOf). Inside each group box, individual people were labelled bydfine-s-personitself (full frame plus 3Γ3 overlapping tiles, confidence β₯ 0.50; 517,486 boxes), so the labeller is also commercially clean.
- Everything
- Not used: CrowdHuman, Objects365, WiderPerson, CityPersons, EuroCity Persons, BDD100K, MOTSynth, MOT17, MOT20, DanceTrack, SportsMOT, and no teacher model trained on any of them.
- Training: native 640Γ960 input with random zoom-out (scale 1.0β3.5) and IoU crops; two epochs with 12,000 of the group images, then two epochs with all of them, each warm-started from the previous model.
Model I/O
- Input:
pixel_values,float32[1, 3, 640, 960], RGB scaled to[0, 1], no mean/std normalization. - Outputs:
logits,float32[1, 300, 1]: raw logit for class0: "person"(apply a sigmoid).pred_boxes,float32[1, 300, 4]: normalized[cx, cy, w, h]in[0, 1].
- Downloads last month
- 19