vehicle_reid_siglip2_naflex_512d
Image-to-image vehicle 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.
Benchmarks
mAP / rank-1. Figures are for the published 512-d weights. Best per row in bold.
| benchmark | this model | previous version | CLIP-ReID ViT-B/16 |
|---|---|---|---|
| Real-camera set A (480q / 1,243g) | 0.6674 / 0.8042 | 0.6660 / 0.8333 | 0.2550 / 0.5729 |
| Real-camera set B (296q / 3,927g) | 0.7470 / 0.8209 | 0.7263 / 0.8074 | 0.2647 / 0.4155 |
| VeRi-776 | 0.6451 / 0.8439 | 0.5801 / 0.8045 | 0.7100 / 0.9321 |
| VERI-Wild (test-3000) | 0.4474 / 0.5763 | 0.4158 / 0.5365 | 0.2274 / 0.4548 |
Protocol: gallery entries sharing both identity and camera with the query are dropped as junk, and queries left with no true match are skipped — except on real-camera set B, where that rule is deliberately disabled (see below).
Notes:
- Real-camera set A is an in-house benchmark of fixed-camera captures — 290 identities, 1,243 annotator-verified images, 480 queries.
- Real-camera set B is a second in-house set built from time-coincidence labels with human-confirmed identity merging. Its defining property is temporal separation: the median query sits 24.8 hours from its nearest true match, so it measures invariance across days, weather and lighting rather than across viewpoints seconds apart. The standard junk rule is disabled for it, because a vehicle returning to the same camera a day later is the task, not a trivial match — applying the rule would discard 92% of its positives.
- CLIP-ReID still leads on VeRi-776, the benchmark it was fine-tuned for, though the gap has narrowed from 0.130 to 0.065 mAP. That gap is real and is reported rather than omitted. The two rows either side of it are the reason the comparison is worth making at all: CLIP-ReID leads VeRi by 0.065 mAP and trails by 0.41–0.48 mAP on both real-camera sets. In-domain leaderboard rank and deployment behaviour are close to unrelated.
- CLIP-ReID figures were measured through its own published weights, not a reimplementation. Preprocessing was calibrated rather than assumed: its model card specifies ImageNet normalization, but CLIP normalization is what reproduces its published VeRi score (0.7100 / 0.9321, matched to four decimals), so that is what these figures use.
- This version improves on the previous one across all four benchmarks in mAP. Its one regression is rank-1 on real-camera set A (0.8042 vs 0.8333): ranking quality deeper in the list improved while top-1 retrieval on that particular set did not.
- The 512-d projection is near-free relative to the model's native 768-d width — it retains 99.8% of embedding variance and lands within ±0.004 mAP on every benchmark, improving two of the four (projection sheds low-variance noise directions).
Files
| file | use |
|---|---|
vehicle_reid_siglip2_naflex_512d.onnx | ONNX Runtime (opset 17) |
vehicle_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.
Mixed patch grids within one batch are handled correctly — the positional resize happens in-graph per image, so batches need not be aspect-uniform.