Google Coral USB Accelerator on Raspberry Pi: Edge TPU Object Detection Setup
Raspberry Pi boards are fast enough to run a webcam feed and a simple script, but real-time object detection with a full neural network model will bring a Pi 4 or Pi 5's CPU to its knees — a few frames per second at best, with the CPU pegged and no headroom for anything else. Google's Coral USB Accelerator solves this by offloading inference to a dedicated Edge TPU chip over USB, turning a Raspberry Pi into a capable, low-power machine vision box without needing a full desktop GPU. This is a different path than the Raspberry Pi 5's Hailo AI Kit (which uses a PCIe M.2 accelerator on the official AI HAT) — the Coral is USB-based, works on any Pi with a free USB port including older Pi 3 and Pi 4 boards, and has a mature, well-documented software stack built around TensorFlow Lite.
What the Coral Accelerator Actually Does
The USB Accelerator contains Google's Edge TPU ASIC, a chip purpose-built for running quantized TensorFlow Lite models at high speed and low power draw — roughly 2 watts under load. It does not train models; it runs pre-trained, pre-compiled models that have been converted to the Edge TPU's specific instruction format using Google's edgetpu_compiler. This means you can't just point it at any TensorFlow Lite file — the model needs to be quantized to 8-bit integers and compiled specifically for the Edge TPU, though Google and the community provide plenty of pre-compiled models (MobileNet SSD for object detection, MobileNet for classification, and various pose/segmentation models) that work out of the box.
Hardware and OS Requirements
RequirementDetail Raspberry Pi modelPi 3B+, Pi 4, or Pi 5 — any board with a USB port and Raspberry Pi OS support USB portUSB 3.0 strongly recommended; the accelerator works on USB 2.0 but at reduced throughput OSRaspberry Pi OS (Bookworm or Bullseye), 64-bit recommended for current TensorFlow Lite runtime packages PowerThe accelerator draws power from USB; on a Pi with several other USB peripherals, use a powered hub if you see brownout resetsInstalling the Runtime
Google's Coral packages predate the Bookworm release and the official APT repository has had spotty maintenance, so the most reliable current path is installing the Edge TPU runtime and the Python TensorFlow Lite runtime via pip in a virtual environment rather than relying on the old apt-key based repo instructions still floating around online:
- Create a Python virtual environment: python3 -m venv coral-env && source coral-env/bin/activate
- Install the Edge TPU runtime library for your OS (libedgetpu) — on Debian-based systems this is available as a .deb package from Coral's GitHub releases when the APT repo is unreachable.
- Install the TensorFlow Lite runtime: pip install tflite-runtime (or the pycoral package if you want Coral's higher-level convenience wrappers).
- Plug in the accelerator and verify it enumerates: lsusb should show a Google Inc. device (it shows one VID/PID before the runtime loads and a different one after, which is a normal firmware-load behavior, not an error).
If the device doesn't show up as a Coral device after installing the runtime, check dmesg for USB enumeration errors first — a marginal USB cable or a port that can't supply enough current is a far more common culprit than a software misconfiguration.
Running Your First Detection Model
Google publishes pre-compiled, ready-to-run models on the Coral models page, including a MobileNet SSD v2 object detector trained on the COCO dataset (80 common object classes) that's a good first test. A minimal pipeline looks like:
- Load the compiled .tflite model with the Edge TPU delegate specified, rather than the default CPU delegate.
- Capture a frame from a USB or Pi Camera Module source with OpenCV or picamera2.
- Resize and quantize the frame to match the model's expected input tensor shape (commonly 300×300 for MobileNet SSD).
- Run inference — expect single-digit millisecond inference times on the Edge TPU versus 200ms+ on the Pi's CPU alone for the same model.
- Parse the output tensors for bounding boxes, class IDs, and confidence scores, and draw them on the frame.
At this point you have the same building block used in dedicated Frigate NVR setups and DIY security camera projects — the Coral is in fact one of the officially supported detector backends in Frigate, so if your end goal is a full NVR rather than a custom script, point Frigate's config at the Coral device directly instead of writing your own inference loop.
Coral vs Hailo AI Kit: Which to Use
Coral USB AcceleratorRaspberry Pi AI Kit (Hailo-8) ConnectionUSB 3.0PCIe via M.2 HAT, Pi 5 only Compute~4 TOPS13–26 TOPS depending on module CompatibilityAny Pi with USB, plus regular Linux/Mac/Windows hostsRaspberry Pi 5 only, requires the official AI HAT+ or M.2 board Model ecosystemTensorFlow Lite, mature but Coral-specific compiler toolchainHailo's own model zoo and compiler, actively maintained Best forRetrofitting older Pi boards, portable/USB-first buildsNew Pi 5 builds wanting maximum inference throughputIf you're starting fresh with a Pi 5, the Hailo AI Kit generally gives more headroom for multiple simultaneous streams or larger models. If you've got a Pi 3 or 4 already deployed somewhere and want to add vision without replacing the board, the Coral is the more practical retrofit.
Practical Notes
The Edge TPU chip runs warm under sustained load — for an always-on camera application, don't bury the accelerator inside a sealed enclosure with the Pi; give it airflow or mount it externally on a short USB extension. Also budget for the fact that Google has not been actively expanding the Coral product line or its official model zoo in recent years, so community-maintained model conversion guides are increasingly your best resource for anything beyond the stock detection and classification models.
Related Guides
- How to Set Up OpenCV Machine Vision on a Raspberry Pi
- Raspberry Pi Security Camera/NVR with Frigate
- Raspberry Pi 5 with the Hailo AI Kit: Real-Time Object Detection Setup
- Build a Local AI Security Camera System with Frigate NVR on a Raspberry Pi
- Running Frigate NVR on Raspberry Pi for Security Cameras
- Raspberry Pi AI Camera Module (IMX500): On-Sensor Machine Learning Without an Accelerator HAT
- Build a Wall-Mounted Maker Dashboard: Aggregating Your Print Farm, Security, and Home Server on One CYD Panel
- DIY Home Security System: Combining Raspberry Pi, ESP32 Sensors, and Flipper Zero