Giter VIP home page Giter VIP logo

rlp's Introduction

Learning Rain Location Prior for Nighttime Deraining

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

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

Dataset

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 Deraining 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 is only considered when RLP is used.
  • Check other options in rlp/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, DM_RLP or DM_RLP_RPIM according to the model, such as Uformer_T_RLP_RPIM when DM = 'Uformer_T', is_RLP = True, is_RPIM = True.
  • Use --tile to enable tiling of large images for Uformer.

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 are slightly different from the .m script.

Checkpoints

Model DM RLP RPIM PSNR SSIM Checkpoint
UNet 36.63 0.9693 UNet.pth
UNet 37.08 0.9715 UNet_RLP.pth
UNet 37.28 0.9716 UNet_RLP_RPIM.pth
Uformer_T 37.45 0.9720 Uformer_T.pth
Uformer_T 37.95 0.9733 Uformer_T_RLP.pth
Uformer_T 38.44 0.9749 Uformer_T_RLP_RPIM.pth

Citation

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!

License

MIT license.

CC BY-NC-SA 4.0 for data.

rlp's People

Contributors

zkawfanx avatar

Stargazers

jmxiong avatar Jiarong Hong avatar  avatar  avatar  avatar  avatar  avatar  avatar Zeqiang Lai avatar llll avatar  avatar  avatar Austin avatar  avatar  avatar zsw avatar Xiaohui Liu avatar  avatar 爱可可-爱生活 avatar Dachun Kai avatar  avatar  avatar

Watchers

Howard H. Tang avatar  avatar

rlp's Issues

请求获取对比实验中其他模型的训练权重

您好!最近在复现代码的过程中,使用MPRNet训练您文章中提出的数据集,发现PSNR跟您提到的有些差距。如果可以的话可以分享一下对比实验其他模型的权重文件吗?谢谢!

Question about test

I use 4090 gpu to run the test. The training models of py Uformer_T_RLP_RPIM. PTH, but an error torch. Cuda. OutOfMemoryError: cuda out of memory. But I see that 3090 is used in your paper, why does this happen? I run a smaller picture is normal, but your original GTAV 500 test set will report an error, there are any parameters need to be modified? Looking forward to your recovery

Concerns about comparisons

Excellent work!

Would it be appropriate to consider comparing it with two-stage methods that incorporate low-light enhancement algorithms for nighttime scenes along with deraining?

实验数据相关

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.
请问下载链接的数据集包含这些错误场景吗?还有就是0.5db提升是指论文中表1的所有方法吗?

Derainig module咨询

老哥,你这deraining module里的UNet和Uformer都是源论文一样的代码么,如果把你提出的两个块不加单独训的话是不是可以得到UNet和Uformer的数据,你对比方法贴的UNet和Uformer的数据是不是这样训的呀?我搞了个1k的数据集训你的方法,70秒出一轮,训Uformer40秒,UNet14秒...是不是哪里有问题,还是说就是这么快?

训练流程咨询

你好,我试着训练你的代码,发现按照readme来loss一直是四十多降不下来,是我训练方法有问题吗?

cuda out of memory error

I am getting cuda out of memory error, while testing UNet_RLP_RPIM model you have given, when ruuning in collab. Can you suggest some methods to overcome it ? Also, what file directory we have to give to test the images(gt or rainy)?

对比方法咨询

老哥,我又来了,我想问下你的对比方法都是重新训的吗?是在你提供的kaggle上面的数据集上么?方便分享一下权重文件吗老哥,谢谢

When to release your code and re-rendering data

Congratulations for your awesome work accepted by ICCV 2023. I am very interested in your nighttime rain removal work, so when will you release your re-rendering GTA-nighttime dataset as well as the source codes ?

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.