Skip to content

An implementation of loopy belief propagation for binary image denoising. Both sequential and parallel updates are implemented.

Notifications You must be signed in to change notification settings

parthnatekar/Loopy-Belief-Propagation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Loopy Belief Propagation for Binary Image Denoising

An implementation of loopy belief propagation for binary image denoising. Both sequential and parallel updates are implemented.

Theory

Loopy Belief Propagation allows us to perform approximate inference on a grid structured Markov Network.

Using a Bethe Cluster Graph representation, the message update equations are as follows:

The messages can be passed sequentially or parallely.

Implementation

In practice, the parallel messages are sent in 4 phases - Right, Left, Up, Down. This considerably faster than sequential message passing.

For running loopy belief propagation using parallel message passing, run

python3 loopy_bp.py -p PATH TO IMAGE/CSV -m MODE (seq or sync) -n ADD EXTERNAL NOISE (True or False, for testing purposes)

Results

Results on a sample image are shown below:

Parallel loopy belief propagation takes about 9s to run on the above image (~ 36 thousand pixels).

About

An implementation of loopy belief propagation for binary image denoising. Both sequential and parallel updates are implemented.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages