An intelligent system that detects accidents in images using AI and triggers emergency responses. Designed for smart cities, traffic monitoring, and rapid emergency coordination.
- AI Accident Detection
Powered by Google's Gemini API
- Emergency Coordination
Finds nearest hospitals via Google Places API
- Instant Alerts
SMS notifications via Twilio
- Privacy-First
Auto-deletes images after processing
Component | Technology |
---|---|
AI Engine | Google Gemini API |
Hospital Lookup | Google Places API |
SMS Service | Twilio |
Web Interface | Streamlit |
Core Language | Python 3.8+ |
Configuration | TOML + .env |
Dependencies:
streamlit==1.31.1
Pillow==10.2.0
python-dotenv==1.0.0
twilio==8.3.0
langchain==0.1.11
langchain-google-genai==0.0.11
pydantic==2.6.1
Prerequisites
- Python 3.8+
- API Keys:
- Google Gemini API
- Google Places API
- Twilio Account
# Create virtual environment
python -m venv venv
# Activate environment
# Linux/macOS:
source venv/bin/activate
# Windows:
.\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
streamlit run app.py
accident_detection_app/
├── config/
│ ├── __init__.py
│ └── config_manager.py
├── services/
│ ├── accident_detector.py
│ ├── hospital_service.py
│ └── sms_service.py
├── .env
├── config.toml
├── app.py
└── requirements.txt