adiyoss / GCommandsPytorch

ConvNets for Audio Recognition using Google Commands Dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConvNets for Speech Commands Recognition

Training ConvNet models using Google Commands Dataset, implemented in PyTorch.

Features

  • Training and testing ConvNets.
  • Arrange Google Commands Dataset, in an Train, Test, Valid folders for easy loading.
  • Dataset loader.

Installation

Several libraries are needed to be installed in order to extract spectrograms and train the models.

Usage

Google Commands Dataset

Download and extract the Google Commands Dataset.

To make the arrange the data run the following command:

python make_dataset.py <google-command-folder> --out_path <path to save the data the new format>

Custom Dataset

You can also use the data loader and training scripts for your own custom dataset. In order to do so the dataset should be arrange in the following way:

root/up/kazabobo.wav
root/up/asdkojv.wav
root/up/lasdsa.wav
root/right/blabla.wav
root/right/nsdf3.wav
root/right/asd932.wav

Training

Use python run.py --help for more parameters and options.

python run.py --train_path <train_data_path> --valid_path <valid_data_path> --test_path <test_data_path>

Results

Accuracy results for the train, validation and test sets using two ConvNet models (LeNet5 and VGG11).

In order to reproduce the below results just exec the run.py file with default parameters. Results may be improved using deeper models (VGG13, VGG19), or better hyper-parameters optimization.

Model Train acc. Valid acc. Test acc.
LeNet5 99% (50742/51088) 90% (6093/6798) 89% (6096/6835)
VGG11 97% (49793/51088) 94% (6361/6798) 94% (6432/6835)

About

ConvNets for Audio Recognition using Google Commands Dataset


Languages

Language:Python 100.0%