This project aims to perform waterbodies segmentation of Toushka Lakes, a chain of lakes in southern Egypt’s New Valley. The ambitious Toshka Lakes project was designed to provide irrigation for new agricultural developments, and to attract people to the region and away from the dense populations of the Nile Valley itself.
The segmentation task is achieved using Sentinel-1 SAR imagery with the PyTorch framework and the U-Net architecture. The challenge is in differentiating between waterbodies and the surrounding land cover of sands due to the similarity in their intensity values. Traditional machine learning techniques failed to effectively distinguish between these classes. To overcome this challenge, the integration of SAR imagery, polarization information, and terrain features was explored using the U-Net architecture and the PyTorch framework. The training was performed on four different combinations of the dataset. Each combination aimed to evaluate the impact of specific data sources on the segmentation model's performance. The metrics were compared to identify the combination that yields the best results.
- Project Description
- Study Area
- Datasets
- Results Analysis
- Installation
- Citing
- Contributing
- Acknowledgement
- License
The objective of this project is to develop a deep learning model that can accurately segment the water bodies of Toushka Lakes from SAR imagery.SAR data offers valuable information for waterbodies segmentation due to its ability to penetrate cloud cover and capture images regardless of the weather conditions. The segmentation task involves classifying each pixel in SAR satellite imagery as either water or non-water. This information can be valuable for various applications, such as environmental monitoring, water resource management, and urban planning.
The U-Net architecture is chosen for its effectiveness in image segmentation tasks. It was initially developed for biomedical image segmentation but has since been applied to various other domains. It consists of an encoder-decoder structure:
-
The encoder path, also known as the contracting path, is responsible for capturing contextual information from the input image.
-
The decoder path, also known as the expansive path, aims to enable precise localization by upsampling the feature maps and recovering the spatial information lost during the encoding process.
The lakes are natural depressions in the Sahara Desert that are filled by overflow from Lake Nasser, the enormous 550-kilometer-long (340-mile) reservoir built on the Nile River. Lake Nasser appears in the 2021 image (far right). The rise and fall of Toshka Lakes depend on multi-year fluctuations in the flow of the Nile.
Image Date: November 30, 2021
The dataset used in this project consists of Sentinel-1 Synthetic Aperture Radar (SAR) imagery from 2019 to 2021. Unfortunately, no images beyond 2021 were available for this specific location due to the discontinuation of Senitnel-1B, the acquisition platform used in this study area, at the end of 2021. The dataset comprised a total of 90 images, each of which was manually annotated to establish the ground truth labels necessary for training the model to accurately identify water bodies in the SAR imagery. It was divided into 70 images for training and 20 images for validation to assess the model's performance on previously unseen data. It's worth mentioning that the images did not undergo speckle filtering or radiometric terrain correction.
To determine the optimal combination of SAR imagery, polarization information, and terrain features for training, the models were trained on these four different dataset variations:
This dataset contains SAR images with only the VV (Vertical-Vertical) polarization band. The VV band provides valuable information about the backscatter intensity, which is essential for distinguishing waterbodies from surrounding land cover.
VV Band- Sentinal-1 SAR
Image Date: December 11, 2021
In this dataset, a composite RGB (Red-Green-Blue) SAR image is created. The VV band is assigned to the red channel, the VH (Vertical-Horizontal) polarization band is assigned to the green channel, and the blue channel is formed by the ratio of VV to VH bands (VV/VH). This composite image provides a visual representation of the SAR data, allowing for better interpretation and analysis.
RGB SAR (red = VV, green = VH, blue = VV/VH)
Image Date: December 11, 2021
The third dataset incorporates the VV band SAR images with the Digital Elevation Model (DEM) data. By combining SAR data with terrain information, this dataset takes into account the topographic characteristics of the area, which can influence the appearance and distribution of waterbodies.
The fourth dataset combines the RGB SAR image (with VV, VH, and VV/VH bands) with the DEM data. This dataset provides a comprehensive representation by integrating SAR imagery, polarization information, and terrain features.
The evaluation of the segmentation models over 25 epochs of training reveals that the RGB with DEM model outperforms the other three models in terms of various performance metrics, including model loss value, pixel accuracy, F1 score, and Intersection over Union (IoU). This indicates the effectiveness of incorporating both RGB SAR imagery and Digital Elevation Model (DEM) data for waterbodies segmentation in the lakes of Toushka.
-
Clone the repository:
git clone https://github.com/MuhammedM294/waterseg.git
-
Change to the project directory:
cd waterseg
-
Setting up an environment to run the project:
conda create --n <environment-name> conda activate <environment-name>
-
Install the required dependencies::
pip install -r requirements.txt
{
Author = {Muhammed Abdelaal},
Title = {Toushka Lakes Water Bodies Semantic Segmentation PyTorch},
Year = {2023},
Publisher = {GitHub},
Journal = {GitHub repository},
Howpublished = {\url{https://github.com/MuhammedM294/waterseg}}
}
Contributions to this project are welcome. If you find any issues or have suggestions for improvements, please open a new issue or submit a pull request.
This project is licensed under the MIT License.
Project based on the cookiecutter data science project template. #cookiecutterdatascience