ConvCRF icon indicating copy to clipboard operation
ConvCRF copied to clipboard

The relationship with FullCRF

Open zy937085318 opened this issue 6 years ago • 2 comments

hi~ I'm digging in your work for weeks and it's really awesome! Now I wanna ask if I set the conv size as the input size, does it mean that the convCRF is equivalent to FullyCRF in this case?

zy937085318 avatar Aug 28 '18 03:08 zy937085318

My understanding is you need to change the kernel size in the message passing function. Change it from 7 (the value used in the current code) to your input size.

hsu-z2 avatar Aug 28 '18 14:08 hsu-z2

Yes, if you use a large filter size you will get a model very similar to FullCRF. Note that there are some subtle differences. FullCRF uses the Permutohedral Lattice approximation, while a ConvCRF with large filter size is exact.

I have visualized the differences by plotting the impulse response for the filters on a simple 10x10 pixel image, where the center pixels are white with a black frame. The 10x10 filter has the same response as a simple (inefficient) exact filter I have implemented in numpy. The lattice filter however loses some detail. Below the results.

Input Image: 10 x 10 Response of a 5x5 filter Exact Response Response of Lattice (FullCRF)
input 5filter filter10 lattice

MarvinTeichmann avatar Sep 25 '18 10:09 MarvinTeichmann