- Notifications
You must be signed in to change notification settings - Fork149
Python API for ML inferencing and transfer-learning on Coral devices
License
google-coral/pycoral
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains an easy-to-use Python API that helps you run inferencesand perform on-device transfer learning with TensorFlow Lite models onCoral devices.
To install the prebuilt PyCoral library, see the instructions atcoral.ai/software/.
Note: If you're on a Debian system, be sure to install this library fromapt-get and not from pip. Usingpip install
is not guaranteed compatible withthe other Coral libraries that you must install from apt-get. For details, seecoral.ai/software/.
To learn more about how to use the PyCoral API, see our guide toRun inferenceon the Edge TPU with Python andcheck out thePyCoral API reference.
Several Python examples are available in theexamples/
directory. Forinstructions, see theexamples README.
When building this library yourself, it's critical that you haveversion-matching builds oflibcoral andlibedgetpu—noticethese are submodules of the pycoral repo, and they all share the sameTENSORFLOW_COMMIT
value. So just be sure if you change one, you must changethem all.
For complete details about how to build all these libraries, readBuild Coral for your platform.Or to build just this library, follow these steps:
Clone this repo and include submodules:
git clone --recurse-submodules https://github.com/google-coral/pycoral
If you already cloned without the submodules. You can add them with this:
cd pycoralgit submodule init && git submodule update
Run
scripts/build.sh
to build pybind11-based native layer for differentLinux architectures. Build is Docker-based, so you need to have itinstalled.Run
make wheel
to generate Python library wheel and thenpip3 install $(ls dist/*.whl)
to install it
About
Python API for ML inferencing and transfer-learning on Coral devices