Git Product home page Git Product logo

hdrcnn's People

Contributors

gabrieleilertsen 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

hdrcnn's Issues

How to show HDR images on the HDR monitor

Hi,

Thank you so much for your impressive work!

Here I have a question about how to show the HDR image on the HDR monitor. We can use the VCL player to show HDR video on the monitor, but not sure which software can show the proper HDR images? Could you give me some ideas about the settings in your user study? Thanks a lot!

Best regards,
YLiu

encounter a problem while train with real hdr data

Hi again @gabrieleilertsen
I am working on a pytorch implementation of your hdrcnn. I follow your instructions in the paper, which is load a pretrained vgg_places365 model and then train the network with places365 dataset. The result is fine. As shown below

Input
input

Output
predict

However, When I load the pretrained model and train with real hdr data, unexpectedly, the result was degraded. Here is a 1-million-steps result.
predict

Do you have such phenomenon when train with real hdr data?

Issues to run hdrcnn_predict.py

Hi, @gabrieleilertsen:

Hope this message finds you well. I am trying to run hdrcnn_predict.py, but had a hard time to get it working with Tensorflow 2.0 (stuck at line 112, net = network.model(x)).

If possible, could you help to share the version# of the packages you used? like Python, Tensor, Tensorflowlayer.

thanks

Luke

Question about the format of the output?

Thanks for sharing your great work.
Is the format of the generated HDR in the light domain or perceptual domain? is it in BT 2020?
I used the network to get the HDR image in .exr format. The output values are very small for example the maximum value that I got was 38 for one of my images. Also, I tested the ground truth images provided on the hdrcnn's github page and the maximum value was 26 for one of the exr images and simialry for the other ground truth exr images the values were less than 100. Could you please let me know if the output of this network is an absolute HDR value and can be display as it is? If not and it is a normalized version of the actual values, how can I convert it to the absolute HDR value in the light domain or perceptual domain so that I can show it on an HDR display?

The file type of image data

Hi. I have a quick question. What is the file type (HDR, EXR, PNG, JPG, etc) of the input images for this project? The file type of the images that go into the virtual camera? Correct me if I am wrong, I understand that Virtual Camera creates augmented and LDR images from HDR image. My question is, what is the file type of this HDR image? Is it .HDR or .EXR or .JPG?

Also if you can outline the file types of the image at all the stages of the pipeline will also be very helpful.

preprocess of training data

Hi,
Thanks for your impressive job!

I have downloaded some training data with your provided dataset list(Thanks a again, that save me a lot of time), some are .exr files, and the other are .hdr files.

Accidentally I found that the max value of these files are different: some seem like they have been normalized(value in [0, 1]), and some haven't(value in [0, hundreds]).

But there is not normalize for these files in virtualcamera because they all are in 32FC3 format.

So, should I normalize them into [0, 1] before processed by virtualcamera?

Problem of tensorflow-gpu and OpenEXR version

I have problems with the versions of tensorflow-gpu and OpenEXR.
Please tell me the versions you are using.

I'm trying hdrcnn_train.py with
CUDA 10.1
tensorflow-gpu 1.14.0
OpenEXR 1.3.2
tensorlayer 1.11.0,
but it didn't work.

Thanks!

Training HDR image dataset

HI gabrieleilertsen, it is excited to discover your perfect reconstruction. I want to train the same model using the your training codes and datasets mentioned in paper. But I haven't got the idea how to create training data. Paper describes that there is a total of 1121 HDR images and 67 HDR video sequences, and finally got ∼ 3700 HDR images,I wonder how can I get this 3700 HDR images dataset? is there scripts to use or where can i download straightforwardly. Thanks

how to extract frame from HDR video

hi, thanks for sharing your outstanding work!

now I'm going to train a model to perform reconstruction from SDR video to HDR video. I've got some HDR10+ video, could you please tell me how to extract frame from it losslessly? You mentioned that use every 10th frame in the video, I wonder how you made it?

Question about loss function

Hi.
I'm reading the paper and can't understand some part of loss function.
So I have questions about loss function code.

(1) Why didn't you add eps?
y_lum_lin = tf.nn.conv2d(tf.exp(y)-eps, lum_kernel, [1, 1, 1, 1], padding='SAME')

(2) Why did you tf.log twice to y_lum?
y_lum_ = tf.log(y_lum_lin_ + eps)
y_lum = tf.log(y_lum_lin + eps)
x_lum = tf.log(x_lum_lin + eps)

The value range of HDR image in ground truth

Hi, I find that the value range of the HDR image in ground truth set is seem no like absolute lumination in real world because the max value of the img_0001.exr is only 14.625. What is it mean and what is the unit of the value?

The ground trurh is from this

Thanks!

Using the encoder for anomaly detection

Hi,

I have run your model on multiple different images and it has given me perfect reconstruction every time. This led me to believe that the encoder model can be used directly for anomaly detection.

Is it possible for me to acquire the encoder weights for me to test this hypothesis?
Additionally, how should I modify your current codes with respect to the shape of the input/output and the exact line of codes that will require modification, etc?

Please let me know if you have any other ideas/hypothesis.

Requirements file?

Is there any possibility of a requirements.txt file (non gpu tensor flow)

I'm trying every conceivable combination of 1.x tensorflow, tensorlayer, wrapt and numpy etc but cannot get pip to find a working package version combination between them all. Python3.6 and 3.7 both failing. If there's a working requirements.txt file that could be generated, that would be great!!

pip install OpenEXR cannot be installed.

I'm sorry to bother you.
I am very aware that this is not the kind of question I should be asking you.
I can't install the "pip install OpenEXR" that prepares me to run your program.
I get an error like this.
If you know how to solve this problem, I would appreciate it if you could let me know.

Measure the reconstruction and the ground truth using HDR-VDP-2.2

Hi @gabrieleilertsen
Can those reconstructed exr files directly compare with the ground truth exr files using HDR-VDP?
I am trying to directly measure the reconstruction as followed

ref = hdrread('the exr ground truth in the provided testset')
tst = hdrread('your reconstruction exr file')
hdrvdp(tst,ref,'rgb-bt.709',30)

but the average Q score is much greater than it reported in ExpandNet(59 vs 41), I am not sure the result is right consider such a big difference. Or, should I calibrate those exr file in absolute luminance BEFORE measuring them? like
pfsin relative.exr | pfstmo_mantiuk08 -e 1 -d l=4000:b=0.01:a=0 | pfsdisplayfunction -d l=4000:b=0.01:a=0 -l | pfsout absolute.exr

Illegal instruction: 4 error

I'm very interested in testing this out, but I am getting "Illegal instruction: 4" error without traceback when I try to run the script.

I've seen similar errors listed in search results that indicate a problem with Tensorflow. Do you have a recommendation for which versions of the dependencies to have installed?

I'm working on a Mac with NVIDIA egpu so it's possible that is part of the problem.

I've tried it with Tensorflow version 1.1.0 (the last officially supported GPU version on Mac) as well as the CPU version of 1.6.

Thanks for your work on the project. LDR to HDR is a capability I've been hoping for.

Failed writing EXR

Sorry to bother.
I find a question when I run this code. I can find 'Reading' is done, 'Inference' is done, but there is a warning for 'writing':
Warning! "Failed writing EXR: module 'OpenEXR' has no attribute 'Header'"
Thus, I cannot get the HDR result.
Could you please tell me how to fix this problem?

how about video reconstruction

Hi,

did you try this method to reconstruct a HDR video from a LDR video? Is it possible? thanks.

one thing is that for the typical video revolutions such as 720p (1280720) and 1080p (19201080), the size is not multiple of 32, there might be issue for the image resize.

network model depends on the input size

Hi,

i'm trying to use this method in a c program which invokes tensorflow C API, so my way is to first save the network model in python program:
graph = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ["y"])
tf.train.write_graph(graph, '.', 'graph.pb', as_text=False)

But, the saved network model depends on the size of the input image, due to the following code which requires output_shape. It means we have to prepare a model file (130M+) for each possible input size. IMHO, both conv and deconv are not depend on the size of the input image.

network = tl.layers.DeConv2dLayer(input_layer,
                            shape = [filter_size, filter_size, num_out_channels, num_in_channels],
                            output_shape = [sz[0], sz[1]*scale, sz[2]*scale, num_out_channels],
                            strides=[1, scale, scale, 1],
                            W_init=init_matrix,
                            padding='SAME',
                            act=tf.identity,
                            name=str)

Is there another API to be choosen? or we need to ask tensorflow to introduce a new API without output_shape but (sz[0], scale, num_out_channles)? thanks

10bit HDR

Hi,

to reconstruct the image and then show it on a 10bit display, what should I do based on the model output (float value).

for example:
y_gamma = np.power(np.maximum(y_predict, 0.0), ??); // does the gamma correction needed?
out = y_gamma / 1024.0f; // 1024 = 2^10
out = (out > 1024.0f ) ? 1024.0f : out;
final_output (with data type 10bit int) = out;

thanks

cv2.randn takes in an array of mean and standard-deviations

cv::randn(noise, 0, P->noise[0] + sc*(P->noise[1]-P->noise[0]));

Hi Gabriel,

I notice that your virtual camera uses the OpenCV randn function. In a Python port of the camera I notice that noise is only added in one channel due to the nature of the function. I believe this is unintentional and that you mean to add noise equally (or not) across all channels, instead of only to the first channel.

See: http://answers.opencv.org/question/79758/how-to-add-gaussian-noise-in-all-channels-of-an-image-with-randn/

Error

Every time I try to run the program I geht this error:

Traceback (most recent call last):
File "hdrcnn_predict.py", line 65, in
FLAGS = tf.flags.FLAGS
AttributeError: module 'tensorflow' has no attribute 'flags'

Not getting hdr image

First image is getting dark and then it applying gamma filter on image.But on some image its not performing well.Please resolve.
Thanks

Training a new CNN weights?

Hey there,

Is any code for training new CNN weights available? I can't find any documentation or relevant parameters. With the resent release of Googles HDR+ image set, I was hoping that I could possibly train my own weights to get more accurate reconstruction.

Thanks!

failed compile the virtual camera application

Hi,

Thanks for your impressive job! It works as good as shown in the paper wih my own images.

But now I want to train the net and suffering errors when executing "gcc -Wall -lm -lstdc++ -lopencv_core -lopencv_imgproc -lopencv_imgcodecs virtualcamera.cpp -o virtualcamera"

The error shown is that"virtualcamera.cpp:314:57: error: no match for ‘operator+’ (operand types are ‘cv::Mat’ and ‘cv::Vec<double, 4>’)
host_roi = host_roi.mul(1.0 / (host_roi + sigmoid_a*Scalar(1,1,1)));
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
"
Do you have any idea, or could you please tell me the versions of gcc and opencv you are using? Thanks in advance!

network.py Line 247 error

network.py Line 247 error ,need delete labels:
network = tl.layers.ConcatLayer([input_layer,skip_layer], 3, '%s/skip_connection'%str)

Traceback (most recent call last):
File "hdrcnn_predict.py", line 112, in
net = network.model(x)
File "/home/ubuntu/hdrcnn/hdrcnn/network.py", line 63, in model
network = decoder(network, skip_layers, batch_size, is_training)
File "/home/ubuntu/hdrcnn/hdrcnn/network.py", line 144, in decoder
network = skip_connection_layer(network, skip_layers[5], 'decoder/h2/fuse_skip_connection', is_training)
File "/home/ubuntu/hdrcnn/hdrcnn/network.py", line 247, in skip_connection_layer
network = tl.layers.ConcatLayer(layer = [input_layer,skip_layer], concat_dim=3, name ='%s/skip_connection'%str)
TypeError: init() got an unexpected keyword argument 'layer'

pip install openexr failing to build with python 3.8.6 on windows

Hello,

When I try to install openexr on my windows machine through pip, I see the following error message:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>pip install openexr
Collecting openexr
  Using cached OpenEXR-1.3.2.tar.gz (10 kB)
Building wheels for collected packages: openexr
  Building wheel for openexr (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\natevm\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\natevm\\AppData\\Local\\Temp\\pip-install-7y391j0o\\openexr\\setup.py'"'"'; __file__='"'"'C:\\Users\\natevm\\AppData\\Local\\Temp\\pip-install-7y391j0o\\openexr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\natevm\AppData\Local\Temp\pip-wheel-krn6ty93'
       cwd: C:\Users\natevm\AppData\Local\Temp\pip-install-7y391j0o\openexr\
  Complete output (15 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.8
  copying Imath.py -> build\lib.win32-3.8
  running build_ext
  building 'OpenEXR' extension
  creating build\temp.win32-3.8
  creating build\temp.win32-3.8\Release
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -Ic:\users\natevm\appdata\local\programs\python\python38\include -Ic:\users\natevm\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /TpOpenEXR.cpp /Fobuild\temp.win32-3.8\Release\OpenEXR.obj -g -DVERSION="1.3.2"
  cl : Command line warning D9002 : ignoring unknown option '-g'
  OpenEXR.cpp
  OpenEXR.cpp(36): fatal error C1083: Cannot open include file: 'ImathBox.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for openexr
  Running setup.py clean for openexr
Failed to build openexr
DEPRECATION: Could not build wheels for openexr which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: openexr
    Running setup.py install for openexr ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\natevm\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\natevm\\AppData\\Local\\Temp\\pip-install-7y391j0o\\openexr\\setup.py'"'"'; __file__='"'"'C:\\Users\\natevm\\AppData\\Local\\Temp\\pip-install-7y391j0o\\openexr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\natevm\AppData\Local\Temp\pip-record-yuone7l0\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\natevm\appdata\local\programs\python\python38\Include\openexr'
         cwd: C:\Users\natevm\AppData\Local\Temp\pip-install-7y391j0o\openexr\
    Complete output (15 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.8
    copying Imath.py -> build\lib.win32-3.8
    running build_ext
    building 'OpenEXR' extension
    creating build\temp.win32-3.8
    creating build\temp.win32-3.8\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -Ic:\users\natevm\appdata\local\programs\python\python38\include -Ic:\users\natevm\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /TpOpenEXR.cpp /Fobuild\temp.win32-3.8\Release\OpenEXR.obj -g -DVERSION="1.3.2"
    cl : Command line warning D9002 : ignoring unknown option '-g'
    OpenEXR.cpp
    OpenEXR.cpp(36): fatal error C1083: Cannot open include file: 'ImathBox.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\natevm\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\natevm\\AppData\\Local\\Temp\\pip-install-7y391j0o\\openexr\\setup.py'"'"'; __file__='"'"'C:\\Users\\natevm\\AppData\\Local\\Temp\\pip-install-7y391j0o\\openexr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\natevm\AppData\Local\Temp\pip-record-yuone7l0\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\natevm\appdata\local\programs\python\python38\Include\openexr' Check the logs for full command output.
WARNING: You are using pip version 20.2.1; however, version 20.2.4 is available.
You should consider upgrading via the 'c:\users\natevm\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.

This seems related to issue #5, but their solution seems to be for ubuntu only.

convert sdr video to hdr10 video.

Hi, @gabrieleilertsen
I want to convert sdr video to hdr10 video using DL. I have some questions about datasets.

  • I extract hdr frame from hdr10 video using following command based ffmpeg.
ffmpeg -i input_hdr10.mkv -vf "select=not(mod(n\,50))" -vsync vfr -pix_fmt yuv420p10le -f rawvideo output.gbr

It means extracting one frame every 50 frames and saving to raw rgb format (maybe ffmpeg convert yuv420p10le to RGB). I extract sdr frames in the same way. Then I get thoundsands of sdr and hdr10 paired dataset and is it right regard them as the training data? or should i do eo2100 transfer function to make non-linear hdr10 to linear signals as the training data?
please give me some suggestions about convert sdr video to hdr10 video if possibly. e.g datasets or others. thanks.

  • How can you extract hdr video to .exr file ?

About studying your model on HDR reconstruction

We are a group of students from SJTU, and we want to do a HDR video reconstruction project based on your model. I do hope that you can give our permission to use your code. Of course, we do not have any commerical purpose.

As for the project, I am curious about your pretrain model weights. In your paper, you did provide a final model weights and vgg16 weights. Could you post your pretrain model weights so that we can compare results in different stages. Furthermore, what is the specific dateset used in your fine tune stage?
It would be helpful if you can help us!

Sinerely,
Jack

Loss function for Pytorch reimplementation

Hi I've been trying to implement the cost function on my network in pytorch.

Right now I'm having some problems with image dimension matching for cost_input_output computation.
QUESTION:

How many channels are the input Ldr Images suppose to have and how many for the HDR labels?

I'm using a similar method to 'load_trainig_pair' and I am getting this array shape for y:
label y shape : (13, 810701056, 0)

My specific problem is when computing the subtraction between y_log_ and x_log when getting cost_input_output.

Thanks on Advance !

HDR to LDR

Hi gabrieleilertsen, I am very interested in this article. My research content is the tonal mapping algorithm of HDR images. I want to try to use the training model in this article to achieve the conversion from HDR images to LDR images.Do you have any ideas or Suggestions?thank you.

How to get jpg images?

I wonder how exchange reconstruction HDR image from .exr to .jpg. Could you share your scripts? Thank you very much!!

About Video reconstruction.

Hi,
I am trying to reconstruct the videos. you provide the parameters about video reconstruction, but I have not found relevant code about regularization loss. Can you provide some train code about video reconstruction ? thanks.

Source is down

Hey,

I wanted to have a look at you Paper on hdrv.org/hdrcnn/, but it seems to be offline.

greetings

does this method support reconstruction from dark images

Hi,

I just found this great paper and start reading. Will try the code after the reading.

As far as I understand, the reconstruction is to build more details from both the bright image parts and the dark image parts. But in the second paragraph of INTRODUCTION of this paper, it only mentions the 'bright image parts, such as highlights, lost due to saturation of the camera sensor'. It gives me the sense that the image dark parts are not supported. It it right? thanks

hdrcnn_params_compr_regularized.npz cannot be download.

Hi,
I want to test your model for video reconstruction, but the link for hdrcnn_params_compr_regularized.npz is down. Would you provide new download links for hdrcnn_params_compr_regularized.npz or hdrcnn_params_regularized.npz ?
thanks!

how to extract frame from HDR video

Hi,

we have some HDR videos and plan to try to fine-train the model with these samples. but, HDR videos have different formats, and relative to metadata and curves. I do not know how to extract a frame from the video (with/without metadata curve), and which file format should be used for the extracted frame. Could you share it? thanks.

Issue with Jpeg dataset even with correct weights (hdrcnn_params_compr.npz)

Downloaded 96 image jpg dataset from http://hdrv.org/hdrcnn/ , section "Testset Reconstructions" i.e. link (http://hdrv.org/hdrcnn/material/sga17_testset.zip).
1)For testing, used jpg images in "testset\jpg\input", but these already seems darker. Is it correct folder to test with jpg datset ? Why all input jpg images already seem darker?

  1. When run for "testset\jpg\input\img_0001.jpg" with hdrcnn_params_compr.npz; in "out" folder I see 3 files: 000001_in.png, 000001_out.png and 000001_out.exr.
    Here, "000001_in.png" is much darker than original "testset\jpg\input\img_0001.jpg" which is probably expected, as I read your comment from other thread that these in and out jpg images are still LDR with "3 stops" reduced. However, I see "000001_out.png" almost same as "000001_in.png" and no visible difference at all and both are too dark. When debugged/looked in further, it seems as per script run log, there are NO saturated pixels detected! Copying script run log for reference below. Can you comment why it says (Saturation: 0.00%) ?? Btw - I checked other testimages out of 96 jpg images, behavior is similar for all! With png dataset, I could see saturation pixels were detected i.e. it was not 0%, but it seems to be the case when I run with jpg dataset! Can you please help explain this ? Request to suggest how to test on jpg dataset downloaded from above mentioned link?

===========
sample run log:

hdrcnn-master>python hdrcnn_predict.py --params hdrcnn_params_compr.npz --im_dir D:\HDR_ML\Dataset\data2_jpg_hdrcnn\testset\jpg\input\img_0001.jpg --width 1024 --height 768
←[95m
-------------------------------------------------------------------
←[0m←[95m HDR image reconstruction from a single exposure using deep CNNs

←[0m←[95m Prediction settings
←[0m←[95m -------------------
←[0m←[95m Input image directory/file: D:\HDR_ML\Dataset\data2_jpg_hdrcnn\testset\jpg\input\img_0001.jpg
←[0m←[95m Output directory: out
←[0m←[95m CNN weights: hdrcnn_params_compr.npz
←[0m←[95m Prediction resolution: 1024x768 pixels
←[0m←[95m -------------------------------------------------------------------

←[0mNetwork setup:
←[0mWARNING:tensorflow:From C:\anaconda3\envs\tf\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.fram
ework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-07-02 15:18:58.592733: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to
use: AVX AVX2
2019-07-02 15:18:58.600972: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 4. Tune using inter_op_
parallelism_threads for best performance.

Loading trained parameters from 'hdrcnn_params_compr.npz'...←[0m done
←[0m
Starting prediction...

←[0mFrame 0: 'D:\HDR_ML\Dataset\data2_jpg_hdrcnn\testset\jpg\input\img_0001.jpg'
Reading...←[0m done←[0m←[95m (Saturation: 0.00%)
←[0m Inference...←[0m done
←[0m Writing...←[0m done
←[0mDone!
←[0m

Error while installing OpenEXR

I tried installing OpenEXR on Mac inside conda env by

pip install OpenEXR

Here is the output

Collecting OpenEXR
  Using cached OpenEXR-1.3.0.tar.gz
Building wheels for collected packages: OpenEXR
  Running setup.py bdist_wheel for OpenEXR: started
  Running setup.py bdist_wheel for OpenEXR: finished with status 'error'
  Complete output from command /Users/siddharthdas/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/80/v1nwf70x2rz5srmzfnpc3pq40000gn/T/pip-build-gd8076fk/OpenEXR/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/80/v1nwf70x2rz5srmzfnpc3pq40000gn/T/tmpmh3ncqjjpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  copying Imath.py -> build/lib.macosx-10.7-x86_64-3.6
  running build_ext
  building 'OpenEXR' extension
  creating build/temp.macosx-10.7-x86_64-3.6
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/siddharthdas/anaconda3/include -arch x86_64 -I/Users/siddharthdas/anaconda3/include -arch x86_64 -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/Users/siddharthdas/anaconda3/include/python3.6m -c OpenEXR.cpp -o build/temp.macosx-10.7-x86_64-3.6/OpenEXR.o -g -DVERSION="1.3.0"
  OpenEXR.cpp:36:10: fatal error: 'ImathBox.h' file not found
  #include <ImathBox.h>
           ^~~~~~~~~~~~
  1 error generated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  Running setup.py clean for OpenEXR
Failed to build OpenEXR
Installing collected packages: OpenEXR
  Running setup.py install for OpenEXR: started
    Running setup.py install for OpenEXR: finished with status 'error'
    Complete output from command /Users/siddharthdas/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/80/v1nwf70x2rz5srmzfnpc3pq40000gn/T/pip-build-gd8076fk/OpenEXR/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/80/v1nwf70x2rz5srmzfnpc3pq40000gn/T/pip-4vp6zrn7-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.6
    copying Imath.py -> build/lib.macosx-10.7-x86_64-3.6
    running build_ext
    building 'OpenEXR' extension
    creating build/temp.macosx-10.7-x86_64-3.6
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/siddharthdas/anaconda3/include -arch x86_64 -I/Users/siddharthdas/anaconda3/include -arch x86_64 -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -I/Users/siddharthdas/anaconda3/include/python3.6m -c OpenEXR.cpp -o build/temp.macosx-10.7-x86_64-3.6/OpenEXR.o -g -DVERSION="1.3.0"
    OpenEXR.cpp:36:10: fatal error: 'ImathBox.h' file not found
    #include <ImathBox.h>
             ^~~~~~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

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.