Lotayou / Face-Renovation

Official repository of the paper "HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment".
https://arxiv.org/abs/2005.05005
GNU General Public License v3.0
284 stars 49 forks source link

Input images larger than 512x512? #36

Open sjscotti opened 3 years ago

sjscotti commented 3 years ago

Hi! I am very impressed by the capabilities of HiFaceGAN!
However, I tried to process an image larger than 512x512 in size - changing the values of crop_size and prd_resize in config_hifacegan.py to the size of my image - and it scaled the results back to 512x512. Is there something else I need to do to process larger images in the code? Thanks!

nikhilweee commented 3 years ago

@sjscotti Apart from changing dataset_mode to test_nogt (which I think you already did), maybe you can change num_upsampling_layers to more or most according to your need. But AFAIK none of the pretrained models support more than 1024. I might be wrong here. Maybe one of the owners can provide a better answer.

nikhilweee commented 3 years ago

Update: I found it. Change 512 to whatever resolution that you desire. https://github.com/Lotayou/Face-Renovation/blob/d7996608de9da325039ad71d6c73962941715d22/data/testnogt_dataset.py#L51 Also, do not forget to change crop_size accordingly in the options.

sjscotti commented 3 years ago

Thanks @nikhilweee !