Get started with the USB Accelerator | Coral (2024)

The Coral USB Accelerator adds a Coral Edge TPU to yourLinux, Mac, or Windows computer so you can accelerate yourmachine learning models. This page is your guide to get started.

All you need to do is download the Edge TPU runtime and PyCoral library.Then we'll show you how to run a TensorFlow Lite model on the Edge TPU.

To learn more about the hardware, see theUSB Accelerator datasheet.

Get started with the USB Accelerator | Coral (1)

Requirements

  • A computer with one of the following operating systems:
    • Linux Debian 10, or a derivative thereof (such as Ubuntu 18.04), and a system architecture of either x86-64, Armv7 (32-bit), or Armv8 (64-bit) (includes support for Raspberry Pi 3 Model B+, Raspberry Pi 4, and Raspberry Pi Zero 2)
    • macOS 10.15 (Catalina) or 11 (Big Sur), with either MacPorts or Homebrew installed
    • Windows 10
  • One available USB port (for the best performance, use a USB 3.0 port)
  • Python 3.6 - 3.9

Raspberry Pi users: You can follow the steps below or you can instead flash your SD card with the AIY Maker Kit system image, which includes everything you need to use the USB Accelerator. For flashing instructions and Raspberry Pi-specific example code, see the AIY Maker Kit guide.

1: Install the Edge TPU runtime

The Edge TPU runtime provides the core programming interface for the Edge TPU. You can install it onyour host computer as follows, on Linux, on Mac, oron Windows.

1a: On Linux

  1. Add our Debian package repository to your system:

    echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.listcurl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -sudo apt-get update
  2. Install the Edge TPU runtime:

    sudo apt-get install libedgetpu1-std
  3. Now connect the USB Accelerator to your computer using the provided USB 3.0 cable. If you alreadyplugged it in, remove it and replug it so the newly-installed udev rule can take effect.

Then continue to install the PyCoral library.

Install with maximum operating frequency (optional)

The above command installs the standard Edge TPU runtime for Linux, which operates the device at areduced clock frequency. You can instead install a runtime version that operates at the maximumclock frequency. This increases the inferencing speed but also increases powerconsumption and causes the USB Accelerator to become very hot.

If you're not certain your application requires increased performance, you should use the reducedoperating frequency. Otherwise, you can install the maximum frequency runtime as follows:

sudo apt-get install libedgetpu1-max

You cannot have both versions of the runtime installed at the same time, but you can switch bysimply installing the alternate runtime as shown above.

Caution: When operating the device using the maximum clock frequency, the metal on the USB Accelerator can become very hot to the touch. This might cause burn injuries. To avoid injury, either keep the device out of reach when operating it at maximum frequency, or use the reduced clock frequency.

1b: On Mac

  1. Download and unpack the Edge TPU runtime:

    curl -LO https://github.com/google-coral/libedgetpu/releases/download/release-grouper/edgetpu_runtime_20220308.zip
    unzip edgetpu_runtime_20220308.zip
  2. Install the Edge TPU runtime:

    cd edgetpu_runtime
    sudo bash install.sh

    The installation script will ask whether you want to enable the maximum operating frequency.Running at the maximum operating frequency increases the inferencing speed but also increasespower consumption and causes the USB Accelerator to become very hot. If you're not certain yourapplication requires increased performance, you should type "N" to use the reduced operatingfrequency. You can change this later by re-running this script.

    You can read more about the performance setting in section 4.1 of the USBAccelerator datasheet.

  3. Now connect the USB Accelerator to your computer using the provided USB 3.0 cable.

Then continue to install the PyCoral library.

1c: On Windows

  1. First, make sure you have the latest version of the Microsoft Visual C++ 2019 redistributable.

  2. Then download edgetpu_runtime_20220308.zip.

  3. Extract the ZIP files and double-click the install.bat file inside.

    A console opens to run the install script and it asks whether you want to enablethe maximum operating frequency. Running at the maximum operating frequency increases theinferencing speed but also increases power consumption and causes the USB Accelerator to becomevery hot. If you're not certain your application requires increased performance, you should type"N" to use the reduced operating frequency. You can change this later by re-running this script.

    You can read more about the performance setting in section 4.1 of the USBAccelerator datasheet.

  4. Now connect the USB Accelerator to your computer using the provided USB 3.0 cable.

2: Install the PyCoral library

PyCoral is a Python library built on top of the TensorFlow Lite library to speed up your developmentand provide extra functionality for the Edge TPU.

We recommend you start with the PyCoral API, and we use this API in our example code below,because it simplifies the amount of code you must write to run an inference. But you can build yourown projects using TensorFlow Lite directly, in either Python or C++.

To install the PyCoral library (and its dependencies), use the following commands based on your system.

Note: PyCoral currently supports Python 3.6 through 3.9. If your default version is something else, we suggest you install Python 3.9 with pyenv.

2a: On Linux

If you're using Debian-based Linux system (including a Raspberry Pi), install PyCoral as follows:

sudo apt-get install python3-pycoral

2b: On Mac and Windows

If you're using Mac or Windows, install PyCoral as follows:

python3 -m pip install --extra-index-url https://google-coral.github.io/py-repo/ pycoral~=2.0

Windows users: Instead of typing python3 as shown here (and elsewhere in our docs), you can use the pylauncher. Just be sure you use Python 3.6 or newer.

Alternatively, you can download a specific PyCoral wheel fileand pass it to pip install.

3: Run a model on the Edge TPU

Now you're ready to run an inference on the Edge TPU.

Windows users: The following code relies on a Bash script to install dependencies. If you're new to using Bash on Windows, we suggest you try either Windows Subsystem for Linux or Git Bash from Git for Windows.

Follow these steps to perform image classification with our example code and MobileNet v2:

  1. Download the example code from GitHub:

    mkdir coral && cd coralgit clone https://github.com/google-coral/pycoral.gitcd pycoral
  2. Download the model, labels, and bird photo:

    bash examples/install_requirements.sh classify_image.py
  3. Run the image classifier with the bird photo (shown in figure 1):

    python3 examples/classify_image.py \--model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \--labels test_data/inat_bird_labels.txt \--input test_data/parrot.jpg
Get started with the USB Accelerator | Coral (2)

You should see results like this:

----INFERENCE TIME----Note: The first inference on Edge TPU is slow because it includes loading the model into Edge TPU memory.11.8ms3.0ms2.8ms2.9ms2.9ms-------RESULTS--------Ara macao (Scarlet Macaw): 0.75781

Congrats! You just performed an inference on the Edge TPU using TensorFlow Lite.

To demonstrate varying inference speeds, the example repeats the same inference five times.Your inference speeds might differ based on your host system and whether you're using USB 2.0or 3.0.

The top classification label is printed with the confidence score, from 0 to 1.0.

To learn more about how the code works, take a look at the classify_image.py source codeand read about how to run inference with TensorFlow Lite.

Note:The example above uses the PyCoral API, which calls into the TensorFlow Lite Python API, but you caninstead directly call the TensorFlow Lite Python API or use the TensorFlow Lite C++ API. For moreinformation about these options, read theEdge TPU inferencing overview.

Next steps

To run some other models, such as real-time object detection, pose estimation, keyphrase detection,on-device transfer learning, and others, check out our example projects. Inparticular, if you want to try running a model with camera input (including support for theRaspberry Pi camera), try one of the several cameraexamples.

If you want to train your own model, try these tutorials:

Or to create your own model that's compatible with the Edge TPU, readTensorFlow Models on the Edge TPU.

Get started with the USB Accelerator | Coral (2024)

FAQs

What can you do with Google Coral? ›

The most popular use cases of Coral TPUs are based on computer vision and visual deep learning on the edge. Object detection: Detect objects and people (using face recognition) with a real-time video of a camera. Pose estimation: Estimate the poses of people or objects based on the detection and tracking of key points.

What is ML accelerator? ›

These so-called machine learning accelerators (also called AI accelerators) have the potential to greatly increase the efficiency of ML tasks (usually deep neural network tasks), for both training and inference.

How do you install Pycoral? ›

  1. Get started.
  2. Get started with Arduino.
  3. Build apps with FreeRTOS.
  4. Create a multi-core app.
  5. Set up the Wireless Add-on board.
  6. Set up the PoE Add-on board.
  7. Dev Board Micro Datasheet.
  8. Wireless Add-on Datasheet.

Is Coral owned by Google? ›

Coral is a complete prototyping toolkit from Google, designed to allow users to build products with local AI. The portfolio includes hardware components that bring high-performance ML capabilities onto the edge devices, as well as a complete set of software tools to develop ML models and applications.

How much does coral app cost? ›

Coral offers an auto-renewing annual subscription at $59.99/year that unlocks unlimited access to our content and community while you maintain an active subscription.

What is Google Orca? ›

Orca Security provides instant-on, workload-deep security for Google Cloud Platform. Orca deploys and scales in minutes without the need to install and maintain agents.

Is AI or Cs ML better? ›

Tech professionals specializing in AI and ML is super high, and hence, there is a crunch of employees in the market. Salary for the CSE employee starts from INR 3 lakh per annum, while that of a professional with an AI and ML background gets a job with INR 6 lakh per annum.

Which platform is best for ML? ›

Typically, ML typically focuses on known knowledge and ways to put it to use more effectively.
  • How to Choose the Best Machine Learning Software.
  • Alteryx Machine Learning Platform.
  • Databricks Lakehouse.
  • Dataiku.
  • Google Vertex AI.
  • H2O.ai.
  • KNIME.
  • MathWorks MATLAB.
16 Jun 2022

How do you win a ML competition? ›

Read some books. Play in 'knowledge' competitions. See what the others are doing in kernels or in past competitions look for the 'winning solution sections' Team up with more experience users, but you need to improve your ranking slightly before this happens.

What is PyCoral? ›

∎ PyCoral is an extension module of python, developed using the python/C API. ∎ It is a python interface to the CORAL. package. ∎ PyCoral module implements python.

What is Mendel Linux? ›

Mendel Linux is a lightweight derivative of Debian Linux that runs on a number of Coral development boards, such as the Dev Board and SoM. If you're looking to get started with any of the Coral boards, please take a look at the Coral doccumentation for more information.

How do you install a pylot? ›

You can install Pylot on your base system by executing the following commands:
  1. git clone https://github.com/erdos-project/pylot cd pylot export PYLOT_HOME=`pwd`/ ./install.sh pip install -e ./ ...
  2. export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.10.1/ ./scripts/run_simulator.sh.

Who bought Coral? ›

As of 2015, Coral had 1,845 shops across the country.
...
Coral (bookmaker)
IndustrySports betting Gambling
HeadquartersUnited Kingdom
OwnerEntain
Websitehttp://www.coral.co.uk
3 more rows

What is Coral edge TPU? ›

The Google Coral Edge TPU is a new machine learning ASIC from Google. It performs fast TensorFlow Lite model inferencing with low power usage. We take a quick look at the Coral Dev Board, which includes the TPU chip and is available in online stores now. Photo by Gravitylink.

Is coral app any good? ›

My experience using Coral was certainly amusing and playful. It allowed me to have some interesting conversations with my boyfriend about what we do in the bedroom and helped lighten the mood for talking about sexy things we wouldn't normally bring up or suggest.

Is there a free couples app? ›

The 8 Best Apps for Couples in 2021
  • Cobble App.
  • Merge.
  • Kukini.
  • Coral.
  • Coupleness.
  • Between.
  • GoodBudget.
  • Love Nudge.
2 Mar 2021

Can you cancel coral account? ›

You can delete your Corals account by contacting Coral, either by email or live chat.

Do Google Apps track you? ›

Google tracks your search history, for example, as well as your mobile device's location, the ads you view, the videos you watch, and more. If you prefer, you can configure Google to stop tracking you — at least, for the most part — though if you do, you'll lose the benefit of all of Google's personalization features.

Who can see my Google Keep? ›

The content you save on Keep is private to you, from others, unless you choose to share it. Learn how to share items in Keep. Google respects your privacy. We access your private content only when we have your permission or are required to by law.

What are the apps removed by Google? ›

Google has removed 16 apps that engaged in ad fraud to artificially increase ad interaction.
  • High-Speed Camera.
  • Smart Task Manager.
  • Flashlight+
  • com.smh.memocalendar memocalendar.
  • 8K-Dictionary.
  • BusanBus.
  • Flashlight+
  • Quick Note.
23 Oct 2022

What is Google coral in a laptop? ›

Coral is a hardware and software platform for building intelligent devices with fast neural network inferencing. At the heart of our devices is the Coral Edge TPU coprocessor. This is a small ASIC built by Google that's specially-designed to execute state-of-the-art neural networks at high speed, with a low power cost.

What is a coral device? ›

Coral is a complete prototyping toolkit from Google, designed to allow users to build products with local AI. The portfolio includes hardware components that bring high-performance ML capabilities onto the edge devices, as well as a complete set of software tools to develop ML models and applications.

Which laptop is given by Google? ›

Google Chromebooks - Laptops, Detachables and Tablets.

Can I use Google go in PC? ›

Download Google Go: A lighter, faster way to search on PC with MEmu Android Emulator. Enjoy playing on big screen. Google Go is a lighter, faster way to search, with search results optimised to save up to 40% data.

Do Google apps work on laptop? ›

The apps you see in the Play Store are written to run on devices that use the Android operating system. Your computer probably runs either the Windows or Mac OSX operating system. They aren't compatible.

What are the 3 types of coral? ›

The three main types of coral reefs are fringing, barrier, and atoll. Schools of colorful pennantfish, pyramid, and milletseed butterflyfish live on an atoll reef in the Northwestern Hawaiian Islands. The most common type of reef is the fringing reef. This type of reef grows seaward directly from the shore.

What tool breaks coral the fastest? ›

Breaking. Coral blocks can be obtained only with a pickaxe enchanted with Silk Touch; if mined with a pickaxe not enchanted with Silk Touch, they drop the respective dead coral block.

What is a coral Class 4? ›

Coral is a class of colonial animal that is related to hydroids, jellyfish, and sea anemones. It is made up of thousands of tiny animals called polyps. Corals also provide habitat for a large variety of marine life, including various sponges, oysters, clams, crabs, sea stars, sea urchins, and many species of fish.

How was Linux born? ›

Linux began in 1991 as a personal project by Finnish student Linus Torvalds: to create a new free operating system kernel. The resulting Linux kernel has been marked by constant growth throughout its history.

What was Linux originally called? ›

He originally intended to name it “Freax,” but the administrator of the server Torvalds used to distribute the original code named his directory “Linux” after a combination of Torvalds' first name and the word Unix, and the name stuck.

What is Linux in simple words? ›

Linux® is an open source operating system (OS). An operating system is the software that directly manages a system's hardware and resources, like CPU, memory, and storage. The OS sits between applications and hardware and makes the connections between all of your software and the physical resources that do the work.

Top Articles
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 6747

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.