Downloads · 30 days
15
8% of all-time downloads
Akashpaul123/tiny-ast-mad-military-audio-classifier
tiny-ast-mad-military-audio-classifier is a audio classification model from Akashpaul123. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
🎖️ State-of-the-art military audio classification model achieving 96.73% accuracy on the Military Audio Dataset (MAD).
Downloads · 30 days
15
8% of all-time downloads
All-time downloads
198
Public
Parameters
86.2M
345 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors345 MB · 100%
From the Hugging Face model README
🎖️ State-of-the-art military audio classification model achieving 96.73% accuracy on the Military Audio Dataset (MAD).
This model is deployed and accessible via Azure cloud:
⚠️ The demo uses a self-signed SSL certificate. Your browser may show a security warning — click "Advanced" → "Proceed" to access.
This model is a fine-tuned version of MIT/ast-finetuned-audioset-10-10-0.4593 on the Military Audio Dataset (MAD). It's designed for edge deployment on devices like Raspberry Pi 5 for military surveillance applications.
The model classifies 7 military audio categories:
| Class ID | Class Name | Training Samples | Test Samples |
|---|---|---|---|
| 0 | Communication | 774 | 207 |
| 1 | Footsteps | 1,293 | 280 |
| 2 | Gunshot | 773 | 104 |
| 3 | Shelling | 883 | 104 |
| 4 | Vehicle | 910 | 122 |
| 5 | Helicopter | 934 | 91 |
| 6 | Fighter | 862 | 129 |
from transformers import ASTForAudioClassification, ASTFeatureExtractor
import librosa
import torch
# Load model and feature extractor
model = ASTForAudioClassification.from_pretrained("Akashpaul123/tiny-ast-mad-military-audio-classifier")
feature_extractor = ASTFeatureExtractor.from_pretrained("Akashpaul123/tiny-ast-mad-military-audio-classifier")
# Load audio file (16kHz recommended)
audio, sr = librosa.load("military_audio.wav", sr=16000)
# Extract features
inputs = feature_extractor(audio, sampling_rate=16000, return_tensors="pt")
# Predict
with torch.no_grad():
outputs = model(**inputs)
predicted_class = torch.argmax(outputs.logits, dim=-1).item()
# Class mapping
classes = ['Communication', 'Footsteps', 'Gunshot', 'Shelling', 'Vehicle', 'Helicopter', 'Fighter']
print(f"Predicted class: {classes[predicted_class]}")
import onnxruntime as ort
# Load ONNX model for edge inference
session = ort.InferenceSession("tiny_ast_mad_optimized.onnx")
# ... inference code
If you use this model in your research, please cite:
@misc{tiny-ast-mad-2024,
title={Tiny-AST Military Audio Classifier: Progressive Fine-tuning for Edge Deployment},
author={Paul, Akash},
year={2024},
howpublished={Hugging Face Model Hub},
url={https://huggingface.co/Akashpaul123/tiny-ast-mad-military-audio-classifier}
}
This model is licensed under the Apache 2.0 License.
Model trained as part of military audio surveillance research with focus on edge deployment and real-world robustness.