Code Monkey home page Code Monkey logo

rsdformer's Introduction

Learning An Effective Transformer for Remote Sensing Satellite Image Dehazing

Abstract: The existing remote sensing (RS) image dehazing methods based on deep learning have sought help from the convolutional frameworks. Nevertheless, the inherent limitations of convolution, {\em i.e.,} local receptive fields and independent input elements, curtail the network to learn the long-range dependencies and non-uniform distributions. To this end, we design an effective RS image dehazing Transformer architecture, denoted as RSDformer. Firstly, given the irregular shapes and non-uniform distributions of haze in RS images, capturing both local and non-local features is crucial for RS image dehazing models. Hence, we propose a detail-compensated transposed attention to extract the global and local dependencies by across channels. Secondly, for enhancing the ability to learn degraded features and better guide the restoration process, we develop a dual-frequency adaptive block with dynamic filters. Finally, a dynamic gated fusion block is designed to achieve fuse and exchange features across different scales effectively. In this way, the model exhibits robust capabilities to capture dependencies from both global and local areas, resulting in improving image content recovery. Extensive experiments prove that the proposed method obtains more appealing performances against other competitive methods. The source codes are available at https://github.com/MingTian99/RSDformer

RSDformer

News

  • July 4, 2023: Paper submitted.
  • Sep 13, 2023: The basic version is released, including codes, pre-trained models on the Sate 1k dataset, and the used dataset.
  • Sep 14, 2023: RICE dataset updated.

Preparation

Datasets

Dataset Thin Haze Moderate Haze Thick Haze RICE RSSD300
Baidu Cloud Download Download Download Download Download
Here, the ''Thin haze'', ''Moderate haze'' and ''Thick haze'' are included in the Sate 1K dataset. We provide completely paired images, except for RRSD300, as it is a real-world remote sensing haze dataset.

Install

We test the code on PyTorch 1.9.1 + CUDA 11.1 + cuDNN 8.0.5.

  1. Create a new conda environment
conda create -n RSDformer python=3.8
conda activate RSDformer 
  1. Install dependencies
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

pip install matplotlib scikit-image opencv-python numpy einops math natsort tqdm lpips time tensorboardX

Download

You can download the pre-trained models and datasets on Google Drive or BaiduPan.

Currently, we only provide the pre-trained model trained on the Sate 1K dataset and the used dataset (Sate 1K, RICE and RRSD300).

The pre-trained models trained on RICE will be updated as quickly as possible.

The final file path should be the same as the following:

┬─ pretrained_models
│   ├─ thin_haze.pth
│   ├─ moderate_haze.pth
│   ├─ ... (model name)
│   └─ ... (exp name)
└─ data
    ├─ Sate_1K
    │├─ Haze1k_thick
    ││   ├─ train
    ││   │   ├─ input
    ││   │   │   └─ ... (image filename)
    ││   │   └─ target
    ││   │       └─ ... (corresponds to the former)
    ││   └─ test
    ││       └─ ...
    │└────  ... (dataset name)
    │
    │
    └─ ... (dataset name)

Training, Testing and Evaluation

Train

The training code will be released after the paper is accepted. You should change the path to yours in the Train.py file. Then run the following script to test the trained model:

python Train.py

Test

You should change the path to yours in the Test.py file. Then run the following script to test the trained model:

python Test.py

Notes

  1. Send e-mail to [email protected] if you have critical issues to be addressed.
  2. Please note that there exists the slight gap in the final version due to errors caused by different testing devices and environments.
  3. Because the synthetic dataset is not realistic enough, the trained models may not work well on real hazy images.

Acknowledgment

This code is based on the Restormer. The real-world dataset RRSD300 is collected from RSHazeNet. Thanks for their awesome work.

rsdformer's People

Contributors

mingtian99 avatar

Stargazers

 avatar  avatar An-zhi WANG avatar Yufeng He avatar  avatar  avatar  avatar Hailong Ning avatar  avatar

Watchers

 avatar

Forkers

yws2017 ip-dehaze

rsdformer's Issues

train

Hello, your paper has been accepted. Could you please upload the training code? Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.