Train ReID
Use train-reid to fit an appearance encoder on identity-labeled person or
vehicle crops. Training uses the ReID dataset readers, not tracking experiment
YAMLs or materialized perception builds.
Examples
Choose the CLI or Python tab for the same training workflow. Python options use
underscores in place of CLI hyphens. Explicit Python options take precedence
over recipes and config files. Keep the __main__ guard when running a script
with data-loader workers.
Train OSNet on Market1501, naming the run so its output can be reused:
With no --data-dir, the Market1501 resolver downloads and extracts the dataset
under ./datasets/reid. Use --data-dir /data/reid for an existing dataset.
Pretrained model initialization can also download weights on the first run.
ReID training accepts PyTorch device names: cpu, mps, or cuda:0.
Use the full CUDA name; a bare --device 0 does not work here. Recipes may set
MPS explicitly, so pass --device when running them on another platform.
Train the bundled RGB-only CSL-TinyViT-11M V20 recipe:
Joint training remaps identities across datasets so equal numeric IDs from two sources do not refer to the same person:
from boxmot.engine.commands.reid.train import main as train_reid
if __name__ == "__main__":
result = train_reid(
model="lmbn_n",
dataset="market1501,duke,cuhk03",
data_dir="/data/reid",
loss="triplet",
preprocess="resize_pad",
epochs=120,
device="cuda:0",
project="runs/reid_train",
name="lmbn_joint",
)
print(result.weights_path)
Keep separate dataset roots with repeated --data YAMLs:
Create those files first. For example, market1501.yaml can contain:
The duke.yaml file uses dataset: duke and its own dataset path. Relative
path values resolve beside the data YAML. train, val, query, and
gallery fields are retained as metadata; they do not override the
registered reader's directories. An optional download field is executable
Python, run from the YAML directory only when its root is missing or empty.
A data YAML must therefore come from a source you trust and its download block
must actually populate the reader's expected layout.
Supported datasets
Supply the complete dataset layout, including train, query, and gallery. Most readers accept either the dataset folder or a shared parent containing a recognized folder name.
| Name | Expected layout beneath the dataset folder |
|---|---|
market1501 |
bounding_box_train/, query/, bounding_box_test/; .jpg names such as 0002_c1s1_000451_03.jpg |
mot171501 |
The same crop layout; shared roots recognize folders such as MOT17-1501-fixed/ or MOT17-1501/ |
duke |
DukeMTMC-reID/{bounding_box_train,query,bounding_box_test}/; .jpg names such as 0001_c2_f0046182.jpg |
cuhk03 |
cuhk03-np/detected/{bounding_box_train,query,bounding_box_test}/; new-protocol .jpg or .png crops |
msmt17 |
list_train.txt, list_query.txt, list_gallery.txt, with images beneath train/ and test/ or the root |
msmt17_merged |
The MSMT17 layout; training combines train, query, and gallery lists |
veri |
image_train/, image_query/, image_test/; vehicle .jpg names such as 0001_c001_00016450_0.jpg |
Aliases include dukemtmcreid, mot17_1501, cuhk03np, and veri776.
CUHK03 defaults to detected crops; its Python reader also accepts
variant="labeled". The CLI does not expose that variant selector. Duke bare
roots must retain a recognized dataset folder name; pass the shared parent for
CUHK03's detected/ layout.
MSMT17 list rows are <relative_image_path> <person_id>; camera IDs come from
the third underscore-separated filename field. list_val.txt is not consumed
by this reader. msmt17_merged includes evaluation images in training, so its
own query/gallery scores are not held-out results. Use a separate target
benchmark for cross-domain evaluation.
Only Market1501 has built-in automatic acquisition, and only when training
without --data-dir or --data. Other datasets need local payloads or a data
YAML download block. See the dataset catalog for the
separate tracking dataset profiles.
Configuration and batching
Settings resolve in this order: training defaults, selected recipe, --cfg
YAML/JSON, then explicit CLI flags. Some models select a default recipe
implicitly: the 11M V20 models use csl_tinyvit_11m, and the 7M V20 and
MobileNetV4 V20 models use their matching recipes. Inspect the saved
hparams.json for the resolved configuration.
boxmot train-reid --cfg custom_config.yaml --epochs 120 --device cuda:0
boxmot train-reid --cfg runs/reid_train/osnet_market/hparams.json --name reproduced
The second command starts a new run with saved settings. Use --resume for
an exact continuation. ReID runtime profiles under boxmot/configs/reid
select inference weights and are not training configs.
Training batch size is --p-ids × --k-instances; --batch-size controls
query/gallery evaluation batches. For example, --p-ids 16 --k-instances 4
uses 64 training images. --source-balance 'market1501:8,4;mot17_1501:8,4'
instead sets a separate identity quota per source. All selected sources must
exist under their configured roots.
--camera-aware-sampler prefers different cameras within each identity.
--pk-steps-per-epoch fixes the number of batches; zero uses a shuffled
identity pass. Fix this value when comparing different P/K settings so the
number of optimizer steps remains comparable.
The supported metric losses are triplet, wrt, circle, and ms; softmax
uses classification only. Classification supports CE, ArcFace, and CosFace.
Keep --imgsz and --preprocess consistent with later evaluation and tracking.
Outputs and resume
The default run root is runs/reid_train/exp; --project and --name select
another location. Preserve these files together:
| File | Purpose |
|---|---|
best.pt |
Compact inference checkpoint selected by the primary query/gallery mAP; use for evaluation, tracking, and export |
last.pt |
Resumable training state, including optimizer and scheduler state |
hparams.json |
Resolved configuration, model settings, and resume provenance |
metrics.json |
Training and validation history |
A directory resolves to its last.pt. best.pt is inference-only and cannot
be resumed. Exact resume validates the saved training contract and history;
retain the sidecars and the same dataset/privileged annotations. Changing the
architecture, sampling, or other contract fields is a new experiment.
Validation runs every --eval-interval epochs and at the final epoch. For
joint training, the first dataset supplies the primary query/gallery set and
checkpoint selection metric. --eval-datasets adds cross-domain evaluations;
unavailable extra datasets are logged and skipped. Standard benchmark
query/gallery sets are often official test data. Use a separate development
split when selecting recipes, then report a fixed candidate on the held-out
benchmark.
Training recipes
Recipes live in boxmot/reid/training/configs/recipes. The generated argument
reference lists every available --recipe; these illustrate the main choices:
| Recipe | Training inputs beyond RGB crops | Inference behavior |
|---|---|---|
csl_tinyvit_11m |
None | 11M V20 hierarchy, 1536-D descriptor |
csl_tinyvit_11m_v20_pose_teacher |
Pose/person-mask metadata | Same 1536-D RGB descriptor; teacher removed |
csl_tinyvit_7m_v20 |
Pose/person-mask metadata | 1152-D RGB descriptor; teacher removed |
csl_tinyvit_23m_v8 |
Pose/person-mask metadata | 1920-D RGB descriptor; teacher removed |
mobilenetv4_conv_medium_v20, mobilenetv4_hybrid_medium_v20 |
Pose/person-mask metadata | 1152-D RGB descriptor |
hi_afa_market1501 |
None | 8192-D descriptor from unique normalized streams |
csl_tinyvit_7m_multilevel_suppression |
The V20 pose metadata | Class-CAM suppression is training-only |
csl_tinyvit_7m_hpgrd |
Pose metadata, person/background masks, offline teacher cache | Unchanged V20 RGB descriptor |
For the pose-teacher recipe, prepare metadata as described below, then run:
boxmot train-reid \
--recipe csl_tinyvit_11m_v20_pose_teacher \
--data-dir /data/Market-1501-v15.09.15 \
--anatomical-metadata-dir /data/Market-1501-pav-metadata \
--device cuda:0 --project runs/reid_train --name tinyvit_pose
The historical Hi-AFA paper scores and BoxMOT recipe assumptions are explained in the model reference. For offline teacher extraction and cache validation, use the HP-GRD guide. The commands on this page use the packaged CLI and source modules; separate research shell launchers are not required.
Identity-preserving background mosaic
Background mosaic retains the anchor person and nearby bags, replacing only the background with donor tiles. The anchor identity remains the training label; query/gallery images are not augmented.
From a source checkout with the yolo extra, generate masks:
uv run --no-sync python -m tools.create_market1501_person_masks \
--source datasets/reid/Market-1501-v15.09.15 \
--output Market-1501-mosaic-highconf \
--model yolo26x-seg.pt --device cuda:0 \
--batch-size 16 --conf 0.50 --masks-only
The tool writes Market-1501-mosaic-highconf-masks/primary/ and
all_people/ masks. Use that generated root:
boxmot train-reid \
--recipe csl_tinyvit_11m \
--data-dir datasets/reid/Market-1501-v15.09.15 \
--background-mosaic \
--background-mosaic-mask-dir Market-1501-mosaic-highconf-masks \
--background-mosaic-probability 0.30 --device cuda:0
Missing or invalid foreground masks fall back to the original anchor image. Schedule and accepted foreground ratios are configurable; recipe values can override the global defaults.
Cross-camera same-ID part mosaic
--same-id-part-mosaic replaces body-aligned rectangles using independently
augmented observations of the same identity in the P/K batch. It prefers
cross-camera donors, preserves the identity label, and needs no segmentation
metadata.
boxmot train-reid \
--recipe csl_tinyvit_11m \
--data-dir datasets/reid/Market-1501-v15.09.15 \
--same-id-part-mosaic --same-id-part-mosaic-probability 0.35 \
--same-id-part-mosaic-max-regions 2 \
--same-id-part-mosaic-min-unaltered 0.5 --device cuda:0
The camera-aware sampler can improve donor availability. Independent Random Erasing runs after the composite when enabled.
Pose-aligned view mosaic
PAV-Mosaic uses pose keypoints and foreground masks to align semantic parts between same-identity observations. Generate its training metadata from the source checkout:
uv run --no-sync python -m tools.create_market1501_pav_metadata \
--source datasets/reid/Market-1501-v15.09.15 \
--output Market-1501-pav-metadata \
--pose-model yolo26x-pose.pt --seg-model yolo26x-seg.pt \
--device cuda:0 --batch-size 16 --pose-conf 0.25 --seg-conf 0.50
boxmot train-reid \
--recipe csl_tinyvit_11m \
--data-dir datasets/reid/Market-1501-v15.09.15 \
--pav-mosaic --pav-metadata-dir Market-1501-pav-metadata \
--pav-mosaic-probability 0.25 --pav-mosaic-max-parts 3 \
--pav-mosaic-min-unaltered 0.5 --device cuda:0
--pav-consistency-weight enables clean-versus-mosaic descriptor consistency,
requiring an extra clean forward for successfully augmented pairs. Keep the
metadata aligned with the actual training images.
Privileged anatomical supervision
--anatomical-auxiliary supervises six ordered RGB roles: head, torso,
left/right arms, and left/right legs. The default
deterministic_scale_aware_geometry target uses pose/mask routing. The
learned_pose_concat_ema target adds a training-only pose teacher, as selected
by the bundled V20 pose recipes.
Metadata paths are explicit. --anatomical-person-mask-dir can supply external
foreground masks that take priority over metadata references. Startup checks
annotation coverage and file availability. Transformations keep image and
anatomical targets aligned, including left/right role swaps after horizontal
flips. Resume provenance includes annotation content.
--anatomical-multiscale adds local and fine supervision; their scale weights
must sum to one. Student ramp and decay options control when this signal is
active. Descriptor and branch-relation distillation are separate objectives;
use a recipe as the starting point because target/head combinations have
compatibility requirements.
Most privileged branches are removed for inference. Two explicit treatments
change this contract: privileged_mask_pose_attention retains its RGB gating
adapter, and --anatomical-deployment appends RGB-predicted semantic parts to
the descriptor. Neither requires pose or masks at inference. Descriptor
width and compute therefore depend on the selected treatment, not only the
backbone name.
Modular CSL-TinyViT ablations
The resolved ablation plan records architecture, retrieval head, augmentation,
privileged supervision, and auxiliary objectives in model.ablation inside
hparams.json and checkpoint metadata. Preserve that configuration with
reported results.
Options such as --head-type, --width-first-hierarchy,
--identity-registers, and --mcpt-mode change the deployed model; training-only
objectives such as multilevel suppression and HP-GRD do not. Treat each
combination as its own experiment rather than transferring results between
heads or widths.
A source checkout provides an optional model/forward preflight. It resolves the training arguments, constructs the selected model, and reports its descriptor width and fingerprints:
uv run --no-sync python -m boxmot.engine.commands.reid.ablation validate -- \
--recipe csl_tinyvit_11m \
--data-dir /data/Market-1501-v15.09.15 --device cpu
This performs model construction and a forward pass; it is not a complete
training or accuracy test. Reusable registries live in
boxmot.reid.backbones.head_registry, boxmot.reid.backbones.option_registry,
and boxmot.reid.training.ablation.
Related pages
CLI Arguments
boxmot train-reid
Train a ReID model
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--cfg |
file | BoxMOT ReID YAML/JSON config or saved hparams.json. Explicit CLI flags override config values. | None |
--recipe |
choice (csl_tinyvit_11m | csl_tinyvit_11m_v20_pose_teacher | csl_tinyvit_23m | csl_tinyvit_23m_v8 | csl_tinyvit_7m | csl_tinyvit_7m_hi_afa_lite | csl_tinyvit_7m_hpgrd | csl_tinyvit_7m_multilevel_suppression | csl_tinyvit_7m_v20 | hi_afa_market1501 | lmbn_n | lmbn_n_market1501 | mobilenetv4 | mobilenetv4_conv_large | mobilenetv4_conv_medium | mobilenetv4_conv_medium_v20 | mobilenetv4_conv_small | mobilenetv4_conv_small_a11k | mobilenetv4_hybrid_medium_v20 | vit) |
Training recipe preset (overrides defaults; CLI flags still take priority). Available: csl_tinyvit_11m, csl_tinyvit_11m_v20_pose_teacher, csl_tinyvit_23m, csl_tinyvit_23m_v8, csl_tinyvit_7m, csl_tinyvit_7m_hi_afa_lite, csl_tinyvit_7m_hpgrd, csl_tinyvit_7m_multilevel_suppression, csl_tinyvit_7m_v20, hi_afa_market1501, lmbn_n, lmbn_n_market1501, mobilenetv4, mobilenetv4_conv_large, mobilenetv4_conv_medium, mobilenetv4_conv_medium_v20, mobilenetv4_conv_small, mobilenetv4_conv_small_a11k, mobilenetv4_hybrid_medium_v20, vit | None |
--model |
choice (csl_tinyvit_11m | csl_tinyvit_11m_lmbn | csl_tinyvit_11m_v20 | csl_tinyvit_23m | csl_tinyvit_23m_lmbn | csl_tinyvit_7m | csl_tinyvit_7m_lmbn | csl_tinyvit_7m_v20 | csl_tinyvit_large | csl_tinyvit_lmbn | csl_tinyvit_normal | csl_tinyvit_small | hacnn | hi_afa | lmbn_ain_n | lmbn_n | mlfn | mobilenetv2_x1_0 | mobilenetv2_x1_4 | mobilenetv4_conv_large | mobilenetv4_conv_medium | mobilenetv4_conv_medium_v20 | mobilenetv4_conv_small | mobilenetv4_hybrid_large | mobilenetv4_hybrid_medium | mobilenetv4_hybrid_medium_v20 | osnet_ain_x0_25 | osnet_ain_x0_5 | osnet_ain_x0_75 | osnet_ain_x1_0 | osnet_ibn_x1_0 | osnet_x0_25 | osnet_x0_5 | osnet_x0_75 | osnet_x1_0 | resnet101 | resnet152 | resnet18 | resnet34 | resnet50 | resnet50_fc512 | resnext101_32x8d | resnext50_32x4d) |
ReID backbone architecture | csl_tinyvit_11m_v20 |
--data |
text | ReID dataset name or YAML data config. Repeat or comma-separate for multi-dataset training, e.g. --data market1501.yaml --data duke.yaml. YAML supports dataset/name, path, train, val, query, gallery, and download. | () |
--dataset |
text | Training dataset (comma-separated for joint training, e.g. market1501,duke,cuhk03,msmt17). Available: cuhk03, duke, market1501, mot171501, msmt17, msmt17_merged, veri | market1501 |
--data-dir |
path | Root directory of the dataset (inferred from hparams.json when --resume is used) | None |
--loss |
choice (softmax | triplet | wrt | circle | ms) |
Metric loss type (triplet=batch-hard triplet, wrt=weighted regularized triplet, circle=Circle loss, ms=multi-similarity, softmax=classifier only) | triplet |
--classifier-loss |
choice (ce | arcface | cosface) |
ID classifier loss: ce, arcface, or cosface | ce |
--preprocess |
choice (resize | resize_pad) |
Crop preprocessing method; must match inference-time preprocessing | resize |
--imgsz |
text | Image size as H,W (e.g. 256,128) | 384,128 |
--batch-size |
integer | Evaluation batch size; training uses --p-ids × --k-instances | 64 |
--lr |
float | Base learning rate | 0.0007 |
--weight-decay |
float | Weight decay | 0.1 |
--epochs |
integer | Number of training epochs | 200 |
--warmup-epochs |
integer | Linear warmup epochs | 20 |
--vit-lr-profile |
choice (layer_decay | reid_lrd) |
Transformer LR grouping profile: geometric layer decay or ReID stage-wise decay | layer_decay |
--layer-decay |
float | Geometric per-stage LR decay for hierarchical transformer backbones | 0.95 |
--backbone-lr-mult |
float | Persistent pretrained-backbone LR multiplier for MobileNetV4 | 1.0 |
--backbone-freeze-epochs |
integer | Freeze pretrained backbone layers for the first N epochs | 10 |
--gradual-unfreeze / --no-gradual-unfreeze |
boolean | Use staged ReID unfreeze: head/neck, last backbone stage, then full model | False |
--gradual-unfreeze-head-epochs |
integer | Gradual unfreeze head/neck-only epoch boundary | 5 |
--gradual-unfreeze-stage-epochs |
integer | Gradual unfreeze last-stage epoch boundary before full model training | 20 |
--gradual-unfreeze-backbone-lr-mult |
float | Backbone LR multiplier for early full-model gradual-unfreeze epochs | 0.1 |
--gradual-unfreeze-backbone-lr-epochs |
integer | Number of full-model epochs using the gradual-unfreeze backbone LR multiplier | 5 |
--eval-interval |
integer | Validate every N epochs | 10 |
--p-ids |
integer | Number of identities per PK batch | 12 |
--k-instances |
integer | Number of instances per identity | 8 |
--source-balance |
text | Source-balanced PK sampler spec, e.g. 'market1501:8,4;mot17_1501:8,4'. Empty uses the global --p-ids x --k-instances sampler. | `` |
--pk-steps-per-epoch |
integer | Fixed PK batches per epoch; zero uses one shuffled identity pass | 0 |
--camera-aware-sampler / --no-camera-aware-sampler |
boolean | Prefer distinct-camera instances within each identity; cameras affect sampling only | False |
--margin |
float | Triplet loss margin | 0.3 |
--triplet-soft-margin / --triplet-hard-margin |
boolean | Use softplus batch-hard triplet instead of the hard margin. Default: auto for transformer-family recipes, hard margin otherwise. | True |
--arcface-scale |
float | ArcFace logit scale | 30.0 |
--arcface-margin |
float | ArcFace angular margin | 0.5 |
--cosface-scale |
float | CosFace logit scale | 30.0 |
--cosface-margin |
float | CosFace cosine margin | 0.35 |
--label-smooth |
float | Label smoothing epsilon | 0.05 |
--center-loss-weight |
float | Center loss weight | 0.005 |
--id-loss-weight |
float | Weight applied to the ID classification loss term | 1.0 |
--metric-loss-weight |
float | Weight applied to the metric loss term (triplet/wrt/circle/ms) | 1.0 |
--adasp-loss-weight |
float | Weight for AdaSP on the full normalized descriptor; 0 disables | 0.0 |
--adasp-temperature |
float | AdaSP similarity temperature | 0.04 |
--adasp-scale |
float | AdaSP paper-scale multiplier applied before its ablation weight | 0.1 |
--coarse-branch-ce-weight |
float | Relative CE weight for two-stripe branches; 0 disables coarse CE | 1.0 |
--fine-branch-ce-weight |
float | Relative CE weight for four-stripe branches; 0 disables fine CE | 1.0 |
--part-relation-weight |
float | EMA cross-ID neighborhood loss weight for corresponding fine parts | 0.0 |
--part-to-global-weight |
float | Weight for distilling aggregate part neighborhoods into global features | 0.0 |
--part-relation-teacher-momentum |
float | EMA momentum for the training-only part-relation teacher | 0.999 |
--part-relation-temperature |
float | Temperature for cross-ID part-neighborhood distillation | 0.07 |
--compact-metric-loss-weight |
float | Triplet-loss weight for an enabled compact deployment descriptor | 1.0 |
--compact-cosine-distill-weight |
float | Cosine alignment weight from compact student to the full teacher descriptor | 1.0 |
--compact-pairwise-distill-weight |
float | PK-batch pairwise-distance distillation weight for the compact student | 1.0 |
--csmm-loss-weight |
float | Cross-scale majority-margin auxiliary loss weight; 0 disables | 0.0 |
--csmm-margin |
float | Target cosine ranking margin for the median descriptor scale | 0.1 |
--csmm-temperature |
float | Softplus temperature for the cross-scale majority-margin loss | 0.05 |
--csmm-topk-negatives |
integer | Closest full-descriptor negatives evaluated per CSMM anchor | 8 |
--csmm-start-epoch |
integer | Epoch through which the CSMM auxiliary weight remains zero | 20 |
--csmm-ramp-end-epoch |
integer | Epoch where CSMM reaches --csmm-loss-weight | 40 |
--treeboost-loss-weight |
float | TreeBoost-AP hierarchical retrieval auxiliary loss weight; 0 disables | 0.0 |
--treeboost-coarse-coefficient |
float | Coefficient for coarse residual ranking supervision inside TreeBoost-AP | 1.0 |
--treeboost-fine-coefficient |
float | Coefficient for fine residual ranking supervision inside TreeBoost-AP | 1.0 |
--treeboost-node-coefficient |
float | Coefficient for upper/lower parent-child refinement terms | 0.25 |
--treeboost-regression-coefficient |
float | Coefficient penalizing ranking regressions at finer hierarchy levels | 0.1 |
--treeboost-difficulty-floor |
float | Minimum supervision retained for hierarchy levels after easy parent rankings | 0.25 |
--treeboost-regression-tolerance |
float | Allowed SmoothAP loss increase when adding a finer hierarchy level | 0.02 |
--treeboost-temperature |
float | Pairwise sigmoid temperature for cross-camera-positive TreeBoost SmoothAP | 0.05 |
--treeboost-start-epoch |
integer | Epoch through which the TreeBoost-AP auxiliary weight remains zero | 30 |
--treeboost-ramp-end-epoch |
integer | Epoch where TreeBoost-AP reaches --treeboost-loss-weight | 60 |
--global-ap-loss-weight |
float | Identity-defined dataset-memory SmoothAP weight on the deployed descriptor; 0 disables | 0.0 |
--global-ap-temperature |
float | Pairwise rank-relaxation temperature for GlobalAP | 0.05 |
--global-ap-topk |
integer | Different-identity hard negatives per GlobalAP query; all non-self same-identity positives remain | 500 |
--global-ap-memory-size |
integer | Stable sample-index capacity of the GlobalAP memory | 16384 |
--global-ap-momentum |
float | Descriptor momentum for repeated GlobalAP memory rows | 0.2 |
--global-ap-max-age |
integer | Maximum memory age in optimizer steps; 0 keeps all populated rows | 0 |
--global-ap-start-epoch |
integer | Last epoch with GlobalAP disabled | 20 |
--global-ap-ramp-end-epoch |
integer | Epoch where GlobalAP reaches full weight | 50 |
--global-ap-decay-start-epoch |
integer | Last epoch with GlobalAP at full weight | 130 |
--global-ap-decay-end-epoch |
integer | Epoch where GlobalAP returns to zero | 170 |
--hpgrd-cache-dir |
path | Offline human-privileged teacher cache used only during training | None |
--hpgrd-global-weight |
float | External-teacher identity-relational distillation weight | 0.0 |
--hpgrd-part-weight |
float | Visibility-aware fixed-mask part relational distillation weight | 0.0 |
--hpgrd-background-weight |
float | Background-intervention descriptor consistency weight | 0.0 |
--hpgrd-part-drop-weight |
float | Semantic part leave-out teacher consistency weight | 0.0 |
--hpgrd-part-drop-probability |
float | Probability of masking one visible semantic part in a student view | 0.0 |
--hpgrd-gradient-fraction |
float | Maximum shared-feature HP-GRD gradient norm as a fraction of the base objective | 0.3 |
--hpgrd-min-confidence |
float | Minimum fused pose/parser teacher confidence | 0.05 |
--early-id-loss-weight |
float | Temporary ID loss weight for the first --early-id-loss-epochs epochs; 0 disables | 0.0 |
--early-id-loss-epochs |
integer | Number of initial epochs using --early-id-loss-weight | 0 |
--center-loss-ramp-start-epoch |
integer | Epoch through which center loss weight stays at 0; 0 disables unless end is set | 0 |
--center-loss-ramp-end-epoch |
integer | Epoch where center loss reaches --center-loss-weight; 0 disables ramping | 0 |
--aux-ce-weight |
float | Relative CE weight for auxiliary branch classifiers; 1.0 preserves equal branch averaging | 1.0 |
--aux-ce-drop-epoch |
integer | Set auxiliary CE weight to 0 after this epoch; 0 keeps it active for all epochs | 0 |
--branch-loss-agg |
choice (mean | sum) |
How to aggregate multi-branch losses before weighting | mean |
--scale-balanced-branches / --no-scale-balanced-branches |
boolean | Give global, two-stripe, and four-stripe scales equal CE and descriptor weight | True |
--multilevel-suppression / --no-multilevel-suppression |
boolean | Train coarse and fine classifiers on evidence suppressed by the preceding scale | False |
--multilevel-suppression-ratio |
float | Maximum top-saliency spatial fraction suppressed in the auxiliary path | 0.15 |
--multilevel-suppression-loss-weight |
float | Peak weight of scale-balanced multilevel suppression CE | 0.2 |
--multilevel-suppression-start-epoch |
integer | Epoch through which multilevel suppression remains disabled | 20 |
--multilevel-suppression-ramp-end-epoch |
integer | Epoch where suppression ratio and auxiliary CE reach full strength | 50 |
--multilevel-suppression-decay-start-epoch |
integer | Last epoch at full multilevel suppression strength | 140 |
--multilevel-suppression-decay-end-epoch |
integer | Epoch where multilevel suppression and auxiliary CE return to zero | 170 |
--hierarchical-branch-attention / --no-hierarchical-branch-attention |
boolean | Refine the 1-to-2-to-4 branch descriptors with tree-masked token attention | False |
--branch-attention-token-dim |
integer | Token width used by hierarchical branch attention | 96 |
--branch-attention-num-heads |
integer | Attention heads used by hierarchical branch attention | 4 |
--branch-attention-num-layers |
integer | Transformer layers used by hierarchical branch attention | 1 |
--branch-attention-mlp-ratio |
float | Transformer MLP expansion ratio for hierarchical branch attention | 2.0 |
--branch-attention-dropout |
float | Dropout used by hierarchical branch attention | 0.0 |
--branch-set-attention / --no-branch-set-attention |
boolean | Refine all seven pooled 512-D branches with shared unmasked attention | False |
--branch-set-attention-token-dim |
integer | Shared token width used by branch-set attention | 128 |
--branch-set-attention-num-heads |
integer | Attention heads used by branch-set attention | 4 |
--branch-set-attention-num-layers |
integer | Transformer layers used by branch-set attention | 1 |
--branch-set-attention-mlp-ratio |
float | Transformer MLP expansion ratio for branch-set attention | 2.0 |
--branch-set-attention-dropout |
float | Dropout used by branch-set attention | 0.0 |
--multiscale-query-decoder / --no-multiscale-query-decoder |
boolean | Decode seven pooled queries against final, Stage-2, and Stage-0 spatial maps | False |
--query-decoder-dim |
integer | Shared query and spatial-memory token width | 128 |
--query-decoder-num-heads |
integer | Self- and cross-attention head count for the query decoder | 4 |
--query-decoder-num-layers |
integer | Number of residual multi-scale query decoder layers | 1 |
--query-decoder-mlp-ratio |
float | Query-decoder FFN expansion ratio | 2.0 |
--query-decoder-dropout |
float | Dropout used by the query decoder | 0.0 |
--hierarchical-late-interaction / --no-hierarchical-late-interaction |
boolean | Train the pair-conditioned hierarchical matcher and top-k reranker | False |
--late-interaction-dim |
integer | Shared branch-token width for hierarchical late interaction | 128 |
--late-interaction-num-heads |
integer | Cross-attention head count for hierarchical late interaction | 4 |
--late-interaction-num-layers |
integer | Pair-conditioned cross-attention layer count | 1 |
--late-interaction-sinkhorn-iters |
integer | Sinkhorn normalization iterations for pair alignment | 5 |
--late-interaction-null-tokens |
integer | Learned null evidence tokens per image | 1 |
--late-interaction-negative-identities |
integer | Detached-base hard negative identities per anchor | 16 |
--late-interaction-rerank-topk |
integer | Base-cosine candidates reranked by late interaction | 100 |
--late-interaction-base-score-init |
float | Initial contribution of the proven base descriptor score | 0.9 |
--late-interaction-loss-weight |
float | Full-weight multi-positive matcher loss coefficient | 0.2 |
--late-interaction-distill-weight |
float | Full-weight matcher-to-base ranking distillation coefficient | 0.05 |
--late-interaction-temperature |
float | Listwise matcher and distillation temperature | 0.07 |
--late-interaction-start-epoch |
integer | Epoch through which late-interaction auxiliary weights remain zero | 20 |
--late-interaction-ramp-end-epoch |
integer | Epoch where matcher and distillation reach full weight | 50 |
--mcpt-mode |
choice (none | dataset_boundaries | per_image_stage2 | shared_multiscale | foreground_aware_shared_multiscale) |
Monotonic canonical part transport treatment | none |
--mcpt-hidden-dim |
integer | Hidden row-predictor width for RGB-conditioned MCPT | 64 |
--mcpt-max-displacement |
float | Maximum normalized vertical displacement | 0.15 |
--mcpt-smoothness-weight |
float | Second-difference MCPT regularization weight | 0.01 |
--mcpt-identity-weight |
float | Initial identity-warp regularization weight | 0.02 |
--mcpt-identity-decay-epoch |
integer | Epoch where MCPT identity regularization reaches zero | 60 |
--mcpt-lr-multiplier |
float | MCPT learning-rate multiplier relative to the head | 2.0 |
--mcpt-start-epoch |
integer | Last epoch with transport forced exactly off | 10 |
--mcpt-ramp-end-epoch |
integer | Epoch where the MCPT gate schedule reaches full scale | 40 |
--mcpt-disabled-eval / --no-mcpt-disabled-eval |
boolean | Also validate with MCPT forcibly disabled | False |
--jpm / --no-jpm |
boolean | Enable training-only TransReID Jigsaw Patch Module | False |
--jpm-num-groups |
integer | Number of JPM shuffled patch groups | 4 |
--jpm-shift |
integer | Patch-token cyclic shift before JPM shuffle | 5 |
--jpm-token-dim |
integer | JPM auxiliary transformer bottleneck width | 96 |
--jpm-num-heads |
integer | JPM shared transformer attention heads | 4 |
--jpm-mlp-ratio |
float | JPM shared transformer MLP expansion | 4.0 |
--jpm-dropout |
float | JPM shared transformer dropout | 0.0 |
--jpm-id-loss-weight |
float | Mean JPM local identity-loss coefficient | 1.0 |
--jpm-metric-loss-weight |
float | Mean JPM local triplet-loss coefficient | 1.0 |
--metric-feature |
choice (auto | global | coarse_concat | raw_mean | raw_concat | concat_bn | dse_weighted | dse_mix) |
Feature representation used for metric losses when the model supports multiple branches | raw_concat |
--inference-feature |
choice (concat_bn | norm_concat_bn | global | raw_mean | raw_concat | visibility_weighted_parts | evidence_sinkhorn | dse_weighted | dse_mix) |
Feature representation emitted by CSL-TinyViT at validation/inference time | norm_concat_bn |
--feature-fusion |
choice (final | last2 | last3 | last4_layer0_target | last3_stage2_target | last3_stage1_concat | global_final_parts_stage1_concat | global_final_parts_fpn_layer0 | last3_fpn_stage1_add | last3_fpn_stage1_split | last3_panet_stage1_split | last3_panet_stage1_shared | last3_panet_stage1_scale_aware | last3_bifpn_stage1_split | last3_bifpn_stage1_branch_aware | global_final_parts_hierarchical_fpn | last3_fpn_stage2 | last3_pafpn_stage2 | last4_fpn_layer0_target | global_final_parts_stage2 | global_final_parts_stage2_semantic_residual | global_final_parts_stage2_hierarchical_control | global_final_parts_stage0_semantic_fine_reference | global_final_parts_stage0_semantic_fine | global_final_parts_stage0_fine_lite | global_final_parts_stage0_panet_lite | global_final_parts_stage0_bifpn_lite | global_final_parts_stage0_native_pyramid | global_final_parts_stage0_pool_first | late_concat_stage2 | weighted_last2 | weighted_last3 | normpres_last2 | normpres_last3 | dynamic_last3 | dynamic_last3_scale_token | dpt_fpn) |
CSL-TinyViT static or per-image dynamic spatial fusion before the ReID head | global_final_parts_stage0_semantic_fine |
--pyramid-resize-mode |
choice (bilinear | pool_nearest | pool_bilinear) |
Pyramid resizing: bilinear, average-pool down/nearest up, or average-pool down/bilinear up | bilinear |
--spatial-conv-mode |
choice (standard | depthwise_separable | bottleneck_depthwise) |
CSL-TinyViT neck/FPN 3x3 convolution implementation | depthwise_separable |
--post-fusion-mixer |
choice (none | dwconv) |
Optional zero-gated local mixer after CSL-TinyViT feature fusion | none |
--post-fusion-mixer-reduction |
integer | Channel reduction ratio for the post-fusion local mixer | 4 |
--post-fusion-mixer-kernel |
text | Post-fusion depthwise mixer kernel as H,W, e.g. 5,3 | 5,3 |
--post-fusion-mixer-gamma-init |
float | Initial residual scale for the post-fusion local mixer | 0.0 |
--feat-dim |
integer | Per-branch embedding dimension for ReID heads that support projection | 512 |
--neck-dim |
integer | Neck channel dimension for ReID backbones that support a feature neck | 512 |
--drop-path-rate |
float | Maximum stochastic-depth probability for CSL-TinyViT | 0.1 |
--timm-model-name |
text | Optional exact timm pretrained model tag for MobileNetV4 | `` |
--timm-head-mode |
choice (pooled | spatial | spatial_adapt_norm | spatial_linear | off) |
MobileNetV4 C5 head path, including spatial normalization controls | pooled |
--mobilenetv4-last-stride |
integer range (between 1 and 2) |
MobileNetV4 final spatial stride: 1 retains stride-16 C5; 2 keeps ImageNet topology | 2 |
--mobilenetv4-neck-mode |
choice (cnn | spatial_ln) |
MobileNetV4 ReID neck: CNN projection or TinyViT-matched spatial LayerNorm neck | cnn |
--attention-window-layout |
choice (legacy | rect) |
CSL-TinyViT attention windows: legacy square windows or ReID rectangular windows | rect |
--attention-bias |
choice (absolute | signed_factorized) |
CSL-TinyViT relative attention bias parameterization | absolute |
--interpolate-pretrained-attention-bias / --no-interpolate-pretrained-attention-bias |
boolean | Resize official absolute attention-bias tables for non-legacy attention windows | True |
--attention-mask / --no-attention-mask |
boolean | Mask padded tokens in CSL-TinyViT window attention | True |
--attention-shift / --no-attention-shift |
boolean | Alternate shifted CSL-TinyViT windows in attention stages 1 and 2 | False |
--stage3-global / --no-stage3-global |
boolean | Use full 24x8 attention in the final CSL-TinyViT block | False |
--stage3-downsample / --no-stage3-downsample |
boolean | Downsample only the final/global transformer stage while retaining Stage-2 local tokens | False |
--stage2-width-merge-after |
integer | Merge adjacent Stage-2 columns after this many blocks; 0 disables | 0 |
--stage2-mlp-ratio |
float | MLP expansion ratio used only in CSL-TinyViT Stage 2 | 4.0 |
--stage3-mlp-ratio |
float | MLP expansion ratio used only in CSL-TinyViT Stage 3 | 4.0 |
--stage2-depth |
integer | Number of transformer blocks used only in CSL-TinyViT Stage 2 | 6 |
--stage3-depth |
integer | Number of transformer blocks used only in CSL-TinyViT Stage 3 | 2 |
--width-first-hierarchy / --no-width-first-hierarchy |
boolean | Preserve vertical detail via 48x16 -> 48x8 -> 24x8 CSL-TinyViT stages | False |
--identity-registers / --no-identity-registers |
boolean | Exchange Stage-2/3 context through global identity-register tokens | False |
--identity-register-count |
integer | Number of global identity-register tokens | 4 |
--identity-register-dim |
integer | Bottleneck width used for identity-register communication | 128 |
--identity-register-num-heads |
integer | Attention heads used by identity-register communication | 4 |
--identity-register-dropout |
float | Training-time probability of dropping each identity register | 0.1 |
--identity-register-gate-init |
float | Initial residual broadcast gate for identity registers | 0.0 |
--identity-register-diversity-weight |
float | Weight for the weak identity-register diversity loss | 0.0 |
--identity-register-diversity-margin |
float | Maximum unpenalized cosine similarity between identity registers | 0.1 |
--native-branch-widths / --no-native-branch-widths |
boolean | Keep global/local/fine fusion maps at descriptor-native 512/256/128 widths | False |
--fine-map-dim |
integer | Fine Stage-0 fusion-map channels; 0 keeps the full neck width | 0 |
--compact-deployment-head / --no-compact-deployment-head |
boolean | Train seven teacher branches but emit one distilled 512-D descriptor at inference | False |
--reid-adapter-stages |
text | CSL-TinyViT attention stages that receive zero-gated ReID residual adapters | `` |
--reid-adapter-reduction |
integer | Channel reduction ratio for CSL-TinyViT ReID residual adapters | 4 |
--reid-adapter-suppression-tau |
float | RMS-saliency suppression threshold for ReID adapters; 0 disables | 0.0 |
--head-pool |
choice (avg | gem | dse | gelu_gem | relu_gem | softplus_gem) |
Pooling layer used by CSL-TinyViT multi-branch heads | gelu_gem |
--head-parts |
text | CSL-TinyViT head granularities, e.g. 1,2 for global+2 parts or 1,2,4 for MGN | 1,2,4 |
--head-type |
choice (standard | gpc_lite | stage2_channel2 | multiscale_channel2 | stage2_pg | stage2_gpc_lite | stage2_gpc_lite_gate | stage2_pg_gate | suppressed_global | body_slot) |
CSL-TinyViT branch head, including optional channel and G/P/C specialists | standard |
--multiscale-channel-alpha |
float | Channel power amplitude mixed inside each global/coarse/fine scale | 0.5 |
--body-slot-mode |
choice (recurrent_read | recurrent_read_write) |
Persistent body-slot communication: read-only Tier B or zero-gated read/write Tier C | recurrent_read |
--body-slot-alpha |
float | Descriptor power allocated to the 512-D global stream | 0.45 |
--body-slot-visibility-floor |
float | Minimum retrieval power retained for every body slot | 0.05 |
--part-pooling |
choice (stripes | overlap_stripes | tokens | semantic_parts) |
CSL-TinyViT local pooling: fixed, overlapping, learned-token, or semantic-visibility parts | stripes |
--num-part-tokens |
integer | Number of learned local/evidence queries for token or semantic-part pooling | 4 |
--evidence-num-roles |
integer | Number of latent semantic role bins for CSL-TinyViT evidence tokens | 8 |
--decouple-patterns / --no-decouple-patterns |
boolean | Use separate zero-initialized residual adapters for global and local features | False |
--pattern-adapter-dim |
integer | Bottleneck width of each global/local pattern adapter | 128 |
--stripe-visibility / --no-stripe-visibility |
boolean | Learn a per-image confidence for each fixed local stripe | False |
--drop-global-aux / --no-drop-global-aux |
boolean | Add a training-only dropped-global CE auxiliary classifier to the standard CSL-TinyViT head | False |
--drop-global-aux-ratio |
float | Horizontal activation-band ratio suppressed by --drop-global-aux | 0.25 |
--branch-aware-metric / --no-branch-aware-metric |
boolean | Apply metric loss separately to CSL-TinyViT global and part branches | False |
--branch-metric-part-weight |
float | Weight for each part branch metric loss when branch-aware metric is enabled | 0.5 |
--evidence-alignment-loss-weight |
float | Weight for batch Sinkhorn evidence alignment loss; 0 disables | 0.0 |
--evidence-alignment-margin |
float | Negative-pair margin for evidence alignment loss | 0.2 |
--evidence-sinkhorn-iters |
integer | Sinkhorn iterations for evidence alignment and reranking | 20 |
--evidence-sinkhorn-temperature |
float | Sinkhorn temperature for evidence alignment and reranking | 0.1 |
--evidence-rerank-topk |
integer | Gallery top-K reranked with evidence Sinkhorn distance; 0 reranks all | 100 |
--evidence-null-loss-weight |
float | Weight for explicit final-token null/background supervision; 0 disables | 0.0 |
--evidence-diversity-loss-weight |
float | Weight for role/descriptor diversity regularization across evidence tokens | 0.0 |
--head-warmup-epochs |
integer | Train only CSL-TinyViT neck/head for the first N epochs | 0 |
--head-warmup-lr-mult |
float | LR multiplier for neck/head parameter groups during head warmup | 2.0 |
--eta-min |
float | Minimum learning rate for cosine annealing schedule | 1e-07 |
--pretrained / --no-pretrained |
boolean | Use ImageNet-pretrained backbone | True |
--pretrained-weights |
file | Local exact-backbone checkpoint from human pretraining; overrides model-zoo init | None |
--device |
text | PyTorch device: cpu, mps, or cuda:N (e.g. cuda:0). | mps |
--project |
path | Save directory | runs/reid_train |
--name |
text | Experiment name | exp |
--num-workers |
integer | Dataloader workers | 4 |
--seed |
integer | Global random seed for Python, NumPy, PyTorch, samplers, and dataloader workers | 0 |
--deterministic / --no-deterministic |
boolean | Require deterministic PyTorch algorithms and backend behavior | True |
--eval-datasets |
text | Comma-separated list of extra datasets for cross-domain evaluation (e.g. duke,cuhk03,msmt17) | `` |
--flip-tta / --no-flip-tta |
boolean | Use horizontal flip augmentation during validation (default: recipe value) | None |
--ema-decay |
float | EMA momentum decay for model averaging (e.g. 0.999). Disabled by default. Inspired by DynaMix | 0.0 |
--gaussian-blur / --no-gaussian-blur |
boolean | Apply random Gaussian blur augmentation | True |
--color-jitter / --no-color-jitter |
boolean | Apply color jitter augmentation (auto-enabled for transformer-family recipes) | True |
--random-grayscale |
float | Probability of random grayscale conversion (0 to disable) | 0.1 |
--random-erasing |
float | Probability of random erasing augmentation (0 to disable) | 0.5 |
--random-patch / --no-random-patch |
boolean | Apply random patch augmentation | True |
--random-crop-scale |
float | Random2DTranslation resize factor before crop; 1.05 matches LMBN implementation | 1.05 |
--color-augmentation / --no-color-augmentation |
boolean | Enable additional color augmentation mix used by LMBN-style recipes | True |
--background-mosaic / --no-background-mosaic |
boolean | Replace only the anchor background with a four-source donor mosaic | False |
--background-mosaic-mask-dir |
path | Mask root containing primary/ anchor and all_people/ donor trees | None |
--background-mosaic-probability |
float | Maximum probability of identity-preserving background mosaic | 0.3 |
--background-mosaic-start-epoch |
integer | Keep background mosaic disabled through this epoch | 10 |
--background-mosaic-ramp-end-epoch |
integer | Epoch at which background mosaic reaches its maximum probability | 30 |
--background-mosaic-min-foreground-ratio |
float | Reject anchor masks retaining less than this image fraction | 0.2 |
--background-mosaic-max-foreground-ratio |
float | Reject anchor masks retaining more than this image fraction | 0.9 |
--background-mosaic-feather |
float | Gaussian mask-edge feather radius in source-image pixels | 1.5 |
--background-mosaic-dilation |
integer | Foreground-mask dilation radius before background compositing | 2 |
--background-mosaic-occluder-probability |
float | Probability of adding a boundary-entering person occluder | 0.0 |
--background-mosaic-occluder-min-area |
float | Minimum image fraction covered by a context occluder | 0.05 |
--background-mosaic-occluder-max-area |
float | Maximum image fraction covered by a context occluder | 0.2 |
--same-id-part-mosaic / --no-same-id-part-mosaic |
boolean | Copy body-aligned regions from same-ID batch donors | False |
--same-id-part-mosaic-probability |
float | Probability of selecting each sample for same-ID part mosaic | 0.35 |
--same-id-part-mosaic-max-regions |
integer | Maximum number of body regions copied per augmented sample | 2 |
--same-id-part-mosaic-min-area |
float | Minimum total image fraction replaced by same-ID regions | 0.15 |
--same-id-part-mosaic-max-area |
float | Maximum total image fraction replaced by same-ID regions | 0.4 |
--same-id-part-mosaic-boundary-jitter |
float | Body-region boundary jitter as a fraction of image height | 0.05 |
--same-id-part-mosaic-cross-camera-rate |
float | Rate of preferring different-camera same-ID donors when available | 1.0 |
--same-id-part-mosaic-min-unaltered |
float | Minimum fraction of each training batch left unaltered | 0.5 |
--pav-mosaic / --no-pav-mosaic |
boolean | Warp semantic body parts from pose-aligned same-ID donors | False |
--pav-metadata-dir |
path | PAV metadata root generated by tools.create_market1501_pav_metadata | None |
--pav-mosaic-probability |
float | Maximum scheduled probability of PAV-Mosaic | 0.25 |
--pav-mosaic-max-parts |
integer | Maximum semantic body parts replaced per PAV sample | 3 |
--pav-mosaic-max-foreground-replacement |
float | Maximum anchor-foreground fraction replaced by PAV | 0.45 |
--pav-mosaic-cross-camera-rate |
float | Rate of preferring cross-camera same-ID PAV donors | 0.8 |
--pav-mosaic-different-pose-rate |
float | Rate of favoring pose-diverse PAV donors | 0.5 |
--pav-mosaic-min-keypoint-confidence |
float | Minimum pose-keypoint confidence for a semantic part | 0.5 |
--pav-mosaic-min-unaltered |
float | Minimum fraction of each batch reverted to a clean view | 0.5 |
--pav-mosaic-warmup-epochs |
integer | Epochs used to ramp PAV probability from zero | 40 |
--pav-mosaic-decay-start-epoch |
integer | Epoch at which final PAV probability decay begins | 170 |
--pav-mosaic-final-probability-scale |
float | Fraction of maximum PAV probability retained at the final epoch | 0.5 |
--pav-consistency-weight |
float | Clean-versus-PAV cosine embedding consistency weight | 0.0 |
--clean-student-consistency-weight |
float | Weight for clean-teacher query and descriptor consistency on augmented RGB views | 0.0 |
--anatomical-auxiliary / --no-anatomical-auxiliary |
boolean | Train RGB anatomical tokens from privileged pose/mask targets | False |
--anatomical-metadata-dir |
path | Pose/person-mask metadata root used only during training | None |
--anatomical-person-mask-dir |
path | External high-confidence person-mask directory used only during training | None |
--anatomical-min-keypoint-confidence |
float | Minimum pose confidence used to rasterize anatomical targets | 0.5 |
--anatomical-token-dim |
integer | Width of the six grid-aligned anatomical tokens (minimum 16) | 128 |
--anatomical-distill-weight |
float | Weight for same-scale mask-routed token consistency | 0.2 |
--anatomical-attention-weight |
float | Weight for scale-aware anatomical cell-routing KL supervision | 0.1 |
--anatomical-foreground-weight |
float | Weight for RGB foreground mask supervision | 0.15 |
--anatomical-semantic-part-weight |
float | Weight for training-only six-part semantic BCE/Dice supervision | 0.0 |
--anatomical-visibility-weight |
float | Weight for per-part visibility supervision | 0.05 |
--anatomical-contrastive-weight |
float | Weight for visible same-part cross-camera contrastive learning | 0.1 |
--anatomical-descriptor-distill-weight |
float | Weight for local semantic anatomy distillation into the final descriptor | 0.0 |
--anatomical-branch-distill-weight |
float | Weight for EMA anatomy relations distilled into deployed 1/2/4-stripe branches | 0.0 |
--anatomical-branch-global-coefficient |
float | Global-level share of anatomical branch distillation | 0.2 |
--anatomical-branch-coarse-coefficient |
float | Two-stripe-level share of anatomical branch distillation | 0.3 |
--anatomical-branch-fine-coefficient |
float | Four-stripe-level share of anatomical branch distillation | 0.5 |
--anatomical-pose-teacher-weight |
float | Weight for the selected privileged pose-teacher objective | 0.0 |
--anatomical-query-distill-weight |
float | Weight for masked-teacher to unrestricted-RGB query distillation | 0.0 |
--anatomical-query-relational-distill-weight |
float | Weight for visibility-weighted teacher/student query relation matching | 0.0 |
--anatomical-query-diversity-weight |
float | Weight discouraging collapse among RGB anatomical queries | 0.0 |
--anatomical-query-diversity-margin |
float | Maximum allowed cosine similarity between distinct queries | 0.1 |
--anatomical-part-triplet-weight |
float | Weight for visible same-part cross-camera hard triplets | 0.0 |
--anatomical-target-type |
choice (deterministic_scale_aware_geometry | learned_pose_concat_ema | learned_pose_semantic_ema | learned_pose_semantic_fused_ema | privileged_mask_pose_attention | decoupled_pose_parsing_teacher | body_slot_privileged_ema) |
Anatomical teacher implementation used for training | deterministic_scale_aware_geometry |
--anatomical-teacher-momentum |
float | EMA momentum for learned pose-teacher targets | 0.99 |
--anatomical-multiscale / --no-anatomical-multiscale |
boolean | Supervise matched anatomical roles on Stage-2 local and Stage-0 fine maps | False |
--anatomical-accessory-query / --no-anatomical-accessory-query |
boolean | Add a training-only seventh mask-supervised bag/accessory query | False |
--anatomical-deployment / --no-anatomical-deployment |
boolean | Append six pose-supervised RGB semantic-part tokens to the retrieval descriptor | False |
--anatomical-deployment-dim |
integer | Deployed width of each RGB anatomical part token | 64 |
--anatomical-deployment-alpha |
float | Relative retrieval energy assigned to the deployed anatomical descriptor | 0.25 |
--anatomical-deployment-id-weight |
float | Persistent visibility-weighted ID loss for deployed anatomical parts | 0.25 |
--anatomical-deployment-metric-weight |
float | Persistent cross-camera contrastive loss for deployed anatomical parts | 0.1 |
--anatomical-local-scale-weight |
float | Balanced contribution of the Stage-2 anatomical student | 0.6 |
--anatomical-fine-scale-weight |
float | Balanced contribution of the Stage-0 anatomical student | 0.4 |
--anatomical-cross-scale-weight |
float | Weight aligning within-image anatomical role relations across scales | 0.05 |
--anatomical-pose-only-reliability |
float | Reliability multiplier for pose targets without a person mask | 0.35 |
--anatomical-min-effective-coverage |
float | Minimum fraction of training samples with usable anatomical targets | 0.0 |
--anatomical-student-start-epoch |
integer | Last epoch before shared anatomical supervision starts | 0 |
--anatomical-student-ramp-end-epoch |
integer | Epoch at which anatomy distillation reaches full weight | 0 |
--anatomical-query-start-epoch |
integer | Last epoch before decoupled query distillation and triplets start | 20 |
--anatomical-query-ramp-end-epoch |
integer | Epoch at which decoupled query losses reach full weight | 50 |
--anatomical-fine-start-epoch |
integer | Last epoch before fine-map anatomy starts; 0/0 follows the shared student schedule | 0 |
--anatomical-fine-ramp-end-epoch |
integer | Epoch at which fine-map and cross-scale anatomy reach full weight | 0 |
--anatomical-decay-start-epoch |
integer | Epoch at which all anatomical losses begin decaying | 0 |
--anatomical-decay-end-epoch |
integer | Epoch at which all anatomy losses become zero | 0 |
--anatomical-temperature |
float | Temperature for anatomical supervised contrastive learning | 0.07 |
--resume |
path | Resume training from a checkpoint dir or last.pt file | None |
--help |
boolean | Show this message and exit. | False |