Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input images larger than 512x512? #36

Open
sjscotti opened this issue Mar 6, 2021 · 3 comments
Open

Input images larger than 512x512? #36

sjscotti opened this issue Mar 6, 2021 · 3 comments

Comments

@sjscotti
Copy link

sjscotti commented Mar 6, 2021

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
Copy link

@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
Copy link

nikhilweee commented Mar 25, 2021

Update: I found it. Change 512 to whatever resolution that you desire.

image = cv2.resize(zero, (512,512), cv2.INTER_CUBIC)

Also, do not forget to change crop_size accordingly in the options.

@sjscotti
Copy link
Author

Thanks @nikhilweee !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants