A system and algorithm for improving face recognition accuracy based on machine learning
By building a local face database based on machine learning systems and algorithms, it solves the problems of missed control and difficult data backtracking in traditional face comparisons, improves the accuracy and efficiency of face recognition, and achieves accurate face recognition in the entire area. Identification and historical data management for smart communities and public safety.
Patent Information
- Application Number
- CN202011005885.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-09-23
AI Technical Summary
Face comparison in traditional video analysis requires the original face database, which may result in unrecorded persons being missed, and the historical trajectory information of newly added faces cannot be traced back, making it impossible to effectively compare the entire area, affecting the application value of surveillance videos. .
Using systems and algorithms based on machine learning, through Asian face feature training models, face recognition comparison algorithms and face grouping sample library optimization algorithms, a local face database system is built to improve face recognition accuracy and reduce the risk of misidentification. And supports data backtracking and historical data tracing.
It improves the accuracy and efficiency of Asian face comparisons, reduces the risk of face misrecognition, enables accurate face recognition and effective management of historical data in the entire region, and supports wide application in smart communities and public security fields.
Smart Images

Figure CN112287753B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence machine learning, and in particular to a system and algorithm for improving face recognition accuracy based on machine learning. Background Art
[0002] The application scenarios of facial recognition are very broad, and currently there are two main areas: one is the financial industry and the other is the security industry.
[0003] The second is in the security industry. The demand for video face images is also gradually increasing. With the continuous improvement of safe city construction, video applications are gradually being valued. How to play the role of surveillance video in the later stage has become an important research topic in the direction of video application.
[0004] In traditional video analysis, face matching often requires an original face database managed by key personnel. Screening by matching the original face database may lead to staff missing the faces of people who have not been entered, and it is impossible to trace the historical trajectory information of newly added faces.
[0005] Therefore, there is an urgent need for a face database system that is independent of the original database in the entire region. The system collects faces extensively and builds a face group for each person, continuously improves the local face database samples, and self-optimizes the group samples through machine learning to ensure that a group is the same person, providing technical support for the statistics of the local population database, and the subsequent tracing of new data and video analysis. Summary of the invention
[0006] The purpose of the present invention is to provide a system and algorithm based on machine learning to improve the accuracy of face recognition, to improve the local face library system and precise recognition algorithm through the accumulation of face data, and to provide guarantees for the application of face recognition comparison and analysis and the tracing of historical face data.
[0007] The technical solution to achieve the purpose of the present invention is: the present invention improves the recognition accuracy of the face database through the following three methods;
[0008] Training model for Asian facial features
[0009] Due to the differences among different races, especially the great differences among foreign faces in Europe and America, the use of general facial feature recognition algorithms for Asians has problems such as large errors and low thresholds. Therefore, through continuous training of Asian faces, the average facial features of Asians can be obtained, and then the normalization algorithm can be used to achieve accurate recognition of Asian faces.
[0010] Face recognition comparison algorithm
[0011] Face comparison based on the normalized value of face sample grouping sets can effectively solve the efficiency and accuracy problems in the face grouping and comparison process. At the same time, using the average eigenvalue for the comparison of sample groups can improve the efficiency of face comparison, improve the accuracy of data, and reduce the requirements for hardware on resource consumption.
[0012] Face grouping sample library optimization algorithm based on machine learning
[0013] The face grouping sample library [1, S] is the basis for all new face comparisons. How to improve the accuracy of the face library, filter out junk face data, and retain clear, positive-pose images of the same person is crucial to improving the accuracy of face recognition. This algorithm uses a machine learning model, combined with an undirected graph and Euclidean distance weights, to continuously optimize the quality of face features in the face grouping sample library [1, S], thereby improving the accuracy and comparison performance of the system.
[0014] The present invention adopts a training model based on Asian facial features, a face recognition and comparison algorithm, and a face grouping sample library optimization algorithm based on machine learning to build a local face library system, which can effectively improve the accuracy of face recognition and reduce the risk of face misidentification. At the same time, through the machine learning model, the face comparison sample library can be continuously improved to provide guarantees for the application after face recognition comparison analysis and the tracing of historical face data.
[0015] Specifically:
[0016] A system and algorithm for improving face recognition accuracy based on machine learning (referred to as the system)
[0017] The system comprises a face data collection unit, a face recognition and comparison unit, a face grouping sample library machine learning unit and a local face library system; the face data collection unit interacts with the face recognition and comparison unit, and the face recognition and comparison unit interacts with the face grouping sample library machine learning unit and the local face library system respectively; the face data collection unit comprises the first, second...N face data collection units 110, 120...1N0, N is a natural number, 1≤N; the face recognition and comparison unit comprises a face data structuring module 210, a face feature extraction module 220, a face feature recognition algorithm module 230 and a face library comparison and grouping module 240 which interact in sequence; the face grouping sample library machine learning unit 300 comprises a face grouping sample feature library 310, a face grouping sample library feature extraction module 320 and a face grouping sample library optimization algorithm module (330) which interact in sequence; the grouping result obtained by the face grouping sample library machine learning unit 300 is saved in the local face library system (400) and provided to the user for data viewing and analysis.
[0018] The present invention has the following advantages and positive effects:
[0019] More accurate grouping of Asian faces: In the absence of original accurate comparison face samples, the facial features based on convolutional neural networks can continuously improve the facial feature model of Asians, and use a normalization algorithm to improve the accuracy of Asian face comparison;
[0020] More extensive face grouping and collection: The face database built based on machine learning collects, analyzes and stores all faces, which can support later data backtracking and retrieval of newly added face data. No one's face is missed, and newly added faces will be grouped automatically. At the same time, the accuracy of samples is continuously optimized based on the machine learning grouping model to achieve accurate recognition.
[0021] The face grouping recognition algorithm is simple and efficient: face comparison based on the normalized value of the face sample grouping set can effectively solve the efficiency and accuracy problems in the face grouping comparison process. At the same time, using the average eigenvalue for the comparison of the sample group can improve the efficiency of face comparison, improve the accuracy of the data, and reduce the requirements for hardware resource consumption.
[0022] High system scalability: Based on loosely coupled architecture technology and combined with the population database system, nodes can be elastically expanded to improve the elasticity and scalability of the system;
[0023] Wider application fields: It can be widely used in smart communities, smart cities and public security fields to improve the efficiency of clue retrieval and case handling. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is the structural block diagram of this system;
[0025] Figure 2 It is an undirected weighted graph of the grouped sample data components of this system.
[0026] In the figure: 100, face data collection unit; 110, first face data collection unit; 120, second face data collection unit; 1N0, Nth face data collection unit. 200, face recognition and comparison unit; 210, face data structuring module; 220, face feature extraction module; 230, face feature recognition algorithm module; 240, face library comparison and grouping module; 300, face grouping sample library machine learning unit; 310, face grouping sample feature library; 320, face grouping sample library feature extraction module; 330, face grouping sample library optimization algorithm module; 400, local face library system. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] Example 1
[0029] See also Figure 1 A system and algorithm for improving face recognition accuracy based on machine learning, the system includes a face data collection unit 100, a face recognition comparison unit 200, a face grouping sample library machine learning unit 300 and a local face library system 400, the face data collection unit 100 interacts with the face recognition comparison unit 200, the face recognition comparison unit 200 interacts with the face grouping sample library machine learning unit 300 and the local face library system 400 respectively, the face data collection unit 100 includes 1, 2...N face data collection units 110, 120...1N0, N is a natural Number, 1≤N; the face recognition and comparison unit 200 includes a face data structuring module 210, a face feature extraction module 220, a face feature recognition algorithm module 230 and a face library comparison and grouping module 240 that interact in sequence, the face grouping sample library machine learning unit 300 includes a face grouping sample feature library 310, a face grouping sample library feature extraction module 320 and a face grouping sample library optimization algorithm module 330 that interact in sequence, the grouping result obtained by the face grouping sample library machine learning unit 300 is saved in the local face library system 400 and provided to the user for data viewing and analysis.
[0030] Example 2
[0031] See also Figure 1 The face recognition and comparison unit 200 includes a face data structuring module 210, a face feature extraction module 220, a face feature recognition algorithm module 230 and a face library comparison and grouping module 240 that interact in sequence. It mainly realizes the structuring process of the face data collected by the face data collection unit 100, recognizes the face, reduces the dimension for analysis, and finally determines the identity information of the face by comparing the grouped sample library generated by the face grouping sample library machine learning unit 300, realizes the classification and storage of face data, and provides it to the local face library system 400 for application analysis.
[0032] Face data structuring module 210
[0033] By connecting with the face data acquisition unit (100), face image information of the camera can be obtained, and accurate extraction of face pictures can be achieved through video format standardization processing, face image enhancement algorithm, and face cutting. A face image with high accuracy is generated through face detection, face alignment, and face verification technology, and provided to a face feature extraction module (220) for face feature extraction.
[0034] Face feature extraction module 220
[0035] The facial key point detection is performed by using the convolutional neural network facial detection technology in the C++ toolbox. First, the face in the image needs to be detected and the key point posture of the face needs to be estimated. There are 68 facial key points, which are points in various parts of the face, such as the corners of the mouth, the edges of the eyes, etc., and finally a 128-dimensional facial feature vector is generated and provided to the facial feature recognition algorithm module 230 for face recognition, and finally the target face is grouped.
[0036] Facial feature recognition algorithm module 230
[0037] By correcting facial features and combining with the Asian facial feature training model, feature dimensions that conform to Asian facial features are calculated and provided to the face library comparison and grouping module 240 for comparison with the entire face sample library.
[0038] Face database comparison and grouping module 240
[0039] A similarity comparison is performed between the newly added facial features and the feature values calculated by the face group sample library. When the comparison result is less than the threshold, it is determined to belong to the face group. When the comparison result is greater than the judgment threshold, it is new facial data and it is necessary to add a new face group in the face group sample library machine learning unit 300 and the local face library system 400.
[0040] The face database system and algorithm based on the machine learning model to improve the accuracy of face recognition have the following working principles: the face data structuring module 210 performs image enhancement and standardization processing on the data of the face data acquisition unit 100 to generate a face image with high accuracy; the face feature extraction module 220 obtains the face key point detection on the image processed by the face data structuring module 210 through the convolutional neural network face detection technology in the C++ toolbox, and extracts the face feature value, which is provided to the following process for face recognition; the face feature recognition algorithm module 230 calculates the feature dimension that conforms to the Asian face feature by correcting the face feature and combining it with the Asian face feature training model, and provides it to the face database comparison and grouping module 240 for comparison with the full face sample library; the face database comparison and grouping module 240 performs similarity comparison between the newly added face features and the feature values calculated by the face grouping sample library;
[0041] a. When the comparison result is less than the threshold, it is determined to belong to the face group;
[0042] b. When the comparison result is greater than the judgment threshold, it is new face data.
[0043] After face recognition, the face data enters the face grouping sample library machine learning unit 300 to optimize the sample training model and improve the accuracy of the grouped samples. After face recognition determines the grouping, the data enters the local face library system 400 for the corresponding grouping. If there is no grouping, a new face grouping is added and provided to the application for analysis.
[0044] Face grouping sample library machine learning unit 300
[0045] The face grouping sample library machine learning unit 300 mainly implements the maintenance function of face grouping samples. With the help of machine learning technology, it realizes machine learning of the comparison grouping samples, continuously optimizes the quality of face images in the group through the optimization model, achieves the optimal grouping structure, and provides it to the face recognition comparison unit 200 for comparison and analysis.
[0046] Face grouping sample feature library 310
[0047] The face grouping sample feature library 310 stores the grouping of the comparison samples and is used to provide the face recognition comparison unit 200 with the comparison feature value information.
[0048] Face grouping sample library feature extraction module 320
[0049] After adding new samples, the face grouping sample library feature extraction module 320 will extract the feature value of the sample, calculate the average feature value of the sample, generate the comparison feature value of the grouped sample, and update the face grouping sample feature library 310.
[0050] Face grouping sample library optimization algorithm module 330
[0051] After adding new samples, the face grouping sample library optimization algorithm module 330 will trigger the face machine learning model in the sample. The grouped samples are optimized and poor quality or erroneous data are automatically eliminated. When the value of the set number is less than the sample number threshold, the image features are added to the sample for analysis; when the set number is greater than the sample number threshold, the value with the largest sum of Euclidean distances in the set is taken to eliminate the set. As the amount of data increases, facial feature samples with a long Euclidean distance will gradually be eliminated by the system, and facial features with a high degree of similarity will continuously update the samples of each group to achieve accurate comparison of the same person.
[0052] The workflow of the face grouping sample library machine learning unit 300 is:
[0053] When the face grouping sample feature library 310 is initialized, in the case of no face grouping, a new sample grouping is performed for the newly added face pictures, including the face grouping number, the grouping face comparison feature value, the number of face pictures, etc. Specifically, each group includes a plurality of records of the face grouping number, the comprehensive distance score within the face group, the face picture position, the face feature value, the ranking within the face group, etc., to realize the initialization operation of the face grouping sample feature library; the face recognition and comparison unit 200 analyzes the completed face data, and performs sample training and learning according to the recognition result;
[0054] a. When the newly added face group does not exist, add a new group;
[0055] b. When the newly added face group already exists, add it to the group for sample learning.
[0056] After the newly added pictures are grouped, the system will trigger the face grouping sample library optimization algorithm module 330 to perform the face feature machine learning algorithm and update the parameters of the grouping model;
[0057] a. Perform dimensionality reduction feature extraction on the newly added faces combined with the Asian training model;
[0058] b. Add the newly added face images to the grouping model and construct an undirected weighted graph for the grouped samples, where the weight is the Euclidean distance between each node;
[0059] c. Calculate the sum of the Euclidean distances between all points of all facial features in the grouped set, and update the data to all nodes in the set;
[0060] d. Sort the distance sums calculated within the group from small to large according to the sum of Euclidean distances. The smaller the Euclidean distance, the more similar the facial features are.
[0061] e. Optimize the grouped samples N and automatically remove the data set with the largest Euclidean distance.
[0062] The face group sample library feature extraction module 320 extracts the feature values of the sample groups, calculates the sample average feature values, generates comparison feature values of the grouped samples, and updates the face group sample feature library 310 .
[0063] Local face database system 400
[0064] The local face database system 400 is the end point of face recognition comparison and is responsible for providing face grouping data to other systems for calling and business analysis.
[0065] The working mechanism of this system is as follows:
[0066] The face data collection unit 100 is responsible for the data collection work of the entire system. It can be connected to the camera or to standard data such as the national standard view library. There can be multiple data collection units; the face recognition and comparison unit 200 realizes the structuring process of the face data collected by the face data collection unit 100, recognizes the face, reduces the dimension analysis, and obtains the face feature value; the face library comparison and grouping module 240 of the face recognition and comparison unit 200 performs a similarity comparison on the newly added face features and the feature values calculated by the face grouping sample library to determine the identity information of the face; the comparison result is divided into two parts, one part is provided to the local face library system 400 for application analysis, and the other part is provided to the face grouping sample library machine learning unit 300 for sample machine learning; after the newly added picture is grouped, the system will trigger the face grouping sample library optimization algorithm module 330 to perform the face feature machine learning algorithm and update the parameters of the grouping model; after the sample grouping is determined, the face grouping sample library feature extraction module 320 will extract the feature value of the sample grouping and calculate the average feature value of the sample grouping; the new sample grouping information is updated to the face grouping sample feature library 310.
[0067] algorithm
[0068] Face feature extraction algorithm
[0069] The eigenface reflects the information implicit in the face sample set and the structural relationship of the face. The eigenvectors of the covariance matrix of the sample set of eyes, cheeks, and jaws are called eigeneyes, eigenjaws, and eigenlips, collectively known as eigensubfaces. The eigensubface generates a subspace in the corresponding image space, called the subface space. The projection distance of the test image window in the subface space is calculated. If the window image meets the threshold comparison condition, it is judged to be a face. In this method, the C++ toolbox is used to realize facial feature detection for facial feature extraction. By using the convolutional neural network facial detection technology in the C++ toolbox to obtain facial key point detection, a 128-dimensional facial feature vector Ω can be generated. T , provided to a facial feature recognition algorithm module (230) for facial recognition;
[0070] Ω T =[ω1,ω2,......,ω 128 ]
[0071] Training model for Asian facial features
[0072] Due to the differences between different races, especially the large differences in the faces of foreigners such as Europeans and Americans, the use of general facial feature recognition algorithms for Asians has problems such as large errors and low thresholds. Therefore, through continuous training of Asian faces, the average facial features of Asians can be obtained, and then the normalization algorithm can be used to accurately recognize Asian faces; assuming that the system has recognized h facial images (the h is a natural number representing the number of facial images processed by the system, 1≤h). The face recognition algorithm puts the h facial feature value vectors T into a set N, as shown in the following formula: h={T1,T2,T3,T4,......,T h}Calculate the average value of the Asian face training model; after obtaining the face vector set h, calculate the average eigenvalue Ψ h . Traverse the vectors in the set features, accumulate them, and then take the average value. The "average face" of the Asian face feature set h is obtained, as shown in the following formula: When an Asian face k is added (k is a natural number representing a new face, 1≤k), the training model needs to be adjusted again. The new average eigenvalue of the Asian face is calculated as follows: Update the current Asian training model mean to ψ k , assigned to the global variable ψ h .
[0073] Face recognition comparison algorithm
[0074] Directly calculate the distance between the test image and the sample image to determine the similarity between the two. In face recognition, Euclidean distance and cosine distance are used to measure the similarity of facial features to determine whether they are the same person. The specific process is as follows: Face feature extraction, through face feature extraction, extract the 128-dimensional face feature value of the newly added face, as shown in the following formula: Ω T =[ω1,ω2,......,ω 128 ] By using the mean of trained Asian faces to perform face dimensionality reduction, the mean of each dimension is subtracted from the data of that dimension, and the normalized dimension value corresponding to face k (k is a natural number representing a newly added face, 1≤k) can be obtained, as shown in the following formula: Φ k =T k -ψ hGet the average feature set [1, S] of the face group sample library (S is a natural number representing the number of group sample sets, 1≤S), and get the group sample normalization value set [1, Φ S ]; face comparison, traverse the grouped sample normalized value set [1,Φ S ], using Euclidean distance and cosine distance to measure the similarity of facial features and determine whether they are the same person. The Euclidean calculation formula is as follows: Set the judgment threshold to D (D is a decimal, representing the Euclidean distance threshold of two faces, 0≤D≤1). When the distance is less than the threshold D, it means that the face to be judged and the face in the training set are the same person. When the distance value is greater than the threshold D after traversing all training sets, it can be divided into two cases: a new face or not a face. The threshold setting can be adjusted dynamically according to different training sets;
[0075] Average feature algorithm for face grouping sample library
[0076] The algorithm implements the feature algorithm process of the face sample library. Through this algorithm, the sample library feature algorithm can be implemented to reduce the number of comparisons for large-scale face comparisons, improve the comparison efficiency, and quickly calculate millions of data; the face feature sample set is initially [1, S]. In the absence of original accurate comparison samples, the newly added face sample grouping automatically generates a new sample set N according to the recognition results. For the existing face sample group, the face data is added to the sample group to perform machine learning of the sample (the S is a natural number representing the number of grouped sample sets, 1≤S); the face feature group N is classified. A single face sample group set N is obtained through the comparison results. Set N is a set containing M face images (the M is a natural number representing the number of face images in a sample group N, 1≤M≤40). The face feature value vectors T of M individuals are put into a set N through the face recognition algorithm, as shown in the following formula: N={T1,T2,T3,T4,......,T M}The average feature of the face sample group set N. After obtaining the face vector set N, the average feature value Ψ is calculated. The calculation formula is as follows: the vectors in the set N are traversed and accumulated, and then the average value is taken; the obtained Ψ is a 128-dimensional vector, and the "average face" of the face sample group set N can be obtained, as shown in the following formula: The feature normalization algorithm of the face sample grouping set N can reduce the differences between different races and amplify the features of similar races through normalization. The difference Φ between each image and the average image is calculated by subtracting the average value of Ψ from each element in the N set, as shown in the following formula: Φ=T i-ψFace comparison based on the normalized value Φ of the face sample grouping set N can effectively solve the efficiency and accuracy problems in the face grouping comparison process and improve the comparison efficiency.
[0077] a. Through the normalization algorithm, the differences between different races can be reduced, allowing the system to build a set of samples that meet the needs of Asians through continuous machine learning, thereby improving the system's face recognition rate;
[0078] b. Compared with group random sampling comparison, face comparison based on the average value of the face sample grouping set N can reduce the problems of random sampling face image comparison and improve the accuracy of comparison;
[0079] c. Compared with the full-group comparison, the face comparison based on the N-average value of the face sample grouping set can avoid comparing with every picture in the group by preprocessing the group feature values, reducing the number and time of comparisons and reducing computing costs.
[0080] Optimization algorithm of face grouping sample library based on machine learning
[0081] The face grouping sample library [1, S] is the basis for all new face comparisons. How to improve the accuracy of the face library, filter out junk face data, and retain clear, positive-pose images of the same person is crucial to improving the accuracy of face recognition. This algorithm uses a machine learning model, combined with an undirected graph and Euclidean distance weights to continuously optimize the face feature quality of the face grouping sample library [1, S], improve the correctness and comparison performance of the system; in the face grouping sample library average feature algorithm, the classification of the face feature grouping set N is realized, and the set N is a set containing M face images (the M is a natural number, representing the number of face images in a sample group N, 1≤M≤40). The face recognition algorithm puts the M face feature value vectors T into a set N, as shown in the following formula: N={T1,T2,T3,T4,......,T M}, when a new face k is added (k is a natural number representing a new face, 1≤k), the sample training set reaches M+1, triggering the face grouping sample library optimization algorithm; an undirected weighted graph is constructed for the M+1 data in the grouped sample N, and the weight is the distance between each node, such as Figure 2 As shown;
[0082] Calculate the sum of the Euclidean distances d between all points of all facial features in the group set N, and update the data to all nodes in the set N. The formula for calculating the Euclidean distance of face k is as follows: In the face feature grouping sample set N, generate a new Euclidean distance sum set D N , as shown below: N ={d1,d2,d3,d4,......,dk}, set D N Sort by the sum of Euclidean distances from small to large. The smaller the Euclidean distance, the more similar the facial features are. The face database can also display the data within the group by sorting by the sum of Euclidean distances. Optimize the grouped samples N and automatically remove the data with poor image quality or errors. When the value of k is less than the sample quantity threshold M, add the image features to the sample for analysis. When the value of k is greater than the sample quantity threshold M, take D N The value d with the largest sum of Euclidean distances in the set MAX Eliminate the set; through the above machine learning algorithm, when the amount of data increases, the facial features with a long Euclidean distance d MAX Samples will gradually be eliminated by the system, and facial features with higher similarity will continuously update the samples of each group to achieve accurate comparison of the same person.
[0083] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A system for improving face recognition accuracy based on machine learning, comprising a face data collection unit (100), a face recognition comparison unit (200), a face grouping sample library machine learning unit (300) and a local face library system (400), characterized in that: The face data collection unit (100) interacts with the face recognition and comparison unit (200), and the face recognition and comparison unit (200) interacts with the face grouping sample library machine learning unit (300) and the local face library system (400) respectively. The face data collection unit (100) includes first, second, ... N face data collection units (110, 120, ... 1N0), where N is a natural number, 1≤N; the face recognition and comparison unit (200) includes a face data structuring module (210), a face feature An extraction module (220), a face feature recognition algorithm module (230) and a face library comparison and grouping module (240); a face grouping sample library machine learning unit (300) comprises a face grouping sample feature library (310), a face grouping sample library feature extraction module (320) and a face grouping sample library optimization algorithm module (330) that interact in sequence; the grouping result obtained by the face grouping sample library machine learning unit (300) is stored in a local face library system (400) and provided to a user for data viewing and analysis; The working process of the face recognition and comparison unit (200) is as follows: the face data structuring module (210) obtains face image information from the camera by connecting with the face data acquisition unit (100), and realizes accurate extraction of face images through video format standardization processing, face image enhancement algorithm, and face cutting, and generates a face image with high accuracy through face detection, face alignment, and face verification technology, and provides the face image to the face feature extraction module (220) for face feature extraction; The face feature extraction module (220) performs face key point detection by using the convolutional neural network facial detection technology in the C++ toolbox. First, the face in the image needs to be detected and the key point posture of the face needs to be estimated. There are 68 key points on the face, which are points on various parts of the face. Finally, a 128-dimensional face feature vector is generated and provided to the face feature recognition algorithm module (230) for face recognition, and finally the target face is grouped. The facial feature recognition algorithm module (230) calculates feature dimensions that conform to Asian facial features by correcting facial features and combining them with an Asian facial feature training model, and provides the feature dimensions to the facial library comparison and grouping module (240) for comparison with the entire facial sample library; the facial library comparison and grouping module (240) performs a similarity comparison between the newly added facial features and the feature values calculated by the facial grouping sample library, and when the comparison result is less than a threshold, it is determined to belong to the facial group; when the comparison result is greater than the judgment threshold, it is new facial data, and it is necessary to add a facial group to the facial grouping sample library machine learning unit (300) and the local facial library system (400); The workflow of the face grouping sample library machine learning unit (300) is as follows: the face grouping sample feature library (310) stores the grouping of the comparison samples, and is used to provide the face recognition comparison unit (200) with the comparison feature value information; after adding a new sample, the face grouping sample library optimization algorithm module (330) will trigger the face machine learning model in the sample; the grouped samples are optimized, and poor quality or erroneous data are automatically eliminated. When the value of the set number is less than the sample number threshold, the image features are added to the sample for analysis; when the set number is greater than the sample number threshold, the set with the largest sum of the Euclidean distance in the set is eliminated; when the amount of data increases, the face feature samples with a longer Euclidean distance will gradually be eliminated by the system, and the face features with a higher similarity will continuously update the samples of each group, so as to achieve accurate comparison of the same person; after the face grouping is optimized, the face grouping sample library feature extraction module (320) will extract the feature value of the sample, calculate the average feature value of the sample, generate the comparison feature value of the grouped sample, and update the face grouping sample feature library (310); The eigenface reflects the information implicit in the face sample set and the structural relationship of the face. The eigenvectors of the covariance matrix of the eye, cheek, and jaw sample set are called eigeneyes, eigenjaws, and eigenlips, collectively referred to as eigensubfaces. The feature sub-face generates a subspace in the corresponding image space, which is called the sub-face space; the projection distance of the test image window in the sub-face space is calculated, and if the window image meets the threshold comparison condition, it is judged to be a human face; in this method, the C++ toolbox is used to extract facial features to realize facial feature detection; the convolutional neural network facial detection technology in the C++ toolbox is used to obtain facial key point detection and generate a 128-dimensional facial feature vector Ω T , provided to a facial feature recognition algorithm module (230) for facial recognition; Oh T =[ω1,ω2,......,ω 128 ] Training model for Asian facial features, including: a. Assume that the system has identified h face images, where h is a natural number representing the number of face images processed by the system, 1≤h; put the h face feature value vectors T into a set N through the face recognition algorithm, as shown in the following formula: h={T1,T2,T3,T4,......,T h } b. Calculate the average value of the Asian face training model; after obtaining the face vector set h, calculate the average eigenvalue Ψ h ; Traverse the vectors in the set features, accumulate them, and then take the average value; get the "average face" of the Asian face feature set h, as shown in the following formula: c. When an Asian face k is added, the training model needs to be adjusted again, where k is a natural number representing the newly added face, 1≤k; the average eigenvalue of the new Asian face is calculated, and the formula is as follows: d. Update the current Asian training model mean to ψ k , assigned to the global variable ψ h ; The face recognition comparison algorithm directly calculates the distance between the test image and the sample image to determine the similarity between the two. In face recognition, Euclidean distance and cosine distance are used to measure the similarity of facial features to determine whether they are the same person. The specific process is as follows: a. Face feature extraction: Through face feature extraction, the 128-dimensional face feature value of the newly added face is extracted, as shown in the following formula: Oh T =[ω1,ω2,......,ω 128 ] b. Perform face dimensionality reduction using the mean of trained Asian faces. Subtract the mean of each dimension from the data of that dimension to obtain the normalized dimension value corresponding to face k, where k is a natural number representing a newly added face, 1≤k, as shown in the following formula: F k =T k -ψ h c. Obtain the average feature set of the face group sample library [1, S], where S is a natural number representing the number of group sample sets, 1≤S, and obtain the group sample normalization value set [1,Φ S ]; d. Face comparison, traverse the grouped sample normalized value set [1, Φ S ], using Euclidean distance and cosine distance to measure the similarity of facial features and determine whether they are the same person; the Euclidean calculation formula is as follows: Set the judgment threshold to D, where D is a decimal representing the Euclidean distance threshold of two faces, 0≤D≤1. When the distance is less than the threshold D, it means that the face to be judged and the face in the training set are of the same person; when the distance is greater than the threshold D after traversing all training sets, it can be divided into two situations according to the size of the distance value: a new face or not a face; the threshold setting is dynamically adjusted according to different training sets; The average feature algorithm of the face grouping sample library includes: a. The initial face feature sample set is [1, S]. In the absence of original accurate comparison samples, the newly added face sample grouping automatically generates a new sample set N according to the recognition results. For the existing face sample group, the face data is added to the sample group to perform machine learning on the sample. The S is a natural number representing the number of grouped sample sets, 1≤S; b. Classify the facial feature groups N; obtain a single facial sample group set N through the comparison results; the set N is a set containing M facial images, where M is a natural number representing the number of facial images in a sample group N, 1≤M≤40; put the M facial feature value vectors T into a set N through the face recognition algorithm, as shown in the following formula: N={T1,T2,T3,T4,......,T M } c. Average features of face sample group set N. After obtaining face vector set N, calculate the average feature value Ψ. The calculation formula is as follows: traverse the vectors in set N once, accumulate them, and then take the average value. The obtained Ψ is a 128-dimensional vector, and the "average face" of the face sample group set N is obtained, as shown in the following formula: d. The feature normalization algorithm of the face sample grouping set N calculates the difference Φ between each image and the average image, which is to subtract the average value of Ψ from each element in the N set, as shown in the following formula: Φ=T i -ψ Face comparison is performed based on the normalized value Φ of the face sample grouping set N.
2. The system for improving face recognition accuracy based on machine learning according to claim 1, characterized in that: The face grouping sample library [1, S] is the basis for all new face comparisons; this algorithm continuously optimizes the face feature quality of the face grouping sample library [1, S] through a machine learning model, combined with an undirected graph and Euclidean distance weights; a. In the average feature algorithm of the face grouping sample library, the classification of the face feature grouping set N is realized. The set N is a set containing M face images, where M is a natural number representing the number of face images in a sample group N, 1≤M≤40; the M face feature value vectors T are put into a set N through the face recognition algorithm, as shown in the following formula: N={T1,T2,T3,T4,......,T M } b. When a new face k is added, the sample training set reaches M+1, triggering the face grouping sample library optimization algorithm, where k is a natural number representing the new face, 1≤k; c. Construct an undirected weighted graph for the M+1 data in the grouped sample N, where the weight is the distance between each node; d. Calculate the sum of the Euclidean distances d between all points of all facial features in the group set N, and update the data to all nodes in the set N. The formula for calculating the Euclidean distance of face k is as follows: e. Generate a new Euclidean distance sum set D from the face feature grouping sample set N N , as shown below: <h2 style=";text-align:left;direction:ltr">D<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> (d1,d2,d3,d4,......,d)<h2 style=";text-align:left;direction:ltr"> k <h2 style=";text-align:left;direction:ltr">} f. Set D N Sort by the sum of Euclidean distances from small to large. The smaller the Euclidean distance, the more similar the facial features are. The face database displays the data within the group in the order of the sum of Euclidean distances. g. Optimize the grouped samples N and automatically remove poor quality or erroneous data. When the value of k is less than the sample quantity threshold M, add the image features to the sample for analysis; When the value of k is greater than the sample size threshold M, take D N The value d with the largest sum of Euclidean distances in the set MAX Eliminate the collection.
