data-transforms-datasets
Prepare and validate GluonCV datasets, data transforms, batchify functions, metrics, and visualization helpers.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-transforms-datasets
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Prepare and validate GluonCV datasets, data transforms, batchify functions, metrics, and visualization helpers.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md13.9 KB
- 参考文档references/datasets-and-transforms.md12.9 KB
- 参考文档references/troubleshooting.md8.3 KB
- 脚本scripts/validate_detection_record.py14.4 KB
03 SKILL.md 正文
GluonCV data transforms and datasets
Use this sub-skill when the task is about GluonCV dataset roots/layouts, object-detection records, segmentation/classification/video/tracking/re-id/depth datasets, image or bounding-box transforms, preset data transforms, DataLoader batchification, data metrics, or visualization helpers.
Natural triggers
Load this sub-skill for requests mentioning:
- GluonCV datasets or
gluoncv.data.*classes. - Pascal VOC, COCO, ADE20K, Cityscapes, ImageNet, Kinetics, UCF101, HMDB51, Something-Something-V2, Market1501, OTB, KITTI, MHP, VisDrone, LST, or RecordIO.
- Bounding-box transforms, image resize/crop/flip/ten-crop, mask/pose/video transforms, or detector presets for SSD, Faster R-CNN, Mask R-CNN, YOLO, and CenterNet.
Stack,Pad,Append,Tuple,FasterRCNNTrainBatchify,MaskRCNNTrainBatchify,DetectionDataLoader, orRandomTransformDataLoader.- Dataset preparation helpers, frame extraction, train/val list building,
--download-dir,--no-download,--overwrite, or ImageRecord conversion. - Detection annotation validation before passing records into GluonCV transforms or training scripts.
Route away
- Model name selection, model instantiation, custom heads, and MXNet model dry-runs: use
../mxnet-model-zoo/. - PyTorch action-recognition models, configs, DirectPose, or Torch DDP: use
../torch-video-workflows/. - Full training/evaluation/demo command assembly from the script zoo: use
../training-evaluation-scripts/. - AutoGluon wrappers, deployment, ONNX, TVM, or export: use
../automl-deployment-export/.
First workflow choice
- Identify the data family and root. Use datasets-and-transforms.md to pick a dataset class, expected layout, split argument, and optional dependencies. Prefer passing explicit
root=/setting=instead of relying on default user home directories when an experiment uses project-local data. - Validate custom detection annotations early. For simple JSON records, run validate_detection_record.py before involving MXNet/GluonCV. For LST/RecordIO or VOC-like data, compare against the schemas in datasets-and-transforms.md.
- Wire transforms with label semantics. Geometric image transforms that change size, crop, or flip require the corresponding bbox/mask/pose transform. Use api-reference.md for coordinate order, size argument order, preset transform inputs, and batchify pairing.
- Choose batchify by output shape. Use
Stackonly for same-shaped arrays,Padfor variable-length labels,Appendfor ragged per-sample structures, andTuple(...)to apply a per-field function to(image, label, ...)samples. - Add diagnostics and visual checks. Use GluonCV visualization helpers (
plot_bbox,plot_image, segmentation palettes) and metrics only after validating data format. Keep display/non-headless concerns separate from dataset parsing. - If data is large or network-bound, plan without running downloads. Dataset preparation scripts are reference-only for this skill; record the required archives, flags, generated folders/lists/RecordIO files, and storage constraints before asking to run a large command.
Core facts to preserve
- Detection labels consumed by GluonCV dataset/transforms use
[xmin, ymin, xmax, ymax, class_id]plus optional extra columns. VOC labels include an additionaldifficultcolumn. - Bbox size tuples are
(width, height), while image tensors are HWC. Mixing these orders is a common source of silent annotation corruption. - COCO detection/instance/keypoints classes rely on
pycocotoolsand the COCO category order matching the class list. - Video datasets generally require decoded frame folders plus a setting/list file;
decordis optional for direct video loading. - Most built-in datasets default under
~/.mxnet/datasets/...; production workflows should pass explicit roots when data is not there.
References and helper
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).