Accelerating Viola-Jones Facce Detection Algorithm on GPUs
Haipeng Jia, Yunquan Zhang, Weiyan Wang, Jianliang Xu · 2012
The Viola-Jones face detection algorithm represents a class of parallel algorithms that both memory accesses and work distributions are irregular, thereby hard to obtain high performance on GPUs. Furthermore, conventional GPU programming wisdom usually guides us on how to optimize data parallel workloads with regular inputs and outputs. While how to efficiently write task-level parallelism programs with irregular workloads have not much material to reference. In this paper, we present an OpenCL-implementation of Viola-Jones face detection algorithm with high performance on both NVIDIA and AMD GPUs through five main techniques: warp size work granularity, persistent threads, Uberkernel, local and global queues. We also demonstrate the high performance of our implementation by comparing it with a well-optimized CPU version from OpenCV library. Experiment results show that the speedup reaches up to 5.193 ~35.08 times (16.91 on average) and 5.85 ~32.641 times (17.535 on average) on AMD and NVIDIA GPU respectively.