2021年4月12日 星期一

Edge AI - Train micro_speech model and deploy to NXP FRDM-K66F.

Tensorflow lite micro_speech example provide training method for speech recognize model to different key word detect.

In this article we use Google Colaboratory to train micro_speech model.

1. Open note book and change WANTED_WORDS
    I choose ON/OFF for my project.
# A comma-delimited list of the words you want to train for.
# The options are: yes,no,up,down,left,right,on,off,stop,go
# All the other words will be used to train an "unknown" label and silent
# audio data with no spoken words will be used to train a "silence" label.
WANTED_WORDS = "on,off"

2. Follow instruction and you can see training  progress(Model accuracy for training set and validation set) in tensorboard section.

3. Convert to TF-lite model and test TensorFlow Lite model's accuracy

5. Modify micro_speech/micro_features/micro_model_settings.cc kCategoryLabels to on/off

6. Replace micro_speech/micro_features/model.cc  to new trained model.

7. Build and flash 

8. Test result 





I use K66F onboard mic to test and the accuracy is lower than I expect. But the trained model has 80% more accuracy, so maybe need to use line mic to get better accuracy speech recognize result.

沒有留言:

張貼留言

Linux driver: How to enable dynamic debug at booting time for built-in driver.

 Dynamic debug is useful for debug driver, and can be enable by: 1. Mount debug fs #>mount -t debugfs none /sys/kernel/debug 2. Enable dy...