STT-tensorflow/tensorflow/lite/micro/benchmarks
Advait Jain 4dadd12623 Move schema version into micro_interpreter.h
This is a first (somewhat non-intuitive) step towards being able to use
clang as part of the github CI system.

The benefits of this refactor are that we avoid a dependency into
tensorflow/core which reduces the number of files that need to be
downloaded as part of a bazel build from a TFLM CI docker image.

The tflite schema version has been unchanged since at-least Oct 2018
(when tflite was moved out of tensorflow/contrib).

Progress towards preventing a repeat of https://github.com/tensorflow/tensorflow/issues/46415
2021-01-15 11:17:42 -08:00
..
BUILD Move schema version into micro_interpreter.h 2021-01-15 11:17:42 -08:00
keyword_benchmark.cc Remove int16->int32 quantization from dequantize op. This logic has been moved into the quantize op. 2021-01-12 22:17:27 -08:00
keyword_scrambled_model_data.cc Update keyword benchmark to use new int16->int32 quantize op instead of dequantize for compatibility with tflite 2020-11-09 17:43:19 -08:00
keyword_scrambled_model_data.h Create keyword spotting benchmark. Keyword model has scrambled weights, so it will only function as a benchmark for performance optimizations. 2020-04-14 14:00:37 -07:00
Makefile.inc Move person_detection_experimental to person_detection and scrap uint8 version. 2020-12-02 16:33:28 -08:00
micro_benchmark.h PR : Build benchmarks as part of make build 2020-10-04 17:40:42 -07:00
person_detection_benchmark.cc Move schema version into micro_interpreter.h 2021-01-15 11:17:42 -08:00
README.md Create a benchmark for the person detection model. 2020-04-21 12:46:03 -07:00

TFLite for Microcontrollers Benchmarks

These benchmarks are for measuring the performance of key models and workloads. They are meant to be used as part of the model optimization process for a given platform.

Table of contents

Keyword benchmark

The keyword benchmark contains a model for keyword detection with scrambled weights and biases. This model is meant to test performance on a platform only. Since the weights are scrambled, the output is meaningless. In order to validate the accuracy of optimized kernels, please run the kernel tests.

Person detection benchmark

The keyword benchmark provides a way to evaluate the performance of the 250KB visual wakewords model.

Run on x86

To run the keyword benchmark on x86, run

make -f tensorflow/lite/micro/tools/make/Makefile TAGS=posix test_keyword_benchmark

To run the person detection benchmark on x86, run

make -f tensorflow/lite/micro/tools/make/Makefile TAGS=posix test_person_detection_benchmark

Run on Xtensa XPG Simulator

To run the keyword benchmark on the Xtensa XPG simulator, you will need a valid Xtensa toolchain and license. With these set up, run:

make -f tensorflow/lite/micro/tools/make/Makefile TARGET=xtensa-xpg XTENSA_CORE=<xtensa core>  TAGS=xtensa_hifimini test_keyword_benchmark -j18

Run on Sparkfun Edge

The following instructions will help you build and deploy this benchmark on the SparkFun Edge development board.

If you're new to using this board, we recommend walking through the AI on a microcontroller with TensorFlow Lite and SparkFun Edge codelab to get an understanding of the workflow.

Build binary using

make -f tensorflow/lite/micro/tools/make/Makefile TARGET=sparkfun_edge person_detection_benchmark_bin

Refer to flashing instructions in the Person Detection Example.