AI-powered humanitarian dashboard for rapid structural damage assessment in disaster zones. Built with Flask, TensorFlow (MobileNetV2), and SQLAlchemy to support field-based disaster response.
DamageSense AI allows humanitarian field offices to upload images of structures and instantly receive:
- ✅ AI Classification — identifies what the image contains using MobileNetV2
- ✅ Severity Rating — automatically flags as
CRITICALorSTABLE - ✅ Heuristic Override — catches dangerous misclassifications (e.g. "Seashore" bug fix)
- ✅ Assessment History — all results saved to a local SQLite database
- ✅ REST API — JSON endpoints for integration with other systems
| Layer | Technology |
|---|---|
| Backend | Python, Flask 3.0 |
| AI / ML | TensorFlow 2.15, MobileNetV2, Keras |
| Database | SQLAlchemy, SQLite |
| Frontend | Bootstrap 5, HTML5 |
| Testing | Pytest |
| Deployment | Gunicorn, Render.com |
DamageSense-AI/
├── app/
│ ├── __init__.py # App factory & database setup
│ ├── routes.py # All Flask routes & API endpoints
│ ├── models.py # SQLAlchemy database models
│ ├── ai_engine.py # TensorFlow model & classification logic
│ └── static/
│ ├── css/ # Stylesheets
│ └── uploads/ # Uploaded images
├── templates/
│ └── upload.html # Main dashboard UI
├── tests/
│ └── test_app.py # Pytest test suite
├── .env.example # Environment variable template
├── requirements.txt # Python dependencies
├── run.py # Application entry point
└── README.md
git clone https://github.com/WIZZ249/DamageSense-AI.git
cd DamageSense-AIpython -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linuxpip install -r requirements.txtcp .env.example .envpython run.pyVisit http://localhost:5000 in your browser.
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Main dashboard UI |
POST |
/assess |
Upload image for AI assessment |
GET |
/history |
Retrieve last 50 assessments |
GET |
/health |
Health check for deployment |
curl -X POST http://localhost:5000/assess \
-F "image=@/path/to/image.jpg"{
"id": 1,
"filename": "building.jpg",
"label": "rubble",
"confidence": 94.32,
"severity": "CRITICAL",
"timestamp": "2026-03-12 22:00:00"
}pytest tests/| Bug | Fix |
|---|---|
| MobileNetV2 classifying damaged buildings as "Seashore" | Implemented keyword-based heuristic override layer |
| Session persistence between requests | Implemented SQLAlchemy scoped_session pattern |
This app is configured for deployment on Render.com:
- Push your code to GitHub
- Go to render.com → New Web Service
- Connect your
DamageSense-AIrepo - Set start command:
gunicorn run:app - Click Deploy
Ahmed Salaheldeen Alamin Sulieman IT Engineer | AWS Certified Cloud Practitioner | Developer
This project is licensed under the MIT License.
Built with purpose — for the people who need it most.