data-preparation
It prepares, validates, loads, normalizes, transforms, inspects, and customizes MMSkeleton skeleton datasets while preserving loader and tensor-axis contracts.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- data-preparation
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- It prepares, validates, loads, normalizes, transforms, inspects, and customizes MMSkeleton skeleton datasets while preserving loader and tensor-axis contracts.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/data-formats.md6.3 KB
- 参考文档references/transforms.md6.0 KB
- 参考文档references/troubleshooting.md5.8 KB
03 SKILL.md 正文
MMSkeleton data preparation
Use this skill when the input is already skeleton data, or when a pose
extraction result must be checked before recognition. It covers the JSON
annotation contract, category labels, the SkeletonLoader/DataPipeline
boundary, and the transforms exposed as datasets.skeleton.*.
Route first
- Read data-formats.md before authoring or loading JSON. Run the bundled validator on a file or directory before training or evaluation.
- Read transforms.md when selecting normalization, masking, temporal sampling, axis permutation, or tuple conversion. Preserve the distinction between annotation keypoint lists and model tensors.
- Read troubleshooting.md when validation, loading, or a pipeline stage fails.
- Route ST-GCN graph/model construction, checkpoint use, and recognition train
or test commands to the
recognitionsub-skill. Route raw-video detector extraction, MMDetection, or HRNet work to thepose-estimationsub-skill; hand its produced JSON back here for validation. This skill does not claim detector execution.
Operating procedure
- Treat each JSON object as one sample. Check
info,annotations, andcategory_id, then check every annotation's frame, effective person slot, channel count, and finite numeric value. Use--num-trackwhen the target loader configuration has a known person-slot limit. - Configure
SkeletonLoaderwith the JSON directory,num_track, and (only when it exactly matches the file)num_keypoints. The loader allocates(C, V, T, M)float32 data and fills sparse(channel, joint, frame, person)locations with zeros. It usesperson_idwhen present and falls back toidwhenperson_idis null; avoid relying on the loader's silent dropping of out-of-range records. - Apply transforms in a deliberate order: resolution normalization, optional
visibility masking, temporal sizing/augmentation, then the explicit axis
permutation expected by the model and
to_tuple. The common ST-GCN path changes(C,V,T,M)to(C,T,V,M)and batching addsN, yielding(N,C,T,V,M). - For a custom feeder, keep the same boundary: a data source used by
DataPipelineshould return a mutable sample dictionary withdataandcategory_id, and pipeline stages should finish with the tuple expected by the consumer. A feeder that bypassesDataPipelinemust document and return the consumer's exact tensor/label contract rather than guessing axes. - Inspect masks and channel statistics with the dataset-analysis pipeline
only after the sample shape and visibility semantics are known. Do not use
an unknown graph layout or silently pad a joint-count mismatch; route those
model decisions to the
recognitionsub-skill.
Fast checks
python scripts/validate_skeleton_json.py --help
python scripts/validate_skeleton_json.py --input path/to/sample.json
python scripts/validate_skeleton_json.py --input path/to/dataset --category-annotations path/to/categories.json --num-track 2
The validator is read-only, reports file and annotation locations, accepts a
missing category mapping only when the sample label is -1, and exits nonzero
for malformed or unsafe data. Its exact checks and category matching rules are
in data-formats.md.
Internal references
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.