SinGAN icon indicating copy to clipboard operation
SinGAN copied to clipboard

Question about super-resolution for upsampling height & width in varied scale

Open DYin65535 opened this issue 5 years ago • 2 comments

Hi,

I am just trying to do super-resolution on an image with only downsampling along the columns. The height is same as the HR image while the width is got squeezed. How could I change the code for that? Thank you so much!

DYin65535 avatar Feb 15 '20 06:02 DYin65535

You can try to use the function imresize_to_shape (At singan/imresize lines 55-61) Instead of imresize that uses a given scale factor, to down/up-sample the image only along the desired dimension. This should be done both in training and at inference time.

On Sat, Feb 15, 2020, 08:04 Dong Yin [email protected] wrote:

Hi,

I am just trying to do super-resolution on an image with only downsampling along the columns. The height is same as the HR image while the width is got squeezed. How could I change the code for that? Thank you so much!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tamarott/SinGAN/issues/82?email_source=notifications&email_token=AM5V37MJQIXRR5SRT4GY5QLRC6AXBA5CNFSM4KVVOZNKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INX6MIQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5V37J2WYXRD7JOXHBHFYLRC6AXBANCNFSM4KVVOZNA .

tamarott avatar Feb 16 '20 15:02 tamarott

Thanks for your advice! After I changed all 'imresize' into 'imresize_to_shape' now the code gets successfully run. But when I check the training results, it performs really bad. Compared to my previous test with images squeeze both in height and width which could produce reasonable results in the second scale, the results of images only squeeze in width are still meanless even after 14 scales.

I cannot run the required 18 scales completely because of my limited GPU memory but SinGAN seems failed in this situation. Is it a theoretical problem or I need further modification on the program?

Sincerely thanks for your time!

DYin65535 avatar Feb 17 '20 20:02 DYin65535