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

How to reproduce the data of LPIPS distance? #26

Closed
WorkingCC opened this issue Jun 24, 2018 · 10 comments
Closed

How to reproduce the data of LPIPS distance? #26

WorkingCC opened this issue Jun 24, 2018 · 10 comments

Comments

@WorkingCC
Copy link

Your work gets surprising results and I expect to reproduce the data of LPIPS distance that you list in Figure6. Given one input image, you sample 19 outputs. For every input(maps), do you calculate the LPIPS distance between the given image(maps) and corresponding 19 samples(satellite) ? After that, you sum those 19 groups of data and have a average? Is it the same to other 99 input images in your experiment ? I'm confused about this and looking forward to your reply, thank you!

@richzhang
Copy link
Collaborator

For each input image, we produce 20 outputs and compute the distance between each pair of outputs, and take the average. We do this across input images, and take the average.

@WorkingCC
Copy link
Author

@richzhang ,thank you, I get the point but still have some questions. Do you compute LPIPS distance between the input image(maps) and the sampled output, or between the corresponding real satellite image and the sampled output?

@richzhang
Copy link
Collaborator

richzhang commented Jun 25, 2018 via email

@WorkingCC
Copy link
Author

For each input image, you sample two random codes Z and generated two random outputs at one time. And you do it up to 19 times, i.e., for each input image, you finally get 19 pairs of outputs. After it, you compute LPIPS distance between 19 pairs of outputs and take the average. In your experiment, you do the same operation on 100 inputs and get 1900 pairs of outputs in total, which are used to compute average LPIPS distance. Is it right? @richzhang

@richzhang
Copy link
Collaborator

Yup! @WorkingCC

@WorkingCC
Copy link
Author

@richzhang ,thanks a lot for your patience.

@ShihuaHuang95
Copy link

Hi,
Thanks for your great work. For the LPIPS metric, I have one problem, you had tested the LPIPS distance on real images in your corresponding paper, however, as far as I know, there is no paired images in real image set, how can you get that score? Does it mean you compute the distance between random selected real images (not pair, but same domain)?

@richzhang
Copy link
Collaborator

Yes, they are randomly selected real images. It serves as a "ceiling" -- the results that an algorithm generates given a single A should not be greater than the variation given random ground truth images B.

@ShihuaHuang95
Copy link

Yes, I see. Thank you for your patience.

@comzzw
Copy link

comzzw commented Jun 21, 2020

For each input image, you sample two random codes Z and generated two random outputs at one time. And you do it up to 19 times, i.e., for each input image, you finally get 19 pairs of outputs. After it, you compute LPIPS distance between 19 pairs of outputs and take the average. In your experiment, you do the same operation on 100 inputs and get 1900 pairs of outputs in total, which are used to compute average LPIPS distance. Is it right? @richzhang

I think this guy may have some wrong understandings. The right way the collaborator explains is that first you sample 20 images for each real input image, and then you average the distances over all possible pairs of these 20 images which is C_20^2=1900. Finally, this process is repeated over all test images and you get the final score which means if you have n test images, there are 1900 \times n pairs are averaged.

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

4 participants