Skip to content

Strech and Squish or Center crop and resize for FID???? #115

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

Open
yaramohamadi opened this issue Apr 26, 2025 · 0 comments
Open

Strech and Squish or Center crop and resize for FID???? #115

yaramohamadi opened this issue Apr 26, 2025 · 0 comments

Comments

@yaramohamadi
Copy link

I've also encounted this issue, my solution is to transform before dataloader:


    dataset = ImagePathDataset(files,

        transforms=TF.Compose([

            TF.Resize((299,299)),

            TF.ToTensor(),

    ]))

Originally posted by @septasset in #32

My reference dataset has images of varying aspect ratios, while my generated images are already 299 by 299. My concern is that doing a simple resizing like this is going to significantly change the statistics of the image by stretching it. Isnt a more correct way to first center crop the image by its minimum dimension and after that resize to 299 by 299????

This is really confusing, I would really appreciate any insights!

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

1 participant