Porting of "TensorFlow Lite Examples" to Unity. and some utilities for Unity.
Tested on
- iOS / Android / macOS / Ubuntu / Windows
- Unity 2019.4.5f1
- TensorFlow 2.3.0
Included prebuilt libraries
iOS | Android | macOS | Ubuntu | Windows | |
---|---|---|---|---|---|
Core CPU | ✅ | ✅ | ✅ | ✅ | ✅ |
Metal Delegate | ✅ | - | ✅ | - | - |
OpenGL Delegate | - | ✅ | - | - | - |
NNAPI Delegate | - | ✅ | - | - | - |
- Clone or Download this repository with examples
- Need Git-LFS to build for iOS
- Or core library is available on OpenUPM
Pre-built libraries are included. If you want to use the latest TFLite,
- Clone TensorFlow library
- Run
./configure
in the TensorFlow library - Run
./build_tflite.py
(Python3) to build for each platform
# Update iOS, Andoid and macOS
./build_tflte.py --tfpath ../tensorflow -ios -android -macos
- To build macOS Metal Delegate on TensorFlow v2.3.0 or later, You need to apply following changes the issue
[Android] You can see logs from tflite by filtering with "tflite"
adb logcat Unity:V tflite:V "*:S"
Samples folder Assets/Samples/*
is licensed under MIT
Other licenses
- TensorFlow
- Assets/StreamingAssets/*.tflite Models
- Assets/StreamingAssets/mediapipe Models
- Some MediaPipe C# codes are based on terryky/tflite_gles_app