{'fraction_non_alphanumeric': 0.031122728101635157, 'fraction_numerical': 0.01094158409823111, 'mean_word_length': 4.85688857244571, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Vehicle Face Recognition Algorithm Based on Weighted Nonnegative Matrix Factorization with Double Regularization Terms

In order to judge that whether the vehicles in different images which are captured by surveillance cameras represent the same vehicle or not, we proposed a novel vehicle face recognition algorithm based on improved Nonnegative Matrix Factorization (NMF), different from traditional vehicle recognition algorithms, there are fewer effective features in vehicle face image than in whole vehicle image in general, which brings certain difficulty to recognition. The innovations mainly include the following two aspects: 1) we proposed a novel idea that the vehicle type can be determined by a few key regions of the vehicle face such as logo, grille and so on; 2) Through adding weight, sparseness and classification property constraints to the NMF model, we can acquire the effective feature bases that represent the key regions of vehicle face image. Experimental results show that the proposed algorithm not only achieve a high correct recognition rate, but also has a strong robustness to some non-cooperative factors such as illumination variation.


Introduction
With the rapid growth of the number of vehicles, more fake plate vehicles appear than before, and a large number of surveillance cameras have to be added on roads to monitor these violations [1]. However, it is very difficult to deal with so many videos in time by the traditional manual processing method, therefore, it is of great significance to design an automatic fake plate vehicle detection algorithm for surveillance video. Affected by the installation position and angle of surveillance camera, only the vehicle face area can be captured as shown in Fig. 1.

Fig. 1. The captured vehicle image
Obviously, the vehicle face area contains less features comparing with the whole vehicle, which brings some difficulties to multi-category vehicles recognition, so we need to pay more attention to the characteristics of several key regions in vehicle face images such as logo, grille, light and rearview mirror, etc. In the other words, the vehicle can be recognized by these key regions as shown in Fig. 2. From the above analysis, it is very important to establish the basis images of these key areas, where each vehicle image can be represented by the linear superposition of the basis images. In addition, we hope that while acquiring a suitable set of basis images, the new features obtained by decomposition can be conducive to the correct recognition of vehicle face images. Therefore, the major innovation of this paper is that for the multi-category and limited annotated vehicle face images, the feature bases which represent the key regions of vehicle face can be acquired based on the improved NMF model, where the NMF model can meet the requirements of the basis images and new features well. The remainder of this paper is organized as follows. In section 2, some related works are addressed. The original feature extraction of vehicle face image is completed in section 3. In section 4, an improved NMF method for vehicle face recognition is proposed. Section 5 uses a projected gradient algorithm to solve the proposed NMF objective function. We prove the effectiveness of the proposed algorithm through experiments in section 6. Finally, the conclusion is drawn in section 7.

Related Work
The development of vehicle recognition technology mainly experiences two key stages, which are based on traditional artificial feature extraction and deep learning respectively.
(1) Artificial feature extraction and classification. As an important global feature, color information has been widely used in vehicle recognition by scholars. For instance, Baek [2] and Kim [3] extracted the color histograms as the vehicle feature from RGB and HSV color spaces respectively; However, in the captured image the vehicle color is susceptible to light, so the specular-free image and the weighted-light-influence image were introduced by Hu [4], which make the extracted color features more robust to illumination variation; And besides color information, the texture, edge and shape of vehicle were also used as important global features by Chen [5]，Negri [6]，Zhang [7]. With the increasing number of vehicle types, there are minor visual differences between some vehicles of different types, so it is necessary to describe vehicle details by extracting local features. Lam [8] proposed a multi-scale spatial model to describe the vehicle local texture; Similarly using multi-scale theory, Psyllos [9] realized vehicle Logo recognition based on Scale-Invariant Feature Transform (SIFT) feature; And for some non-coorperative factors such as partial occlusion, attitude or angle variation, Deformable Part Model (DPM) and feature descriptor were adopted by Li [10] and Zhang [11], which make the recognition algorithm robust to the above factors. In addition, in order to represent the vehicle structure better, Leotta [12] and Yebes [13] modeled the vehicle in three-dimensional space.
(2) Vehicle recognition based on deep learning. The purpose of deep learning is to analyze the image layer by layer from shallow to deep by simulating the brain, and improve the accuracy recognition [14]. In recent years, deep learning has been widely used in vehicle recognition. For instance, Zhang [15] and Hu [16] achieved vehicle body color recognition accurately by combining Convolutional Neural Networks (CNN) model with spatial pyramid model; And Liu [17] and Hu [18] achieved vehicle recognition based on Fast Region Convolutional Neural Networks (Fast R-CNN) and Boltzmann machine respectively; In addition, Deep neural network (DBN) model is adopted by Wu [19] and Wang [20] to realize vehicle classification. In brief, the deep learning models mentioned above have achieved certain results in varying degrees.
From the above analysis, we can see that most of the researchers focused on the recognition based on the whole vehicle image, and there are relatively few studies on vehicle face recognition at present. Therefore, it will be of great significance to propose an effective vehicle face recognition algorithm.

Original Feature Extraction
Influenced by illumination variation, there may be some color difference for the same vehicle in different captured images as shown in Fig. 3, which reduces the effectiveness of the color feature-based recognition algorithms. In addition, under the condition that the number of annotated samples is limited, the algorithms based on deep learning are also difficult to achieve good effect. Therefore, we will pay more attention to the local regions with significant features, such as logo, grille, light and rearview mirror, etc.
According to image processing knowledge, the regions are surrounded by edges, and the edges are formed by the high-frequency pixels with similar directions, so it is critical to represent the frequency information of these pixels accurately for original feature extraction [21]. Because the Histogram of Oriented Gradient (HOG) takes into account both the frequency and direction features, it is reasonable to use HOG as the original feature of vehicle face image. Then, the preprocessed image is divided into some blocks, each of which is M M × pixels in size, and the adjacent blocks overlap T pixels. As a result, the number of blocks k can be obtained by Eq.1.
In addition, the number of angle intervals is supposed as t , the original eigenvector dimension will be n , where n k t = × .

Feature Dimension Reduction Based on Improved NMF
It is very important to acquire the effective feature bases for vehicle recognition which represent the key regions of vehicle face, the common dimension reduction methods include Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), etc [23][24], where the elements of decomposition matrix can be positive or negative based on these methods. The negative elements are acceptable mathematically, but are hard to be explained in building basis images because of lacking of physical meanings [25]. For example, we know that face image can be constructed through the linear superposition of basis images, where the pixel values and the weight coefficients should be not negative in the factorization matrices. Therefore, it is more appropriate to adopt NMF based dimension reduction method, where the idea of NMF is that a given nonnegative matrix can be represented by two nonnegative matrices multiplication approximatively as Eq.2 [26], where all column vectors of Y are the original feature vectors, all column vectors of U and V represent the basis vectors and the weighted coefficient vectors respectively, and the decomposition error should be small enough as Eq.3.
In order to make the decomposition more conducive to accurate recognition, it is necessary to add some appropriate constraint conditions to the decomposition besides the nonnegative constraint. Here, we can consider this problem from the following three aspects.
(1) Weighted constraint. The decomposed basis vectors can be considered to represent the different regions of vehicle face, and the important degrees of these regions are different during recognition, so it is reasonable to add weighted constraints to basis vectors, where the objective function Eq.3 can be improved to Eq.4, where Z represents the weight matrix.
(2) Sparse constraint. Generally, only a small number of basis vectors play important roles in recognition, which are considered to represent the key regions of vehicle face, so it is necessary to add sparse constraint to the weight matrix Z , and the objective function Eq.4 can be improved to Eq.5.
According to compressed sensing [27], it is a NP-hard problem to solve matrix 0-norm, so we use 2-norm instead of 0-norm in solving the sparsity of matrix, and Eq.5 is further improved to Eq.6, 2 2 , where α is a balance parameter.
(3) Classification property constraint. According to pattern recognition theory, the features of the samples with the same label should be as similar as possible [28 -29]. Therefore, we add the within-class similarity and inter-class distinction measures to the objective function, and the final objective function is shown as Eq.7, where β is another balance parameter other than α , ( ) The auxiliary matrix A is required as shown in Eq.8, where c and i d are the numbers of the labels and the samples with label-i respectively in Y , and i V represents the average feature vector of the samples with label-i.
( ) The inter-class distinction function ( ) e f V : The auxiliary matrix B is required as shown in Eq.12, where V is the average feature vector of all samples.
In summary, the objective function can be written in the form of Eq.16.

Objective Function Solution Based on Projected Gradient Method
In order to take the partial derivative conveniently, the function ( ) , J , U Z V can be written to Eq.17, The partial derivatives are shown in Eq.18, Eq.19 and Eq.20.
After the iteration rules are determined, the training and recognition methods of the proposed NMF model can be summarized as shown in Method 1 and Method 2 respectively.

Method 1
Input: All original feature vectors and their labels in Y , two balance parameters α and β . Step.1: , the maximum number of iterations max n , and the error threshold e . In addition, the count variable t is set as 0. Step.2: Step.3: Solve Step.5 else goto Step.4 Step.4: Update U , Z and V .
Step.2 Step.5: Acquire * U , * Z and * V . End training. Method 2 Input: The original feature vector of the unknown vehicle face image w Y , and the similarity threshold ξ .
Step 1: Solve Step 2: There is no matching result of w Y in the data set; where ( ) , , According to [25], the iteration has been proved to be convergent.

Data Set
At present, there is no large-scale public data set of vehicle face images, so we build a new data set, where all vehicle face images were taken from 22 surveillance cameras which were distributed on different roads. The number of captured images is 103028, of which 80197 are effective, and some of the samples are shown in Fig. 5. In the effective samples, there are 4136 pairs of vehicle face images, each of which represents the same vehicle, so we select these images as the positive test samples. In addition, 5000 pairs of vehicle images are selected as the negative test samples, where each pair of images represent the different vehicles.

Parameters Setting
In the proposed algorithm, some parameters are determined according to experience, and the others are acquired based on experimental results.
(1) The experience-based parameters. According to the research experience about other recognition problems, the empirical values of some parameters can be given in the proposed algorithm. In Eq.1, 256 N = , 32 M = , 8 T = ; In Eq.2, the number of training samples 600 m = ; In addition, the number of HOG angle intervals t and the maximum number of iterations max n are set as 8 and 25000 respectively. (2) The experiment-based parameters. Besides the above empirical parameters, there are 4 parameters r , α , β and ξ which need to be determined experimentally, that is, through comparing the recognition performances under different parameters, we can obtain the most appropriate parameters which make the recognition effect best.
From the above analysis, it is reasonable to determine the parameters r , α and β according to Eq.24, where gar G represents Genuine Accept Rate (GAR), and the experimental result is shown in It can be seen that when 0.86 ξ = , the best classification result can be acquired.

Comparison and Analysis of Algorithms
After determining all parameters of the algorithm, we compare the proposed algorithm with some dimension reduction methods such as PCA [30], LDA [24], Sparse NMF (SNMF) [31], Discriminant NMF (DNMF) [25], and t-SNE [32] some existed vehicle recognition algorithms which are based on color feature [3], SIFT feature [9], 3D model [13] and CNN [15,17] respectively by FAR-FRR curves, where the comparison results are shown in Fig. 8. (1) PCA belongs to unsupervised learning, although the feature dimensions can be reduced effectively, the contribution to classification is not great, which leads to that the recognition effect is unsatisfactory. Different from PCA, LDA belongs to supervised learning, and the dimension reduction is realized according to the feature differences, so the recognition effect based on LDA is better than those based on PCA. From the analysis in Section 4, NMF has been used more and more because of its physical meaning, and according to pattern recognition theory, sparse and discriminant constraints are usually added to the NMF model, which can further improve the recognition effect. In addition, t-SNE is a non-linear dimensionality reduction method, and it can retain the local features of the vehicle face images well, so the recognition effect can be also improved. In the proposed algorithm, we add classification property constraint to the NMF model according to the special characteristics of vehicle face image, which makes the feature more conductive to recognition after dimension reduction.
(2) Under different illumination conditions, the same color vehicles will appear a certain degree of color differences in the captured images, which weakens the effectiveness of the color-based recognition algorithms, in other words, the algorithms have weak robustness to illumination variation. The key point in vehicle image is another important feature besides color such as SIFT point, but there are relatively few feature points in some vehicle face images, which reduces the feature effectiveness and brings difficulties to recognition. Different from the above manually extracted features, more effective features can be extracted automatically based on deep learning methods such as CNN. However, only a limited number of samples are annotated in the data set, so the over-fitting problem may be easily caused in the training process of model, which will affect the universality of the model greatly. Since only the vehicle face region is captured, it is concluded that the extracted features based on 3D are not very effective.
According to the above experimental results and analysis, the better recognition results can be achieved based on the proposed algorithm in terms of accuracy and robustness.