https://github.com/nobuotsukamoto/meta-tensorflow-lite
Yocto layer for TensorFlow Lite interpreter with Python / C++.
https://github.com/nobuotsukamoto/meta-tensorflow-lite
python3 recipes tensorflow-lite yocto
Last synced: about 1 year ago
JSON representation
Yocto layer for TensorFlow Lite interpreter with Python / C++.
- Host: GitHub
- URL: https://github.com/nobuotsukamoto/meta-tensorflow-lite
- Owner: NobuoTsukamoto
- License: mit
- Created: 2020-07-03T23:51:10.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-05-06T08:14:39.000Z (about 1 year ago)
- Last Synced: 2025-05-07T07:19:56.406Z (about 1 year ago)
- Topics: python3, recipes, tensorflow-lite, yocto
- Language: BitBake
- Homepage:
- Size: 751 KB
- Stars: 36
- Watchers: 4
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: COPYING.MIT
Awesome Lists containing this project
README
# meta-tensorflow-lite
Yocto layer for the TensorFlow Lite interpreter with Python / C++.
## The official website is:
- [TensorFlow Lite guide](https://www.tensorflow.org/lite/guide)
- [Python quickstart](https://www.tensorflow.org/lite/guide/python)
- [TensorFlow Lite](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite)
- [Google Coral](https://coral.ai/)
- [Edge TPU runtime library (libedgetpu)](https://github.com/google-coral/libedgetpu)
## Reference
- [Building TensorFlow Lite Standalone Pip](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/tools/pip_package)
- [Build TensorFlow Lite with CMake](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/guide/build_cmake.md)
- [Building with only a Makefile - libedgetpu](https://github.com/google-coral/libedgetpu/blob/master/makefile_build/README.md)
## Available BSP
Please note that it is not official support.
| BSP | Build status |
| :--------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------- |
| [meta-raspberrypi](https://github.com/agherzan/meta-raspberrypi) | [](https://github.com/NobuoTsukamoto/meta-tensorflow-lite/actions/workflows/build_rpi.yml) |
| [meta-riscv](https://github.com/riscv/meta-riscv) | [](https://github.com/NobuoTsukamoto/meta-tensorflow-lite/actions/workflows/build_riscv.yml) |
## Available recipes
- framework
- python3-tensorflow-lite
[Python3 interpreter](recipes-framework/tensorflow-lite/python3-tensorflow-lite_2.19.0.bb)
- libtensorflow-lite
[C++ API shared library](recipes-framework/tensorflow-lite/libtensorflow-lite_2.19.0.bb)
- libtensorflow-lite-c
[C API shared library](recipes-framework/tensorflow-lite/libtensorflow-lite-c_2.19.0.bb)
- libedgetpu-max / libedgetpu-std
[bitbake with libedgetpu](./doc/coral_libedgetpu.md)
- examples
- python3-tensorflow-lite-example
[TensorFlow Lite Python image classification demo](./doc/python3-tensorflow-lite-example.md)
- tensorflow-lite-label-image
[TensorFlow Lite C++ image classification demo](./doc/tensorflow-lite-label-image.md)
- tensorflow-lite-minimal
[TensorFlow Lite C++ minimal example](./doc/tensorflow-lite-minimal.md)
- tools
- tensorflow-lite-benchmark
[TFLite Model Benchmark Tool with C++ Binary](./doc/tensorflow-lite-benchmark.md)
### Support version
| Recipe | Version |
| :-- | :-- |
| TensorFlow Lite | v2.19.0 |
| libedgetpu | e35aed18fea2e2d25d98352e5a5bd357c170bd4d |
| FlatBuffers | v23.5.26 |
## How to
### Quick start for the Raspberry Pi AArch64 (core-image-weston)
```
# Clone repositories and oe-init-build-env
$ git clone git://git.yoctoproject.org/poky.git
$ git clone git://git.yoctoproject.org/meta-raspberrypi
$ git clone git://git.openembedded.org/meta-openembedded
$ git clone https://github.com/NobuoTsukamoto/meta-tensorflow-lite.git
$ source poky/oe-init-build-env build
# Add layer
$ bitbake-layers add-layer ../meta-openembedded/meta-oe/
$ bitbake-layers add-layer ../meta-openembedded/meta-python/
$ bitbake-layers add-layer ../meta-openembedded/meta-networking/
$ bitbake-layers add-layer ../meta-openembedded/meta-multimedia/
$ bitbake-layers add-layer ../meta-raspberrypi/
$ bitbake-layers add-layer ../meta-tensorflow-lite/
# Add the package to 'conf/auto.conf' file.
MACHINE ?= "raspberrypi4-64"
IMAGE_INSTALL:append = " python3-tensorflow-lite libtensorflow-lite"
# Build
$ bitbake core-image-weston
```
### Quick start for the qemuriscv64
```
# Clone repositories and oe-init-build-env
$ git clone https://github.com/openembedded/bitbake.git
$ git clone https://github.com/openembedded/openembedded-core.git
$ git clone https://github.com/openembedded/meta-openembedded.git
$ git clone https://github.com/riscv/meta-riscv.git
$ git clone https://github.com/NobuoTsukamoto/meta-tensorflow-lite.git
$ source openembedded-core/oe-init-build-env build
# Add layer
$ bitbake-layers add-layer ../meta-openembedded/meta-oe/
$ bitbake-layers add-layer ../meta-openembedded/meta-python/
$ bitbake-layers add-layer ../meta-openembedded/meta-networking/
$ bitbake-layers add-layer ../meta-openembedded/meta-multimedia/
$ bitbake-layers add-layer ../meta-riscv/
$ bitbake-layers add-layer ../meta-tensorflow-lite/
# Add the package to 'conf/auto.conf' file.
MACHINE ?= "qemuriscv64"
IMAGE_INSTALL:append = " python3-tensorflow-lite libtensorflow-lite"
# Build
$ bitbake core-image-full-cmdline
```