Giter VIP home page Giter VIP logo

rlp's Introduction

Learning Rain Location Prior for Nighttime Deraining (ICCV2023)

Learning Rain Location Prior for Nighttime Deraining
Fan Zhang, Shaodi You, Yu Li, Ying Fu
ICCV 2023

framework

This repository contains the official implementation and experimental data of the ICCV2023 paper "Learning Rain Location Prior for Nighttime Deraining", by Fan Zhang, Shaodi You, Yu Li, Ying Fu.

Paper | Supp | Data

Update

  • 2023.12.08: Code release.
  • 2023.12.03: Initial release of experimental data.
  • 2023.08.10: Repo created.

To Do

  • Recollect misaligned data.
  • Code release.
  • Experimental data release.

Data Release

example

The experimental data used in the paper is now publicly available at Kaggle. It is based on GTAV-NightRain dataset and increase the difficulty by enlarging the rain density.

In this new version, we collected 5000 rainy images paired with 500 clean images for the training set, and 500/100 for the test set. Each clean image corresponds to 10/5 rainy images. The image resolution is 1920x1080.

Note

Please note that this is the very data used in the experiments.

However, after checking carefully, we find that there exist a few scenes with misalignments due to operation mistakes during collection. We filter out these scenes and there's about 0.5dB improvement in PSNR, which applys to all evaluated methods.

We plan to re-collect and update these misaligned scenes and provide the updated quantitative results later.

Requirements

  • Python 3.6.13
  • Pytorch 1.10.2
  • Cudatoolkit 11.3

You can refer to Uformer and MPRNet for detailed dependency list. Necessary list will be updated later.

Training

  • Download the Dataset on Kaggle or prepare your own training dataset, then modify the --train_dir to corresponding directory.
  • Train the model by simply run
bash train.sh

You can

  • Select the Derainig Module (DM) by --arch, currently supporting UNet and Uformer_T.
  • Enable the Rain Location Prior Module (RLP) by --use_rlp.
  • Enable the Rain Prior Injection Module (RPIM) using _use_rpim, which should be considered when RLP is used.
  • Change other parameters in options.py.

Evaluation

  • Prepare your test images or simply test on the downloaded data, by running
bash test.sh
  • Modify --input_dir to your /path/to/test/images and --result_dir for saving results.
  • Modify --weights to the model checkpoint you have.
  • Modify --model_name following the format of {DM}{_RLP}{_RPIM}, such as Uformer_T_RLP_RPIM in weights folder.

Metrics

To calculate PSNR and SSIM metrics, you can use the Matlab script

evaluate_PSNR_SSIM.m

or the Python version

python evaluate_PSNR_SSIM.py

The results produced by .py script is slightly different from the .m script.

Checkpoints

License

MIT license.

CC BY-NC-SA 4.0 for data.

Bibtex

If you find this repo useful, please give us a star and consider citing our papers:

@inproceedings{zhang2023learning,
  title={Learning Rain Location Prior for Nighttime Deraining},
  author={Zhang, Fan and You, Shaodi and Li, Yu and Fu, Ying},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={13148--13157},
  year={2023}
}

@article{zhang2022gtav,
  title={GTAV-NightRain: Photometric Realistic Large-scale Dataset for Night-time Rain Streak Removal},
  author={Zhang, Fan and You, Shaodi and Li, Yu and Fu, Ying},
  journal={arXiv preprint arXiv:2210.04708},
  year={2022}
}

Acknowledgement

The code is re-organized based on Uformer and MPRNet. Thanks for their great works!

rlp's People

Contributors

zkawfanx avatar

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.