SiftGPU: A GPU Implementation of Scale Invariant Feature Transform (SIFT)

Changchang Wu

University of North Carolina at Chapel Hill

V340 available! (GLSL/CG/CUDA all in one!)  (V360Beta for Multi-GPU)

SIFT Implementation

SiftGPU is an implementation of SIFT [1] for GPU. SiftGPU processes pixels parallely to build Gaussian pyramids and detect DoG Keypoints. Based on GPU list generation[3], SiftGPU then uses a GPU/CPU mixed method to efficiently build compact keypoint lists. Finally keypoints are processed parallely to get their orientations and descriptors.

SiftGPU is inspired by Andrea Vedaldi's sift++[2] and Sudipta N Sinha et al's GPU-SIFT[4] . Many parameters of sift++ ( for example, number of octaves, number of DOG levels, edge threshold, etc) are also available in SiftGPU. The shader programs are dynamically generated according to the parameters that user specified.

SiftGPU also includes a GPU exhaustive/guided sift matcher SiftMatchGPU. It basically multiplies the descriptor matrix on GPU and find closest feature matches on GPU. GLSL/CUDA/CG implementations are all provided.

Requirements

Running SiftGPU needs a high-end GPU(like nVidia 8800) that has a large graphic memory and supports dynamic branching. GLSL is used by default. For nVidia graphic cards, you can optionally use CG(require fp40) or CUDA. Haven't fully tested for ATI, but the GLSL shaders passed AMD Shader Analyzer, so it should be working.

SiftGPU uses DevIL1.77, GLEW 1.51, GLUT(viewer only), CG(optional) and CUDA(optional). You'll need to make sure that your system has all the dependening libraries of corresponding versions. To update the libaries, you'll need to replace the header files in SiftGPU\Include\, and the corresponding binaries.

NOTE FOR CUDA : 1. The thread block setting is currently tuned on nVidia GTX 8800. It may not be optimized for other GPUs. 2. The CUDA version is not compiled by default. You need to define CUDA_SIFTGPU_ENABLED to the compiler and recompile the package. For VS2005 user, you can just use SiftGPU_CUDA_Enabled project.

Download

SiftGPU-V340 (6.0MB; Including code, manual , windows binary and some test images) Want to cite SiftGPU?
V360-Beta; You might be interested in the Matlab Versions mex'd by Adam Chapman and by Parag. K. Mital

SimpleSIFT.cpp gives some examples of using SiftGPU and SiftMatchGPU.
Previous versions of SiftGPU can be found through this link. A complete change list can be found here.

What's New in V360beta
  1. Added support for selecting a GPU in multi-GPU environtment
  2. Added multi-process mode to allow using multiple GPUs (or GPUs on different computers)
  3. Added option to set a soft limit on the number of detected features.

Some previous changes
  7. Used SSE to speed up the descriptor normalization step in descriptor generation.
  6. Cleaned up the GLSL code to follow the GLSL standard more strictly (for ATI).
  5. Added CUDA-based SiftGPU/SiftMatchGPU implementation. See Figure below for the speed.
  4. Improved the speed of the OpenGL-based SiftMatchGPU by chaning the internal format.
  3. Added a cg-based sift matching implementation, check example #7 in manual. (Thanks to Zach)
  2. Added function to compute descriptors for user-specified keypoints, check example #6 in manual.
  1. Improved speed by %50 compared with V293. Look here for experiment details and explanations


Evaluation

Below is the evaluation of the speed of V340 on different image sizes. "-fo -1" means using upsampled image. "-glsl -pack" uses GLSL and "-cuda" uses CUDA (The experiment images are all resized from this image) . 

   System : nVidia 8800GTX, 768MB, Driver 182.08, Windows XP, Intel 3G P4 CPU, 3.5G RAM. (V311 Speed)

Below is the comparision with Lowe's SIFT on box.pgm using the comparision code from Vedaldi's SIFT .

References

[1]   D. G. Lowe. Distinctive image features from scale-invariant keypoints . International Journal of Computer Vision, November 2004.
[2]   A. Vedaldi. sift++, http://vision.ucla.edu/~vedaldi/code/siftpp/siftpp.html.
[3]   G. Ziegler, et al. GPU point list generation through histogram pyramids. In Technical Report, June 2006.
[4]   Sudipta N Sinha, Jan-Michael Frahm, Marc Pollefeys and Yakup Genc, "GPU-Based Video Feature Tracking and Matching ",
        EDGE 2006, workshop on Edge Computing Using New Commodity Architectures, Chapel Hill, May 2006