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

Resizing of photos #44

Closed
dave7895 opened this issue Apr 11, 2020 · 4 comments
Closed

Resizing of photos #44

dave7895 opened this issue Apr 11, 2020 · 4 comments

Comments

@dave7895
Copy link

What happens to non-square photos? Are they cut off at the sides where they are longer, are they resized without respect to aspect ratio or is it conserved by adding black/white bars?

@dancrew32
Copy link

Think this is the image augmentation part of the pipeline:
https://github.com/lucidrains/stylegan2-pytorch/blob/master/stylegan2_pytorch/stylegan2_pytorch.py#L132-L133

Should the resize take place before the center crop? This order seems like it might cause output distortion.

Anywho, it appears all images that are trained on are guaranteed to be squares of your --image_size command line argument.

@dave7895
Copy link
Author

Thanks for the lines in the code. I think understand now what is happening. First the image is downscaled with the shorter side being as long as the --image_size flag, then the center is cropped, so the sides, where the picture is longer, are dropped. Am I correct or seeing this wrong?

@lukemelas
Copy link

Yes, that is correct.

@dave7895
Copy link
Author

Ok. Thanks for the clarification.

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

3 participants