FSRNet
FSRNet copied to clipboard
how to generate LR in detail
hi @tyshiwo thanks for your work.
when i run the model using my own img, i found the performance was not good. the img i use is a result of resize the face img to (128, 128).
can you help me how to generate lr img in more detail?
thanks a lot
Hi,
which model are you using?
tks for your reply. I tried both CelebA models. I think for the helen model, it will be the same situation. but when i tried the test data you given, both CelebA and helen models can get pretty good results.
so i think there must something wrong of my test_img. for me, i just resize the face_img(detect by some face_detector) to size of (128, 128), and then fed them to the net. can you share how to generate LR images?
my email is: [email protected]
tks for your reply. I tried both CelebA models. I think for the helen model, it will be the same situation. but when i tried the test data you given, both CelebA and helen models can get pretty good results.
so i think there must something wrong of my test_img. for me, i just resize the face_img(detect by some face_detector) to size of (128, 128), and then fed them to the net. can you share how to generate LR images?
my email is: [email protected]
I have tried to use the HR data you given to generate the LR imgs, but there is a difference between yours and mine LR img, which leads to a bad results. so, what's your method or tools about this?
I think the difference comes from different frameworks we use. You can use torch to generate the LR image and see if the results are good or not.
I think the difference comes from different frameworks we use. You can use torch to generate the LR image and see if the results are good or not.
hi @tyshiwo i have tried to generate the LR image with the celeba_HR data you given. the resize torch command goes to:
- local img = image.load('201600.jpg')
- img_x8_downScale = image.scale(img, 16, 16, bicubic) --x8 downscale
- img_x8_LR = image.scale(img_x8_downScale, 128, 128, bicubic) --x8 upscale
there is still a difference between your LR img. when i fed this LR image to fsrnet, the sr results is normal, but is bad than the results of your test LR . where goes wrong? the lr img i generated is different form yours.
mine LR:
yours LR:
mine resutls:
using your lr img results:
there is almost 6db bader.
@tyshiwo would you take some time to help? thks! it seems there is a zoom in/out between ours lr img.
@nmber5 hello , can i ask you some question about the environment? i meet some error when i run the code. what is the version of your lua , torch ,cuda and cudnn?
i meet the error in the picture, do you know how to fix it? thanks a lot.
@nmber5 hello , can i ask you some question about the environment? i meet some error when i run the code. what is the version of your lua , torch ,cuda and cudnn?
i meet the error in the picture, do you know how to fix it? thanks a lot.
my env: ubuntu18.04, luda 5.2, torch 7 ,cuda7.0, cudnn4
when i try my own lr img, the results is bad。
@nmber5 hello , can i ask you some question about the environment? i meet some error when i run the code. what is the version of your lua , torch ,cuda and cudnn?
i meet the error in the picture, do you know how to fix it? thanks a lot.
my env: ubuntu18.04, luda 5.2, torch 7 ,cuda7.0, cudnn4
when i try my own lr img, the results is bad。
thanks, i will try it later.
@nmber5 Hi, I am facing the same issue here (the LR face generated by my code is different from the LR faces provided in the author's repo.
Did you find the solution? Would really appreciate it if you could share it!
Thanks
@nmber5 hello,i meet some error when i run the FSRNet code.Which packages have you installed for lua. This picture describe the error, do you know how to fix it? thanks a lot.
Hi @tyshiwo , I'm facing the same issue here. My own bicubic (PIL) image gets way worse results than yours. Could you please provide the code that generates LR images?
Hi guys, look here! You can create LR by using PIL(Image) like this:
from PIL import Image
img = Image.open(HR_IMAGE)
img_cubic = img.resize((16, 16), Image.BICUBIC)
img_cubic = img_cubic.resize((128, 128), Image.BICUBIC)
img_cubic.save(IMAGE_NAME, 'png')
Here are two points:
- use Image.BICUBIC to downsample and upsample
- save as 'png' instead of 'jpg'
@kabutohui I created LR data using the method you described, using a standard face image (original image) that I had on hand. The original image and the newly created LR were used as input and successfully processed. Thank you very much.
I have one question. If I only have a low-resolution image at hand, how can I check the effect of super-resolution?