Skip to content

Commit 1c48af4

Browse files
committed
feat: add model-training skill and Training category
- New skill: skills/training/model-training/ with SKILL.md manifest documenting the Aegis Training Agent pipeline: annotated dataset → YOLO fine-tune → auto-export → deploy - Add 'training' category to skills.json - Add model-training entry to skills.json registry - Update README skill catalog with Training row - Skill count: 18 → 19 skills, 9 → 10 categories
1 parent 3b26dc1 commit 1c48af4

File tree

4 files changed

+144
-1
lines changed

4 files changed

+144
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
- [x] **AI/LLM-assisted skill installation** — community-contributed skills installed and configured via AI agent
6161
- [x] **GPU / NPU / CPU (AIPC) aware installation** — auto-detect hardware, install matching frameworks, convert models to optimal format
6262
- [x] **Hardware environment layer** — shared [`env_config.py`](skills/lib/env_config.py) for auto-detection + model optimization across NVIDIA, AMD, Apple Silicon, Intel, and CPU
63-
- [ ] **Skill development**18 skills across 9 categories, actively expanding with community contributions
63+
- [ ] **Skill development**19 skills across 10 categories, actively expanding with community contributions
6464

6565
## 🧩 Skill Catalog
6666

@@ -73,6 +73,7 @@ Each skill is a self-contained module with its own model, parameters, and [commu
7373
| **Privacy** | [`depth-estimation`](skills/transformation/depth-estimation/) | [Real-time depth-map privacy transform](#-privacy--depth-map-anonymization) — anonymize camera feeds while preserving activity ||
7474
| **Annotation** | [`sam2-segmentation`](skills/annotation/sam2-segmentation/) | Click-to-segment with pixel-perfect masks | 📐 |
7575
| | [`dataset-annotation`](skills/annotation/dataset-annotation/) | AI-assisted labeling → COCO export | 📐 |
76+
| **Training** | [`model-training`](skills/training/model-training/) | Agent-driven YOLO fine-tuning — annotate, train, export, deploy | 📐 |
7677
| **Camera Providers** | [`eufy`](skills/camera-providers/eufy/) · [`reolink`](skills/camera-providers/reolink/) · [`tapo`](skills/camera-providers/tapo/) | Direct camera integrations via RTSP | 📐 |
7778
| **Streaming** | [`go2rtc-cameras`](skills/streaming/go2rtc-cameras/) | RTSP → WebRTC live view | 📐 |
7879
| **Channels** | [`matrix`](skills/channels/matrix/) · [`line`](skills/channels/line/) · [`signal`](skills/channels/signal/) | Messaging channels for Clawdbot agent | 📐 |

skills.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"transformation": "Depth estimation, style transfer, video effects",
1010
"privacy": "Privacy transforms — depth maps, blur, anonymization for blind mode",
1111
"annotation": "Dataset labeling, COCO export, training data",
12+
"training": "Model fine-tuning, hardware-optimized export, deployment",
1213
"camera-providers": "Camera brand integrations — clip feed, live stream",
1314
"streaming": "RTSP/WebRTC live view via go2rtc",
1415
"channels": "Messaging platform channels for Clawdbot agent",
@@ -165,6 +166,37 @@
165166
"privacy_overlay",
166167
"blind_mode"
167168
]
169+
},
170+
{
171+
"id": "model-training",
172+
"name": "Model Training",
173+
"description": "Agent-driven YOLO fine-tuning — annotate, train, auto-export to TensorRT/CoreML/OpenVINO, deploy as detection skill.",
174+
"version": "1.0.0",
175+
"category": "training",
176+
"path": "skills/training/model-training",
177+
"tags": [
178+
"training",
179+
"fine-tuning",
180+
"yolo",
181+
"custom-model",
182+
"export"
183+
],
184+
"platforms": [
185+
"linux-x64",
186+
"linux-arm64",
187+
"darwin-arm64",
188+
"darwin-x64",
189+
"win-x64"
190+
],
191+
"requirements": {
192+
"python": ">=3.9",
193+
"ram_gb": 4
194+
},
195+
"capabilities": [
196+
"fine_tuning",
197+
"model_export",
198+
"deployment"
199+
]
168200
}
169201
]
170202
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
name: model-training
3+
description: "Agent-driven YOLO fine-tuning — annotate, train, export, deploy"
4+
version: 1.0.0
5+
6+
parameters:
7+
- name: base_model
8+
label: "Base Model"
9+
type: select
10+
options: ["yolo26n", "yolo26s", "yolo26m", "yolo26l"]
11+
default: "yolo26n"
12+
description: "Pre-trained model to fine-tune"
13+
group: Training
14+
15+
- name: dataset_dir
16+
label: "Dataset Directory"
17+
type: string
18+
default: "~/datasets"
19+
description: "Path to COCO-format dataset (from dataset-annotation skill)"
20+
group: Training
21+
22+
- name: epochs
23+
label: "Training Epochs"
24+
type: number
25+
default: 50
26+
group: Training
27+
28+
- name: batch_size
29+
label: "Batch Size"
30+
type: number
31+
default: 16
32+
description: "Adjust based on GPU VRAM"
33+
group: Training
34+
35+
- name: auto_export
36+
label: "Auto-Export to Optimal Format"
37+
type: boolean
38+
default: true
39+
description: "Automatically convert to TensorRT/CoreML/OpenVINO after training"
40+
group: Deployment
41+
42+
- name: deploy_as_skill
43+
label: "Deploy as Detection Skill"
44+
type: boolean
45+
default: false
46+
description: "Replace the active YOLO detection model with the fine-tuned version"
47+
group: Deployment
48+
49+
capabilities:
50+
training:
51+
script: scripts/train.py
52+
description: "Fine-tune YOLO models on custom annotated datasets"
53+
---
54+
55+
# Model Training
56+
57+
Agent-driven custom model training powered by Aegis's Training Agent. Closes the annotation-to-deployment loop: take a COCO dataset from `dataset-annotation`, fine-tune a YOLO model, auto-export to the optimal format for your hardware, and optionally deploy it as your active detection skill.
58+
59+
## What You Get
60+
61+
- **Fine-tune YOLO26** — start from nano/small/medium/large pre-trained weights
62+
- **COCO dataset input** — uses standard format from `dataset-annotation` skill
63+
- **Hardware-aware training** — auto-detects CUDA, MPS, ROCm, or CPU
64+
- **Auto-export** — converts trained model to TensorRT / CoreML / OpenVINO / ONNX via `env_config.py`
65+
- **One-click deploy** — replace the active detection model with your fine-tuned version
66+
- **Training telemetry** — real-time loss, mAP, and epoch progress streamed to Aegis UI
67+
68+
## Training Loop (Aegis Training Agent)
69+
70+
```
71+
dataset-annotation model-training yolo-detection-2026
72+
┌─────────────┐ ┌──────────────────┐ ┌──────────────────┐
73+
│ Annotate │───────▶│ Fine-tune YOLO │───────▶│ Deploy custom │
74+
│ Review │ COCO │ Auto-export │ .pt │ model as active │
75+
│ Export │ JSON │ Validate mAP │ .engine│ detection skill │
76+
└─────────────┘ └──────────────────┘ └──────────────────┘
77+
▲ │
78+
└────────────────────────────────────────────────────┘
79+
Feedback loop: better detection → better annotation
80+
```
81+
82+
## Protocol
83+
84+
### Aegis → Skill (stdin)
85+
```jsonl
86+
{"event": "train", "dataset_path": "~/datasets/front_door_people/", "base_model": "yolo26n", "epochs": 50, "batch_size": 16}
87+
{"event": "export", "model_path": "runs/train/best.pt", "formats": ["coreml", "tensorrt"]}
88+
{"event": "validate", "model_path": "runs/train/best.pt", "dataset_path": "~/datasets/front_door_people/"}
89+
```
90+
91+
### Skill → Aegis (stdout)
92+
```jsonl
93+
{"event": "ready", "gpu": "mps", "base_models": ["yolo26n", "yolo26s", "yolo26m", "yolo26l"]}
94+
{"event": "progress", "epoch": 12, "total_epochs": 50, "loss": 0.043, "mAP50": 0.87, "mAP50_95": 0.72}
95+
{"event": "training_complete", "model_path": "runs/train/best.pt", "metrics": {"mAP50": 0.91, "mAP50_95": 0.78, "params": "2.6M"}}
96+
{"event": "export_complete", "format": "coreml", "path": "runs/train/best.mlpackage", "speedup": "2.1x vs PyTorch"}
97+
{"event": "validation", "mAP50": 0.91, "per_class": [{"class": "person", "ap": 0.95}, {"class": "car", "ap": 0.88}]}
98+
```
99+
100+
## Setup
101+
102+
```bash
103+
python3 -m venv .venv && source .venv/bin/activate
104+
pip install -r requirements.txt
105+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ultralytics>=8.3.0
2+
torch>=2.0.0
3+
coremltools>=7.0; sys_platform == 'darwin'
4+
onnx>=1.14.0
5+
onnxruntime>=1.16.0

0 commit comments

Comments
 (0)