Tensorflow Lite CPU vs TPU. Take Two!

My last CPU vs TPU bench-marked CPU vs. Edge TPU image classification inference. With the tiny 28×28 images used (i.e. MNIST database demo), it showed the TPU lagging behind CPU! This time I did another test with larger test and training images using MobileNet V2. The codes are (and modified for CPU) from Coral.ai support website.

color image for image classification CPU vs TPU test


Results CPU only ..

Edge CPU image classification inference time test MobileNet V2
CPU and RAM usage image classification inference for CPU IMX8 only


vs with Edge TPU ..

Edge TPU performance image classification MobileNet v2
Board CPU and RAM usages for image classification using Coral TPU for inference


Bingo! With the more “representative” test image dataset, it was shown that the use of a ML accelerator like the Coral Edge TPU, inference screamed well ahead of CPU for image classification.

So, therefore this round the winner is ..

Google Coral EDGE M.2 TPU accelerator board 4 TOPS at 2W power


Next I am pretty keen to work on some Edge CPU vs TPU for video, e.g. object detection tests.

Latest posts