Skip to content

Latest commit

 

History

History
123 lines (84 loc) · 4.63 KB

README.md

File metadata and controls

123 lines (84 loc) · 4.63 KB

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 :

  • magic wand example
  • micro speech example
  • person detection INT8 example
  • handwriting example

Table of contents

Build Status

Build Type Status
Build (Linux) CI

Prerequisites

  • Make Tool version

    A make tool is required for deploying Tensorflow Lite Micro applications, See Check make tool version section for proper environment.

  • Development Toolkit

    Install one of the toolkits listed below:

  • curl command

    Installing curl for Ubuntu Linux.

    sudo apt update
    sudo apt upgrade
    sudo apt install curl
    
  • make command

    Installing make for Ubuntu Linux. (If make is not installed)

    sudo apt install make
    
  • Serial Terminal Emulation Application

    There are 2 main purposes for HIMAX WE1 EVB Debug UART port, print application output and burn application to flash by using xmodem send application binary.

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.