Learning-to-See-in-the-Dark
Learning-to-See-in-the-Dark copied to clipboard
Output is all black
I got the pretrain checkpoints and run test_Fuji All result output are just black. Verified in multiple setup. Is there any problem on the Pretrain model?
Also what is the purpose of those gt files under result? Seems they are from the long exposure images
Normally, you got black images because the pretrained model is not loaded correctly.
GT images are from long exposure raw data, used as reference.
Just realised I need to have those files : checkpoint, model.ckpt.index under the checkpoint folder Now I have it working . Thx!
@stephenlamis I have the same problem with . I used the Sony test data. But the output result is all black.could you please tell me . where is the correct pretrained model. Thank you very much.
follow the instructions clone the repository and simply run python download_models.py then the checkpoint will be updated to the right place.
My output is all black but the difference is that I am trying my own .RAF file taken with a Fuji camera with different exposures.
Any idea of why this could be happening? I am not getting this issue when testing the model with the dataset provided, so I believe it has not to do with the pretrained model loaded incorrectly.
I remembered there is some sort of filename convention to state the exposure time. This is being used as a parameter input (it's state in the paper that it's one of the external dependence value). Try to follow the naming convention from those testing sample.
@stephenlamis yes, there is, and I used exactly the same, that's why I am confused that the output is completely black...
How are you normalizing your photos? Do you know for sure their black level and bit depth is 2 ** 10 and 14 bits respectively?
@cardoso-neto I don't, how can I check it?
Read the image with rawpy
and check it.
>>> import rawpy
>>> pic = rawpy.imread('long/00001_00_10s.ARW')
>>> pic.black_level_per_channel
[512, 512, 512, 512]
>>> np.max(pic.raw_image)
16383
RawPy's documentation: https://letmaik.github.io/rawpy/api/rawpy.RawPy.html
Thank you very much @cardoso-neto. I have done what you suggested with an image of my own and why the black level per channel is [512, 512, 512, 512], when I do np.max(pic.raw_image)
I get 4095
instead of 16383
.
Does this have something to do with the fact of the model not being able to bright my image?
Perhaps. Try it out. That np.max
strategy to find out bit depth is not the best, but it often works. At least you figured out your black level. From there, I'd just try a few different bit depths, starting with the one you got (2 ** 12 - 1
).
And don't worry, you'll definitely know if you've got the correct one just by looking at the output image.
And by the way, yes that's got everything to do with your black image. You're normalizing the picture as if it were 14 bits and its black level were 1024 (assuming you're using the Fuji Dataset class). One can easily see that the input to the network will be all zeros. Try it out with the new values. It'll probably work now.
hello @anaquio , were you able to fix the max value issue? what was the strategy you followed? @cardoso-neto I am a novice in image processing and my question may be silly, but as far as I understand, np.max will give the value of the brightest pixel in the short exposed image. wouldn't this be too low as compared to the bit depth used in the camera (which always will be 2^14)? If so, is there any way to retireve the capturing bit-depth? Please correct me if wrong.
I am in China. I cannot download the pre-trained model from google linkone. Can some please help me to get the pre-trained model. thanks.