MatchGraphCUDA uses the Nvidia CUDA GPU Framework to find and retrieve similar elements in a large databases. This implementation is based on the work by Kim and colleagues.
This project comes with a pre-configured Makefile, in which your specific username has to be set for the USER variable. Furthermore you have to install the following libraries:
To work with Nvidia CUDA you must have a CUDA compatible GPU device with a properly configured CUDA Toolkit. For more information visit the CUDA-Zone.
The CPU version of this project uses the Eigen library for linear algebra tasks. This is already included here and configured in the Makefile, so there is no need to do anything in this particular case.
The GPU version uses CULA Sparse S5 for the linear algebra. For this, you need to download CULA Sparse from http://www.culatools.com/sparse/, which is free for personal academic use.
To compile the program, some environment variables have to be set (respective to the installation path of CULA Sparse):
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$(USER)/cula_sparse/lib64/
export CULASPARSE_INC_PATH="/home/$(USER)/cula_sparse/include"
export CULASPARSE_LIB_PATH_64="/home/$(USER)/cula_sparse/lib64
As well as some parameters for the compiler, which are already pre-configured in the Makefile. For more details see the CULA Sparse reference.
This implementation was developed and tested with OpenCV 2.4.5 (compiled with support for CUDA).
Environment variables to be set:
export PKG_CONFIG_PATH=/path/to/OpenCV-2.4.5/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/OpenCV-2.4.5/lib
The program can be run in two different modes for both, the CPU and GPU version. Switching between them can be done by setting the GPU_VERSION variable in the Main.cpp (1 = GPU version, 0 = CPU version).
Main <path> <ext> <iter> [<k>] [<lambda>] [<logDir>] [<randStep>] [<est>]
Starts algorithm for iter iterations on images in directory path with specified file extension ext.
Parameter k ([1, #Images], default = 1) defines how many images shall be compared each iteration (k-best).
Model parameter lambda ([0,1], default = 1) influences the computation of confidence measures (see algorithm for details).
logDir sets the path for the logfile (default = "log/matchGraph.log").
Each randStep-th iteration, the algorithm uses random image pairs to be compared.
est chooses estimator (0 = random columns estimator, 1 = global k-best estimator, default = 0).
Main -r <dim> <k> <iter> [<lambda>] [<est>]
In this mode, no image comparison is done. The matrix representation gets updated with random similiar/dissimilar results in each iteration for the estimated k-best image-pairs.
dim defines the size of the simulated matrix representation.
Other parameters same as above.
Armin Gufler, Julio Rodrigues, Fabian Schwarzkopf