Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.69 KB

File metadata and controls

31 lines (20 loc) · 1.69 KB

java-belief-propagation

Repository contains the derivation of Belief Propagation algorithm from the ground up, as well as generic Java implementation of the Belief Propagation algorithm.

Equations of Belief Propagation algorithm

PDF with detailed derivation of the algorithm for Pairwise Markov Random Fields (at the moment this is still in a draft version, and any comments are welcome): https://github.com/lagodiuk/java-belief-propagation/blob/master/derivation_of_belief_propagation_algorithm/Derivation.pdf

Examples of the inference over the different Pairwise Markov Random Fields can be found in folder: src/test/java/com/lahodiuk/bp/example/

Reconstruction of the images

Scheme of the reconstruction using Pairwise Markov Random Field and Belief Propagation

How to run an example of the image reconstruction

Compile the library:

$ mvn clean install

Run an example:

$ java -cp "target/bp-1.0-SNAPSHOT.jar:target/lib/*" com.lahodiuk.bp.example.ImageReconstruction

Example of reconstruction 2

Example of reconstruction 1

For more details check the class: https://github.com/lagodiuk/java-belief-propagation/blob/master/src/main/java/com/lahodiuk/bp/example/ImageReconstruction.java