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

No need to resize input image #22

Open
MasKogNavier opened this issue May 19, 2022 · 3 comments
Open

No need to resize input image #22

MasKogNavier opened this issue May 19, 2022 · 3 comments

Comments

@MasKogNavier
Copy link

MasKogNavier commented May 19, 2022

I tried issue #10 because I don't need to resize the input image, but it doesn't work.
And i tried commented out the PIL.resize part
ex) l.129 in ref_cufed_dataset.py
before:
img_in_lq = img_in_pil.resize((lq_w, lq_h), Image.BICUBIC)
after:
img_in_lq = img_in_pil#.resize((lq_w, lq_h), Image.BICUBIC)
I got below error.(input and ref image size are 128x128)

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 32 and 128 in dimension 2 at /opt/conda/conda-bld/pytorch_1579040055865/work/aten/src/THC/generic/THCTensorMath.cu:71
How do I use an input image of my own defined size(no need to resize image)?

@yumingj
Copy link
Owner

yumingj commented Jun 1, 2022

Hi, thanks for your interest in our work!

Can you have a look at the size of img_in_up? It should have the same size as img_ref_up.

@MasKogNavier
Copy link
Author

MasKogNavier commented Jun 1, 2022

Thank you for your reply.
With the current settings, I intend to super-resolution 128x128 input image (img_in_lr) to x4.
As a confirmation, if the output is 512x512, does it mean that 512x512 should be prepared for img_ref?

@yumingj
Copy link
Owner

yumingj commented Jun 7, 2022

Yes. In the current implementation, if the reference images are smaller than 512x512, we will do the padding operation to make the reference images have that resolution.

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