ITADN

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

#115Openyaramohamadi 创建于 2025-04-26
Y
yaramohamadicommented
> 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](https://github.com/mseitzer/pytorch-fid/issues/32#issuecomment-737700944)_ 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!
0 条评论