Skip to content

itzdineshx/elephant_detection

 
 

Repository files navigation

🔊 Generic Audio Classifier

A powerful audio classification application using state-of-the-art deep learning models

🎯 What Can You Do?

This application allows you to classify audio files into various categories and subcategories using advanced machine learning models.

  • Upload your audio files for instant classification
  • Record audio directly through your microphone
  • Visualize classification results with detailed analytics
  • Contribute to the dataset by adding new labeled audio files
  • Explore the existing dataset structure and examples

🧠 Powered by Advanced Models

Model Description Accuracy
NASNet Mobile Neural Architecture Search Network optimized for mobile 95%
EfficientNet V2 B0 Optimized CNN with balanced performance 87%
DualNet CX Dual-pathway network for contextual features 99%
DualNet Xpert Expert system with dual feature extraction 98%

📊 Dataset Overview

Metric Count
Audio Files 23,303
Categories 4
Subcategories 23

📈 Classification Visualization

The application provides detailed visualizations of classification results, including confidence scores for each category.

Dataset Structure

GENERIC_AUDIO_CLASSIFIER
├── Animals
│   ├── CATS
│   ├── DOGS
│   ├── ELEPHANT
│   ├── HORSE
│   └── LIONS
├── Birds
│   ├── CROWS
│   ├── PARROT
│   ├── PEACOCK
│   └── SPARROW
├── Environment
│   ├── CROWD
│   ├── MILITARY
│   ├── OFFICE
│   ├── RAINFALL
│   ├── TRAFFIC
│   └── WIND
└── Vehicles
    ├── airplane
    ├── bicycle
    ├── bike
    ├── bus
    ├── car
    ├── helicopter
    ├── train
    └── truck

🔑 Key Features

Feature Description
🎙️ Audio Processing Process various audio formats with intelligent feature extraction
🔄 Real-time Classification Get instant predictions with high accuracy and precision
📊 Advanced Visualization See detailed analytics and confidence scores for each prediction
🔍 Dynamic Dataset Flexible system that grows and improves with new data

Dataset Sources

The dataset includes audio samples from various sources:

Model Training Notebooks


🛠️ Setup Instructions

1️⃣ Install Required Dependencies

Ensure you have Python 3.8 or later installed.

Run the following command to install all required Python libraries:

pip install -r requirements.txt

2️⃣ Install FFmpeg (Required for pydub and librosa)

Windows:

  1. Download FFmpeg from: https://ffmpeg.org/download.html
  2. Extract it to a directory (e.g., C:\ffmpeg).
  3. Add the bin folder to your system PATH:
    • Search for "Edit the system environment variables" in Windows.
    • Under System Properties > Advanced > Environment Variables, find Path and edit it.
    • Click New and add:
      C:\ffmpeg\bin
      
    • Click OK and restart your system.

Mac/Linux (Using Homebrew):

brew install ffmpeg

Ubuntu/Debian (Using APT):

sudo apt update && sudo apt install ffmpeg -y

⚠️ Streamlit Limitations

  • Streamlit does not support FFmpeg and sounddevice in the cloud environment.
  • To enable audio recording, run the app locally.
  • Use app_local_record.py instead of app.py for full recording features.

🔧 Running the App Locally

To start the app, run:

streamlit run app.py

If you want local audio recording support, run:

streamlit run app_local_record.py

📜 License

This project is open-source and available under the Apache License.

Acknowledgements

Special thanks to the content creators who made their recordings available. The Vehicle sounds dataset was sourced from Kaggle user Jan Boubia Abderrahim.

Source Videos

Animals

Cats

Dogs

Elephants

Horses

Lions

Birds

Crows

Parrots

Peacocks

Sparrows

Environment

Crowd

Military

Office

Rainfall

Traffic

Wind

Vehicles

All vehicle sounds were sourced from the "Vehicle Sounds Dataset" https://www.kaggle.com/datasets/janboubiabderrahim/vehicle-sounds-dataset by Jan Boubia Abderrahim on Kaggle.

About

An Ai-Powered Multi Layered Approach to make Prevent Human - Animal Confllicts with Natural and most Efficient Methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%