https://github.com/iwatake2222/generic-tflmicro
CMake project for TensorFlow Lite Micro
https://github.com/iwatake2222/generic-tflmicro
cmake cpp tensorflow tensorflow-lite
Last synced: 7 months ago
JSON representation
CMake project for TensorFlow Lite Micro
- Host: GitHub
- URL: https://github.com/iwatake2222/generic-tflmicro
- Owner: iwatake2222
- License: apache-2.0
- Created: 2021-03-29T16:29:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-18T05:02:00.000Z (almost 5 years ago)
- Last Synced: 2025-06-11T14:44:05.327Z (10 months ago)
- Topics: cmake, cpp, tensorflow, tensorflow-lite
- Language: C++
- Homepage:
- Size: 475 KB
- Stars: 15
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generic-tflmicro
- This repository provides:
- cmake project to generate TensorFlow Lite for Microcontrollers ( TFLM ) as a library
- You can easily use TFLM in your project by adding this repository as git-submodule
- sample project (hello world project) to use the TFLM library
- The TFLM library in this repo doesn't have platform-specific hardware optimizations. So the library should run on any platform
- I made this repository mainly for development on PC (Windows and Linux on x64)
- When you use a specific hardware like Arduino, it' better to create a new library for the device to get better performance
## How to build
### PC Linux (x64)
```sh
mkdir -p build && cd build/
cmake ..
make -j4
./examples/hello_world/hello_world
```
### Windows (Visual Studio 2019) (x64)
- Use cmake-gui
## How to use in your project
Refer to [examples/hello_world/CMakeLists.txt](examples/hello_world/CMakeLists.txt)
## How this repository was generated
- Clone code and generate all projects
- It's actually no need to generate all projects, but just generating hello_world project didn't work to me
```sh
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
# git checkout 1e8f4666f2fbc1bdd4ce2797b218de0453cffc63
make -f tensorflow/lite/micro/tools/make/Makefile generate_projects
# make -f tensorflow/lite/micro/tools/make/Makefile generate_hello_world_make_project
ls tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/prj/hello_world/tensorflow_lite.zip
```
- Add CMakeLists.txt files
- Do some modifications (see commit log to find diff)