Skip to content
Source code for the Edge TPU API library
C++ Python C Shell Smarty Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks diploria2 release Sep 20, 2019
compiler diploria2 release Sep 20, 2019
debian diploria2 release Sep 20, 2019
docker diploria2 release Sep 20, 2019
docs diploria2 release Sep 20, 2019
edgetpu diploria2 release Sep 20, 2019
examples diploria2 release Sep 20, 2019
libedgetpu diploria2 release Sep 20, 2019
scripts diploria2 release minor fixes Oct 7, 2019
src/cpp diploria2 release minor fixes Oct 7, 2019
test_data diploria2 release Sep 20, 2019
tests diploria2 release Sep 20, 2019
tools diploria2 release Sep 20, 2019
.gitignore diploria2 release Sep 20, 2019
BUILD.python diploria2 release Sep 20, 2019
CONTRIBUTING.md diploria2 release Sep 20, 2019
LICENSE diploria2 release Sep 20, 2019
MANIFEST.in diploria2 release Sep 20, 2019
Makefile diploria2 release Sep 20, 2019
README.md diploria2 release Sep 20, 2019
WORKSPACE diploria2 release Sep 20, 2019
setup.py diploria2 release Sep 20, 2019

README.md

Edge TPU Python API

This repository contains an easy-to-use Python API to work with Coral devices:

You can run inference and do transfer learning.

Build and install from source

  1. Sync the source code as per the Mendel get started guide.

  2. Run cd packages/edgetpu/ to switch current working directory

  3. Run scripts/runtime/install.sh to install Edge TPU runtime

  4. Run scripts/build_swig.sh to build SWIG-based native layer

  5. Run make wheel to generate Python 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 Makefile. 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.

You can cross-compile code for different platforms by setting CPU variable:

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

Docker allows to avoid complicated environment setup and run the same Makefile targets:

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

All output goes to out directory.

You can’t perform that action at this time.