Inspiration Mosquito-borne diseases like malaria, dengue, and Zika claim over 700,000 lives annually, disproportionately affecting vulnerable communities. Inspired by the potential of AI to transform public health, we envisioned Mosquito Sentinel as a tool to detect mosquito species in real-time using their unique wingbeat sounds. Our goal was to create an accessible, non-invasive solution that empowers individuals and communities to prevent outbreaks, aligning with UN Sustainable Development Goal 3 (Good Health and Well-Being). The idea stemmed from combining bioacoustics with deep learning to address a global challenge with local impact. What It Does Mosquito Sentinel is an AI-powered web app that identifies 38 mosquito species in real-time by analyzing wingbeat sounds recorded via any microphone-enabled device. Upon detection, it displays the species, confidence score, danger level (High/Medium/Low), associated diseases (e.g., malaria, dengue), and tailored control measures (e.g., repellents, larvicides). Built on a lightweight CNN, it’s noise-robust and user-friendly, enabling communities to map high-risk areas and take preventive actions to reduce mosquito-borne disease transmission. How We Built It We leveraged the HumBugDB dataset (mosquito wingbeat audio) and ESC-50 (environmental noise) to train a custom CNN (TinyCNN) with ~500k parameters, optimized for CPU inference. The Jupyter notebook handles data preprocessing, mixing mosquito and noise audio, generating Mel spectrograms, and training with SpecAugment and class-balanced sampling. The Streamlit app (app.py) uses Torchaudio for real-time audio processing, displaying results with a responsive UI. The model, exported as TorchScript, ensures fast inference (<100ms). We prioritized accessibility, ensuring deployment on low-resource devices. Challenges We Ran Into

Data Imbalance: Rare mosquito species in the dataset risked model bias. We addressed this with weighted random sampling and capped noise samples at 25%. Noisy Environments: Real-world audio often includes background noise. We mixed mosquito and noise data during training, using augmentations like SpecAugment to enhance robustness. Real-Time Constraints: Achieving low-latency inference on CPU was challenging. We optimized the CNN architecture and used TorchScript for efficient deployment. UI Responsiveness: Streamlit’s reruns caused flickering. We implemented session state management to update displays only on new detections.

Accomplishments That We're Proud Of

High Accuracy: Achieved 85-95% validation accuracy across 39 classes, robust to environmental noise. Real-Time Deployment: Built a seamless Streamlit app for real-time detection, usable on any device with a microphone. Educational Impact: Integrated detailed species info (danger, diseases, solutions), empowering users to act. Scalability: Designed a foundation for crowdsourced risk mapping, with potential to save lives globally. End-to-End Innovation: Delivered a complete pipeline—data curation, model training, and user-friendly deployment—in a hackathon timeframe.

What We Learned

Bioacoustics and AI: Mosquito wingbeat frequencies (200-600 Hz) are distinct and learnable, but require careful preprocessing (Mel spectrograms) for CNNs. Robustness Techniques: Augmentations (SpecAugment, Gaussian noise) and class weighting are critical for real-world audio challenges. Deployment Trade-offs: Balancing model complexity with CPU inference speed taught us to optimize architecture and export formats (TorchScript, ONNX). User-Centric Design: Feedback-driven UI improvements (e.g., animated detection text) enhance engagement and usability. Public Health Impact: Aligning tech with global health needs amplifies project relevance and motivates interdisciplinary collaboration.

What's Next for Mosquito Sentinel

Crowdsourced Risk Mapping: Integrate geolocation to collect user detections, creating real-time maps of high-risk areas. Outbreak Prediction: Use ML to forecast outbreaks based on species prevalence, weather, and historical data. Mobile Apps: Deploy on iOS/Android for broader access, especially in rural areas. Enhanced Features: Add visual mosquito ID, multi-language support, and federated learning for privacy-preserving updates. Public Health Partnerships: Collaborate with NGOs and governments for targeted interventions, like larvicide campaigns, aiming to reduce disease transmission by 20-30% in high-risk regions.

Built With

  • css
  • esc-50-dataset-model-export:-torchscript
  • languages:-python-(3.8+)-frameworks/libraries:-pytorch-(2.0.1)
  • librosa-(0.10.1)
  • local-cpu-data-sources:-humbugdb-dataset-(zenodo)
  • numpy-(1.24.3)
  • onnx-other-tools:-git
  • pandas-(2.0.3)
  • scikit-learn-(1.3.0)
  • sounddevice-(0.4.6)
  • soundfile-(0.12.1)
  • streamlit-(1.29.0)
  • torchaudio-(2.0.2)
  • tqdm-(4.66.1)-platforms:-jupyter-notebook
  • zenodo
Share this project:

Updates

Submission history