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

Computation question #1

Open
jczh98 opened this issue Nov 30, 2019 · 3 comments
Open

Computation question #1

jczh98 opened this issue Nov 30, 2019 · 3 comments

Comments

@jczh98
Copy link

jczh98 commented Nov 30, 2019

Origin paper mention that CX(X, X) = 1 while CX(X,Y) = 1/N if X is far from Y.
So contextual loss is zero when two images are equal and large when two images are dissimilarity.
I found that your code which computes equation (1) uses 1 - CX and I'm confused with this and its result.
I wish your help, thanks.

@S-aiueo32
Copy link
Owner

@neverfelly
Thank you for your pointing. I agree with your interpretation of CX.
I don't remember why the inversion was placed in the line...
Anyway, according to https://gist.github.com/yunjey/3105146c736f9c1055463c33b4c989da, I'm sure that it was my fault.

On the current master branch, it has been fixed.
If you confirm it or have the other questions, please post here.

@jczh98
Copy link
Author

jczh98 commented Nov 30, 2019

Thanks for your great contribution to the contextual loss package.
Also, I found a problem with contextual bilateral loss, the original implementation uses MSE distance instead of L1 distance.

@S-aiueo32
Copy link
Owner

S-aiueo32 commented Nov 30, 2019

CoBi is still under developing because of the OOM during L2 distance computation.
I could test it only with L1 so I selected L1 for the computation of spatial loss to keep consistency in the test.

The intrinsic solution is to avoid the OOM but I don't have any idea for memory-efficient computation now.

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

2 participants