Skip to content
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

Adding fid calculation at the end of epochs (at train.py) #1192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OmriKaduri
Copy link

@OmriKaduri OmriKaduri commented Nov 19, 2020

Hi,

Thanks for a great repo for experimenting with CycleGAN and pix2pix!

I wanted to compute FID scores during training (between the validation set and the generated images on validation), so I added this as an option at train.py.

Let me know if any changes needed. I believe it might be useful for others.

@rickkk856
Copy link

While we still don't have the implemented metrics I prepared simple way to get FID after training using test data real images on domain B and generated images from domain B --> input domain is simply ignored

https://github.com/rickkk856/Batch_FID_PyTorchPix2Pix

@junyanz
Copy link
Owner

junyanz commented Sep 10, 2021

We cannot accept this PR at this time, due to two reasons:

  1. this PR (training time FID) may introduce too many changes to train.py. To add metrics to the training code, we need to add a metric abstract base class metric.py that can work for different metrics, implement an FID metric class metric_FID.py, and keep the training code simple.
  2. Pytorch-FID also has anti-aliasing issues. FID calculation is quite complicated as it also involves which reference dataset you are using and how many samples you are using. Please see the clean-fid project for more details.

It might be great to first add the FID evaluation code for pre-trained checkpoints (after training is done). We will see if we could do that in the near future.

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

Successfully merging this pull request may close these issues.

None yet

3 participants