-
Notifications
You must be signed in to change notification settings - Fork 422
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
Future proof LPIPs metric #1575
Conversation
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.
Approved pending addition of license notice (see comment).
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.
Some suggestions to the copied code.
Co-authored-by: Daniel Stancl <46073029+stancld@users.noreply.github.com>
for more information, see https://pre-commit.ci
…ing/metrics into lpips_future_proof
…ing/metrics into lpips_future_proof
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1575 +/- ##
=======================================
Coverage 87% 88%
=======================================
Files 240 241 +1
Lines 13510 13705 +195
=======================================
+ Hits 11809 12001 +192
- Misses 1701 1704 +3 |
What does this PR do?
Fixes #1546
Currently the LPIPs metric relies on the third party package https://github.com/richzhang/PerceptualSimilarity which is not maintained anymore. With the changes to torchvision on how models are loaded, this model will break in the future if we keep relying on the third party package (currently a warning is raised).
This PR copies in the relevant code and updates it to be compatible with torchvision 0.13 and higher.
I have included the required copyright for copying the code.
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 🙃