EBC Exercise 49 Setting Up coral

From eLinux.org
Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder

Here are instructions on how to run Google's coral ([1])


wget http://storage.googleapis.com/cloud-iot-edge-pretrained-models/edgetpu_api.tar.gz  # 6 seconds
tar xzf edgetpu_api.tar.gz
cd python-tflite-source

Edit last line of install.sh to use python3

bash ./install.sh         # 22 seconds, 33s on Surface

Installing on Bone

This install.sh file checks for Raspberry Pi, but not the Bone. There's a simple edit that can add the bone.

First run

bone$ cat /proc/device-tree/model
TI AM335x BeagleBone Black

Remember the string that is returned. Now edit install.sh. You'll several lines that look almost like:

  elif "$board_version" == "TI AM335x BeagleBone Black"* ; then
   echo -e "${GREEN}Recognized as Raspberry Pi 3 B+!${DEFAULT}"

Copy one set of three lines and edit to use the string returned by the cat command.

Save the file and run

bash install.sh

Mine to some 9 and a half minutes on BeagleBone Black and 7.5 minutes on an x15. The reboot seems necessary to get the right USB name to show up.

Set up hardware

Plug in. If you are running a virtual machine, have it capture

Global Unichip Corp.

A then it disappears and the following appears

Google Inc.

On my Surface I had to

  • quit VirtualBox
  • On your host machine, download the VirtualBox Extension Pack from: https://www.virtualbox.org/wiki/Downloads.
  • on your host, login as Administrator
  • run VirtualBox, but don't start a machine
  • go to Extensions and click the + button and add the extension pack you just downloaded
  • go to the USB settings and select the USB3.0 xHCI button
  • logoff as Administrator
  • run VirtualBox and start your machine
  • repeat the plugging in steps above


# From the python-tflite-source directory
cd edgetpu/
python3 demo/classify_image.py \
--model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--label test_data/inat_bird_labels.txt \
--image test_data/parrot.jpg

The following took 6 seconds on my x86 Ubuntu virtual machine, 5 on a native Ubuntu install and 12 seconds on the BeagleBone Black and 9 seconds on an x15.

thumb‎ Embedded Linux Class by Mark A. Yoder