Git Product home page Git Product logo

ruas's Introduction

RUAS

this is the official code for the paper "Retinex-inspired Unrolling with Cooperative Prior Architecture Search for Low-light Image Enhancement"

Environment Preparing

python 3.6
pytorch 0.4.1

Testing

We provide different models which are trained from different datasets. lol is trained from LOL dataset. upe is trained from MIT5K dataset. dark is trained from DarkFace dataset. Finally, run test.py, the results will be saved in ./result/

python test.py 
--data_path           #The folder path of the picture you want to test
E:/test/
--model               #The checkpoint name
lol or upe or dark
--save_path            #The save path of the picture processed
./result/

Training

If you want to train your own model on a new dataset, run train.py. Only low light images are needed. The model will be saved in ./EXP/train/weights.pt

python train.py 

Searching

Please get train set and valid set ready, and run train_search.py. Due to the data you used is different from ours, it is reasonable that the searched architecture is different from ours.

python train_search.py 

Reference

If you find our work useful in your research please consider citing our paper:

@inproceedings{liu2021ruas,
title = {Retinex-inspired Unrolling with Cooperative Prior Architecture Search for Low-light Image Enhancement},
author = {Risheng, Liu and Long, Ma and Jiaao, Zhang and Xin, Fan and Zhongxuan, Luo},
booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year = {2021}
}

A great thanks to DARTS for providing the basis for this code.

ruas's People

Contributors

karelzhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ruas's Issues

Run time error

When i run train.py it appears:
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [3, 12, 1, 1]] is at version 51; expected version 50 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

Question about metric

Since the calculation of PSNR and SSIM needs a reference, I have a question:
Are these metrics calculated between the enhanced images with low-light images or with high-light images?

PSNR of my reproduced result on LOLdataset is different from your paper.

Hi, thanks for your work and release code. I run your code on LOLdataset and get different PSNR results from yours. In your paper:

截屏2021-04-23 下午4 18 38

I load your pretrained model ./ckpt/lol.pt and run test.py on eval15, BrighteningTrain, and our485 of LOLdataset, keeping all running arguments default. But the results of PSNR of these three folders are:

BrighteningTrain: 13.1343963,
our485: 14.1709691,
eval15: 16.4047298

I have tried to run train_search.py and train.py, then test with retrained network architecture and checkpoint file. But the results are:

BrighteningTrain: 12.6974954911497,
our485: 10.813183709390762,
eval15: 11.47653244449286

Could you please release your detailed training and testing arguments, and other details of running your code to help reproduce your results?

Questions about calculation of t_k in IEM module.

As your paper writes:

截屏2021-04-14 下午7 01 49

But your code in model.py is:

def forward(self, input_y, input_u, k):
  if k == 0:
      t_hat = self.max_operation(input_y)
  else:
      t_hat = self.max_operation(input_u) - 0.5 * (input_u - input_y)
  t = t_hat
  t = self.cell(t)
  t = self.activate(t)
  t = torch.clamp(t, 0.001, 1.0)
  u = torch.clamp(input_y / t, 0.0, 1.0)

  return u, t

where t = self.cell(t_hat) instead of t = t_hat - self.cell(t_hat) as your paper shows.

Which one is correct? Looking forward to your reply.

Running test.py successfully but unable to save enhanced images

I successfully ran test.py, but the saved image only had an enhanced image called .png. This image is the result of the model processing the last image. How can I save each processed enhanced image? (as per original file name)

The result printed after running test.py is:
processing .png
processing .png
processing .png
processing .png
processing .png
.......

Preprocessing images from MIT5k

Hello,

I have a question about the preprocessing made for MIT5k dataset. I would like to reproduce your results in the MIT5k dataset, but couldn't find in the paper which preprocessing nor how did you load the MIT5k data. Since it is raw, there are many possibilities. Could you explain, please? Also, if you could say which images did you selected for training and testing that would help me a lot!

I don't know if it is possible, but maybe you could provide the .png used for mit5k's training.

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.