A high-precision face recognition method and face recognition device

By collecting and processing target images in the face recognition system, extracting face features, and matching them in the face recognition model and identity database, the problem of inaccuracy of face recognition in the prior art is solved, and high-precision and high-efficiency face recognition are achieved.

CN114445879BActive Publication Date: 2025-04-18XINFENG SEGA SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111659059.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-04-18
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

There is inaccuracy in existing facial recognition technology, especially in front of people with similar appearances, which can easily lead to recognition errors and affect the efficiency and accuracy of the application.

Method used

The target image is collected through the camera, grayscale processing and feature extraction are performed, the face contour range is determined, and the face image is input into the face recognition model for identification, and finally match it in the preset identity database to determine the identity information.

Benefits of technology

It improves the accuracy of facial image acquisition and the efficiency of facial identity information acquisition, reduces the occurrence of recognition errors, and enhances the accuracy and reliability of facial recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445879B_ABST
    Figure CN114445879B_ABST
Patent Text Reader

Abstract

The present invention provides a high-precision face recognition method and face recognition device, and the method includes: step 1: based on the camera to collect the target image, and read the target image, determine the face range in the target image, and circle the face range to output the face image; step 2: determine the face recognition model, and input the face image into the face recognition model for face recognition, and output the recognition parameters; step 3: match the recognition parameters in a preset identity database to determine the identity information of the face. The target image is collected by the camera, and the target image is recognized, so as to determine the face, accurately obtain the face image, and at the same time, the face image is recognized in the face recognition model, so as to accurately determine the identity information of the face. This method not only improves the accuracy of obtaining the face image, but also improves the efficiency of obtaining the face identity information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to a high-precision face recognition method and a face recognition device. Background Art

[0002] At present, with the advancement of technology, face recognition has been applied in many areas of life. For example, face recognition is used in attendance clocking in at work and access control systems.

[0003] However, there is still a great deal of inaccuracy in current face recognition. If people with similar looks are identified, there will be errors in recognition, which greatly increases the error rate in face recognition and is not conducive to the development of actions. Therefore, in order to improve the accuracy of acquiring facial images and improve the efficiency of acquiring facial identity information, the present invention provides a high-precision face recognition method and face recognition device. Summary of the invention

[0004] The present invention provides a high-precision face recognition method and face recognition equipment, which are used to collect a target image through a camera and recognize the target image, thereby determining a face and accurately obtaining a facial image of the face. At the same time, the facial image of the face is recognized in a face recognition model, thereby accurately determining the identity information of the face. This method not only improves the accuracy of obtaining facial images of the face, but also improves the efficiency of obtaining facial identity information.

[0005] The present invention provides a high-precision face recognition method, comprising:

[0006] Step 1: Capture a target image based on a camera, read the target image, determine the face range in the target image, and circle the face range to output a face image;

[0007] Step 2: Determine a face recognition model, input the face image into the face recognition model for face recognition, and output a recognition result;

[0008] Step 3: Match the recognition result in a preset identity database to determine the identity information of the face.

[0009] Preferably, in a high-precision face recognition method, in step 1, the specific working process of reading the target image and determining the face range in the target image includes:

[0010] Gray-scale the target image, obtain a gray-scale image, read the gray-scale image, and determine the pixel points of the gray-scale image;

[0011] Extracting features of pixels of the grayscale image, and determining distribution features of pixels of the same type of features in the grayscale image;

[0012] The target image is compared with the grayscale image, and based on the distribution characteristics of the pixels of the same type of features in the grayscale image, the contour range of the face in the grayscale image is determined, and the face contour pixels are determined;

[0013] The face contour pixels are marked, and the face range in the target image is determined based on the marking result.

[0014] Preferably, in a high-precision face recognition method, in step 1, the specific working process of delineating the face range and outputting the face image includes:

[0015] Acquire edge point information of the face range, and determine a degree of sharpening of the boundary of the face range based on the edge point information of the face range;

[0016] Sharpening the edge of the face range according to the sharpening degree, and inputting the target image after the edge sharpening of the face range into a preset segmentation model;

[0017] Determining the segmentation points of the target image in the preset segmentation model, and segmenting the target image in the preset segmentation model based on the segmentation points;

[0018] The facial image of the human face is generated based on the segmentation result.

[0019] Preferably, a high-precision face recognition method, after generating the face image based on the segmentation result, further comprises:

[0020] Performing image analysis on the human face image to determine the color value and brightness value of the human face image;

[0021] Performing image quality assessment on the facial image of the human face based on the color value and the brightness value, and obtaining an assessment score;

[0022] Comparing the evaluation score with a preset evaluation score to determine whether the facial image of the human face needs image optimization processing;

[0023] When the evaluation score is equal to or greater than the preset evaluation score, it is determined that the human face image does not need to be subjected to image optimization processing;

[0024] Otherwise, it is determined that the facial image needs to be subjected to image optimization processing;

[0025] When the face image needs to be optimized, a first optimization index parameter is generated according to the color value and the reference color value, and a second optimization index parameter is generated according to the brightness value and the reference brightness value;

[0026] The facial image of the human face is optimized in a preset optimization algorithm based on the first optimization index parameter and the second optimization index parameter.

[0027] Preferably, a high-precision face recognition method, in step 2, determines a face recognition model, inputs the face image into the face recognition model for face recognition, and outputs the specific working process of the recognition result, including:

[0028] Acquire facial images of a target group, and perform a first learning on the facial images of the target group in a preset convolutional neural network, and determine facial features of the facial images of the target group based on the first learning result;

[0029] Learning the facial features for a second time in the preset convolutional neural network, and outputting a second learning result, wherein the second learning result includes: similar feature points of the facial features and different feature points of the facial features;

[0030] Obtaining similar feature parameters corresponding to similar feature points of the facial features, and using the similar feature parameters as first model parameters;

[0031] Obtaining difference feature parameters corresponding to the difference feature points of the facial features, and adding difference labels to the difference feature parameters respectively, and at the same time, using the difference feature parameters with the difference labels added as the second model parameters;

[0032] Building a face recognition model based on the first model parameters and the second model parameters;

[0033] Inputting the facial image of the human face into the face recognition model for recognition, obtaining recognition parameters, and matching the recognition parameters in the face recognition model, and judging whether the recognition is successful based on the matching result;

[0034] When the recognition parameters match the corresponding target parameters in the face recognition model, it is determined that the face image recognition is successful;

[0035] When the recognition parameter does not match the corresponding target parameter in the face recognition model, it is determined that the face image is not recognized successfully, and at the same time, the face image is recorded and input into the preset convolutional neural network for a third learning;

[0036] Based on the third learning result and based on the recognition parameters, a model is updated in the face recognition model.

[0037] Preferably, in a high-precision face recognition method, in step 1, the working process of collecting a target image based on a camera includes:

[0038] Acquire the shooting position of the camera, and determine the shooting range of the camera based on the shooting position, wherein the shooting range includes: an up-down shooting range and a left-right shooting range;

[0039] Determining a shooting height ratio of the camera according to the upper and lower shooting ranges, and estimating a target height range of a person photographed by the camera based on the shooting height ratio of the camera;

[0040] Compare the target height range with a preset reference height range to determine whether the shooting position of the camera needs to be adjusted;

[0041] When the target height range is equal to or greater than the preset reference height range, the shooting position of the camera does not need to be adjusted;

[0042] Otherwise, it is determined that the shooting position of the camera needs to be adjusted, and based on the difference between the target height range and the preset reference height range, a first adjustment strategy of the camera is determined;

[0043] Based on the left and right shooting ranges, determining the shooting width ratio of the camera, and based on the width shooting ratio of the camera, determining the number of people photographed by the camera;

[0044] When the number of people photographed by the camera is less than 1 or equal to or greater than 2, determining a second adjustment strategy of the camera based on the width ratio of the camera;

[0045] Based on the first adjustment strategy and the second adjustment strategy, the camera is adjusted for shooting.

[0046] Preferably, in a high-precision face recognition method, in step 3, the specific process of matching the recognition result in a preset identity database to determine the face identity information includes:

[0047] Reading the recognition result, determining the facial data of the target user corresponding to the facial image, and extracting the data identifier of the facial data;

[0048] Inputting the facial data into the preset identity database, and performing data matching in the identity database based on the data identifier of the facial data;

[0049] Based on the matching result, an identity document consistent with the data identifier is obtained in the preset identity database;

[0050] The identity file is read to extract the identity information of the target user corresponding to the facial image.

[0051] Preferably, a high-precision face recognition method, in step 2, inputting the face image into the face recognition model for face recognition, further comprising:

[0052] Get the n-dimensional space vector A of the face to be identified corresponding to the face image = (a1, a2, ... a n ), and at the same time, extract the n-dimensional space vector B of the model face in the face recognition model = (b1, b2, ... b n );

[0053] Based on the n-dimensional space vector A of the face to be recognized, n ) and the n-dimensional space vector B of the model face = (b1, b2, ... b n ), calculate the n-dimensional space vector A of the face to be identified = (a1, a2, ... a n ) and the n-dimensional space vector B of the model face = (b1, b2, ... b n )’s Euclidean distance and cosine distance;

[0054]

[0055]

[0056] Wherein, δ represents the Euclidean distance between the spatial vector of the face to be identified and the spatial vector of the model face; cosθ represents the cosine distance between the spatial vector of the face to be identified and the spatial vector of the model face; μ1 represents the first error factor, and its value range is (0.23, 0.34); i represents the current component, a1, a2, ... a n Represents the components of the n-dimensional space vector of the face to be recognized; b1, b2, ... b n represents the component of the spatial vector of the model face; n represents the dimension; μ2 represents the second error factor, and its value range is (0.26, 0.39);

[0057] Based on the n-dimensional space vector A of the face of the user to be identified = (a1, a2, ... a n ) and the n-dimensional space vector B of the model face = (b1, b2, ... b n ), and calculating the similarity between the target user's face and the model face;

[0058]

[0059] Wherein, γ represents the similarity between the face to be identified and the model face;

[0060] Comparing the similarity between the face to be identified and the model face with a preset similarity to determine whether the face to be identified and the model face are the same person, wherein the similarity between the face to be identified and the model face is less than or equal to the preset similarity;

[0061] When the similarity between the face to be identified and the model face is equal to the preset similarity, it is determined that the face to be identified and the model face are the same person, and the face recognition is successful;

[0062] When the similarity between the face to be identified and the model face is less than the preset similarity, it is determined that the face to be identified and the model face are not the same person, and face recognition is unsuccessful.

[0063] Preferably, the facial data is distinguished into facial blocks to obtain a plurality of facial blocks, a block matrix of each facial block is constructed, and a feature vector of each block matrix is ​​extracted;

[0064] Matching the feature vector of each facial block based on the preset identity database,

[0065] Determine whether there is a special vector in the feature vector;

[0066] If so, matching a first sub-library related to the special vector based on the preset identity database, and matching and identifying the special vector based on the first sub-library;

[0067] If it does not exist, sort all feature vectors by recognition;

[0068]

[0069] Among them, n1 represents the vector dimension involved in each feature vector, M represents the total vector dimension corresponding to the standard face; ∝ represents the facial feature weight corresponding to each feature vector; C1 represents the actual element set of the corresponding feature vector; C2 represents the standard element set of the corresponding standard vector; N represents the number of elements in the actual element set; () do Indicates the number of elements in the intersection set corresponding to C1∩C2;

[0070] According to the sorting results, match and identify with the corresponding facial sub-library in turn;

[0071] Obtain the matching recognition results and use them as auxiliary information to obtain the corresponding identity documents.

[0072] The present invention provides a face recognition device, comprising:

[0073] A recognition module, used to collect a target image based on a camera, read the target image, determine the face range in the target image, and circle the face range to output a face image;

[0074] A first determination module is used to determine a face recognition model, input the face image into the face recognition model for face recognition, and output a recognition result;

[0075] The second determination module is used to match the recognition result in a preset identity database to determine the identity information of the face.

[0076] Preferably, the camera comprises:

[0077] The trigger unit is used to send a first control instruction to the control unit when sensing the presence of a sensing object in the target area, so as to control the first collection unit to collect the sensing object;

[0078] The control unit is also used to identify the overall clarity of the image of the sensing object collected. If it is not clear, it is determined whether it is a program problem. If so, the alarm unit set on one side of the collection unit is controlled to issue a first alarm.

[0079] Otherwise, determining whether the surface of the collection body of the first collection unit is blurred, and controlling the second collection unit to collect the corresponding collection body surface, and if it is determined that the surface of the collection body is blurred, controlling the alarm unit to issue a second alarm;

[0080] The second acquisition unit is arranged at a position corresponding to the first acquisition unit, and the control unit is connected to the trigger unit, the first acquisition unit, the second acquisition unit and the alarm unit.

[0081] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0082] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0084] Figure 1This is a flow chart of a high-precision face recognition method in an embodiment of the present invention;

[0085] Figure 2 This is a flowchart of step 1 in a high-precision face recognition method in an embodiment of the present invention;

[0086] Figure 3 This is a flowchart of step 3 in a high-precision face recognition method in an embodiment of the present invention;

[0087] Figure 4 This is a structural diagram of a face recognition device in an embodiment of the present invention;

[0088] Figure 5 2 is a structural diagram of a camera in an embodiment of the present invention. DETAILED DESCRIPTION

[0089] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0090] Embodiment 1:

[0091] This embodiment provides a high-precision face recognition method. Figure 1 As shown, including:

[0092] Step 1: Capture a target image based on a camera, read the target image, determine the face range in the target image, and circle the face range to output a face image;

[0093] Step 2: Determine a face recognition model, input the face image into the face recognition model for face recognition, and output a recognition result;

[0094] Step 3: Match the recognition result in a preset identity database to determine the identity information of the face.

[0095] In this embodiment, the target image may be an image acquired based on the shooting range of a camera.

[0096] In this embodiment, the face recognition model may be a face recognition model obtained by extracting face samples for training.

[0097] In this embodiment, the preset identity database may be a pre-set identity database containing all identity databases that have recorded face recognition.

[0098] In this embodiment, the recognition result can be characteristic parameters of facial parameters such as contour, size, eye distance, eyebrows, nose, mouth, etc., as well as specific facial features.

[0099] The beneficial effect of the above technical solution is: by collecting the target image through the camera and identifying the target image, the face is determined, and the facial image of the face is accurately obtained. At the same time, the facial image of the face is identified in the face recognition model, so as to accurately determine the identity information of the face. This method not only improves the accuracy of obtaining the facial image of the face, but also improves the efficiency of obtaining the facial identity information.

[0100] Embodiment 2:

[0101] Based on Example 1, this embodiment provides a high-precision face recognition method, characterized in that: Figure 2 As shown, in step 1, the specific working process of reading the target image and determining the face range in the target image includes:

[0102] Step 101: grayscale the target image, obtain a grayscale image, read the grayscale image, and determine the pixel points of the grayscale image;

[0103] Step 102: extracting features of the pixels of the grayscale image, and determining distribution features of pixels of the same type of features in the grayscale image;

[0104] Step 103: Compare the target image with the grayscale image, and determine the contour range of the face in the grayscale image based on the distribution characteristics of the pixels of the same type of features in the grayscale image, and determine the face contour pixels;

[0105] Step 104: Mark the face contour pixels, and determine the face range in the target image based on the marking result.

[0106] In this embodiment, the grayscale image may be an image obtained after grayscale processing is performed on the target image.

[0107] In this embodiment, the features of the pixel points may be, for example, shadow pixels representing the contour of a face, black pixels, white pixels, etc. in a grayscale image.

[0108] In this embodiment, the distribution characteristics of the pixels of the same type of features in the grayscale image, for example, the distribution range of the pixels representing the face contour in the grayscale image, are the distribution characteristics of the pixels of the same type of features in the grayscale image.

[0109] The beneficial effect of the above technical solution is: by graying the target image, it is helpful to determine the characteristics of the pixel points in the grayscale image, so as to accurately obtain the distribution characteristics of the same type of pixel points in the grayscale image, and then determine the contour of the face, and accurately determine the face range by marking. The present invention greatly improves the accuracy of obtaining the face range, which is conducive to more accurate recognition of face images.

[0110] Embodiment 3:

[0111] Based on Example 1, this embodiment provides a high-precision face recognition method. In step 1, the specific working process of delineating the face range and outputting the face image includes:

[0112] Acquire edge point information of the face range, and determine a degree of sharpening of the boundary of the face range based on the edge point information of the face range;

[0113] Sharpening the edge of the face range according to the sharpening degree, and inputting the target image after the edge sharpening of the face range into a preset segmentation model;

[0114] Determining the segmentation points of the target image in the preset segmentation model, and segmenting the target image in the preset segmentation model based on the segmentation points;

[0115] The facial image of the human face is generated based on the segmentation result.

[0116] In this embodiment, the edge point information may be pixel point information of the boundary of the face range, edge color contrast, and the like.

[0117] In this embodiment, the preset segmentation model may be a model set in advance and used to analyze the target image.

[0118] In this embodiment, the image segmentation point is the boundary point of the face range of the target image.

[0119] In this embodiment, the edge sharpening is performed on the boundary of the face range in order to compensate for the contour of the face range and enhance the edge of the face range.

[0120] The beneficial effect of the above technical solution is: by sharpening the edges of the boundaries of the target range, it is more conducive to enhancing the edges of the face range, which is in turn conducive to determining the segmentation points of the target image in the preset segmentation model, thereby segmenting the target image, accurately obtaining the facial image, and improving the accuracy of face recognition.

[0121] Embodiment 4:

[0122] On the basis of Example 3, this embodiment provides a high-precision face recognition method, which, after generating the face image based on the segmentation result, further includes:

[0123] Performing image analysis on the human face image to determine the color value and brightness value of the human face image;

[0124] Performing image quality assessment on the facial image of the human face based on the color value and the brightness value, and obtaining an assessment score;

[0125] Comparing the evaluation score with a preset evaluation score to determine whether the facial image of the human face needs image optimization processing;

[0126] When the evaluation score is equal to or greater than the preset evaluation score, it is determined that the human face image does not need to be subjected to image optimization processing;

[0127] Otherwise, it is determined that the facial image needs to be subjected to image optimization processing;

[0128] When the face image needs to be optimized, a first optimization index parameter is generated according to the color value and the reference color value, and a second optimization index parameter is generated according to the brightness value and the reference brightness value;

[0129] The facial image of the human face is optimized in a preset optimization algorithm based on the first optimization index parameter and the second optimization index parameter.

[0130] In this embodiment, the evaluation score may be a score determined by performing a comprehensive evaluation based on the color value and brightness value of the acquired facial image.

[0131] In this embodiment, the preset evaluation score can be a reference score for determining whether the facial image needs to be optimized, wherein when the facial image reaches the preset evaluation score, face recognition can be performed normally through the facial image; when the facial image does not reach the preset evaluation score, the facial image will affect face recognition due to poor color or brightness.

[0132] In this embodiment, the preset optimization algorithm may be an algorithm for optimizing image filtering, image color, and image brightness.

[0133] In this embodiment, the first optimization index parameter can be an optimization index parameter formed by the difference between the color value and the reference color value, which is a parameter determined to optimize the color of the facial image, wherein the reference color value can be the image color value for normal face recognition.

[0134] In this embodiment, the second optimization index parameter can be an optimization index parameter formed by the difference between the brightness value and the reference brightness value, which is a parameter determined to optimize the brightness of the facial image, wherein the reference brightness value can be the image brightness value for normal face recognition.

[0135] The beneficial effect of the above technical solution is: by obtaining the brightness value and color value of the facial image and evaluating it to obtain an evaluation score, it is helpful to determine whether the facial image needs to be optimized, and when optimization is required, the facial image is accurately optimized through the first optimization index parameter and the second optimization index parameter, which greatly improves the efficiency of facial recognition.

[0136] Embodiment 5:

[0137] Based on Example 1, this embodiment provides a high-precision face recognition method. In step 2, a face recognition model is determined, and the face image is input into the face recognition model for face recognition, and the specific working process of outputting the recognition result includes:

[0138] Acquire facial images of a target group, and perform a first learning on the facial images of the target group in a preset convolutional neural network, and determine facial features of the facial images of the target group based on the first learning result;

[0139] Learning the facial features for a second time in the preset convolutional neural network, and outputting a second learning result, wherein the second learning result includes: similar feature points of the facial features and different feature points of the facial features;

[0140] Obtaining similar feature parameters corresponding to similar feature points of the facial features, and using the similar feature parameters as first model parameters;

[0141] Obtaining difference feature parameters corresponding to the difference feature points of the facial features, and adding difference labels to the difference feature parameters respectively, and at the same time, using the difference feature parameters with the difference labels added as the second model parameters;

[0142] Building a face recognition model based on the first model parameters and the second model parameters;

[0143] Inputting the facial image of the human face into the face recognition model for recognition, obtaining recognition parameters, and matching the recognition parameters in the face recognition model, and judging whether the recognition is successful based on the matching result;

[0144] When the recognition parameters match the corresponding target parameters in the face recognition model, it is determined that the face image recognition is successful;

[0145] When the recognition parameter does not match the corresponding target parameter in the face recognition model, it is determined that the face image is not recognized successfully, and at the same time, the face image is recorded and input into the preset convolutional neural network for a third learning;

[0146] Based on the third learning result and based on the recognition parameters, a model is updated in the face recognition model.

[0147] In this embodiment, the target group refers to people in a company or a community, whose faces have been recorded in advance.

[0148] In this embodiment, the preset convolutional neural network is set in advance and is used to process the facial image and determine the feature information in the facial image.

[0149] In this embodiment, the facial features refer to information with distinct distinguishing features on the faces of people in the target group, such as the size and location of a mole.

[0150] In this embodiment, similar feature points refer to feature information that everyone in the target group has. For example, everyone in the target group has facial features, but there are slight differences in the shapes and positions of the facial features.

[0151] In this embodiment, the difference feature points refer to the obvious distinguishing features between two points in the target group. For example, some people have moles while others do not, and the positions and numbers of moles are also different.

[0152] In this embodiment, the difference label refers to a label used to distinguish different feature information.

[0153] In this embodiment, the recognition parameter refers to the size and type of the face obtained after the face recognition model performs recognition processing on the face image.

[0154] In this embodiment, the target parameter refers to the face data in the system that matches the face recognition model and is entered into the system in advance.

[0155] The beneficial effect of the above technical solution is: by acquiring facial images of the target group and training the preset convolutional neural network multiple times, the face recognition model can be accurately constructed, and the current face image can be monitored in real time according to the constructed face recognition model, so as to achieve high-precision recognition of face graphics. At the same time, when no recognition is made, the current face recognition model is updated to accurately determine the identity information of the face. This method not only improves the accuracy of acquiring facial images, but also improves the efficiency of acquiring facial identity information.

[0156] Embodiment 6:

[0157] Based on Example 1, this embodiment provides a high-precision face recognition method. In step 1, the working process of collecting a target image based on a camera includes:

[0158] Acquire the shooting position of the camera, and determine the shooting range of the camera based on the shooting position, wherein the shooting range includes: an up-down shooting range and a left-right shooting range;

[0159] Determining a shooting height ratio of the camera according to the upper and lower shooting ranges, and estimating a target height range of a person photographed by the camera based on the shooting height ratio of the camera;

[0160] Compare the target height range with a preset reference height range to determine whether the shooting position of the camera needs to be adjusted;

[0161] When the target height range is equal to or greater than the preset reference height range, the shooting position of the camera does not need to be adjusted;

[0162] Otherwise, it is determined that the shooting position of the camera needs to be adjusted, and based on the difference between the target height range and the preset reference height range, a first adjustment strategy of the camera is determined;

[0163] Based on the left and right shooting ranges, determining the shooting width ratio of the camera, and based on the width shooting ratio of the camera, determining the number of people photographed by the camera;

[0164] When the number of people photographed by the camera is less than 1 or equal to or greater than 2, determining a second adjustment strategy of the camera based on the width ratio of the camera;

[0165] Based on the first adjustment strategy and the second adjustment strategy, the camera is adjusted for shooting.

[0166] In this embodiment, the upper and lower shooting range may be the length of the shooting range of the camera, and the left and right shooting range may be the width of the shooting range of the camera.

[0167] In this embodiment, the shooting height ratio, that is, the length of the camera shooting range, can actually determine the height of the target person.

[0168] In this embodiment, the first adjustment strategy may be to adjust the camera up and down so as to adjust the target height range to a preset reference height range.

[0169] In this embodiment, the preset reference height range may be a height range set in advance, covering the height of the general population.

[0170] In this embodiment, the second adjustment strategy may be to adjust the focus of the camera shooting to be suitable only for the face of one person, thereby helping to improve the accuracy of the camera in recognizing faces, thereby improving recognition time and efficiency.

[0171] The beneficial effect of the above technical solution is: by determining the size of the target height range and comparing it with the preset benchmark height range, it is accurately determined whether the position of the camera needs to be adjusted, and when adjustment is needed, the first adjustment strategy is determined. At the same time, the image captured by the camera is reduced to only one person through the second strategy, thereby avoiding the appearance of multiple people in the camera at the same time, which increases the difficulty of recognition. Therefore, not only the accuracy of camera face recognition is improved, but also the face recognition time is saved.

[0172] Embodiment 7:

[0173] Based on Example 1, this example provides a high-precision face recognition method, such as Figure 3 As shown, in step 3, the specific process of matching the recognition result in a preset identity database to determine the face identity information includes:

[0174] Step 301: reading the recognition result, determining the facial data of the target user corresponding to the facial image, and extracting the data identifier of the facial data;

[0175] Step 302: inputting the facial data into the preset identity database, and performing data matching in the identity database based on the data identifier of the facial data;

[0176] Step 303: Acquire an identity document consistent with the data identifier in the preset identity database based on the matching result;

[0177] Step 304: Read the identity file to extract the identity information of the target user corresponding to the facial image.

[0178] In this embodiment, the data identifier may be a data identifier determined based on features of the target user's facial data, for example, a data identifier determined based on contour data of the target user's face.

[0179] In this embodiment, the identity file may be a file containing identity information of the target user.

[0180] In this embodiment, the identity information of the target user may be the name, age, position, etc. of the target user.

[0181] The beneficial effect of the above technical solution is: by determining the data identifier of the facial data and matching it in a preset identity database to determine the identity file, the identity information of the target user is accurately obtained, thereby improving the accuracy of face recognition.

[0182] Embodiment 8:

[0183] On the basis of Example 1, this embodiment provides a high-precision face recognition method. In step 2, the face image is input into the face recognition model for face recognition, and further includes:

[0184] Get the n-dimensional space vector A of the face to be identified corresponding to the face image = (a1, a2, ... a n ), and at the same time, extract the n-dimensional space vector B of the model face in the face recognition model = (b1, b2, ... b n );

[0185] Based on the n-dimensional space vector A of the face to be recognized, n ) and the n-dimensional space vector B of the model face = (b1, b2, ... b n ), calculate the n-dimensional space vector A of the face to be identified = (a1, a2, ... a n ) and the n-dimensional space vector B of the model face = (b1, b2, ... b n )’s Euclidean distance and cosine distance;

[0186]

[0187]

[0188] Wherein, δ represents the Euclidean distance between the spatial vector of the face to be identified and the spatial vector of the model face; cosθ represents the cosine distance between the spatial vector of the face to be identified and the spatial vector of the model face; μ1 represents the first error factor, and its value range is (0.23, 0.34); i represents the current component, a1, a2, ... a n Represents the components of the n-dimensional space vector of the face to be recognized; b1, b2, ... b n represents the component of the spatial vector of the model face; n represents the dimension; μ2 represents the second error factor, and its value range is (0.26, 0.39);

[0189] Based on the n-dimensional space vector A of the face of the user to be identified = (a1, a2, ... a n ) and the n-dimensional space vector B of the model face = (b1, b2, ... b n(Euclidean distance and cosine distance, calculating the similarity between the target user face and the model face;

[0190]

[0191] Wherein, γ represents the similarity between the face to be identified and the model face;

[0192] Comparing the similarity between the face to be identified and the model face with a preset similarity to determine whether the face to be identified and the model face are the same person, wherein the similarity between the face to be identified and the model face is less than or equal to the preset similarity;

[0193] When the similarity between the face to be identified and the model face is equal to the preset similarity, it is determined that the face to be identified and the model face are the same person, and the face recognition is successful;

[0194] When the similarity between the face to be identified and the model face is less than the preset similarity, it is determined that the face to be identified and the model face are not the same person, and face recognition is unsuccessful.

[0195] In this embodiment, the first error factor may be an error factor that exists when calculating the Euclidean distance between the spatial vector of the face to be identified and the spatial vector of the model face. Calculating the first error factor can make the obtained Euclidean distance more objective and accurate.

[0196] In this embodiment, the second error factor may be an error factor that exists when calculating the cosine distance between the spatial vector of the face to be identified and the spatial vector of the model face. Calculating the second error factor may make the obtained cosine distance more objective and accurate.

[0197] In this embodiment, the preset similarity can be 1. The closer the similarity between the face to be identified and the model face is to 1, the more similar the face to be identified and the model face are. When the similarity between the face to be identified and the model face is 1, which is equal to the preset similarity, it can be determined that the user face and the model face are the same person.

[0198] The beneficial effect of the above technical solution is: by accurately calculating the Euclidean distance and cosine distance between the n-dimensional space vector of the face to be identified and the n-dimensional space vector of the model face in the face recognition model, it is helpful to accurately calculate the similarity between the face to be identified and the model face, and then by comparing with the preset similarity, it is determined whether the face to be identified and the model face are the same person, and then it is determined whether the face recognition is successful, thereby improving the accuracy of face recognition.

[0199] Embodiment 9:

[0200] The process of inputting the facial data into the preset identity database and performing data matching in the identity database based on the data identifier of the facial data also includes:

[0201] Distinguishing facial blocks of the facial data to obtain a plurality of facial blocks, constructing a block matrix for each facial block, and extracting a feature vector of each block matrix;

[0202] Matching the feature vector of each facial block based on the preset identity database,

[0203] Determine whether there is a special vector in the feature vector;

[0204] If so, matching a first sub-library related to the special vector based on the preset identity database, and matching and identifying the special vector based on the first sub-library;

[0205] If it does not exist, sort all feature vectors by recognition;

[0206]

[0207] Among them, n1 represents the vector dimension involved in each feature vector, M represents the total vector dimension corresponding to the standard face; ∝ represents the facial feature weight corresponding to each feature vector; C1 represents the actual element set of the corresponding feature vector; C2 represents the standard element set of the corresponding standard vector; N represents the number of elements in the actual element set; () do Indicates the number of elements in the intersection set corresponding to C1∩C2;

[0208] According to the sorting results, match and identify with the corresponding facial sub-library in turn;

[0209] Obtain the matching recognition results and use them as auxiliary information to obtain the corresponding identity documents.

[0210] For example: C1 = {1, 2, 3, 4, 9, 0}, C2 = {1, 2, 3, 0, 0, 0}, then the corresponding C1∩C2 = {1, 2, 3, 0}, the corresponding (C1∩C2) do =4;

[0211] () do It represents the number of elements in the intersection set corresponding to C1∩C2, and N=6 in this case.

[0212] In this embodiment, by distinguishing facial blocks of facial data, the user can be identified by matching one of the blocks, thereby improving recognition efficiency and saving recognition space. For example, the facial data is divided into five parts: eyes, nose, mouth, forehead, and cheeks, and each part has its corresponding matrix, which is determined based on the facial data. For example, the user's mouth has a special recognition degree. At this time, the feature vector of the mouth can be regarded as a special vector. At this time, the sub-library related to the mouth is directly matched from the preset identity database, which greatly saves recognition time. For example, the preset identity database includes: vectors corresponding to different facial blocks and related facial descriptions and identity information.

[0213] In this embodiment, if there is no special vector, all vectors are sorted by recognition degree, and the corresponding library is matched according to the result, thereby achieving matching recognition.

[0214] The beneficial effect of the above technical solution is that by distinguishing the blocks of facial data, the matrix of different facial blocks can be effectively obtained, and then the feature vector can be extracted, and by judging whether it is special or not, different methods can be used for matching and identification, providing an auxiliary basis for the subsequent acquisition of the corresponding identity file.

[0215] Embodiment 10:

[0216] The present invention provides a face recognition device, such as Figure 4 As shown, including:

[0217] A recognition module, used to collect a target image based on a camera, read the target image, determine the face range in the target image, and circle the face range to output a face image;

[0218] A first determination module is used to determine a face recognition model, input the face image into the face recognition model for face recognition, and output a recognition result;

[0219] The second determination module is used to match the recognition result in a preset identity database to determine the identity information of the face.

[0220] Preferably, Figure 5 As shown, the camera comprises:

[0221] The trigger unit is used to send a first control instruction to the control unit when sensing the presence of a sensing object in the target area, so as to control the first collection unit to collect the sensing object;

[0222] The control unit is also used to identify the overall clarity of the image of the sensing object collected. If it is not clear, it is determined whether it is a program problem. If so, the alarm unit set on one side of the collection unit is controlled to issue a first alarm.

[0223] Otherwise, determining whether the surface of the collection body of the first collection unit is blurred, and controlling the second collection unit to collect the corresponding collection body surface, and if it is determined that the surface of the collection body is blurred, controlling the alarm unit to issue a second alarm;

[0224] The second acquisition unit is arranged at a position corresponding to the first acquisition unit, and the control unit is connected to the trigger unit, the first acquisition unit, the second acquisition unit and the alarm unit.

[0225] The beneficial effects of the above technical solution are: by setting a trigger unit, it is convenient to save work consumption and improve work efficiency; by setting a collection unit, it is convenient to judge both the collection unit body and the program to ensure the normal collection of the first collection unit; and by setting an alarm unit, it is convenient to remind timely handling of problems.

[0226] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A high-precision face recognition method, characterized in that: include: Step 1: Capture a target image based on a camera, read the target image, determine the face range in the target image, and circle the face range to output a face image; Step 2: Determine a face recognition model, input the face image into the face recognition model for face recognition, and output a recognition result; Step 3: Match the recognition result in a preset identity database to determine the identity information of the face; The process further includes: inputting the facial data of the target user into the preset identity database, and performing data matching in the identity database based on the data identifier of the facial data, wherein the process specifically includes: Distinguishing facial blocks of the facial data to obtain a plurality of facial blocks, constructing a block matrix for each facial block, and extracting a feature vector of each block matrix; Matching the feature vector of each facial block based on the preset identity database, Determine whether there is a special vector in the feature vector; If so, matching a first sub-library related to the special vector based on the preset identity database, and matching and identifying the special vector based on the first sub-library; If it does not exist, sort all feature vectors by recognition; ; Among them, n1 represents the vector dimension involved in each feature vector, and M represents the total vector dimension corresponding to the standard face; Represents the facial feature weight corresponding to each feature vector; represents the actual element set corresponding to the eigenvector; C2 represents the standard element set corresponding to the standard vector; N represents the number of elements in the actual element set; ; According to the sorting results, match and identify with the corresponding facial sub-library in turn; Obtain the matching recognition results and use them as auxiliary information to obtain the corresponding identity documents.

2. A high-precision face recognition method according to claim 1, characterized in that: In step 1, the specific working process of reading the target image and determining the range of the human face in the target image includes: Gray-scale the target image, obtain a gray-scale image, read the gray-scale image, and determine the pixel points of the gray-scale image; Extracting features of pixels of the grayscale image, and determining distribution features of pixels of the same type of features in the grayscale image; The target image is compared with the grayscale image, and based on the distribution characteristics of the pixels of the same type of features in the grayscale image, the contour range of the face in the grayscale image is determined, and the face contour pixels are determined; The face contour pixels are marked, and the face range in the target image is determined based on the marking result.

3. A high-precision face recognition method according to claim 1, characterized in that: In step 1, the specific working process of delineating the face range and outputting the face image includes: Acquire edge point information of the face range, and determine a degree of sharpening of the boundary of the face range based on the edge point information of the face range; Sharpening the edge of the face range according to the sharpening degree, and inputting the target image after the edge sharpening of the face range into a preset segmentation model; Determining the segmentation points of the target image in the preset segmentation model, and segmenting the target image in the preset segmentation model based on the segmentation points; Generate the facial image of the human face based on the segmentation result; Wherein, after generating the face image based on the segmentation result, the method further includes: Performing image analysis on the human face image to determine the color value and brightness value of the human face image; Performing image quality assessment on the facial image of the human face based on the color value and the brightness value, and obtaining an assessment score; Comparing the evaluation score with a preset evaluation score to determine whether the facial image of the human face needs image optimization processing; When the evaluation score is equal to or greater than the preset evaluation score, it is determined that the human face image does not need to be subjected to image optimization processing; Otherwise, it is determined that the facial image needs to be subjected to image optimization processing; When the face image needs to be optimized, a first optimization index parameter is generated according to the color value and the reference color value, and a second optimization index parameter is generated according to the brightness value and the reference brightness value; The facial image of the human face is optimized in a preset optimization algorithm based on the first optimization index parameter and the second optimization index parameter.

4. A high-precision face recognition method according to claim 1, characterized in that: In step 2, a face recognition model is determined, and the face image is input into the face recognition model for face recognition, and the specific working process of outputting the recognition result includes: Acquire facial images of a target group, and perform a first learning on the facial images of the target group in a preset convolutional neural network, and determine facial features of the facial images of the target group based on the first learning result; Learning the facial features for a second time in the preset convolutional neural network, and outputting a second learning result, wherein the second learning result includes: similar feature points of the facial features and different feature points of the facial features; Obtaining similar feature parameters corresponding to similar feature points of the facial features, and using the similar feature parameters as first model parameters; Obtaining difference feature parameters corresponding to the difference feature points of the facial features, and adding difference labels to the difference feature parameters respectively, and at the same time, using the difference feature parameters with the difference labels added as the second model parameters; Building a face recognition model based on the first model parameters and the second model parameters; Inputting the facial image of the human face into the face recognition model for recognition, obtaining recognition parameters, and matching the recognition parameters in the face recognition model, and judging whether the recognition is successful based on the matching result; When the recognition parameters match the corresponding target parameters in the face recognition model, it is determined that the face image recognition is successful; When the recognition parameter does not match the corresponding target parameter in the face recognition model, it is determined that the face image is not recognized successfully, and at the same time, the face image is recorded and input into the preset convolutional neural network for a third learning; Based on the third learning result and based on the recognition parameters, a model is updated in the face recognition model.

5. A high-precision face recognition method according to claim 1, characterized in that: In step 1, the process of collecting the target image based on the camera includes: Acquire the shooting position of the camera, and determine the shooting range of the camera based on the shooting position, wherein the shooting range includes: an up-down shooting range and a left-right shooting range; Determining a shooting height ratio of the camera according to the upper and lower shooting ranges, and estimating a target height range of a person photographed by the camera based on the shooting height ratio of the camera; Compare the target height range with a preset reference height range to determine whether the shooting position of the camera needs to be adjusted; When the target height range is equal to or greater than the preset reference height range, the shooting position of the camera does not need to be adjusted; Otherwise, it is determined that the shooting position of the camera needs to be adjusted, and based on the difference between the target height range and the preset reference height range, a first adjustment strategy of the camera is determined; Based on the left and right shooting ranges, determining the shooting width ratio of the camera, and based on the width shooting ratio of the camera, determining the number of people photographed by the camera; When the number of people photographed by the camera is less than 1 or equal to or greater than 2, determining a second adjustment strategy of the camera based on the width ratio of the camera; Based on the first adjustment strategy and the second adjustment strategy, the camera is adjusted for shooting.

6. A high-precision face recognition method according to claim 1, characterized in that: In step 3, the specific process of matching the recognition result in a preset identity database to determine the face identity information includes: Reading the recognition result, determining the facial data of the target user corresponding to the facial image, and extracting the data identifier of the facial data; Inputting the facial data into the preset identity database, and performing data matching in the identity database based on the data identifier of the facial data; Based on the matching result, an identity document consistent with the data identifier is obtained in the preset identity database; The identity file is read to extract the identity information of the target user corresponding to the facial image.

7. A high-precision face recognition method according to claim 1, characterized in that: In step 2, the face image is input into the face recognition model for face recognition, and further includes: Get the n-dimensional space vector of the face to be identified corresponding to the face image At the same time, extract the n-dimensional space vector of the model face in the face recognition model ; Based on the n-dimensional space vector of the face to be recognized And the n-dimensional space vector of the model face , calculate the n-dimensional space vector of the face to be identified The n-dimensional space vector of the model face The Euclidean distance and cosine distance of ; ; ; in, The Euclidean distance between the spatial vector of the face to be identified and the spatial vector of the model face; The cosine distance between the spatial vector of the to-be-recognized user face and the spatial vector of the model face; represents the first error factor, and its value range is (0.23, 0.34); Represents the current component, The components of the n-dimensional space vector representing the face to be recognized; The components of the spatial vector representing the model face; n represents the dimension; represents the second error factor, and its value range is (0.26, 0.39); Based on the n-dimensional space vector of the user face to be identified The n-dimensional space vector of the model face The Euclidean distance and cosine distance of the target user's face are used to calculate the similarity between the target user's face and the model face; ; in, Indicates the similarity between the face to be recognized and the model face; Comparing the similarity between the face to be identified and the model face with a preset similarity to determine whether the face to be identified and the model face are the same person, wherein the similarity between the face to be identified and the model face is less than or equal to the preset similarity; When the similarity between the face to be identified and the model face is equal to the preset similarity, it is determined that the face to be identified and the model face are the same person, and the face recognition is successful; When the similarity between the face to be identified and the model face is less than the preset similarity, it is determined that the face to be identified and the model face are not the same person, and face recognition is unsuccessful.

8. A face recognition device, characterized in that: include: A recognition module, used to collect a target image based on a camera, read the target image, determine the face range in the target image, and circle the face range to output a face image; A first determination module is used to determine a face recognition model, input the face image into the face recognition model for face recognition, and output a recognition result; A second determination module is used to match the recognition result in a preset identity database to determine the identity information of the face; The process further includes: inputting the facial data of the target user into the preset identity database, and performing data matching in the identity database based on the data identifier of the facial data, wherein the process specifically includes: Distinguishing facial blocks of the facial data to obtain a plurality of facial blocks, constructing a block matrix for each facial block, and extracting a feature vector of each block matrix; Matching the feature vector of each facial block based on the preset identity database, Determine whether there is a special vector in the feature vector; If so, matching a first sub-library related to the special vector based on the preset identity database, and matching and identifying the special vector based on the first sub-library; If it does not exist, sort all feature vectors by recognition; ; Among them, n1 represents the vector dimension involved in each feature vector, and M represents the total vector dimension corresponding to the standard face; Represents the facial feature weight corresponding to each feature vector; represents the actual element set corresponding to the eigenvector; C2 represents the standard element set corresponding to the standard vector; N represents the number of elements in the actual element set; ; According to the sorting results, match and identify with the corresponding facial sub-library in turn; Obtain the matching recognition results and use them as auxiliary information to obtain the corresponding identity documents.

9. A face recognition device as claimed in claim 8, characterized in that: The camera comprises: The trigger unit is used to send a first control instruction to the control unit when sensing the presence of a sensing object in the target area, so as to control the first collection unit to collect the sensing object; The control unit is also used to identify the overall clarity of the image of the sensing object collected. If it is not clear, it is determined whether it is a program problem. If so, the alarm unit set on one side of the collection unit is controlled to issue a first alarm. Otherwise, determining whether the surface of the collection body of the first collection unit is blurred, and controlling the second collection unit to collect the corresponding collection body surface, and if it is determined that the surface of the collection body is blurred, controlling the alarm unit to issue a second alarm; The second acquisition unit is arranged at a position corresponding to the first acquisition unit, and the control unit is connected to the trigger unit, the first acquisition unit, the second acquisition unit and the alarm unit.

Citation Information

Patent Citations

  • A face recognition system and method based on depth learning

    CN109376679A

  • Face-image recognition method, device and apparatus and storage medium

    CN109543547A