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.
- 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.
The dataset includes preprocessed satellite images with 12 spectral bands and corresponding binary masks indicating water bodies.
The multi-band structure enhances water segmentation accuracy.
π· Below is a sample visualization of the spectral bands:
| 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 |
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
- Upload multispectral image (with 12 channels)
- Visualize band combinations
- View the predicted segmentation mask
- Download the bands the output mask
python Deployment/app.py
http://127.0.0.1:5000/
or
http://localhost:5000
| 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 |
