├── train.py
├── test.py
├── test.png
├── images
├── test.png
├── Iran-GT.gif
├── overall.png
├── Iran-Img.gif
├── Nigeria-GT.gif
├── Sudan-GT.gif
├── Sudan-Img.gif
├── Wuhan-GT.gif
├── Wuhan-Img.gif
├── Zambia-GT.gif
├── Zambia-Img.gif
├── table-test.jpg
├── test-map.gif
├── Florence-GT.gif
├── Florence-Img.gif
├── Iran-results.png
├── Nanchang-GT.gif
├── Nanchang-Img.gif
├── Nigeria-Img.gif
├── Bangladesh-GT.gif
├── Bangladesh-Img.gif
├── zoom-test-map.gif
├── Redrivernorth-GT.gif
└── Redrivernorth-Img.gif
├── models
└── test.png
└── README.md
/train.py:
--------------------------------------------------------------------------------
1 | under progress .....
2 |
--------------------------------------------------------------------------------
/test.py:
--------------------------------------------------------------------------------
1 | under progress..........
2 |
--------------------------------------------------------------------------------
/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/test.png
--------------------------------------------------------------------------------
/images/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/test.png
--------------------------------------------------------------------------------
/models/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/models/test.png
--------------------------------------------------------------------------------
/images/Iran-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Iran-GT.gif
--------------------------------------------------------------------------------
/images/overall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/overall.png
--------------------------------------------------------------------------------
/images/Iran-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Iran-Img.gif
--------------------------------------------------------------------------------
/images/Nigeria-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Nigeria-GT.gif
--------------------------------------------------------------------------------
/images/Sudan-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Sudan-GT.gif
--------------------------------------------------------------------------------
/images/Sudan-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Sudan-Img.gif
--------------------------------------------------------------------------------
/images/Wuhan-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Wuhan-GT.gif
--------------------------------------------------------------------------------
/images/Wuhan-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Wuhan-Img.gif
--------------------------------------------------------------------------------
/images/Zambia-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Zambia-GT.gif
--------------------------------------------------------------------------------
/images/Zambia-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Zambia-Img.gif
--------------------------------------------------------------------------------
/images/table-test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/table-test.jpg
--------------------------------------------------------------------------------
/images/test-map.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/test-map.gif
--------------------------------------------------------------------------------
/images/Florence-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Florence-GT.gif
--------------------------------------------------------------------------------
/images/Florence-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Florence-Img.gif
--------------------------------------------------------------------------------
/images/Iran-results.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Iran-results.png
--------------------------------------------------------------------------------
/images/Nanchang-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Nanchang-GT.gif
--------------------------------------------------------------------------------
/images/Nanchang-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Nanchang-Img.gif
--------------------------------------------------------------------------------
/images/Nigeria-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Nigeria-Img.gif
--------------------------------------------------------------------------------
/images/Bangladesh-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Bangladesh-GT.gif
--------------------------------------------------------------------------------
/images/Bangladesh-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Bangladesh-Img.gif
--------------------------------------------------------------------------------
/images/zoom-test-map.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/zoom-test-map.gif
--------------------------------------------------------------------------------
/images/Redrivernorth-GT.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Redrivernorth-GT.gif
--------------------------------------------------------------------------------
/images/Redrivernorth-Img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tamer-Saleh/S1GFlood-Detection/HEAD/images/Redrivernorth-Img.gif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | DAM-Net: Global Flood Detection from SAR Imagery Using Differential Attention Metric-Based Vision Transformers
3 |
4 |
5 | Authors
6 |
7 | [](https://www.bu.edu.eg/staff/tamermohamed3)
8 | [](http://www.captain-whu.com/xia_En.html)
9 | [](https://www.linkedin.com/in/shimaaholail/)
10 | []()
11 | []()
12 |
13 |
14 | ## Updates
15 | | :zap: | March, 2023: DAM-Net has been submitted for publication at ISPRS Journal of Photogrammetry and Remote Sensing. |
16 | |---------------|:------------------------|
17 |
18 |
19 | ## Preamble
20 | 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.
21 |
22 |
23 |

24 |

25 |
26 |
27 | ## Description
28 |
29 | 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.
30 |
31 |
37 |
38 |
44 |
45 |
46 |

47 |

48 |

49 |

50 |

51 |
52 |
53 |
54 |

55 |

56 |

57 |

58 |

59 |
60 |
61 |
62 | | Image Ref. | Site | S1 Pre Date | S1 Post Date | GT Date |
63 | | ---------- | ------------- | ------------ | ------------ | ------------ |
64 | | Img (1) | Bangladesh | 14-03-2017 | 12-07-2017 | 12-07-2017 |
65 | | Img (2) | Iran | 12-07-2019 | 29-03-2019 | 29-03-2019 |
66 | | Img (3) | Nigeria | 26-08-2022 | 13-10-2022 | 13-10-2022 |
67 | | Img (4) | Nanchang | 21-04-2020 | 14-07-2020 | 14-07-2020 |
68 | | Img (5) | Wuhan | 02-05-2020 | 13-07-2020 | 13-07-2020 |
69 | | Img (6) | Redrivernorth | 09-02-2019 | 28-05-2019 | 28-05-2019 |
70 | | Img (7) | Sudan | 13-07-2020 | 23-09-2020 | 23-09-2020 |
71 | | Img (8) | Florence | 21-07-2018 | 19-09-2018 | 19-09-2018 |
72 | | Img (9) | Zambia | 25-03-2017 | 06-04-2017 | 06-04-2017 |
73 |
74 |
75 | ## Requirements
76 |
77 | [](https://www.python.org/downloads/release/python-376/)
78 | [](https://pytorch.org/get-started/previous-versions/)
79 | [](https://pypi.org/project/torchvision/0.8.2/)
80 | [](https://opencv.org/opencv-4-5-5/)
81 | [](https://developer.nvidia.com/cuda-10.1-download-archive-base)
82 | [](https://senbox.atlassian.net/wiki/spaces/SNAP/pages/50855941/Configure+Python+to+use+the+SNAP-Python+snappy+interface)
83 | [](https://pypi.org/project/wandb/)
84 |
85 |
86 | ## Our model
87 | 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.
88 | 
89 |
90 |
91 | ## Quantitative Results
92 | 
93 |
94 | ## Qualitative Results
95 | 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.
96 | 
97 |
98 |
99 | ### 🔭 Baselines
100 |
101 | - :open_book: :open_book: :open_book: DTCDSCN [[here](https://ieeexplore.ieee.org/abstract/document/9311793)]
102 | - :open_book: :open_book: :open_book: UNet [[here](https://www.int-arch-photogramm-remote-sens-spatial-inf-sci.net/XLIV-4-W3-2020/215/2020/)]
103 | - :open_book: :open_book: :open_book: FC-Siam [[here](https://ieeexplore.ieee.org/abstract/document/8451652)]
104 | - :open_book: :open_book: :open_book: SNUNet–ECAM [[here](https://ieeexplore.ieee.org/abstract/document/9355573)]
105 | - :open_book: :open_book: :open_book: Siam-Nested-UNet [[here](https://dl.acm.org/doi/abs/10.1145/3437802.3437810)]
106 | - :open_book: :open_book: :open_book: ResNet50-IMP [[here](https://openaccess.thecvf.com/content_cvpr_2016/papers/He_Deep_Residual_Learning_CVPR_2016_paper.pdf)]
107 | - :open_book: :open_book: :open_book: ResNet50-RSP [[here](https://ieeexplore.ieee.org/abstract/document/9782149)]
108 | - :open_book: :open_book: :open_book: Swin–T-RSP [[here](https://ieeexplore.ieee.org/abstract/document/9782149)]
109 | - :open_book: :open_book: :open_book: Swin-T-IMP [[here](https://ieeexplore.ieee.org/abstract/document/9736956)]
110 | - :open_book: :open_book: :open_book: ViTAEv2 [[here](https://arxiv.org/pdf/2202.10108.pdf)]
111 |
112 |
113 | ## :speech_balloon: Dataset Preparation
114 |
115 | ### :point_right: Data Structure
116 |
117 | ```yaml
118 | For S1GFloods dataset, clip the images to 256 × 256 patches. Please, respect the following structure:
119 | ├————train/
120 | | ├———Pre/ Images of Time 1 before the flood event
121 | ├———.png
122 | ...
123 | ├———.png
124 | | ├———Post/ Images of Time 2 after the flood event
125 | ├———.png
126 | ...
127 | ├———.png
128 | | ├———GT/ Ground truth labels
129 | ├———.png
130 | ...
131 | ├———.png
132 | |
133 | ├————val/
134 | | ├———Pre/
135 | ├———.png
136 | ...
137 | ├———.png
138 | | ├———Post/
139 | ├———.png
140 | ...
141 | ├———.png
142 | | ├———GT/
143 | ├———.png
144 | ...
145 | ├———.png
146 | |
147 | ├————test/
148 | | ├———Pre/
149 | ├———.png
150 | ...
151 | ├———.png
152 | | ├———Post/
153 | ├———.png
154 | ...
155 | ├———.png
156 | | ├———GT/
157 | ├———.png
158 | ...
159 | ├———.png
160 | ```
161 |
162 | ### :truck: Datasets
163 |
164 | The full train and test code will be released soon. You can download our novel public S1GFloods dataset through the following link:
165 |
166 | - [x] [S1GFloods][baidu drive](https://pan.baidu.com/s/1E4dEJtlQ6xeUDRPGO904KQ?pwd=m6gr) Passward: (m6gr)
167 | - [x] [S1GFloods][Google Drive Link](https://drive.google.com/file/d/1bm_sFfJ05Fryj6Ib1niIidOywljzIEgo/view?usp=sharing)
168 |
169 | ### :page_with_curl: Citing
170 |
171 | ```bibtex
172 | @ARTICLE{tamersalehdam2023,
173 | Author = {T. Saleh, G-S Xia, S. Holail, X. Weng, and C. Hao},
174 | Title = {DAM-Net: Global Flood Detection from SAR Imagery Using Differential Attention Metric-Based Vision Transformers},
175 | Journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
176 | Year = {2023},
177 | volume={},
178 | number={},
179 | pages={1-21}
180 | }
181 | ```
182 |
183 |
184 | ## Contact Information
185 |
186 | 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.
187 |
188 | ## License
189 | The code and datasets are released for non-commercial and research purposes only. For commercial purposes, please contact the authors.
190 |
191 |
192 | ## Acknowledgment
193 |
194 | Appreciate the work from the following repositories:
195 |
196 | - [wenhwu/awesome-remote-sensing-change-detection](https://github.com/wenhwu/awesome-remote-sensing-change-detection)
197 | - [SNUNet-CD](https://github.com/RSCD-Lab/Siam-NestedUNet)
198 | - [BIT-CD](https://github.com/justchenhao/BIT_CD)
199 |
200 | ## Related resources
201 | - [ASF-Dataset](https://search.asf.alaska.edu/)
202 | - [Sentinel-Hub](https://scihub.copernicus.eu/)
203 | - [SNAP Toolbox](http://step.esa.int/main/download/)
204 |
205 |
206 |
207 |
--------------------------------------------------------------------------------