Cv Model Training
ASecurityTrain, retrain, fine-tune and debug computer vision models and detectors (object detection, image classification, segmentation) in whatever framework the project already uses, such as Ultralytics YOLO, torchvision, timm, Detectron2, MMDetection or Keras. Use when choosing a pretrained baseline, configuring a training run, picking image size, batch size, epochs, learning rate or augmentations, handling class imbalance, diagnosing overfitting, underfitting, NaN loss or slow convergence, resumin...
- 19 stars
- 0 votes
- 0 copies
- 2 views
- Added November 29, 2026
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add khoavd18/skills --skill cv-model-training --agent claude-codeAre you the author of Cv Model Training?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/khoavd18-cv-model-training)---
name: cv-model-training
description: Train, retrain, fine-tune and debug computer vision models and detectors (object detection, image classification, segmentation) in whatever framework the project already uses, such as Ultralytics YOLO, torchvision, timm, Detectron2, MMDetection or Keras. Use when choosing a pretrained baseline, configuring a training run, picking image size, batch size, epochs, learning rate or augmentations, handling class imbalance, diagnosing overfitting, underfitting, NaN loss or slow convergence, resuming or comparing experiments, or making training reproducible. Not for auditing labels or splits (use cv-dataset-engineer), interpreting metrics (use ml-model-evaluation) or exporting to ONNX/TensorRT (use cv-inference-deployment).
---
# CV Model Training
Gets a correct baseline quickly, then improves it with controlled, recorded experiments instead of hyperparameter guessing.
## Inputs
- Task, classes, an audited dataset version and its split files.
- The evaluation contract (primary metric, operating point) from **ml-model-evaluation**.
- Constraints: hardware, time or GPU budget, target model size or latency. `UNKNOWN` until stated.
## Procedure
1. **Detect the stack**: framework and version (requirements, lock files, imports, config files), available hardware (CUDA, MPS, CPU) and how runs are launched and logged. Follow the project's conventions; do not introduce a new framework without a reason.
2. **Check prerequisites**: dataset audited and leak-free (**cv-dataset-engineer**), class map identical in data config and code, evaluation contract agreed.
3. **Sanity run**: train on a handful of images until the loss nearly reaches zero. If it cannot overfit a tiny set, the pipeline is broken (labels, class ids, preprocessing).
4. **Baseline**: smallest reasonable pretrained model, framework defaults, fixed seed. Record it as experiment 0.
5. **Augmentation review**: every augmentation must keep the label true. Colour or hue jitter is harmful when colour defines the class (ripeness, defects); flips are harmful when orientation matters. Table in [training-playbook.md](references/training-playbook.md).
6. **Iterate one change at a time** on validation only: data fixes first, then image size, model size, schedule, imbalance handling. Keep the change, the reason and the result.
7. **Diagnose with curves**: train vs validation loss and metric per epoch. Use the diagnosis table in the playbook for overfitting, underfitting, NaN or unstable loss.
8. **Record every run** with [experiment-record-template.md](references/experiment-record-template.md): commit, dataset version, full resolved config, seed, versions, weights hash, metrics.
9. **Select** the final checkpoint on validation, then hand it to **ml-model-evaluation** for one test evaluation.
## Rules
- Never select epochs, thresholds or models by test score.
- Ask before launching long or paid runs, and before deleting checkpoints, runs or datasets.
- Seeds reduce but do not remove GPU nondeterminism. Treat differences smaller than run-to-run variation as noise; repeat runs when a decision depends on it.
- Keep secrets (tracking-server tokens, cloud keys) in environment variables, never in configs or notebooks.
- Record evidence and pick the risk tier per the [ML quality contract](../ml-model-evaluation/references/ml-quality-contract.md).
## Outputs
A runnable training configuration or script in the project's framework, an experiment log comparing runs against the baseline, the selected weights with their record, and a short statement of what changed and why.
## Hand-offs
Label or split problems found during training → **cv-dataset-engineer**. Test evaluation and comparison → **ml-model-evaluation**. Export and optimization → **cv-inference-deployment**.
Files in this skill
- SKILL.md
- references/experiment-record-template.md
- references/training-playbook.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.