obendidi/dfine-m-amodal-crowd-ONNX)Commercial-safe, Apache-2.0 single-class (person) amodal crowd detector (640×960, 19.2M parameters) trained strictly on COCO 2017 and Open Images V5/V6 — zero CrowdHuman, zero Objects365, and zero MOT/DanceTrack/SportsMOT training frames.
Standard crowd detectors draw clipped boxes around only a person's visible head and shoulders when occluded by someone in front. This model predicts amodal full-body (head-to-foot) person boxes in dense crowds, reaching 54.76 Mean-4 HOTA (auto) / 55.22 (on) across all 81 official MOT validation videos when paired with Trackflow's Apache-2.0 nltrack --reid vit-tiny --postprocess stack (+10.06 / +10.52 over Trackflow v0.7.0), while running at 29.6 FPS (FP32) / 36.2 FPS (FP16) on Apple M4 Pro CoreML.
pip install trackflow-python
trackflow run crowd.mp4 --model dfine-m-amodal --tracker nltrack --reid vit-tiny --threshold 0.55 --postprocess --device coreml
--threshold 0.55 (calibrated for --ignore-regions amodal crowd training).--static-crowd-gate auto (Trackflow 0.8.0 or later) to drop seated spectators without affecting street or crowd footage; use on for clips with sparse or cropped stands. It is off by default, and the SportsMOT numbers below assume it is on.Measured in Trackflow (nltrack --reid vit-tiny --postprocess, --threshold 0.55, Apple M4 Pro CoreML, Prong B static spectator gate auto / on). Zero frames from MOT17, MOT20, DanceTrack, or SportsMOT were used in detector training.
| Stack | MOT17-val (7) | MOT20-val (4) | DanceTrack-val (25 / 19 HO) | SportsMOT-val (45 / 39 HO) | Mean-4 (81v) | Held-Out Mean-4 (val \ dev) |
|---|---|---|---|---|---|---|
rtdetr-v2-r18 + vit-tiny (t=0.45, README baseline) |
50.6 |
27.8 |
47.8 |
53.8 |
45.0 |
— |
dfine-m-amodal + vit-tiny (auto) |
55.74 |
51.95 |
53.38 / 53.28 |
57.97 / 57.20 |
54.76 |
54.54 (-0.22) |
dfine-m-amodal + vit-tiny (on on SportsMOT) |
55.74 |
51.95 |
53.38 / 53.28 |
59.82 / 59.20 |
55.22 |
55.04 (-0.18) |
dfine-m-amodal + osnet (auto / on on SM) |
56.16 |
51.30 |
51.80 |
57.46 / 59.35 |
54.18 / 54.65 |
— |
Held-out note: The
0.55threshold and the gate were tuned on23/81videos: all 7 MOT17-val and 4 MOT20-val videos, plus 6 DanceTrack and 6 SportsMOT clips. The held-out column swaps in the 19 untuned DanceTrack and 39 untuned SportsMOT clips but still includes the tuned MOT17 and MOT20 videos, which have no untuned alternative. On the untuned clips alone (DanceTrack 19 + SportsMOT 39), mean HOTA drops from55.68to55.24withauto(-0.43) and from56.60to56.24withon(-0.37), compared with the full DanceTrack and SportsMOT sets. The SportsMOT validation clips were also viewed while designing the gate. Theep1vsep3checkpoint was picked on the full 81-video set (54.18vs54.04);ep1also led on the 23-video dev split (56.61vs56.43).
Uncontended M4 Pro (OMP_NUM_THREADS=4, 100 timed iterations) and numerical parity vs. PyTorch FP32 across 20 crowded MOT20 + MOT17 frames (985 reference detections at t=0.55):
| File | Trackflow flag | Size | Backend | Speed (p50) | mIoU@0.55 |
max Δprob |
Dets@0.55 |
|---|---|---|---|---|---|---|---|
onnx/model.onnx |
--precision fp32 |
80.8 MB |
CPU (4t) | 9.1 FPS (108.7 ms) |
1.00000 |
0.00202 |
985 / 985 |
onnx/model.onnx |
--precision fp32 |
80.8 MB |
CoreML (1180/1192 nodes) |
29.6 FPS (33.8 ms) |
1.00000 |
0.00048 |
985 / 985 |
onnx/model_fp16.onnx |
--precision fp16 |
40.6 MB |
CoreML (1190/1203 nodes) |
36.2 FPS (27.6 ms) |
0.98890 |
0.17696 |
985 / 985 |
INT8 is intentionally omitted because dynamic MatMul/Gemm quantization gave no CPU speedup (9.1 FPS) with looser box parity (0.979 mIoU).
dfine_m_coco.pth (Peterande/D-FINE v1.0, Apache-2.0, no Objects365).44,983 images, 1,829,499 positive boxes, 10,693 ignore regions):CC BY 4.0 annotations / Flickr CC images): 6,000 positive scenes (10,008 bottom-occluded boxes extended via keypoint anthropometric ratios; iscrowd=1 kept as -1 ignore regions) + 1,000 hard negatives.CC BY 2.0 images / CC BY 4.0 annotations): 8,000 clean dense scenes (37,497 occluded boxes extended with OI Human head + front-to-back perspective bounds) + 10,000 IsGroupOf=1 crowd scenes labeled by Apache-2.0 dfine-s-crowd (3×3 tiled) with perspective-bounded amodal completion.10,000 real-scene amodal occlusion scenes (25%–85% occlusion preserving real full-body GT) + 10,000 full-body CrowdPaste v2 scenes (35–220 people/scene, two-pass occupancy filtering).3,382 images): 2,691 COCO val2017 + 691 Open Images validation.pixel_values, float32 [1, 3, 640, 960], RGB scaled to [0, 1] (no ImageNet mean/std normalization).logits (float32 [1, 300, 1], raw logit for 0: "person") and pred_boxes (float32 [1, 300, 4], normalized [cx, cy, w, h] in [0, 1]).onnx/model.onnx 77 MiBonnx/model_fp16.onnx 39 MiB