stylegan2-pytorch
stylegan2-pytorch copied to clipboard
is there an easy way to generate 50k images for FID calculation? happy to add something if not
I looked around the code a bit and didn't see an easy way to generate a large number of images to do a FID calculation. I'm thinking something like: stylegan2-pytorch --generate 50000 --results_dir /output/path/for/imgs
Am I missing anything? Happy to create a PR if this sounds like a useful feature.
I think it would actually be really handy to have a command to just calculate a FID score? Something like:
stylegan2-pytorch --data /path/to/data --calculate_fid 50000
Which would generate 50k images and then calculate a FID score between the images in /path/to/data and the new images. Would be happy to work on this also if you would consider merging it.
@GetsEclectic that would be super useful! would happily accept a PR :)
@GetsEclectic I've seen a couple Pytorch libraries that do FID and Inception score calculations, would be ok with merging any of them that is reasonable and bug free
I've been using this one for a while and am happy with it so far: https://github.com/mseitzer/pytorch-fid
@GetsEclectic sounds good! I'm beginning work on https://github.com/lucidrains/unet-stylegan2 but will circle around to this if you don't get to it first :)
Just pushed up a WIP branch https://github.com/lucidrains/stylegan2-pytorch/pull/97
https://github.com/mseitzer/pytorch-fid is not set up as a Distutils package so i'm not sure what the best way to include it would be? I've just been cloning the repo and running it on the command line
@GetsEclectic ohh yea, that will be problematic, is there not a variant that is a pip installable package?
This is the only one I've found that is supposed to produce the same results as the TF implementation.
I'll see if I can submit a PR to make it a Distutils package.
https://github.com/mseitzer/pytorch-fid/pull/37
This is almost ready, just waiting for Max to upload pytorch-fid to pypi.
PR is in pretty good shape: https://github.com/lucidrains/stylegan2-pytorch/pull/113
I've been using this one for a while and am happy with it so far: https://github.com/mseitzer/pytorch-fid
Thank you for the response. I did some experiments with an augmented version of WGAN-GP, I found that the FID score is sensitive towards the number of images used. Scores increase for the number of images. I requets you to guide me in this regards. Regards Prabhav