data-and-datasets
Operate FastReID dataset registries, built-in layouts, custom dataset classes, dataloaders, transforms, samplers, and safe data preflight checks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-and-datasets
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate FastReID dataset registries, built-in layouts, custom dataset classes, dataloaders, transforms, samplers, and safe data preflight checks.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-api.md8.8 KB
- 参考文档references/dataset-formats.md6.8 KB
- 参考文档references/troubleshooting.md7.0 KB
- 脚本scripts/validate_dataset_layout.py18.6 KB
03 SKILL.md 正文
FastReID data and datasets
Use this sub-skill when a FastReID task involves dataset roots, FASTREID_DATASETS, built-in dataset names, custom dataset registration, ImageDataset/CommDataset tuple shape, train/test dataloader APIs, transforms, samplers, or preflight checks before training/evaluation.
Start here
- Identify the dataset name exactly as FastReID expects it, for example
Market1501,DukeMTMC,MSMT17,VeRi,VehicleID,SmallVehicleID,VeRiWild, orSmallVeRiWild. - Resolve the dataset root that FastReID will receive:
FASTREID_DATASETSif set, otherwise a relativedatasetsdirectory from the process working directory. - Validate the tree before launching any train/eval job:
python sub-skills/data-and-datasets/scripts/validate_dataset_layout.py --root <datasets-root> --dataset Market1501
- If using a custom dataset, import the module that registers it before calling FastReID's train/test loader builders.
Runtime references and scripts
references/dataset-formats.md: use for built-in dataset names, expected directory/list-file layouts, file-name parsing rules, and the canonical(img_path, pid, camid)item schema.references/data-api.md: use forDATASET_REGISTRY,ImageDataset,CommDataset,build_reid_train_loader,build_reid_test_loader, transform options, sampler choices, and custom dataset registration patterns.references/troubleshooting.md: use when FastReID cannot find datasets, parses pid/camid incorrectly, query/gallery is empty, samplers fail because of batch settings, or old dataset tests/imports conflict with this API.scripts/validate_dataset_layout.py: safe no-download validator for selected built-in layout roots; run it before expensive train/eval commands or when diagnosing partial dataset trees.
Route boundaries
- Training loops, schedulers, checkpoints, distributed launch, evaluator output, and train/eval command construction belong to
../training-and-evaluation/. - Model registry, backbone/head/meta-architecture construction, predictors, feature tensors, and checkpoint loading belong to
../modeling-and-inference/. - Source-only package setup, config inheritance, YAML merge behavior, and config recipe selection belong to
../setup-and-configuration/. - Project-specific datasets under FastReID extension projects belong to
../deployment-and-projects/; use this sub-skill only for the shared registry/layout mechanics they rely on.
Verified operating facts
FASTREID_DATASETSdefaults todatasetswhen the environment variable is unset.- Dataset records are tuples
(img_path, pid, camid). Training built-ins usually prefix trainingpid/camidwith a dataset name string beforeCommDataset(..., relabel=True)maps them to contiguous integers. - Built-in registry keys include person ReID datasets (
Market1501,DukeMTMC,MSMT17,CUHK03,VIPeR,GRID,iLIDS, etc.) and vehicle ReID datasets (VeRi,VehicleID,SmallVehicleID,MediumVehicleID,LargeVehicleID,VeRiWild,SmallVeRiWild,MediumVeRiWild,LargeVeRiWild). - API signatures verified for this FastReID version include
build_reid_train_loader(train_set, *, sampler=None, total_batch_size, num_workers=0)andbuild_reid_test_loader(test_set, test_batch_size, num_query, num_workers=4); the config system also permits calls such asbuild_reid_train_loader(cfg, combineall=...)andbuild_reid_test_loader(cfg, dataset_name=...).
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).