lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 413 forks source link

question about addPairwiseGaussian and addPairwiseBilateral #45

Closed qdinfish closed 6 years ago

qdinfish commented 6 years ago

Hi,

I didn't understand what are the means of sxy=3 , sxy=80 and srgb=13?

Could you help it ?

Thanks

d.addPairwiseGaussian(sxy=3, compat=3) d.addPairwiseBilateral(sxy=80, srgb=13, rgbim=im, compat=10)

howardgriffin commented 6 years ago

I have the same question .Do you understand now?

Toz3wm commented 6 years ago

From the original paper "Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials", this formula : capture du 2018-02-13 13-50-37

I think sxy in addPairWiseGaussian is theta_c, and sxy and srgb are respectively theta_a and theta_b. I might be wrong, however if this is not the case, then I don't see a hyper parameter that could fit to this sxy.

dingfg commented 6 years ago

sxy(PosXStd and PosYStd) sxy(Bi_X_Std and Bi_Y_Std), srgb(Bi_R_Std , Bi_G_Std and Bi_B_Std)

lucasb-eyer commented 6 years ago

@Toz3wm is correct (again :smile:) and @dingfg is correct too. I have added a note to the README.

IssamLaradji commented 6 years ago

what does compat refer to in the formula ? is it w ?

lucasb-eyer commented 6 years ago

@IssamLaradji from the readme:

These are label-compatibilites µ(xi, xj)

which is what they are called in the paper too. They are not visible in the formula screen-shotted by @Toz3wm.