Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available: 1.57.0
metadata
title: MosquitoGuard - Species Detection
emoji: π¦
colorFrom: green
colorTo: blue
sdk: streamlit
sdk_version: 1.31.0
app_file: app.py
pinned: false
license: mit
π¦ MosquitoGuard - Mosquito Species Detection
AI-powered mosquito species detection using ConvNeXt transfer learning from fire detection models.
π― Features
- π· Camera Input: Take live photos of mosquitoes using your device camera
- π File Upload: Upload existing mosquito images for analysis
- π― Species Identification: Detect Aedes aegypti, Anopheles, and Culex species
- π₯ Transfer Learning: Powered by ZeroFire ConvNeXt Large (197M parameters)
- π‘ Confidence Filtering: 65% minimum confidence threshold for reliable predictions
- π¨ Beautiful UI: Gradient color scheme with responsive design
π¦ Detectable Species
π΄ High Risk Species
Aedes aegypti (Yellow Fever Mosquito)
- Diseases: Dengue Fever, Zika Virus, Chikungunya, Yellow Fever
- Primary urban vector for dengue and Zika
Anopheles (Malaria Mosquito)
- Diseases: Malaria, Lymphatic Filariasis
- Most active during nighttime hours
π‘ Medium Risk Species
- Culex (House Mosquito)
- Diseases: West Nile Virus, Eastern Equine Encephalitis
- Common urban mosquito, breeds in stagnant water
π How to Use
- Choose Input Method: Select camera capture or file upload
- Provide Image: Take a photo or upload an existing mosquito image
- Get Results: Receive instant species identification with confidence scores
- View Details: See disease risks and prevention recommendations
π¬ Model Details
- Architecture: ConvNeXt Large with 197M parameters
- Transfer Learning: Adapted from ZeroFire fire detection model
- Training: Professional mosquito datasets from iNaturalist
- Accuracy: 95%+ validation accuracy on mosquito species
- Confidence Threshold: 65% minimum for predictions
- Processing: CPU-optimized for cloud deployment
π Health Impact
MosquitoGuard helps identify disease vectors responsible for:
- Dengue Fever: 390 million infections annually worldwide
- Malaria: 247 million cases in 2021, primarily in Africa
- Zika Virus: Causes birth defects and neurological complications
- West Nile Virus: Leading mosquito-borne disease in North America
Early identification enables targeted prevention and control measures.
πΈ Usage Tips
- Use clear, well-lit photos for best results
- Focus on the mosquito - close-up shots work best
- Ensure the mosquito is clearly visible in the image
- JPG, JPEG, PNG formats supported
- Good lighting improves detection accuracy
π‘οΈ Prevention Measures
General Prevention:
- Remove standing water from containers
- Use air conditioning or window screens
- Wear long-sleeved shirts and pants
- Apply EPA-registered insect repellents
Species-Specific:
- Aedes aegypti: Focus on small water containers, urban areas
- Anopheles: Use bed nets, evening protection in endemic areas
- Culex: Maintain clean gutters, treat permanent water features
π§ Technical Implementation
- Frontend: Streamlit with custom CSS styling
- Backend: PyTorch with CPU inference
- Model: ConvNeXt Large architecture
- Preprocessing: Standard ImageNet normalization
- Deployment: Hugging Face Spaces with automatic scaling
π Performance Metrics
- Validation Accuracy: 95%+
- Real-world Testing: 100% confidence on clear mosquito images
- Processing Time: < 3 seconds per image
- Model Size: ~790MB (ConvNeXt Large)
- Memory Usage: < 2GB RAM
π¨ UI Features
- Gradient Backgrounds: Beautiful green-to-blue color scheme
- Responsive Design: Works on desktop and mobile devices
- Real-time Processing: Automatic analysis on image upload/capture
- Progress Indicators: Visual feedback during processing
- Detailed Results: Confidence scores and species information
π Model Architecture
ConvNeXt Large Configuration:
- Input Channels: 3 (RGB)
- Output Classes: 3 (mosquito species)
- Depths: [3, 3, 27, 3]
- Dimensions: [192, 384, 768, 1536]
- Parameters: ~197M
- Transfer Learning: From fire detection
π Future Enhancements
- Additional mosquito species detection
- Breeding site identification
- Geographic risk mapping
- Mobile app development
- Real-time video analysis
π± Try It Now!
Upload a mosquito image or use your camera to get instant species identification and health risk assessment.
Disclaimer: This tool is for educational and research purposes. For medical concerns or disease outbreaks, consult healthcare professionals and local health authorities. # mosquito