lucasb-eyer / pydensecrf

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

Example dense inference #4

Closed kevin-keraudren closed 8 years ago

kevin-keraudren commented 8 years ago

Added example file dense_inference.py following discussion on Issue https://github.com/lucasb-eyer/pydensecrf/issues/3 .

Example images can be found in the original densecrf/examples folder: im{1,2,3}.ppm and anno{1,2,3}.ppm.

Note that the function VectorXs getLabeling( const unsigned char * im, int N, int M ) from densecrf/examples/common.cpp does not need to be adapted to Python as skimage.segmentation.relabel_sequentialis perfectly suited to the task.

lucasb-eyer commented 8 years ago

Thank you!