A method, device and readable storage medium for face image recognition

By acquiring and processing video image sequences, reconstructing and matching 3D face models, the problem that the existing technology is difficult to effectively recognize when attacked by screens and other attacks is solved, and more accurate and convenient live recognition is achieved.

CN113869092BActive Publication Date: 2025-02-07GUANGZHOU HUIRUI SITONG INFORMATION SCI & TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010621505.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-30
Publication Date
2025-02-07
Estimated Expiration
2040-06-30

AI Technical Summary

Technical Problem

When the prior art is attacked by screens, printed paper, etc., it is difficult to effectively reconstruct the 3D model of the face for live recognition, resulting in poor recognition effect.

Method used

When triggering face detection, the video image sequence before and after filling light is obtained, feature points are identified and normalized, 3D reconstruction is performed according to feature quantities, and the reconstructed 3D model and pre-constructed face 3D model are used. Make a match to determine whether it is a face.

Benefits of technology

It provides a better and more convenient experience without the need for user physical movements or voice coordination, and the recognition results are more accurate, preventing misidentification caused by attacks such as screen and paper printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113869092B_ABST
    Figure CN113869092B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to a method, device and readable storage medium for face image recognition. When face detection is triggered, a video image sequence before and after fill light is obtained; feature points of the video image sequence are identified and normalized; feature quantities after normalization are obtained, and 3D reconstruction is performed based on the feature quantities before and after fill light; the reconstructed 3D model is matched with a pre-built face 3D model, and if the matching value is greater than a threshold, it is determined not to be a face, and if the matching value is less than the threshold, it is determined to be a face. Thus, a better and more convenient experience is provided without the need for user body movements or voice cooperation, and the recognition result is more accurate, preventing misidentification caused by screen, paper printing, and photo attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of face recognition, and in particular to a method, device and readable storage medium for face image recognition. Background Art

[0002] At present, most of the liveness detection requires the tester to follow the software instructions to shake his head / read numbers, etc., but the detection time is relatively long and generally requires the testee to make relatively large facial movements, which does not provide a very good user experience. Or the conventional reflected light liveness anti-counterfeiting method is not ideal and is easily attacked by camouflage methods such as photos and screens.

[0003] For screen attacks, because the surface is smooth, the reflection is very strong at the position perpendicular to the light, and very weak at other positions, showing a weak parallel reflection state. However, the real face is a three-dimensional structure, and the surface is diffusely reflected. Different positions will produce different reflection effects for fill light. The reflection is strongest at the position perpendicular to the light, and the greater the angle with the light, the weaker the light reflected to the lens. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device and readable storage medium for face image recognition, so as to solve the problem of how to reconstruct a 3D model of a face when attacked by a screen or printed paper, so as to achieve the purpose of living body recognition.

[0005] In a first aspect, an embodiment of the present invention provides a method for face image recognition, the method comprising:

[0006] When face detection is triggered, obtain the video image sequence before and after fill light;

[0007] Identifying feature points of the video image sequence and performing normalization processing;

[0008] Obtain the normalized feature quantity, and perform 3D reconstruction based on the feature quantity before and after fill light;

[0009] The reconstructed 3D model is matched with the pre-built 3D face model. If the matching value is greater than the threshold, it is judged not to be a face. If the matching value is less than the threshold, it is judged to be a face.

[0010] In some embodiments, the identifying feature points of the video image sequence and performing normalization processing includes:

[0011] The key points used to mark the facial contour and facial features in each frame of the face image are used as feature points, wherein the key points include: key points of eyes, eyebrows, nose, mouth and cheeks;

[0012] The feature points are connected by lines based on the principle of connecting the five features of the face, the face image is divided into grids, and the direction, color and / or texture inside each grid are made consistent.

[0013] In some embodiments, the identifying feature points of the video image sequence and performing normalization processing further includes:

[0014] Each grid is slightly translated in multiple directions to form a new grid, and the original grid and the new grid together constitute the grid set of the original grid;

[0015] Calculate multiple feature quantities of each grid in the same grid set to form a feature sequence of the grid, calculate the feature quantity distance between every two feature sequences, and find the grid with the smallest sum of feature quantity distances with other grids in the same grid set as the candidate grid.

[0016] In some embodiments, the obtaining of the feature quantity after normalizing the feature point includes:

[0017] Taking the normalized grid as a unit, various feature quantities of the video image sequence before and after fill light are calculated to form a feature sequence;

[0018] Compare the reflective brightness, mesh texture, color and light-shade changes of the grid before and after the fill light, and calculate the reflective feature quantity;

[0019] The feature sequence and the reflective feature quantity are obtained.

[0020] In some embodiments, before acquiring the video image sequence before and after fill light in the case of triggering face detection, the method further includes:

[0021] Collect multiple face images under different lighting and shooting angles;

[0022] Identify key points in each face image frame for marking facial contours and facial features;

[0023] Connecting the key points based on the principle of connecting the facial features, dividing the facial image into a grid;

[0024] Get the reflection direction, reflection intensity and shadow model of each mesh;

[0025] Calculate the probability distribution of feature changes after reflection of each grid;

[0026] Modeling is performed according to the probability distribution of feature changes to construct a 3D face model.

[0027] In some embodiments, matching the reconstructed 3D model with a pre-built 3D face model includes:

[0028] Determining whether glasses are worn in the video image;

[0029] If you wear glasses, separate the glasses covering part;

[0030] Matching the 3D model corresponding to the separated glasses covering part with the pre-built glasses reflection model;

[0031] The 3D model corresponding to the separated glasses-covered part is matched with the pre-built 3D face model.

[0032] In some embodiments, before acquiring the video image sequence before and after fill light when face detection is triggered, the method further includes:

[0033] Double interpolation scaling is performed on the length and width respectively, and both length and width are scaled to 1 / 2 of the original;

[0034] The scaled image is enhanced using the USM algorithm;

[0035] Use the face detection tool on the enhanced image.

[0036] In a second aspect, an embodiment of the present invention provides a device for face image recognition, the device comprising:

[0037] The first acquisition module is used to acquire the video image sequence before and after fill light when face detection is triggered;

[0038] A recognition module, used for recognizing feature points of the video image sequence and performing normalization processing;

[0039] The second acquisition module is used to obtain the normalized feature quantity and perform 3D reconstruction according to the feature quantity before and after the fill light;

[0040] The matching module is used to match the reconstructed 3D model with the pre-built 3D face model. If the matching value is greater than a threshold, it is determined not to be a face; if the matching value is less than the threshold, it is determined to be a face.

[0041] In a third aspect, a device for facial image recognition is provided, the device comprising:

[0042] one or more processors;

[0043] a storage device for storing one or more programs,

[0044] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0045] In a fourth aspect, an embodiment of the present invention provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a robot, the robot executes the method as described above.

[0046] The embodiment of the present invention provides a method, device and readable storage medium for face image recognition. When face detection is triggered, a video image sequence before and after fill light is obtained; feature points of the video image sequence are identified and normalized; feature quantities after normalization are obtained, and 3D reconstruction is performed based on the feature quantities before and after fill light; the reconstructed 3D model is matched with a pre-built face 3D model, and if the matching value is greater than a threshold, it is determined not to be a face, and if the matching value is less than a threshold, it is determined to be a face. Thus, a better and more convenient experience is provided without the need for user body movements or voice cooperation, and the recognition result is more accurate, preventing misidentification caused by screen, paper printing, and photo attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] One or more embodiments are exemplarily described by pictures in the corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and the figures in the drawings do not constitute proportional limitations unless otherwise stated.

[0048] Figure 1 A schematic diagram of a method for facial image recognition provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of a method for facial image recognition provided by an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of another method for facial image recognition provided by an embodiment of the present invention;

[0051] Figure 4 It is a structural schematic diagram of a facial image recognition device provided by an embodiment of the present invention;

[0052] Figure 5 A schematic diagram of the hardware structure of a facial image recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0054] Embodiment 1

[0055] refer to Figure 1 , Figure 1 A schematic diagram of a method for facial image recognition provided by an embodiment of the present invention. Figure 1 As shown, the method includes:

[0056] Step 101, when face detection is triggered, obtaining a video image sequence before and after fill light;

[0057] Among them, when the user uses face image recognition, he triggers the face detection button to obtain photos with red, yellow and blue fill light and photos without fill light respectively.

[0058] Step 102, identifying feature points of the video image sequence and performing normalization processing;

[0059] Among them, images have large differences in size, position, and posture. These differences affect the detection results. Normalization can remove the influence of these factors to the greatest extent.

[0060] Optionally, the identifying feature points of the video image sequence and performing normalization processing includes:

[0061] The key points used to mark the facial contour and facial features in each frame of the face image are used as feature points, wherein the key points include: key points of eyes, eyebrows, nose, mouth and cheeks;

[0062] The feature points are connected by lines based on the principle of connecting the five features of the face, the face image is divided into grids, and the direction, color and / or texture inside each grid are made consistent.

[0063] Optionally, the identifying feature points of the video image sequence and performing normalization processing further includes:

[0064] Each grid is slightly translated in multiple directions to form a new grid, and the original grid and the new grid together constitute the grid set of the original grid;

[0065] Calculate multiple feature quantities of each grid in the same grid set to form a feature sequence of the grid, calculate the feature quantity distance between every two feature sequences, and find the grid with the smallest sum of feature quantity distances with other grids in the same grid set as the candidate grid.

[0066] In practice, the video image sequence has 80 feature points. The 80 feature points are connected according to the principle of connecting the facial features. The connection divides the facial image into a grid. Each grid strives for consistency in direction, color, and texture. Taking the grid as a unit, calculate the brightness mean, variance, LBP feature quantity, HOG feature quantity, and Gabor features in multiple directions. Slight translation is performed on each grid in 8 directions. The 8 directions are up, down, left, right, upper left, lower left, upper right, and lower right. Each translation forms a new grid, and the feature sequence is calculated. For the feature sequence calculated for the new grid, for the same grid, a grid set is obtained by translation. The feature quantity distances of the grids in the same set are calculated two by two. The grid with the smallest sum of distances to other grids is found in the grid set as a candidate grid to replace the grid segmented for the first time. In this way, each image forms several grids with relatively stable feature values.

[0067] Step 103, obtaining the normalized feature quantity, and performing 3D reconstruction according to the feature quantity before and after the fill light;

[0068] Optionally, the obtaining of the feature quantity after normalizing the feature point includes:

[0069] Taking the normalized grid as a unit, various feature quantities of the video image sequence before and after fill light are calculated to form a feature sequence;

[0070] Compare the reflective brightness, mesh texture, color and light-shade changes of the grid before and after the fill light, and calculate the reflective feature quantity;

[0071] The feature sequence and the reflective feature quantity are obtained.

[0072] Practically, for images of red, yellow and blue light reflection and without fill light, the brightness mean, variance, LBP feature quantity, HOG feature quantity and Gabor features in multiple directions are calculated in units of grids to form a feature sequence. The images with fill light are compared with the original images without fill light. The reflected brightness, the texture before and after the grid, the color change, and the light and dark change are compared one by one in units of the previously calculated grids to obtain the reflected feature quantity after comparison.

[0073] 3D reconstruction is performed based on the feature quantities before and after fill light. The 3D reconstruction is divided into several parts: nose, cheek, eyes, and mouth. It is assumed that the skin color and smoothness of the cheek part are consistent. The strength of the reflection is taken as the Z-axis point, and the position of the point on the 2D plane is taken as the XY-axis coordinate point. The least squares method is used to fit the surface of the cheek. The reflection curve of the newly entered sample is matched with the reflection curve of the template for similarity. The reflection value of the nose part is the Z-axis point, and the coordinates of the point on the 2D plane are the XY-axis coordinates. The surface of the nose is fitted. The same method is used to fit the surfaces of the eyes and mouth.

[0074] Step 104, matching the reconstructed 3D model with the pre-constructed 3D face model, if the matching value is greater than a threshold, it is determined not to be a face, if the matching value is less than the threshold, it is determined to be a face.

[0075] Optionally, matching the reconstructed 3D model with a pre-built 3D face model includes:

[0076] Determining whether glasses are worn in the video image;

[0077] If you wear glasses, separate the glasses covering part;

[0078] Matching the 3D model corresponding to the separated glasses covering part with the pre-built glasses reflection model;

[0079] The 3D model corresponding to the separated glasses-covered part is matched with the pre-built 3D face model.

[0080] The reconstructed network is matched with the real face 3D model, and the depth of the fitted face is matched with the 3D depth model of the given face. If the matching value is greater than the threshold, it is considered not a face, and if the matching value is less than the threshold, it is considered a face. In the matching process, the Euclidean distance formula can be used for similarity calculation.

[0081] In practice, for the processing of the mirror reflection at the position of the glasses, because the position of the glasses is different from the reflection of the skin surface, in the case of mirror reflection (facing the light source) or weakened reflection (not facing the light source), special processing is performed on the position of the glasses: identifying whether glasses are worn. Collect facial images of people wearing glasses as samples, calculate edge information, and calculate methods such as canny, gabor and other edge processing algorithms to detect whether there are objects similar to glasses around the eyes. The detection algorithms include horizontal linear object detection, glasses template matching and other algorithms.

[0082] If you wear glasses, the position of the glasses is accurately calculated using edge tracking and other algorithms. The reflection of the glasses is calculated, and images of reflected light from various glasses are collected to build a glasses reflection model.

[0083] For images of people wearing glasses, the image is separated into the part covered by glasses and the part not covered by glasses, and the parts are matched with the real face 3D model respectively. The part covered by glasses is matched with the glasses reflection model, and the separated part not covered by glasses is matched with the face 3D model to obtain the matching value. If the matching value is within the threshold, it is considered to be a face, otherwise, it is considered not to be a face.

[0084] The embodiment of the present invention provides a method for facial image recognition. When face detection is triggered, a video image sequence before and after fill light is obtained; feature points of the video image sequence are identified and normalized; feature quantities after normalization are obtained, and 3D reconstruction is performed based on the feature quantities before and after fill light; the reconstructed 3D model is matched with a pre-built 3D face model, and if the matching value is greater than a threshold, it is determined not to be a face, and if the matching value is less than a threshold, it is determined to be a face. Thus, a better and more convenient experience is provided without the need for user body movements or voice cooperation, and the recognition result is more accurate, preventing misidentification caused by screen, paper printing, and photo attacks.

[0085] Embodiment 2

[0086] In conjunction with the first embodiment, before step 101, step 105 is further included, referring to Figure 2 , Figure 2 A schematic diagram of another method for face image recognition provided by an embodiment of the present invention. Figure 2 As shown, the method includes:

[0087] 105, obtaining the trained 3D face model;

[0088] Optionally, obtaining the trained 3D face model includes:

[0089] Collect multiple face images under different lighting and shooting angles;

[0090] Identify key points in each face image frame for marking facial contours and facial features;

[0091] Connecting the key points based on the principle of connecting the facial features, dividing the facial image into a grid;

[0092] Get the reflection direction, reflection intensity and shadow model of each mesh;

[0093] Calculate the probability distribution of feature changes after reflection of each grid;

[0094] Modeling is performed according to the probability distribution of feature changes to construct a 3D face model.

[0095] It is feasible to collect reflection images of real people of different ages, genders and nationalities under various lighting conditions, identify and judge the shadow, reflection direction and reflection intensity, and use the Photometric algorithm to reconstruct three images of different lighting conditions at the same position. However, the traditional Photometric algorithm has a large amount of calculation and cannot meet the real-time requirements. Therefore, the reflection intensity and shadow model of each grid are calculated using the previous grid reflection feature information, rather than the entire face as input, which greatly reduces the amount of calculation. A face has 200*200=40,000 pixels, that is, 40,000 inputs. After gridding, a face has 200 (number of grids) *10 (number of features)=2000 inputs, which can fully meet the real-time requirements of mobile phones. Calculate the probability distribution of feature changes after each grid is reflected.

[0096] Step 101, when face detection is triggered, obtaining a video image sequence before and after fill light;

[0097] Step 102, identifying feature points of the video image sequence and performing normalization processing;

[0098] Step 103, obtaining the normalized feature quantity, and performing 3D reconstruction according to the feature quantity before and after the fill light;

[0099] Step 104, matching the reconstructed 3D model with the pre-constructed 3D face model, if the matching value is greater than a threshold, it is determined not to be a face, if the matching value is less than the threshold, it is determined to be a face.

[0100] Embodiment 3

[0101] In combination with the first or second embodiment, before step 105 or 101, step 106 is further included, referring to Figure 3 , Figure 3 A schematic diagram of another method for face image recognition provided by an embodiment of the present invention. Figure 3 As shown, the method includes:

[0102] Step 106, perform dual interpolation scaling on the length and width respectively, scaling both the length and width to 1 / 2 of the original; enhance the scaled image using the USM algorithm; and use a face detection tool on the enhanced image;

[0103] In practice, the face position is first identified for each frame of the image, and the existing tools are used to perform face detection on the input image. Since the speed of the existing tools cannot meet the real-time requirements of the mobile phone, the input image is preprocessed, and the length and width are double interpolated and scaled to 1 / 2 of the original, that is, the input image is 1 / 4 of the original size. After scaling, the clarity of the image is partially lost, and the classic USM algorithm is used to enhance the image. After preprocessing, the face detection tool is input, the recognition rate remains unchanged, and the speed is increased to 4 times the original, which can meet the real-time detection requirements of the mobile phone.

[0104] Step 105, obtaining a trained 3D face model;

[0105] Step 101, when face detection is triggered, obtaining a video image sequence before and after fill light;

[0106] Step 102, identifying feature points of the video image sequence and performing normalization processing;

[0107] Step 103, obtaining the normalized feature quantity, and performing 3D reconstruction according to the feature quantity before and after the fill light;

[0108] Step 104, matching the reconstructed 3D model with the pre-constructed 3D face model, if the matching value is greater than a threshold, it is determined not to be a face, if the matching value is less than the threshold, it is determined to be a face.

[0109] Embodiment 4

[0110] refer to Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the structure of a facial image recognition device provided by an embodiment of the present invention. Figure 4 As shown, the facial image recognition device includes:

[0111] The first acquisition module 401 is used to acquire a video image sequence before and after fill light when face detection is triggered;

[0112] The recognition module 402 is used to recognize the feature points of the video image sequence and perform normalization processing;

[0113] The second acquisition module 403 is used to acquire the normalized feature quantity and perform 3D reconstruction according to the feature quantity before and after the fill light;

[0114] The matching module 404 is used to match the reconstructed 3D model with the pre-constructed 3D face model. If the matching value is greater than a threshold, it is determined that it is not a face; if the matching value is less than the threshold, it is determined that it is a face.

[0115] The present invention can be implemented in the following ways:

[0116] The first step is to identify the face position for each frame of the image. Use existing tools to perform face detection on the input image. Since the speed of existing tools cannot meet the real-time requirements of mobile phones, the input image is preprocessed and the length and width are double interpolated and scaled to 1 / 2 of the original, that is, the input image is 1 / 4 of the original size. After scaling, the clarity of the image is partially lost. The classic USM algorithm is used to enhance the image. After preprocessing, the face detection tool is input, the recognition rate remains unchanged, and the speed is increased to 4 times the original, which can meet the real-time detection requirements of mobile phones.

[0117] The second step is to collect reflection images of real people of different ages, genders and nationalities under various lighting conditions, identify and judge the shadow, reflection direction and reflection intensity, and use the Photometric algorithm to reconstruct three images of different lighting conditions at the same position. However, the traditional Photometric algorithm has a large amount of calculation and cannot meet the real-time requirements. Therefore, the reflection intensity and shadow model of each grid are calculated using the previous grid reflection feature information, rather than the entire face as input, which greatly reduces the amount of calculation. A face has 200*200=40,000 pixels, that is, 40,000 inputs. After gridding, a face has 200 (number of grids) *10 (number of features)=2000 inputs, which can fully meet the real-time requirements of mobile phones. Calculate the probability distribution of feature changes after each grid is reflected.

[0118] The third step is to start three kinds of monochromatic light sources to fill in the face in sequence after the face is found. The three light sources are recorded as A1, A2, and A3. After the fill light hits the face, it is reflected into the camera to form a video image sequence, including no fill light, image after A1 color fill light, image after A2 color fill light, and image after A3 color fill light, a sequence of four images.

[0119] The key points of the image sequence are identified and the key points of the facial features in each frame are extracted. This solution extracts the contours of the eyes, eyebrows, nose, mouth, and cheeks, and uses 80 feature points to mark the facial contours and key positions of the facial features.

[0120] The fourth step is to normalize the image. The image has large differences in size, position, and posture. These differences affect the detection results. Normalization can remove the influence of these factors to the greatest extent. The 80 feature points are connected according to the principle of connecting the facial features. The connection divides the face image into a grid. Each grid strives for consistency in direction, color, and texture. Taking the grid as a unit, calculate the brightness mean, variance, LBP feature quantity, HOG feature quantity, and Gabor features in multiple directions. Each grid is slightly translated in 8 directions. The 8 directions are up, down, left, right, upper left, lower left, upper right, and lower right. Each translation forms a new grid and calculates the feature sequence. For the feature sequence calculated for the new grid, for the same grid, a grid set is obtained by translation. The feature quantity distances of the grids in the same set are calculated two by two. The grid with the smallest sum of distances to other grids is found in the grid set as a candidate grid to replace the grid segmented for the first time. In this way, each image forms several grids with relatively stable feature values.

[0121] The fifth step is to calculate the features of key points and form feature sequences for the images of red, yellow and blue light reflection and no fill light, taking grids as units. The images with fill light are compared with the original images without fill light. Taking the previously calculated grids as units, the reflection brightness, texture before and after the grid, color change, and light and dark change are compared one by one to obtain the compared feature quantities. 3D reconstruction is performed based on the feature quantities before and after fill light. The 3D reconstruction is divided into several parts: nose, cheek, eyes, and mouth. Assuming that the skin color smoothness of the cheek part is consistent, the strength of the reflection is taken as the Z axis point, and the position of the point on the 2D plane is taken as the XY axis coordinate point. The least squares method is used to fit the surface of the cheek. The reflection curve of the newly entered sample is matched with the reflection curve of the template for similarity. The reflection value of the nose part is the Z axis point, and the coordinates of the point on the 2D plane are the XY axis coordinates. Fit the surface of the nose. In the same way, fit the surfaces of the eyes and mouth.

[0122] In the sixth step, the reconstructed network is matched with the real face 3D model, and the 3D depth model of the given face is compared. The fitted face depth is matched with it. If the matching value is greater than the threshold, it is considered not a face, and if the matching value is less than the threshold, it is considered a face. In the matching process, the Euclidean distance formula can be used to calculate the similarity.

[0123] The seventh step is to process the mirror reflection at the position of the glasses. Because the position of the glasses is different from the reflection of the skin surface, there will be mirror reflection (facing the light source) or weakened reflection (not facing the light source), so special processing is done on the position of the glasses: identify whether the glasses are worn. Collect the face images of people wearing glasses as samples, calculate the edge information, and calculate the edge processing algorithms such as canny and gabor to detect whether there are objects similar to glasses around the eyes. The detection algorithms include horizontal linear object detection and glasses template matching algorithms.

[0124] If you wear glasses, the position of the glasses is accurately calculated using edge tracking and other algorithms. The reflection of the glasses is calculated, and images of reflected light from various glasses are collected to build a glasses reflection model.

[0125] For images of people wearing glasses, the image is separated into the part covered by glasses and the part not covered by glasses, and the parts are matched with the real face 3D model respectively. The part covered by glasses is matched with the glasses reflection model, and the separated part not covered by glasses is matched with the face 3D model to obtain the matching value. If the matching value is within the threshold, it is considered to be a face, otherwise, it is considered not to be a face.

[0126] The embodiment of the present invention provides a facial image recognition device, which, when triggering face detection, obtains a video image sequence before and after fill light; identifies feature points of the video image sequence and performs normalization processing; obtains the feature quantity after normalization processing, and performs 3D reconstruction based on the feature quantity before and after fill light; matches the reconstructed 3D model with a pre-built 3D face model, and determines that it is not a face if the matching value is greater than a threshold, and determines that it is a face if the matching value is less than the threshold. Thus, a better and more convenient experience is provided without the need for user body movements or voice cooperation, and the recognition result is more accurate, preventing misidentification caused by screen, paper printing, and photo attacks.

[0127] Embodiment 5

[0128] refer to Figure 5 , Figure 5 A hardware structure diagram of a facial image recognition device 13 provided in an embodiment of the present invention is shown in FIG. Figure 5 As shown, the face image recognition device 13 includes:

[0129] One or more processors 131 and memory 132, Figure 5 A processor 131 is taken as an example.

[0130] The processor 131 and the memory 132 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0131] The memory 132 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for face image recognition in the embodiment of the present application. The processor 131 executes various functional applications and data processing of the controller by running the non-volatile software programs, instructions and modules stored in the memory 132, that is, the method for face image recognition in the above method embodiment is implemented.

[0132] The memory 132 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the device positioning device for face image recognition, etc. In addition, the memory 132 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 132 may optionally include a memory remotely arranged relative to the processor 131, and these remote memories may be connected to the device for face image recognition via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0133] The one or more modules are stored in the memory 132, and when executed by the one or more processors 131, perform the method of face image recognition in any of the above method embodiments, for example, perform the above described Figure 1-Figure 3 Steps 101 to 106 of the method; Implement Figure 4 The functions of modules 401-404 in.

[0134] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.

[0135] The embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as Figure 5 A processor 131 in the embodiment may enable the one or more processors to execute the method for face image recognition in any of the above method embodiments, for example, to execute the above described Figure 1-Figure 3 Steps 101 to 106 of the method; implementing Figure 4 The functions of modules 401-404 in.

[0136] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] Through the description of the above embodiments, a person of ordinary skill in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course by hardware. A person of ordinary skill in the art can understand that all or part of the processes in the above embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for facial image recognition, characterized in that: The method comprises: When face detection is triggered, obtain the video image sequence before and after fill light; Identifying feature points of the video image sequence and performing normalization processing; Obtain the normalized feature quantity, and perform 3D reconstruction based on the feature quantity before and after fill light; The reconstructed 3D model is matched with the pre-built 3D face model. If the matching value is greater than the threshold, it is determined not to be a face. If the matching value is less than the threshold, it is determined to be a face. The obtaining of the normalized feature quantity includes: Taking the normalized grid as a unit, various feature quantities of the video image sequence before and after fill light are calculated to form a feature sequence; Compare the reflective brightness, mesh texture, color and light-shade changes of the grid before and after the fill light, and calculate the reflective feature quantity; The feature sequence and the reflective feature quantity are obtained.

2. The method according to claim 1, characterized in that The identifying feature points of the video image sequence and performing normalization processing includes: The key points used to mark the facial contour and facial features in each frame of the face image are used as feature points, wherein the key points include: key points of eyes, eyebrows, nose, mouth and cheeks; The feature points are connected by lines based on the principle of connecting the five features of the face, the face image is divided into grids, and the direction, color and / or texture inside each grid are made consistent.

3. The method according to claim 2, characterized in that The identifying feature points of the video image sequence and performing normalization processing also includes: Each grid is slightly translated in multiple directions to form a new grid, and the original grid and the new grid together constitute the grid set of the original grid; Calculate multiple feature quantities of each grid in the same grid set to form a feature sequence of the grid, calculate the feature quantity distance between every two feature sequences, find the grid with the smallest sum of feature quantity distances with other grids in the same grid set as the candidate grid, and use the candidate grid in the same grid set to replace the original grid.

4. The method according to claim 1, characterized in that Before acquiring the video image sequence before and after fill light in the case of triggering face detection, the method further includes: Collect multiple face images under different lighting and shooting angles; Identify key points in each face image frame for marking facial contours and facial features; Connecting the key points based on the principle of connecting the facial features, dividing the facial image into a grid; Get the reflection direction, reflection intensity and shadow model of each mesh; Calculate the probability distribution of feature changes after reflection of each grid; Modeling is performed according to the probability distribution of feature changes to construct a 3D face model.

5. The method according to any one of claims 1 to 4, characterized in that: The matching of the reconstructed 3D model with the pre-built 3D face model includes: Determining whether glasses are worn in the video image; If you wear glasses, separate the glasses covering part; Matching the 3D model corresponding to the separated glasses covering part with the pre-built glasses reflection model; The 3D model corresponding to the separated glasses-covered part is matched with the pre-built 3D face model.

6. The method according to any one of claims 1 to 4, characterized in that: Before acquiring the video image sequence before and after fill light in the case of triggering face detection, the method further includes: Double interpolation scaling is performed on the length and width respectively, and both length and width are scaled to 1 / 2 of the original; The scaled image is enhanced using the USM algorithm; Use the face detection tool on the enhanced image.

7. A device for facial image recognition, characterized in that: The device comprises: The first acquisition module is used to acquire the video image sequence before and after fill light when face detection is triggered; A recognition module, used for recognizing feature points of the video image sequence and performing normalization processing; The second acquisition module is used to acquire the normalized feature quantity and perform 3D reconstruction according to the feature quantity before and after the fill light. The acquisition of the normalized feature quantity includes: Taking the normalized grid as a unit, various feature quantities of the video image sequence before and after fill light are calculated to form a feature sequence; Compare the reflective brightness, mesh texture, color and light-shade changes of the grid before and after the fill light, and calculate the reflective feature quantity; Acquiring the feature sequence and the reflective feature quantity; The matching module is used to match the reconstructed 3D model with the pre-built 3D face model. If the matching value is greater than a threshold, it is determined not to be a face; if the matching value is less than the threshold, it is determined to be a face.

8. A facial image recognition device, characterized in that: The device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A non-volatile computer-readable storage medium storing computer-executable instructions, wherein when the computer-executable instructions are executed by a facial image recognition device, the facial image recognition device executes the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Face recognition method, mobile terminal and computer readable storage medium

    CN107844763A

  • Method, device, and apparatus for three-dimensional face reconstruction, and compute readable storage medium

    CN108898665A