Skip to main content

An open-source toolkit for conditional random field (CRF) and dense CRF

Project description

SimpleCRF

DISCLAIMER: This repository is a clone of the PyPI project SimpleCRF. This project contains the precompiled binaries relevant for installing SimpleCRF, which may be added into SimpleCRF in the future. This project might therefore be deprecated in the future.

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.

maxflow densecrf1 densecrf2

Dependency

This repository depends on the following packages: Maxflow, DenceCRF and 3D Dense CRF

Installation

  1. Install by: pip install SimpleCRF-binaries

  2. 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

  1. maxflow has 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.

  1. denseCRF has the following function. It can deal with multi-class segmentation, and only supports RGB images.
  • denseCRF.densecrf() for 2D automatic segmentation.
  1. denseCRF3D has the following function. It can deal with multi-class segmentation. The input channel number can be 1-5.
  • denseCRF3D.densecrf3d() for 3D automatic segmentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

SimpleCRF_binaries-0.2.1.3rc1-cp39-cp39-win_amd64.whl (168.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp39-cp39-macosx_10_13_x86_64.whl (250.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.13+ x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp38-cp38-win_amd64.whl (168.3 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp38-cp38-macosx_10_13_x86_64.whl (249.1 kB view hashes)

Uploaded CPython 3.8 macOS 10.13+ x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp37-cp37m-win_amd64.whl (167.6 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp37-cp37m-macosx_10_13_x86_64.whl (249.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.13+ x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp36-cp36m-win_amd64.whl (167.6 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

SimpleCRF_binaries-0.2.1.3rc1-cp36-cp36m-macosx_10_13_x86_64.whl (249.0 kB view hashes)

Uploaded CPython 3.6m macOS 10.13+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page