Help reaching 30fps realtime object detection -- No difference is FPS with tflite + coral TPU accelerator, what am I missing?

Hi All,

I am working on a robotics project that requires realtime object detection and tracking. The code reaches about 8fps on raspberry pi 4 B and I need it closer to 30fps.

I got a coral usb tpu accelerator and downloaded the tflite examples for object detection that have a model for the coral TPU:

There are two options for this demo:

Without TPU
python3 --model efficientdet_lite0.tflite

With TPU
python3 --enableEdgeTPU --model efficientdet_lite0_edgetpu.tflite

Running the object detection with either shows the same FPS ~8fps. The coral accellerator does blink when I run detection with TPU mode but I see no performance gains.

Originally I thought this could be a power consumption issue so I plugged it into an externally powered usb hub, that didn’t help. Then I though maybe it was a hardware issue so I got another coral accellerator and unfortunately got the same results.

Hoping someone can point me in the right direction here or offer another approach, I have been banging my head against the wall trying to improve performance in a bunch of ways and it feels like the TPU accelerator is the only thing that is going to get me there on edge hardware.



Hi there, I have felt your pain with regard to your situation. If this helps, I am running object-detection on a custom dataset at circa 30fps on a Raspberry Pi 4, 4GB. (The Coral TPU isn’t needed). The relevant starting point I used was here: on github I used the Google colab to retrain a PascalVOC custom dataset AFTER converting it to the required COCO format - visit Convert Dataset Formats — FiftyOne 0.22.1 documentation to see how to do it. The model that I used for training was the MobileNet-V2.