person_reid_siglip2_naflex_512d
Image-to-image person re-identification. Crops in, 512-d unit-norm vectors out; compare with a dot product (cosine similarity).
Crops are consumed at their natural aspect ratio — no fixed square resize, which matters for person crops, where aspect varies widely.
Benchmarks
mAP / rank-1 at the model's native 768-d width (see the note on 512-d below). Best per row in bold.
| benchmark | this model | CLIP-ReID ViT-B/16 | MarketaJu SigLIP2 |
|---|---|---|---|
| Real-camera set (200q / 598g) | 0.9230 / 0.9750 | 0.8169 / 0.8900 | 0.8692 / 0.9200 |
| Market-1501 | 0.7360 / 0.8694 | 0.7784 / 0.9026 | 0.8090 / 0.9068 |
| DukeMTMC-reID | 0.5772 / 0.7527 | 0.4363 / 0.6346 | 0.5547 / 0.7365 |
| MSMT17 | 0.4681 / 0.7117 | 0.1503 / 0.3831 | 0.5660 / 0.7899 |
| Cross-domain set (3,000q / 10,415g) | 0.3981 / 0.3903 | 0.3021 / 0.3099 | 0.4692 / 0.4694 |
| VC-Clothes (clothes-change) | 0.4756 / 0.6820 | 0.4838 / 0.6997 | 0.6115 / 0.7596 |
Protocol: gallery entries sharing both identity and camera with the query are dropped as junk; queries left with no true match are skipped.
Notes:
- The real-camera set is an in-house benchmark of fixed-camera surveillance captures with annotator-verified labels — the closest proxy to deployment conditions here, and the only row measured on the cameras this model serves. On it, top-1 errors fall from 22 of 200 (CLIP-ReID) to 9.
- The public benchmarks and the real-camera set disagree about who is best, and that is the point. MarketaJu leads Market-1501, MSMT17 and the cross-domain set, yet places second on real cameras. Its public wins are consistent with source overlap: its training corpora (CUHK-PEDES, ICFG-PEDES) are assembled from Market-1501 and MSMT17 imagery, so those test identities are not necessarily unseen. DukeMTMC, which appears in none of its sources, is the one public set where it loses.
- Competitor figures were measured through their own published weights and preprocessing, not reimplementations.
- The published 512-d projection retains 99.8% of embedding variance and costs about half a point on the real-camera set: 0.9180 / 0.9700. The table is reported at 768-d so the comparison against other models is width-neutral.
Files
| file | use |
|---|---|
person_reid_siglip2_naflex_512d.onnx | ONNX Runtime (opset 17) |
person_reid_siglip2_naflex_512d.pth | torch bundle — {config, backbone, neck_scale, neck_shift, proj_weight, proj_bias} |
ONNX interface — three inputs, one output:
pixel_values (B, 256, 768) float32 patch sequence, padded
pixel_attention_mask (B, 256) int64 1 = real patch, 0 = padding
spatial_shapes (B, 2) int64 per-image patch grid (rows, cols)
→ embedding (B, 512) float32 L2-normalized in-graph
Preprocessing: RGB, natural aspect ratio, patch-16 tokenisation to at most 256 patches, mean/std 0.5, BILINEAR. Crops with a short side under 32px or an aspect ratio beyond 5:1 are scaled to those bounds first — surveillance person crops hit this guard often, and skipping it changes embeddings measurably.
Mixed patch grids within one batch are handled correctly — the positional resize happens in-graph per image, so batches need not be aspect-uniform.