mbickel / DenseInferenceWrapper

A python wrapper for Krähenbühls dense CRF for medical image volumes.
89 stars 37 forks source link

any recommendation for parameters? #3

Open sedghi opened 7 years ago

sedghi commented 7 years ago

thanks for the code first of all, it looks fantastic I was wondering if there is any explanation for the meaning of parameters _( pos_x_std, pos_y_std, pos_z_std, pos_w, bilateral_x_std,bilateral_y_std, bilateral_z_std, bilateral_intensity_std,bilateralw) , is there any recommendation on the values of these parameters? Do i need to change them based on my application ? Thanks in advance

mbickel commented 7 years ago

If you checkout this file you will find a quick explanation of the parameters in the comments. They are all preset to values that worked for me to segment livers in CT image volumes:

DenseInferenceWrapper/denseinference/CRFProcessor.py

For further information on how the algorithm work, check out the original paper by Krähenbühl: http://www.philkr.net/papers/2011-12-01-nips/2011-12-01-nips.pdf

You probably have to adjust these parameters according to your use case, as these values are used to normalize your features.

Here the parameters pos_x_std, pos_y_std, pos_z_std and pos_w are used: DenseInferenceWrapper/denseinference/lib/libDenseCRF/densecrf.cpp#L174

and

here the parameters bilateral_x_std, bilateral_y_std, bilateral_z_std, bilateral_intensity_std and bilateral_w are used: DenseInferenceWrapper/denseinference/lib/libDenseCRF/densecrf.cpp#L214

Hope that helps!

UpCoder commented 6 years ago

@sedghi @mbickel @skrish13 Hi, how is the effect of default parameters? I found it is strange when I use the default parameters. It seem that the effect of CRF operation is same with the erode operation's.

See in the below picture, the white is the result without CRF, the red is the result with CRF. And the white result is better. image

keesh0 commented 5 years ago

I think that I am calling 3DCRF with the correct parameters based on a Caffe 1.0.0 produced liver mask. But, I am also seeing a highly eroded result like UpCoder.