• Stars
    star
    422
  • Rank 102,753 (Top 3 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Coral issue tracker (and legacy Edge TPU API source)

Coral issue tracker

This edgetpu repo is primarily our issue tracker for all types of bugs or feature requests with Coral devices and software.

If you have an issue, please report it here.

The code that remains in this repo is legacy and might be removed in the future.

Legacy readme

The following build information is still accurate for the code in this repo, but beware that all the code in here is no longer maintained.

You should instead refer to the following repos:

Edge TPU Runtime

Run scripts/runtime/install.sh to install Edge TPU runtime or scripts/runtime/uninstall.sh to uninstall it.

Edge TPU Python API

  1. Run scripts/build_swig.sh to build SWIG-based native layer for different Linux architectures. Build is Docker-based, so you need to have it installed.

  2. Run make wheel to generate Python library wheel and then pip3 install $(ls dist/*.whl) to install it

Native C++ code

All native code is inside src folder. You can build everything using make command which invokes Bazel internally.

For example, run make tests to build all C++ unit tests or make benchmarks to build all C++ benchmarks. To get the list of all available make targets run make help. All output goes to out directory.

Linux

On Linux you can compile natively or cross-compile for 32-bit and 64-bit ARM CPUs.

To compile natively you need to install at least the following packages:

sudo apt-get install -y build-essential \
                        libpython3-dev \
                        libusb-1.0-0-dev \

and to cross-compile:

sudo dpkg --add-architecture armhf
sudo apt-get install -y crossbuild-essential-armhf \
                        libpython3-dev:armhf \
                        libusb-1.0-0-dev:armhf

sudo dpkg --add-architecture arm64
sudo apt-get install -y crossbuild-essential-arm64 \
                        libpython3-dev:arm64 \
                        libusb-1.0-0-dev:arm64

Compilation or cross-compilation is done by setting CPU variable for make command:

make CPU=k8      tests  # Builds for x86_64 (default CPU value)
make CPU=armv7a  tests  # Builds for ARMv7-A, e.g. Pi 3 or Pi 4
make CPU=aarch64 tests  # Builds for ARMv8, e.g. Coral Dev Board

macOS

You need to install the following software:

  1. Xcode from https://developer.apple.com/xcode/
  2. Xcode Command Line Tools: xcode-select --install
  3. Bazel for macOS from https://github.com/bazelbuild/bazel/releases
  4. MacPorts from https://www.macports.org/install.php
  5. Ports of python interpreter and numpy library: sudo port install python35 python36 python37 py35-numpy py36-numpy py37-numpy
  6. Port of libusb library: sudo port install libusb

Right after that all normal make commands should work as usual. You can run make tests to compile all C++ unit tests natively on macOS.

Docker

Docker allows to avoid complicated environment setup and build binaries for Linux on other operating systems without complicated setup:

make DOCKER_IMAGE=debian:buster DOCKER_CPUS="k8 armv7a aarch64" DOCKER_TARGETS=tests docker-build
make DOCKER_IMAGE=ubuntu:18.04  DOCKER_CPUS="k8 armv7a aarch64" DOCKER_TARGETS=tests docker-build

More Repositories

1

project-posenet

Human Pose Detection on EdgeTPU
Python
550
star
2

examples-camera

Small code snippets that show how to stream camera images to a Coral device.
Python
360
star
3

pycoral

Python API for ML inferencing and transfer-learning on Coral devices
Python
355
star
4

project-bodypix

BodyPix model demo application for Google Coral
Python
275
star
5

libedgetpu

Source code for the userspace level runtime driver for Coral.ai devices.
C++
183
star
6

tflite

Examples using TensorFlow Lite API to run inference on Coral devices
Python
182
star
7

tutorials

Colab/Jupyter tutorials about training TensorFlow models for Edge TPU, and other tutorials
Jupyter Notebook
179
star
8

project-keyword-spotter

Audio Keyphrase Detector
Python
139
star
9

example-object-tracker

Python
110
star
10

coralmicro

Source code for Coral Dev Board Micro
C++
105
star
11

edgetpu-platforms

EdgeTPU support for other platforms, specifically Raspberry Pi Zero
Shell
79
star
12

libcoral

C++ API for ML inferencing and transfer-learning on Coral devices
C++
78
star
13

project-teachable-sorter

Python
51
star
14

test_data

Trained and compiled TF Lite models, and other testing data for Coral devices
Starlark
47
star
15

project-birdfeeder

Python
41
star
16

webcoral

JavaScript
34
star
17

project-banana-robo

Python
30
star
18

electricals

Electrical designs for coral.ai projects
HTML
27
star
19

project-teachable

Example Project: Teachable Machine
Python
26
star
20

crosstool

Starlark
19
star
21

project-cloud-monitor

Python
15
star
22

example-multiple-edgetpus

C++
14
star
23

demo-manufacturing

C++
13
star
24

aiy-maker-kit

Simple Python API for ML inferencing with TF Lite and Coral Edge TPU
Python
10
star
25

imprinting-training

Imprinting training scripts of tensorflow.
Python
9
star
26

aiy-maker-kit-tools

Build scripts to create RPI OS system image for AIY Maker Kit
Python
7
star
27

py-repo

Python
5
star
28

mechanicals

Reference mechanical designs for coral.ai projects
5
star
29

demo-multi-video-stream

Demo showcasing processing multiple videostreams in parallel on system with 8 EdgeTPUs
C++
4
star
30

coralmicro-out-of-tree-sample

C++
3
star
31

coralmicro-rt1176-sdk

C
2
star
32

coralmicro-littlefs-fuse

C
1
star