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

Unary potential #51

Closed XhqGlorry11 closed 6 years ago

XhqGlorry11 commented 6 years ago

@lucasb-eyer Hi lucas, can you tell me how does unary potential calculated in your code? It seems that you just use the "class probabilities per pixel" to calculate unary potential. While the paper use information of the original image, e.g. color, location... Can you give me tips? Thanks! image

lucasb-eyer commented 6 years ago

Hi @XhqGlorry11 sorry for the late answer. It is your task to come up with a unary potential which makes sense for your application. It is not part of PyDenseCRF to compute one, but rather you compute one and give it to PyDenseCRF. In the past, it was typically RandomForest output, and nowadays, many people use the SoftMax output of a CNN as unary potentials.

Closing the issue as it's not actually an issue.