Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ DisasterVision-AI

AI-Powered Disaster Image Classification API

AI-powered REST API for real-time disaster image classification using Deep Learning and Machine Learning.


๐Ÿ“– Overview

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.


โœจ Features

  • ๐Ÿค– 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

๐Ÿง  Supported Classes

Class Description
๐Ÿ”ฅ Fire Fire disasters
๐ŸŒŠ Flooded Areas Flood detection
๐Ÿš— Traffic Incident Road accidents
๐Ÿš๏ธ Collapsed Building Structural damage
๐ŸŒณ Normal No disaster detected

๐Ÿ—๏ธ System Architecture

Client
   โ”‚
   โ–ผ
FastAPI REST API
   โ”‚
   โ–ผ
Preprocessing
   โ”‚
   โ–ผ
CNN Feature Extraction
   โ”‚
   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ–ผ             โ–ผ
Random Forest    SVM
        โ”‚
        โ–ผ
Prediction
        โ”‚
        โ–ผ
JSON Response

๐Ÿ›  Tech Stack

AI & Machine Learning

  • TensorFlow / Keras
  • Scikit-learn

Backend

  • FastAPI
  • Uvicorn

Language

  • Python

๐Ÿ“‚ Project Structure

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

๐Ÿš€ Installation

Clone the repository

git clone https://github.com/Ahmred0000/DisasterVision-AI.git

Move into the project

cd DisasterVision-AI

Install dependencies

pip install -r requirements.txt

โ–ถ Run the API

python -m uvicorn app:app --host 0.0.0.0 --port 8000

Open your browser

http://localhost:8000/docs

๐Ÿ“ก API Endpoint

POST /predict

Content-Type

multipart/form-data

Field

file

๐Ÿ“ฅ Example Request

curl -X POST "http://localhost:8000/predict" \
-F "file=@image.jpg"

๐Ÿ“ค Example Response

{
  "predicted_class": "fire",
  "probabilities": [
    0.97,
   ]
}

โšก Performance

Hardware Inference Time
CPU 100โ€“300 ms
GPU 10โ€“50 ms

๐Ÿ“ธ Screenshots

Prediction Example


API Documentation


Workflow


๐ŸŒ Live Demo

Hugging Face Space

https://ahmed-13-ai-model.hf.space/predict


๐Ÿ“š Dataset

AIDER Disaster Dataset

https://zenodo.org/records/3888300


๐Ÿ”ฎ Future Improvements

  • Docker Support
  • Authentication
  • Batch Prediction
  • ONNX Export
  • Kubernetes Deployment
  • Explainable AI (Grad-CAM)
  • Model Versioning
  • Performance Monitoring

๐Ÿค Contributing

Contributions are welcome!

Feel free to fork the project, improve it, and submit a Pull Request.


๐Ÿ“„ License

This project is licensed under the MIT License.


๐Ÿ‘จโ€๐Ÿ’ป Author

Ahmed Ashraf

GitHub

https://github.com/Ahmred0000


โญ If you found this project useful, consider giving it a Star!

About

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. and easy to integrate into emergency response systems, monitoring dashboards, smart city platforms, and other AI-powered App

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages