-
Notifications
You must be signed in to change notification settings - Fork 413
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
Support for torch.float
weighted networks for FID and KID calculations.
#2483
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- support for float weighted custom networks - support for custom sized input imgs
furkan-celik
requested review from
SkafteNicki,
Borda,
justusschock and
stancld
as code owners
March 31, 2024 20:24
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2483 +/- ##
========================================
- Coverage 69% 38% -31%
========================================
Files 307 307
Lines 17404 17410 +6
========================================
- Hits 11989 6662 -5327
- Misses 5415 10748 +5333 |
Borda
reviewed
Apr 10, 2024
Borda
approved these changes
Apr 10, 2024
Borda
approved these changes
Apr 10, 2024
Borda
changed the title
Support for torch.float weighted networks for FID and KID calculations.
Support for Apr 12, 2024
torch.float
weighted networks for FID and KID calculations.
SkafteNicki
reviewed
Apr 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good :)
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
SkafteNicki
approved these changes
Apr 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
For evaluation of generated images in terms of how similar looking they are to the real images metrics FID is heavily used. However as pointed out in several papers, FID has some inherent flaws one of which is ImageNet InceptionV3 model is not suitable for all domains. Domains like medical MRI might be different enough to ImageNet that activation functions are not relevant to make FID comparison. For cases like this different domains use different variants of InceptionV3 model as feature extractor.
However, current implementation of FID and KID in torchmetrics only supports models with byteTensor weights as it is optimized for the tochmetrics' InceptionV3 model. In this PR I have given a bit more control to the developer so that it is possible to have better support for custom feature extractors with different dtypes and input sizes.
Details of this issue can be found in the following paper:
Liu, Shaohui, et al. "An improved evaluation framework for generative adversarial networks." arXiv preprint arXiv:1803.07474 (2018).
Fixes #<issue_number>
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃
📚 Documentation preview 📚: https://torchmetrics--2483.org.readthedocs.build/en/2483/