Coder Social home page Coder Social logo

temi92 / simplecrf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hilab-git/simplecrf

0.0 1.0 0.0 43.59 MB

matlab and python wrap of crf and dense crf, both 2d and 3d are supported

License: BSD 3-Clause "New" or "Revised" License

C++ 99.09% MATLAB 0.01% Python 0.04% CMake 0.01% C 0.85%

simplecrf's Introduction

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.

simplecrf's People

Contributors

taigw avatar masadcv avatar jjerphan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.