WO2021218659A1 - 人脸识别 - Google Patents

人脸识别 Download PDF

Info

Publication number
WO2021218659A1
WO2021218659A1 PCT/CN2021/087718 CN2021087718W WO2021218659A1 WO 2021218659 A1 WO2021218659 A1 WO 2021218659A1 CN 2021087718 W CN2021087718 W CN 2021087718W WO 2021218659 A1 WO2021218659 A1 WO 2021218659A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
sample
image
face mask
mask image
Prior art date
Application number
PCT/CN2021/087718
Other languages
English (en)
French (fr)
Inventor
陈智泉
马晨光
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021218659A1 publication Critical patent/WO2021218659A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Definitions

  • This specification relates to the field of biological recognition technology, and in particular to a face recognition method and device.
  • one or more embodiments of the present specification provide a face recognition method, including: in response to a face recognition request sent by a first user, collecting a first face depth image of the first user, and the first user
  • a face depth image includes first distance information of each feature point on the face of the first user.
  • the first face depth image is converted into a first face mask image.
  • the first face mask image includes pixel values corresponding to each feature point on the face of the first user.
  • the face recognition model is trained based on sample face mask images of a plurality of sample users, and the sample face mask images are converted based on the sample face depth images of the sample users.
  • a face recognition device including: a collection module, which collects a first face depth image of the first user in response to a face recognition request sent by a first user ,
  • the first face depth image includes first distance information of each feature point on the face of the first user.
  • a first conversion module which converts the first face depth image into a first face mask image according to the first distance information, where the first face mask image includes the face of the first user The pixel value corresponding to each feature point of.
  • the recognition module performs face recognition on the first user according to the first face mask image and a pre-trained face recognition model to obtain a face recognition result.
  • the face recognition model is trained based on sample face mask images of a plurality of sample users, and the sample face mask images are converted based on the sample face depth images of the sample users.
  • one or more embodiments of the present specification provide a face recognition device, including: a processor; and a memory arranged to store computer-executable instructions that, when executed, cause the processing Device:
  • a face recognition request sent by the first user collect a first face depth image of the first user, where the first face depth image includes information about each feature point on the face of the first user The first distance information.
  • the first face depth image is converted into a first face mask image.
  • the first face mask image includes pixel values corresponding to each feature point on the face of the first user.
  • the face recognition model is trained based on sample face mask images of a plurality of sample users, and the sample face mask images are converted based on the sample face depth images of the sample users.
  • one or more embodiments of this specification provide a storage medium for storing computer-executable instructions that, when executed, implement the following process: in response to a face recognition request sent by a first user Collecting a first face depth image of the first user, where the first face depth image includes first distance information of each feature point on the face of the first user. According to the first distance information, the first face depth image is converted into a first face mask image.
  • the first face mask image includes pixel values corresponding to each feature point on the face of the first user.
  • the face recognition model is obtained by training based on sample face mask images of a plurality of sample users, and the sample face mask image is obtained by conversion based on the sample face depth images of the sample users
  • Fig. 1 is a schematic flowchart of a face recognition method according to an embodiment of the present specification
  • Fig. 2 is a schematic flowchart of a method for training a face recognition model according to an embodiment of the present specification
  • Fig. 3 is a schematic flowchart of a face recognition method according to another embodiment of the present specification.
  • Fig. 4 is a schematic block diagram of a face recognition device according to an embodiment of the present specification.
  • Fig. 5 is a schematic block diagram of a face recognition device according to an embodiment of the present specification.
  • One or more embodiments of this specification provide a face recognition method and device to solve the technical problem that the existing face recognition method has poor privacy protection for users.
  • Fig. 1 is a schematic flowchart of a face recognition method according to an embodiment of the present specification.
  • the face recognition method can be applied to a client with a face image collection function.
  • the face recognition method includes:
  • S102 In response to a face recognition request sent by the first user, collect a first face depth image of the first user, where the first face depth image includes first distance information of each feature point on the face of the first user.
  • the first distance information of each feature point refers to the distance information between each feature point and the acquisition device (ie, the client) of the first face depth image.
  • a structured light-based depth camera with three-dimensional image acquisition capability is installed on the client.
  • the depth image of the user's face can be collected through the depth camera.
  • S104 Convert the first face depth image into a first face mask image according to the first distance information, where the first face mask image includes pixel values corresponding to each feature point on the face of the first user.
  • the first face depth image since the first face depth image includes the first distance information of each feature point on the face of the first user, it can be converted into the first face mask image based on the first distance information of each feature point, namely 2D face image.
  • the first face depth image may be converted into the first face mask image based on the first distance information of each feature point and the preset correspondence relationship between the distance information and the pixel value.
  • the distance information of each feature point is negatively correlated with the pixel value. That is, the farther the feature point is from the client, the lower the pixel value corresponding to the feature point, and the lower the brightness reflected in the face mask image; conversely, the closer the feature point is to the client, the pixel value corresponding to the feature point The higher the value, the higher the brightness reflected in the face mask image.
  • the pixel value corresponding to the feature point corresponding to the nose is the highest, and the brightness reflected in the face mask image is higher, such as It can be white (that is, the pixel value is 255).
  • the forehead is slightly farther away from the client than the nose, so the pixel value corresponding to the feature point corresponding to the forehead is slightly smaller than the pixel value corresponding to the nose, and the brightness reflected in the face mask image is also It is slightly darker, such as gray, and the color depth is determined according to the depth information (ie distance information) of each feature point on the face.
  • S106 Perform face recognition on the first user according to the first face mask image and the pre-trained face recognition model to obtain a face recognition result.
  • the face recognition model is trained based on the sample face mask images of multiple sample users; the sample face mask image is converted based on the sample face depth images of the sample users.
  • the specific training method of the face recognition model will be described in detail in the following embodiments.
  • the first face depth image includes the distance information of each feature point on the face, and is based on the distance of each feature point.
  • the information converts the first face depth image into a first face mask image, and then performs face recognition on the first user according to the first face mask image and a pre-trained face recognition model.
  • Make the face recognition process only rely on the user's face depth data (that is, the distance information of each feature point of the face), without collecting 2D data on the face such as iris, facial features, facial expressions, etc., thereby protecting the user's facial privacy Information plays a very good protective effect.
  • the face recognition model trained based on the sample face mask image is more capable of fully representing the user's facial features than the traditional 2D recognition algorithm, it can ensure the accuracy of the face recognition results. To meet the needs of various businesses.
  • the first face mask image after the first face depth image is converted into the first face mask image, it can be determined whether the first face mask image meets a preset condition, and the preset condition includes: a face in the image The angle conforms to the preset angle, the number of invalid pixels in the image is lower than the first preset threshold, the image noise reaches the second preset threshold, and so on. If the first face mask image does not meet the above preset conditions, the first face mask image is preprocessed to obtain a second face mask image that meets the preset conditions, and then according to the second face mask image The image and the pre-trained face recognition model perform face recognition on the first user.
  • the following method can be used to determine whether the first face mask image meets the preset condition:
  • the designated part of the face is the nose
  • the preset angle is the corresponding angle when the human eye is looking at the camera.
  • the nose should be located on the center line of the face in the vertical direction.
  • the second position information is the center line of the face in the vertical direction.
  • the second position information of the designated part of the face is not limited to the center line of the face in the vertical direction, and it may also be other more accurate position information.
  • the second position information of the nose is: the human face is on the center line in the vertical direction, and is located at the lower 2/3 position of the human face.
  • the second position information of the eyes is: symmetrically distributed on both sides of the center line of the face in the vertical direction, and at the upper 1/3 position of the face. and many more.
  • the center line the center line of the face in the vertical direction
  • the face angle can be rotated by the following method: First, the face angle in the first face mask image is determined according to the first position information of the designated part of the face in the first face mask image ; Secondly, transform the face angle in the first face mask image to obtain a second face mask image whose face angle meets the preset angle.
  • the angle of the face in the first face mask image is 30 degrees to the left .
  • the angle of the face in the first face mask image can be rotated 30 degrees to the right, so that the angle of the face after the rotation meets the preset angle.
  • the first face mask image can be masked by interpolation
  • the image is preprocessed.
  • invalid pixels include pixels that have not been collected or that have failed to be collected.
  • the invalid pixel can be restored by interpolation according to the pixel value of the valid pixel around the invalid pixel.
  • the number of invalid pixels in the first face mask image is lower than the first preset threshold, so that the first face mask image meets the preset conditions.
  • the existing image denoising method can be used to perform denoising processing on the first face mask image. Since the image denoising method is an existing technology, it will not be described in detail.
  • the face recognition model includes sample face mask feature information of each sample user. Based on this, when performing face recognition on the first user according to the first face mask image and the pre-trained face recognition model, the following methods can be used to perform face recognition:
  • Step A Extract the first face mask feature information of the first user from the first face mask image.
  • Step A2 Match the first face mask feature information with the sample face mask feature information.
  • Step A3 Determine whether the face recognition model contains sample face mask feature information that matches the first face mask feature information according to the matching result. If it is, it is determined that the face recognition result is passed; if not, it is determined that the face recognition result is not passed.
  • the face recognition model performs face recognition on the first user.
  • the identification process is the same as the above steps A1-A3, and will not be repeated here.
  • the entire face recognition process is completely separated from the 2D data on the face such as iris, facial features, facial expressions, etc.
  • the face recognition process can be realized only by collecting the user's face depth data.
  • the user's facial privacy information has a good protection effect and can meet the needs of various businesses.
  • Fig. 2 is a schematic flowchart of a method for training a face recognition model according to an embodiment of the present specification. As shown in Figure 2, the training method of the face recognition model includes the following steps:
  • S201 Collect a sample face depth image of a sample user, where the sample face depth image includes second distance information of each feature point on the face of the sample user.
  • the second distance information of each feature point refers to the distance information between each feature point and the depth image acquisition device (that is, the client).
  • the depth image acquisition device that is, the client.
  • the structured light-based depth camera with 3D image acquisition capability installed in the client, the depth image of the sample face of the sample user can be collected.
  • the quality of the sample face depth images obtained can be evaluated.
  • the quality of the sample face depth images can be evaluated according to factors such as the exposure and sharpness of the sample face depth images.
  • the sample face depth image can be deleted to improve the overall quality of the face depth image as the sample data.
  • S202 Convert the sample face depth image into a sample face mask image according to the second distance information, where the sample face mask image includes pixel values corresponding to each feature point on the face of the sample user.
  • the sample face depth image since the sample face depth image includes the second distance information of each feature point on the face of the sample user, it can be converted into a sample face mask image based on the second distance information of each feature point, that is, a 2D face image.
  • the sample face depth image may be converted into a sample face mask image based on the second distance information of each feature point and the preset correspondence relationship between the distance information and the pixel value.
  • the distance information of each feature point is negatively correlated with the pixel value. That is, the farther the feature point is from the client, the lower the pixel value corresponding to the feature point, and the lower the brightness reflected in the face mask image; conversely, the closer the feature point is to the client, the pixel value corresponding to the feature point The higher the value, the higher the brightness reflected in the face mask image.
  • the pixel value corresponding to the feature point corresponding to the nose is the highest, and the brightness reflected in the face mask image is higher, such as It can be white (that is, the pixel value is 255).
  • the forehead is slightly farther away from the client than the nose, so the pixel value corresponding to the feature point corresponding to the forehead is slightly smaller than the pixel value corresponding to the nose, and the brightness reflected in the face mask image is also It is slightly darker, such as gray, and the color depth is determined according to the depth information (ie distance information) of each feature point on the face.
  • S203 Perform preprocessing on the sample face mask image to obtain a sample face mask image that meets a preset condition.
  • the preset conditions include: the angle of the face in the image meets the preset angle, the number of invalid pixels in the image is lower than the first preset threshold, the image noise reaches the second preset threshold, and so on.
  • the method for preprocessing the sample face mask image is the same as the method for preprocessing the first face mask image in the foregoing embodiment, and will not be repeated here.
  • S205 Perform model training using the feature information of the sample face mask to obtain a face recognition model.
  • the face recognition model obtained by training includes the sample face mask feature information of each sample user.
  • the sample face mask images can be expanded to Enrich the number of sample face mask images.
  • a specified operation can be performed on the sample face mask image, so as to obtain a sample extended image corresponding to the sample face mask image.
  • the designated operations include image rotation, image angle transformation, image noise and other operations.
  • the extended sample image is used as the extended sample face mask image, and can also be used as sample data for model training. That is, in S204, extract the sample face mask feature information in the sample face mask image and the sample extension image that meet the conditions, and then use the extracted sample face mask feature information for model training to obtain a face recognition model.
  • the specified operation is an image rotation operation, and the face in the sample face mask image is rotated in different directions, such as flipping from left to right, flipping from right to left, etc., to obtain multiple different sample faces
  • the mask image is the sample extended image.
  • the designated operation is an image angle transformation operation. Transform the face angle in the sample face mask image, such as turning 30 degrees to the left, turning 45 degrees to the right, etc., to obtain multiple sample face mask images with different angles, that is, sample extended images .
  • the designated operation is an image noise addition operation.
  • the designated operation is an image noise addition operation.
  • sample face mask images by performing different types of specified operations on the sample face mask images, a small number of sample face mask images can be expanded into multiple sample face mask images, thereby making the sample face mask images richer , That is, the training samples of the face recognition model are more abundant, which in turn makes the trained face recognition model more accurate.
  • Fig. 3 is a schematic flowchart of a face recognition method according to another embodiment of the present specification. As shown in Figure 3, the face recognition method may include the following steps:
  • S301 In response to a face recognition request sent by the first user, collect a face depth image of the first user, where the face depth image includes distance information of various feature points on the face of the first user.
  • the quality of the acquired depth image of the face of the first user can also be evaluated.
  • the quality of the depth image of the face of the first user can be evaluated based on the exposure and clarity of the face depth image of the first user. If the quality evaluation is poor, the face depth image of the first user can be re-acquired to ensure the image quality of the face depth image, thereby ensuring the accuracy of the face recognition result.
  • S302 Convert the face depth image into a face mask image according to the distance information of each feature point, where the face mask image includes pixel values corresponding to each feature point on the face of the first user.
  • the preset conditions include: the angle of the face in the image meets the preset angle, the number of invalid pixels in the image is lower than the first preset threshold, the image noise reaches the second preset threshold, and so on.
  • S304 Perform preprocessing on the face mask image to obtain a face mask image that meets a preset condition.
  • S305 Extract the face mask feature information of the first user from the face mask image.
  • the face recognition model is trained based on sample face mask images of multiple sample users, and the sample face mask image is converted based on the sample face depth images of the sample users.
  • the specific face recognition model has been described in detail in the embodiment shown in FIG. 2 and will not be repeated here.
  • S307 Determine, according to the matching result, whether the face recognition model contains sample face mask feature information that matches the face mask feature information of the first user. If yes, execute S307; if not, execute S309.
  • the face recognition process only relies on the user's face depth data (that is, the distance information of each feature point of the face), and there is no need to collect 2D data on the face such as iris, facial features, and facial expressions. Thereby, it has a good protection effect on the user's facial privacy information.
  • the face recognition model trained based on the sample face mask image is more capable of fully representing the user's facial features than the traditional 2D recognition algorithm, it can ensure the accuracy of the face recognition results. To meet the needs of various businesses.
  • one or more embodiments of this specification also provide a face recognition device.
  • Fig. 4 is a schematic block diagram of a face recognition device according to an embodiment of the present specification. As shown in Figure 4, the face recognition device includes:
  • the first collection module 410 in response to a face recognition request sent by the first user, collects a first face depth image of the first user; the first face depth image includes the image on the face of the first user The first distance information of each feature point;
  • the first conversion module 420 converts the first face depth image into a first face mask image according to the first distance information; the first face mask image includes the first user face The pixel value corresponding to each feature point on the above;
  • the recognition module 430 performs face recognition on the first user according to the first face mask image and a pre-trained face recognition model to obtain a face recognition result; the face recognition model is based on multiple sample users The sample face mask image of is obtained through training; the sample face mask image is converted based on the sample face depth image of the sample user.
  • the device further includes: a judging module, which, after the first face depth image is converted into a first face mask image, judges whether the first face mask image conforms to A preset condition, the preset condition includes at least one of the following: the face angle in the image meets the preset angle, and the number of invalid pixels in the image is lower than a preset threshold; the first preprocessing module, if the first If the face mask image does not meet the preset condition, the first face mask image is preprocessed to obtain a second face mask image that meets the preset condition.
  • the recognition module 430 includes: a recognition unit that performs face recognition on the first user according to the second face mask image and a pre-trained face recognition model.
  • the preset condition includes: the angle of the face in the image meets the preset angle.
  • the judgment module includes: a first determining unit, which determines the first position information of the designated part of the face in the first face mask image, and determines that the face angle matches the preset angle.
  • the second location information of the designated part a determining unit, to determine whether the first location information is consistent with the second location information; a second determining unit, if the first location information is inconsistent with the second location information, then It is determined that the first face mask image does not meet the preset condition.
  • the first preprocessing module includes: a fourth determining unit, which determines the face angle in the first face mask image according to the first position information; The face angle in the first face mask image is transformed to obtain a second face mask image whose face angle matches the preset angle.
  • the first conversion module 420 includes: an image conversion unit, which converts the first face depth image according to the first distance information and the correspondence between the preset distance information and the pixel value Converted to the first face mask image; the distance information and the pixel value are negatively correlated.
  • the face recognition model includes sample face mask feature information of each of the sample users.
  • the recognition module 430 includes: a first extraction unit, which extracts the first face mask feature information of the first user from the first face mask image; a matching unit, which combines the first face mask image The mask feature information is matched with the sample face mask feature information, and according to the matching result, it is determined whether the face recognition model contains the sample face matching the first face mask feature information Mask feature information; a third determining unit, if the face recognition model contains the sample face mask feature information that matches the first face mask feature information, then determine the face recognition The result is passed; if the face recognition model does not include the sample face mask feature information that matches the first face mask feature information, it is determined that the face recognition result is not passed.
  • the device further includes: a second collection module, which collects the first face depth image of the first user before the face recognition request sent by the first user is collected.
  • a sample face depth image of a sample user the sample face depth image includes second distance information of each feature point on the face of the sample user;
  • a second conversion module according to the second distance information, converts the The sample face depth image is converted into a sample face mask image, and the sample face mask image includes the pixel value corresponding to each feature point on the face of the sample user;
  • the face mask image is preprocessed to obtain a sample face mask image that meets the preset condition; an extraction module is used to extract sample face mask features in the sample face mask image that meets the preset condition Information; a model training module, which uses the sample face mask feature information for model training to obtain the face recognition model.
  • the device further includes: an operation module, after the preprocessing is performed on the sample face mask image to obtain a sample face mask image that meets the preset conditions, A designated operation is performed on the sample face mask image to obtain a sample extended image corresponding to the sample face mask image; the designated operation includes at least one of the following: image rotation, image angle transformation, and image noise addition.
  • the extraction module includes: a second extraction unit, which extracts the sample face mask image and the sample face mask feature information in the sample extended image that meet the preset conditions.
  • the first face depth image includes the distance information of each feature point on the face, and is based on the distance information of each feature point
  • the first face depth image is converted into a first face mask image, and then face recognition is performed on the first user according to the first face mask image and the pre-trained face recognition model.
  • face recognition process only rely on the user's face depth data (that is, the distance information of each feature point of the face), without collecting 2D data on the face such as iris, facial features, facial expressions, etc., thereby protecting the user's facial privacy Information plays a very good protective effect.
  • the face recognition model trained based on the sample face mask image is more capable of fully representing the user's facial features than the traditional 2D recognition algorithm, it can ensure the accuracy of the face recognition results. To meet the needs of various businesses.
  • the face recognition device may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and a memory 502, and the memory 502 may store one or more storage applications or data. Among them, the memory 502 may be short-term storage or persistent storage.
  • the application program stored in the memory 502 may include one or more modules (not shown in the figure), and each module may include a series of computer-executable instructions for the face recognition device.
  • the processor 501 may be configured to communicate with the memory 502, and execute a series of computer-executable instructions in the memory 502 on the face recognition device.
  • the face recognition device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input and output interfaces 505, and one or more keyboards 506.
  • the face recognition device includes a memory and one or more programs.
  • One or more programs are stored in the memory, and one or more programs may include one or more modules, and each Each module may include a series of computer-executable instructions for the face recognition device, and the one or more programs configured to be executed by one or more processors include computer-executable instructions for performing the following:
  • the first face depth image of the first user is collected;
  • the first face depth image includes the first distance information of each feature point on the face of the first user;
  • the first distance information converts the first face depth image into a first face mask image;
  • the first face mask image includes information corresponding to each feature point on the face of the first user Pixel value; perform face recognition on the first user according to the first face mask image and a pre-trained face recognition model to obtain a face recognition result;
  • the face recognition model is based on multiple sample users
  • the sample face mask image is obtained through training;
  • the sample face mask image is obtained by conversion based on the sample face depth image of the sample user.
  • the processor may also cause the processor to: after converting the first face depth image into a first face mask image, determine the first face Whether the mask image meets a preset condition, the preset condition includes at least one of the following: the angle of the face in the image meets the preset angle, and the number of invalid pixels in the image is lower than the preset threshold;
  • the first face mask image is preprocessed to obtain a second face mask image that meets the preset conditions.
  • the performing face recognition on the first user according to the first face mask image and a pre-trained face recognition model includes: according to the second face mask image and pre-trained face recognition The model performs face recognition on the first user.
  • the preset condition includes: the angle of the face in the image meets the preset angle.
  • the processor may also cause the processor to: determine the first position information of the designated part of the face in the first face mask image; and determine that the face angle conforms to the The second position information of the designated part of the face when the angle is preset; it is determined whether the first position information is consistent with the second position information; if not, it is determined that the first face mask image does not conform to all The preset conditions.
  • the processor may further: determine the face angle in the first face mask image according to the first position information; The face angle in the face mask image is transformed to obtain a second face mask image whose face angle matches the preset angle.
  • the processor may also cause the processor: according to the first distance information and the preset correspondence between the distance information and the pixel value, The depth image is converted into a first face mask image; there is a negative correlation between the distance information and the pixel value.
  • the face recognition model includes sample face mask feature information of each of the sample users.
  • the processor may also: extract the first face mask feature information of the first user from the first face mask image; The face mask feature information is matched with the sample face mask feature information, and according to the matching result, it is determined whether the face recognition model contains the sample that matches the first face mask feature information Face mask feature information; if yes, it is determined that the face recognition result is passed; if not, it is determined that the face recognition result is not passed.
  • the processor may also be caused to: in response to the face recognition request sent by the first user, before collecting the first face depth image of the first user, Collect the sample face depth image of the sample user; the sample face depth image includes the second distance information of each feature point on the face of the sample user; according to the second distance information, the sample person The face depth image is converted into a sample face mask image; the sample face mask image includes the pixel value corresponding to each feature point on the face of the sample user; the pre-processing is performed on the sample face mask image Process to obtain a sample face mask image that meets the preset condition; extract sample face mask feature information in the sample face mask image that meets the preset condition; use the sample face mask feature Model training is performed on the information to obtain the face recognition model.
  • the processor may also be caused to perform the preprocessing on the sample face mask image to obtain a sample face mask that meets the preset conditions.
  • a specified operation is performed on the sample face mask image to obtain a sample extended image corresponding to the sample face mask image; the specified operation includes at least one of the following: image rotation, image angle transformation, image Add noise.
  • the extracting the sample face mask feature information in the sample face mask image that meets the preset condition includes: extracting the sample face mask image that meets the preset condition and the sample face mask image in the sample extended image Mask feature information of the sample face.
  • One or more embodiments of this specification also propose a computer-readable storage medium that stores one or more programs, and the one or more programs include instructions.
  • the electronic device can enable the electronic device to execute the aforementioned face recognition method, and is specifically configured to execute: in response to a face recognition request sent by a first user, collecting a first face depth image of the first user; The first face depth image includes first distance information of each feature point on the face of the first user; according to the first distance information, the first face depth image is converted into a first face Mask image; the first face mask image includes the pixel values corresponding to each feature point on the face of the first user; according to the first face mask image and a pre-trained face recognition model pair The first user performs face recognition to obtain a face recognition result; the face recognition model is trained based on sample face mask images of a plurality of sample users; the sample face mask image is based on the sample users The depth image of the sample face is converted.
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
  • one or more embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may adopt computer programs implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The form of the product.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • This application can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本说明书一个或多个实施例公开了一种人脸识别方法及装置,用以解决现有人脸识别方法对用户隐私保护性差的技术问题。所述方法包括:响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像,所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息。根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像。根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果。所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到,所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。

Description

人脸识别 技术领域
本说明书涉及生物识别技术领域,尤其涉及一种人脸识别方法及装置。
背景技术
目前的人脸识别技术方案,大多数是基于2D(即二维)人脸进行识别,或者以2D人脸为主、辅以其他方案(如3D人脸)综合进行识别。但无论是采用2D人脸识别还是以2D人脸为主辅以其他技术的方案,对使用者的隐私保护都有其固有的缺陷。为了更好地保护使用者的隐私,必须彻底摆脱2D人脸数据,以一种全新的数据来支撑整个人脸识别***。
发明内容
一方面,本说明书一个或多个实施例提供一种人脸识别方法,包括:响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像,所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息。根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像。所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值。根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果。所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到,所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
另一方面,本说明书一个或多个实施例提供一种人脸识别装置,包括:采集模块,响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像,所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息。第一转换模块,根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像,所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值。识别模块,根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果。所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到,所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
再一方面,本说明书一个或多个实施例提供一种人脸识别设备,包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像,所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息。根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像。所述第一人脸掩码图像包 括所述第一用户人脸上的各特征点对应的像素值。根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果。所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到,所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
再一方面,本说明书一个或多个实施例提供一种存储介质,用于存储计算机可执行指令,所述可执行指令在被执行时实现以下流程:响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像,所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息。根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像。所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值。根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果。所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到,所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到
附图说明
为了更清楚地说明本说明书一个或多个实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书一个或多个实施例中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是根据本说明书一实施例的一种人脸识别方法的示意性流程图;
图2是根据本说明书一实施例的一种人脸识别模型的训练方法的示意性流程图;
图3是根据本说明书另一实施例的一种人脸识别方法的示意性流程图;
图4是根据本说明书一实施例的一种人脸识别装置的示意性框图;
图5是根据本说明书一实施例的一种人脸识别设备的示意性框图。
具体实施方式
本说明书一个或多个实施例提供一种人脸识别方法及装置,用以解决现有人脸识别方法对用户隐私保护性差的技术问题。
为了使本技术领域的人员更好地理解本说明书一个或多个实施例中的技术方案,下面将结合本说明书一个或多个实施例中的附图,对本说明书一个或多个实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书一个或多个实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书一个或多个实施例保护的范围。
图1是根据本说明书一实施例的一种人脸识别方法的示意性流程图。在本说明书实施例中,人脸识别方法可应用于具有人脸图像采集功能的客户端。如图1所示,人脸识别方法包括:
S102,响应于第一用户发送的人脸识别请求,采集第一用户的第一人脸深度图像,第一人脸深度图像包括第一用户人脸上的各特征点的第一距离信息。
其中,各特征点的第一距离信息指的是各特征点与第一人脸深度图像的采集设备(即客户端)之间的距离信息。
本实施例中,在客户端安装有具有三维图像采集能力的基于结构光的深度相机。通过深度相机即可采集到用户的人脸深度图像。
S104,根据第一距离信息,将第一人脸深度图像转换为第一人脸掩码图像,第一人脸掩码图像包括第一用户人脸上的各特征点对应的像素值。
其中,由于第一人脸深度图像包括第一用户人脸上的各特征点的第一距离信息,因此可基于各特征点的第一距离信息将其转换为第一人脸掩码图像,即2D人脸图像。
在一个实施例中,可基于各特征点的第一距离信息以及预设的距离信息和像素值之间的对应关系,将第一人脸深度图像转换为第一人脸掩码图像。其中,各特征点的距离信息和像素值之间负相关。即,特征点距离客户端越远,该特征点对应的像素值越低,反映在人脸掩码图像中的亮度越低;反之,特征点距离客户端越近,该特征点对应的像素值越高,反映在人脸掩码图像中的亮度越高。
例如,在人眼正视客户端内设的镜头时,鼻子距离客户端的距离最近,则鼻子对应的特征点对应的像素值就最高,反映在人脸掩码图像中的亮度也就越高,如可以是白色(即像素值为255)。再例如,额头相较于鼻子而言,距离客户端的距离稍远,因此额头对应的特征点对应的像素值比鼻子对应的像素值稍小,其反映在人脸掩码图像中的亮度也就稍微暗一些,如可以是灰色,且颜色深浅程度根据人脸上各特征点的深度信息(即距离信息)来确定。
通过上述步骤,将第一人脸深度图像转换为第一人脸掩码图像后,即可得到黑白灰的2D人脸掩码图像。
S106,根据第一人脸掩码图像和预先训练的人脸识别模型对第一用户进行人脸识别,得到人脸识别结果。
其中,人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;样本人脸掩码图像基于样本用户的样本人脸深度图像转换得到。人脸识别模型的具体训练方法将在下面实施例中详细说明。
采用本说明书一个或多个实施例的技术方案,通过采集第一用户的第一人脸深度图像,第一人脸深度图像包括人脸上各特征点的距离信息,并根据各特征点的距离信息将 第一人脸深度图像转换为第一人脸掩码图像,进而根据第一人脸掩码图像和预先训练的人脸识别模型对第一用户进行人脸识别。使得人脸识别过程仅依赖于用户的人脸深度数据(即人脸各特征点的距离信息),而无需采集人脸上如虹膜、面部特征、面部表情等2D数据,从而对用户的面部隐私信息起到很好的保护效果。此外,由于基于样本人脸掩码图像训练得到的人脸识别模型相较于传统的2D识别算法而言,更能使用户的人脸特征得到充分的表示,因此能够确保人脸识别结果的准确性,满足各类业务的需求。
在一个实施例中,将第一人脸深度图像转换为第一人脸掩码图像之后,可判断第一人脸掩码图像是否符合预设条件,该预设条件包括:图像中的人脸角度符合预设角度、图像中的无效像素点数目低于第一预设阈值、图像噪声达到第二预设阈值等。若第一人脸掩码图像不符合上述预设条件,则对第一人脸掩码图像进行预处理,得到符合预设条件的第二人脸掩码图像,进而根据第二人脸掩码图像和预先训练的人脸识别模型对第一用户进行人脸识别。
其中,若预设条件为图像中的人脸角度符合预设角度,则可通过以下方法判断第一人脸掩码图像是否符合预设条件:
首先,确定第一人脸掩码图像中的人脸指定部位的第一位置信息,并确定人脸角度符合预设角度时人脸指定部位的第二位置信息。
例如,人脸指定部位为鼻子,预设角度为人眼正视摄像头时对应的角度,此时鼻子应位于人脸在竖直方向上的中心线上,即:人脸角度符合预设角度时鼻子的第二位置信息为人脸在竖直方向上的中心线上。
需要说明的是,人脸角度符合预设角度时,人脸指定部位的第二位置信息并不局限于人脸在竖直方向上的中心线上,其还可以是其他更加精确的位置信息。例如,鼻子的第二位置信息为:人脸在竖直方向上的中心线上、且在人脸靠下的2/3位置处。眼睛的第二位置信息为:对称分布于人脸在竖直方向上的中心线两侧、且在人脸靠上的1/3位置处。等等。
其次,判断第一位置信息与第二位置信息是否一致,若不一致,则确定第一人脸掩码图像不符合预设条件。
沿用上述举例,通过判断第一人脸掩码图像中鼻子所在的第一位置信息是否为人脸在竖直方向上的中心线(以下简称中心线)上,若否,则确定第一位置信息与第二位置信息不一致。这种情况下说明第一人脸掩码图像不符合预设条件,应通过转动人脸角度使鼻子位于人脸在竖直方向上的中心线上。
在一个实施例中,可通过以下方法转动人脸角度:首先,根据第一人脸掩码图像中的人脸指定部位的第一位置信息,确定第一人脸掩码图像中的人脸角度;其次,对第一人脸掩码图像中的人脸角度进行变换,得到人脸角度符合预设角度的第二人脸掩码图像。
沿用上述举例,假设第一人脸掩码图像中鼻子所在的第一位置信息为中心线偏左30度的位置,则可确定第一人脸掩码图像中的人脸角度为偏左30度。此时,可通过将第一人脸掩码图像中的人脸角度向右转动30度,以使转动后的人脸角度符合预设角度。
若第一人脸掩码图像中的无效像素点数目不低于第一预设阈值(即第一人脸掩码图像不符合预设条件),则可通过插值法对第一人脸掩码图像进行预处理。其中,无效像素点包括未采集到或采集失败的像素点。
具体的,针对任一无效像素点,可根据该无效像素点周围的有效像素点的像素值,并利用插值法恢复无效像素点。通过恢复无效像素点,以使第一人脸掩码图像中的无效像素点的数目低于第一预设阈值,从而使第一人脸掩码图像符合预设条件。
若第一人脸掩码图像中的图像噪声达到第二预设阈值,则可采用现有的图像去噪方法对第一人脸掩码图像进行去噪处理。由于图像去噪方法已为现有技术,因此不再赘述。
在一个实施例中,人脸识别模型包括各样本用户的样本人脸掩码特征信息。基于此,根据第一人脸掩码图像和预先训练的人脸识别模型对第一用户进行人脸识别时,可采用如下方法进行人脸识别:
步骤A1、从第一人脸掩码图像中提取出第一用户的第一人脸掩码特征信息。
步骤A2、将第一人脸掩码特征信息与样本人脸掩码特征信息进行匹配。
步骤A3、根据匹配结果判断人脸识别模型中是否包含与第一人脸掩码特征信息相匹配的样本人脸掩码特征信息。若是,则确定人脸识别结果为通过;若否,则确定人脸识别结果为未通过。
本实施例中,若预先对对第一人脸掩码图像进行了预处理,得到符合预设条件的第二人脸掩码图像,则可根据第二人脸掩码图像和预先训练的人脸识别模型对第一用户进行人脸识别。识别过程与上述步骤A1-A3相同,此处不再重复。
由上述实施例可看出,整个人脸识别过程完全脱离了人脸上如虹膜、面部特征、面部表情等2D数据,仅通过采集用户的人脸深度数据即可实现人脸识别过程,因此对用户的面部隐私信息起到很好的保护效果,且能够满足各类业务的需求。
图2是根据本说明书一实施例中人脸识别模型的训练方法的示意性流程图。如图2所示,人脸识别模型的训练方法包括以下步骤:
S201,采集样本用户的样本人脸深度图像,样本人脸深度图像包括样本用户人脸上的各特征点的第二距离信息。
其中,各特征点的第二距离信息指的是各特征点与深度图像采集设备(即客户端)之间的距离信息。通过客户端内安装的具有三维图像采集能力的基于结构光的深度相机,即可采集到样本用户的样本人脸深度图像。
执行S201后,还可对采集得到的样本人脸深度图像进行质量评估,如根据样本人脸深度图像的曝光度、清晰度等因素对样本人脸深度图像进行质量评估,对于质量评估较差的样本人脸深度图像可进行删除,以提升作为样本数据的人脸深度图像的整体质量。
S202,根据第二距离信息,将样本人脸深度图像转换为样本人脸掩码图像,样本人脸掩码图像包括样本用户人脸上的各特征点对应的像素值。
其中,由于样本人脸深度图像包括样本用户人脸上的各特征点的第二距离信息,因此可基于各特征点的第二距离信息将其转换为样本人脸掩码图像,即2D人脸图像。
在一个实施例中,可基于各特征点的第二距离信息以及预设的距离信息和像素值之间的对应关系,将样本人脸深度图像转换为样本人脸掩码图像。其中,各特征点的距离信息和像素值之间负相关。即,特征点距离客户端越远,该特征点对应的像素值越低,反映在人脸掩码图像中的亮度越低;反之,特征点距离客户端越近,该特征点对应的像素值越高,反映在人脸掩码图像中的亮度越高。
例如,在人眼正视客户端内设的镜头时,鼻子距离客户端的距离最近,则鼻子对应的特征点对应的像素值就最高,反映在人脸掩码图像中的亮度也就越高,如可以是白色(即像素值为255)。再例如,额头相较于鼻子而言,距离客户端的距离稍远,因此额头对应的特征点对应的像素值比鼻子对应的像素值稍小,其反映在人脸掩码图像中的亮度也就稍微暗一些,如可以是灰色,且颜色深浅程度根据人脸上各特征点的深度信息(即距离信息)来确定。
通过上述步骤,将样本人脸深度图像转换为样本人脸掩码图像后,即可得到黑白灰的2D人脸掩码图像。
S203,对样本人脸掩码图像进行预处理,得到符合预设条件的样本人脸掩码图像。
其中,预设条件包括:图像中的人脸角度符合预设角度、图像中的无效像素点数目低于第一预设阈值、图像噪声达到第二预设阈值等。对样本人脸掩码图像进行预处理的方法与上述实施例中对第一人脸掩码图像的预处理方法相同,此处不再重复。
S204,提取符合预设条件的样本人脸掩码图像中的样本人脸掩码特征信息。
S205,利用样本人脸掩码特征信息进行模型训练,得到人脸识别模型。训练得到的人脸识别模型包括各样本用户的样本人脸掩码特征信息。
在一个实施例中,在执行S203之后,若样本人脸掩码图像的数量较少(或采集的样本人脸深度图像的数量较少),可通过对样本人脸掩码图像进行扩展,以丰富样本人脸掩码图像的数量。
可选的,可对样本人脸掩码图像进行指定操作,从而得到样本人脸掩码图像对应的样本扩展图像。其中,指定操作包括图像旋转、图像角度变换、图像加噪等操作。
样本扩展图像作为扩展后的样本人脸掩码图像,同样可作为样本数据进行模型训练。即S204中,提取符合条件的样本人脸掩码图像及样本扩展图像中的样本人脸掩码特征信息,进而利用提取出的样本人脸掩码特征信息进行模型训练,得到人脸识别模型。
例如,指定操作为图像旋转操作,将样本人脸掩码图像中的人脸进行不同方向的旋转,如从左向右翻转、从右向左翻转等,即可得到不同的多个样本人脸掩码图像,即样本扩展图像。
再例如,指定操作为图像角度变换操作。将样本人脸掩码图像中的人脸角度进行变换,如向左转动30度、向右转动45度等,即可得到不同角度的多个样本人脸掩码图像,即样本扩展图像。
再例如,指定操作为图像加噪操作。通过对样本人脸掩码图像的不同区域进行不同方式的加噪处理,即可得到不同的多个样本人脸掩码图像,即样本扩展图像。
本实施例中,通过对样本人脸掩码图像进行不同类型的指定操作,可将少量样本人脸掩码图像扩展为多个样本人脸掩码图像,从而使样本人脸掩码图像更加丰富,即人脸识别模型的训练样本更加丰富,进而使训练出的人脸识别模型更加准确。
图3是根据本说明书另一实施例的一种人脸识别方法的示意性流程图。如图3所示,人脸识别方法可包括以下步骤:
S301,响应于第一用户发送的人脸识别请求,采集第一用户的人脸深度图像,人脸深度图像包括第一用户人脸上的各特征点的距离信息。
执行S301后,还可对采集得到的第一用户的人脸深度图像进行质量评估,如根据第一用户的人脸深度图像的曝光度、清晰度等因素对人脸深度图像进行质量评估,若质量评估较差,则可重新采集第一用户的人脸深度图像,以确保人脸深度图像的图像质量,进而确保人脸识别结果的准确性。
S302,根据各特征点的距离信息,将人脸深度图像转换为人脸掩码图像,人脸掩码图像包括第一用户人脸上的各特征点对应的像素值。
S303,判断人脸掩码图像是否符合预设条件。若是,则执行S305;若否,则执行S304。
其中,预设条件包括:图像中的人脸角度符合预设角度、图像中的无效像素点数目低于第一预设阈值、图像噪声达到第二预设阈值等。
S304,对人脸掩码图像进行预处理,得到符合预设条件的人脸掩码图像。
S305,从人脸掩码图像中提取出第一用户的人脸掩码特征信息。
S306,将提取出的人脸掩码特征信息与人脸识别模型中的样本人脸掩码特征信息进行匹配,得到匹配结果。
其中,人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到,样本人脸掩码图像基于样本用户的样本人脸深度图像转换得到。具体的人脸识别模型已在图2所示实施例中详细说明,此处不再重复。
S307,根据匹配结果判断人脸识别模型中是否包含与第一用户的人脸掩码特征信息相匹配的样本人脸掩码特征信息。若是,则执行S307;若否,则执行S309。
S308,确定人脸识别结果为通过。
S309,确定人脸识别结果为未通过。
可见,本实施例中,人脸识别过程仅依赖于用户的人脸深度数据(即人脸各特征点的距离信息),而无需采集人脸上如虹膜、面部特征、面部表情等2D数据,从而对用户的面部隐私信息起到很好的保护效果。此外,由于基于样本人脸掩码图像训练得到的人脸识别模型相较于传统的2D识别算法而言,更能使用户的人脸特征得到充分的表示,因此能够确保人脸识别结果的准确性,满足各类业务的需求。
综上,已经对本主题的特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作可以按照不同的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序,以实现期望的结果。在某些实施方式中,多任务处理和并行处理可以是有利的。
以上为本说明书一个或多个实施例提供的人脸识别方法,基于同样的思路,本说明书一个或多个实施例还提供一种人脸识别装置。
图4是根据本说明书一实施例的一种人脸识别装置的示意性框图。如图4所示,人脸识别装置包括:
第一采集模块410,响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;
第一转换模块420,根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;
识别模块430,根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
在一个实施例中,所述装置还包括:判断模块,在所述将所述第一人脸深度图像转换为第一人脸掩码图像之后,判断所述第一人脸掩码图像是否符合预设条件,所述预设条件包括以下至少一项:图像中的人脸角度符合预设角度、图像中的无效像素点数目低 于预设阈值;第一预处理模块,若所述第一人脸掩码图像不符合所述预设条件,则对所述第一人脸掩码图像进行预处理,得到符合所述预设条件的第二人脸掩码图像。所述识别模块430包括:识别单元,根据所述第二人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别。
在一个实施例中,所述预设条件包括:图像中的人脸角度符合预设角度。所述判断模块包括:第一确定单元,确定所述第一人脸掩码图像中的人脸指定部位的第一位置信息,确定所述人脸角度符合所述预设角度时所述人脸指定部位的第二位置信息;判断单元,判断所述第一位置信息与所述第二位置信息是否一致;第二确定单元,若所述第一位置信息与所述第二位置信息不一致,则确定所述第一人脸掩码图像不符合所述预设条件。
在一个实施例中,所述第一预处理模块包括:第四确定单元,根据所述第一位置信息,确定所述第一人脸掩码图像中的人脸角度;角度变换单元,对所述第一人脸掩码图像中的人脸角度进行变换,得到所述人脸角度符合所述预设角度的第二人脸掩码图像。
在一个实施例中,所述第一转换模块420包括:图像转换单元,根据所述第一距离信息以及预设的距离信息和像素值之间的对应关系,将所述第一人脸深度图像转换为第一人脸掩码图像;所述距离信息和所述像素值之间负相关。
在一个实施例中,所述人脸识别模型包括各所述样本用户的样本人脸掩码特征信息。所述识别模块430包括:第一提取单元,从所述第一人脸掩码图像中提取出所述第一用户的第一人脸掩码特征信息;匹配单元,将所述第一人脸掩码特征信息与所述样本人脸掩码特征信息进行匹配,以及根据匹配结果判断所述人脸识别模型中是否包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息;第三确定单元,若所述人脸识别模型中包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息,则确定所述人脸识别结果为通过;若所述人脸识别模型中不包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息,则确定所述人脸识别结果为未通过。
在一个实施例中,所述装置还包括:第二采集模块,在所述响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像之前,采集所述样本用户的样本人脸深度图像,所述样本人脸深度图像包括所述样本用户人脸上的各特征点的第二距离信息;第二转换模块,根据所述第二距离信息,将所述样本人脸深度图像转换为样本人脸掩码图像,所述样本人脸掩码图像包括所述样本用户人脸上的各特征点对应的像素值;第二预处理模块,对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像;提取模块,提取符合所述预设条件的样本人脸掩码图像中的样本人脸掩码特征信息;模型训练模块,利用所述样本人脸掩码特征信息进行模型训练,得到所述人脸识别模型。
在一个实施例中,所述装置还包括:操作模块,在所述对所述样本人脸掩码图像进 行所述预处理,得到符合所述预设条件的样本人脸掩码图像之后,对所述样本人脸掩码图像进行指定操作,得到所述样本人脸掩码图像对应的样本扩展图像;所述指定操作包括以下至少一项:图像旋转、图像角度变换、图像加噪。所述提取模块包括:第二提取单元,提取符合所述预设条件的样本人脸掩码图像及所述样本扩展图像中的样本人脸掩码特征信息。
本领域的技术人员应可理解,上述人脸识别装置能够用来实现前文所述的人脸识别方法,其中的细节描述应与前文方法部分描述类似,为避免繁琐,此处不另赘述。
采用本说明书一个或多个实施例的装置,通过采集第一用户的第一人脸深度图像,第一人脸深度图像包括人脸上各特征点的距离信息,并根据各特征点的距离信息将第一人脸深度图像转换为第一人脸掩码图像,进而根据第一人脸掩码图像和预先训练的人脸识别模型对第一用户进行人脸识别。使得人脸识别过程仅依赖于用户的人脸深度数据(即人脸各特征点的距离信息),而无需采集人脸上如虹膜、面部特征、面部表情等2D数据,从而对用户的面部隐私信息起到很好的保护效果。此外,由于基于样本人脸掩码图像训练得到的人脸识别模型相较于传统的2D识别算法而言,更能使用户的人脸特征得到充分的表示,因此能够确保人脸识别结果的准确性,满足各类业务的需求。
基于同样的思路,本说明书一个或多个实施例还提供一种人脸识别设备,如图5所示。人脸识别设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器501和存储器502,存储器502中可以存储有一个或一个以上存储应用程序或数据。其中,存储器502可以是短暂存储或持久存储。存储在存储器502的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对人脸识别设备中的一系列计算机可执行指令。更进一步地,处理器501可以设置为与存储器502通信,在人脸识别设备上执行存储器502中的一系列计算机可执行指令。人脸识别设备还可以包括一个或一个以上电源503,一个或一个以上有线或无线网络接口504,一个或一个以上输入输出接口505,一个或一个以上键盘506。
具体在本实施例中,人脸识别设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对人脸识别设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
可选地,计算机可执行指令在被执行时,还可以使所述处理器:所述将所述第一人脸深度图像转换为第一人脸掩码图像之后,判断所述第一人脸掩码图像是否符合预设条件,所述预设条件包括以下至少一项:图像中的人脸角度符合预设角度、图像中的无效像素点数目低于预设阈值;若否,则对所述第一人脸掩码图像进行预处理,得到符合所述预设条件的第二人脸掩码图像。所述根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,包括:根据所述第二人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别。
可选地,所述预设条件包括:图像中的人脸角度符合预设角度。计算机可执行指令在被执行时,还可以使所述处理器:确定所述第一人脸掩码图像中的人脸指定部位的第一位置信息;及,确定所述人脸角度符合所述预设角度时所述人脸指定部位的第二位置信息;判断所述第一位置信息与所述第二位置信息是否一致;若否,则确定所述第一人脸掩码图像不符合所述预设条件。
可选地,计算机可执行指令在被执行时,还可以使所述处理器:根据所述第一位置信息,确定所述第一人脸掩码图像中的人脸角度;对所述第一人脸掩码图像中的人脸角度进行变换,得到所述人脸角度符合所述预设角度的第二人脸掩码图像。
可选地,计算机可执行指令在被执行时,还可以使所述处理器:根据所述第一距离信息以及预设的距离信息和像素值之间的对应关系,将所述第一人脸深度图像转换为第一人脸掩码图像;所述距离信息和所述像素值之间负相关。
可选地,所述人脸识别模型包括各所述样本用户的样本人脸掩码特征信息。计算机可执行指令在被执行时,还可以使所述处理器:从所述第一人脸掩码图像中提取出所述第一用户的第一人脸掩码特征信息;将所述第一人脸掩码特征信息与所述样本人脸掩码特征信息进行匹配,以及根据匹配结果判断所述人脸识别模型中是否包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息;若是,则确定所述人脸识别结果为通过;若否,则确定所述人脸识别结果为未通过。
可选地,计算机可执行指令在被执行时,还可以使所述处理器:所述响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像之前,采集所述样本用户的样本人脸深度图像;所述样本人脸深度图像包括所述样本用户人脸上的各特征点的第二距离信息;根据所述第二距离信息,将所述样本人脸深度图像转换为样本人脸掩码图像;所述样本人脸掩码图像包括所述样本用户人脸上的各特征点对应的像素值;对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像;提取符合所述预设条件的样本人脸掩码图像中的样本人脸掩码特征信息;利用所述样本人脸掩码特征信息进行模型训练,得到所述人脸识别模型。
可选地,计算机可执行指令在被执行时,还可以使所述处理器:所述对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像之后,对 所述样本人脸掩码图像进行指定操作,得到所述样本人脸掩码图像对应的样本扩展图像;所述指定操作包括以下至少一项:图像旋转、图像角度变换、图像加噪。所述提取符合所述预设条件的样本人脸掩码图像中的样本人脸掩码特征信息,包括:提取符合所述预设条件的样本人脸掩码图像及所述样本扩展图像中的样本人脸掩码特征信息。
本说明书一个或多个实施例还提出了一种计算机可读存储介质,该计算机可读存储介质存储一个或多个程序,该一个或多个程序包括指令,该指令当被包括多个应用程序的电子设备执行时,能够使该电子设备执行上述人脸识别方法,并具体用于执行:响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
上述实施例阐明的***、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书一个或多个实施例时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本说明书一个或多个实施例可提供为方法、***、或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书一个或多个实施例是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的 部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于***实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本说明书一个或多个实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本说明书一个或多个实施例可以有各种更改和变化。凡在本说明书一个或多个实施例的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例的权利要求范围之内。

Claims (16)

  1. 一种人脸识别方法,包括:
    响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;
    根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;
    根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
  2. 根据权利要求1所述的方法,所述将所述第一人脸深度图像转换为第一人脸掩码图像之后,还包括:
    判断所述第一人脸掩码图像是否符合预设条件,所述预设条件包括以下至少一项:图像中的人脸角度符合预设角度、图像中的无效像素点数目低于预设阈值;
    若否,则对所述第一人脸掩码图像进行预处理,得到符合所述预设条件的第二人脸掩码图像;
    所述根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,包括:
    根据所述第二人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别。
  3. 根据权利要求2所述的方法,所述预设条件包括:图像中的人脸角度符合预设角度;
    所述判断所述第一人脸掩码图像是否符合预设条件,包括:
    确定所述第一人脸掩码图像中的人脸指定部位的第一位置信息;及,确定所述人脸角度符合所述预设角度时所述人脸指定部位的第二位置信息;
    判断所述第一位置信息与所述第二位置信息是否一致;
    若否,则确定所述第一人脸掩码图像不符合所述预设条件。
  4. 根据权利要求3所述的方法,所述对所述第一人脸掩码图像进行预处理,得到符合所述预设条件的第二人脸掩码图像,包括:
    根据所述第一位置信息,确定所述第一人脸掩码图像中的人脸角度;
    对所述第一人脸掩码图像中的人脸角度进行变换,得到所述人脸角度符合所述预设角度的第二人脸掩码图像。
  5. 根据权利要求1所述的方法,所述根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像,包括:
    根据所述第一距离信息以及预设的距离信息和像素值之间的对应关系,将所述第一人脸深度图像转换为第一人脸掩码图像;所述距离信息和所述像素值之间负相关。
  6. 根据权利要求1所述的方法,所述人脸识别模型包括各所述样本用户的样本人 脸掩码特征信息;
    所述根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果,包括:
    从所述第一人脸掩码图像中提取出所述第一用户的第一人脸掩码特征信息;
    将所述第一人脸掩码特征信息与所述样本人脸掩码特征信息进行匹配,以及根据匹配结果判断所述人脸识别模型中是否包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息;
    若是,则确定所述人脸识别结果为通过;若否,则确定所述人脸识别结果为未通过。
  7. 根据权利要求2所述的方法,所述响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像之前,还包括:
    采集所述样本用户的样本人脸深度图像;所述样本人脸深度图像包括所述样本用户人脸上的各特征点的第二距离信息;
    根据所述第二距离信息,将所述样本人脸深度图像转换为样本人脸掩码图像;所述样本人脸掩码图像包括所述样本用户人脸上的各特征点对应的像素值;
    对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像;
    提取符合所述预设条件的样本人脸掩码图像中的样本人脸掩码特征信息;
    利用所述样本人脸掩码特征信息进行模型训练,得到所述人脸识别模型。
  8. 根据权利要求7所述的方法,所述对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像之后,还包括:
    对所述样本人脸掩码图像进行指定操作,得到所述样本人脸掩码图像对应的样本扩展图像;所述指定操作包括以下至少一项:图像旋转、图像角度变换、图像加噪;
    所述提取符合所述预设条件的样本人脸掩码图像中的样本人脸掩码特征信息,包括:
    提取符合所述预设条件的样本人脸掩码图像及所述样本扩展图像中的样本人脸掩码特征信息。
  9. 一种人脸识别装置,包括:
    第一采集模块,响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;
    第一转换模块,根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;
    识别模块,根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
  10. 根据权利要求9所述的装置,还包括:
    判断模块,在所述将所述第一人脸深度图像转换为第一人脸掩码图像之后,判断所述第一人脸掩码图像是否符合预设条件,所述预设条件包括以下至少一项:图像中的人脸角度符合预设角度、图像中的无效像素点数目低于预设阈值;
    第一预处理模块,若所述第一人脸掩码图像不符合所述预设条件,则对所述第一人脸掩码图像进行预处理,得到符合所述预设条件的第二人脸掩码图像;
    所述识别模块包括:
    识别单元,根据所述第二人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别。
  11. 根据权利要求10所述的装置,所述预设条件包括:图像中的人脸角度符合预设角度;
    所述判断模块包括:
    第一确定单元,确定所述第一人脸掩码图像中的人脸指定部位的第一位置信息;及,确定所述人脸角度符合所述预设角度时所述人脸指定部位的第二位置信息;
    判断单元,判断所述第一位置信息与所述第二位置信息是否一致;
    第二确定单元,若所述第一位置信息与所述第二位置信息不一致,则确定所述第一人脸掩码图像不符合所述预设条件。
  12. 根据权利要求9所述的装置,所述人脸识别模型包括各所述样本用户的样本人脸掩码特征信息;
    所述识别模块包括:
    第一提取单元,从所述第一人脸掩码图像中提取出所述第一用户的第一人脸掩码特征信息;
    匹配单元,将所述第一人脸掩码特征信息与所述样本人脸掩码特征信息进行匹配,以及根据匹配结果判断所述人脸识别模型中是否包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息;
    第三确定单元,若所述人脸识别模型中包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息,则确定所述人脸识别结果为通过;若所述人脸识别模型中不包含与所述第一人脸掩码特征信息相匹配的所述样本人脸掩码特征信息,则确定所述人脸识别结果为未通过。
  13. 根据权利要求10所述的装置,还包括:
    第二采集模块,在所述响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像之前,采集所述样本用户的样本人脸深度图像;所述样本人脸深度图像包括所述样本用户人脸上的各特征点的第二距离信息;
    第二转换模块,根据所述第二距离信息,将所述样本人脸深度图像转换为样本人脸掩码图像;所述样本人脸掩码图像包括所述样本用户人脸上的各特征点对应的像素值;
    第二预处理模块,对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像;
    提取模块,提取符合所述预设条件的样本人脸掩码图像中的样本人脸掩码特征信息;
    模型训练模块,利用所述样本人脸掩码特征信息进行模型训练,得到所述人脸识别模型。
  14. 根据权利要求13所述的装置,还包括:
    操作模块,在所述对所述样本人脸掩码图像进行所述预处理,得到符合所述预设条件的样本人脸掩码图像之后,对所述样本人脸掩码图像进行指定操作,得到所述样本人脸掩码图像对应的样本扩展图像;所述指定操作包括以下至少一项:图像旋转、图像角度变换、图像加噪;
    所述提取模块包括:
    第二提取单元,提取符合所述预设条件的样本人脸掩码图像及所述样本扩展图像中的样本人脸掩码特征信息。
  15. 一种人脸识别设备,包括:
    处理器;以及
    被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器:
    响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;
    根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;
    根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
  16. 一种存储介质,用于存储计算机可执行指令,所述可执行指令在被执行时实现以下流程:
    响应于第一用户发送的人脸识别请求,采集所述第一用户的第一人脸深度图像;所述第一人脸深度图像包括所述第一用户人脸上的各特征点的第一距离信息;
    根据所述第一距离信息,将所述第一人脸深度图像转换为第一人脸掩码图像;所述第一人脸掩码图像包括所述第一用户人脸上的各特征点对应的像素值;
    根据所述第一人脸掩码图像和预先训练的人脸识别模型对所述第一用户进行人脸识别,得到人脸识别结果;所述人脸识别模型基于多个样本用户的样本人脸掩码图像训练得到;所述样本人脸掩码图像基于所述样本用户的样本人脸深度图像转换得到。
PCT/CN2021/087718 2020-04-27 2021-04-16 人脸识别 WO2021218659A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010343302.4A CN111401331B (zh) 2020-04-27 2020-04-27 人脸识别方法及装置
CN202010343302.4 2020-04-27

Publications (1)

Publication Number Publication Date
WO2021218659A1 true WO2021218659A1 (zh) 2021-11-04

Family

ID=71431794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/087718 WO2021218659A1 (zh) 2020-04-27 2021-04-16 人脸识别

Country Status (2)

Country Link
CN (1) CN111401331B (zh)
WO (1) WO2021218659A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401331B (zh) * 2020-04-27 2022-04-05 支付宝(杭州)信息技术有限公司 人脸识别方法及装置
CN112001249B (zh) * 2020-07-21 2022-08-26 山东师范大学 一种在物理世界通过生成贴纸构造可取消生物特征的方法
CN112766197B (zh) * 2021-01-26 2022-05-17 支付宝(杭州)信息技术有限公司 基于隐私保护的人脸识别方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7646894B2 (en) * 2006-02-14 2010-01-12 Microsoft Corporation Bayesian competitive model integrated with a generative classifier for unspecific person verification
CN107944435A (zh) * 2017-12-27 2018-04-20 广州图语信息科技有限公司 一种三维人脸识别方法、装置及处理终端
CN109948467A (zh) * 2019-02-28 2019-06-28 中国科学院深圳先进技术研究院 人脸识别的方法、装置、计算机设备和存储介质
CN110019890A (zh) * 2017-12-13 2019-07-16 阳连刚 一种移动终端的照片匹配方法
CN110287672A (zh) * 2019-06-27 2019-09-27 深圳市商汤科技有限公司 验证方法及装置、电子设备和存储介质
CN111401331A (zh) * 2020-04-27 2020-07-10 支付宝(杭州)信息技术有限公司 人脸识别方法及装置

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779269B (zh) * 2012-06-13 2014-10-29 合肥工业大学 基于图像传感器成像***的人脸识别算法
CN105335722B (zh) * 2015-10-30 2021-02-02 商汤集团有限公司 一种基于深度图像信息的检测***及方法
CN106096551B (zh) * 2016-06-14 2019-05-21 湖南拓视觉信息技术有限公司 人脸部位识别的方法和装置
CN105894047B (zh) * 2016-06-28 2019-08-27 深圳市唯特视科技有限公司 一种基于三维数据的人脸分类***
CN106991378B (zh) * 2017-03-09 2020-02-04 Oppo广东移动通信有限公司 基于深度的人脸朝向检测方法、检测装置和电子装置
CN107203743B (zh) * 2017-05-08 2020-06-05 杭州电子科技大学 一种人脸深度跟踪装置及实现方法
CN107239741B (zh) * 2017-05-10 2020-09-08 厦门瞳景智能科技有限公司 一种基于稀疏重构的单样本人脸识别方法
CN107292252B (zh) * 2017-06-09 2020-09-15 南京华捷艾米软件科技有限公司 一种自主学习的身份识别方法
CN108388878A (zh) * 2018-03-15 2018-08-10 百度在线网络技术(北京)有限公司 用于识别人脸的方法和装置
CN108921120B (zh) * 2018-07-13 2021-08-24 北京优创新港科技股份有限公司 一种适应广泛零售场景下的香烟识别方法
CN108985225B (zh) * 2018-07-13 2021-12-14 北京猎户星空科技有限公司 焦点跟随方法、装置、电子设备及存储介质
CN109635766A (zh) * 2018-12-20 2019-04-16 中国地质大学(武汉) 基于小样本的卷积神经网络的人脸拍照考勤方法及***
CN110969139A (zh) * 2019-12-11 2020-04-07 深圳市捷顺科技实业股份有限公司 人脸识别模型训练方法及相关装置、人脸识别方法及相关装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7646894B2 (en) * 2006-02-14 2010-01-12 Microsoft Corporation Bayesian competitive model integrated with a generative classifier for unspecific person verification
CN110019890A (zh) * 2017-12-13 2019-07-16 阳连刚 一种移动终端的照片匹配方法
CN107944435A (zh) * 2017-12-27 2018-04-20 广州图语信息科技有限公司 一种三维人脸识别方法、装置及处理终端
CN109948467A (zh) * 2019-02-28 2019-06-28 中国科学院深圳先进技术研究院 人脸识别的方法、装置、计算机设备和存储介质
CN110287672A (zh) * 2019-06-27 2019-09-27 深圳市商汤科技有限公司 验证方法及装置、电子设备和存储介质
CN111401331A (zh) * 2020-04-27 2020-07-10 支付宝(杭州)信息技术有限公司 人脸识别方法及装置

Also Published As

Publication number Publication date
CN111401331A (zh) 2020-07-10
CN111401331B (zh) 2022-04-05

Similar Documents

Publication Publication Date Title
WO2021218659A1 (zh) 人脸识别
CN109389562B (zh) 图像修复方法及装置
CN111428606B (zh) 一种面向边缘计算的轻量级人脸对比验证方法
WO2015149534A1 (zh) 基于Gabor二值模式的人脸识别方法及装置
CN111476306A (zh) 基于人工智能的物体检测方法、装置、设备及存储介质
KR101901591B1 (ko) 얼굴 인식 장치 및 그 제어방법
Das et al. Recent advances in biometric technology for mobile devices
CN110705392A (zh) 一种人脸图像检测方法及装置、存储介质
CN109684969B (zh) 凝视位置估计方法、计算机设备及存储介质
KR101612605B1 (ko) 얼굴 특징점 추출 방법 및 이를 수행하는 장치
JP2013012190A (ja) ガボールフィルターをブロックガボールフィルターとして近似する方法、及び、プロセッサ上で実行されているアプリケーションプログラムによるアクセスのためのデータ構造を格納するメモリ
WO2022252642A1 (zh) 基于视频图像的行为姿态检测方法、装置、设备及介质
JP2008152530A (ja) 顔認識装置及び顔認識方法、ガボア・フィルタ適用装置、並びにコンピュータ・プログラム
CN111339897B (zh) 活体识别方法、装置、计算机设备和存储介质
CN113298158B (zh) 数据检测方法、装置、设备及存储介质
WO2013122009A1 (ja) 信頼度取得装置、信頼度取得方法および信頼度取得プログラム
CN113221771A (zh) 活体人脸识别方法、装置、设备、存储介质及程序产品
CN111274947A (zh) 一种多任务多线索人脸识别方法、***及存储介质
CN112001285B (zh) 一种美颜图像的处理方法、装置、终端和介质
CN112036284A (zh) 图像处理方法、装置、设备及存储介质
WO2018113206A1 (zh) 一种图像处理方法及终端
CN114972010A (zh) 图像处理方法、装置、计算机设备、存储介质及程序产品
CN111144374B (zh) 人脸表情识别方法及装置、存储介质和电子设备
CN111325252A (zh) 图像处理方法、装置、设备、介质
US20220092294A1 (en) Method and system for facial landmark detection using facial component-specific local refinement

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21795611

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21795611

Country of ref document: EP

Kind code of ref document: A1