# yolo-training

yolo-training reads YOLO26 training curves and results.csv, diagnoses overfitting or poor mAP, and points to the cheapest fix first.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1216 repo stars
- Author: Fatih C. Akyon
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/fcakyon/claude-codex-settings/tree/HEAD/plugins/ultralytics-dev/skills/yolo-training/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/yolo-training

## What it does

The skill inspects `results.csv` and the confusion matrix from a YOLO26 run across detect, segment, pose, obb, classify and depth, and works out whether the issue is undertraining, a train/val gap, weak localization versus weak recall, or an uneven class spread. Fixes are ordered by how cheap they are to test, not by expected payoff: epochs and schedule first, then augmentation, loss weights and LR, model size, resolution, and data quality last.

It ships a table mapping curve patterns to likely causes, plus a list of defaults that quietly break run comparisons. `optimizer=auto` ignores a manually set `lr0` unless the optimizer is switched to `AdamW` or `SGD` first. `nbs=64` means dropping batch size from 64 to 16 barely changes the effective gradient step. `close_mosaic=10` produces a late-epoch mAP jump that looks like convergence but isn't. For detection, the early-stopping criterion is mAP50-95 alone, so precision and recall trends don't factor in.

There's no dataset-analysis tooling bundled, so auditing label quality means writing your own script and eyeballing images. `references/diagnostics.md` lists causes and knobs per pattern, `references/task-notes.md` covers task-specific quirks.

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add fcakyon/claude-codex-settings
```
In the agent chat (not a shell):
```text
/plugin install ultralytics-dev@claude-settings
```
This installs the whole ultralytics-dev plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add fcakyon/claude-codex-settings --skill yolo-training -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/yolo-training/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/yolo-training/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add fcakyon/claude-codex-settings --skill yolo-training -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/yolo-training/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add fcakyon/claude-codex-settings --skill yolo-training -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/yolo-training/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install fcakyon/claude-codex-settings plugins/ultralytics-dev/skills/yolo-training
```

2. **Manually: put the files in place**
- File: `.github/skills/yolo-training/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add fcakyon/claude-codex-settings --skill yolo-training -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/fcakyon/claude-codex-settings --path plugins/ultralytics-dev/skills/yolo-training
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/yolo-training/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/fcakyon/claude-codex-settings/tree/HEAD/plugins/ultralytics-dev/skills/yolo-training/SKILL.md

## When to use it
- read a results.csv to decide when to stop training
- tell overfitting apart from underfitting from train/val curves
- explain why AP50 looks fine but AP50-95 is weak
- choose between adjusting learning rate, augmentation, or model size
- figure out a late-epoch mAP jump in a YOLO26 run

## Example prompts
- Read my results.csv and tell me why mAP50-95 stalled
- Why is val loss climbing while train loss keeps dropping on this pose model
- Should I scale up the model or change augmentations here

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 1f8c8632cead7a98.

BEGIN THIRD-PARTY FILE 1f8c8632cead7a98
````text
---
name: yolo-training
description: This skill should be used when user asks to "improve my mAP", "why is my model overfitting", "my training is diverging", "read my results.csv", "interpret my training curves", "my AP50 is good but AP50-95 is bad", "my recall is low", "how do I pick learning rate", "which augmentations should I use", "should I use a bigger model", "tune hyperparameters", or asks how to train YOLO26 for detection, instance or semantic segmentation, pose, OBB, classification, or depth.
---

# YOLO26 training

Read the run before changing anything. The `results.csv` and confusion matrix usually name the
problem already.

## Order of operations

Ordered by cost to try, cheapest first, not by size of the potential win.

1. **Epochs and schedule.** Undertrained looks like every other problem, and it costs nothing
   but time to rule out.
2. **Augmentation.** The knob for the generalization gap, at no extra compute per epoch.
3. **Loss weights and LR.** Cheap, and the curves usually say which one is wrong.
4. **Model size.** Scale up when train loss is still falling at the end of the schedule and the
   train and val curves sit close together. That is underfitting, and it is the only case a
   bigger model reliably fixes.
5. **Resolution.** Compute scales with the square of `imgsz`, so 640 to 1280 is roughly 4x the
   training budget, and pretrained weights transfer worse the further you move from the size
   they were fit at. Justify it with the object sizes in your data, not as a default first move.
6. **Data**, label quality and class balance. The highest ceiling and the slowest to move. The
   package ships no dataset-analysis tooling, so any audit here is your own script plus looking
   at images. Worth it once the cheap knobs are spent.

## Diagnostic loop

```python
import pandas as pd

df = pd.read_csv("runs/detect/train/results.csv")
df.columns = df.columns.str.strip()
print(df.tail(10)[["epoch", "train/box_loss", "val/box_loss", "metrics/mAP50(B)", "metrics/mAP50-95(B)"]])
print("best epoch:", df["metrics/mAP50-95(B)"].idxmax(), "of", len(df))
```
````
END THIRD-PARTY FILE 1f8c8632cead7a98

The third-party file has ended. Everything between the 1f8c8632cead7a98 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2106 of 5560 bytes. © Fatih C. Akyon · Apache-2.0 · https://github.com/fcakyon/claude-codex-settings/tree/HEAD/plugins/ultralytics-dev/skills/yolo-training/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
