HimaxWiseEyePlus / himax_tflm

Apache License 2.0
24 stars 15 forks source link

HIMAX TensorFlow Lite for Microcontrollers

It is a modified version of the TensorFlow Lite for Microcontrollers for use with HIMAX WE-I Plus Boards. Each example in the package has been tested in Ubuntu 20.04 LTS environment.

Following examples are included :

Table of contents

Build Status

Build Type Status
Build (Linux) CI

Prerequisites

Deploy to Himax WE1 EVB

The example project for HIMAX WE1 EVB platform can be generated with following command:

Download related third party data and model setting (only need to download once)

make download

Default building toolchain in makefile is Metaware Development toolkit, if you are trying to build example with GNU toolkit. please change the ARC_TOOLCHAIN define in Makefile like this

#ARC_TOOLCHAIN ?= mwdt
ARC_TOOLCHAIN ?= gnu

Build magic wand example and flash image, flash image name will be magic_wand.img

make magic_wand
make flash example=magic_wand

Build micro speech example and flash image, flash image name will be micro_speech.img

make micro_speech
make flash example=micro_speech

Build person detection INT8 example and flash image, flash image name will be person_detection_int8.img

make person_detection_int8
make flash example=person_detection_int8

Build handwriting example and flash image, flash image name will be handwriting.img. please check here to know more about handwriting detail.

make handwriting
make flash example=handwriting

After flash image generated, please download the flash image file to HIMAX WE1 EVB by UART, details are described here

Training your own model

Model used by handwriting example is training with MNIST dataset, please take a look here about training flow if you are interested in.

Convert model from PyTorch to TensorFlow Lite for Microcontrollers

Whenever there is a PyTorch model in your hand, here is a tutorial to switch it to tflite model and deploy it on HIMAX WE1 EVB.