AI-powered REST API for real-time disaster image classification using Deep Learning and Machine Learning.
DisasterVision-AI is a production-ready Computer Vision REST API that classifies disaster-related images in real time using a hybrid AI pipeline.
The system combines Deep Learning and Machine Learning models to analyze uploaded images and predict one of several disaster categories with high speed and reliability.
Designed with FastAPI, the project is lightweight, stateless, and easy to integrate into emergency response systems, monitoring dashboards, smart city platforms, and other AI-powered applications.
- ๐ค AI-powered image classification
- โก Fast inference with FastAPI
- ๐ง CNN + Machine Learning models
- ๐ท Single image prediction
- ๐ Probability scores for every class
- ๐ Automatic model loading
- ๐ Production-ready REST API
- ๐ฆ Stateless architecture
- ๐ Easy backend integration
- ๐ Interactive Swagger documentation
| Class | Description |
|---|---|
| ๐ฅ Fire | Fire disasters |
| ๐ Flooded Areas | Flood detection |
| ๐ Traffic Incident | Road accidents |
| ๐๏ธ Collapsed Building | Structural damage |
| ๐ณ Normal | No disaster detected |
Client
โ
โผ
FastAPI REST API
โ
โผ
Preprocessing
โ
โผ
CNN Feature Extraction
โ
โโโโโโโโโโโโโโโ
โผ โผ
Random Forest SVM
โ
โผ
Prediction
โ
โผ
JSON Response
- TensorFlow / Keras
- Scikit-learn
- FastAPI
- Uvicorn
- Python
DisasterVision-AI/
โ
โโโ assets/
โ โโโ banner.png
โ โโโ logo.png
โ โโโ predict.png
โ โโโ workflow.png
โ โโโ swagger.png
โ
โโโ models/
โ โโโ disaster_model.keras
โ โโโ svm_model.pkl
โ โโโ rf_model.pkl
โ โโโ scaler.pkl
โ โโโ label_encoder.pkl
โ
โโโ app.py
โโโ model_wrapper.py
โโโ requirements.txt
โโโ README.md
Clone the repository
git clone https://github.com/Ahmred0000/DisasterVision-AI.gitMove into the project
cd DisasterVision-AIInstall dependencies
pip install -r requirements.txtpython -m uvicorn app:app --host 0.0.0.0 --port 8000Open your browser
http://localhost:8000/docs
Content-Type
multipart/form-data
Field
file
curl -X POST "http://localhost:8000/predict" \
-F "file=@image.jpg"{
"predicted_class": "fire",
"probabilities": [
0.97,
]
}| Hardware | Inference Time |
|---|---|
| CPU | 100โ300 ms |
| GPU | 10โ50 ms |
Hugging Face Space
https://ahmed-13-ai-model.hf.space/predict
AIDER Disaster Dataset
https://zenodo.org/records/3888300
- Docker Support
- Authentication
- Batch Prediction
- ONNX Export
- Kubernetes Deployment
- Explainable AI (Grad-CAM)
- Model Versioning
- Performance Monitoring
Contributions are welcome!
Feel free to fork the project, improve it, and submit a Pull Request.
This project is licensed under the MIT License.
Ahmed Ashraf
GitHub



