Skip to content

Latest commit

 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1Wuhan University  2Benha University  3Birmingham City University  4Duke University 

If you find our work or benchmark helpful for your research, please consider giving us a ⭐!

🛎️ Updates

Overview ✨✨✨

✨ Requirements

Before using this repository, make sure you have the following prerequisites installed:

torch==2.6.0 torchaudio==2.6.0 torchvision==0.21.0

Tested using Python 3.9.0 on a 64-bit Windows operating system.

conda install pytorch torchvision pytorch-cuda=12.4 -c pytorch -c nvidia

🛠️ Installation

To get started, create the conda environment named SAFE-FD by executing the following command:

conda create -n SAFE_FD python=3.9.0 -y

Then activate the environment:

conda activate SAFE_FD

📄 Supported Datasets

Download the datasets and place them in the Benchmark folder.

Dataset Name Link
Ombria-Net OmbriaS1 source
DAM-Net S1GFloods source
New-Dataset S1GFloods+7 baidu drive

📒 Folder Structure

Prepare the following folders to organize this repo:

  SAR_Flood_Detection
      ├── SAFENet (code)
      ├── PRETRAINED (pvt_v2_b2.pth)
      ├── WORK_DIR (save the model weights and training logs)
      │   └─ checkpoints (the best models)
      │   └─ test_metrics (the best test results)
      │              ├─test_metrics.txt (the best test results)
      │   └─ test_visualizations
      │   └─ train_history (train & val results per epoch)
      │   └─ val_results
      └── Benchmark
          ├── OmbriaS1
          │   ├── train
          │   │   ├── A                           Images of Time 1 before the flood event
          │   │   │   └── S1_0001.png
          │   │   ├── B                           Images of Time 2 after the flood event
          │   │   │   └── S1_0001.png
          │   │   └── GT                          Ground truth labels
          │   │       └── S1_0001.png
          │   ├── test (the same with train)
          │  
          ├── SIGFloods
          │   ├── train
          │   │   ├── A
          │   │   │   └── S1_1.png
          │   │   ├── B
          │   │   │   └── S1_1.png
          │   │   └── GT
          │   │       └── S1_1.png
          │   ├── test (the same with train)
          │  
          ├── SIGFloods+7
          │   ├── train
          │   │   ├── A
          │   │   │   └── Brazil_0_1.png
          │   │   │   └── Indonesia_0_1.png
          │   │   │   └── Morocco_0_1.png
          │   │   │   └── Mozambique_0_1.png
          │   │   │   └── Portugal_0_1.png
          │   │   │   └── Ukraine_0_1.png
          │   │   │   └── USA_0_1.png
          │   │   ├── B
          │   │   │   └── Brazil_0_1.png
          │   │   │   └── Indonesia_0_1.png
          │   │   │   └── Morocco_0_1.png
          │   │   │   └── Mozambique_0_1.png
          │   │   │   └── Portugal_0_1.png
          │   │   │   └── Ukraine_0_1.png
          │   │   │   └── USA_0_1.png
          │   │   └── GT
          │   │       └── Brazil_0_1.png
          │   │   │   └── Indonesia_0_1.png
          │   │   │   └── Morocco_0_1.png
          │   │   │   └── Mozambique_0_1.png
          │   │   │   └── Portugal_0_1.png
          │   │   │   └── Ukraine_0_1.png
          │   │   │   └── USA_0_1.png
          │   ├── test (the same with train)

📄 Method

🔭 Supported SOTA

Method Name Link
📖 📖 📖 DBF-Net DBF-Net Paper here
📖 📖 📖 WBA-Net WBA-Net Paper here
📖 📖 📖 GLA-Former GLA-Former Paper here
📖 📖 📖 CAS-Net CAS-Net Paper here
📖 📖 📖 PA-Former PA-Former Paper here
📖 📖 📖 ViCxLSTM ViCxLSTM Paper here
📖 📖 📖 BiSR-Net BiSR-Net Paper here
📖 📖 📖 SCan-Net SCan-Net Paper here

✨ Checkpoints

OmbriaS1

Method Input size F1-score Checkpoints
DBF-Net 256 × 256 53.3 Model
WBA-Net 256 × 256 52.9 Model
GLA-Former 256 × 256 65.7 Model
CAS-Net 256 × 256 71.3 Model
PA-Former 256 × 256 76.7 Model
ViCxLSTM 256 × 256 77.4 Model
BiSR-Net 256 × 256 78.0 Model
SCan-Net 256 × 256 81.3 Model
SAFE-Net 256 × 256 85.3 Model

S1GFloods

Method Input size F1-score Checkpoints
DBF-Net 256 × 256 62.4 Model
WBA-Net 256 × 256 88.7 Model
GLA-Former 256 × 256 93.6 Model
CAS-Net 256 × 256 86.5 Model
PA-Former 256 × 256 95.9 Model
ViCxLSTM 256 × 256 95.0 Model
BiSR-Net 256 × 256 94.2 Model
SCan-Net 256 × 256 96.2 Model
SAFE-Net 256 × 256 96.8 Model

📄 Results

Quantitative

Qualitative

  • OmbriaS1

    image-20210228153142126

    Qualitative comparison on the OmbriaS1 dataset. From left to right: T1 image, T2 image, Ground Truth, DBF-Net, CAS-Net, WBA-Net, GLA-Former, BiSR-Net, ViCxLSTM, PA-Former, SCan-Net, and the proposed SAFE-Net method (Ours).

  • S1GFloods

    image-20210228153142126

    Qualitative comparison on the S1GFloods dataset. From left to right: T1 image, T2 image, Ground Truth, DBF-Net, CAS-Net, WBA-Net, GLA-Former, BiSR-Net, ViCxLSTM, PA-Former, SCan-Net, and the proposed SAFE-Net method (Ours).

  • S1GFloods+7

📚 Citation and References

@ARTICLE{tasaleh2026SAFENet,
  Author = {Tamer Saleh, Gui-Song Xia, Wen Yang, Mohamed Ihmeida, Zhuohong Li, Shimaa Holail},
  Title = {SAFE-Net: A Shifted-Attention Frequency-Gated Network and Large-Scale Benchmark for Generalizable SAR Flood Mapping},
  Journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
  Year = {2026},
  volume={},
  number={},
  pages={1-24},
  doi = {},
  }

@article{saleh2024dam,
  title={DAM-Net: Flood detection from SAR imagery using differential attention metric-based vision transformers},
  author={Saleh, Tamer and Weng, Xingxing and Holail, Shimaa and Hao, Chen and Xia, Gui-Song},
  journal={ISPRS Journal of Photogrammetry and Remote Sensing},
  volume={212},
  pages={440--453},
  year={2024},
  publisher={Elsevier}
}

📮 Contact

If you are confused about the content of our paper or look forward to further academic exchanges and cooperation, please do not hesitate to contact us. The e-mail address is tamersaleh@whu.edu.cn. We look forward to hearing from you!

🔑 License

licensed for research use only. The dataset is CC BY NC 4.0 (allowing only non-commercial use), and models trained using the dataset should not be used outside of research purposes.

Related resources

Star History

Star History Chart

About

SAFE-Net for flood detection from bi-temporal SAR image pairs.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages