Google Coral TPU on Raspberry Pi: How to Port AI Inference

How a Google Coral TPU runs inference on a Raspberry Pi: int8 quantisation, Edge TPU compilation, CPU fallback, Pi 5 form factors, and when Hailo fits…

Google Coral TPU on Raspberry Pi: How to Port AI Inference
Written by TechnoLynx Published on 11 Jul 2026

A Google Coral TPU is still efficient silicon for int8 inference on a Raspberry Pi. Google rates its Edge TPU at 4 TOPS on 2 watts, and existing deployments keep working. Its software is archived, though, and the part is scarce, so a new Raspberry Pi 5 build should usually take a Hailo module instead. Coral still makes sense where power is very tight or the hardware is already committed. In both cases, moving a model onto it is a hardware port, not a file copy: full int8 quantisation, compilation on an x86-64 machine, then a check that the graph did not fall back to the CPU.

TechnoLynx scopes this port for teams moving inference onto edge devices. It profiles the current workload, checks which operators the Edge TPU will accept, and says whether a Pi TPU port will actually move the bottleneck, all before any porting work starts. TechnoLynx delivers that work through its AI engineering for IoT and embedded devices practice.

How the Google Coral TPU Works Next to a Raspberry Pi’s ARM CPU

The Edge TPU is a small ASIC designed by Google to run TensorFlow Lite models in a power-efficient way. It is a coprocessor added to the host system, not a replacement for it. The Pi’s ARM CPU still runs any operations the accelerator cannot take, including input and output conversions. The Edge TPU runs the compiled part of the graph as a single custom operation. On the host, the Edge TPU runtime provides the programming interface. PCIe cards also need Coral’s “Apex” PCIe driver, while the USB Accelerator needs only the runtime and API library on the host.

The Edge TPU has roughly 8 MB of SRAM to cache a model’s parameters, less a small reserve for the inference executable. Parameters that do not fit get fetched from external memory, which is slower. When a model is too big for that cache, the compiler can split it into segments that run as a pipeline across several Edge TPUs. It can also co-compile multiple models so they share the cache.

When even a small part of the graph falls back to the CPU, or parameters are fetched off-chip, inference slows.

What a Model Needs Before the Edge TPU Will Run It

Coral’s documentation sets the rule clearly: the Edge TPU supports only TensorFlow Lite models that are fully 8-bit quantised and then compiled specifically for the Edge TPU. Tensor sizes and parameters such as bias tensors must be constant at compile time, and the model may use only the operations the Edge TPU supports. Dynamic shapes are therefore out.

Quantisation has two accepted routes: quantisation-aware training, which Coral recommends, or full-integer post-training quantisation. A checkpoint with float internals will not do. A model that is quantised internally but takes float inputs still compiles. In that case the compiler leaves a quantise op, which runs on the CPU, at the start of the graph and dequantises the output at the end. Coral describes the added latency as negligible for most models but rising with input tensor size, and recommends int8 or uint8 inputs and outputs for best performance.

The Edge TPU Compiler (edgetpu_compiler) needs a 64-bit Debian-based Linux system on x86-64, and from version 2.1 it is no longer available for ARM64. That means you compile on a desktop, a cloud VM or Colab, then copy the result to the Pi. Versions also have to line up. A recently compiled model fails on an older runtime with a “Package requires runtime version” error. If you cannot update the device runtime, recompiling with --min_runtime_version targets the older one. Building PyCoral yourself adds a further constraint: libcoral and libedgetpu must be version-matched builds sharing the same TensorFlow commit.

Running YOLO on a Raspberry Pi with a Coral TPU

Ultralytics documents a three-step path for YOLO: install an Edge TPU runtime on the Pi, export the model on x86-64 Linux, then run inference back on the Pi. The export produces a <model_name>_full_integer_quant_edgetpu.tflite file. The _edgetpu.tflite suffix matters: rename the file and Ultralytics loads it as a plain LiteRT model, and the accelerator goes unused. Ultralytics also calls the official Coral guide outdated, because the original runtime builds no longer work with current TensorFlow Lite runtimes. Its guide uses an actively maintained runtime instead.

Because the compiler partitions only once, one rejected op early in a detector pulls everything after it onto the CPU. Frigate says Coral supports primarily the ssdlite and MobileNet architectures. Frigate added a quantised YOLOv9 on Coral in version 0.17, but only with part of the COCO labels.

How Much of My Model Actually Runs on the Coral TPU and Not the Pi’s CPU?

Read the compiler log. It shows which operations are “Mapped to the CPU” rather than the Edge TPU. If many lines say CPU, Coral’s advice is to revisit the model requirements and try changes that increase the number of operations mapped to the Edge TPU. The mechanism is unforgiving: at the first unsupported operation the compiler splits the graph, and that operation plus everything after it runs on the CPU, even when later operations are supported. “Off-chip memory used: 0.00B” means the parameters fit in the on-chip cache.

Do not read the share of operations as the share of performance. Coral warns that even a small CPU fraction can slow inference by an order of magnitude compared with a fully mapped model, and that it cannot predict how much slower a partly mapped model will be. The answer has to come from a timing on the device. The useful timing compares the compiled model on the Pi with CPU inference of the same int8 model on the Pi alone, because that gap is what the accelerator really contributes. When you need to control the split point yourself, the compiler’s intermediate-tensors option ends the Edge TPU custom op at named tensors and leaves the rest on the CPU.

Did Accuracy Survive int8 Quantisation and Edge TPU Compilation?

Coral says that 8-bit representations are less precise but do not significantly affect inference accuracy. Treat that as the vendor’s general expectation, not a result for your model. Google’s own evaluation of Edge TPUs across 423K convolutional networks found that performance varies with network structure.

Verification needs three runs on the same held-out set, using the metric the product depends on (mAP for a detector, per-class recall where missed classes are costly): the float model, the quantised TensorFlow Lite model on a CPU, and the compiled _edgetpu.tflite model on the Pi. The first comparison isolates the quantisation loss. The second should show close agreement, since compilation maps the same int8 graph onto different hardware. If it does not, suspect input preprocessing or quantisation parameters before suspecting the chip. If post-training quantisation loses too much, quantisation-aware training is the route Coral itself recommends.

Diagnostic Checklist for a Coral TPU Port

Check Where to look What a healthy port shows
Fully int8 Converter settings Quantisation-aware training or full-integer post-training quantisation, int8/uint8 inputs and outputs
Static graph Model definition Constant tensor sizes and parameters at compile time
Operator mapping edgetpu_compiler log Few or no operations “Mapped to the CPU”
On-chip fit Compiler log “Off-chip memory used” at 0.00B
Version match Runtime on the Pi No “requires runtime version” error, or a --min_runtime_version recompile
File naming Exported model _edgetpu.tflite suffix kept when using Ultralytics
Accuracy Float vs int8 CPU vs Edge TPU runs Loss within what the product tolerates
Thermal and power Logs under sustained load No frequency reduction or resets

Did the Edge Port Improve Latency and Cost per Request?

Measure end to end on the device, under the load the product will see. Ultralytics’ published Pi figures cover inference time only, with pre- and post-processing excluded, and it presents them as a relative reference. They do not tell you your pipeline’s latency. Frigate’s documentation gives a useful bar for a real-time detector: because a Coral runs a single model instance, it needs an inference time of around 10 ms to keep up.

Cost is the second half of the case. An edge port pays off when the cost per inference, counting the hardware, power and the people time spent maintaining a pinned software stack, comes in below what the same requests cost in the cloud, and when the network round trip being removed actually mattered for latency. Our piece on building a load-aware cost-per-request model sets out how to build that baseline. The port is worth doing only if it beats the baseline on the device’s real duty cycle.

Raspberry Pi 5 vs Pi 4 with a Coral TPU: USB, M.2 or Dual Edge TPU?

Coral’s datasheet says Raspberry Pi is supported but that only the Pi 3 Model B+ and Pi 4 were tested, and Coral’s setup guide also lists the Pi Zero 2. The Pi 5 adds a PCIe connector. Ultralytics’ YOLOv8 measurements with a USB Coral show the Pi 5 averaging 22% faster than a Pi 4B in standard mode and 30.2% faster in high-frequency mode.

Form factor Accelerators Host link What it needs from the host
USB Accelerator One Edge TPU, 4 TOPS int8 USB 3.0 Type-C Edge TPU runtime and API library; at least 500 mA at 5 V, up to 900 mA peak at maximum speed
M.2 / Mini PCIe Accelerator : PCIe Apex PCIe driver, Edge TPU runtime, MSI-X support
M.2 Accelerator with Dual Edge TPU Two Edge TPUs, 8 TOPS int8 total Two PCIe Gen2 x1 links on an M.2 E-key slot A slot that wires both lanes, plus careful power design

The USB Accelerator’s runtime comes in two versions. The maximum-frequency runtime doubles the clock compared with the reduced setting. It speeds up inference but raises power draw and makes the device very hot, so Coral advises the reduced frequency unless you know you need more speed.

Bringing up a PCIe Coral on the Raspberry Pi 5

Jeff Geerling’s bring-up shows that a PCIe Coral does work on the Pi 5, after several changes. Coral’s drivers need a 4K page kernel (kernel=kernel8.img in /boot/firmware/config.txt). The external PCIe connector has to be enabled with dtparam=pciex1 and dtparam=pciex1_gen=2. The device tree’s MSI-X setup needs changing to the correct msi-parent, and pcie_aspm=off in cmdline.txt clears noisy link-error messages. Geerling found the TPU worked at Gen 1, 2 and 3 but logged some link errors at Gen 3. Since the dual module’s datasheet specifies Gen2 links and Geerling saw link errors only at Gen 3, Gen 2 is the safer setting. Python also needs handling: Bookworm ships Python 3.11, while PyCoral runs only up to 3.9, so Geerling’s route is Docker or an alternate system-wide Python version.

The sources disagree about the physical adapter. Geerling wrote that no A+E key HAT existed for the Pi 5 yet. Another setup guide recommends the A+E key Coral module (G31300) on the official M.2 HAT+. Confirm the key type of the specific HAT before you buy.

The Dual Edge TPU does not fit every M.2 E-key slot. Most boards wire only one lane per E-key slot. Geerling’s Pi PCIe database lists two native routes on a Pi: a Pineboards HAT with a PCIe switch, or the Seaberry board for the CM4. Even so, the CM4’s own PCIe implementation appears incompatible with any Coral TPU. Power is the other trap: each Edge TPU averages under 500 mA from the 3.3 V supply but can spike to roughly 3 A during inference. Under heat, the PCIe driver lowers the operating frequency and may reset the Edge TPU.

Can a Coral TPU on a Raspberry Pi Run a Large Language Model Like ChatGPT?

No. The Edge TPU is built for static-shape int8 models, and Google studied it on convolutional networks. The arithmetic is simple: at one byte per int8 parameter, even a 1.5-billion-parameter model like Qwen2.5 Coder 1.5B needs about 1.5 GB for weights, against roughly 8 MB of on-chip parameter cache. Coral’s documented strengths are vision workloads such as MobileNet classification and ssdlite detection. One Edge TPU runs MobileNet v2 at almost 400 frames per second by Coral’s own figure.

Even an LLM-capable accelerator struggled on a Pi in testing. In Geerling’s tests, the Hailo 10H on the AI HAT+ 2 (40 TOPS int8 with 8 GB of its own RAM) was beaten by the Pi 5’s CPU on LLMs. He concluded the HAT suits vision processing better. Geerling judged a 16 GB Pi, running models on its CPU, more flexible and faster than the HAT.

Is the Google Coral TPU Discontinued, and When Does Hailo Make More Sense?

The Coral software repositories are archived. The PyCoral repository on GitHub was archived on 3 July 2025, and the last libedgetpu release dates from July 2021. A 2026 comparison blog dates the archive to April 2026 and calls the USB Accelerator effectively out of production. On the date, GitHub’s own archive notice is the stronger evidence. Frigate’s hardware page now says Coral is no longer recommended for new installations, except where power requirements are particularly low or the hardware cannot use other accelerators. It also promises to keep supporting Coral for as long as practicably possible.

For a new build on a Raspberry Pi 5, Hailo is the main alternative. Hailo-8L is rated at 13 TOPS and Hailo-8 at 26 TOPS (2.5 W typical). Both come as M.2 modules and as the Raspberry Pi AI HAT+, and both run models compiled to Hailo’s HEF format. One Frigate-focused comparison lists about 11 ms inference for the Hailo-8L and about 7 ms for the Hailo-8. The AI HAT+ needs the Pi 5’s PCIe connector and does not work on a Pi 4. For a broader view of edge accelerator paths, our comparison of Coral vs Intel for edge ML inference covers another route.

Compare candidates on your own model rather than on headline throughput numbers:

  • Latency end to end, including pre- and post-processing, at your input size.
  • Throughput under sustained load, after thermal throttling has had time to show.
  • Operator coverage: how much of your graph each compiler maps to the accelerator.
  • Power, including transient peaks your supply must survive.
  • Cost: hardware, availability, and the effort of keeping a frozen software stack running.

Keeping an existing Coral deployment is reasonable while it meets its latency bar. The case for switching comes from a new model it cannot map, or from a host OS it cannot follow.

Who Can Port Our Model to a Coral TPU, or Tell Us Not To?

TechnoLynx takes teams from “we think this should run on the edge” to a measured decision and a working port. On build in-house or bring in a specialist: Ultralytics YOLO models have a documented three-step export path. Specialist help pays off when operators fall back to the CPU, accuracy drops at int8, or the target is unfamiliar hardware. A model that performs in training is a different artefact from one that performs on the deployment target, and the gap between them is engineering work. When choosing a partner, ask how they will measure on-device latency and accuracy against your baseline before porting. TechnoLynx’s IoT and embedded AI engineering work starts with a feasibility assessment before porting.

This engagement does not suit a single home Frigate install, which Frigate’s own detector documentation covers. Nor is it needed when the trigger is vague. Portability work should answer a named latency ceiling, a device constraint or a cloud cost, not portability for its own sake. Teams that would rather keep the model on its current hardware and make it faster there may be better served by runtime and hardware porting without a model swap on a different target.

FAQ

Do I Need a Coral TPU for Frigate?

Frigate runs object detection on a dedicated accelerator or GPU rather than the CPU, but it no longer recommends Coral for new installations except in very low-power cases. Hailo-8 and Hailo-8L are supported detectors for Raspberry Pi builds.

What Is a TPU?

A tensor processing unit is an accelerator built for neural-network arithmetic, and the Edge TPU is Google’s small, low-power version for TensorFlow Lite models. For how it compares with other processors, see GPU vs TPU vs CPU performance and efficiency.

What Can Google Coral Be Used For?

Coral is used for on-device inference with compact int8 vision models such as MobileNet, ssdlite detectors and, in Frigate, a quantised YOLOv9. Frigate camera detection is one well-documented use.