Skip to content
The Hungarian-BP code in Paper "Pairwise Matching Through Max-Weight Bipartite Belief Propagation"
Branch: master
Clone or download

HungarianBP: Pairwise Matching through Max-Weight Bipartite Belief Propagation


This repository contains the source code of the algorithm described in a CVPR 2016 paper Pairwise Matching through Max-Weight Bipartite Belief Propagation. More details are provided on the [project page] ( This packages has been tested using Matlab R2015b on CentOS 7.0 (a distrubition of Linux) x64.

Citing HungarianBP

If you find HungarianBP useful in your research, please consider citing:

    author = {Zhang, Zhen and Shi, Qinfeng and McAuley, Julian and Wei, Wei and Zhang, Yanning and Hengel, Anton},
    booktitle = {CVPR},
    title = {Pairwise Matching through {Max-Weight} Bipartite Belief Propagation},
    year = {2016}, 


  1. Prerequisites

  2. [Boost] ( Install the boost library via apt-get, yum, or compiling from scratch.

  3. [Matlab] ( Install Matlab.

  4. Configuring HungarianBP

  5. Downloading HungarianBP via

        git clone
  6. Fetching the mex code via

    	cd HungarianBP 
        git submodule init
    	git submodule update --remote	
  7. Run compiling.m.

    	#inside matlab 
    		cd HungarianBP
  8. Run demoCar.m and demoMotor.m to reproduce the results on the [Cars and Motorbikes Dataset] ( Run demoCharater.m to reproduce the results on the [Chinese Character dataset] (


Precompiled mex files for linux x64 are included. For other platforms, you can use any compilier that supports matlab and c++11 to compile the mex files.


If you have any issues (question, feedback) or find bugs in the code, please contact

You can’t perform that action at this time.