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.
Dependency
This repository depends on the following packages:
Maxflow
,
DenceCRF
and
3D Dense CRF
Installation
-
Install by:
pip install SimpleCRF-binaries
-
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
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.
denseCRF
has the following function. It can deal with multi-class segmentation, and only supports RGB images.
denseCRF.densecrf()
for 2D automatic segmentation.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 168.1 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90abb6281fe6526921ddd62e5c7c8b155e3079889f7dc2b324ad290000867a89 |
|
MD5 | ae8927a5bf1803874b15d840c894b474 |
|
BLAKE2b-256 | 212aad4d435a8bb12dcc1c81a537a288abbcfabeec2ae1affbca0e953b474bfd |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp39-cp39-manylinux1_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp39-cp39-manylinux1_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21e3dd4c3e5169939f654c0714ef78169f10eb4a43d90d6bc1f8b323b57cdd82 |
|
MD5 | 54ad416e80612adc6e269deecf91bd46 |
|
BLAKE2b-256 | ef7704ebf730e3b53d3d5e692aeb1edfc1672e1050eab874f605d5a042d3a369 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 250.0 kB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e571ebe963acfaf32505f6fca7fec2c75c38ac2640ef60d5a4c639b0e384feb |
|
MD5 | 97f37dd53f0d03fd527562455bd4d388 |
|
BLAKE2b-256 | aee99d603a0e0a5d502b061e924e4745c35766b2d8a18ae74fa300dd78d84c4e |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 168.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f57aad7887ef34e0870b7c0a69c88f813dd3bc15f8b56043b14a8f2405442cc |
|
MD5 | 5b090a48bb501bca9dda21d8ef23b1b1 |
|
BLAKE2b-256 | ad439b4ad0f0b381b608b16d1e22a8f7b39daf2f77877416316e55c9620a6ba2 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05608f002b69841be50daea6435cb02cdb1c0cc86571e9d7cff65f77b128b726 |
|
MD5 | 90ae850ec02665500a6c67b2103a811c |
|
BLAKE2b-256 | a969f045b9944c36b390118db0ce5286e566c47a115576c1e6bb5fbceb56fe92 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp38-cp38-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 249.0 kB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c36a90ef8d17dd34c75ab7ddfb4d05c0c1fd2a299bb83564fdcf797af786b7a4 |
|
MD5 | 44683fb976ca4560c29488abfd944e9c |
|
BLAKE2b-256 | 4212fc9cf945f598779874084c2b9431ba3a4eaf33f1998099a5e403055cdc94 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 167.5 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e68f28ad34b56d4186e23de8a56531af8a2c885000f36a11e424cc697fcb9ea8 |
|
MD5 | 272cd5bb28ebbd3cbc0d75138a0898fd |
|
BLAKE2b-256 | 01704cd5d17bb177d54d9d3966889b1268dcd2ec3e644c48ec6e9a9ddf2d510b |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7dc905fe1de9b9d28037c950934eaf124b0fda3fc7d312ae868abadf9b0ea71 |
|
MD5 | 9ebb6faf0ab48d5d74e5830f78011947 |
|
BLAKE2b-256 | 4f5625169be0856f23cda4125386b37af8ec318d917b42450dd829fea0098517 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp37-cp37m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 249.0 kB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d034c68b95a655d68788cd4ba14db5ea8ee166ec34d4b31beb6a2cdd35eeab0f |
|
MD5 | fc98ce4f52d86b73430b02af076a1603 |
|
BLAKE2b-256 | 112e277159e245f8ff62a987a7492091cd5103326f3f5ea07cf7e5cff5b4e241 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 167.5 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b9d40e382e9e1e3e5a3f8e2eed58c5ef073158a364bac7535477307bf214c2e |
|
MD5 | e988d0b8214d5dba4b34ed6d3328222a |
|
BLAKE2b-256 | faa57070008a8900a9161777701e5d448107313832d7f4978bb14cfca597a095 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b757770e7b475cc873311f2233444f280ced05d8b74a4f8975666564eb1e9d14 |
|
MD5 | 43ca36a0c30ec0591902169520f33fd4 |
|
BLAKE2b-256 | a16809767c8f875efa17f9a304cc07534478b1df1d1883af740774657963ee87 |
File details
Details for the file SimpleCRF_binaries-0.2.1.2-cp36-cp36m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: SimpleCRF_binaries-0.2.1.2-cp36-cp36m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 249.0 kB
- Tags: CPython 3.6m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fd16f525e49ac51699d2b18e4edb18c537f08906c071157df384d616daf87a3 |
|
MD5 | 2e538316c91cd302a6d87ba713f9e261 |
|
BLAKE2b-256 | 8a1f344ab4cd0e151fb8e3f8859fcc1f3b70a9be4765ee81921a1967f7564d66 |