Face recognition based on improved BP neural network

In order to improve the recognition rate of face recognition, face recognition algorithm based on histogram equalization, PCA and BP neural network is proposed. First, the face image is preprocessed by histogram equalization. Then, the classical PCA algorithm is used to extract the features of the histogram equalization image, and extract the principal component of the image. And then train the BP neural network using the trained training samples. This improved BP neural network weight adjustment method is used to train the network because the conventional BP algorithm has the disadvantages of slow convergence, easy to fall into local minima and training process. Finally, the BP neural network with the test sample input is trained to classify and identify the face images, and the recognition rate is obtained. Through the use of ORL database face image simulation experiment, the analysis results show that the improved BP neural network face recognition method can effectively improve the recognition rate of face recognition.


Introduction
Face recognition method is one of the popular research topics in the field of pattern recognition and computer vision.Face recognition technology is widely used in identity authentication, finance, file management, human-computer interaction and other fields, has a very large practical value [1][2]

Histogram equalization
Due to the collection of face images will be subject to other factors such as lighting causes the image quality is not uniform, the image contrast is low.Histogram equalization is an image enhancement method that adjusts the contrast of an image by an image histogram.
After processing the histogram of the image can be presented evenly distributed features, the image contrast is increased.
The process of histogram equalization: First, we obtain the probability distribution of all gray levels in grayscale image in turn.The f i represents the gray level, n i represents the number of occurrences of the ith gray level, N represents the total number of pixel pixels, P (f i ) represents the ith gray level of the frequency, then: Then calculate the cumulative distribution function: = (2) Remember for the histogram equalization after the gray level, then: (3 Where INT is the rounding operation.
Histogram equalization is a mapping of and fi.
The gray scale of the image after the equalization is evenly distributed, thus increasing the contrast of the image and facilitating the processing of the later algorithm of face recognition.

Principal component analysis
Principal Component Analysis (PCA) [5][6]  Find the mean of matrix x: The difference between each row vector and the mean of the x matrix is: ( Calculate the covariance matrix for the x matrix: The covariance S is a matrix of N * N. In general, it is very difficult and time-consuming to obtain the eigenvalues and eigenvectors of the covariance matrix S directly because of the large number of samples to be trained (N is large).
Therefore, the SVD theorem is used to obtain the eigenvalues of matrix S and its corresponding eigenvectors.
Let the matrix , where F is the diagonal matrix, U, V is the orthogonal matrix, its form is as follows.

Improved weight adjustment method
The conventional BP neural network uses the gradient descent method to adjust the weight, but there will be a problem that the convergence rate of the network is slow and easy to fall into the local minimum point.For the problem in the conventional BP network, a method of weight adjustment based on the combination of the additional momentum [8] and the elastic gradient is adopted.This improved weighting method is used to improve the convergence speed and learning accuracy of the network.
The weight adjustment method of the improved weight adjustment method at t + 1 is: When the iteration gradient is the same for two  It can be seen from Fig. 4 that the algorithm used in this paper is superior to the traditional PCA + BP neural network and PCA + KNN algorithm.
In this paper, the algorithm achieves a recognition rate of 97.4% when the feature vector dimension is 30.When the feature vector dimension is greater than 30, the recognition rate fluctuates in a small range.

Conclusion
The main feature data of the image is obtained by PCA algorithm, and then the parameters of BP neural network are selected according to the extracted feature data.The improved weight adjustment method is used to train the network.
. The face recognition process consists of four main parts: face extraction, face image preprocessing, feature extraction, classification recognition.Improving the recognition rate is the main research content of face recognition.After decades of development, face recognition has many classical recognition algorithms, such as principal component analysis method for face recognition, geometric feature matching method based on board, PCA, eigenface, wavelet transform[3], Hidden Markov model.In recent years, with the deepening of artificial neural network research, artificial neural network is widely used in pattern recognition, system identification and so on.In the artificial neural network, the most widely used network structure is BP neural network.BP neural network using the classical error back propagation algorithm for training, can deal with linear indivisibility.MATEC Web of Conferences 139, 00063 (2017) Combined with the characteristics of BP neural network, an algorithm based on histogram equalization[4], PCA and BP neural network fusion is proposed.Used to improve the recognition rate of face images.
is a very effective way to reduce the dimensionality of high-dimensional data.The basic principle of principal component analysis is to extract the main components of the data by K-L transformation with the minimum mean square error as the criterion, and constitute the feature space.Turk and Pentland A were the first researchers to use the PCA method for face recognition.Because of the large number of face samples and the large amount of data in face recognition, the reduction and compression of the sample data by PCA method can significantly reduce the data processing time and recognition time.The training face grayscale images have N, each picture matrix is processed into a row vector, N row vector composed of N*1 dimensional matrix = T .
Where, r=min(m, n), i=(1,2,…,r), denotes the non-zero eigenvalues of the matrix HHT and H T H. MATEC Web of Conferences 139, 00063 (2017) U i and V i represent the eigenvectors corresponding to the nonzero eigenvalues of the matrix and , respectively.Use to represent singular values.According to the SVD theorem, when we know that the r nonzero eigenvalues of A T A and the corresponding eigenvectors are denoted by λ i i=1,2 ... r and v i respectively, we can compute the eigenvectors of A T A u i is: (10) The eigenvector of the image can be calculated, and the eigenvector corresponding to the larger eigenvalue is called the principal component of the image matrix.The reconstructed image of the principal component of the face image matrix becomes the eigenface.4BP neural networkBP neural network is a network containing multiple hidden layers, with the ability to deal with linear indivisibility problems.BP neural network is the core of the forward neural network, which is the essence of the whole artificial neural network.BP neural network is used by error back propagation algorithm, the algorithm to solve the multi-layer neural network learning problems[7].The actual use of BP neural network structure is very common, accounting for about 80%, which is widely used in classification and identification, system identification, compression and other fields.In this paper, BP neural network is used to classify and identify face images.Train the BP neural network to make it a classifier for face images.

5 Simulation and result analysis 5 . 1 simulation( 1 )
consecutive times, the update value of the weight increases and the adjustment direction of the weight remains unchanged.Update the value of Δt to adjust the formula: MATEC Web of Conferences 139, 00063 (2017) formul for up t n th v lu Δt t th s t m The experiment is programmed on software Matlab 2012a.In this paper, we selected 400 face images (40 people, 10 per person) of the ORL face database with 112 * 92 as the training and test sample set.Each person's 10 images, facial expressions and gestures have varying degrees of change, the scale of the image changes in about 10%.In the course of the experiment, each of the 10 images are divided into two groups, each group of five.The training samples were the first five images of each set of image samples, and the last five images of each sample of the sample were tested.The face image feature has been enhanced to enlarge the dynamic range of image gray scale, after histogram equalization.The original image and the image histogram equalization contrast, as show in fig.2.

Finally, the training
of BP neural network is used to classify and identify the face images.Using ORL face database of face images in MATLAB 2012a software simulation experiments.According to the simulation results, the improved BP neural network face recognition method can effectively improve the recognition rate of face recognition.