Research on Face Recognition Algorithm Based on Multi-Class Support Vector Machine

Facial recognition is one of the main research directions in the field of artificial intelligence and image processing. It has been widely used in identity authentication, video surveillance and biological detection. Because it is non-contact, natural, convenient and reliable, facial recognition has become a popular choice for biometric systems. The accuracy of facial recognition still needs to be improved, the main goal of this paper is to improve the accuracy of face recognition. Based on the support vector machine method, the focus is on the feature extraction and feature matching of face images. In view of the particularity of face images, the pre-processing of face images is studied. In this paper, grayscale normalization and geometric normalization pre-processing methods are used. In order to reduce the interference factors of the image as much as possible, the features are high-lighted, and the non-featured parts are weakened, this paper adopts the Histogram of Oriented Gradient feature extraction method. Then we proposed a new method based on SVM, which uses a one-to-many method to construct multiple SVM classifiers, selects the optimal parameters through repeated experiments, and selects ORL face database for testing. The recognition rate can reach about 98.5%.


Introduction
With the continuous growth of image processing technology, face recognition technology has been continuously improved in distributed detection or computer algorithms. Face recognition is not only a combination of a variety of theories-video image processing, classic digital image technology, classification training, etc., but it has always been the "hot spot" of pattern learning biometric recognition [1]. SVM was first proposed in the early 1990s, and once it appeared, it has been widely recognized in the field of machine learning [2]. In 1998, represented by the multi-class algorithm proposed by Weston, the objective function was changed according to the basic classic SVM theory, and a new multi-value classification model was established from scratch for classification [3]. In recent years, in the research on face recognition at home and abroad, the related SVM technology has been developed rapidly [4]. Compared with the traditional convolutional neural network, the early feature data needs too much, the training time is long, the test is unstable, and the detection result fluctuates [5]. The accuracy of the support vector machine is very high, even up to 90% on average, and the classification training time is greatly shortened.
This paper first performs pre-processing such as format and size calculation on the grayscale in the ORL face database; then uses the HOG gradient value square feature extraction method to extract the important features in the image; uses the one-to-many method to construct a multi-class classifier. Determine the optimal solution for recognition and classification; finally, a simulation experiment is performed to compare the SVM method with the best recognition effect in the past two years, see reference [6], which effectively confirms the recognition performance of this paper based on the multicategory support vector machine face recognition algorithm.

Analysis of Feature Extraction Principle
The core idea of the HOG feature is that the shape of the detected local object can be distributed by the light intensity gradient or edge direction [7]. First, grayscale the picture. The picture has a total of 256 gray levels, 0-255, and then use the Gamma formula method. Because the state of the picture, light, shadow, etc. are very different, it is necessary to go to the standard to unify the RGB color space of the picture [8]. By dividing the entire image into small connected areas called cells, each cell generates a directional gradient histogram or the edge direction of the pixels in the cell. To improve accuracy, use measure to normalize all cells in the block. The normalization process achieves better illumination/shadow invariance. The descriptor obtained by HOG maintains the invariance of geometric and optical transformations. The relationship between Block and Cells is shown in figure 1.

Visualization
The cell size divided in this article is 8, and there are 16 blocks in total according to the size of the picture. By calculating the gradient direction of a single cell block, the signature is obtained according to the principle of statistics. Normalize the gradient intensity of all cells in the block to ensure that the HOG feature has better illumination and shadow invariance. The size of our divided block is 2×2 cells, and the number of overlapping cells of adjacent blocks is 2. Combine the feature vectors of all blocks to get the final HOG feature. For a 64×64 image, according to the above calculation method, there are 7 scanning windows in the horizontal direction and 7 scanning windows in the vertical direction. The dimension of the feature vector in each block is 16×4=64, and the final HOG feature The number of dimensions is 49×64=3136 dimensions. In the label training, there are 4096 dimensions, which is the dimension of the original image. The visualized feature extraction is shown in figure 2.

Algorithm of SVM
Support vector machine (SVM) is a general learning machine. The core idea is to map the input vector to a high-dimensional feature space and construct an optimal classification surface in the feature space [9]. SVM uses the kernel function of the original space to replace the inner product operation in the high-dimensional feature space, avoiding the dimensionality limitation. The sample vector is mapped to the high-dimensional feature space through nonlinear mapping, so that the original spatial data image has a linear relationship, and then the linear optimization decision function is constructed in the feature space [10]. Because SVM uses quadratic programming to optimize, it can get the global optimal solution [11], which solves the problem of local minima that cannot be avoided in neural networks. Due to the use of the kernel function, the dimensionality problem is cleverly solved, making the algorithm complexity independent of the sample dimensionality, which is very suitable for dealing with nonlinear problems [12].

SVM Algorithm Description
The principle of the SVM vector machine algorithm is to find the hyperplane that distinguishes the two types and maximize the margin. SVM can be divided into linear SVM and nonlinear SVM according to the degree of linearity. Linearly separable SVM means that two regions can be clearly divided by a line, and the distance d from the line to the support vector is the smallest. Obtaining the hyperplane with the farthest distance of the gathering point by dividing is the essence of the geometric principle of the support vector machine, as shown in figure 3. The middle length of the plane represented by the two lines H 1 and H 2 shown on the screen is called the classification margin. When it rises to a multi-dimensional space, but at this time the parallel line will become a plane, which is the optimal hyperplane. The sample set is x , y , 1, … , , ∈ , ∈ 1, 1 and it is defined as linear. What about the final linearly separable discriminant function ( ) g x wx b   (1) Through quadratic programming (Quadratic Programming), we can get the classification surface we need. It is known that the hyperplane conditions require data points to require |g(x)|=1, so that all data points reach |g(x)|≥1 Standards, subtly translated into questions that convert to exploration||w|| 2 .
1 0, 1, … , It is the optimal hyperplane that can minimize the value of ||w|| 2 and meet the correct classification of the above formula. (3) Take the partial derivative of the two unknowns w and b, take the partial derivative and make them equal to 0, and then convert it into a dual problem to find the maximum value. The constraints are ∑ =0 0, 1, … , (4) * ∑ * (5) However, not all sample data can be linearly programmed and divided. This is our important new concept. Through the mapping function, all the positive and negative samples and the data set are projected into the corresponding high-dimensional space. Reconstruct the kernel function (Kernel Function). In the case of satisfying K , , ϕ • ϕ only this function K needs to be found. The discriminant function will become sgn ∑ * K • * (6)

One vs Rest Classification.
In one-to-many combination classification, a classification function is constructed between each category and all other categories. There are as many vector machines as there are categories. For the m-th SVM, the m-th pattern sample is regarded as one type (positive type), and the remaining k-1 types are regarded as another type (negative type). As shown in figure 4 Figure 4. Classification model diagram.

One vs One Classification.
The training samples of each classification function are two related classes. There are two types of data samples for each classification function. In the experimental test, you can use voting for decision-making. Only two types of samples are considered each time, that is, an SVM model is designed for every two samples. Which category gets the most votes will be judged as which category. The disadvantage of this method is that the classification function increases rapidly with the increase of the number of categories, which slows down the prediction process.

Experimental Simulation
The experimental face samples are selected from the OR face library. There are total of 400 112×92 photos in the library, which are from 40 people. Among the 10 photos of the same person, they have different expressions, different facial details and different postures. As shown in figure 5. The simulation experiment compares the training process and recognition rate of the SVM in the literature [6] and the SVM in this paper.

Face Image Processing
The preprocessing of the image is to reduce the influence of the complex environment on the data we collect. After normalization and gray-scale, the picture is processed into a unified 64×64 format. Using a large number of local gradient histograms to identify features can well guarantee the characteristics of the picture. The specific process of HOG has been stated in Chapter II. Figure 6 is a face image after

SVM Training Process
This paper uses a one-to-many (OvR) method to construct a multi-class classifier, input the face image into the constructed feature extraction classifier, and compare the above-mentioned existing SVM with the SVM method of this paper. In this paper, the batch size epochs is set to be 40. The curves of the accuracy rate with epochs are shown in figure 7 and figure 8.

Experimental Result
Through the training of the database, the performance of the SVM method in this paper is compared with the existing SVM method, as shown in figure 9.
Simulation results shows that the algorithm proposed in this paper achieves a high accuracy rate for image recognition in specific application scenarios. Not only the HOG feature extraction and SVM algorithm are optimized, but also the execution time of the program is reduced. Under a certain penalty factor C, the recognition accuracy is up to More than 0.98.

Conclusion
This paper mainly conducts in-depth research on face feature extraction and support vector machine classifier design. First, perform preprocessing such as format and size calculation on the grayscale image in the ORL face database. Second, we researched HOG feature extraction method for feature extraction. Third, we proposed an improved one-to-many SVM classifier to determine the optimal solution for recognition and classification. Finally, we compared the SVM method of this article with similar classification methods. The simulation results effectively prove that the recognition performance of this paper based on the multi-class support vector machine face recognition algorithm. The accuracy rate has been greatly improved either.