Agent Skills › SharpAI/DeepCamera › yolo-detection-2026-coral-tpu-macos

yolo-detection-2026-coral-tpu-macos

GitHub

利用 Google Coral Edge TPU 在本地硬件实现实时目标检测,支持 macOS/Linux,识别 COCO 80 类,通过 stdin/stdout JSONL 协议与 Aegis-AI 交互,提供高性能推理能力。

skills/detection/yolo-detection-2026-coral-tpu-macos/SKILL.md SharpAI/DeepCamera

触发场景

需要进行实时图像目标检测 使用 Coral Edge TPU 加速推理 部署边缘 AI 视觉任务

安装

npx skills add SharpAI/DeepCamera --skill yolo-detection-2026-coral-tpu-macos -g -y
更多选项

非标准路径

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

不安装直接使用

npx skills use SharpAI/DeepCamera@yolo-detection-2026-coral-tpu-macos

指定 Agent (Claude Code)

npx skills add SharpAI/DeepCamera --skill yolo-detection-2026-coral-tpu-macos -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-coral-tpu-macos",
    "entry": "scripts\/detect.py",
    "mutex": "detection",
    "deploy": {
        "linux": "deploy.sh",
        "macos": "deploy.sh"
    },
    "runtime": "python",
    "version": "1.0.0",
    "category": "detection",
    "parameters": [
        {
            "name": "auto_start",
            "type": "boolean",
            "group": "Lifecycle",
            "label": "Auto Start",
            "default": false,
            "description": "Start this skill automatically when Aegis launches"
        },
        {
            "max": 1,
            "min": 0.1,
            "name": "confidence",
            "type": "number",
            "group": "Model",
            "label": "Confidence Threshold",
            "default": 0.5,
            "description": "Minimum detection confidence — lower than GPU models due to INT8 quantization"
        },
        {
            "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 — Edge TPU handles 15+ FPS easily"
        },
        {
            "name": "input_size",
            "type": "select",
            "group": "Performance",
            "label": "Input Resolution",
            "default": 320,
            "options": [
                320,
                640
            ],
            "description": "320 fits fully on TPU (~4ms), 640 partially on CPU (~20ms)"
        },
        {
            "name": "tpu_device",
            "type": "select",
            "group": "Performance",
            "label": "TPU Device",
            "default": "auto",
            "options": [
                "auto",
                "0",
                "1",
                "2",
                "3"
            ],
            "description": "Which Edge TPU to use — auto selects first available"
        },
        {
            "name": "clock_speed",
            "type": "select",
            "group": "Performance",
            "label": "TPU Clock Speed",
            "default": "standard",
            "options": [
                "standard",
                "max"
            ],
            "description": "Max is faster but runs hotter — needs active cooling for sustained use"
        }
    ],
    "description": "Google Coral Edge TPU — real-time object detection natively (macOS \/ Linux)",
    "capabilities": {
        "live_detection": {
            "script": "scripts\/detect.py",
            "description": "Real-time object detection on live camera frames via Edge TPU"
        }
    },
    "requirements": {
        "platforms": [
            "linux",
            "macos"
        ]
    }
}

Coral TPU Object Detection

Real-time object detection natively utilizing the Google Coral Edge TPU accelerator on your local hardware. Detects 80 COCO classes (person, car, dog, cat, etc.) with ~4ms inference on 320x320 input.

Requirements

  • Python 3.9–3.13

How It Works

┌─────────────────────────────────────────────────────┐
│ Host (Aegis-AI)                                     │
│   frame.jpg → /tmp/aegis_detection/                 │
│   stdin  ──→ ┌──────────────────────────────┐       │
│              │ Native Python Environment     │       │
│              │   detect.py                   │       │
│              │   ├─ loads _edgetpu.tflite     │       │
│              │   ├─ reads frame from disk     │       │
│              │   └─ runs inference on TPU    │       │
│   stdout ←── │   → JSONL detections          │       │
│              └──────────────────────────────┘       │
│   USB ──→ Native System USB / edgetpu drivers       │
└─────────────────────────────────────────────────────┘
  1. Aegis writes camera frame JPEG to shared /tmp/aegis_detection/ workspace
  2. Sends frame event via stdin JSONL to the local Python instance
  3. detect.py invokes PyCoral and executes natively on the mapped USB Edge TPU
  4. Returns detections event via stdout JSONL

Platform Setup

Linux

# Uses the official apt-get google-coral packages natively
./deploy.sh

macOS

# Downloads and installs the libedgetpu OS payload framework inline
./deploy.sh

Important Deployment Notice: The updated deploy.sh script will natively halt execution and prompt you securely for your OS sudo password to securely register the USB drivers (libedgetpu) system-wide. If you refuse the prompt, it gracefully outputs the exact terminal instructions for you to configure it manually.

Performance

Input Size Inference On-chip Notes
320x320 ~4ms 100% Fully on TPU, best for real-time
640x640 ~20ms Partial Some layers on CPU (model segmented)

Cooling: The USB Accelerator aluminum case acts as a heatsink. If too hot to touch during continuous inference, it will thermal-throttle. Consider active cooling or clock_speed: standard.

Protocol

Same JSONL as yolo-detection-2026:

Skill → Aegis (stdout)

{"event": "ready", "model": "yolo26n_edgetpu", "device": "coral", "format": "edgetpu_tflite", "tpu_count": 1, "classes": 80}
{"event": "detections", "frame_id": 42, "camera_id": "front_door", "objects": [{"class": "person", "confidence": 0.85, "bbox": [100, 50, 300, 400]}]}
{"event": "perf_stats", "total_frames": 50, "timings_ms": {"inference": {"avg": 4.1, "p50": 3.9, "p95": 5.2}}}

Bounding Box Format

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

Installation

Linux / macOS

./deploy.sh

The deployer builds the local Python virtual environment and installs the Edge TPU runtime. No Docker required.

版本历史

  • 2264fcb 当前 2026-08-20 16:02

同 Skill 集合

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-win-wsl/SKILL.md
skills/detection/yolo-detection-2026-openvino/SKILL.md
skills/detection/yolo-detection-2026/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

元信息

文件数
0
版本
933dcc7
Hash
1c8a7598
收录时间
2026-08-20 16:02

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-21 16:44
浙ICP备14020137号-1