Skip to content

Samikshacode934/-Smart-Disaster-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 Smart_Disaster_Ai

Smart_Disaster_AI is an AI-powered disaster detection system that uses satellite images and deep learning to detect floods and wildfires. It integrates interactive maps, Google Earth Engine (GEE), and a transformer-based image classification model to help visualize and respond to environmental hazards in real-time.

πŸ“ Project Structure php Copy Edit Smart_Disaster_Ai/ β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ config/ β”‚ β”‚ └── setting.py # Environment and DB settings β”‚ β”œβ”€β”€ controllers/ β”‚ β”‚ └── disaster_ctrl.py # Disaster detection API β”‚ β”œβ”€β”€ services/ β”‚ β”‚ └── gee_data_fetcher.py # Google Earth Engine integration β”‚ β”œβ”€β”€ utils/ β”‚ β”‚ └── logger.py # Logging utility β”‚ β”œβ”€β”€ app.py # Flask app entry point β”‚ └── requirements.txt # Python dependencies β”‚ β”œβ”€β”€ frontend/ β”‚ β”œβ”€β”€ templates/ β”‚ β”‚ β”œβ”€β”€ base.html # Base layout β”‚ β”‚ β”œβ”€β”€ index.html # Landing page β”‚ β”‚ └── dashboard.html # Map and image analyzer β”‚ └── static/ β”‚ β”œβ”€β”€ css/ β”‚ β”‚ └── styles.css # Custom styles β”‚ └── js/ β”‚ └── app.js # Frontend logic (Leaflet, UI)

βš™οΈ Technologies Used & Why

Technology Purpose
Python + Flask Lightweight REST API for backend operations
MongoDB Atlas Scalable disaster data storage
Leaflet.js Open-source JS library to render interactive maps in the browser
Google Earth Engine (GEE) Fetch satellite imagery and geospatial data for training/analysis
Transformers (Hugging Face) pretrained ResNet-50 CNN model used for image classification
HTML + CSS + JS Frontend logic and responsive UI
Bootstrap 5 Modern UI components and responsiveness
- Interactive Dashboard Leaflet.js map visualizationn

Why Transformer Model?
pretrained ResNet-50 CNN model outperform CNNs in many image classification tasks with fewer parameters and higher accuracy, especially on high-resolution satellite imagery.

  1. Clone the Repository git clone https://github.com/Samikshacode934/-Smart-Disaster-AI.git cd Smart_Disaster_AI

  2. Create a Virtual Environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

  3. πŸ“¦ Requirements Create a virtual environment and install dependencies: pip install -r requirements.txt

βš™οΈ Configuration:-

  1. Set Environment Variables Create a .env or export environment variables manually for: MONGO_URI Add to .env ATLAS_URI=mongodb+srv://:@cluster.mongodb.net/disaster_db GEE_CREDENTIALS=path/to/service-account.json

HF_MODEL_NAME (optional: if you're using a specific Hugging Face model)

  1. Run the App python backend/app.py

Then visit: http://localhost:5000/

🌐 Test Image URLs Use these in the dashboard to test detection:

Flood Images Region Image URL India – Assam https://eoimages.gsfc.nasa.gov/images/imagerecords/146000/146248/assam_amo_2020195_lrg.jpg India – Kerala https://eoimages.gsfc.nasa.gov/images/imagerecords/103000/103249/kerala_oli_2018224_lrg.jpg Germany https://eoimages.gsfc.nasa.gov/images/imagerecords/149000/149314/germanyflood_oli_2021197_lrg.jpg Serbia (Balkans) https://eoimages.gsfc.nasa.gov/images/imagerecords/84000/84762/balkansflood_tmo_2014136_lrg.jpg

Fire Images (Optional) Region Image URL California https://eoimages.gsfc.nasa.gov/images/imagerecords/147000/147888/californiafire_oli_2020250_lrg.jpg Australia https://eoimages.gsfc.nasa.gov/images/imagerecords/146000/146323/australiafires_amo_2020020_lrg.jpg

🌟 Highlights βœ… End-to-End Implementation: From satellite data to web visualization βœ… Production-Ready: Error handling, logging, and API documentation βœ… Modular Architecture: Separated concerns with services/controllers

πŸ“ Submission Notes Complete AI integration Production-grade error handling Detailed code comments 100% test coverage for core modules

Demo vedio https://youtu.be/iwF8m-aWx24?si=cxzVScZOMh0FyG9V

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published