Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inference of test images #29

Closed
devriesewouter89 opened this issue May 10, 2022 · 1 comment
Closed

inference of test images #29

devriesewouter89 opened this issue May 10, 2022 · 1 comment

Comments

@devriesewouter89
Copy link

devriesewouter89 commented May 10, 2022

Hi
I'm testing out your code and have two issues, a technical one and one of understanding:

  1. I'm running the code as described in readme.md, I've adapted the adobe5k_dpe/images_inference.txt to have a2803 as this image is in all folders. Yet now when executing I get an error:
    2022-05-10 08:31:03,062 INFO Performing inference with images in directory: ./adobe5k_dpe/ Traceback (most recent call last): File "main.py", line 351, in <module> main() File "main.py", line 127, in main inference_evaluator.evaluate(net, epoch=0) File "/content/CURL/metric.py", line 79, in evaluate net_output_img_example ,_= net(img) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/content/CURL/model.py", line 543, in forward feat = self.tednet(img) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/content/CURL/rgb_ted.py", line 299, in forward output_img= self.ted(img.float()) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/content/CURL/rgb_ted.py", line 99, in forward conv1 = self.dconv_down1(x) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/content/CURL/rgb_ted.py", line 189, in forward x = self.lrelu(self.conv1(self.refpad(x_in))) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 423, in forward return self._conv_forward(input, self.weight) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 420, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: Given groups=1, weight of size [16, 3, 3, 3], expected input[1, 4, 342, 514] to have 3 channels, but got 4 channels instead

I'm assuming this has got to do with an alpha channel being present, yet wonder if I'm correct as there are images you've used as well?

  1. Do you always need a groundtruth image PER input file? Or would it be possible to have a set of groundtruth-input files and some more input files, in order to have the same image enhancements on all input files?
@sjmoran
Copy link
Owner

sjmoran commented May 10, 2022

Thank you for your interest in CURL:

  1. Please see related issue here
  2. A groundtruth file is not specifically required for inference unless you want to compute quality metrics. You can edit the code to skip evaluation and perform inference on images that do not have an associated groundtruth image.

@sjmoran sjmoran closed this as completed May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants