Skip to content

This project includes data preprocessing, visualization, model training, and evaluation using TensorFlow and Keras, building a deep learning model for predicting binary water mask using UNet and pretrained models such as ResNet34, ResNet50 and EfficientNetV2B0, and establishing a UI using Flask, HTML, CSS & JS to give instant predictions.

Notifications You must be signed in to change notification settings

bassantsherif123/ComputerVision_Satellite_Image_Water_Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›°οΈ Satellite Water Segmentation

🧠 Overview

This project applies deep learning models (like U-Net and its variants) to perform semantic segmentation on satellite images. The goal is to accurately detect water regions from multi-band input images (e.g., 12-band satellite imagery) and deploy the solution using a Flask web interface.

πŸš€ Features

  • U-Net-based architecture with various backbones (ResNet34, ResNet50, EfficientNetV2B0).
  • Accepts 12-channel multispectral input data.
  • Pixel-wise segmentation output with water masks.
  • Flask-powered web app for uploading images and displaying results.
  • Evaluation metrics: Accuracy, IoU, Precision, Recall.
  • Download predicted mask as an image.

πŸ“Š Dataset Summary

The dataset includes preprocessed satellite images with 12 spectral bands and corresponding binary masks indicating water bodies.

Band Explanation

The multi-band structure enhances water segmentation accuracy.

πŸ“· Below is a sample visualization of the spectral bands:

Bands Explanation

Band Name Min Max Use
1 Coastal aerosal -1393.0 6568.0 Aerosol detection
2 Blue -1169.0 9659.0 Useful in cloud and snow discrimination
3 Green -722.0 11368.0 General-purpose true-color rendering
4 Red -684.0 12041.0 Detecting plant stress, soil exposure
5 NIR -412.0 15841.0 Differentiating between water and land
6 SWIR1 -335.0 15252.0 Soil moisture, drought stress detection, Burned area detection, Differentiating snow/cloud
7 SWIR2 -258.0 14647.0 Geological mapping, identifying bare soils, rocks, Detecting water content and surface changes
8 QA Band 64.0 255.0 Masking clouds, shadows, saturation, or other invalid pixels
9 Merit DEM -9999.0 4245.0 Identifying basins, slopes, floodplains
10 Copernicus DEM 8.0 4287.0 Similar to MERIT DEM, but higher resolution
11 ESA world cover map 10.0 100.0 Provides land use/land cover context (e.g., water, forest)
12 Water occurence probability 0.0 111.0 Water body persistence analysis

πŸ›  Installation & Setup

git clone https://github.com/bassantsherif123/ComputerVision_Satellite_Image_Water_Segmentation.git

Download the model using the following link, then create a Model folder inside the project and add it to it: πŸ“₯ Download Model File

You will need to download Flask, if you don't already have it:

pip install flask

🌐 Flask App

  • Upload multispectral image (with 12 channels)
  • Visualize band combinations
  • View the predicted segmentation mask
  • Download the bands the output mask

To run the app, use:

python Deployment/app.py

Then open on any browser using:

http://127.0.0.1:5000/

or

http://localhost:5000

πŸ“ˆ Model Evaluation

Model Name Accuracy IoU
Custom UNet 0.955315 0.826221
EfficientNetV2B0 0.901890 0.408989
ResNet34 0.958784 0.836132
ResNet50 0.857304 0.408989

About

This project includes data preprocessing, visualization, model training, and evaluation using TensorFlow and Keras, building a deep learning model for predicting binary water mask using UNet and pretrained models such as ResNet34, ResNet50 and EfficientNetV2B0, and establishing a UI using Flask, HTML, CSS & JS to give instant predictions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages