Efficient Parallel Implementation of Active Appearance Model Fitting Algorithm on GPU

Jinwei Wang, Xirong Ma, Yuanping Zhu, Jizhou SunThe Scientific World JOURNAL 2014 · DOI

TL;DR

This paper tackles the computational bottleneck of Active Appearance Model (AAM) fitting, a powerful technique for object detection and tracking. By implementing a fine-grained parallel AAM fitting algorithm on GPUs using CUDA, the authors achieve significant speedups, enabling real-time performance even with high-dimensional texture data.

What Problem Does This Paper Address?

Detecting and tracking deformable objects in videos is crucial for applications like human-computer interaction and surveillance. The Active Appearance Model (AAM) is a highly effective model-based approach for this task, but its computational complexity, particularly due to high-dimensional texture representations, hinders its application in real-time systems. Traditional methods to speed up AAM fitting often compromise accuracy. This paper aims to overcome this limitation by leveraging the parallel processing power of modern Graphics Processing Units (GPUs) to accelerate the AAM fitting process without sacrificing performance.

Methods

The core of this work is the efficient parallel implementation of the AAM fitting algorithm on GPUs. The authors adopt a "fine-grain parallelism" strategy, distributing the texture data of the AAM, pixel by pixel, to thousands of parallel GPU threads. This approach is designed to map well onto the GPU architecture.

Key algorithmic components include:

  • AAM Modeling: The paper briefly describes the standard AAM modeling process, which involves creating statistical models for shape and texture using Principal Component Analysis (PCA) on labeled training data.
  • AAM Fitting: The primary focus is on accelerating the fitting process, which iteratively optimizes model parameters to match an input image. The authors identify the computation of the "appearance error" (the difference between the model and image texture) as the main computational hotspot.
  • GPU Implementation (CUDA): The algorithm is implemented using NVIDIA's Compute Unified Device Architecture (CUDA). The paper details the parallelization strategies for key sub-procedures:
  • Shape Calculation (S): Parallelized by assigning each vertex of the shape to a thread.
  • Texture Sampling (gs): Parallelized by assigning pixels to threads, with a focus on coalesced memory access for efficiency.
  • Texture Normalization (gs): This involves multiple steps (mean normalization, scaling, and alignment) and is broken down into several kernels with global synchronizations. A three-level summation method using shared memory is employed for efficient parallel reduction.
  • Model Texture Calculation (gm): Parallelized similarly to texture sampling.
  • Non-hotspot Parallelization: The authors also parallelize the less computationally intensive parts (estimating parameters 'p' and computing the update 'Ap') to further improve overall performance. For 'Ap', they developed a novel autotuning method for matrix-vector multiplication on GPUs, outperforming standard library functions for wide matrices.

Datasets

  • Training: The FG-NET face database was used for training. This database contains 1002 face images from 82 subjects with labeled facial landmarks. For their experiments, they selected one image per person and created 16 face AAM models with varying texture dimensions (from 4096 to 65536 pixels).
  • Testing: The YouTube face database was used for testing. This database consists of 3425 video clips of 1595 individuals. For evaluation, they selected 50 clips of single faces with consistent illumination and no occlusions.

Key Insights and Ideas

  • Fine-grained parallelism is key: Distributing texture data at the pixel level to thousands of GPU threads is crucial for effectively utilizing the GPU's architecture and achieving significant speedups.
  • Identifying and targeting hotspots: The paper demonstrates the importance of profiling to identify the most computationally intensive parts of an algorithm (in this case, appearance error computation) and focusing parallelization efforts there.
  • Autotuning for matrix-vector multiplication: The development of an autotuning method for matrix-vector multiplication on GPUs is a significant contribution, especially for handling the wide matrices encountered in AAM fitting, leading to better performance than standard library functions.
  • GPU suitability for large data: The results highlight that GPUs excel when dealing with large datasets and computations, showing a clear trend of increasing speedup with larger texture dimensions.

Key Results

  • Real-time performance: The parallel AAM fitting algorithm achieves real-time frame rates for video sequences, even on very high-dimensional textures.
  • For 4096 pixels, the GPU achieves 102.67 frames per second.
  • For 65536 pixels, the GPU achieves 33.81 frames per second.
  • Significant speedup: Compared to the CPU-based method, the GPU implementation is dozens of times faster.
  • The maximum speedup achieved was 48.1 for the largest data size (65536 pixels).
  • Linear growth in execution time: Both CPU and GPU execution times show a linear increase with the number of frames, but the GPU's growth rate is significantly lower.
  • Scalability: The speedup of the GPU algorithm over the CPU increases with data size, demonstrating its effectiveness for computationally intensive tasks.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that the current implementation is designed for relatively simple scenarios (single faces, no complex occlusions or illumination changes).
  • The speedup is lower for smaller data volumes, as kernel launch overhead and non-parallel parts become more significant.
  • Future Work:
    • The authors plan to apply this GPU-based parallel AAM fitting algorithm to more complex applications requiring real-time detection and tracking of objects, such as automated surveillance, human-computer interaction, and emotion recognition systems.

Summary updated

Abstract

The active appearance model (AAM) is one of the most powerful model-based object detecting and tracking methods which has been widely used in various situations. However, the high-dimensional texture representation causes very time-consuming computations, which makes the AAM difficult to apply to real-time systems. The emergence of modern graphics processing units (GPUs) that feature a many-core, fine-grained parallel architecture provides new and promising solutions to overcome the computational challenge. In this paper, we propose an efficient parallel implementation of the AAM fitting algorithm on GPUs. Our design idea is fine grain parallelism in which we distribute the texture data of the AAM, in pixels, to thousands of parallel GPU threads for processing, which makes the algorithm fit better into the GPU architecture. We implement our algorithm using the compute unified device architecture (CUDA) on the Nvidia's GTX 650 GPU, which has the latest Kepler architecture. To compare the performance of our algorithm with different data sizes, we built sixteen face AAM models of different dimensional textures. The experiment results show that our parallel AAM fitting algorithm can achieve real-time performance for videos even on very high-dimensional textures.
BibTeX
@article{wang2014efficient,
  author = {Jinwei Wang and Xirong Ma and Yuanping Zhu and Jizhou Sun},
  title = {{Efficient Parallel Implementation of Active Appearance Model Fitting Algorithm on GPU}},
  journal = {The Scientific World JOURNAL},
  year = {2014},
  doi = {10.1155/2014/528080},
}
Figure