jqtangust/EPCE-HDR

seems missing input in Curve_Estimation module

Closed this issue · 8 comments

hi, thank you so much for your excellent work and shared codes!

I'm trying to retrain your code following the guidance and find that the input "Curve_Estimation" model requires two inputs:

x--I think is the input LDR image, and a-- I don't know how to get it.

So when I try to retrain the code, it shows "TypeError: forward() missing 1 required positional argument: 'a'"

Thanks for your attention!

Can you try to fix this problem by the current sentence in network.py:

import torch
import logging

from models.epce_model.EPCE import PPVisionTransformer

logger = logging.getLogger('base')
input = torch.Tensor(1,3,256,256)

####################
# define network
####################
#### Generator
def define_G(opt,tb_logger):
    opt_net = opt['network_G']
    which_model = opt_net['which_model_G']

    if which_model == 'EPCE':
        netG = PPVisionTransformer()
    else:
        raise NotImplementedError('Generator model [{:s}] not recognized'.format(which_model))
    return netG

Thank you so much for your prompt reply. It really helps a lot!

and I think this code
self.fake_H,self.middlemap = self.netG(self.var_L)
also should be changed to
self.fake_H = self.netG(self.var_L)
Am I right?

You're right, thank you so much for your notice!

If you find any other bugs, please also let me know.

Of course, thx~

By the way, please also notice the metrics in metrics.py (offered by HDRUNET) may not be correct.
You can use the PSNR or SSIM from skimage to calculate the final result.

ok ok, thank you for your reminder, can you provide the pre-trained model for comparison?

Sorry for that, we do not plan to release the pre-trained model, pls train it by yourself.

If you want to use it for comparison, please notice that the input should follow the same data augmentation process for fairness.
Besides, pls note that our setting in this paper is not as same as other papers in HDR reconstruction (for our new dataset), but our training process is compatible.

get it. Thank you for your timely help!