Skip to content

Audio-Based Drone Fault Classification – Multi-Task Convolutional Neural Network

Notifications You must be signed in to change notification settings

AggarwalShourya/Multi-task-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Sound-Based Drone Fault Classification – Multi-Task Convolutional Neural Network

📌 Overview

This project addresses the classification of drone faults using sound recordings from multiple microphones.
Instead of building three separate models for:

  1. ⚙ Fault type
  2. 🧭 Maneuvering direction
  3. 🚁 Drone model type

We implement a single Multi-Task Learning (MTL) Convolutional Neural Network (CNN) that learns all three tasks simultaneously.


🚀 Why Multi-Task Learning?

Traditional ML pipelines train one model per task:

  • 🛠 A model for fault classification
  • 🛠 A model for direction classification
  • 🛠 A model for drone model classification

❌ Drawbacks

  • Redundant feature extraction
  • Higher compute cost
  • No benefit from shared knowledge between tasks

✅ Our Solution

  • 📡 Shared CNN feature extractor
  • 🎯 Three task-specific heads
  • 🔄 Knowledge transfer across tasks for better generalization

📂 Dataset

  • 🎤 .wav audio files from mic1 and mic2
  • 🚁 Drone models: A, B, C
  • 📚 Train, validation, and test sets

🎵 Feature Extraction

  • MFCCs (n_mfcc=48) extracted with librosa
  • Mean pooling across time frames
  • Output: 48-dim vector per audio file

🏷 Label Preparation

  • Extracted:
    • Drone model
    • Maneuvering direction
    • Fault type
  • Encoded with LabelEncoder

📑 Dataset Assembly

  • Combined mic1 & mic2 data
  • Stored features + labels in DataFrames

🧠 Model Architecture

🏗 Shared Feature Extractor

  1. Conv1D (1→64) → BatchNorm → ReLU → MaxPool
  2. Conv1D (64→128) → BatchNorm → ReLU → MaxPool
  3. Conv1D (128→256) → BatchNorm → ReLU → MaxPool
  4. Conv1D (256→128) → BatchNorm → ReLU

🎯 Task-Specific Heads

  • Fault Classification (9 classes)
    Linear → Dropout(0.4) → Linear
  • Direction Classification (6 classes)
    Linear → Dropout(0.4) → Linear
  • Model Classification (3 classes)
    Linear

⚙ Training Setup

  • Loss: CrossEntropyLoss per task
  • Optimizer: Adam (lr=0.001)
  • Batch Size: 32
  • Epochs: 40
  • Device: GPU if available

Total Loss: = loss_fault + loss_direction + loss_model

About

Audio-Based Drone Fault Classification – Multi-Task Convolutional Neural Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published