Yesterday I received a Google Coral Edge TPU. This is a USB thumb-drive sized FPGA which can improve ML performance. It works with the TensorFlow-lite library. The device uses ~2-4 watts of power and has good performance.

Getting it to work on Windows 10

I was not able to get the Coral working by following the directions on Google’s website. I was not able to get it working through WSL, Anaconda or Git Bash. The steps that worked were:

  • Install the Windows Runtime
  • In Powershell
    • If you don’t have Python installed run python. You will be asked to install Python v3.7 at the Microsoft App Store.
    • Install tensorflow-list v3.7 for Windows 10
    • Run pip install numpy Pillow
  • In WSL
    • Clone Google’s example repository: git clone coral-examples
    • Run the install script to download models and test images: cd coral-examples/python/examples/classification && bash
    • Copy the coral-examples repository into a folder accessible from Powershell: cp -r coral-examples /mnt/c/[user]

Running an example

Back in Powershell cd coral-examples/python/examples/classification. Then run the script:

python3 --model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels models/inat_bird_labels.txt --input images/parrot.jpg

With luck you will see a successful output:

INFO: Initialized TensorFlow Lite runtime.
Note: The first inference on Edge TPU is slow because it includes loading the model into Edge TPU memory.
Ara macao (Scarlet Macaw): 0.76172

This was the process that worked for me on my setup. I am interested in getting it working directly in WSL and/or a Docker container.