技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-model-setup【数据与研究】Prepare and validate DINO's COCO-style inputs, model/config shapes, and CUDA deformable-attention backend before training or evaluation.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route before a DINO training or evaluation run when the dataset, model configuration, or compiled backend is new, changed, or suspect. It builds no dataset and does not launch training, inference, or evaluation.
Environment gate. Run
scripts/check_dino_environment.py
with the strict requirements appropriate to the requested run. For the
standard CUDA DINO path, use:
python scripts/check_dino_environment.py --require-cuda \
--require-extension --require-coco --require-runtime --pip-check --json
It checks package imports, PyTorch/CUDA visibility, CUDA_HOME/nvcc
observations, the MultiScaleDeformableAttention import, and optionally
pip check. Add --require-panoptic only for the panoptic branch. Use
--smoke-cuda and --smoke-extension only when a free visible GPU is
available; import/symbol success is not the repository's numerical
operator gate.
Data gate. Run
scripts/validate_coco_layout.py against
an existing COCO root. Validate only the requested split(s); add the
optional panoptic root only when panoptic data is actually needed.
Target gate. Confirm the dataset yields the fields and coordinate
conventions in data formats, including the
num_classes/category-ID convention and transformed size versus
orig_size.
Model gate. Compare the selected config with the backbone, returned feature levels, hidden dimension, attention heads, number of queries, class count, and denoising label-book rules in model architecture.
Extension gate. If the model will run its deformable encoder/decoder, compile and run the repository's CUDA operator test as described in environment. A package import alone is not a numerical proof.
Stop on a failed strict gate. Report the exact failed check and apply the corresponding recovery in troubleshooting rather than silently falling back to an incompatible backend.
coco_path as a read-only input to this route. The standard instance
layout is train2017/, val2017/, and annotations/; the expected JSON
names are instances_train2017.json and instances_val2017.json. The test
split uses test2017/ and image_info_test-dev2017.json when requested.DATA_COPY_SHILONG
path here: its helper removes/recreates paths and is outside this skill's
safety boundary.num_classes is a classifier width
/ maximum-object-ID-plus-one convention, not simply the count of category
names. Recheck dn_labelbook_size after changing it.(center_x, center_y, width, height).Record the following for the next route: validated root and split(s), JSON files checked, image/annotation counts and warnings, whether masks/panoptic paths were checked, config name and salient shape settings, package/CUDA observations, extension import and numerical-test status, and unresolved backend limitations. Never record private machine prefixes, private dataset locations, or credentials.
This is a preparation and validation route. It deliberately excludes dataset
acquisition, checkpoint acquisition, training/evaluation launch commands,
checkpoint surgery, destructive copy helpers, and claims that a CPU execution
is an equivalent substitute for DINO's CUDA multi-scale deformable attention.
The supplied scripts are read-only except for their --fixture mode, which
creates and removes only a temporary self-test fixture.
This skill was distilled from the repository README installation/data sections;
requirements.txt; datasets/coco.py, coco_panoptic.py, transforms.py,
dataset.py, and data_util.py; the deformable-attention setup, test,
function, and module files under models/dino/ops/; models/dino/backbone.py,
deformable_transformer.py, and dino.py; util/slconfig.py; all
config/DINO/*.py; tools/README.md; and the verified environment report
for this repository. The report established a successful CUDA extension build
and import, COCO dependency imports, and pip check; it did not establish a
full training or evaluation result.