技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
training-evaluation【数据与研究】Plan and safely run SOLO/MMDetection-era training, checkpoint evaluation, log analysis, robustness benchmarking, and experimental FLOPs measurements, with explicit CUDA, data, distributed, and legacy dependency caveats.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when the researcher needs to train a SOLO detector, evaluate a local checkpoint, compare model-zoo baselines, inspect JSON training logs, measure robustness to image corruptions, or estimate model complexity. This is an operational guide for the PyTorch/MMDetection v1-era implementation, not a claim that a modern MMDetection release is API-compatible.
Choose one path before running an expensive command:
.pkl or COCO JSON output.scripts/analyze_log.py for a safe local
JSON-lines summary or bounded CSV export. It does not import MMDetection or
access a checkout.imagecorruptions plus the corruption
benchmark data/pipeline are available. It is single-GPU in the documented
workflow and is expensive.Read references/commands-and-checklists.md for generic path-safe templates and preflight checks. Read references/checkpoints-metrics.md for checkpoint semantics and metric interpretation. Read references/robustness-and-flops.md for benchmarking limits. Read references/troubleshooting.md when anything fails.
mmcv==0.2.16). The
installation docs say PyTorch >=1.5 was not tested; newer stacks may need
adaptation.Before train or test, inspect the selected config and its effective values:
data_root, train/val/test annotation files,
image prefixes, class count, test pipeline, batch size, workers, work_dir,
total_epochs, lr_config, workflow, checkpoint_config, and
dist_params.backend._base_ inheritance graphs. If a user config uses inheritance,
resolve every parent in the same environment and record the effective merged
values; do not assume a current MMDetection config loader understands it.annotations/instances_*.json alongside the
corresponding image directories under the configured root. SOLO training
collects img, gt_bboxes, gt_labels, and gt_masks; a test pipeline
collects only image inputs. Check that annotation class ids and configured
classes agree..pth is not necessarily compatible.Single-GPU command shape (substitute the selected checkout's legacy entry-point command; the generated skill does not depend on that checkout being present):
<TRAIN_ENTRY_POINT> <CONFIG.py> --work_dir <WORK_DIR> --gpus 1
<INSTANCE_EVAL_ENTRY_POINT> <CONFIG.py> <CHECKPOINT.pth> --out <RESULTS.pkl> --eval segm
<DETECTOR_EVAL_ENTRY_POINT> <CONFIG.py> <CHECKPOINT.pth> --out <RESULTS.pkl> --eval bbox segm
For a visual test, add --show only when a display is available; headless
sessions should save artifacts instead. In this legacy interface, an
instance-evaluation --json_out value is a filename prefix rather than a
normal .json output path; prefer --out and --eval for the simplest
reproducible result artifact.
For distributed execution, use the environment's supported launcher or a reviewed equivalent rather than copying a cluster command blindly. The following is conceptual argument shape, not a command to paste without a reviewed entry point:
<DISTRIBUTED_LAUNCHER> <TRAIN_ENTRY_POINT> <CONFIG.py> --launcher pytorch --work_dir <WORK_DIR>
<DISTRIBUTED_LAUNCHER> <DETECTOR_EVAL_ENTRY_POINT> <CONFIG.py> <CHECKPOINT.pth> --launcher pytorch --out <RESULTS.pkl> --eval bbox segm --tmpdir <TEMP_DIR>
Use one process per GPU, an NCCL-compatible CUDA setup, a unique rendezvous port per concurrent job, and a shared/readable output location. Confirm rank-0 is the only process writing final aggregate outputs. Multi-GPU evaluation may use CPU temporary collection or GPU collection; both need communication and sufficient temporary space.
--autoscale-lr scales
against 8 GPUs for the non-distributed training path.resume_from restores model weights, optimizer state, and epoch for an
interrupted run. load_from restores weights only and starts training from
epoch 0, which is the finetuning behavior. Do not substitute one for the
other.Use bbox for box AP/AR, segm for instance-mask AP/AR, keypoints only for a
compatible task, and proposal metrics only when proposals are the intended
output. COCO reports AP, AP50, AP75, APs, APm, APl and AR variants; compare the
same metric, split, class set, max detections, preprocessing, and checkpoint.
SOLO model-zoo numbers are COCO/minival-era reference points, not acceptance
thresholds for a new dataset. Report clean performance before corrupted-data
performance, and do not compare throughput or FLOPs across different input
shapes, hardware, operator coverage, or post-processing conventions.
Safe candidates are parser-help for the selected legacy training/evaluation
entry point and a tiny local JSON log run through
scripts/analyze_log.py. Do not claim that these checks validate training,
COCO metrics, distributed synchronization, FP16 stability, or custom CUDA
kernels. Full training, COCO/VOC evaluation, robustness sweeps, model-zoo
weight downloads, and FLOPs runs remain user-approved, data/backend-dependent
experiments.