How to implement a conditional random field based

2020-08-01 04:46发布

问题:

I am trying to implement some segmentation tool for my images, and I am trying to use conditional random field (CRF) based method. For example, in this paper.

The standard CRF energy function includes two parts, i.e., a unary potential and a pairwise potential

where L are the class labels and X are the observations (image pixels).

I have got some training image with labels of the objects in the image. For example, I have got the ground truth segmentation of the objects in the image with labels.

If I want to use texture of these objects as the feature, I am wondering how to implement and do the training of this energy function? For example, the unary term can be represented by

where v_texture is a vectorised texture feature of each labelled object.

My question is how to implement this log probability function? Using histogram? Thanks. A.