Skip to content

Tamer-Saleh/S1GFlood-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DAM-Net: Global Flood Detection from SAR Imagery Using Differential Attention Metric-Based Vision Transformers

Authors

Author Author Author Author Author

Updates

⚑ March, 2023: DAM-Net has been submitted for publication at ISPRS Journal of Photogrammetry and Remote Sensing.

Preamble

The following animation shows SAR images before and after the event and a sample of flooded area findings for a rural area in Iran that was hit by a flood in March 2019. The right figure provides an enlarged visual of a 1 km x 1 km area within the larger area as in the yellow box, showing the size of the affected buildings from the flood by our model.

Description

Flooding can cause extensive damage to people, ecosystems, and economies, making it a severe natural disaster. Operating ground-based equipment in flood zones is hazardous, and limited physical access to flooded areas can make it challenging to acquire information about flood extent on the ground. Accurately detecting floods and flood extent via remote sensing greatly aids in mitigating and responding to these events. Remote sensing technology, such as satellites and airborne sensors, can provide valuable information about the extent of flooding, crucial for developing appropriate response strategies and minimizing damages. In this work, we present a new open-source global-scale flood detection dataset, S1GFloods, has been compiled to aid in flood detection. The dataset includes global pairs of high-resolution Sentinel-1 SAR images covering 42 flood events between 2016 and 2022, along with ground truth maps for each pixel. It showcases flooded areas such as rivers, lakes, vegetation, urban and rural areas, and common causes of flooding. This dataset provides critical information for developing strategies to mitigate and respond to future flooding events.

Image Ref. Site S1 Pre Date S1 Post Date GT Date
Img (1) Bangladesh 14-03-2017 12-07-2017 12-07-2017
Img (2) Iran 12-07-2019 29-03-2019 29-03-2019
Img (3) Nigeria 26-08-2022 13-10-2022 13-10-2022
Img (4) Nanchang 21-04-2020 14-07-2020 14-07-2020
Img (5) Wuhan 02-05-2020 13-07-2020 13-07-2020
Img (6) Redrivernorth 09-02-2019 28-05-2019 28-05-2019
Img (7) Sudan 13-07-2020 23-09-2020 23-09-2020
Img (8) Florence 21-07-2018 19-09-2018 19-09-2018
Img (9) Zambia 25-03-2017 06-04-2017 06-04-2017

Requirements

Python 3.7+ Pytorch 1.7.1 torchvision 0.8.2 Opencv 4.5.5 CUDA Toolkit 10.1 Python-SNAPPY 8.0 Wandb 0.13.10

Our model

An overview of the proposed DAM-Net. The feature maps of the pre-and post-event image pairs are extracted through a Siamese structure and pre-trained remote sensing. Overall

Quantitative Results

image-QuantitativeResult

Qualitative Results

A visual comparison of flood detection results in the Iran dataset. The first three images, (a), (b), and (c), represent the pre-flood image, post-flood image, and binary ground truth, respectively. The subsequent images show a comparison of flood detection using various methods, including (d) Unet, (e) FC-Siam-Conc, (f) FC-Siam-Diff, (g) SNUNet-ECAM, (h) Siam-Nested-Unet, (i) ResNet50-IMP, (j) ResNet50-RSP, (k) Swin-T-IMP, (l) ViTAEv2-IMP, (m) Swin-T-RSP, and (n) our proposed DAM-Net method. image-QualitativeResult

πŸ”­ Baselines

  • πŸ“– πŸ“– πŸ“– DTCDSCN [here]
  • πŸ“– πŸ“– πŸ“– UNet [here]
  • πŸ“– πŸ“– πŸ“– FC-Siam [here]
  • πŸ“– πŸ“– πŸ“– SNUNet–ECAM [here]
  • πŸ“– πŸ“– πŸ“– Siam-Nested-UNet [here]
  • πŸ“– πŸ“– πŸ“– ResNet50-IMP [here]
  • πŸ“– πŸ“– πŸ“– ResNet50-RSP [here]
  • πŸ“– πŸ“– πŸ“– Swin–T-RSP [here]
  • πŸ“– πŸ“– πŸ“– Swin-T-IMP [here]
  • πŸ“– πŸ“– πŸ“– ViTAEv2 [here]

πŸ’¬ Dataset Preparation

πŸ‘‰ Data Structure

For S1GFloods dataset, clip the images to 256 Γ— 256 patches. Please, respect the following structure: 
β”œβ€”β€”β€”β€”train/
|      β”œβ€”β€”β€”Pre/                                  Images of Time 1 before the flood event
            β”œβ€”β€”β€”<region><year><XY>.png
            ...
            β”œβ€”β€”β€”<region><year><XY>.png
|      β”œβ€”β€”β€”Post/                                 Images of Time 2 after the flood event
            β”œβ€”β€”β€”<region><year><XY>.png
            ...
            β”œβ€”β€”β€”<region><year><XY>.png            
|      β”œβ€”β€”β€”GT/                                   Ground truth labels
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 
|
β”œβ€”β€”β€”β€”val/
|      β”œβ€”β€”β€”Pre/  
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 
|      β”œβ€”β€”β€”Post/
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 
|      β”œβ€”β€”β€”GT/
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 
|
β”œβ€”β€”β€”β€”test/
|      β”œβ€”β€”β€”Pre/  
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 
|      β”œβ€”β€”β€”Post/
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 
|      β”œβ€”β€”β€”GT/
            β”œβ€”β€”β€”<region><year><XY>.png 
            ...
            β”œβ€”β€”β€”<region><year><XY>.png 

🚚 Datasets

The full train and test code will be released soon. You can download our novel public S1GFloods dataset through the following link:

πŸ“ƒ Citing

@ARTICLE{tamersalehdam2023,
  Author = {T. Saleh, G-S Xia, S. Holail, X. Weng, and C. Hao},
  Title = {DAM-Net: Global Flood Detection from SAR Imagery Using Differential Attention Metric-Based Vision Transformers},
  Journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
  Year = {2023},
  volume={},
  number={},
  pages={1-21}
  }

Contact Information

If you have any questions or would like to collaborate, please reach out to me at tamersaleh@whu.edu.cn or feel free to make issues.

License

The code and datasets are released for non-commercial and research purposes only. For commercial purposes, please contact the authors.

Acknowledgment

Appreciate the work from the following repositories:

Related resources