pytorch / examples

A set of examples around pytorch in Vision, Text, Reinforcement Learning, etc.
https://pytorch.org/examples
BSD 3-Clause "New" or "Revised" License
22.02k stars 9.5k forks source link

[Super resolution] image Resizing &low psnr value result #326

Open ryujaehun opened 6 years ago

ryujaehun commented 6 years ago

https://github.com/pytorch/examples/blob/dcdabc22b305d2f2989c6f03570dfcd3919e8a5b/super_resolution/data.py#L41 I think resizing LANCZOS interpolation is better than default BILINEAR Resize(crop_size // upscale_factor,interpolation=Image.LANCZOS) How does downsampling work in a normal SR?

And In the Set5 dataset, I found that the psnr value is lower than the bicubic method. Why..?

chroneus commented 6 years ago

yes, LANCZOS is better and PSNR result wich For data augmentation which aims to different scenarios, even better to use random choice of resize method.

ryujaehun commented 6 years ago

I did downsampling using the LANCZOS method. But, in ESPCN,They used the Gaussian blur method. I can not be sure this is the reason, but the PSNR value is too low. In the Set5 dataset, I found that the psnr value is lower than the bicubic method.

zpkosmos commented 6 years ago

Excuse me, have you solve the problem of low psnr value result ? I tried to transform the 91 images training set into hdf5 file,and trained on it ,but still had 4 dB psnr loss than bicubic method, could you please give me some advises?

ryujaehun commented 6 years ago

Have you measured the PSNR of the entire RGB channel?

zpkosmos commented 6 years ago

Yes, but it still less than the bicubic method, I don't know what is the problem that make this method works worse than bicubic method, I can't sure whether the problem is in training process, SR process or the model.

ryujaehun commented 6 years ago

If so, just use the y channel to see the results.

zpkosmos commented 6 years ago

I mean that I have tried to compute the PSNR on both three channels and y channel, the y channels didn't perform better than it in bicubic, so that it couldn't perform better on three channels. By the way, have you made this project perform better than the bicubic method? What the number of epochs did you set for training to make it perform better than the bicubic?

Dae12-Han commented 3 years ago

I also have the same result. I got the espcn psnr value is lower than the bicubic method. Is there any reason why this pytorch/examples espcn code has lower psnr???