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

Feature Extraction Losses #20839

Open
tristan-deep opened this issue Feb 1, 2025 · 0 comments
Open

Feature Extraction Losses #20839

tristan-deep opened this issue Feb 1, 2025 · 0 comments
Assignees
Labels
type:feature The user is asking for a new feature.

Comments

@tristan-deep
Copy link

tristan-deep commented Feb 1, 2025

Current losses supported by Keras are documented here. They include probabilistic, regression and hinge losses. Something that would be nice to add are feature extraction losses, such as LPIPS or FID (afaik these are not included in Keras). Alternatively these could be added to the metrics.

As a starter I have a working Keras implementation of the LPIPS loss. It relies on:

vgg16 = keras.applications.vgg16.VGG16(include_top=False, weights="imagenet")

with some additional layers and it produces the exact same values as the original lpips package (of the authors) as well as the torch metrics implementation.

I can make a PR for adding LPIPS if useful, however I need some pointers on how to host the weights (currently I have them on Hugging Face.

EDIT: see this #20844 for the PR.

@dhantule dhantule added the type:feature The user is asking for a new feature. label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants