Skip to main content

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.

maxflow densecrf1 densecrf2

Dependency

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

Installation

  1. Install by: pip install SimpleCRF

  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.

Metadata

Release files for SimpleCRF 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for SimpleCRF 0.2.2
File Interpreter ABI Platform Actions
simplecrf-0.2.2-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details for simplecrf-0.2.2-cp312-cp312-manylinux_2_39_x86_64.whl

Release files / simplecrf-0.2.2-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL simplecrf-0.2.2-cp312-cp312-manylinux_2_39_x86_64.whl
Size 237.1 kB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
1f93bbf0781ebfbc59dddb07d06828ae73326c2d3b65222b3c3c92b08e48c8ab
BLAKE2b-256 checksum
How to use checksums
65c24762e4c6a48ce02f899e35611a696857ec981a0b47c6e79c4ebeae0cc361
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for SimpleCRF 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page