pytorch-fid icon indicating copy to clipboard operation
pytorch-fid copied to clipboard

Resize Images at Read in (imread)

Open mh-nyris opened this issue 5 years ago • 5 comments

Hey there, I ran into problems as my images are of variable size (couldn't convert the list read-in to np.array). Does it make sense to consider resizing images in imread? Image.open(filename).resize((299, 299)) Best, Mike

mh-nyris avatar May 10 '20 20:05 mh-nyris

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(),
    ]))

septasset avatar Dec 03 '20 06:12 septasset

I observe that such resize operation would change the FID score significantly.

Newbeeer avatar Apr 22 '23 15:04 Newbeeer