This project implements water body segmentation using the Trans DeepLab model. It includes code for training the model, evaluating its performance, and metrics calculations.
Extracting water bodies from satellite images is challenging because water bodies can appear differently in satellite images. Water pixels have various colors and patterns, making it hard to tell them apart from other land features.
model.py
: TransDeepLab modeltraining.ipynb
: Training the model codeevaluation.py
: Model evaluation codetransdeeplab and deeplab comparision.ipynb
: Comparision of trans deeplab and convolution based deeplab models.
git clone https://github.com/sunandhini96/Water_body_segmentation-TransDeeplab.git
cd Water_body_segmentation-TransDeeplab
run the training.ipynb
python evaluation.py
The project uses RGB satellite images and corresponding masks from Sentinel-2 A/B satellite. You can obtain the dataset https://www.kaggle.com/datasets/franciscoescobar/satellite-images-of-water-bodies
- (white pixels represent water and black pixels represents other than water in true mask)
Four Sample input images with its True Mask, Predicted Mask for Trans DeepLab and Predicted Mask for DeepLab Model
If you use this code in your research, please cite our recent paper for more details.
For a detailed explanation of the project and results, refer to our paper.