Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
General:  urban Task:  audio classification Data Domain:  audio Integration:  dvc git mlflow
52c2c3a676
Initialize DVC
1 year ago
src
80bc30793b
Add readme and full dataset
9 months ago
52c2c3a676
Initialize DVC
1 year ago
3ff6bd3070
build a pipeline to train the model
1 year ago
80bc30793b
Add readme and full dataset
9 months ago
80bc30793b
Add readme and full dataset
9 months ago
3ff6bd3070
build a pipeline to train the model
1 year ago
3ff6bd3070
build a pipeline to train the model
1 year ago
3ff6bd3070
build a pipeline to train the model
1 year ago
3ff6bd3070
build a pipeline to train the model
1 year ago
086cec9206
Update MLflow version
1 year ago
Storage Buckets
Data Pipeline
Legend
DVC Managed File
Git Managed File
Metric
Stage File
External File

README.md

You have to be logged in to leave a comment. Sign In

Urban Audio Classification using CNN

This project aims to classify urban sounds from the UrbanSound8K dataset into 10 different classes using Convolutional Neural Networks.

Introduction

Urban sound classification involves categorizing various urban sounds into distinct classes, such as sirens, car horns, street music, and more. This project uses machine learning to automate the classification process based on audio data.

Dataset

The UrbanSound8K dataset is a compilation of urban sound recordings, classified in 10 categories according to the paper "A Dataset and Taxonomy for Urban Sound Research", which proposes a taxonomical categorization to describe different environmental sound types.

The UrbanSound8K dataset contains 8732 labeled sound slices of varying duration up to 4 seconds. The categorization labels being:

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

Note that the dataset comes already organized in 10 validation folds. In the case we want to compare our results with other we should stick with this schema.

  • Dataset metadata The included metadata file (audio_data/metadata/UrbanSound8K.csv) provides all the required information about each audio file:

    • slice_file_name: The name of the audio file.
    • fsID: The Freesound ID of the recording from which this excerpt (slice) is taken
    • start: The start time of the slice in the original Freesound recording
    • end: The end time of slice in the original Freesound recording
    • salience: A (subjective) salience rating of the sound. 1 = foreground, 2 = background.
    • fold: The fold number (1-10) to which this file has been allocated.
    • classID: A numeric identifier of the sound class.
    • class: The class label name.

Project Structure

The project directory is organized as follows:

.
├── README.md
├── audio_data.dvc
├── dvc.lock
├── dvc.yaml
├── metrics.csv
├── params.yml
├── requirements.txt
├── audio_data
    ├── audio
        ├── fold1
          ├── .wav
          ├── .wav
        ├── fold2
        ...
        ├── fold10
    ├── metadata
      ├── UrbanSound8K.csv
└── src
    ├── __init__.py
    ├── const.py
    ├── data
    │   ├── __init__.py
    │   └── generator.py
    ├── model
    │   ├── __init__.py
    │   └── train.py
    └── notebook
        └── Urban_Audio_Classifier_.ipynb

Dependencies

Ensure you have the following dependencies installed:

  • Python 3.x
  • librosa 0.9.2
  • pandas 1.3.5
  • tensorflow 2.11.0
  • tqdm 4.64.1
  • dagshub 0.2.4
  • dvc 2.10.2
  • mlflow 1.26.1
  • Installation

Usage

  • Clone the repository
git clone https://dagshub.com/nirbarazida/urban-audio-classifier.git
cd urban-audio-classifier
  • Install the required packages using pip:
pip install -r requirements.txt
  • Training (The training process will be logged using DagsHub and MLflow)

    • Using DVC's Data Pipeline
    MLFLOW_TRACKING_URI=https://dagshub.com/{DAGSHUB_REPO_OWNER}/{DAGSHUB_REPO_NAME}.mlflow \
    MLFLOW_TRACKING_USERNAME={DAGSHUB_USER_NAME} \
    MLFLOW_TRACKING_PASSWORD={DAGSHUB_TOKEN} \
    dvc repro
    
    • Using the train script
    MLFLOW_TRACKING_URI=https://dagshub.com/{DAGSHUB_REPO_OWNER}/{DAGSHUB_REPO_NAME}.mlflow \
    MLFLOW_TRACKING_USERNAME={DAGSHUB_USER_NAME} \
    MLFLOW_TRACKING_PASSWORD={DAGSHUB_TOKEN} \
    python -m src.model.train
    
Tip!

Press p or to see the previous file or, n or to see the next file

About

A multi-class classifier for urban audio sounds

Collaborators 2

Comments

Akojede Olorundara

commented in commit80bc30793bon branch main

2 months ago

hello, i am giving this a try but i am stuck at getting my DAGSHUB_TOKEN, please point me in directions on how to have one

Loading...