Skip to content

Namburger/edgetpu-minimal-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edgetpu-minimal-example

License made-with-coral made-with-c++ made-with-tflite made-with-cmake ai-with-ai

This repo demonstrate how to build google-coral/edgetpu minimal example natively. The code was modified slightly to supports CPU models and take in a label file. Since bazel doesn't have great supports for arm platform, we'll use cmake (the CMakeLists.txt is based on this repo). Platform tested on are x86_64, armv7l, and aarch64.

Build Instructions

$ git clone https://github.com/Namburger/edgetpu-minimal-example.git && cd edgetpu-minimal-example
$ ./scripts/install_cmake.sh // install cmake if needed
$ ./scripts/make2gbswap.sh //  [Optional] increase swap to avoid OOM killer
$ mkdir build && cd build
$ cmake ..
$ make

This process may takes ~ 30 -> 45 mins on the Coral Dev Board and the RPI since it'll build the libtensorflow-lite.a

Run

With edgetpu:

$ export LD_LIBRARY_PATH=../libedgetpu/direct/aarch64
$ ../out/aarch64/minimal ../test_data/mobilenet_v1_1.0_224_quant_edgetpu.tflite ../test_data/resized_cat.bmp ../test_data/imagenet_labels.txt

Without edgetpu:

$ export LD_LIBRARY_PATH=../libedgetpu/direct/aarch64
$ ../out/aarch64/minimal ../test_data/mobilenet_v1_1.0_224_quant.tflite ../test_data/resized_cat.bmp ../test_data/imagenet_labels.txt

About

minimal example with native build instructions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published