Skip to content

MaxCYCHEN/ML_Audio_Event_Classfication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML_Audio_Event_Classfication

An Audio event detection training tool & deployment

  • We easy the process of training and deployment on MCU.

1. First step

1. Install virtual env

  • If you haven't installed NuEdgeWise, please follow these steps to install Python virtual environment and choose NuEdgeWise_env.
  • Skip if you have done.

2. Running

  • The train.ipynb will help you train the model, and convert it to a TFLite, C++ file and Vela TFLite.

2. Work Flow

1. data prepare

(a.) No matter downloaded ESC-50 or your dataset, they should be in dataset and with ESC format. (b.) This tool uses ESC-50 dataset for training and testing which are given in ESC format. (c.) Your dataset must be comprised of:

  • A folder containing the audio files with all same format, like .wav.
  • A .csv file with at least a "filename" column and a "category" column.

2. training

  • train.ipynb provides various attributes for training configuration. User can control them by the easy UI in jupyter notebook. There are default model&training setting for miniresnetv2 and yamnet, and user can start from here with pre-train model.
  • More detail configuration are in cfg/my_config.yaml.
  • After training, testing result of normal & quantization model will be show as pictures.
  • The training reult and model are in workspace/YOUR_PROJECT_NAME

3. Test

  • Use Test tab in train.ipynb to test the tflite model with single test audio file which not go through preprocessing (rearranging the audio file). This testing is more like MCU inference scenario.

4. Fully test on Board (Optional)

  • In board_test folder, we offer a pyOCD script to communicate the board to test all test dataset.
  • We have a chance to test large number dataset from MCU and get the result.

5. Deployment

  • Utilize the Deployment tab in train.ipynb to convert the TFLite model to C source/header files and Vela TFLite.

3. Inference code

4. Reference

About

An Audio event detection training tool & deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors