Code Monkey home page Code Monkey logo

robustpn's Introduction

------------------------------------------------------------------------------------------------
Alpha expansion for Robust P^N potentials (fixed weights)
------------------------------------------------------------------------------------------------

Authors: Pushmeet Kohli, Lubor Ladicky, Philip H.S.Torr
Oxford Brookes University

------------------------------------------------------------------------------------------------
Matlab wrapper for Robust P^N Potentials (varying weights)
------------------------------------------------------------------------------------------------

Author: Shai Bagon
Weizmann Institute of Science, Israel.

------------------------------------------------------------------------------------------------
Licence
------------------------------------------------------------------------------------------------

This software library implements the alpha expansion for robust P^N potentials described in

P. Kohli, L. Ladicky, and P. Torr. Graph cuts for minimizing robust higher order potentials.
Technical report, Oxford Brookes University, UK., 2008.

P. Kohli, L. Ladicky, and P. Torr. Robust higher order potentials for enforcing label
consistency. In CVPR, 2008.

------------------------------------------------------------------------------------------------

The library uses max-flow code described in

Yuri Boykov and Vladimir Kolmogorov. An Experimental Comparison of Min-Cut/Max-Flow Algorithms
for Energy Minimization in Vision. In IEEE Transactions on Pattern Analysis and Machine
Intelligence (PAMI), September 2004

------------------------------------------------------------------------------------------------

The alpha expansion algorithm is explained in

Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts.
PAMI, 23(11):1222โ€“1239, 2001.

------------------------------------------------------------------------------------------------

The code is free to use for research purposes. If you use this software for research purposes,
you should cite above papers in any resulting publication.

------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------
Files included
------------------------------------------------------------------------------------------------

README.txt        - this readme file

robustpn_mex.cpp    - source file interfacing to Matlab

robustpn_compile.m    - compiling library for Matlab

robustpn_test.m - tests for the wrapper

energy.h          - header file with energy class definition

expand.h         - header file with alpha expansion code

graph.h, block.h  - header files containg max-flow code

------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------
Installation
------------------------------------------------------------------------------------------------

1. Extract all files in this package into a directory (e.g., /home/bagon/robustpn, or d:\matlab\robustpn)

2. Open Matlab

3. Set mex compiler for matlab
>> mex -setup

3. Go to robustpn directory
>> cd /home/bagon/robustpn

4. Compile the wrapper using
>> robustpn_compile

5. Run the tests (you can look at this file to see examples of how to use the wrapper)
   NOTE: this test code requires ANN class:
   http://www.wisdom.weizmann.ac.il/~bagon/matlab.html#ann
>> robustpn_test

6. Type 
>> doc robustpn_mex
   for some brief help and usage of the function.

7. That's it - you are done.

------------------------------------------------------------------------------------------------
Using the wrapper
------------------------------------------------------------------------------------------------
 
  [L E] = robustpn_mex(sparseG, Dc, hop)
 
  Inputs:
   sparseG - sparse adjecency matrix defining graph structure and pair-wise potentials
       sparseG(i,j) !=0 means i,j share a pair-wise potntial with value sparseG(i,j)
       sparseG is of size (#nodes)x(#nodes)
   Dc - unary potential, i.e., data term of size (#labels)x(#nodes)
   hop - higher order potential array of structs with (#higher) entries, each entry:
       .ind - indices of nodes belonging to this hop
       .w - weights w_i for each participating node
       .gamma - #labels + 1 entries for gamma_1..gamma_max
       .Q - truncation value for this potential (assumes one Q for all labels)
 
  Outputs:
   L - optimal labels
   E - obtained minimal energy

------------------------------------------------------------------------------------------------
Contact Information
------------------------------------------------------------------------------------------------

Email:
    [email protected]   (Shai Bagon)

------------------------------------------------------------------------------------------------

robustpn's People

Contributors

shaibagon avatar

Watchers

James Cloos avatar  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.