hubert0527 / COCO-GAN

COCO-GAN: Generation by Parts via Conditional Coordinating (ICCV 2019 oral)
https://hubert0527.github.io/COCO-GAN/
MIT License
268 stars 29 forks source link

About the fid_stat of Celeba128x128 aligned. #4

Closed yifanjiang19 closed 5 years ago

yifanjiang19 commented 5 years ago

Hi, Thanks for your novel work, I have some questions.

In the Table 1, the celeba 128 results are produced based on aligned images or cropped images? Would you ming providing the fid_stat file for celeba 128 aligned images? That would be so helpful to me.

Thanks so much!

hubert0527 commented 5 years ago

By the aligned images, you mean the raw images, right? For GANs training, we usually use cropped (cropped to 128x128) images for training.

You may simply change the preprocessing function image_loader to get the FID stats you wish at: https://github.com/hubert0527/COCO-GAN/blob/12b90e26e23214c2072c9701644e9724e052743c/fid_utils/precalc_fid_stats.py#L55

yifanjiang19 commented 5 years ago

Hi @hubert0527 , Thanks for your reply! You mean the 128x128 fid results on Table 1 is that of cropped 128x128 results? (By default the cropped images I mentioned are the images that only contain face without any background, like the Figure.3 in https://arxiv.org/pdf/1710.10196.pdf). And I also found another setting that also crop the image but still contain some background (the official provided dataset https://drive.google.com/drive/folders/0B7EVK8r0v71pTUZsaXdaSnZBZzg, see img_align_celeba.zip)

yifanjiang19 commented 5 years ago

I just found the implementation of progressive gan https://github.com/tkarras/progressive_growing_of_gans/blob/35d6c23c578bdf2be185d026c6b3d366c1518120/dataset_tool.py#L435. Is that the same as Table. 1 results?

hubert0527 commented 5 years ago

And I also found another setting that also crop the image but still contain some background (the official provided dataset...

The link you refer to is the raw CelebA dataset, everyone starts from there. Recent GANs use cropped images for some reasons. Just to name a few: (a) background has a higher variance and complex details that are harder to learn, (b) for many images in raw CelebA, they duplicate a huge region of pixels to make its shape rectangle, like the following one:

image

I just found the implementation of progressive gan... Is that the same as Table. 1 results?

The exact position seems slightly different, but the logic is the same. Here is ours: https://github.com/hubert0527/COCO-GAN/blob/12b90e26e23214c2072c9701644e9724e052743c/img_utils.py#L14

yifanjiang19 commented 5 years ago

Thanks so much!