-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
Calculation of FID metric made use of classification probabilities instead of feature vectors #3221
Comments
@JonathanFoo0523 thanks for the question, yes, FID docstring is incorrect saying that
Default value is 1000. I agree that default setup for We also provide a note in the docs: https://pytorch.org/ignite/generated/ignite.metrics.FID.html how to match results of pytorch_fid.
So, you are suggesting to do the following, which also makes sense: if num_features is None and feature_extractor is None:
num_features = 2048
feature_extractor = InceptionModel(return_features=True, device=device) I'm not against this change (+ adding all warnings about a breaking change) but I'd like to understand better the motivation. Do you compare ignite FID results to something else or see that the config with 2048+inception features works better than current default one? |
Based on my understanding, the calculation of fid should make use of feature vector(dim=2048) from the max pool layers of InceptionNet.
However, the
FID()
metric infid.py
is initiliased as below:The
InceptionModel
return prediction probabilities(dim=1000) ifreturn_features
is set to False by specification.update()
then make use of this thisfeature_extractor
to get the probabilities instead of feature vectors.I think
feature_extractor
should beInceptionModel(return_features=True, device=device)
instead?The text was updated successfully, but these errors were encountered: