Skip to content

BakingBrains/Sound_Classification

Repository files navigation

Sound_Classification

Sound classification on Urban Sound Dataset

Download the urban sound dataset here

  • Extract the dataset on to a folder
  • Install pytorch (gpu verison if you have gpu)
  • Install the requirements
pip install -r requirements.txt
  • Run the dataset.py file (change the path to the dataset)
python dataset.py

This will give the number of items in the dataset

  • Then run modelcnn.py to know about the structure of the CNN model.
  • Then start the training. (change the path to the dataset)
python train.py
  • After the training, the model will be saved in a specified folder. Use the saved model for inferencing.
    Run
python inference.py

Reference: https://github.com/musikalkemist/pytorchforaudio