Giter Site home page Giter Site logo

learning-to-see-in-the-dark's People

Contributors

cchen156 avatar imkuang avatar jason-cooke avatar kkruups avatar prabodhw96 avatar timgates42 avatar woj-i 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  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

learning-to-see-in-the-dark's Issues

apply whitebalance before feed into network

@cchen156 Hi, congrats first. In your training settings now, you aim to learn white balance within the network. Have you tried to apply white balance on input(those short exposure images) before feeding them into networks? If so, how does the result look like? THX!

[Enhancement] Add input image to the result

Hi, thanks for your great work.
This issue is just a suggestion of possible enhancement.
When testing the model, currently the output images are ground truth, the output from the neural network, and the input scaled up to the same mean as ground truth.

My suggestion is to add

scipy.misc.toimage(input_full[0,:,:,:]*255,  high=255, low=0, cmin=0, cmax=255).save(result_dir + 'final/%5d_00_%d_in.png'%(test_id,ratio))

to output the initial input image, to show how unusable the original photo is.

Python 3 support

I noticed that the README suggests it needs Python 2.7 but from looking at the libraries, nothing jumps out that would be dependent on 2.7, so I'd have expected it to run with 3.

Is it simply that 2.7 is what you happened to develop / test with, or is there something in your code that specifically needs 2.7?

can't download data

why can not i download the data?
The website always return:
Bad Request
Error 400

misalignment problem in the dataset

A question in the test_Sony.py is that, the scipy.io is really slow and cv2.imwrite is really fast. In the 8-bit saving way, do this two methods inference the finnaly PSNR & SSIM?

About PSNR

Hi @cchen156 i test psnr of ur model on test samples 1-49 in ur test_list.txt , and the psnr is ~32dB ,is that the same with urs ? i didnt change any of ur codes
My PSNR Calculation :
PSNR(img1,img2):
mse = np.mean((img1 - img2)^2)
return 10*np.log10(255^2 / mse);

Questions regarding to the PSNR/SSIM results

Hi @cchen156 ,

This work is very exciting. But I have a question about the quantitative results reported in the paper Table3.

I downloaded the source code and trained model, and tested Sony dataset. I generate GT by Rawpy and apply Gamma transfer after it, since you apply Gamma transfer on the output of the network in your test code. I found that the results looks fine, but the average PSNR/SSIM in the testset is 25.44/0.713, which is quite lower than 28.88/0.787 reported in Table3 in your paper.

If I have made some mistake? How can I get the reported results.

Thanks,
Wenbo

The comparison with HDRnet

Hi,
Thanks for sharing this work and the result is awesome ! @cchen156
I find comparison with hdrnet in the project page , so are you using HDRnet prettrained model from @mgharbi 's repo or you trained the comparison model youself?

I want to reproduce the comparison but seems no night related pretrained model is found for hdrnet, would you like to share the comparison pretrained model ? Thanks

Result of sony

I downloaded the sony data of 22 GB, the training and testing programs were executed, the folder named 'result_sony' is created, with some files in it, but those files are not executable and there were no images to be seen, can you please tell me that was result was expected once the program is executed completely.

How about training with 8-bit jpg image?

I just tried to train Sony dataset after converting the raw data into jpg image and found the result quite terrible. So are there any tricks when training 8bit data?
P.S.:
The channel number of input is 12, which results from packing each channel of rgb into four.

Trained model (for iPhone)

Amazing results, congrats!

Is it possible to download from somewhere the pre-trained model?

Thanks a lot!

The gpu memory is occupied when I run the train_Sony.py

The gpu memory is occupied when I run the train_Sony.py, so I set

tfconfig = tf.ConfigProto(allow_soft_placement=True) tfconfig.gpu_options.allow_growth=True sess = tf.Session(config=tfconfig)

But there is still the question...?

how to export the raw data of iphone?

GREAT WORK!

There's a certain app you mentioned in your paper, which can set parameters and export raw data.
Could you please tell me what's the name of the app?

I only know we can access YUV data through Apple's API.

Thanks~!

ratio multiplication

@kkruups @prabodhw96 @cchen156 Hi, congrats for your work. In your paper and code, during training, input and corresponding ground truth are first scaled between [0-1], and then input are scaled by ratio but the ground truth is still between [0-1]. Have you tried not to scale input by ratio and keep input and gt both in range [0-1] to train the network? Will it get better result and what's your opinion? THX!

Any hint for running on other camera raw (nikon,canon)

Hi!
I was able to run the examples for Sony raw data and the results are amazing.
I would like to experiment with Canon and Nikon raws but with Canon's raws the model seems to never converge. I am able to run it but i don't get any output. I modified the test_Sony file changing the ARW extension in CR2 (Canon's raw). Any advice?

Thank you!

freeze model

Can you get the inference freeze.pb file for your model?
what is your input node name ? output node name?

Training time

How long did the training on Titan X take? What was the final loss?

Any script for downloading Sony 12GB?

Hi Chen,

Thanks for your code, it is very useful!

I just wonder could you please provide the script for downloading Sony 12GB? It will help me a lot!

Thanks,

comparison between output of SID(see in the dark) and photoshop

I tried to compare the output generated by SID (O-sid) and photoshop (O-ps, with all auto from DNG to PNG), and according to what I saw:
1/ when the light is extremely low, O-sid is better than O-ps.
2/ but when the light is low and not extremely, O-ps is better than O-sid.

Also, O-sid loses quite a few texture compared to O-ps.
I wonder is this as expected?

train_Sony.py refer to the wrong dir

I think that train_Sony.py at line 129

allfolders = glob.glob('./result/*0')

and train_Sony.py at line 136

if os.path.isdir("result/%04d" % epoch):

are wrong.

The correct programs are

allfolders = glob.glob(result_dir + '*0')
if os.path.isdir(result_dir + "%04d" % epoch):

, right?

error in test_Sony.py

after download and extract raw Sony data in dir dataset/Sony.
run test_Sony.py
got error at line 151:
im = raw.postprocess(use_camera_wb=True, half_size=False, no_auto_bright=True, output_bps=16)

rawpy._rawpy.LibRawFatalError: b'Unsufficient memory'
could you have met this?
Appreciate for answer.

Pnsr and SSIM

Hello,@cchen156,I used the cpkt file you provided to test PNSR and SSIM, but the measured value is still lower than the original text, PNSR=28.639, SSIM=0.7682, is it different from the method I used to test pnsr and ssim? Can you provide the method or code for testing pnsr and ssim?

16bit bayer filter

  1. Can I use a Sony network model for a 16bit bayer filter?
  2. Is it possible to share iphone 6s raw images(dng format) in paper?

TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

What`s this probably mean?Here is the log:

Traceback (most recent call last):
File "test_Sony.py", line 117, in
out_image = network(in_image)
File "test_Sony.py", line 76, in network
up6 = upsample_and_concat(conv5, conv4, 256, 512)
File "test_Sony.py", line 50, in upsample_and_concat
deconv_output = tf.concat([deconv, x2], 3)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1075, in concat
dtype=dtypes.int32).get_shape(
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 669, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

Why the batch_size is 1?

I don't understand why you set the batch_size=1, i.e., only 1 picture will be trained in one iteration. Have you ever tried other batch_sizes?

Pedestrian detection in low light

Hi, I am work on the project which can detect and track pedestrian in low light or night. Then how can I use your model for my dataset?

Why psnr values differ so much when input Sony and Fuji rgb datasets

It's hard to ignore that in your paper Table 3, the psnr of Sony rgb input is 17.4 while another psnr is 25.11. I couldn't understand why they differ so much when both are rgb images. I mean,if input rgb images, they must have gone through the same process before put into the network.
And would you mind to explain how you convert your raw datasets to rgb images, and how to understand this difference?

The quantization

Hi,

Thanks for your novel work. I have some questions. I noticed that you restrict the value of ground truth image around 0 to 1, then force the model to generate output image which is also around 0 to 1. I am confused that why not just use the original ground truth image as the label and produce the output image directly without multiplying 255. Is there any difference between these two ways? Could you please help answer this question?

Thanks,

About rgb training

paper has sRGB input comparision, I modify the last two level conv10(12 channel ) to output 3channel for the rgb input image generated by rawpy.
the training loss is down to 0.025, the result is not bad, but some image is not real. is this correct way?

Could you provide training test data set within 2G.

Hello,thank you for your help.Because my computer configuration is too low, RAM is only 4G, gpu memory 2G, although you provide sonny(12G) data set, but still a bit big for me and I can't download it .so could you provide training test data set within 2G. I just want to use a small amount of data to test the model.
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.