Accurate flood extent mapping is critical for disaster response, damage assessment, and environmental monitoring. Traditional flood detection techniques often struggle with complex terrain, vegetation, shadows, and varying illumination conditions. This project proposes a hybrid UNet–ResNet50 deep learning architecture for semantic segmentation of flood-affected regions using synthetic flood imagery.
The model integrates a pre-trained ResNet50 encoder with a UNet decoder to leverage both deep feature extraction and precise spatial reconstruction. Experimental results demonstrate strong segmentation performance, achieving a Test IoU of 0.8643, Dice Score of 0.86, and Pixel Accuracy of 0.86, outperforming several baseline segmentation models.
Floods are among the most devastating natural disasters worldwide, causing significant damage to infrastructure, agriculture, ecosystems, and human life. Rapid identification of inundated areas is essential for effective emergency response and recovery planning.
This project develops an automated flood extent mapping system using deep learning-based semantic segmentation. By combining the strengths of UNet and ResNet50, the proposed model accurately identifies flooded regions from aerial and satellite-like imagery.
The proposed architecture consists of:
- ResNet50 (Pre-trained on ImageNet)
- Deep feature extraction
- Residual learning
- Transfer learning capabilities
- UNet Decoder
- Progressive upsampling
- Skip connections
- Spatial information recovery
- Improved feature representation
- Better flood boundary detection
- Enhanced segmentation accuracy
- Strong generalization capability
Figure 1. Proposed UNet–ResNet50 Architecture
The model was trained using the Synthetic Flood Imagery for Image Segmentation dataset available on Kaggle.
Dataset Link: https://www.kaggle.com/datasets/samiwood/synthetic-flood-imagery-for-image-segmentation
| Feature | Value |
|---|---|
| Total Images | 3,050 |
| Image Type | RGB |
| Resolution | 512 × 512 |
| Mask Type | Binary Segmentation |
| Flood Class | 1 |
| Non-Flood Class | 0 |
| Dataset | Percentage |
|---|---|
| Training | 70% |
| Validation | 15% |
| Testing | 15% |
Examples from the Synthetic Flood Imagery for Image Segmentation dataset used for training and evaluation.
The following preprocessing techniques were applied before model training:
- Image resizing to 512 × 512
- Pixel normalization
- Data augmentation
- Mask preprocessing
- Dataset balancing
- Horizontal Flip
- Vertical Flip
- Random Rotation
- Brightness Adjustment
- Contrast Adjustment
- Gaussian Noise Injection
- Random Crop
- Zoom Transformation
These augmentations improve model robustness and reduce overfitting.
| Parameter | Value |
|---|---|
| Batch Size | 8 |
| Epochs | 30 |
| Learning Rate | 1e-4 |
| Loss Function | Binary Cross Entropy |
| Optimizer | Adam |
| Input Size | 512 × 512 × 3 |
- Python
- TensorFlow
- Keras
- NumPy
- OpenCV
- Matplotlib
- Scikit-Learn
- Jupyter Notebook
- Google Colab
- NVIDIA Tesla T4 GPU
- Intel Xeon CPU
- 12–26 GB RAM
How to Run Clone the Repository git clone https://github.com/Savanth114/Flood-Mapping-Using-UNet-ResNet50.git cd Flood-Mapping-Using-UNet-ResNet50 Install Dependencies pip install tensorflow keras numpy opencv-python matplotlib scikit-learn Download Dataset
Download the dataset from Kaggle and update the dataset paths inside the notebook.
Run Notebook
Open:
Unet_Resnet50.ipynb
Run all cells sequentially to:
Load the dataset Preprocess images Train the model Evaluate performance Generate segmentation predictions
The model demonstrated stable convergence and strong validation performance throughout the training process.
The training results indicate stable convergence and strong validation performance throughout the training process.
The model was evaluated using the following metrics:
Measures the overlap between predicted and ground truth flood masks.
Evaluates segmentation similarity and overlap quality.
Measures the percentage of correctly classified pixels.
Measures the correctness of predicted flood regions.
Measures the model's ability to identify actual flooded areas.
Harmonic mean of Precision and Recall.
| Metric | Score |
|---|---|
| Test IoU | 0.8643 |
| Dice Score | 0.86 |
| Pixel Accuracy | 0.86 |
| Precision | 0.88 |
| Recall | 0.85 |
| F1-Score | 0.86 |
Confusion Matrix of the Proposed UNet–ResNet50 Model
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Non-Flood | 0.88 | 0.87 | 0.88 |
| Flood | 0.84 | 0.85 | 0.85 |
Overall Accuracy: 86%
Qualitative segmentation results showing Input Images, Ground Truth Masks, and Predicted Flood Masks generated by the proposed UNet–ResNet50 model.
The generated segmentation masks closely match the ground-truth flood regions, demonstrating the model's ability to accurately detect inundated areas.
| Model | IoU |
|---|---|
| FCN | 0.71 |
| UNet | 0.78 |
| DeepLabV3+ | 0.81 |
| VGG16-UNet | 0.76 |
| UNet–ResNet50 (Proposed) | 0.8643 |
The proposed UNet–ResNet50 model achieved the highest segmentation performance among all evaluated architectures.
- Flood Monitoring
- Disaster Response
- Emergency Planning
- Environmental Analysis
- Remote Sensing
- Water Resource Management
- Geospatial Intelligence
- Real-world flood image evaluation
- Multi-temporal flood monitoring
- SAR imagery integration
- Transformer-based segmentation models
- Web deployment for real-time flood detection
- Edge AI deployment for field operations
Flood-Mapping-Using-UNet-ResNet50/
│
├── Unet_Resnet50.ipynb
├── Flood_mapping_article_final.pdf
├── README.md
└── LICENSE
Deep Learning Mini Project (Group Project)
- Savanth G
- T Dhanush
- Posa Ajith Kumar
- Lokesh Gadhi
Tintu Vijayan Assistant Professor School of CSE & IS Presidency University, Bengaluru, India
This project demonstrates the effectiveness of a hybrid UNet–ResNet50 architecture for flood extent segmentation. By combining deep residual feature extraction with UNet's powerful decoder structure, the proposed model achieved superior performance compared to several baseline segmentation models. The results highlight the potential of deep learning-based flood mapping systems in supporting disaster management and environmental monitoring applications.
This project is licensed under the MIT License.
Savanth G
📧 savanthg14@gmail.com
🌐 LinkedIn : linkedin.com/in/savanth-g-65454a36b







