Installing yolov8 on RPI5 is very simple:

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get autoremove -y
python3 -m venv yolo_env
source yolo_env/bin/activate
pip3 install ultralytics

To run the Coral TPU with the Raspberry Pi 5 I had to research a lot, since nothing was straight forward. One reason is, that Google stopped supporting their software support for their TPU long time ago. But Python has evolved and the old Google installations don't work anymore.

I mainly followed this article:Coral Edge TPU on a Raspberry Pi with Ultralytics YOLOv8, but also JungLearnBot/RPi5_yolov8/Coral_TPU and of course Get started with the USB Accelerator.

It took me some time, where I could not get any exported model to run on the TPU at all. Finally, after some debugging, I had to find out, that there is an implicit name convention mentioned nowhere. Here is the export as recommended:

yolo export model=yolov8n.pt format=edgetpu

 Despite the format=edgetpu, this export function creates file names like this for instance:

yolov8n_integer_quant.tflite

 But this will never be directed to the TPU. To run it on the TPU, it has to have a name with "_edgetpu.tflite" in the name, like

yolov8n_integer_quant_edgetpu.tflite

 So, you'll have to rename all exported files or make a copy to that name to compare both.
I tried to follow the Ultralytics article and in addition installed the edge_tpu_silva-version in a python 3.9 venv for comparison. Overall, both installation test results were the same and disappointing. There is a speed increase from *.pt models to *.tflite models through the optimization, but no difference between CPU and TPU execution. For 640 size the TPU execution even exceeded the CPU time.

Image SizeModel

RPi5-

CPU/TPU

RPi5-

Execution

Jetson Nano 

Execution

640*.ptCPU385.2ms64.4ms
*int8.ftliteCPU380.3ms
*int8_edgetpu.ftliteTPU383.3ms
320*.ptCPU110.5ms38.5ms
*int8.ftliteCPU68.4ms
*int8_edgetpu.ftliteTPU68.2ms
224*.pt CPU64.9ms37.9ms
*int8.ftlite CPU27.6ms
*int8_edgetpu.ftliteTPU27.7ms

To verify that the edgetpu version is really executed on the TPU, I unplugged the USB cable and observed the USB transfer error and the immediate abortion of the execution. The non-edgetpu model kept running when unplugging, so it must have been executed on the CPU only.

Conclusion: Looking at these measurements it doesn't seem to make sense to add the USB Coral TPU to the Raspberry Pi5. Smaller image sizes and the export to TFLITE reduce execution time, but you also trade in resolution and accuracy.

See my scripts here:Yolov8_Rpi5_CoralUSB