Agent SkillsSharpAI/DeepCamera › yolo-detection-2026

yolo-detection-2026

GitHub

基于YOLO 2026模型的实时目标检测技能,支持80+类别识别。具备硬件自动检测与模型格式优化功能,适配NVIDIA GPU、Apple Silicon等多平台以提升推理性能,通过JSON Lines协议进行帧输入与检测结果输出。

skills/detection/yolo-detection-2026/SKILL.md SharpAI/DeepCamera

Trigger Scenarios

需要实时视频流中的物体检测 需要在边缘设备或特定硬件上运行高精度视觉识别任务

Install

npx skills add SharpAI/DeepCamera --skill yolo-detection-2026 -g -y
More Options

Non-standard path

npx skills add https://github.com/SharpAI/DeepCamera/tree/master/skills/detection/yolo-detection-2026 -g -y

Use without installing

npx skills use SharpAI/DeepCamera@yolo-detection-2026

指定 Agent (Claude Code)

npx skills add SharpAI/DeepCamera --skill yolo-detection-2026 -a claude-code -g -y

安装 repo 全部 skill

npx skills add SharpAI/DeepCamera --all -g -y

预览 repo 内 skill

npx skills add SharpAI/DeepCamera --list

SKILL.md

Frontmatter
{
    "icon": "assets\/icon.png",
    "name": "yolo-detection-2026",
    "entry": "scripts\/detect.py",
    "deploy": "deploy.sh",
    "version": "2.0.0",
    "parameters": [
        {
            "name": "auto_start",
            "type": "boolean",
            "group": "Lifecycle",
            "label": "Auto Start",
            "default": false,
            "description": "Start this skill automatically when Aegis launches"
        },
        {
            "name": "model_size",
            "type": "select",
            "group": "Model",
            "label": "Model Size",
            "default": "nano",
            "options": [
                "nano",
                "small",
                "medium",
                "large"
            ],
            "description": "Larger models are more accurate but slower"
        },
        {
            "max": 1,
            "min": 0.1,
            "name": "confidence",
            "type": "number",
            "group": "Model",
            "label": "Confidence Threshold",
            "default": 0.8
        },
        {
            "name": "classes",
            "type": "string",
            "group": "Model",
            "label": "Detect Classes",
            "default": "person,car,dog,cat",
            "description": "Comma-separated COCO class names (80 classes available)"
        },
        {
            "name": "fps",
            "type": "select",
            "group": "Performance",
            "label": "Processing FPS",
            "default": 5,
            "options": [
                0.2,
                0.5,
                1,
                3,
                5,
                15
            ],
            "description": "Frames per second — higher = more CPU\/GPU usage"
        },
        {
            "name": "device",
            "type": "select",
            "group": "Performance",
            "label": "Inference Device",
            "default": "auto",
            "options": [
                "auto",
                "cpu",
                "cuda",
                "mps",
                "rocm"
            ],
            "description": "auto = best available GPU, else CPU"
        },
        {
            "name": "use_optimized",
            "type": "boolean",
            "group": "Performance",
            "label": "Hardware Acceleration",
            "default": true,
            "description": "Auto-convert model to optimized format for faster inference"
        },
        {
            "name": "compute_units",
            "type": "select",
            "group": "Performance",
            "label": "Apple Compute Units",
            "default": "auto",
            "options": [
                "auto",
                "cpu_and_ne",
                "all",
                "cpu_only",
                "cpu_and_gpu"
            ],
            "platform": "macos",
            "description": "CoreML compute target — 'auto' routes to Neural Engine (NPU), leaving GPU free for LLM\/VLM"
        }
    ],
    "description": "YOLO 2026 — state-of-the-art real-time object detection",
    "capabilities": {
        "live_detection": {
            "script": "scripts\/detect.py",
            "description": "Real-time object detection on live camera frames"
        }
    },
    "requirements": {
        "torch": ">=2.4.0",
        "python": ">=3.9",
        "platforms": [
            "linux",
            "macos",
            "windows"
        ],
        "ultralytics": ">=8.3.0"
    }
}

YOLO 2026 Object Detection

Real-time object detection using the latest YOLO 2026 models. Detects 80+ COCO object classes including people, vehicles, animals, and everyday objects. Outputs bounding boxes with labels and confidence scores.

Model Sizes

Size Speed Accuracy Best For
nano Fastest Good Real-time on CPU, edge devices
small Fast Better Balanced speed/accuracy
medium Moderate High Accuracy-focused deployments
large Slower Highest Maximum detection quality

Hardware Acceleration

The skill uses env_config.py to automatically detect hardware and convert the model to the fastest format for your platform. Conversion happens once during deployment and is cached.

Platform Backend Optimized Format Compute Units Expected Speedup
NVIDIA GPU CUDA TensorRT .engine GPU ~3-5x
Apple Silicon (M1+) MPS CoreML .mlpackage Neural Engine (NPU) ~2x
Intel CPU/GPU/NPU OpenVINO OpenVINO IR .xml CPU/GPU/NPU ~2-3x
AMD GPU ROCm ONNX Runtime GPU ~1.5-2x
CPU (any) CPU ONNX Runtime CPU ~1.5x

Apple Silicon Note: Detection defaults to cpu_and_ne (CPU + Neural Engine), keeping the GPU free for LLM/VLM inference. Set compute_units: all to include GPU if not running local LLM.

How It Works

  1. deploy.sh detects your hardware via env_config.HardwareEnv.detect()
  2. Installs the matching requirements_{backend}.txt (e.g. CUDA → includes tensorrt)
  3. Pre-converts the default model to the optimal format
  4. At runtime, detect.py loads the cached optimized model automatically
  5. Falls back to PyTorch if optimization fails

Set use_optimized: false to disable auto-conversion and use raw PyTorch.

Auto Start

Set auto_start: true in the skill config to start detection automatically when Aegis launches. The skill will begin processing frames from the selected camera immediately.

auto_start: true
model_size: nano
fps: 5

Performance Monitoring

The skill emits perf_stats events every 50 frames with aggregate timing:

{"event": "perf_stats", "total_frames": 50, "timings_ms": {
  "inference": {"avg": 3.4, "p50": 3.2, "p95": 5.1},
  "postprocess": {"avg": 0.15, "p50": 0.12, "p95": 0.31},
  "total": {"avg": 3.6, "p50": 3.4, "p95": 5.5}
}}

Protocol

Communicates via JSON lines over stdin/stdout.

Aegis → Skill (stdin)

{"event": "frame", "frame_id": 42, "camera_id": "front_door", "timestamp": "...", "frame_path": "/tmp/aegis_detection/frame_front_door.jpg", "width": 1920, "height": 1080}

Skill → Aegis (stdout)

{"event": "ready", "model": "yolo2026n", "device": "mps", "backend": "mps", "format": "coreml", "gpu": "Apple M3", "classes": 80, "fps": 5}
{"event": "detections", "frame_id": 42, "camera_id": "front_door", "timestamp": "...", "objects": [
  {"class": "person", "confidence": 0.92, "bbox": [100, 50, 300, 400]}
]}
{"event": "perf_stats", "total_frames": 50, "timings_ms": {"inference": {"avg": 3.4}}}
{"event": "error", "message": "...", "retriable": true}

Bounding Box Format

[x_min, y_min, x_max, y_max] — pixel coordinates (xyxy).

Stop Command

{"command": "stop"}

Installation

The deploy.sh bootstrapper handles everything — Python environment, GPU backend detection, dependency installation, and model optimization. No manual setup required.

./deploy.sh

Requirements Files

File Backend Key Deps
requirements_cuda.txt NVIDIA torch (cu124), tensorrt
requirements_mps.txt Apple torch, coremltools
requirements_intel.txt Intel torch, openvino
requirements_rocm.txt AMD torch (rocm6.2), onnxruntime-rocm
requirements_cpu.txt CPU torch (cpu), onnxruntime

Version History

  • 2264fcb Current 2026-08-20 16:02

Same Skill Collection

skills/analysis/cloud-provider-regression/SKILL.md
skills/analysis/home-security-benchmark/SKILL.md
skills/analysis/homesafe-bench/SKILL.md
skills/analysis/smarthome-bench/SKILL.md
skills/annotation/dataset-annotation/SKILL.md
skills/annotation/dataset-management/SKILL.md
skills/camera-providers/eufy/SKILL.md
skills/camera-providers/tapo/SKILL.md
skills/channels/matrix/SKILL.md
skills/detection/yolo-detection-2026-coral-tpu-macos/SKILL.md
skills/detection/yolo-detection-2026-coral-tpu-win-wsl/SKILL.md
skills/detection/yolo-detection-2026-openvino/SKILL.md
skills/integrations/homeassistant-bridge/SKILL.md
skills/segmentation/sam2-segmentation/SKILL.md
skills/training/model-training/SKILL.md
skills/transformation/depth-estimation/SKILL.md
skills/automation/ha-trigger/SKILL.md
skills/automation/mqtt/SKILL.md
skills/automation/webhook/SKILL.md
skills/camera-providers/reolink/SKILL.md
skills/channels/line/SKILL.md
skills/channels/signal/SKILL.md
skills/streaming/go2rtc-cameras/SKILL.md

Metadata

Files
0
Version
2264fcb
Hash
3e074ce9
Indexed
2026-08-20 16:02

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 21:52
浙ICP备14020137号-1 $Carte des visiteurs$