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

Loss definition: from the paper to the implementation #14

Open
ReubenDo opened this issue Jan 14, 2020 · 4 comments
Open

Loss definition: from the paper to the implementation #14

ReubenDo opened this issue Jan 14, 2020 · 4 comments

Comments

@ReubenDo
Copy link

Hello,

First I would like to say that I really enjoyed your work. Congrats!
I have a simple question regarding the denseCRF loss. I do not understand how your implementation works. Why is it a simple dot product? I am probably missing what AS is in your code.

densecrf_loss -= np.dot(segmentations, AS)

Thanks a lot,
Reuben

@ReubenDo
Copy link
Author

ReubenDo commented Jan 15, 2020

Does it in fact correspond to the formula in the appendix?
image

@mkusner
Copy link

mkusner commented Jan 18, 2020

+1 I have the same question!

@mkusner
Copy link

mkusner commented Jan 18, 2020

Oh actually it looks like #3 talks about this. Is it right @meng-tang that the loss is:

image

Or did I miss something?

@meng-tang
Copy link
Owner

Yes, it corresponds to the formula. Sorry for inconsistent notations. A or w denotes the affinity matrix. S or X means the segmentation variable. AS is the result of the product of affinity matrix and segmentation.

Note that for dense CRF, we don't explicitly save A in our implementation. However, one can compute AS efficiently with fast Bilateral filtering.

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