genforce / mganprior

[CVPR 2020] Image Processing Using Multi-Code GAN Prior
https://genforce.github.io/mganprior/
288 stars 44 forks source link

The SR_loss has a error #5

Open Hanv2 opened 3 years ago

Hanv2 commented 3 years ago

the gt should not be downsampled

JasonGUTU commented 3 years ago

Thanks for your interest. According to Eq.(7) of the paper, The $I_{LR}$ is actually obtained by downsampling the ground truth. In other words, If we know the ground truth, we don't need to super-resolve the LR image anymore : )

QingLicsaggie commented 3 years ago

JasonGUTU: You answer is confusing. Then how to reproduce your paper results with the codes?

a878322125 commented 3 years ago

In super resolution ,Should I input a 64 low definition image, sr factor can't change if i want to input 32*32 image

JasonGUTU commented 3 years ago

Hi, @QingLicsaggie and @a878322125 . According to Eq.(7) of the paper, The optimization objective is set to be the likelihood of the SR problem that the super-resolved high-res image should have the same downsampled version with the ground-truth image's downsampled version, or the provided low-res image (which are regarded as a downsampled version of the ground truth high-res image). That is why the loss is calculated at the downsampled inversion images and ground truth.

a878322125 commented 3 years ago

@JasonGUTU Thank you for your explanation,target_images of code should input a 64*64 lr_image but the sr_image looks terrible.how to eproduce your paper results with the codes?

JasonGUTU commented 3 years ago

@JasonGUTU Thank you for your explanation,target_images of code should input a 64*64 lr_image but the sr_image looks terrible.how to eproduce your paper results with the codes?

Did you test the code using the aligned face images? If you input a 64*64 lr_image, then you don't need to downsample it when calculating the loss. You can send me emails for more details: jinjingu@link.cuhk.edu.cn