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

does the lpips work on grey images? #23

Closed
agniszczotka opened this issue May 10, 2019 · 4 comments
Closed

does the lpips work on grey images? #23

agniszczotka opened this issue May 10, 2019 · 4 comments

Comments

@agniszczotka
Copy link

Is this safe to use lpips for gray images? The code does not work for 1 channel images. The hack would be to use 3 identical channels yet I am not sure what would be the effect within the end-to-end calibrated solution on color images.

@richzhang
Copy link
Owner

I didn't test specifically on grayscale images, but it should still give some notion of distance.

@agniszczotka
Copy link
Author

thank you for the update

@agniszczotka agniszczotka changed the title does the lpips works on grey images? does the lpips work on grey images? May 10, 2019
@Aniket1998
Copy link

Facing the same issue myself. Need to use LPIPS (averaged over the number of frames) as a metric of Perceptual Similarity for the KTH Action Video Dataset (which is grayscale). Is replicating the single channels to 3 identical channels an acceptable way to obtain a similarity measure? Does there exist a better alternative?

@richzhang
Copy link
Owner

The most proper (but perhaps time-consuming) thing would be to retrain AlexNet to do ImageNet classification on grayscale images. This would be a 1-line change to this codebase (add a line in the data loader to force images to be grayscale). Then do a linear calibration steps with our perceptual judgments from the BAPPS dataset.

Replicating to 3 identical channels is a reasonable alternative.

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

No branches or pull requests

3 participants