技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-preparation【数据与研究】Prepare and validate GeoSeg LoveDA masks and Vaihingen, Potsdam, and UAVid image-mask patches with deterministic, path-explicit workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill to stage externally acquired datasets, convert LoveDA labels, split ISPRS/UAVid imagery into loader-compatible patches, and diagnose pairing, encoding, suffix, and shape failures. This skill does not download data, train a model, load checkpoints, evaluate predictions, or run inference.
Conceptually hand processed directories to the sibling training sub-skill only after paired-file and label checks. Route model/backbone and config choices to model-and-config, and route checkpoint evaluation or inference rendering to evaluation-inference.
--overwrite; writes use temporary files and
atomic replacement. Do not point a training loader at a --gt RGB
visualization directory.LoveDA conversion (repeat for each Urban/Rural Train or Val mask directory):
python /path/to/convert_loveda_masks.py \
--mask-dir /abs/data/LoveDA/Train/Rural/masks_png \
--output-mask-dir /abs/data/LoveDA/Train/Rural/masks_png_convert
Vaihingen 1024 training patches:
python /path/to/split_vaihingen_patches.py \
--img-dir /abs/data/vaihingen/train_images \
--mask-dir /abs/data/vaihingen/train_masks \
--output-img-dir /abs/data/vaihingen/train/images_1024 \
--output-mask-dir /abs/data/vaihingen/train/masks_1024 \
--mode train --split-size 1024 --stride 512
Potsdam RGB 1024 patches:
python /path/to/split_potsdam_patches.py \
--img-dir /abs/data/potsdam/train_images \
--mask-dir /abs/data/potsdam/train_masks \
--output-img-dir /abs/data/potsdam/train/images_1024 \
--output-mask-dir /abs/data/potsdam/train/masks_1024 \
--mode train --split-size 1024 --stride 1024 --rgb-image
UAVid nested sequence patches:
python /path/to/split_uavid_patches.py \
--input-dir /abs/data/uavid/uavid_train_val \
--output-img-dir /abs/data/uavid/train_val/images \
--output-mask-dir /abs/data/uavid/train_val/masks \
--mode train --split-size-h 1024 --split-size-w 1024 \
--stride-h 1024 --stride-w 1024
Use --help on each script to confirm defaults and flags. All four scripts
require explicit paths in this adapted runtime; this avoids silently writing
relative to an arbitrary checkout. --mode is retained for compatibility and
output semantics. Vaihingen/Potsdam train mode emits deterministic source,
horizontal-flip, and vertical-flip variants; validation/test emits one. UAVid
emits no augmentation, as in the source utility. The adaptations intentionally
do not reproduce source multiprocessing or random crop/car augmentation: they
prioritize reproducible, auditable patch production while preserving the
source flags and loader file contracts.
A successful preparation handoff must include:
numpy.unique/palette validation;The checkout had no bundled datasets, tests, docs, or examples beyond the
README/configs/tools/root scripts. LoveDA's validation dataset is constructed
at import and therefore requires an external Val layout. The verified
inspection environment was Python 3.8 with OpenCV/Pillow-compatible tooling;
this sub-skill scripts use only Python plus Pillow and NumPy. Do not infer that
training dependencies or optional mamba_ssm are installed from preprocessing
success.