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

Questions on the library #118

Open
QuanticDisaster opened this issue Jun 18, 2022 · 0 comments
Open

Questions on the library #118

QuanticDisaster opened this issue Jun 18, 2022 · 0 comments

Comments

@QuanticDisaster
Copy link

Hello @lucasb-eyer

I would like to thank you for this quite complete and easy to use implementation of the original paper

I am posting this issue to ask some questions about this library. Has there been advances on the learning part of the library ? I was interested in it and eventually adapting if I manage to get past the cython code which I'm not familiar with

At the moment, I am toying a bit with the library, my goal being to apply it on 3D points clouds. I managed to use the generic non 2D case for it, which also raised some interrogations on my part.

First, I see this is not possible to add a standard deviation parameter to a DenseCRF object when adding pairwiseenergy. However, from the formula
formula

it seems that we can circumvent this by dividing directly the features before setting a pairwise energy this way, is that right ?

d = dcrf.DenseCRF(100, 5)  # npoints, nlabels

std = 8
feats = np.array(...)  # Get the pairwise features from somewhere.
print(feats.shape)     # -> (7, 100) = (feature dimensionality, npoints)
print(feats.dtype)     # -> dtype('float32')

dcrf.addPairwiseEnergy(feats / 8)

Moreover, it seems you don't apply the 2* factor on the pairwise energy in the 2D case. while it is just a constant factor, is it intended ? I don't see traces of any power being applied either. Here is the corresponding code in DenseCRF2D::addPairwiseGaussian:

https://github.com/lucasb-eyer/pydensecrf/blob/0d53acbcf5123d4c88040fe68fbb9805fc5b2fb9/pydensecrf/densecrf/src/densecrf.cpp

With respect to the compatibility parameter, I noted that using a constant as a value for compat and an identity matrix with the same constant gives different results. Could you confirm that a PottsCompatibility and a identity MatrixCompatibility should bring the same results ? The problem seem to come from a sign, one consider the entry should be negative, the other one positive. Putting a compatibility value such as PottsCompatibility = - MatrixCompatibility indeed gives the same result

I would be glad to exchange with you more in depth if you are still active on the library.
Thanks

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

1 participant