An open-source toolkit for conditional random field (CRF) and dense CRF
Matlab and Python wrap of Conditional Random Field (CRF) and fully connected (dense) CRF for 2D and 3D image segmentation, according to the following papers:
 Yuri Boykov and Vladimir Kolmogorov, "An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision", IEEE TPAMI, 2004.
 Philipp Krähenbühl and Vladlen Koltun, "Efficient inference in fully connected crfs with gaussian edge potentials", in NIPS, 2011.
 Kamnitsas et al in "Efficient multi-scale 3D CNN with fully connected CRF for accurate brain lesion segmentation", Medical Image Analysis, 2017.
pip install SimpleCRF
Alternatively, you can compile the source files by the following two steps:
python setup.py build python setup.py install
Some demos of using this package are:
examples/demo_maxflow.py: using maxflow for automatic and interactive segmentation of 2D and 3D images.
examples/demo_densecrf.py: using dense CRF for 2D gray scale and RGB image segmentation.
examples/demo_densecrf3d.py: using 3D dense CRF for 3D multi-modal image segmentation.
maxflowhas four functions as follows. Note that the current version only supports binary segmentation.
maxflow.maxflow2d()for 2D automatic segmentation.
maxflow.interactive_maxflow2d()for 2D interactive segmentation.
maxflow.maxflow3d()for 3D automatic segmentation.
maxflow.interactive_maxflow3d()for 3D interactive segmentation.
denseCRFhas the following function. It can deal with multi-class segmentation, and only supports RGB images.
denseCRF.densecrf()for 2D automatic segmentation.
denseCRF3Dhas the following function. It can deal with multi-class segmentation. The input channel number can be 1-5.
denseCRF3D.densecrf3d()for 3D automatic segmentation.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size SimpleCRF-0.0.6.tar.gz (1.7 MB)||File type Source||Python version None||Upload date||Hashes View hashes|