Coder Social home page Coder Social logo

audio-classifier's Introduction

audio-classifier

Run training (including preprocessing the audio files) using the command:

python train.py --cnn --preprocess

Get predictions for a test set using

python infer.py --cnn 

adapting for streamed data

model

  • 2 * 1D convolutional layers (+ReLU) (input 1180 frame, output 64180 map)
  • LSTM layer (+tanh) (input 1*5120 and memory cell at t-1, output 500)
  • Fully connected layer (+softmax, dropout)(input 500, output 3)

For a low-latency streaming model, I’d replace the 2D convolution with 1D convolution, to output a probability distribution at each timestep. This switch incurs a tradeoff between latency and input context, since the time dimension of the receptive field of each convolutional kernel is reduced from 14(?) to 1. To add time context back into the model, the 64 feature maps for each timestep are flattened, and a unidirectional LSTM layer is applied.

This is followed by a fully connected layer with softmax to output a 1*3 probability distribution for each timestep. The model would be trained with CrossEntropyLoss function computed between the predicted and ground-truth probability distributions.

The lack of multi-category (or category switching) training data would make training an accurate model difficult. The LSTM layer would need to see examples of category switching in order to learn how to weight information from the current timestep and previous timesteps. Artificial switching data could be created by concatenating or cross-fading samples of different categories. Since this data would be very different from real switching data, it’s unclear whether this would improve classification accuracy for real data.

audio-classifier's People

Contributors

evelyndjwilliams avatar

Watchers

 avatar

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.