Classify the audios. In this repo, I train a model on UrbanSound8K dataset,
and achieve about 80%
accuracy on test dataset.
There is a pre-trained model in urban_sound_train, trained epoch is 1000
audio_train.py
: Train audio model from scratch or restore from checkpoint.audio_params.py
: Configuration for training a model.audio_inference_demo.py
: Demo for test the trained model../audio/*
: Dependencies of training, model and datasets../vggish/*
: Dependencies of VGGish for feature extracting.
Conda are recommended, just need one line: conda env create -f conda.env.yml
- Config parameters:
audio_params.py
. - Train the model:
python audio_train.py
. (It will create tfrecords automaticly if not exists) - Check the training process from tensorboard:
tensorboard --logdir=./data/tensorboard
- Test the model:
python audio_inference_demo.py
.