The code contains implementations of
several available methods for the problem of
computing an approximate minimizer of the sum of a set of unary and pairwise
real-valued functions over discrete variables:
min_x: sum_i E_i(x_i) + sum_ij E_ij(x_i,x_j),
where the second sum is over a set of edges in a graph. This equivalent to the
problem of MAP estimation, also known as decoding, in a pairwise undirected graphical model.
The particular methods contained in the package are:
In order to guarantee that they find the optimal move, the two
alpha-expansion methods require the stronger condition
E_ij(alpha,alpha) + E_ij(gamma_1,gamma_2) <= E_ij(alpha,gamma_2) +
E_ij(gamma_2,alpha),
for all edges ij and all triplets of
states alpha, gamma_1, and gamma_2.
However, for iterations where this is not satisfied the implementations
use a truncation of the energies. See the paper/poster linked above for more details on
the problem/methods, and the paper for a list of references.
Once this is done, type the following in Matlab:
>> cd alphaBeta % Change to the unzipped directory
>> addpath(genpath(pwd)) % Add all sub-directories to the path
>> example_alphaBeta_UGMep % Run the demo with the UGMep code
>> example_alphaBeta_UGM % Run the demo with the UGM code
We have included mex files for several operating systems. To compile the mex files for other operating systems, run the included mexAll function.
Note that the full UGM package as well as some introductory material
on undirected graphical models is available here.