training-evaluation
Train, evaluate, configure, and inspect Torchreid data workflows for person re-identification.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-evaluation
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Train, evaluate, configure, and inspect Torchreid data workflows for person re-identification.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/api-reference.md8.9 KB
- 参考文档references/configuration.md11.1 KB
- 参考文档references/data-formats.md8.6 KB
- 参考文档references/troubleshooting.md8.2 KB
- 参考文档references/workflows.md10.8 KB
- 脚本scripts/compute_mean_std.py9.3 KB
- 脚本scripts/parse_test_results.py6.0 KB
- 脚本scripts/torchreid_train_eval.py29.2 KB
03 SKILL.md 正文
Torchreid training and evaluation
Use this sub-skill when a task asks for Torchreid image/video ReID training, checkpoint evaluation, dataset/data-manager setup, YACS-style config edits, sampler/optimizer/lr-scheduler choices, mean/std analysis, or split-log parsing. It covers Torchreid 1.4.0 (torchreid distribution/import) and the unified scripts/main.py-style workflow in a self-contained form.
Route here for
- Training or evaluating OSNet/ResNet-family ReID models on Market1501, DukeMTMC-reID, MSMT17, CUHK03, MARS, iLIDS-VID, PRID2011, or custom datasets.
- Same-domain, cross-domain, multi-source, target-training-loader, and video-ReID data manager construction.
ImageDataManager,VideoDataManager,Engine.run,ImageSoftmaxEngine,ImageTripletEngine,VideoSoftmaxEngine,VideoTripletEngineusage.- YACS config overrides such as
model.load_weights,test.evaluate,data.save_dir,sampler.train_sampler,train.lr_scheduler,cuhk03.classic_split. - Dataset layout checks, custom dataset registration,
compute_mean_std, andparse_test_res-style log analysis.
Route elsewhere
- Embedding-only APIs,
FeatureExtractor, model-key catalogs, raw distance matrices, CMC/mAP API internals, re-ranking details, model complexity, activation maps, or ranked visualization internals: use../feature-extraction/SKILL.md. - ONNX, OpenVINO, TFLite, or other deployment/export work: use
../model-export/SKILL.md. - Deep Mutual Learning, OSNet-AIN NAS, or PA-100K attribute-recognition project workflows are excluded long-tail gaps in this generated skill; do not claim runnable coverage unless a future extension bundles those project sources.
Operating sequence
- Determine whether the request is train, evaluate/test-only, data inspection, config generation, mean/std, or log parsing.
- Check dataset type and layout in references/data-formats.md. Do not assume downloads are available; many public dataset links are fragile or gated.
- Build or edit the config using references/configuration.md. Prefer explicit dotted opts for final commands.
- Choose the workflow recipe from references/workflows.md. Use CUDA only as an optional performance backend unless the user has already verified it.
- Confirm API signatures and output structures in references/api-reference.md before writing code.
- If errors appear, diagnose with references/troubleshooting.md.
Bundled safe helpers
These scripts are safe by default: --help never imports heavy packages, and no helper runs training by default.
- scripts/torchreid_train_eval.py: prints unified Torchreid train/eval command plans, merges embedded official templates or a supplied YAML config, validates common opts, and can write a resolved config.
- scripts/compute_mean_std.py: checks dataset prerequisites and computes channel statistics only when
--computeis explicitly supplied. - scripts/parse_test_results.py: parses split directories containing
test.log*files and reports missing or incomplete logs clearly.
Safe verification quick checks
From this sub-skill directory, future agents can run:
python scripts/torchreid_train_eval.py --help
python scripts/torchreid_train_eval.py --template im_osnet_x1_0_softmax_256x128_amsgrad_cosine --mode eval --root /path/to/reid-data --weights /path/to/model.pth.tar --visrank --save-dir log/eval_osnet --dry-run
python scripts/compute_mean_std.py --help
python scripts/compute_mean_std.py /path/to/reid-data market1501 --check-only
python scripts/parse_test_results.py --help
Only run actual training/evaluation/mean-std computation after the user provides local datasets, checkpoint paths when needed, and compute/backend approval.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).