Inspiration
The rapid proliferation of commercial Unmanned Aerial Vehicles (UAVs) poses a significant and evolving threat to national security, critical infrastructure, and personal privacy. Traditional detection methods like radar often fail to detect small, low-flying plastic drones, while optical cameras are easily defeated by fog, darkness, or tree cover. We were inspired to build a solution that relies on the one signature a drone cannot hide: its acoustic footprint. Our goal was to build an edge-deployable, real-time acoustic sentry capable of identifying drone rotor harmonics in zero-visibility conditions.
What it does
Acoustic Drone Sentry is a real-time edge AI system that continuously monitors physical audio streams (via live microphone) to detect unauthorized drones.
When a drone enters the acoustic perimeter, the Command Center UI instantly flags the threat. To prove our methodology, we deployed a Comparative Analysis within the application:
- Baseline Models: Users can select XGBoost or a Custom CNN to see how tabular features and shallow networks struggle with out-of-distribution real-world noise.
- SOTA Model: Users can activate our flagship MobileNetV2 architecture, which leverages deep transfer learning on Log-Mel Spectrograms to achieve a flawless 99.19% Recall and 0.9977 ROC AUC with sub-10ms latency.
How we built it
- Data Engineering: We curated a custom dataset combining high-quality UAV recordings with the open-source ESC-50 dataset. Audio was downsampled to 22.05kHz (the ideal Nyquist frequency for drone acoustics) to optimize for edge computing.
- Dual-Stream Feature Extraction: We built a pipeline to extract 40-band Mel-Frequency Cepstral Coefficients (MFCCs) for our tabular baseline models, and high-resolution Log-Mel Spectrograms for our deep learning models.
- Model Training: We built and trained three distinct models (XGBoost, Custom CNN, and MobileNetV2) to scientifically benchmark tabular vs. deep transfer learning approaches.
- MLOps & Deployment: We built a real-time Streamlit UI. To keep the GitHub repository lightweight and adhere to MLOps best practices, we separated our model registry. The heavy
.kerasmodel weights are hosted on a Hugging Face CDN, which the Streamlit app dynamically fetches into memory at runtime usingurllib.
Challenges we ran into
Our biggest challenge was "The Silence Problem" and hardware noise cancellation. During live testing, our initial models hallucinated drone signatures in completely silent rooms. We discovered that the librosa.power_to_db scaling function was massively amplifying microscopic microphone static, turning absolute silence into loud "drone" noise on the spectrograms.
We solved this through rigorous data augmentation. We programmatically synthesized exactly 2,000 clips of pure digital silence and hardware static and injected them directly into the negative class of our training dataset. We also implemented mathematically bounded reference scaling in our stream processor to dynamically filter out static floors.
Accomplishments that we're proud of
We are incredibly proud of our 99.19% Recall rate. In defense and security contexts, a false negative is catastrophic; missing a drone is not an option. Pushing our recall metric that high while maintaining a sub-10ms inference latency proves that this system is viable for real-world deployment on low-power edge devices like a Raspberry Pi.
What we learned
We learned a massive amount about the physical limitations of audio processing. We discovered firsthand how smartphone noise-cancellation hardware aggressively deletes continuous low-frequency hums (like drones), and how crucial it is to use raw measurement microphones for acoustic AI. We also solidified our understanding of Generalization Error, proving in real-time why deep transfer learning (MobileNet) vastly outperforms shallow networks (Custom CNN) on out-of-distribution audio.
What's next for Acoustic Drone Sentry
Our immediate next step is spatial intelligence. By upgrading our single-microphone setup to a directional microphone array, we plan to use time-difference-of-arrival (TDOA) algorithms to not only detect the drone's presence but mathematically triangulate its exact GPS coordinates and altitude in the sky.
Built With
- huggingface
- keras
- librosa
- numpy
- pandas
- python
- scikit-learn
- streamlit
- xgboost