Evaluate ReID
Use eval-reid to score a trained ReID checkpoint on a dataset's query/gallery split.
Examples
Example
What it does
eval-reid loads a trained checkpoint, rebuilds the matching backbone, extracts query and gallery embeddings, computes the distance matrix, and reports ranking metrics.
If the checkpoint stores the model architecture, you can omit --model. Otherwise pass the architecture explicitly.
Main outputs
The command reports and saves:
mAPrank1rank5rank10
By default the JSON summary is written next to the checkpoint as eval_<dataset>.json. Use --output to place it elsewhere.
Dataset expectations
eval-reid uses the same registered ReID datasets as training. The selected dataset must expose query and gallery splits under the dataset root passed to --data-dir.
Scope
eval-reid is available from both the CLI and Python facade via BoxMOT.eval_reid(...).
Related pages
CLI Arguments
boxmot eval-reid
Evaluate a trained ReID model on query/gallery
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--weights |
path | Path to trained ReID checkpoint (.pt) | Sentinel.UNSET |
--model |
text | Model architecture (auto-detected from checkpoint if omitted) | None |
--dataset |
text | Evaluation dataset (e.g. market1501, duke, msmt17) | Sentinel.UNSET |
--data-dir |
path | Root directory of the dataset | Sentinel.UNSET |
--preprocess |
choice (resize | resize_pad) |
Crop preprocessing method (default: checkpoint/hparams value) | None |
--imgsz |
text | Image size as H,W (default: hparams value, fallback 256,128) | None |
--inference-feature |
choice (concat_bn | norm_concat_bn | global | raw_mean | raw_concat | visibility_weighted_parts | evidence_sinkhorn | dse_weighted | dse_mix) |
Override CSL-TinyViT eval embedding without retraining | None |
--flip-tta / --no-flip-tta |
boolean | Use horizontal flip test-time augmentation (default: hparams value) | None |
--device |
text | Device: cpu, mps, or cuda index | cpu |
--batch-size |
integer | Batch size for feature extraction | 64 |
--num-workers |
integer | Dataloader workers | 4 |
--latency-warmup |
integer | Warmup forward passes before measuring ReID inference latency | 5 |
--latency-iters |
integer | Timed forward passes for ReID inference latency; 0 disables latency measurement | 30 |
--output |
path | Directory to save eval JSON (default: next to weights) | None |
--help |
boolean | Show this message and exit. | False |