Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

google-coral/libcoral

Repository files navigation

This repository contains sources for the libcoral C++ API, which providesconvenient functions to perform inferencing and on-device transfer learningwith TensorFlow Lite models onCoral devices.

For developer documentation, see our guide toRun inference on the Edge TPUwith C++ and check out thelibcoral API reference.

Compilation

Be sure to clone this repo with submodules:

git clone --recurse-submodules https://github.com/google-coral/libcoral

If you already cloned without the submodules. You can add them with this:

cd libcoralgit submodule init && git submodule update

Then you can build everything usingmake command which invokesBazel internally.

For example, runmake tests to build all C++ unit tests ormake benchmarksto build all C++ benchmarks. To get the list of all available make targets runmake help. All output goes toout directory.

Linux

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

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 armhfsudo apt-get install -y crossbuild-essential-armhf \                        libpython3-dev:armhf \                        libusb-1.0-0-dev:armhfsudo dpkg --add-architecture arm64sudo 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 formakecommand:

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 4make CPU=aarch64 tests  # Builds for ARMv8, e.g. Coral Dev Board

macOS

You need to install the following software:

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

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

Docker

Docker allows to avoid complicated environment setup and build binaries forLinux on other operating systems without complicated setup, e.g.,

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp