SimpleCRF
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:
[1] Yuri Boykov and Vladimir Kolmogorov, "An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision", IEEE TPAMI, 2004.
[2] Philipp Krähenbühl and Vladlen Koltun, "Efficient inference in fully connected crfs with gaussian edge potentials", in NIPS, 2011.
[3] Kamnitsas et al in "Efficient multi-scale 3D CNN with fully connected CRF for accurate brain lesion segmentation", Medical Image Analysis, 2017.
Dependency
This repository depends on the following packages:
Maxflow,
DenceCRF and
3D Dense CRF
Installation
-
Install by:
pip install SimpleCRF -
Alternatively, you can compile the source files by the following two steps:
python setup.py build
python setup.py install
Examples
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.
Modules
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.
Metadata
Release files for SimpleCRF 0.2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| SimpleCRF-0.2.1.1.tar.gz | 2.7 MB | Details |
Release files / SimpleCRF-0.2.1.1.tar.gz
| Download URL | SimpleCRF-0.2.1.1.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b31480ec713f298216c4daf201f2a327b1c15fd51552f247b1d6e62ba1d5d7b0
|
|
BLAKE2b-256 checksum How to use checksums |
fe0e3a7b8ab1f0bade961d1bce85b152045b2962d706bd1feb2c61e129d5ed51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9
|