CN108388889B - Method and device for analyzing face image - Google Patents

Method and device for analyzing face image Download PDF

Info

Publication number
CN108388889B
CN108388889B CN201810247286.1A CN201810247286A CN108388889B CN 108388889 B CN108388889 B CN 108388889B CN 201810247286 A CN201810247286 A CN 201810247286A CN 108388889 B CN108388889 B CN 108388889B
Authority
CN
China
Prior art keywords
face
image
target object
analysis result
generating
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810247286.1A
Other languages
Chinese (zh)
Other versions
CN108388889A (en
Inventor
洪智滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing Co Ltd
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 Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201810247286.1A priority Critical patent/CN108388889B/en
Publication of CN108388889A publication Critical patent/CN108388889A/en
Application granted granted Critical
Publication of CN108388889B publication Critical patent/CN108388889B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • 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
    • G06V40/169Holistic features and representations, i.e. based on the facial image taken as a whole
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the application discloses a method and a device for analyzing a face image. One embodiment of the method comprises: acquiring a face plane image and a face depth image of a target object; generating simulated face depth data of a target object in a preset posture according to the face plane image; matching and analyzing the simulated face depth data and the face depth image; and generating a face analysis result of the target object according to the matching analysis result. The embodiment can generate the simulated face depth data by using the face plane image, so that matching analysis can be carried out on the simulated face depth data and the acquired face depth image to determine whether the face depth image is from a real face. The method can be applied to human face living body detection.

Description

Method and device for analyzing face image
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for analyzing a face image.
Background
Face recognition is a biometric technology that performs identification based on facial feature information of a person. The method comprises the steps of collecting images or video streams containing human faces by using a camera or a camera, automatically detecting and tracking the human faces in the images, and further performing a series of related technical analysis of the faces of the detected human faces, wherein the related technical analysis is generally called portrait identification and face identification.
In the practical application process, the human face depth image can be acquired as well as the human face plane image. Meanwhile, it is often necessary to determine whether an acquired object is a real face, that is, whether a three-dimensional face structure (three-dimensional face structure) is satisfied, so as to implement living body (person with vital signs) detection.
Disclosure of Invention
The embodiment of the application provides a method and a device for analyzing a face image.
In a first aspect, an embodiment of the present application provides a method for analyzing a face image, including: acquiring a face plane image and a face depth image of a target object; generating simulated face depth data of a target object in a preset posture according to the face plane image; matching and analyzing the simulated face depth data and the face depth image; and generating a face analysis result of the target object according to the matching analysis result.
In some embodiments, generating simulated face depth data of the target object in a preset pose according to the face plane image comprises: inputting a face plane image into a pre-constructed three-dimensional deformation model to generate a three-dimensional face model of a target object in a preset posture; and extracting the face depth data of the target object in a preset posture according to the three-dimensional face model to generate simulated face depth data.
In some embodiments, generating a face analysis result of the target object according to the matching analysis result includes: determining whether the matching analysis result meets a preset condition; generating an analysis result for representing that the face of the target object conforms to the stereoscopic face structure under the preset posture in response to the fact that the matching analysis result meets the preset condition; and generating an analysis result for representing that the face of the target object does not conform to the stereoscopic face structure under the preset posture in response to determining that the matching analysis result does not satisfy the preset condition.
In some embodiments, the face depth image is obtained by: receiving a face depth image of a target object acquired by a depth image acquisition device; or receiving face images of the target object simultaneously acquired by at least two image acquisition devices; and generating a face depth image of the target object according to the received face image.
In some embodiments, generating a face depth image of the target object from the received face image comprises: determining whether the face of a target object currently positioned in front of the image acquisition equipment is in a three-dimensional structure or not according to the received face image; and generating a face depth image of the target object in response to determining that the face of the target object is in a three-dimensional structure.
In some embodiments, the face plane image includes at least one of: near infrared images, grayscale images, and color images.
In a second aspect, an embodiment of the present application provides an apparatus for analyzing a face image, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire a face plane image and a face depth image of a target object; the data generating unit is configured to generate simulated face depth data of the target object in a preset posture according to the face plane image; the analysis unit is configured to perform matching analysis on the simulated face depth data and the face depth image; and the result generating unit is configured to generate a face analysis result of the target object according to the matching analysis result.
In some embodiments, the data generation unit comprises: the first generation subunit is configured to input a face plane image into a pre-constructed three-dimensional deformation model and generate a three-dimensional face model of a target object in a preset posture; and the second generation subunit is configured to extract the face depth data of the target object in the preset posture according to the three-dimensional face model, and generate simulated face depth data.
In some embodiments, the result generation unit comprises: a determining subunit configured to determine whether the matching analysis result satisfies a preset condition; the first response subunit is configured to generate an analysis result for representing that the face of the target object conforms to the stereoscopic face structure in the preset posture in response to the fact that the matching analysis result meets the preset condition; and the second response subunit is configured to generate an analysis result for representing that the face of the target object does not conform to the stereoscopic face structure under the preset posture in response to determining that the matching analysis result does not satisfy the preset condition.
In some embodiments, the apparatus further comprises an image generation unit configured to: receiving a face depth image of a target object acquired by a depth image acquisition device; or receiving face images of the target object simultaneously acquired by at least two image acquisition devices; and generating a face depth image of the target object according to the received face image.
In some embodiments, the image generation unit is further configured to: determining whether the face of a target object currently positioned in front of the image acquisition equipment is in a three-dimensional structure or not according to the received face image; and generating a face depth image of the target object in response to determining that the face of the target object is in a three-dimensional structure.
In some embodiments, the face plane image includes at least one of: near infrared images, grayscale images, and color images.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as described in any one of the embodiments of the first aspect above.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any one of the embodiments in the first aspect.
According to the method and the device for analyzing the face image, the face plane image and the face depth image of the target object are obtained, so that the simulated face depth data of the target object under the same preset posture can be generated according to the obtained face plane image; then, the generated simulation face depth data and the obtained face depth image can be subjected to matching analysis; finally, according to the matching analysis result, a face analysis result of the target object can be generated. The face plane image is used for generating simulated face depth data, so that matching analysis can be carried out on the simulated face depth data and the obtained face depth image, and whether the face depth image is from a real face or not is determined. The method and the device can be applied to human face living body detection.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for analyzing face images according to the present application;
FIG. 3 is a schematic diagram of an application scenario of the method for analyzing face images according to the present application;
FIG. 4 is a schematic diagram of an embodiment of an apparatus for analyzing a face image according to the present application;
FIG. 5 is a schematic block diagram of a computer system suitable for use in implementing an electronic device according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which the method for analyzing a face image or the apparatus for analyzing a face image of the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a terminal 101, a network 102, and a server 103. The network 102 serves as a medium for providing a communication link between the terminal 101 and the server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal 101 to interact with the server 103 via the network 102 to receive or send messages or the like. Various client applications, such as a facial image analysis and recognition application, a shopping application, a payment application, a web browser, an instant messenger, and the like, may be installed on the terminal 101.
Here, the terminal 101 may be hardware or software. When the terminal 101 is a hardware, it can be various electronic devices with a display screen, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, motion Picture Experts Group Audio Layer 3), a laptop computer, a desktop computer, and the like. When the terminal 101 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
When the terminal 101 is hardware, image capturing devices 1011, 1012 may also be mounted thereon. The image capturing devices 1011, 1012 may be installed at different positions of the terminal 101, and are used for capturing facial images of different angles of the same target object. The image capturing devices 1011, 1012 may be various devices that enable image capturing, such as cameras, sensors, and the like.
The server 103 may be a server that provides various services, such as a background server that provides support for various applications displayed on the terminal 101. The background server may analyze the face image of the target object, which is sent by the terminal 101 and acquired by the image acquisition devices 1011 and 1012, and may send a processing result (e.g., a generated face analysis result) to the terminal 101. In this way, the terminal 101 may be caused to present the processing result to the user, or an application on the terminal 101 may be caused to implement a corresponding functional operation according to the processing result.
Here, the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for analyzing the face image provided in the embodiment of the present application is generally executed by the server 103. Accordingly, a device for analyzing a face image is generally provided in the server 103.
It should be noted that the image capturing devices 1011 and 1012 may be mounted on the terminal 101, or may be provided separately from the terminal 101. And when the image acquisition equipment is independently arranged, the communication with the server 103 can be realized through the network 102.
It should be understood that the number of terminals, networks, servers and image capturing devices in fig. 1 is merely illustrative. There may be any number of terminals, networks, servers, and image capture devices, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for analyzing facial images according to the present application is shown. The method for analyzing a face image may include the steps of:
step 201, acquiring a face plane image and a face depth image of a target object.
In the present embodiment, an execution subject (e.g., the server 103 shown in fig. 1) of the method for analyzing a face image may acquire a face plane image and a face depth image of a target object in various ways. For example, the execution subject may obtain the face plane image and the face depth image from the existing face database through a wired connection manner or a wireless connection manner. As another example, the execution subject may acquire a face image of the target object by an image acquisition device (e.g., the image acquisition devices 1011, 1012 shown in fig. 1), thereby acquiring a face plane image and a face depth image.
Here, the face plane image generally refers to a two-dimensional face image, and may be (but is not limited to) a color image, such as an RGB (Red, Green, Blue, Red, Green, Blue) photograph. A face depth image generally refers to an image containing face depth information. The specific Format of the Image is not limited in the present application, and formats such as jpg (Joint Photo graphics Experts Group, a picture Format), BMP (Bitmap, an Image file Format), or RAW (RAW Image Format) are only required as long as subject recognition can be performed.
In the present embodiment, the target object may be an arbitrary user, such as a user using a terminal (e.g., the terminal 101 shown in fig. 1), further such as a user present within the acquisition range of the image acquisition apparatus, or the like.
As an example, the execution subject may take a face image of the target object in an arbitrary pose acquired by the image acquisition apparatus as a face plane image. And the execution subject may determine face depth data of the target object according to the position information of the image acquisition device and the acquired face images of the target object, thereby generating a face depth image of the target object. The face pose of the face depth image may be (but is not limited to) the same as the face pose of the face plane image. The face pose of the face depth image may also be a pose in any face image of the target object acquired by the image acquisition device. Wherein, the posture generally refers to the appearance and the expression of the target object under different visual angles. The pose here mainly refers to the visual angle, i.e. the rotation angle of the face relative to the same reference point.
In some optional implementations of this embodiment, the face depth image may be obtained by: the execution subject may receive a face depth image of the target object acquired by the depth image acquisition device; or receiving face images of the target object simultaneously acquired by at least two image acquisition devices; then, a face depth image of the target object can be generated according to the received face image. While a certain time offset may be allowed.
As an example, when only one camera (e.g., a front-facing camera) is provided on the side of the terminal facing the user, the cameras can be time-multiplexed. Namely, the camera can be used for collecting a face plane image of a user, and is a common camera at the moment; the method can also be used for acquiring a face depth image of a user, and the face depth image is a depth camera. Since the face plane image and the face depth image are generally acquired in a similar time, the faces in the two images can be considered to have the same pose.
If the terminal is provided with two front-facing cameras, at the moment, a user can simultaneously acquire two face images through the two front-facing cameras. It will be appreciated that the two front-facing cameras will typically be positioned at different locations, so that the angles (poses) of the respective acquired face images will be different. Therefore, according to the two acquired face images, a face depth image at the acquisition angle of any one of the two front cameras, namely, the face depth images in two different postures can be obtained.
It should be noted that the face image may be obtained by collecting a real face of the target object (such as taking a picture, recording a video, etc.), or may be obtained by collecting a carrier containing the face image of the target object. The carrier may comprise a physical photograph and/or a screen of an electronic device, among other things. That is, the face image of the target object can also be obtained by acquiring a face photograph of the target object or a face electronic photograph, video, or simulated animation, etc., of the target object, which is presented on the screen. It will be appreciated that the image of a face presented on a photograph or screen is different from a real face, the former being planar and the latter being stereoscopic.
At this time, in order to improve the analysis efficiency, after the execution subject receives the face images acquired by the image acquisition device, it may be determined whether the face of the target object currently located in front of the image acquisition device is a stereo structure according to the face images; and then if the face of the target object is determined to be in a three-dimensional structure, generating a face depth image of the target object.
That is, if the object (the real face of the target object or the carrier containing the face image of the target object) acquired by the image acquisition device is a stereo structure, which indicates that the object is likely to be the real face, a corresponding face depth image can be generated, so as to further analyze the face depth image. And when the object acquired by the image acquisition equipment is a plane structure, the object is not a real human face. Therefore, the face analysis result can be determined to be failed or failed. Therefore, the photos and the face images displayed on the screen of the electronic equipment can be effectively detected without human-computer interaction (without the cooperation of a user for making a specified action), so that some illegal behaviors can be avoided, and the property loss risk of the target object is reduced.
Optionally, the face plane image may include at least one of the following: near infrared images, grayscale images, and color images. Correspondingly, the image acquisition equipment can be a near-infrared camera or a common camera and the like.
Step 202, generating simulated face depth data of the target object in a preset posture according to the face plane image.
In this embodiment, according to the face plane image obtained in step 201, the execution subject may analyze the face structure of the target object, so as to generate simulated face depth data of the target object in a preset pose. The simulated face depth data can approximately and truly describe the face depth data of the real face of the target object under the preset posture. The preset posture is not limited in the present application and can be set according to actual conditions. In general, the preset pose is a face pose in the acquired face depth image.
In some optional implementations of the embodiment, the execution subject may input the face plane image into a pre-constructed three-dimensional deformation Model (3D deformable Model, 3DMM), so that a deviation between an average face in the three-dimensional deformation Model and a face in the face plane image may be analyzed. Thus, according to the deviations, the characteristic parameters of the average human face can be adjusted, so that a three-dimensional human face model of the target object in the preset posture can be generated. The three-dimensional face model generated here can approximate the real face structure of the target object. And then, according to the three-dimensional face model, the execution main body can extract the face depth data of the target object in the preset posture so as to generate simulated face depth data.
It can be understood that, in order to further improve the analysis efficiency, the face plane image input into the three-dimensional deformation model may be an image of the target object in a preset posture, so that the face posture adjustment of the generated three-dimensional face model can be avoided. Namely, the face in the acquired face plane image and the face in the acquired face depth image have the same posture. In addition, the input face plane image may be an image with as many face features as possible and high definition, such as a front unobstructed image, a side image in a range of 20 ° to 45 ° to the left (or right), and the like.
The three-dimensional deformation model usually represents an average human face, but also contains information about the deviation pattern common to this average. For example, a face with a long nose may have a long chin. In view of this correlation, the executive can generate an image specific to your face by listing only a few hundred numbers describing the deviation of your face from the average face without storing all the characterizing information about your face. Furthermore, these deviations include approximate age, gender, and face length parameters. It should be noted that, as a commonly used three-dimensional face reconstruction technology, a three-dimensional deformation model has been widely used in the fields of medical treatment, education, entertainment, and the like. This model is commercially available and will not be described in detail here.
Optionally, the execution subject may also input the face plane image into a pre-trained convolutional neural network, so that a three-dimensional face model of the target object in the preset pose may be reconstructed through the convolutional neural network. And then, according to the reconstructed three-dimensional face model, the simulated face depth data of the target object under the preset posture can be generated. The convolutional neural network can be used for reconstructing a three-dimensional face model according to the face plane image. The convolutional neural network can be obtained, but is not limited to, by the following training process.
As an example, different face plane images of the same sample object may be input into the three-dimensional deformation model, and a plurality of three-dimensional face models of the sample object in the preset pose are obtained correspondingly. Then, the feature parameters of the three-dimensional face models may be processed (e.g., aggregated or weighted), so as to finally obtain the three-dimensional face model of the sample object in the preset pose. Then, different face plane images of different sample objects can be used as input, three-dimensional face models of the different sample objects in a preset posture are used as output, and the convolutional neural network is obtained through training.
And step 203, performing matching analysis on the simulated face depth data and the face depth image.
In this embodiment, the executing subject may perform matching analysis on the simulated face depth data generated in step 202 and the face depth image acquired in step 201. For example, common face recognition analysis methods such as calculating similarity of the same features (mouth, nose, chin, etc.) may be used.
It can be understood that, since a real face has a stereoscopic face structure, when face images are acquired from different angles, occlusion areas, shadow areas, and the like formed in the images may also be different, especially at the nose. Therefore, the simulated face depth data can embody the three-dimensional structure of the face. And the simulated face depth data and the face depth image are in the same preset posture, so that data such as a contour region, a shielding position, a shadow position, an area and the like with the same characteristics can be subjected to matching analysis, and whether the obtained face depth image conforms to a three-dimensional face structure in the preset posture is determined.
Optionally, the executing subject may also input the simulated face depth data and the face depth image into a pre-trained network model, so that the matching analysis is performed on the simulated face depth data and the face depth image through the network model. The network model can be used for performing matching analysis on the simulated face depth data and the face depth image with the same posture and generating a matching analysis result. Here, a large number of positive and negative samples may be collected to train the network model. The positive sample mainly refers to a sample face depth image of a real face or an approximate real face (such as a 3D printing model). And negative samples refer primarily to sample face depth images of non-real faces (e.g., warped photos).
And step 204, generating a face analysis result of the target object according to the matching analysis result.
In the present embodiment, the execution subject may generate a face analysis result of the target object according to the matching analysis result in step 203. Wherein, the face analysis result can be used to indicate whether the face analysis of the target object passes or not.
In some optional implementations of the embodiment, first, the execution subject may determine whether the matching analysis result satisfies a preset condition. The preset condition is not limited in the present application, and may be set according to the matching analysis method in step 203, such as the similarity is not less than 90%, or the error is not greater than 5%. If the matching analysis result meets the preset condition, the execution main body can generate an analysis result used for representing that the face of the target object meets the stereoscopic face structure under the preset posture. If the matching analysis result is determined not to meet the preset condition, the execution subject can generate an analysis result used for representing that the face of the target object does not meet the stereoscopic face structure under the preset posture.
It can be understood that, by performing matching analysis on the simulated face depth data and the acquired face depth image, under the condition of no need of human-computer interaction, effective analysis and recognition can be performed on images which are stereoscopic but do not conform to the stereoscopic face structure, and images which conform to the stereoscopic face structure but do not conform to the stereoscopic face structure in the preset posture, such as face images presented by a folded photo or a curved screen. That is, if the face analysis result is pass (that is, the face of the target object conforms to the stereoscopic face structure in the preset pose), it can be said that the acquired face depth image is from the real face. Therefore, the method for analyzing a face image in the present embodiment can be applied to live detection of a face.
In some application scenarios, the execution subject may further determine whether the face image of the target object is from a living body in combination with other detection methods (which may be set according to actual situations). For example, a plurality of face plane images are acquired continuously or at intervals, and the execution subject may compare the face plane images in the face plane images. Thus, based on the comparison result (e.g., the eyes are opened and closed, the mouth shape is changed, etc.), it can be determined whether the face image of the target object is from a living body without human-computer interaction. If the target object is determined to be from a living body, the face analysis of the target object can be determined to pass. As another example, the execution body may send (voice and/or text) action instructions to the terminal used by the target object. By the target object performing the action indicated by the action instruction, the execution subject can determine whether the face image of the target object is from a living body, thereby determining whether the face analysis of the target object passes. Therefore, the non-living bodies such as 3D printing models and bent photos containing the face images of the target objects can be effectively detected and analyzed, and the application range and the accuracy of detection can be further improved.
With further reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for analyzing a face image according to the present embodiment. In the application scenario of fig. 3, the image capture device on the terminal 101 is activated to turn on when the user makes a payment using a payment application installed on the terminal 101. Thus, the image acquisition equipment can acquire the front face plane image A and the front face depth image B of the user. For the convenience of user operation, images captured by the image capturing device during the capturing process may be displayed on the screen of the terminal 101. Meanwhile, the terminal 101 may transmit the front face plane image a and the front face depth image B to the service 103 through the network.
The server 103 may generate the front face simulated face depth data C of the user according to the front face plane image a. Then, the front face simulation face depth data C and the front face depth image B can be subjected to matching analysis, so that the condition that the face picture of the user or the bent face picture and the face image of the user presented on the screen are utilized for detection analysis can be eliminated. When the face detection analysis of the user passes (that is, the collected front face depth image of the user conforms to the stereoscopic face structure in the front posture), the server 103 may send the analysis result to the terminal 101. So that the payment application on the terminal 101 can perform a payment function based on the analysis result.
According to the method for analyzing the face image, the face plane image and the face depth image of the target object are obtained, so that the simulated face depth data of the target object under the same preset posture can be generated according to the obtained face plane image; then, the generated simulation face depth data and the obtained face depth image can be subjected to matching analysis; finally, according to the matching analysis result, a face analysis result of the target object can be generated. The face plane image is used for generating simulated face depth data, so that matching analysis can be carried out on the simulated face depth data and the obtained face depth image, and whether the face depth image is from a real face or not is determined. Therefore, the method can also be applied to human face living body detection.
With continuing reference to FIG. 4, as an implementation of the methods illustrated in the above figures, the present application provides one embodiment of an apparatus for analyzing images of human faces. The embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device can be applied to various electronic devices.
As shown in fig. 4, the apparatus 400 for analyzing a face image of the present embodiment may include: an obtaining unit 401 configured to obtain a face plane image and a face depth image of a target object; a data generating unit 402 configured to generate simulated face depth data of the target object in a preset posture according to the face plane image; an analysis unit 403 configured to perform matching analysis on the simulated face depth data and the face depth image; a result generating unit 404 configured to generate a face analysis result of the target object according to the matching analysis result.
In some optional implementations of this embodiment, the data generating unit 402 may include: a first generating subunit (not shown in the figure), configured to input the planar face image into a pre-constructed three-dimensional deformation model, and generate a three-dimensional face model of the target object in a preset posture; and a second generating subunit (not shown in the figure) configured to extract, according to the three-dimensional face model, the face depth data of the target object in the preset pose, and generate simulated face depth data.
Optionally, the result generating unit 404 may include: a determining subunit (not shown in the figure) configured to determine whether the matching analysis result satisfies a preset condition; a first response subunit (not shown in the figure) configured to generate an analysis result for representing that the face of the target object conforms to the stereoscopic face structure in the preset posture in response to determining that the matching analysis result satisfies the preset condition; and a second response subunit (not shown in the figure) configured to generate, in response to determining that the matching analysis result does not satisfy the preset condition, an analysis result for representing that the face of the target object does not conform to the stereoscopic face structure in the preset pose.
Further, the apparatus 400 may further comprise an image generation unit (not shown in the figure) configured to: receiving a face depth image of a target object acquired by a depth image acquisition device; or receiving face images of the target object simultaneously acquired by at least two image acquisition devices; and generating a face depth image of the target object according to the received face image.
In some embodiments, the image generation unit may be further configured to: determining whether the face of a target object currently positioned in front of the image acquisition equipment is in a three-dimensional structure or not according to the received face image; and generating a face depth image of the target object in response to determining that the face of the target object is in a three-dimensional structure.
Optionally, the face plane image may include (but is not limited to) at least one of: near infrared images, grayscale images, and color images.
It will be understood that the elements described in the apparatus 400 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and will not be described herein again.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a touch screen, a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 501. It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a data generation unit, an analysis unit, and a result generation unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the acquisition unit may also be described as a "unit that acquires a face plane image and a face depth image of a target object".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a face plane image and a face depth image of a target object; generating simulated face depth data of a target object in a preset posture according to the face plane image; matching and analyzing the simulated face depth data and the face depth image; and generating a face analysis result of the target object according to the matching analysis result.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (14)

1. A method for analyzing a face image, comprising:
acquiring a face plane image and a face depth image of a target object;
generating simulated face depth data of the target object in a preset posture according to the face plane image;
matching and analyzing the simulated face depth data and the face depth image;
and generating a face analysis result of the target object according to the matching analysis result.
2. The method of claim 1, wherein the generating simulated face depth data of the target object at the preset pose from the face plane image comprises:
inputting the face plane image into a pre-constructed three-dimensional deformation model to generate a three-dimensional face model of the target object in the preset posture;
and extracting the face depth data of the target object under the preset posture according to the three-dimensional face model to generate simulated face depth data.
3. The method of claim 1, wherein the generating a face analysis result of the target object according to the matching analysis result comprises:
determining whether the matching analysis result meets a preset condition;
generating an analysis result for representing that the face of the target object conforms to the stereoscopic face structure under the preset posture in response to the fact that the matching analysis result meets the preset condition;
and generating an analysis result for representing that the face of the target object does not conform to the stereoscopic face structure under the preset posture in response to determining that the matching analysis result does not satisfy the preset condition.
4. The method of claim 1, wherein the face depth image is obtained by:
receiving a face depth image of the target object acquired by a depth image acquisition device; or
Receiving face images of the target object simultaneously acquired by at least two image acquisition devices; and generating a face depth image of the target object according to the received face image.
5. The method of claim 4, wherein said generating a face depth image of the target object from the received face image comprises:
determining whether the face of the target object positioned in front of the image acquisition equipment is in a three-dimensional structure or not according to the received face image;
and generating a face depth image of the target object in response to determining that the face of the target object is in a three-dimensional structure.
6. The method of one of claims 1 to 5, wherein the face plane image comprises at least one of: near infrared images, grayscale images, and color images.
7. An apparatus for analyzing a face image, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire a face plane image and a face depth image of a target object;
the data generating unit is configured to generate simulated face depth data of the target object in a preset posture according to the face plane image;
the analysis unit is configured to perform matching analysis on the simulated face depth data and the face depth image;
and the result generating unit is configured to generate a face analysis result of the target object according to the matching analysis result.
8. The apparatus of claim 7, wherein the data generation unit comprises:
the first generation subunit is configured to input the face plane image into a pre-constructed three-dimensional deformation model, and generate a three-dimensional face model of the target object in the preset posture;
and the second generation subunit is configured to extract the face depth data of the target object in the preset posture according to the three-dimensional face model, and generate simulated face depth data.
9. The apparatus of claim 7, wherein the result generation unit comprises:
a determining subunit configured to determine whether the matching analysis result satisfies a preset condition;
the first response subunit is configured to generate an analysis result for representing that the face of the target object conforms to the stereoscopic face structure in the preset posture in response to determining that the matching analysis result meets a preset condition;
and the second response subunit is configured to generate an analysis result for representing that the face of the target object does not conform to the stereoscopic face structure under the preset posture in response to determining that the matching analysis result does not satisfy a preset condition.
10. The apparatus of claim 7, wherein the apparatus further comprises an image generation unit configured to:
receiving a face depth image of the target object acquired by a depth image acquisition device; or
Receiving face images of the target object simultaneously acquired by at least two image acquisition devices; and generating a face depth image of the target object according to the received face image.
11. The apparatus of claim 10, wherein the image generation unit is further configured to:
determining whether the face of the target object positioned in front of the image acquisition equipment is in a three-dimensional structure or not according to the received face image;
and generating a face depth image of the target object in response to determining that the face of the target object is in a three-dimensional structure.
12. The apparatus of one of claims 7-11, wherein the face plane image comprises at least one of: near infrared images, grayscale images, and color images.
13. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201810247286.1A 2018-03-23 2018-03-23 Method and device for analyzing face image Active CN108388889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810247286.1A CN108388889B (en) 2018-03-23 2018-03-23 Method and device for analyzing face image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810247286.1A CN108388889B (en) 2018-03-23 2018-03-23 Method and device for analyzing face image

Publications (2)

Publication Number Publication Date
CN108388889A CN108388889A (en) 2018-08-10
CN108388889B true CN108388889B (en) 2022-02-18

Family

ID=63068134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810247286.1A Active CN108388889B (en) 2018-03-23 2018-03-23 Method and device for analyzing face image

Country Status (1)

Country Link
CN (1) CN108388889B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101871A (en) * 2018-08-07 2018-12-28 北京华捷艾米科技有限公司 A kind of living body detection device based on depth and Near Infrared Information, detection method and its application
WO2020037678A1 (en) * 2018-08-24 2020-02-27 太平洋未来科技(深圳)有限公司 Method, device, and electronic apparatus for generating three-dimensional human face image from occluded image
WO2020037679A1 (en) * 2018-08-24 2020-02-27 太平洋未来科技(深圳)有限公司 Video processing method and apparatus, and electronic device
CN109711243B (en) * 2018-11-01 2021-02-09 长沙小钴科技有限公司 Static three-dimensional face in-vivo detection method based on deep learning
CN109542230B (en) * 2018-11-28 2022-09-27 北京旷视科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101999900B (en) * 2009-08-28 2013-04-17 南京壹进制信息技术有限公司 Living body detecting method and system applied to human face recognition
EP3061023B1 (en) * 2013-10-25 2020-01-01 OneVisage SA A method and a system for performing 3d-based identity verification of individuals with mobile devices
CN104683302A (en) * 2013-11-29 2015-06-03 国际商业机器公司 Authentication method, authentication device, terminal equipment, authentication server and system
CN104834901B (en) * 2015-04-17 2018-11-06 北京海鑫科金高科技股份有限公司 A kind of method for detecting human face, apparatus and system based on binocular stereo vision
CN105022994A (en) * 2015-06-30 2015-11-04 国网山东省电力公司日照供电公司 Identity authentication method of network safety access of power system
CN105654048A (en) * 2015-12-30 2016-06-08 四川川大智胜软件股份有限公司 Multi-visual-angle face comparison method
CN106874871B (en) * 2017-02-15 2020-06-05 广东光阵光电科技有限公司 Living body face double-camera identification method and identification device
CN107609383B (en) * 2017-10-26 2021-01-26 奥比中光科技集团股份有限公司 3D face identity authentication method and device

Also Published As

Publication number Publication date
CN108388889A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN108509915B (en) Method and device for generating face recognition model
CN108388889B (en) Method and device for analyzing face image
CN107578017B (en) Method and apparatus for generating image
CN108898186B (en) Method and device for extracting image
CN109214343B (en) Method and device for generating face key point detection model
CN110503703B (en) Method and apparatus for generating image
US11270099B2 (en) Method and apparatus for generating facial feature
CN108197618B (en) Method and device for generating human face detection model
WO2020103700A1 (en) Image recognition method based on micro facial expressions, apparatus and related device
CN108229375B (en) Method and device for detecting face image
CN107679466B (en) Information output method and device
WO2020024484A1 (en) Method and device for outputting data
CN110298319B (en) Image synthesis method and device
CN108491823B (en) Method and device for generating human eye recognition model
US11087140B2 (en) Information generating method and apparatus applied to terminal device
CN108549848B (en) Method and apparatus for outputting information
CN108509994B (en) Method and device for clustering character images
CN108399401B (en) Method and device for detecting face image
CN108491812B (en) Method and device for generating face recognition model
CN110059624B (en) Method and apparatus for detecting living body
CN108062544A (en) For the method and apparatus of face In vivo detection
CN108491881A (en) Method and apparatus for generating detection model
CN111524216A (en) Method and device for generating three-dimensional face data
CN109241934A (en) Method and apparatus for generating information
CN107886559A (en) Method and apparatus for generating picture

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant