Facial Recognition using a Random Forest based classifier on Histogram of Oriented Gradients
Abstract
In this paper, a facial recognition algorithm that uses a Random Forest (RF) technique on a Histogram of Oriented Gradients (HOG) on images containing face data is analyzed. The paper aims to dissect a modern approach to facial recognition.
More details in our paper here.
Histogram of Oriented Gradients technique
HOG Vectorization Process
Dimensionality of data is reduced by breaking it into NxN square chunks. A single vector is then used to describe each chunk. This vector is based on a gradient scheme, so the direction of the gradient from any given pixel will tend towards the part of the image chunk with the greatest difference in pixel intensity.
Convolved Image Chunk
Convolution operation is performed on the image chunk with [-1,0,1] , [-1,01]` filters. After the convolution, every gradient regardless of image or chunk points at row, column with the highest value, which in this case is bottom right. The image data, however, does vary the direction of this gradient vector, and the vector can be oriented differently depending on the size of the filter kernels.
Convolved Image with highlighted gradient orientations
After calculating the gradient vectors for every pixel in the chunk, each pixel is allowed a weighted vote for a fixed number of directions, with this weighted vote equal to the magnitude of the pixel’s gradient vector. After all the pixels have voted, a single direction with the greatest number of votes is chosen to represent the image chunk in the histogram.
Results
The performance of this Random Forest based classifier working on HOF technique was compared with the more traditional Principle Component Analysis technique.
Random Forest - Histogram of Oriented Gradients
Accuracy - 98.48%.
Principal Component Analysis
Accuracy - 93.4%