$npx -y skills add qtzx06/yolodex --skill labelAuto-label frames with bounding boxes. Supports four modes — CUA+SAM (best accuracy, OpenAI CUA clicks + SAM segmentation), Gemini (native bbox detection), GPT vision (API fallback), or Codex vision subagents (no API keys). Parallel dispatch via git worktrees. Use after collectin
| 1 | ## Labeling Modes |
| 2 | |
| 3 | Set `label_mode` in config.json: |
| 4 | |
| 5 | | Mode | How it works | Best for | |
| 6 | |------|-------------|----------| |
| 7 | | **`cua+sam`** | CUA clicks on objects → SAM segments precise boundaries | Best accuracy, hackathon demo | |
| 8 | | **`gemini`** | Gemini native bounding box detection (0-1000 scale) | Fast, good native bbox support | |
| 9 | | **`gpt`** | GPT vision model returns JSON bounding boxes | Simple fallback | |
| 10 | | **`codex`** | Codex subagents view images and write YOLO labels directly | No API keys | |
| 11 | |
| 12 | ## Instructions |
| 13 | |
| 14 | 1. Read config.json for `label_mode`, `classes`, `model`, `num_agents` |
| 15 | If the user asks to `call subagent`, route to parallel dispatch in step 5. |
| 16 | |
| 17 | 2. **CUA+SAM mode** (recommended): |
| 18 | Run: `uv run .agents/skills/label/scripts/label_cua_sam.py` |
| 19 | Requires: `OPENAI_API_KEY`, classes must be set in config.json |
| 20 | |
| 21 | 3. **Gemini mode**: |
| 22 | Run: `uv run .agents/skills/label/scripts/label_gemini.py` |
| 23 | Requires: `GEMINI_API_KEY` or `GOOGLE_API_KEY` |
| 24 | |
| 25 | 4. **GPT mode** (fallback): |
| 26 | Run: `uv run .agents/skills/label/scripts/run.py` |
| 27 | Requires: `OPENAI_API_KEY` |
| 28 | |
| 29 | 5. **Parallel dispatch** (GPT or Codex mode): |
| 30 | Run: `bash .agents/skills/label/scripts/dispatch.sh [num_agents]` |
| 31 | Creates N git worktrees, dispatches N Codex subagents, merges results. |
| 32 | If Codex subagents are unavailable in-session, this shell command is the fallback path. |
| 33 | Supports: |
| 34 | - `label_mode=gpt` with `OPENAI_API_KEY` (runs `run_batch.py`) |
| 35 | - `label_mode=codex` without API keys (Codex image-viewing subagents) |
| 36 | |
| 37 | 6. Outputs: `output/frames/*.txt` (YOLO labels), `output/classes.txt` |
| 38 | |
| 39 | ## Scripts |
| 40 | |
| 41 | | Script | Mode | Description | |
| 42 | |--------|------|-------------| |
| 43 | | `label_cua_sam.py` | cua+sam | CUA for clicks + SAM for segmentation | |
| 44 | | `label_gemini.py` | gemini | Gemini native bounding boxes | |
| 45 | | `run.py` | gpt | GPT vision structured output | |
| 46 | | `run_batch.py` | gpt | GPT vision (subagent batch mode) | |
| 47 | | `dispatch.sh` | gpt/codex | Parallel subagent orchestrator | |
| 48 | | `merge_classes.py` | all | Unify class maps from subagents | |
| 49 | | `auto_label_and_show.py` | all | Auto-run configured labeler and print/render label previews | |