View on GitHub

Parallel_SIFT

Parallel Versions of the Scale Invariant Feature Transform (SIFT) Algorithm

Analysis of Data Parallelism and Task Parallelism on the SIFT Algorithm

Summary:

We are implementing a parallel version of the SIFT algorithm to match similar localized features between two images. We will also analyze the different impacts of task-based and data-based parallelism on the SIFt algorithm.

Final Report PDF: Analysis of Results

How to run Sequential:

  1. Clone the repo
  2. Install OpenCV
  3. cd build
  4. cmake ..
  5. make
  6. Sequential: ./Parallel_SIFT_main -a photo2.jpg -b photo1.jpg -d -i 0 -g 7

How to run Parallel OpenMPI:

  1. Repeat steps 1 and 2 for sequential above
  2. git checkout openMPI
  3. Same build steps 3 through 5 as above
  4. mpiexec -n 8 ./Parallel_SIFT_main -a pikachu.jpg -b pikachu.jpg -g 12

How to run Parallel OpenMP:

  1. Same steps as Sequential, but in openMP branch

Background:

Matching features across two images is a common task in many computer vision applications. For instance, everything from robots to the newest iPhone uses disparity estimation to generate depth images from 2D images, similar to how humans estimate depth through two eyes. This disparity estimation attempts to align two slight shifted images through feature matching. Motion capture and optical flow similarly attempt to match two images and identify the overall displacement between these matching parts of image.

Our project will involve parallelizing an algorithm for feature-matching known as Scale Invariant Feature Transform (SIFT), which can account for rotation, illumination, and perspective change between two images. At a high level, SIFT can be broken down into a few steps:

Find key points in both images by finding regions with high change from surrounding pixels. Find orientation of key points and apply inverse rotation. This explains why SIFT is invariant to rotations. Distinguish key points in the same image and match key points from the two images.

Many of the intermediary calculations for the above steps are identical across an image’s pixels. For instance, the first step involves calculating the Difference of Gaussian on scale space images, which are blurred and downsized versions of an original image. Blurring involves calculating the average of a region of pixels and setting the center pixel to this value. This computation is the exact same for every pixel in an image, so different pixels and sections of the image can be handled by different processes. With this, much of the SIFT algorithm is data-parallelizable, meaning the same function can be applied on different, independent data values. We will also explore task-based parallelism by allowing different processes work on different tasks simultaneously if they are order-invariant.

Challenges:

One of the major challenges that we have to face is creating all the algorithms must be implemented from scratch in both sequential and parallel. The sift algorithm itself has requires many calculations and modules in itself such as:

Scale Space:

Keypoint Localization

While the SIFT algorithm is not innate sequential in nature, there needs to be a lot of synchronization and communication between workers in order to create an accurate mapping of similarities. If we were to do data parallelism, then we must account for the fact that if we split the data up into discrete chunks of pixels, we could potentially lose a similarity of localized points that lie on the border of those discrete chunks of pixels, hence requiring some thought into the synchronization and communication protocols.

Resources

Goals and Deliverables:

Plan to achieve:

Complete sequential and parallel implementations of the SIFT algorithm Implement task parallelism and data parallelism of the SIFt algorithm Achieve 3x speedup for data parallel implementation on the GHC machines Interactive demo that has a participant take two pictures in different poses that will allow the sequential and parallel implementations of the SIFT algorithm to match similar features as seen in this picture:

Analysis of different impacts that task parallelism and data parallelism has on the SIFT algorithm. This will include graphs comparing the speedup of the two different implementations.

Hope to achieve:

Achieve 5x speedup for both data parallel and task parallel implementations Analysis the impact that different image resolution can have on SIFT algorithm

Platform of Choice:

Original Schedule (Revised/New 11/18):

Original Schedule: