Yolo Trainingのロゴ

Yolo Training

組織
ultralytics
yolo-training

Use when training, fine-tuning, or validating Ultralytics YOLO models in Platform, cloud GPUs, or local code — model.train(), yolo train/val, remote metric streaming, epochs, batch, imgsz, devices, augmentation, multi-GPU, resumes, results, and fixing OOM, NaN loss, low mAP, or overfitting. For hyperparameter search and systematic improvement loops, see yolo-tuning.

概要

公開者ultralytics
リポジトリskills
スキル名yolo-training
スター
38
フォーク
0
同梱ファイル
2
ライセンスAGPL-3.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    ultralyticsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Yolo Training」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ultralytics/skills/tree/main/skills/yolo-training
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ultralytics/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/yolo-training .claude/skills/yolo-training
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでYolo Trainingを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にYolo Trainingを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Yolo Trainingは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Training & fine-tuning

Fastest route: train in Platform

Use Platform cloud training when you want to start in a few clicks without configuring a local GPU:

  1. Click New Model on a project page, or on a dataset page to preselect that dataset.
  2. Select a compatible pretrained model, ready dataset, GPU, epochs, image size, and batch size.
  3. Click Start Training and watch live charts, console logs, and system metrics.
  4. Open the completed model to inspect validation plots and use its Predict, Export, or Deploy tab. Platform preserves best.pt automatically.

Cloud jobs require at least one train image, one val/test image, and one labeled image. Use local/Colab training when you already have compute or need more control, while keeping Platform datasets and experiment tracking:

bash
export ULTRALYTICS_API_KEY="YOUR_API_KEY"
yolo train model=yolo26n.pt data=ul://username/datasets/dataset-slug \
  epochs=100 project=username/project-slug name=experiment-1

With ultralytics>=8.4.120 on Python 3.11+, the ul:// URI downloads the Platform dataset, and while an API key is available (ULTRALYTICS_API_KEY or the api_key setting), any project= value — even a local folder — streams metrics and uploads weights to Platform. Omit project to keep a run local; a list data= sets it internally, so unset the key for those runs.

Quickstart (detection)

python
from ultralytics import YOLO

model = YOLO("yolo26n.pt")  # ALWAYS start from pretrained weights
results = model.train(data="data.yaml", epochs=100, imgsz=640, batch=16, device=0)
bash
yolo detect train data=data.yaml model=yolo26n.pt epochs=100 imgsz=640 batch=16 device=0

Class-count changes are automatic — a 3-class data.yaml on an 80-class pretrained model just works (head re-initializes, backbone transfers; cls_remap=True even re-maps head rows for classes whose names match).

Base arguments worth setting (task trainers can override them)

ArgDefaultNotes
epochs100100–300 for fine-tuning; rely on early stopping, not guesses
patience100epochs without val improvement before early stop; ~20–50 for quick iterations
imgsztask/modelglobal fallback 640; classify uses 224 when unset; explicit values win
batch16-1 auto-fits ~60% VRAM (single GPU); float like 0.8 = VRAM fraction; else integer
deviceNone0, [0,1] (DDP), cpu, mps, -1 picks an idle GPU
cacheFalseTrue (RAM) or "disk" for I/O-bound training
workers8lower if RAM/shared-memory errors
freezeNonefreeze first N layers (freeze=10 ≈ backbone) for small datasets
optimizerautoleave on auto (MuSGD above 10k iterations, else AdamW); depth fine-tuning overrides it below
lr0 / lrf0.01 / 0.01lr0 ignored by optimizer=auto; set an explicit optimizer to use it (see depth recipe)
fraction1.0subset training — fraction=0.1 for smoke tests
resumeFalsecontinue an interrupted run (see recipes)
project/nameNoneoutput folder: relative project → runs/<task>/<project>/<name>, absolute → <project>/<name>. With an API key available on Python 3.11+, any project uploads to Platform
seed0reproducible with deterministic=True (default)
compileFalsetorch.compile; also "max-autotune-no-cudagraphs" etc.
timeNonemax training hours — overrides epochs

Full argument, augmentation, and loss-weight tables: training-args.md (this folder) — read before changing anything not listed above. yolo cfg shows the base schema and defaults; task trainers, checkpoints, and explicit arguments determine effective values.

Recipes

  • Resume interrupted run: YOLO("runs/detect/train/weights/last.pt").train(resume=True). Resume finishes the original epochs; to train longer after completion, start a NEW training from best.pt (resume can't extend a finished run).
  • Multi-GPU: device=[0,1] with an integer batch (AutoBatch is single-GPU only). DDP workers rebuild from a generated script that cloudpickles the trainer, model, and callbacks; official Windows PyTorch>=2.4 wheels can't launch DDP, so use Linux or WSL2.
  • Small detect-style dataset (<~1k images): pretrained + freeze=10, n/s model, default augmentation, watch val curves.
  • Depth fine-tuning: start from -depth.pt and use optimizer=AdamW lr0=1e-4 warmup_bias_lr=1e-4.
  • Small objects: try imgsz=1280 (more compute/VRAM; reduce batch if needed), or tile=True to train, validate, and predict on overlapping native-resolution windows of large images.
  • Experiment hygiene: self-describing run names (name=0811_yolo26s_helmets_e100), one variable per run; each run's full config is saved in runs/<task>/<name>/args.yaml — diff those to compare runs.
  • Logging integrations: yolo settings tensorboard=True (likewise wandb), then train normally. mlflow, comet, and clearml are on by default and activate once their package is installed.
  • Knowledge distillation: distill_model=yolo26l.pt dis=6.0 trains the student with a larger teacher.

Validation

bash
yolo val model=runs/detect/train/weights/best.pt data=data.yaml # split=val by default

Per-task headline metrics: detect/obb mAP50-95(B), segment (M), pose (P), semantic mIoU, depth delta1, classify accuracy_top1. Val base defaults are conf=0.001 (0.01 for OBB), iou=0.7, and nms=None (one-to-many head + NMS); nms=False validates YOLO26's NMS-free head, where iou is inactive. Use split=test for the test set and save_json=True for COCO-format eval.

Reading a finished run (runs/<task>/<name>/)

  • weights/best.pt — highest val fitness; use this one. last.pt — for resuming.
  • results.csv / results.png — per-epoch losses and val metrics. Interpretation: train loss ↓ while val mAP plateaus-then-drops = overfitting (more data/aug, smaller model — best.pt already kept the good checkpoint). Both flat and low = underfitting (bigger model, more epochs, higher imgsz, check labels). mAP50 good but mAP50-95 poor = sloppy localization (higher imgsz, better boxes).
  • train_batch*.jpg — augmented images with labels drawn. Look once per project: wrong labels are instantly visible here.
  • confusion_matrix.png — off-diagonal cluster between two classes = inconsistent labels or genuinely similar classes. Axes are predicted (y) × true (x): heavy background row = missed detections (that class needs more/better examples); heavy background column = false positives (add background images or raise conf at inference).

Troubleshooting

SymptomFix, in order
CUDA out of memorylower batch (or batch=-1), lower imgsz, smaller model; kill zombie python processes holding VRAM
NaN / exploding lossset optimizer=AdamW lr0=0.001 (auto ignores lr0); check labels; try amp=False
mAP near 0dataset problem 95% of the time — see yolo-datasets, check train_batch*.jpg
mAP plateaus lowmore/better data first; then imgsz ↑, bigger model, more epochs; see yolo-tuning playbook
Stopped earlier than expectedthat's patience — raise it or accept best.pt
Dataloader slow / GPU idlecache=True/"disk", raise workers, data on SSD
Val metrics zero mid-runclasses missing from the val split

Anti-patterns: pretrained=False "to train properly" (needs ~100× more data); benchmarking model sizes on 50 images; copying 30-argument commands (start from defaults); tuning hyperparameters while the confusion matrix screams label noise.

Related pages

  • training-args.md — full train/augmentation/loss-weight argument tables. Read before setting any argument not in the table above.

If the installed version rejects an argument (yolo checks shows the version), trust the error text and yolo cfg over this file.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Yolo Training」では何ができますか?

Use when training, fine-tuning, or validating Ultralytics YOLO models in Platform, cloud GPUs, or local code — model.train(), yolo train/val, remote metric streaming, epochs, batch, imgsz, devices, augmentation, multi-GPU, resumes, results, and fixing OOM, NaN loss, low mAP, or overfitting. For hyperparameter search and systematic improvement loops, see yolo-tuning.

TypingMindでYolo Trainingを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Yolo Trainingはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにYolo Trainingをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ultralytics/skills/tree/main/skills/yolo-trainingを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Yolo Trainingを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Yolo Trainingで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもYolo Trainingを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Yolo Training」は無料ですか?

はい。ultralyticsがAGPL-3.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇