Natural disasters such as cyclones, earthquakes, floods, and wildfires cause significant damage to life and property. This project leverages Deep Learning techniques, specifically Convolutional Neural Networks (CNNs), to classify disaster images into four categories: Cyclone, Earthquake, Flood, and Wildfire.
The project implements two models:
- A Custom CNN model built from scratch.
 - A VGG16-based Transfer Learning model.
 
Both models are trained on a dataset of 4,500 disaster images to demonstrate the effectiveness of deep learning in disaster identification and response.
- Custom CNN Model: Lightweight architecture for efficient classification.
 - VGG16 Transfer Learning: Pre-trained on ImageNet for superior feature extraction.
 - Data Augmentation: Enhances generalization by applying transformations like rotation, zooming, shearing, and flipping.
 - Evaluation Metrics: Accuracy, loss curves, confusion matrices, and classification reports.
 - Real-world Deployment: Final trained model saved as 
vgg16_disaster_model.h5. 
The dataset consists of 4,500 images categorized into four disaster types:
- Cyclone
 - Earthquake
 - Flood
 - Wildfire
 
- Images resized to:
128x128pixels for the Custom CNN model.224x224pixels for the VGG16 model.
 - Data augmentation applied to improve robustness.
 
The custom CNN model includes:
- Three convolutional layers with ReLU activation and increasing filter sizes (32, 64, 128).
 - MaxPooling layers (
2x2) for dimensionality reduction. - Fully connected dense layers with dropout (0.5) to prevent overfitting.
 - Final softmax layer for classification into four categories.
 
The VGG16 model is pre-trained on ImageNet and fine-tuned for disaster classification:
- Fully connected layers removed (
include_top=False). - Convolutional layers frozen to retain pre-trained features.
 - Added dense layers with ReLU activation and dropout (0.5).
 - Final softmax layer for classification.
 
Ensure you have Python 3.x installed along with the following libraries:
- TensorFlow
 - Keras
 - NumPy
 - Matplotlib
 - scikit-learn
 
- 
Clone this repository:
git clone https://github.com/Shivapython/disaster-classification.git cd disaster-classification - 
Install dependencies:
pip install -r requirements.txt
 - 
Download the dataset and place it in the
data/folder. - 
Run the training script:
python train.py
 - 
Evaluate the models:
python evaluate.py
 
To train the models, execute the following command:
python train.py --model [custom|vgg16]To evaluate a trained model on the validation set:
python evaluate.py --model [custom|vgg16]To use a trained model for prediction on new images:
python predict.py --image  --model [custom|vgg16]| Metric | Value | 
|---|---|
| Precision | 0.81 | 
| Recall | 0.80 | 
| F1-score | 0.80 | 
| Accuracy | 81% | 
| Metric | Value | 
|---|---|
| Precision | 0.89 | 
| Recall | 0.88 | 
| F1-score | 0.88 | 
| Accuracy | 88% | 
Both models demonstrated high accuracy in classifying disaster images, with VGG16 outperforming the custom CNN due to its superior feature extraction capabilities.
disaster-classification/
├── dataset/                     # Dataset folder (not included in repo)
├── models/                   # Saved trained models (.h5 files)
├── custom_cnn.py         # Custom CNN model implementation
├── vgg16_model.py        # VGG16 transfer learning implementation
├── requirements.txt          # Python dependencies
├── README.md                 # Project documentation (this file)
- Expand disaster categories to include tsunamis, landslides, volcanic eruptions, etc.
 - Implement real-time video-based disaster detection from surveillance footage.
 - Explore Vision Transformers (ViTs) for improved feature extraction.
 - Optimize models for deployment on edge devices or mobile platforms.
 - Integrate geospatial data and weather forecasting with image classification.
 
- Shivashlok HN
- Email: [email protected]
 - VITAP University