GithubHelp home page GithubHelp logo

rednafi / urban-sound-classification Goto Github PK

View Code? Open in Web Editor NEW
58.0 4.0 15.0 37.81 MB

Urban sound source tagging from an aggregation of four second noisy audio clips via 1D and 2D CNN (Xception)

License: MIT License

Jupyter Notebook 99.97% Python 0.03%
machine-learning classification audio-processing audio-tagging sound-classification sound-classification-spectrograms urban-sound-classification urban-sound-8k mel-spectrogram sound-processing

urban-sound-classification's Introduction

Urban Sound Classification

Urban sound source tagging from an aggregation of four second noisy audio clips via 1D and 2D CNN (Xception)

Dataset made-with-python MIT license stability-experimental Code style: black

Dataset Description

The Urban Sound Classification dataset contains 8732 labeled sound excerpts (<=4s) of urban sounds from 10 classes,namely:

  • Air Conditioner
  • Car Horn
  • Children Playing
  • Dog bark
  • Drilling Engine
  • Idling Gun Shot
  • Jackhammer
  • Siren
  • Street Music

The attributes of data are mapped as follows:

  • ID – Unique ID of sound excerpt and Class – type of sound

air_conditioner air_conditioner

Project Organization

Folder Structure

.
├── data
│   ├── img
│   │   ├── audio-features.png
│   │   ├── sound.png
│   │   └── time_freq.png
│   ├── test
│   │   └── Test
|   |       ├── 1.wav
|   |       ├── 2.wav
|   |       ├── .............
│   ├── test.csv
│   ├── train
│   │   └── Train
|   |       ├── 1.wav
|   |       ├── 2.wav
|   |       ├── ............
|   |
│   └── train.csv
├── LICENSE
├── notebooks
│   ├── eda_plots
│   │   ├── amplitude_vs_time
│   │   │   ├── air_conditioner.svg
│   │   │   ├── car_horn.svg
|   |   |   ├── ............
│   │   └── mel_spectrum
│   │       ├── air_conditioner.png
│   │       ├── car_horn.png
|   |       ├── ............
│   └── Exploratory Data Analysis.ipynb
├── README.md
├── requirements.txt
├── results
│   ├── acc_model_1d.png
│   ├── acc_model_2d.png
│   ├── loss_model_1d.png
│   ├── loss_model_2d.png
│   ├── pred_1d.csv
│   └── pred_2d.csv
└── src
    ├── test_1d.py
    ├── test_2d.py
    ├── train_1d.py
    ├── train_2d.py
    ├── utils_1d.py
    └── utils_2d.py

Workflow

Exploratory Data Analysis:

  • Frequency normalization and amplitude vs time plot
  • Mel spectogram plot

Audio Tagging:

  • Normalizing the audio clips and passing them through stacks of 1D convolution layers for feature extraction. Then the usual dense layer stacks were used to do the final categorization.

  • Extracting features in the form of mel-spectogram and passing them through stacks of 2D convolution layers for additional feature pulling. Dense layer stack does the final classification. In this case, we trained an Xception model from scratch to achieve better generalization capability.

Result

We achieved 89% validation accuracy in the second approach. xception_val_acc

Requirements

pip install -r requirements.txt

urban-sound-classification's People

Contributors

dependabot[bot] avatar pyup-bot avatar rednafi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

urban-sound-classification's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.