$npx -y skills add SharpAI/DeepCamera --skill yolo-detection-2026-coral-tpu-macosGoogle Coral Edge TPU — real-time object detection natively (macOS / Linux)
| 1 | # Coral TPU Object Detection |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | - Python 3.9–3.13 |
| 8 | |
| 9 | ## How It Works |
| 10 | |
| 11 | ``` |
| 12 | ┌─────────────────────────────────────────────────────┐ |
| 13 | │ Host (Aegis-AI) │ |
| 14 | │ frame.jpg → /tmp/aegis_detection/ │ |
| 15 | │ stdin ──→ ┌──────────────────────────────┐ │ |
| 16 | │ │ Native Python Environment │ │ |
| 17 | │ │ detect.py │ │ |
| 18 | │ │ ├─ loads _edgetpu.tflite │ │ |
| 19 | │ │ ├─ reads frame from disk │ │ |
| 20 | │ │ └─ runs inference on TPU │ │ |
| 21 | │ stdout ←── │ → JSONL detections │ │ |
| 22 | │ └──────────────────────────────┘ │ |
| 23 | │ USB ──→ Native System USB / edgetpu drivers │ |
| 24 | └─────────────────────────────────────────────────────┘ |
| 25 | ``` |
| 26 | |
| 27 | 1. Aegis writes camera frame JPEG to shared `/tmp/aegis_detection/` workspace |
| 28 | 2. Sends `frame` event via stdin JSONL to the local Python instance |
| 29 | 3. `detect.py` invokes PyCoral and executes natively on the mapped USB Edge TPU |
| 30 | 4. Returns `detections` event via stdout JSONL |
| 31 | |
| 32 | ## Platform Setup |
| 33 | |
| 34 | ### Linux |
| 35 | ```bash |
| 36 | # Uses the official apt-get google-coral packages natively |
| 37 | ./deploy.sh |
| 38 | ``` |
| 39 | |
| 40 | ### macOS |
| 41 | ```bash |
| 42 | # Downloads and installs the libedgetpu OS payload framework inline |
| 43 | ./deploy.sh |
| 44 | ``` |
| 45 | |
| 46 | > **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. |
| 47 | |
| 48 | ## Performance |
| 49 | |
| 50 | | Input Size | Inference | On-chip | Notes | |
| 51 | |-----------|-----------|---------|-------| |
| 52 | | 320x320 | ~4ms | 100% | Fully on TPU, best for real-time | |
| 53 | | 640x640 | ~20ms | Partial | Some layers on CPU (model segmented) | |
| 54 | |
| 55 | > **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`. |
| 56 | |
| 57 | ## Protocol |
| 58 | |
| 59 | Same JSONL as `yolo-detection-2026`: |
| 60 | |
| 61 | ### Skill → Aegis (stdout) |
| 62 | ```jsonl |
| 63 | {"event": "ready", "model": "yolo26n_edgetpu", "device": "coral", "format": "edgetpu_tflite", "tpu_count": 1, "classes": 80} |
| 64 | {"event": "detections", "frame_id": 42, "camera_id": "front_door", "objects": [{"class": "person", "confidence": 0.85, "bbox": [100, 50, 300, 400]}]} |
| 65 | {"event": "perf_stats", "total_frames": 50, "timings_ms": {"inference": {"avg": 4.1, "p50": 3.9, "p95": 5.2}}} |
| 66 | ``` |
| 67 | |
| 68 | ### Bounding Box Format |
| 69 | `[x_min, y_min, x_max, y_max]` — pixel coordinates (xyxy). |
| 70 | |
| 71 | ## Installation |
| 72 | |
| 73 | ### Linux / macOS |
| 74 | ```bash |
| 75 | ./deploy.sh |
| 76 | ``` |
| 77 | |
| 78 | The deployer builds the local Python virtual environment and installs the Edge TPU runtime. No Docker required. |