GithubHelp home page GithubHelp logo

alefiury / audio-tagging-single-attention-cnn Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 63 KB

This is an implementation in Pytorch of a Single Attention Convolutional Neural Network model for audio tagging and sound event detection.

License: MIT License

Shell 0.79% Python 99.21%
cnn pytorch-implementation attention-mechanism efficientnet

audio-tagging-single-attention-cnn's Introduction

Audio Tagging Single Attention CNN

Linux Python PyTorch scikit-learn Pandas

This repository contains an implementation in Pytorch of a Single Attention Convolutional Neural Network (Single-Att-CNN) model for audio tagging and sound event detection.

Introduction

The model is trained and evaluated on the ESC-50 dataset, but can be easily modified to be applied on others datasets or used as a base layout for your projects.

The model is comprised of a CNN component that is used as an encoder and a single-attention mechanism that is based on how humans perceive and classify different kinds of sounds.

How the Application Works

Installation

Clone this repository and install all the dependencies. The usage of a virtualenv or Conda environment is recommended.

git clone https://github.com/alefiury/Audio-Tagging-Single-Attention-CNN
cd Audio-Tagging-Single-Attention-CNN
pip install -r requirements.txt

Dataset

First, is necessary to download the dataset that you will be using. The ESC-50 dataset can be downloaded with the following bash command:

sudo bash download_dataset.sh

Configuration

The application uses Hydra to control all the training configurations. For more information on Hydra and it's documentation visit the Hydra website.

The relevant information related with the training configuration can be found in the default.yaml file, inside the config folder.

You can also pass or modify options through the command line, for instance: python main.py train.epochs=100.

Logging

To save training statistics (loss, accuracy, gradients and etc) the Weights & Biases plataform is used. Is necessary that you create an account before running the application. Related information can be found on their website.

Training and Evaluation

To train or evaluate your model you need to set the command option.

  • To train: python main.py command=train
  • To evaluate: python main.py command=test

Author

  • Alef Iury Siqueira Ferreira

Contact

audio-tagging-single-attention-cnn's People

Contributors

alefiury avatar

Stargazers

Alexander Ivkin avatar Yuan-Man avatar Vitor Albuquerque avatar Myeonghoon Ryu avatar owlwang avatar  avatar

Watchers

 avatar  avatar

Forkers

ishine

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.