WO2020000908A1 - Method and device for face liveness detection - Google Patents

Method and device for face liveness detection Download PDF

Info

Publication number
WO2020000908A1
WO2020000908A1 PCT/CN2018/119758 CN2018119758W WO2020000908A1 WO 2020000908 A1 WO2020000908 A1 WO 2020000908A1 CN 2018119758 W CN2018119758 W CN 2018119758W WO 2020000908 A1 WO2020000908 A1 WO 2020000908A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
depth
color
face
normalized face
Prior art date
Application number
PCT/CN2018/119758
Other languages
French (fr)
Chinese (zh)
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 WO2020000908A1 publication Critical patent/WO2020000908A1/en

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/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • 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

  • the present invention relates to the technical field of face recognition, and in particular, to a method and a device for detecting the living body of a face.
  • biometric identification devices such as time and attendance machines, access control systems, and electronic payment systems, which greatly facilitates people's daily lives.
  • Face attack detection has become increasingly prominent.
  • Common face attack methods include face recognition by using fake face images, face videos, or face molds to impersonate real faces.
  • face attack detection can be performed by performing face live detection on the image to be recognized.
  • commonly used facial live detection methods include facial live detection based on motion information, facial feature detection based on texture feature analysis in photos collected under natural light conditions of the face, and combined voice information and facial image features. Perform face live detection.
  • the face live body detection method in the prior art needs to be improved.
  • the embodiment of the present invention aims to provide a face live detection method, which can efficiently and accurately perform face live detection.
  • an embodiment of the present invention provides a method for detecting a living body of a face, including:
  • Determining a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image;
  • determining the association between the color image and the depth image Sexual characteristics including:
  • Denoise processing is performed on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image by using a skin color model, and to determine the values in the normalized face image corresponding to the color image.
  • a correlation feature of the color image and the depth image is determined by performing correlation analysis on the first gray histogram and the second gray histogram.
  • the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the normalization corresponding to the color image, respectively.
  • the trusted pixel points in the normalized face image and the normalized pixel points in the normalized face image corresponding to the depth image include:
  • each pair of pixels it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image satisfies a preset effective depth value condition , Each pixel in the pair of pixels is marked as a trusted pixel.
  • determining depth consistency characteristics of the depth image by performing depth consistency analysis on a normalized face image corresponding to the depth image includes:
  • a depth consistency feature of the depth image is determined.
  • performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature includes:
  • determining the normalized face image corresponding to the color image and the depth image separately includes:
  • the method before the step of separately determining a normalized face image corresponding to the color image and the depth image, the method includes:
  • an embodiment of the present invention further provides a face live detection device, including:
  • An image acquisition module configured to acquire a color image and a depth image of a target to be detected
  • a normalization module configured to respectively determine normalized face images corresponding to the color image and the depth image
  • a first feature determination module configured to determine the color image and the depth image by performing correlation analysis on a normalized face image corresponding to the color image and a normalized face image corresponding to the depth image Related characteristics
  • a second feature determination module configured to determine a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image;
  • the living body detection module is configured to perform face live detection on the target to be detected according to the correlation features determined by the first feature determination module and the depth consistency features determined by the second feature determination module.
  • the correlation feature of the color image and the depth image is determined
  • the first feature determining module is configured to:
  • Denoise processing is performed on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image by using a skin color model, and to determine the values in the normalized face image corresponding to the color image.
  • a correlation feature of the color image and the depth image is determined by performing correlation analysis on the first gray histogram and the second gray histogram.
  • the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the normalized person corresponding to the color image, respectively.
  • the first feature determination module is configured to:
  • each pair of pixels it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image meets the preset effective depth value condition , Each pixel in the pair of pixels is marked as a trusted pixel.
  • the second feature determination module is configured to:
  • a depth consistency feature of the depth image is determined.
  • the live detection module when performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature, is configured to:
  • the normalization module when determining a normalized face image corresponding to the color image and the depth image, is configured to:
  • an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the processor.
  • the computer program implements the face live body detection method according to the embodiment of the present invention.
  • an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the live face detection according to the embodiment of the present invention step.
  • the face living body detection method disclosed in the embodiment of the present invention determines a normalized face image corresponding to the color image and the depth image by acquiring a color image and a depth image of a target to be detected; Performing a correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image to determine the correlation feature between the color image and the depth image; and Depth consistency analysis is performed on the normalized face image corresponding to the image to determine the depth consistency feature of the depth image; according to the correlation feature and the depth consistency feature, perform face live on the target to be detected
  • the detection solves the problems of low efficiency and low accuracy of face living body detection in the prior art.
  • the time of image acquisition can be reduced, and the efficiency of detecting a living body of a face is improved.
  • human body live detection is performed on the target to be detected, thereby improving the accuracy of the living body detection.
  • FIG. 1 is a flowchart of a face live detection method according to the first embodiment of the present invention
  • FIGS. 2a and 2b are schematic diagrams of a color image and a depth image obtained in Embodiment 1 of the present invention.
  • 3a and 3b are schematic diagrams of a normalized face image determined in Embodiment 1 of the present invention.
  • FIG. 4 is a schematic diagram of pixels at the same position in two normalized face images in Embodiment 1 of the present invention.
  • FIG. 5 is a schematic diagram of subregion division of a normalized face image corresponding to a depth image in Embodiment 1 of the present invention.
  • FIG. 6 is one of the schematic structural diagrams of a living body detection device for a face according to Embodiment 2 of the present invention.
  • This embodiment provides a method for detecting a living body of a human face. As shown in FIG. 1, the method includes steps 11 to 14.
  • Step 11 Obtain a color image and a depth image of the target to be detected.
  • two images of a target to be detected are collected simultaneously by an image acquisition device provided with a natural light camera and a depth camera, or the face information such as a face posture is maintained through the image acquisition device.
  • the natural light camera and the depth camera successively acquire two images of a target to be detected.
  • a color image of a target to be detected is collected by a natural light camera
  • a depth image of a target to be detected is collected by a depth camera.
  • the placement positions of the natural light camera and the depth camera on the image acquisition device are close, so as to collect images of the target to be detected from similar positions and angles, respectively.
  • a pair of RGB-D images can be taken with a Kinect device to be detected, which contains a color image (as shown in Figure 2a) and a "2.5D depth Image (as shown in Figure 2b) "or" pseudo-depth image ".
  • the method before the determining the normalized face image corresponding to the color image and the depth image, respectively, the method includes: pixel-aligning the color image and the depth image.
  • the “false depth image” or “2.5D depth image” in the embodiment of the present invention refers to a depth image obtained by a structured light camera.
  • the depth image described in the embodiment of the present invention contains fewer image details, and the pixel value of each pixel does not refer to specific depth information, but is only a representation of the depth relationship between pixels.
  • the acquired depth image is a converted gray image.
  • the depth information needs to be mapped to a gray value to obtain a depth image in a gray image format.
  • Step 12 Determine a normalized face image corresponding to the color image and the depth image, respectively.
  • the position of the human eye can be determined first by using a face detection algorithm; then, the facial area image is extracted from the color image and the depth image by using a geometric template such as an oval template, a circular template, or a rectangular template;
  • the face region image extracted from the image and the face region image extracted from the depth image are normalized and normalized to a uniform size to obtain a normalized face image and the depth corresponding to the color image.
  • the normalized face image corresponding to the image can be determined first by using a face detection algorithm; then, the facial area image is extracted from the color image and the depth image by using a geometric template such as an oval template, a circular template, or a rectangular template;
  • the face region image extracted from the image and the face region image extracted from the depth image are normalized and normalized to a uniform size to obtain a normalized face image and the depth corresponding to the color image.
  • the normalized face image corresponding to the image can be determined first by using a face detection algorithm; then, the facial area image is extracted from the color image
  • respectively determining a normalized face image corresponding to the color image and the depth image includes: extracting a face region image in the color image and the depth image respectively through an oval template, and Normalize the face region image in the color image and the face region image in the depth image to obtain the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image.
  • the Viola-Jones cascade face detector provided by OpenCV, or other face detection algorithms are used to locate the face area of the collected color image and depth image.
  • an ellipse template is used to process the input color image and depth image. Cropping, extracting an image of a face area in the color image (as shown in FIG. 3a) and an image of a face area in the depth image (as shown in FIG. 3b).
  • the image of the face area in the extracted color image and the image of the face area in the depth image are separately A normalization process is performed to obtain a normalized face image corresponding to the color image of a uniform size and a normalized face image corresponding to the depth image.
  • a normalization process is performed to obtain a normalized face image corresponding to the color image of a uniform size and a normalized face image corresponding to the depth image.
  • Step 13 Perform correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image to determine the correlation characteristics of the color image and the depth image, and The normalized face image is analyzed for depth consistency to determine the depth consistency characteristics of the depth image.
  • attack vectors such as face masks or head models are also one of the challenges that live detection systems will face.
  • the depth images of masks forged faces are similar to real faces, so you cannot simply apply Detection of fake faces in photos or screens.
  • the fixed size of the face mask will make the correlation between the color map and the depth map in some areas of the fake face appear significantly different, especially at the edge where the mask fits with the real face. This phenomenon will be more obvious.
  • the potential correlation between color information and spatial information is analyzed.
  • the correlation characteristics of the color image and the depth image may be determined by performing correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image.
  • a depth consistency analysis is performed on the normalized face image corresponding to the depth image to determine the depth consistency feature of the depth image, and then the living body detection of the face is performed by combining the determined correlation feature and the depth consistency feature.
  • the consistency characteristics of the color image and the depth image are determined by performing consistency analysis on the normalized face images corresponding to the color image and the depth image, including: sub-steps S1 to S5.
  • Sub-step S1 performing a denoising process on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image through the skin color model, and determining the normalized face image corresponding to the color image respectively.
  • the sizes of real faces are different.
  • the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image obtained through the foregoing steps may include many non-face skins. Some areas, such as background areas and hair, are significantly different from human skin in terms of imaging characteristics, which will directly affect subsequent correlation analysis.
  • a predefined skin color model is used to consider removing these non-skin pixels that may cause interference.
  • the skin color model uses YCbCr color space to cluster skin colors in a light-independent chromaticity plane, so that the skin color model can be applied to various environments such as different light and different skin colors.
  • For the modeling method of the skin color model refer to the prior art, which is not repeated in the embodiment of the present invention.
  • the structured light depth camera In the normalized face image, not only the interference of non-skin pixels in the color image, but the structured light depth camera is limited by its own imaging principle. There may also be some defects or blind spots in the captured depth image, that is, some pixels Corresponding depth information cannot be recovered smoothly through structured light, and some pixels in which depth values do not exist are formed in the depth image. In order to improve the reliability and stability of the correlation analysis between the color image and the depth image, before the subsequent analysis, the interference of these non-skin pixels and pixels where the depth value does not exist needs to be excluded.
  • the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the normalized face corresponding to the color image, respectively.
  • the trusted pixels in the normalized face image corresponding to the trusted pixels in the image and the depth image include: every two normalized face images in which the color image and the depth image correspond to each other have the same pixel coordinates Pixels are determined as a pair of pixels.
  • each pixel in the pair of pixels is marked as a trusted pixel respectively.
  • the normalized face image corresponding to the color image may be determined first.
  • the first pixel point of the selected pixel coordinate position in the image, and then determine the second pixel point of the selected pixel coordinate position in the normalized face image corresponding to the depth image, and finally, the first pixel point and the second pixel point are The pixels are determined as a pair of pixels.
  • the pixel point D1 and the pixel point D2 correspond to to be detected
  • the same imaging position of the target that is, the pixel position of pixel point D1 in the normalized face image corresponding to the color image and the pixel position of pixel point D2 in the normalized face image corresponding to the depth image
  • Pixels D1 and D2 can be regarded as trusted pixels when the following two conditions are met: First, the pixel value of pixel D1 belongs to the skin color range defined by the skin color model; The second condition, the pixel value of the pixel point D2 satisfies a pre-defined effective depth value condition.
  • the predefined effective depth value condition may be that the pixel value is not equal to 255. Due to the defects of the structured light camera, when collecting depth information, some pixels cannot obtain depth information, which may appear as NaN or 255 in the data, and after mapping to the depth image, it corresponds to the brightest white in the depth image. If the pixel value of a pixel in the depth image is not white, the depth value is considered valid, that is, the pixel is a trusted pixel.
  • Sub-step S2 determining a grayscale face image of the normalized face image corresponding to the color image.
  • the normalized face image corresponding to the color image may be subjected to graying processing to obtain the grayed face image of the normalized face image corresponding to the color image.
  • graying processing to obtain the grayed face image of the normalized face image corresponding to the color image.
  • Sub-step S3 determining a first gray-scale histogram of the gray-scaled face image based on the trusted pixel points in the normalized face image corresponding to the color image.
  • the depth image is less affected by light, in the case of correlation analysis in combination with the depth image, simple texture information can be extracted from the color image.
  • the grayscale of the color face image can be extracted Histograms are used for correlation analysis to improve computing efficiency and are highly versatile.
  • the gray histogram generated from the normalized face image corresponding to the grayscaled color image is denoted as C i .
  • Sub-step S4 Determine a second gray histogram of the depth image based on the trusted pixel points in the normalized face image corresponding to the depth image.
  • the correlation analysis is performed based on the trusted pixels. Therefore, first, the trusted pixel points in the normalized face image corresponding to the depth image are determined. Wherein, the trusted pixel points in the normalized face image corresponding to the depth image are that the pixel value satisfies a pre-defined effective depth value condition. For the definition method of the effective depth value condition, refer to the description in the previous paragraph. Then, based on the trusted pixel points in the normalized face image corresponding to the depth image, a second gray histogram of the depth image is determined. In this embodiment, the histogram generated from the depth image is referred to as D i .
  • sub-step S5 a correlation analysis is performed on the first gray histogram and the second gray histogram to determine the correlation characteristics of the color image and the depth image.
  • the canonical correlation analysis (canonical correlation analysis, CCA) may be employed for the first histogram and the second C i D i histogram correlation analysis.
  • CCA canonical correlation analysis
  • the intra-class covariance matrices C CC and C DD and the inter-class covariance matrices C CD and C DC are introduced during implementation. Since all feature vectors are on smaller subregion pictures Extraction, by introducing a regularization parameter ⁇ for the intra-class covariance matrix to avoid situations such as overfitting, the above objective function can be rewritten as:
  • the projection direction of the first gray histogram may be determined.
  • Feature vector and the second gray histogram in the projection direction Feature vector may be determined.
  • determining a depth consistency feature of the depth image includes: normalizing a face corresponding to the depth image The image is divided into N * M sub-regions, where N and M are integers greater than or equal to 3, and determined according to the pixel points in each of the sub-regions of the depth image whose pixel values meet a pre-defined effective depth value condition.
  • the normalized face image corresponding to the depth image is uniformly divided into N * M sub-regions, where N is equal to M.
  • the normalized face image corresponding to the depth image is equally divided into 3 * 3 sub-regions along the horizontal and vertical directions, as shown in FIG. 5. And in the order from left to right and from top to bottom, these regions are denoted as p 1 , p 2 , ..., p 9, respectively .
  • the depth distribution can be used to conduct live test from the spatial information dimension.
  • the depth distribution of the sub-regions can be measured by the divergence between the sub-regions.
  • the divergence can be calculated by the following formula:
  • h i (k) refers to the histogram h i k-th element
  • h j (k) refers to the histogram h j k-th element.
  • the depth distribution of a sub-region is measured by the cross-entropy between the sub-regions.
  • the cross-entropy is used to measure the consistency of the depth distribution between them. The cross entropy of the histograms h i and h j is calculated as:
  • H (h i) is the entropy of the histogram h i, D KL (h i
  • the value of cross-entropy H (h i , h j ) can be understood from the perspective of information theory as the average number of bits required to finally identify the event distribution h i when coding is performed based on the probability distribution h j .
  • the two regions corresponding to hi and h j have similar depth distributions, for example, they come from the same side of a crease in a bent photo, or belong to the screen or mask of the same depth,
  • the value of this cross entropy will be relatively small; for real faces, due to the complex depth changes and occlusions in the face region, the cross entropy between different subregions may be relatively large. Therefore, the cross Entropy can represent features of real or attacking faces.
  • the value of N is determined according to the size of the face image in the data set.
  • N may also be set to an odd number such as 5 or 7.
  • attack screens such as rotating screens
  • photos that are bent horizontally or vertically
  • masks with weak depth and detail There may be some sub-regions with similar depth characteristics.
  • N is set to 3.
  • the order of obtaining correlation features and obtaining depth consistency features can be reversed, which does not affect solving the technical problem of the present invention and achieving the same technical effect.
  • Step 14 Perform face live detection on the target to be detected according to the correlation feature and the depth consistency feature.
  • the correlation feature and the depth consistency feature can be directly combined into features to be identified, and input to a pre-trained recognition model to detect whether the target to be detected is an attacking face.
  • the performing a face live detection on the target to be detected according to the correlation feature and the depth consistency feature includes: associating the association with a first kernel function Classify and identify sexual characteristics, determine a first recognition result, and classify and identify the deep consistency feature through a second kernel function to determine a second recognition result; and determine the first recognition result and the second recognition by using a second kernel function Results are subjected to weighted fusion to determine a result of performing face live detection on the target to be detected.
  • two classifiers with different kernel functions are used to perform live detection respectively, and then the detection results of different classifiers are fused.
  • a support vector machine with a radial basis kernel function is used for classification and recognition to determine the first recognition result; and for the depth consistency features constructed based on cross entropy,
  • the support vector machine of the chi-square kernel function performs classification recognition and determines a second recognition result.
  • the final classifier performs weighted fusion at the scoring level, and the corresponding weights of each classifier are determined by the verification process, and the sum of the two weights is 1. For example, weighted fusion is performed on the first recognition result and the second recognition result, and then classification recognition is performed based on the fusion result to determine whether the target to be detected is a real face.
  • the fusion weight of the first recognition result and the second recognition result is determined according to the above test result.
  • the face live body detection method disclosed in the embodiment of the present invention obtains a color image and a depth image of a target to be detected; determines a normalized face image corresponding to the color image and the depth image, respectively; Performing a correlation analysis on the normalized face image corresponding to the normalized face image and the depth image to determine the correlation feature of the color image and the depth image; and Normalize the face image to perform a depth consistency analysis to determine the depth consistency characteristics of the depth image. Based on the correlation characteristics and the depth characteristics, perform face live detection on the object to be detected, which solves the current problem. There are problems with low efficiency and accuracy of face live body detection in the technology.
  • the color image and depth image required by the face live detection method disclosed in the embodiment of the present invention can be acquired at the same time, thereby reducing the image acquisition time, improving the face live detection efficiency, and because the color information contains rich texture information,
  • the living body detection of the target to be detected is carried out. Since the complementary features are used, the information is more comprehensive, which helps to improve the accuracy of the living body detection.
  • the present invention also discloses a face live detection device.
  • the above-mentioned face live detection device includes:
  • An image acquisition module 610 configured to acquire a color image and a depth image of a target to be detected
  • a normalization module 620 configured to determine normalized face images corresponding to the color image and the depth image, respectively;
  • a first feature determination module 630 configured to determine a correlation feature between the color image and the depth image by performing correlation analysis on the normalized face image corresponding to the normalized face image and the depth image of the color image;
  • a second feature determination module 640 configured to determine a depth consistency feature of the depth image by performing a depth consistency analysis on the normalized face image corresponding to the depth image;
  • the living body detection module 650 is configured to perform face living body detection on the target to be detected according to the correlation features determined by the first feature determination module 630 and the depth consistency features determined by the second feature determination module 640.
  • the first feature determination module 630 uses to:
  • the correlation characteristics of the color image and the depth image are determined by performing correlation analysis on the first gray histogram and the second gray histogram.
  • the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the credibility in the normalized face image corresponding to the color image.
  • the first feature determination module 630 is configured to:
  • each pair of pixels it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image meets the preset effective depth value condition, the Each pixel in the pair of pixels is labeled as a trusted pixel.
  • the second feature determination module 640 is configured to:
  • the depth consistency characteristics of the depth image are determined.
  • Screen fake face images are displayed on a non-bendable or foldable display screen, which has fairly obvious flat characteristics; although photo fake face images can be rotated, bent, or folded, they often maintain a more regular depth mode, such as a cylinder Curved surface or gradient depth information; although the fake face image of the mask can achieve a relatively real depth effect, it is difficult for the mask to imitate some special areas with very complicated depth changes, such as the nose wings, nasolabial folds, etc.
  • the normalized face image corresponding to the depth image is equally divided into 3 * 3 sub-regions in the horizontal and vertical directions, as shown in FIG. 5. And in the order from left to right and from top to bottom, these regions are denoted as p 1 , p 2 , ..., p 9, respectively . Then, the normalized face image p i each subregion depth image corresponding to the further statistical having an effective pixel depth information, the pixels to the letter, and histogram h i of the sub-region to measure substantially The depth distribution can be used to conduct live test from the spatial information dimension.
  • the structured light depth camera In the normalized face image, not only the interference of non-skin pixels in the color image, but the structured light depth camera is limited by its own imaging principle. There may also be some defects or blind spots in the captured depth image, that is, some pixels Corresponding depth information cannot be recovered smoothly through structured light, and some pixels in which depth values do not exist are formed in the depth image. Before the subsequent analysis, it is necessary to eliminate the interference between these non-skin pixels and pixels that have no depth value, which can improve the reliability and stability of the correlation analysis between the color image and the depth image.
  • the live detection module 650 when performing face live detection on the target to be detected, is configured to:
  • the normalization module 620 is configured to:
  • the above device further includes:
  • a pixel alignment module (not shown in the figure) is configured to perform pixel alignment on the color image and the depth image.
  • the human face living body detection device disclosed in the embodiment of the present invention obtains a color image and a depth image of a target to be detected; determines a normalized face image corresponding to the color image and the depth image, respectively; Performing a correlation analysis on the normalized face image corresponding to the normalized face image and the depth image to determine the correlation feature of the color image and the depth image; and Normalize the face image to perform a depth consistency analysis to determine the depth consistency characteristics of the depth image. Based on the correlation characteristics and the depth characteristics, perform face live detection on the object to be detected, which solves the current problem. There are problems with low efficiency and accuracy of face live body detection in the technology.
  • the color image and depth image required by the face living body detection device disclosed in the embodiment of the present invention can be collected simultaneously, thereby reducing the image acquisition time, improving the face living body detection efficiency, and because the color information contains rich texture information, By combining the color information and spatial information in the image of the target to be detected, the living body detection of the target to be detected is carried out. Since the complementary features are used, the information is more comprehensive, which helps to improve the accuracy of the living body detection.
  • an embodiment of the present invention also discloses an electronic device.
  • the electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the processor.
  • the computer program implements the face live body detection method according to the first embodiment of the present invention.
  • the electronic device may be a mobile phone, a PAD, a tablet computer, a face recognition machine, or the like.
  • an embodiment of the present invention further provides a computer-readable storage medium having stored thereon a computer program, which is executed by a processor to implement the steps of the face live body detection method according to the first embodiment of the present invention.
  • the device embodiment of the present invention corresponds to a method.
  • the method is an embodiment, and details are not described herein again.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the computer software product is stored in a storage medium and includes several instructions for making a computer device (which can be a personal computer, a server, or a network). Equipment, etc.) perform all or part of the steps of the method described in each embodiment of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

The present invention relates to the technical field of facial recognition and addresses the problem in the prior art of low efficiency and accuracy in face liveness detection. A method face liveness detection, comprising: acquiring a color image and a depth image of a target to be identified (11), determining a normalized facial image corresponding to the color image and the depth image respectively (12), determining a correlation feature between the color image and the depth image by performing a correlation analysis between the normalized facial image corresponding to the color image and the normalized facial image corresponding to the depth image, and determining a depth consistency feature of the depth image by performing a depth consistency analysis on the normalized facial image corresponding to the depth image (13), and according to the correlation feature and the depth consistency feature, performing face liveness detection on the target to be identified (14). The method determines face liveness by using color information in combination with spatial information in an image of a target to be identified, improving the accuracy of face liveness detection.

Description

一种人脸活体检测方法及装置Human face live body detection method and device 技术领域Technical field
本发明涉及人脸识别技术领域,尤其涉及一种人脸活体检测方法及装置。The present invention relates to the technical field of face recognition, and in particular, to a method and a device for detecting the living body of a face.
背景技术Background technique
人脸识别技术越来越广泛地应用于考勤机、门禁系统、电子支付系统等生物特征识别装置中,极大方便了人们的日常生活。Face recognition technology is more and more widely used in biometric identification devices such as time and attendance machines, access control systems, and electronic payment systems, which greatly facilitates people's daily lives.
然而,随着人脸识别技术的广泛应用,人脸攻击检测的重要性日益凸显。常用的人脸攻击方法包括:通过利用伪造的人脸图像、人脸视频或人脸模具冒充真实人脸进行人脸识别。However, with the widespread application of face recognition technology, the importance of face attack detection has become increasingly prominent. Common face attack methods include face recognition by using fake face images, face videos, or face molds to impersonate real faces.
通常通过对待识别图像进行人脸活体检测可以识别人脸攻击。现有技术中,常用的人脸活体检测方法有基于运动信息进行人脸活体检测、基于人脸自然光条件下采集的照片中的纹理特征分析进行人脸活体检测、结合语音信息和人脸图像特征进行人脸活体检测。Normally, face attack detection can be performed by performing face live detection on the image to be recognized. In the prior art, commonly used facial live detection methods include facial live detection based on motion information, facial feature detection based on texture feature analysis in photos collected under natural light conditions of the face, and combined voice information and facial image features. Perform face live detection.
申请人在对现有技术的研究中发现,基于运动信息和结合语音等其他信息进行人脸活体检测需要花费较长的时间采集特征,检测效率较低;基于纹理特征进行人脸活体检测,在高清人脸图像上效果不佳。The applicant found in the research on the prior art that face live body detection based on motion information and other information combined with speech takes a long time to collect features, and the detection efficiency is low; face live body detection based on texture features, in Poor results on HD face images.
综上,现有技术中的人脸活体检测方法还有待改进。In summary, the face live body detection method in the prior art needs to be improved.
发明内容Summary of the invention
本发明实施例旨在提供一种人脸活体检测方法,能够高效、准确地进行人脸活体检测。The embodiment of the present invention aims to provide a face live detection method, which can efficiently and accurately perform face live detection.
根据本发明的一个方面,本发明实施例提供了一种人脸活体检测方法,包括:According to an aspect of the present invention, an embodiment of the present invention provides a method for detecting a living body of a face, including:
获取待检测目标的彩色图像和深度图像;Obtaining color and depth images of the target to be detected;
分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;Respectively determining a normalized face image corresponding to the color image and the depth image;
通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关 联性特征;以及,Determining correlation characteristics between the color image and the depth image by performing correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image; and,
通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;Determining a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image;
根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测。Performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature.
可选的,所述通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征,包括:Optionally, by performing correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image, determining the association between the color image and the depth image Sexual characteristics, including:
通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点;Denoise processing is performed on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image by using a skin color model, and to determine the values in the normalized face image corresponding to the color image. A trusted pixel point and a trusted pixel point in a normalized face image corresponding to the depth image;
确定所述彩色图像对应的归一化人脸图像的灰度化人脸图像;Determining a grayscale face image of a normalized face image corresponding to the color image;
基于所述彩色图像对应的归一化人脸图像中的可信像素点,确定所述灰度化人脸图像的第一灰度直方图;以及,基于所述深度图像对应的归一化人脸图像中的可信像素点,确定所述深度图像的第二灰度直方图;Determining a first gray histogram of the grayed face image based on trusted pixels in the normalized face image corresponding to the color image; and based on the normalized person corresponding to the depth image A trusted pixel in a face image to determine a second grayscale histogram of the depth image;
通过对所述第一灰度直方图和所述第二灰度直方图进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征。A correlation feature of the color image and the depth image is determined by performing correlation analysis on the first gray histogram and the second gray histogram.
可选的,所述通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点,包括:Optionally, the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the normalization corresponding to the color image, respectively. The trusted pixel points in the normalized face image and the normalized pixel points in the normalized face image corresponding to the depth image include:
将所述彩色图像和所述深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点;Determining every two pixel points with the same pixel coordinates in the normalized face image corresponding to the color image and the depth image as a pair of pixel points;
针对每一对像素点,确定其中彩色图像所对应的像素点的像素值属于所述肤色模型所定义的肤色范围,且其中深度图像所对应的像素点的像素值满足预设有效深度值条件时,将该对像素点中每个像素点分别标记为可 信像素点。For each pair of pixels, it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image satisfies a preset effective depth value condition , Each pixel in the pair of pixels is marked as a trusted pixel.
可选的,所述通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征,包括:Optionally, determining depth consistency characteristics of the depth image by performing depth consistency analysis on a normalized face image corresponding to the depth image includes:
将所述深度图像对应的归一化人脸图像划分为N*M个子区域,其中,N和M分别为大于等于3的整数;Divide the normalized face image corresponding to the depth image into N * M sub-regions, where N and M are integers greater than or equal to 3;
根据所述深度图像的每个所述子区域中像素值满足预先定义的有效深度值条件的像素点,确定每个所述子区域的直方图;Determining a histogram of each of the sub-regions according to pixels whose pixel values in each of the sub-regions of the depth image satisfy a predefined effective depth value condition;
通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征。By calculating the cross entropy or divergence of any two of the histograms, a depth consistency feature of the depth image is determined.
可选的,所述根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测,包括:Optionally, performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature includes:
通过第一核函数对所述关联性特征进行分类识别,确定第一识别结果,以及,通过第二核函数对所述深度一致性特征进行分类识别,确定第二识别结果;Classify and identify the correlation feature through a first kernel function, determine a first recognition result, and classify and identify the deep consistency feature through a second kernel function, and determine a second recognition result;
通过对所述第一识别结果和所述第二识别结果进行加权融合,确定对所述待检测目标进行人脸活体检测的结果。By performing weighted fusion on the first recognition result and the second recognition result, a result of performing face live detection on the target to be detected is determined.
可选的,所述分别确定所述彩色图像和所述深度图像对应的归一化人脸图像,包括:Optionally, determining the normalized face image corresponding to the color image and the depth image separately includes:
通过椭圆形模板分别提取所述彩色图像和所述深度图像中人脸区域图像;Extracting a face region image in the color image and the depth image respectively through an oval template;
分别对所述彩色图像中的人脸区域图像和所述深度图像中的人脸区域图像进行归一化处理,得到所述彩色图像对应的归一化人脸图像、所述深度图像对应的归一化人脸图像。Normalizing the face region image in the color image and the face region image in the depth image, respectively, to obtain a normalized face image corresponding to the color image and a normalization corresponding to the depth image A face image.
可选的,所述分别确定所述彩色图像和所述深度图像对应的归一化人脸图像的步骤前,包括:Optionally, before the step of separately determining a normalized face image corresponding to the color image and the depth image, the method includes:
对所述彩色图像和所述深度图像进行像素对齐。Pixel-aligning the color image and the depth image.
根据本发明的另一个方面,本发明实施例还提供了一种人脸活体检测装置,包括:According to another aspect of the present invention, an embodiment of the present invention further provides a face live detection device, including:
图像获取模块,用于获取待检测目标的彩色图像和深度图像;An image acquisition module, configured to acquire a color image and a depth image of a target to be detected;
归一化模块,用于分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;A normalization module, configured to respectively determine normalized face images corresponding to the color image and the depth image;
第一特征确定模块,用于通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征;以及,A first feature determination module, configured to determine the color image and the depth image by performing correlation analysis on a normalized face image corresponding to the color image and a normalized face image corresponding to the depth image Related characteristics; and
第二特征确定模块,用于通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;A second feature determination module, configured to determine a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image;
活体检测模块,用于根据所述第一特征确定模块确定的关联性特征和所述第二特征确定模块确定的深度一致性特征,对所述待检测目标进行人脸活体检测。The living body detection module is configured to perform face live detection on the target to be detected according to the correlation features determined by the first feature determination module and the depth consistency features determined by the second feature determination module.
可选的,通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征时,所述第一特征确定模块用于:Optionally, by performing correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image, the correlation feature of the color image and the depth image is determined When the first feature determining module is configured to:
通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点;Denoise processing is performed on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image by using a skin color model, and to determine the values in the normalized face image corresponding to the color image. A trusted pixel point and a trusted pixel point in a normalized face image corresponding to the depth image;
确定所述彩色图像对应的归一化人脸图像的灰度化人脸图像;Determining a grayscale face image of a normalized face image corresponding to the color image;
基于所述彩色图像对应的归一化人脸图像中的可信像素点,确定所述灰度化人脸图像的第一灰度直方图;以及,基于所述深度图像对应的归一化人脸图像中的可信像素点,确定所述深度图像的第二灰度直方图;Determining a first gray histogram of the grayed face image based on trusted pixels in the normalized face image corresponding to the color image; and based on the normalized person corresponding to the depth image A trusted pixel in a face image to determine a second grayscale histogram of the depth image;
通过对所述第一灰度直方图和所述第二灰度直方图进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征。A correlation feature of the color image and the depth image is determined by performing correlation analysis on the first gray histogram and the second gray histogram.
可选的,通过肤色模型对所述彩色图像对应的归一化人脸图像和所述 深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点时,所述第一特征确定模块用于:Optionally, the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the normalized person corresponding to the color image, respectively. When the trusted pixels in the face image and the trusted pixels in the normalized face image corresponding to the depth image, the first feature determination module is configured to:
将所述彩色图像和所述深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点;Determining every two pixel points with the same pixel coordinates in the normalized face image corresponding to the color image and the depth image as a pair of pixel points;
针对每一对像素点,确定其中彩色图像所对应的像素点的像素值属于所述肤色模型所定义的肤色范围,且其中深度图像所对应的像素点的像素值满足预设有效深度值条件时,将该对像素点中每个像素点分别标记为可信像素点。For each pair of pixels, it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image meets the preset effective depth value condition , Each pixel in the pair of pixels is marked as a trusted pixel.
可选的,通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征时,所述第二特征确定模块用于:Optionally, when a depth consistency analysis is performed on a normalized face image corresponding to the depth image to determine a depth consistency feature of the depth image, the second feature determination module is configured to:
将所述深度图像对应的归一化人脸图像划分为N*M个子区域,其中,N和M分别为大于等于3的整数;Divide the normalized face image corresponding to the depth image into N * M sub-regions, where N and M are integers greater than or equal to 3;
根据所述深度图像的每个所述子区域中像素值满足预先定义的有效深度值条件的像素点,确定每个所述子区域的直方图;Determining a histogram of each of the sub-regions according to pixels whose pixel values in each of the sub-regions of the depth image satisfy a predefined effective depth value condition;
通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征。By calculating the cross entropy or divergence of any two of the histograms, a depth consistency feature of the depth image is determined.
可选的,根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测时,所述活体检测模块用于:Optionally, when performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature, the live detection module is configured to:
通过第一核函数对所述关联性特征进行分类识别,确定第一识别结果,以及,通过第二核函数对所述深度一致性特征进行分类识别,确定第二识别结果;Classify and identify the correlation feature through a first kernel function, determine a first recognition result, and classify and identify the deep consistency feature through a second kernel function, and determine a second recognition result;
通过对所述第一识别结果和所述第二识别结果进行加权融合,确定对所述待检测目标进行人脸活体检测的结果。By performing weighted fusion on the first recognition result and the second recognition result, a result of performing face live detection on the target to be detected is determined.
可选的,分别确定所述彩色图像和所述深度图像对应的归一化人脸图像时,所述归一化模块用于:Optionally, when determining a normalized face image corresponding to the color image and the depth image, the normalization module is configured to:
通过椭圆形模板分别提取所述彩色图像和所述深度图像中人脸区域图像;Extracting a face region image in the color image and the depth image respectively through an oval template;
分别对所述彩色图像中的人脸区域图像和所述深度图像中的人脸区域图像进行归一化处理,得到所述彩色图像对应的归一化人脸图像、所述深度图像对应的归一化人脸图像。Normalizing the face region image in the color image and the face region image in the depth image, respectively, to obtain a normalized face image corresponding to the color image and a normalization corresponding to the depth image A face image.
根据本发明的另一个方面,本发明实施例还提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例所述的人脸活体检测方法。According to another aspect of the present invention, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the processor. The computer program implements the face live body detection method according to the embodiment of the present invention.
根据本发明的另一个方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本发明实施例所述的人脸活体检测的步骤。According to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the live face detection according to the embodiment of the present invention step.
这样,本发明实施例公开的人脸活体检测方法,通过获取待检测目标的彩色图像和深度图像,分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征;以及,通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测,解决了现有技术中存在的人脸活体检测效率低下和准确率低的问题。本发明实施例公开的人脸活体检测方法需要的彩色图像和深度图像无论是否同时采集,均能减少图像采集时间,提升了人脸活体检测效率。同时,通过结合待检测目标的图像中色彩信息和空间信息,对所述待检测目标进行人脸活体检测,提升了活体检测的准确性。In this way, the face living body detection method disclosed in the embodiment of the present invention determines a normalized face image corresponding to the color image and the depth image by acquiring a color image and a depth image of a target to be detected; Performing a correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image to determine the correlation feature between the color image and the depth image; and Depth consistency analysis is performed on the normalized face image corresponding to the image to determine the depth consistency feature of the depth image; according to the correlation feature and the depth consistency feature, perform face live on the target to be detected The detection solves the problems of low efficiency and low accuracy of face living body detection in the prior art. Regardless of whether the color image and the depth image required by the method for detecting a living body of a face disclosed in the embodiments of the present invention are acquired at the same time or not, the time of image acquisition can be reduced, and the efficiency of detecting a living body of a face is improved. At the same time, by combining color information and spatial information in the image of the target to be detected, human body live detection is performed on the target to be detected, thereby improving the accuracy of the living body detection.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1是本发明实施例一的人脸活体检测方法流程图;FIG. 1 is a flowchart of a face live detection method according to the first embodiment of the present invention; FIG.
图2a和2b是本发明实施例一中获取的彩色图像和深度图像示意图;2a and 2b are schematic diagrams of a color image and a depth image obtained in Embodiment 1 of the present invention;
图3a和3b是本发明实施例一中确定的归一化人脸图像示意图;3a and 3b are schematic diagrams of a normalized face image determined in Embodiment 1 of the present invention;
图4是本发明实施例一中两幅归一化人脸图像中相同位置像素点示意图;4 is a schematic diagram of pixels at the same position in two normalized face images in Embodiment 1 of the present invention;
图5是本发明实施例一中深度图像对应的归一化人脸图像子区域划分示意图;FIG. 5 is a schematic diagram of subregion division of a normalized face image corresponding to a depth image in Embodiment 1 of the present invention; FIG.
图6是本发明实施例二的人脸活体检测装置结构示意图之一。FIG. 6 is one of the schematic structural diagrams of a living body detection device for a face according to Embodiment 2 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In the following, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
实施例一:Embodiment one:
本实施例提供了一种人脸活体检测方法,如图1所示,所述方法包括:步骤11至步骤14。This embodiment provides a method for detecting a living body of a human face. As shown in FIG. 1, the method includes steps 11 to 14.
步骤11,获取待检测目标的彩色图像和深度图像。Step 11: Obtain a color image and a depth image of the target to be detected.
在本发明的一些实施例中,通过设置有自然光摄像头和深度摄像头的图像采集设备同时采集待检测目标的两幅图像,或者,在保持人脸姿态等人脸信息不变的状态下通过所述自然光摄像头和所述深度摄像头先后采集待检测目标的两幅图像。In some embodiments of the present invention, two images of a target to be detected are collected simultaneously by an image acquisition device provided with a natural light camera and a depth camera, or the face information such as a face posture is maintained through the image acquisition device. The natural light camera and the depth camera successively acquire two images of a target to be detected.
例如,通过自然光摄像头采集待检测目标的彩色图像,同时通过深度摄像头采集待检测目标的深度图像。其中,自然光摄像头和深度摄像头在图像采集设备上的布设位置接近,以便于分别从相似的位置和角度采集待检测目标的图像。For example, a color image of a target to be detected is collected by a natural light camera, and a depth image of a target to be detected is collected by a depth camera. Wherein, the placement positions of the natural light camera and the depth camera on the image acquisition device are close, so as to collect images of the target to be detected from similar positions and angles, respectively.
在本发明的一些实施例中,可以使用Kinect设备对待检测目标拍摄一对RGB-D图像(彩色一深度图像),其中含有一张彩色图像(如图2a所示)和一张“2.5D深度图像(如图2b所示)”或“伪深度图像”。In some embodiments of the present invention, a pair of RGB-D images (color-depth images) can be taken with a Kinect device to be detected, which contains a color image (as shown in Figure 2a) and a "2.5D depth Image (as shown in Figure 2b) "or" pseudo-depth image ".
在本发明的一些实施例中,上述分别确定彩色图像和深度图像对应的归一化人脸图像之前,包括:对彩色图像和深度图像进行像素对齐。In some embodiments of the present invention, before the determining the normalized face image corresponding to the color image and the depth image, respectively, the method includes: pixel-aligning the color image and the depth image.
在Kinect等设备中,拍摄彩色图像和伪深度图像的两个传感器之间具有一定的物理位置差异,因此我们需要使用摄像头相关参数对原始RGB-D图片进行双目图像校准。真实的深度图像需要特殊硬件设备(如激光设备)或者深度重建算法进行计算,其中,每个像素的像素值就是具体的深度信息。而本发明实施例中的“伪深度图像”或“2.5D深度图像”指的结构光摄像头拍摄得到的深度图像。本发明实施例中所述的深度图像包含的图像细节较少,且每个像素的像素值并不指具体的深度信息,只是像素间深度关系的一种表示。在本实施例中,获取的深度图像为转化后的得到的灰度图像。In devices such as Kinect, there is a certain physical position difference between the two sensors that capture color images and pseudo-depth images, so we need to perform binocular image calibration on the original RGB-D picture using camera-related parameters. Real depth images require special hardware equipment (such as laser equipment) or depth reconstruction algorithms for calculation, where the pixel value of each pixel is the specific depth information. The “false depth image” or “2.5D depth image” in the embodiment of the present invention refers to a depth image obtained by a structured light camera. The depth image described in the embodiment of the present invention contains fewer image details, and the pixel value of each pixel does not refer to specific depth information, but is only a representation of the depth relationship between pixels. In this embodiment, the acquired depth image is a converted gray image.
在本发明的其他实施例中,如果通过深度图像采集设备采集到的图像深度信息集合,则需要将所述深度信息映射为灰度值,以得到灰度图像格式的深度图像。In other embodiments of the present invention, if a set of image depth information is collected by a depth image acquisition device, the depth information needs to be mapped to a gray value to obtain a depth image in a gray image format.
步骤12,分别确定彩色图像和深度图像对应的归一化人脸图像。Step 12: Determine a normalized face image corresponding to the color image and the depth image, respectively.
对获取的彩色图像和深度图像,需要进一步执行人脸区域图像提取和归一化,以便后续进行人脸活体检测。For the obtained color image and depth image, it is necessary to further perform face area image extraction and normalization in order to perform face live detection subsequently.
例如,可以首先通过人脸检测算法确定人眼位置;然后,通过椭圆形模板、圆形模板或矩形模板等几何形状模板分别从彩色图像和深度图像中提取人脸区域图像;最后,对从彩色图像中提取的人脸区域图像和从深度图像中提取的人脸区域图像,进行归一化处理,归一化到统一尺寸,得到所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像。For example, the position of the human eye can be determined first by using a face detection algorithm; then, the facial area image is extracted from the color image and the depth image by using a geometric template such as an oval template, a circular template, or a rectangular template; The face region image extracted from the image and the face region image extracted from the depth image are normalized and normalized to a uniform size to obtain a normalized face image and the depth corresponding to the color image. The normalized face image corresponding to the image.
在本发明的一些优选实施例中,分别确定所述彩色图像和所述深度图像对应的归一化人脸图像,包括:通过椭圆形模板分别提取彩色图像和深度图像中人脸区域图像,并分别对彩色图像中的人脸区域图像和深度图像中的人脸区域图像进行归一化处理,得到彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像。In some preferred embodiments of the present invention, respectively determining a normalized face image corresponding to the color image and the depth image includes: extracting a face region image in the color image and the depth image respectively through an oval template, and Normalize the face region image in the color image and the face region image in the depth image to obtain the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image.
例如,在校正后的RGB-D图像中,进一步使用OpenCV提供的Viola-Jones级联人脸检测器,或其他人脸检测算法对采集的彩色图像和 深度图像进行人脸区域定位。For example, in the corrected RGB-D image, the Viola-Jones cascade face detector provided by OpenCV, or other face detection algorithms are used to locate the face area of the collected color image and depth image.
进一步的,为了尽量避免人脸周围的区域对纹理相关性分析的潜在影响,根据进行人脸区域定位时确定的人脸与双眼位置信息,使用一个椭圆形模板将输入的彩色图像和深度图像进行剪裁,提取所述彩色图像中人脸区域的图像(如图3a所示)和所述深度图像中人脸区域的图像(如图3b所示)。Further, in order to avoid the potential influence of the area around the face on the texture correlation analysis, according to the position information of the face and eyes determined during the face area positioning, an ellipse template is used to process the input color image and depth image. Cropping, extracting an image of a face area in the color image (as shown in FIG. 3a) and an image of a face area in the depth image (as shown in FIG. 3b).
由于获取的彩色图像和深度图像的设备不同,为了保证图像处理的一致性,进一步的,对提取的所述彩色图像中人脸区域的图像、提取的所述深度图像中人脸区域的图像分别进行归一化处理,以得到统一尺寸的所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像。对椭圆形人脸图像进行归一化处理的技术方案可以参照现有技术中对矩形人脸图像进行归一化处理的技术方案,本实施例不再赘述。Because the equipment of the obtained color image and depth image is different, in order to ensure the consistency of image processing, further, the image of the face area in the extracted color image and the image of the face area in the depth image are separately A normalization process is performed to obtain a normalized face image corresponding to the color image of a uniform size and a normalized face image corresponding to the depth image. For the technical solution of normalizing the oval face image, reference may be made to the technical solution of normalizing the rectangular face image in the prior art, which is not described in this embodiment.
步骤13,通过对彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像进行相关性分析,确定彩色图像和深度图像的关联性特征,以及,通过对深度图像对应的归一化人脸图像进行深度一致性分析,确定该深度图像的深度一致性特征。Step 13: Perform correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image to determine the correlation characteristics of the color image and the depth image, and The normalized face image is analyzed for depth consistency to determine the depth consistency characteristics of the depth image.
在实际应用过程中,申请人发现,大多数人脸伪造攻击均使用照片或屏幕作为攻击媒介,尽管伪造人脸的彩色图像纹理信息与真实人脸较为接近,但深度图像与真实用户深度图有较明显的差异,因此,可以通过探索人脸区域的彩色图像和深度图像之间的关联特性以获取有效的活体检测线索。In the actual application process, the applicant found that most face forgery attacks use photos or screens as the attack vector. Although the color image texture information of the forged face is close to the real face, the depth image is similar to the real user depth map. The obvious difference is, therefore, an effective living body detection clue can be obtained by exploring the correlation characteristics between the color image and the depth image of the face area.
然而,除了常见的屏幕或照片外,人脸面具或人头模型等攻击媒介也是活体检测系统将面临的挑战之一,面具伪造人脸的深度图像与真实人脸较为类似,因此,不能简单套用针对照片或屏幕伪造人脸的检测方式。However, in addition to common screens or photos, attack vectors such as face masks or head models are also one of the challenges that live detection systems will face. The depth images of masks forged faces are similar to real faces, so you cannot simply apply Detection of fake faces in photos or screens.
经过进一步研究,申请人发现,虽然人脸面具可以从彩色图与深度图像两方面模拟真实用户,但面具的尺寸在制作时就被固定,且与佩戴者的人脸大小无关。人脸面具的尺寸固定特性,会使得伪造人脸某些区域的彩色图与深度图相关性表现出较明显的不同,特别是在面具边缘与真实人脸贴合处,这个现象会更加明显。After further research, the applicant found that although the face mask can simulate real users from both color and depth images, the size of the mask is fixed at the time of production and has nothing to do with the face size of the wearer. The fixed size of the face mask will make the correlation between the color map and the depth map in some areas of the fake face appear significantly different, especially at the edge where the mask fits with the real face. This phenomenon will be more obvious.
因此,本发明实施例中基于人脸皮肤在彩色图像和深度图像的成像特性,分析色彩信息和空间信息之间的潜在关联。Therefore, in the embodiment of the present invention, based on the imaging characteristics of the human face skin in the color image and the depth image, the potential correlation between color information and spatial information is analyzed.
本发明的一些实施例中,可以通过对彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像进行相关性分析,确定上述彩色图像和上述深度图像的关联性特征,并通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定上述深度图像的深度一致性特征,然后,结合确定的关联性特征和深度一致性特征进行人脸活体检测。In some embodiments of the present invention, the correlation characteristics of the color image and the depth image may be determined by performing correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image. A depth consistency analysis is performed on the normalized face image corresponding to the depth image to determine the depth consistency feature of the depth image, and then the living body detection of the face is performed by combining the determined correlation feature and the depth consistency feature.
在本发明的一些实施例中,通过对彩色图像和深度图像对应的归一化人脸图像进行一致性分析,确定彩色图像和深度图像的关联性特征,包括:子步骤S1至子步骤S5。In some embodiments of the present invention, the consistency characteristics of the color image and the depth image are determined by performing consistency analysis on the normalized face images corresponding to the color image and the depth image, including: sub-steps S1 to S5.
子步骤S1,通过肤色模型对彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点。Sub-step S1: performing a denoising process on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image through the skin color model, and determining the normalized face image corresponding to the color image respectively. The trusted pixels and the trusted pixels in the normalized face image corresponding to the depth image.
真实人脸的大小各不相同,对于通过前述步骤得到的所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像,其中可能包括了许多非人脸皮肤部分,例如背景区域、头发等,在成像特性方面这些区域与人脸皮肤差异较大,会直接影响到后续的相关性分析。The sizes of real faces are different. The normalized face image corresponding to the color image and the normalized face image corresponding to the depth image obtained through the foregoing steps may include many non-face skins. Some areas, such as background areas and hair, are significantly different from human skin in terms of imaging characteristics, which will directly affect subsequent correlation analysis.
因此,本发明的一些实施例中采用预先定义的肤色模型来虑除这些可能会产生干扰的非皮肤像素点。所述肤色模型通过YCbCr色彩空间,对肤色在光照无关的色度平面内进行聚类,使得所述肤色模型可以适用于不同光照和不同肤色等多种环境。肤色模型的建模方法参见现有技术,本发明的实施例中不再赘述。Therefore, in some embodiments of the present invention, a predefined skin color model is used to consider removing these non-skin pixels that may cause interference. The skin color model uses YCbCr color space to cluster skin colors in a light-independent chromaticity plane, so that the skin color model can be applied to various environments such as different light and different skin colors. For the modeling method of the skin color model, refer to the prior art, which is not repeated in the embodiment of the present invention.
在归一化人脸图像中,不仅彩色图像中存在非皮肤像素点的干扰,结构光深度摄像头受自身成像原理限制,捕捉到的深度图像中也可能存在一定的缺陷或盲区,即一些像素点对应的深度信息无法通过结构光顺利恢复出来,在深度图像中形成了一些深度值不存在的像素点。为了提高彩色图像与深度图像相关性分析的可靠性与稳定性,在进行后续的分析之前,需要排除这些非皮肤像素点和深度值不存在的像素点的干扰。In the normalized face image, not only the interference of non-skin pixels in the color image, but the structured light depth camera is limited by its own imaging principle. There may also be some defects or blind spots in the captured depth image, that is, some pixels Corresponding depth information cannot be recovered smoothly through structured light, and some pixels in which depth values do not exist are formed in the depth image. In order to improve the reliability and stability of the correlation analysis between the color image and the depth image, before the subsequent analysis, the interference of these non-skin pixels and pixels where the depth value does not exist needs to be excluded.
在本发明的一些实施例中,通过肤色模型对彩色图像对应的归一化人 脸图像和深度图像对应的归一化人脸图像进行去噪处理,分别确定彩色图像对应的归一化人脸图像中的可信像素点和深度图像对应的归一化人脸图像中的可信像素点,包括:将彩色图像和深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点,针对每一对像素点,确定其中彩色图像所对应的像素点的像素值属于肤色模型所定义的肤色范围,且其中深度图像所对应的像素点的像素值满足预设有效深度值条件时,将该对像素点中每个像素点分别标记为可信像素点。In some embodiments of the present invention, the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the normalized face corresponding to the color image, respectively. The trusted pixels in the normalized face image corresponding to the trusted pixels in the image and the depth image include: every two normalized face images in which the color image and the depth image correspond to each other have the same pixel coordinates Pixels are determined as a pair of pixels. For each pair of pixels, it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and the pixel value of the pixel corresponding to the depth image When the preset effective depth value condition is satisfied, each pixel in the pair of pixels is marked as a trusted pixel respectively.
在将彩色图像和深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点时,可以首先确定所述彩色图像对应的归一化人脸图像中选定像素坐标位置的第一像素点,然后,再确定深度图像对应的归一化人脸图像中选定像素坐标位置的第二像素点,最后,将上述第一像素点和上述第二像素点确定为一对像素点。When determining each pair of pixel points with the same pixel coordinates in the normalized face image corresponding to the color image and the depth image respectively, the normalized face image corresponding to the color image may be determined first. The first pixel point of the selected pixel coordinate position in the image, and then determine the second pixel point of the selected pixel coordinate position in the normalized face image corresponding to the depth image, and finally, the first pixel point and the second pixel point are The pixels are determined as a pair of pixels.
例如,对于彩色图像对应的归一化人脸图像中像素点D1和深度图像对应的归一化人脸图像中的像素点D2,如图4所示,像素点D1和像素点D2对应待检测目标的同一成像位置,即像素点D1在彩色图像对应的归一化人脸图像中的像素位置与像素点D2在深度图像对应的归一化人脸图像中的像素位置相同,则当且仅当像素点D1和像素点D2满足以下两个条件时,像素点D1和像素点D2才可以作为可信像素点:第一个条件,像素点D1的像素值属于肤色模型所定义的肤色范围;第二个条件,像素点D2的像素值满足预先定义的有效深度值条件。其中,预先定义的有效深度值条件可以为像素值不等于255。由于结构光摄像头自身的缺陷,在采集深度信息时,有些像素点无法获取深度信息,在数据中可能表现为NaN或255,映射到深度图像中之后对应深度图像中最亮的白色。如果深度图像中像素点的像素值不为白色,则认为深度值就是有效的,即该像素点为可信像素点。For example, for the pixel point D1 in the normalized face image corresponding to the color image and the pixel point D2 in the normalized face image corresponding to the depth image, as shown in FIG. 4, the pixel point D1 and the pixel point D2 correspond to to be detected The same imaging position of the target, that is, the pixel position of pixel point D1 in the normalized face image corresponding to the color image and the pixel position of pixel point D2 in the normalized face image corresponding to the depth image, if and only Pixels D1 and D2 can be regarded as trusted pixels when the following two conditions are met: First, the pixel value of pixel D1 belongs to the skin color range defined by the skin color model; The second condition, the pixel value of the pixel point D2 satisfies a pre-defined effective depth value condition. The predefined effective depth value condition may be that the pixel value is not equal to 255. Due to the defects of the structured light camera, when collecting depth information, some pixels cannot obtain depth information, which may appear as NaN or 255 in the data, and after mapping to the depth image, it corresponds to the brightest white in the depth image. If the pixel value of a pixel in the depth image is not white, the depth value is considered valid, that is, the pixel is a trusted pixel.
子步骤S2,确定彩色图像对应的归一化人脸图像的灰度化人脸图像。Sub-step S2, determining a grayscale face image of the normalized face image corresponding to the color image.
具体实施时,可以通过对彩色图像对应的归一化人脸图像进行灰度化处理,以得到彩色图像对应的归一化人脸图像的灰度化人脸图像。也可以在获取到上述彩色图像之后,首先对获得的彩色图像进行灰度化处理,然后,通过椭圆形模板对灰度化处理后的彩色图像进行人脸区域图 像提取和归一化处理,得到彩色图像对应的归一化人脸图像的灰度化人脸图像。In specific implementation, the normalized face image corresponding to the color image may be subjected to graying processing to obtain the grayed face image of the normalized face image corresponding to the color image. Alternatively, after obtaining the above-mentioned color image, first perform grayscale processing on the obtained color image, and then perform face area image extraction and normalization processing on the grayscale processed color image through an ellipse template to obtain A normalized face image corresponding to a color image.
子步骤S3,基于彩色图像对应的归一化人脸图像中的可信像素点,确定灰度化人脸图像的第一灰度直方图。Sub-step S3: determining a first gray-scale histogram of the gray-scaled face image based on the trusted pixel points in the normalized face image corresponding to the color image.
由于深度图像受光照影响较小,因此,在结合深度图像进行相关性分析的情况下,可以在彩色图像中提取简单的纹理信息信息,本发明具体实施时,可以提取彩色人脸图像的灰度直方图,用于相关性分析,以提升计算效率,并且通用性较强。Because the depth image is less affected by light, in the case of correlation analysis in combination with the depth image, simple texture information can be extracted from the color image. When the present invention is specifically implemented, the grayscale of the color face image can be extracted Histograms are used for correlation analysis to improve computing efficiency and are highly versatile.
具体实施时,提取彩色人脸图像的灰度直方图时,仅统计所述彩色图像对应的归一化人脸图像中的可信像素点的灰度分布,以得到所述灰度化人脸图像的第一灰度直方图。本实施例中,由灰度化后的彩色图像对应的归一化人脸图像生成的直方图记作C iIn specific implementation, when extracting a gray histogram of a color face image, only the gray distribution of trusted pixels in the normalized face image corresponding to the color image is counted to obtain the gray face. The first grayscale histogram of the image. In this embodiment, the histogram generated from the normalized face image corresponding to the grayscaled color image is denoted as C i .
子步骤S4,基于深度图像对应的归一化人脸图像中的可信像素点,确定深度图像的第二灰度直方图。Sub-step S4: Determine a second gray histogram of the depth image based on the trusted pixel points in the normalized face image corresponding to the depth image.
具体实施时,为了提升相关性分析的准确性,本发明实施例中,基于可信像素点进行相关性分析。因此,首先确定深度图像对应的归一化人脸图像中的可信像素点。其中,上述深度图像对应的归一化人脸图像中的可信像素点为像素值满足预先定义的有效深度值条件。有效深度值条件的定义方法参见前面段落中的描述。然后,基于深度图像对应的归一化人脸图像中的可信像素点,确定上述深度图像的第二灰度直方图。本实施例中,由深度图像生成的直方图记作D iIn specific implementation, in order to improve the accuracy of the correlation analysis, in the embodiment of the present invention, the correlation analysis is performed based on the trusted pixels. Therefore, first, the trusted pixel points in the normalized face image corresponding to the depth image are determined. Wherein, the trusted pixel points in the normalized face image corresponding to the depth image are that the pixel value satisfies a pre-defined effective depth value condition. For the definition method of the effective depth value condition, refer to the description in the previous paragraph. Then, based on the trusted pixel points in the normalized face image corresponding to the depth image, a second gray histogram of the depth image is determined. In this embodiment, the histogram generated from the depth image is referred to as D i .
子步骤S5,通过对第一灰度直方图和第二灰度直方图进行相关性分析,确定彩色图像和深度图像的关联性特征。In sub-step S5, a correlation analysis is performed on the first gray histogram and the second gray histogram to determine the correlation characteristics of the color image and the depth image.
在本发明的一些实施例中,可以采用典型相关分析(canonical correlation analysis,CCA)对第一灰度直方图C i和所述第二灰度直方图D i进行相关性分析。首先,定义第一灰度直方图C i的投影方向
Figure PCTCN2018119758-appb-000001
和第二灰度直方图D i的投影方向
Figure PCTCN2018119758-appb-000002
然后,以最大化两个投影向量
Figure PCTCN2018119758-appb-000003
Figure PCTCN2018119758-appb-000004
的相关系数ρ i为目标,求解最优投影方向
Figure PCTCN2018119758-appb-000005
Figure PCTCN2018119758-appb-000006
其中,相关系数ρ i通过如下函数表示:
In some embodiments of the present invention, the canonical correlation analysis (canonical correlation analysis, CCA) may be employed for the first histogram and the second C i D i histogram correlation analysis. First, define the projection direction of the first gray histogram C i
Figure PCTCN2018119758-appb-000001
And a projection direction of the second histogram of D i
Figure PCTCN2018119758-appb-000002
Then to maximize the two projection vectors
Figure PCTCN2018119758-appb-000003
with
Figure PCTCN2018119758-appb-000004
The correlation coefficient ρ i as the target, and solve the optimal projection direction
Figure PCTCN2018119758-appb-000005
with
Figure PCTCN2018119758-appb-000006
The correlation coefficient ρ i is expressed by the following function:
Figure PCTCN2018119758-appb-000007
Figure PCTCN2018119758-appb-000007
上述函数中,角标T是向量的转置,E[g]表示g的期望。In the above function, the subscript T is the transpose of the vector, and E [g] represents the expectation of g.
为了进一步化简这个等式,具体实施时,引入了类内协方差矩阵C CC和C DD,以及类间协方差矩阵C CD和C DC,由于所有特征向量均在较小的子区域图片上提取,通过针对类内协方差矩阵引入了正则化参数λ以避免产生过拟合等情况,上述目标函数优化后可以改写为: In order to further simplify this equation, the intra-class covariance matrices C CC and C DD and the inter-class covariance matrices C CD and C DC are introduced during implementation. Since all feature vectors are on smaller subregion pictures Extraction, by introducing a regularization parameter λ for the intra-class covariance matrix to avoid situations such as overfitting, the above objective function can be rewritten as:
Figure PCTCN2018119758-appb-000008
Figure PCTCN2018119758-appb-000008
上述优化后的目标函数可以由带有正则项的典型相关算法(Regularized Canonical Correlation Analysis)求解,具体求解过程参见现有技术,本发明实施例中不再赘述。The above-mentioned optimized objective function can be solved by a typical correlation algorithm (Regularized Canonical Correlation Analysis) with a regular term. For a specific solution process, refer to the prior art, which will not be described in detail in the embodiment of the present invention.
通过求解上述优化后的目标函数,可以得到两个最优投影方向
Figure PCTCN2018119758-appb-000009
Figure PCTCN2018119758-appb-000010
进一步的,可以确定所述第一灰度直方图在投影方向
Figure PCTCN2018119758-appb-000011
的特征向量和所述第二灰度直方图在投影方向
Figure PCTCN2018119758-appb-000012
的特征向量。
By solving the above optimized objective function, two optimal projection directions can be obtained
Figure PCTCN2018119758-appb-000009
with
Figure PCTCN2018119758-appb-000010
Further, the projection direction of the first gray histogram may be determined.
Figure PCTCN2018119758-appb-000011
Feature vector and the second gray histogram in the projection direction
Figure PCTCN2018119758-appb-000012
Feature vector.
然后,根据所述第一灰度直方图和所述第二灰度直方图在各自的最优投影方向上的特征向量,构建所述彩色图像和所述深度图像的关联性特征。Then, according to feature vectors of the first grayscale histogram and the second grayscale histogram in respective optimal projection directions, an association feature of the color image and the depth image is constructed.
例如,将所述第一灰度直方图在投影方向
Figure PCTCN2018119758-appb-000013
的特征向量和所述第二灰度直方图在投影方向
Figure PCTCN2018119758-appb-000014
的特征向量串联,将串联后得到的特征向量作为所述彩色图像和所述深度图像的关联性特征。
For example, placing the first gray histogram in a projection direction
Figure PCTCN2018119758-appb-000013
Feature vector and the second gray histogram in the projection direction
Figure PCTCN2018119758-appb-000014
The feature vectors of are connected in series, and the feature vectors obtained after the series are used as the correlation features of the color image and the depth image.
进一步的,所述通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征,包括:将所述深度图像对应的归一化人脸图像划分为N*M个子区域,其中,N和M分别为大于等于3的整数;根据所述深度图像的每个所述子区域中像素值满足预先定义的有效深度值条件的像素点,确定每个所述子区域的直方图;通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征。Further, by performing a depth consistency analysis on a normalized face image corresponding to the depth image, determining a depth consistency feature of the depth image includes: normalizing a face corresponding to the depth image The image is divided into N * M sub-regions, where N and M are integers greater than or equal to 3, and determined according to the pixel points in each of the sub-regions of the depth image whose pixel values meet a pre-defined effective depth value condition. A histogram of each of the sub-regions; by calculating the cross-entropy or divergence of any two of the histograms, a depth consistency feature of the depth image is determined.
优选的,将所述深度图像对应的归一化人脸图像均匀划分为N*M个子区域,其中,N等于M。Preferably, the normalized face image corresponding to the depth image is uniformly divided into N * M sub-regions, where N is equal to M.
在实际活体检测过程中,申请人发现,仅从非精确的深度信息角度考量,照片、屏幕和面具等伪造人脸与真实人脸也有一些不同之处:屏幕伪造人脸图像显示在不可弯曲或折叠的显示屏上,具有相当明显的平面特性;照片伪造人脸图像尽管可以被旋转、弯曲或折叠,往往也会保持较为规则的深度模式,例如类似圆柱的弯曲表面或渐变的深度信息;面具伪造人脸图像尽管可以达到相对真实的深度效果,但是面具较难模仿某些深度变化非常复杂的特殊区域,如鼻翼、鼻唇沟等。因此,本发明的一些实施例中,将深度图像对应的归一化人脸图像沿水平和竖直方向平均划分成3*3个子区域,如图5所示。并按照从左往右、从上往下的顺序将这些区域分别记作p 1,p 2,...,p 9In the actual living body detection process, the applicant found that only considering from the perspective of inaccurate depth information, fake faces such as photos, screens, and masks also have some differences from real faces: screen fake face images are displayed in an inflexible or The folded display has quite obvious flat characteristics. Although the photo-forged face image can be rotated, bent, or folded, it often maintains a more regular depth mode, such as a curved surface similar to a cylinder or gradient depth information; a mask. Although fake face images can achieve a relatively realistic depth effect, it is difficult for the mask to imitate some special areas with very complicated depth changes, such as the nose wings, nasolabial folds, etc. Therefore, in some embodiments of the present invention, the normalized face image corresponding to the depth image is equally divided into 3 * 3 sub-regions along the horizontal and vertical directions, as shown in FIG. 5. And in the order from left to right and from top to bottom, these regions are denoted as p 1 , p 2 , ..., p 9, respectively .
然后,在深度图像对应的归一化人脸图像的每一个子区域p i中,进一步统计具有有效深度信息的像素点,即可信像素点,并使用直方图h i以大致度量该子区域的深度分布情况,可以有效的从空间信息维度进行活体进测。 Then, the normalized face image p i each subregion depth image corresponding to the further statistical having an effective pixel depth information, the pixels to the letter, and histogram h i of the sub-region to measure substantially The depth distribution can be used to conduct live test from the spatial information dimension.
在本发明的一些实施例中,可以通过子区域之间的散度度量子区域的深度分布情况。具体实施时,散度可以通过如下公式计算:In some embodiments of the present invention, the depth distribution of the sub-regions can be measured by the divergence between the sub-regions. In specific implementation, the divergence can be calculated by the following formula:
Figure PCTCN2018119758-appb-000015
其中,h i(k)指的是在直方图h i中第k个元素,h j(k)指的是在直方图h j中第k个元素。
Figure PCTCN2018119758-appb-000015
Wherein, h i (k) refers to the histogram h i k-th element, h j (k) refers to the histogram h j k-th element.
在本发明的一些优选实施例中,通过子区域之间的交叉熵度量子区域的深度分布情况。具体实施时,对于任意给定两个子区域对应的直方图h i和h j(1≤i≤9,1≤j≤9,i<j),采用交叉熵来衡量它们之间的深度分布一致性,直方图h i和h j的交叉熵计算方式为: In some preferred embodiments of the present invention, the depth distribution of a sub-region is measured by the cross-entropy between the sub-regions. In specific implementation, for any given two subregions corresponding to the histograms h i and h j (1≤i≤9, 1≤j≤9, i <j), the cross-entropy is used to measure the consistency of the depth distribution between them. The cross entropy of the histograms h i and h j is calculated as:
Figure PCTCN2018119758-appb-000016
Figure PCTCN2018119758-appb-000016
其中,
Figure PCTCN2018119758-appb-000017
H(h i)是直方图h i的信息熵, D KL(h i||h j)是从h i到h j的KL散度,即h i相对于h j的相对熵。交叉熵的数值H(h i,h j)在信息论的角度可以理解为,当基于概率分布h j进行编码时,最终标识事件分布h i所需要的平均比特数。在具体的活体检测流程中,如果h i和h j对应的两个区域间具有相似的深度分布情况,例如它们来自弯折照片中折痕的同侧,或者属于同一深度的屏幕或面具时,该交叉熵的数值会相对较小;而对于真实人脸而言,由于人脸区域复杂的深度变化与遮挡情况,不同子区域间的交叉熵可能相对较大,因此,通过子区域间的交叉熵可以表示真实人脸或攻击人脸的特征。
among them,
Figure PCTCN2018119758-appb-000017
H (h i) is the entropy of the histogram h i, D KL (h i || h j) from KL divergence to h i h j, i.e., h i h j with respect to the relative entropy. The value of cross-entropy H (h i , h j ) can be understood from the perspective of information theory as the average number of bits required to finally identify the event distribution h i when coding is performed based on the probability distribution h j . In the specific living body detection process, if the two regions corresponding to hi and h j have similar depth distributions, for example, they come from the same side of a crease in a bent photo, or belong to the screen or mask of the same depth, The value of this cross entropy will be relatively small; for real faces, due to the complex depth changes and occlusions in the face region, the cross entropy between different subregions may be relatively large. Therefore, the cross Entropy can represent features of real or attacking faces.
本实施例中,将深度图像对应的归一化人脸图像按照一定顺序分为九个子区域之后,共可以得到
Figure PCTCN2018119758-appb-000018
个交叉熵数值,最终将这些数值串联起来,作为深度图像对应的的深度一致性特征。
In this embodiment, after the normalized face image corresponding to the depth image is divided into nine sub-regions in a certain order, a total of
Figure PCTCN2018119758-appb-000018
Cross-entropy values, and finally concatenating these values as the depth consistency feature corresponding to the depth image.
具体实施时,根据数据集中的人脸图像大小确定N的取值,例如N还可以取值为5或7等奇数。鉴于三乘三网格独特的对称特性,即无论对于旋转的屏幕、沿水平竖直或对角线方向弯折的照片、深度细节较弱的面具等攻击媒介,在三乘三网格中很可能有一些子区域拥有相似的深度特性,优选的,N取值为3。In specific implementation, the value of N is determined according to the size of the face image in the data set. For example, N may also be set to an odd number such as 5 or 7. In view of the unique symmetrical characteristics of the three-by-three grid, that is, for three-by-three grids, such as attack screens such as rotating screens, photos that are bent horizontally or vertically, and masks with weak depth and detail, There may be some sub-regions with similar depth characteristics. Preferably, N is set to 3.
具体实施时,获取关联性特征和获取深度一致性特征的顺序可以调换,并不影响解决本发明的技术问题和达到同样的技术效果。In specific implementation, the order of obtaining correlation features and obtaining depth consistency features can be reversed, which does not affect solving the technical problem of the present invention and achieving the same technical effect.
步骤14,根据关联性特征和深度一致性特征,对待检测目标进行人脸活体检测。Step 14: Perform face live detection on the target to be detected according to the correlation feature and the depth consistency feature.
在本发明的一些实施例中,可以将关联性特征和深度一致性特征直接组合为待识别特征,并输入至预先训练的识别模型,以检测待检测目标是否为攻击人脸。In some embodiments of the present invention, the correlation feature and the depth consistency feature can be directly combined into features to be identified, and input to a pre-trained recognition model to detect whether the target to be detected is an attacking face.
在本发明的另一些优选实施例中,所述根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测,包括:通过第一核函数对所述关联性特征进行分类识别,确定第一识别结果,以及,通过第二核函数对所述深度一致性特征进行分类识别,确定第二识别结 果;通过对所述第一识别结果和所述第二识别结果进行加权融合,确定对所述待检测目标进行人脸活体检测的结果。In some other preferred embodiments of the present invention, the performing a face live detection on the target to be detected according to the correlation feature and the depth consistency feature includes: associating the association with a first kernel function Classify and identify sexual characteristics, determine a first recognition result, and classify and identify the deep consistency feature through a second kernel function to determine a second recognition result; and determine the first recognition result and the second recognition by using a second kernel function Results are subjected to weighted fusion to determine a result of performing face live detection on the target to be detected.
前述通过色彩特征和空间特征的投影方向向量构建的彩色图像与深度图像的关联性特征,和通过交叉熵构建的深度一致性特征,在物理含义与数学量纲等各方面均有很大不同,可能并不适合使用统一的分类器进行活体判别。The aforementioned correlation features between the color image and the depth image constructed by the projection direction vector of the color feature and the spatial feature, and the depth consistency feature constructed by the cross-entropy are very different in terms of physical meaning and mathematical dimensions. It may not be appropriate to use a unified classifier for live discrimination.
因此,针对已提取特征的不同特点,本发明的一些实施例中使用两个带有不同核函数的分类器分别进行活体检测,然后再对不同分类器的检测结果进行融合。Therefore, according to different features of the extracted features, in some embodiments of the present invention, two classifiers with different kernel functions are used to perform live detection respectively, and then the detection results of different classifiers are fused.
例如,对于根据投影方向向量构建的关联性特征,选用带有径向基核函数的支持向量机进行分类识别,确定第一识别结果;而对于根据交叉熵构建的深度一致性特征,选用带有卡方核函数的支持向量机进行分类识别,确定第二识别结果。最终分类器在得分层面进行加权融合,各个分类器的对应权值由验证过程确定,并且二者权值之和为1。例如,对于第一识别结果和第二识别结果进行加权融合,然后,基于融合结果进行分类识别,确定所述待检测目标是否为真实人脸。其中,第一识别结果和第二识别结果的融合权值根据上测试结果确定。For example, for the correlation features constructed based on the projection direction vector, a support vector machine with a radial basis kernel function is used for classification and recognition to determine the first recognition result; and for the depth consistency features constructed based on cross entropy, The support vector machine of the chi-square kernel function performs classification recognition and determines a second recognition result. The final classifier performs weighted fusion at the scoring level, and the corresponding weights of each classifier are determined by the verification process, and the sum of the two weights is 1. For example, weighted fusion is performed on the first recognition result and the second recognition result, and then classification recognition is performed based on the fusion result to determine whether the target to be detected is a real face. The fusion weight of the first recognition result and the second recognition result is determined according to the above test result.
本发明实施例公开的人脸活体检测方法,通过获取待检测目标的彩色图像和深度图像;分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;通过对所述彩色图像的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征;以及,通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;根据所述关联性特征和所述深度特征,对所述待检测目标进行人脸活体检测,解决了现有技术中存在的人脸活体检测效率低下和准确率低的问题。本发明实施例公开的人脸活体检测方法需要的彩色图像和深度图像可以同时采集,因此减少了图像采集时间,提升了人脸活体检测效率,同时,由于色彩信息中蕴含着丰富的纹理信息,通过结合待检测目标的图像中色彩信息和空间信息,对所述待检测目标进行人脸活体检测,由于利用了互补特征,信息更全面,因此有助于提升活体检测的准确性。The face live body detection method disclosed in the embodiment of the present invention obtains a color image and a depth image of a target to be detected; determines a normalized face image corresponding to the color image and the depth image, respectively; Performing a correlation analysis on the normalized face image corresponding to the normalized face image and the depth image to determine the correlation feature of the color image and the depth image; and Normalize the face image to perform a depth consistency analysis to determine the depth consistency characteristics of the depth image. Based on the correlation characteristics and the depth characteristics, perform face live detection on the object to be detected, which solves the current problem. There are problems with low efficiency and accuracy of face live body detection in the technology. The color image and depth image required by the face live detection method disclosed in the embodiment of the present invention can be acquired at the same time, thereby reducing the image acquisition time, improving the face live detection efficiency, and because the color information contains rich texture information, By combining the color information and spatial information in the image of the target to be detected, the living body detection of the target to be detected is carried out. Since the complementary features are used, the information is more comprehensive, which helps to improve the accuracy of the living body detection.
实施例二:Embodiment two:
相应的,本发明还公开了一种人脸活体检测装置,如图6所示,上述人脸活体检测装置包括:Correspondingly, the present invention also discloses a face live detection device. As shown in FIG. 6, the above-mentioned face live detection device includes:
图像获取模块610,用于获取待检测目标的彩色图像和深度图像;An image acquisition module 610, configured to acquire a color image and a depth image of a target to be detected;
归一化模块620,用于分别确定彩色图像和深度图像对应的归一化人脸图像;A normalization module 620, configured to determine normalized face images corresponding to the color image and the depth image, respectively;
第一特征确定模块630,用于通过对彩色图像的归一化人脸图像和深度图像对应的归一化人脸图像进行相关性分析,确定彩色图像和深度图像的关联性特征;以及,A first feature determination module 630, configured to determine a correlation feature between the color image and the depth image by performing correlation analysis on the normalized face image corresponding to the normalized face image and the depth image of the color image; and,
第二特征确定模块640,用于通过对深度图像对应的归一化人脸图像进行深度一致性分析,确定深度图像的深度一致性特征;A second feature determination module 640, configured to determine a depth consistency feature of the depth image by performing a depth consistency analysis on the normalized face image corresponding to the depth image;
活体检测模块650,用于根据第一特征确定模块630确定的关联性特征和第二特征确定模块640确定的深度一致性特征,对待检测目标进行人脸活体检测。The living body detection module 650 is configured to perform face living body detection on the target to be detected according to the correlation features determined by the first feature determination module 630 and the depth consistency features determined by the second feature determination module 640.
可选的,通过对彩色图像的归一化人脸图像和深度图像对应的归一化人脸图像进行相关性分析,确定彩色图像和深度图像的关联性特征时,第一特征确定模块630用于:Optionally, by performing correlation analysis on the normalized face image corresponding to the normalized face image and the depth image of the color image to determine the correlation feature between the color image and the depth image, the first feature determination module 630 uses to:
通过肤色模型对彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像进行去噪处理,分别确定彩色图像对应的归一化人脸图像中的可信像素点和深度图像对应的归一化人脸图像中的可信像素点;Denoise the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image through the skin color model to determine the trusted pixel points and depth in the normalized face image corresponding to the color image. Trusted pixels in the normalized face image corresponding to the image;
确定彩色图像对应的归一化人脸图像的灰度化人脸图像;Determining a grayscale face image of a normalized face image corresponding to a color image;
基于彩色图像对应的归一化人脸图像中的可信像素点,确定灰度化人脸图像的第一灰度直方图;以及,基于深度图像对应的归一化人脸图像中的可信像素点,确定深度图像的第二灰度直方图;Determine the first gray histogram of the grayed face image based on the trusted pixels in the normalized face image corresponding to the color image; and, based on the trusted pixels in the normalized face image corresponding to the depth image Pixels, determine the second gray histogram of the depth image;
通过对第一灰度直方图和第二灰度直方图进行相关性分析,确定彩色图像和深度图像的关联性特征。The correlation characteristics of the color image and the depth image are determined by performing correlation analysis on the first gray histogram and the second gray histogram.
大多数人脸伪造攻击均使用照片或屏幕作为攻击媒介,尽管伪造人脸的彩色图像纹理信息与真实人脸较为接近,但深度图像与真实用户深度图有较明显的差异,因此,可以通过探索人脸区域的彩色图像和深度图像之间的关联特性以获取有效的活体检测线索。Most face forgery attacks use photos or screens as the attack vector. Although the color image texture information of the forged face is close to the real face, the depth image is significantly different from the real user depth map. Correlation characteristics between the color image and depth image of the human face area to obtain effective live detection clues.
可选的,通过肤色模型对彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像进行去噪处理,分别确定彩色图像对应的归一化人脸图像中的可信像素点和深度图像对应的归一化人脸图像中的可信像素点时,第一特征确定模块630用于:Optionally, the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the credibility in the normalized face image corresponding to the color image. When the trusted pixels in the normalized face image corresponding to the pixels and the depth image are normalized, the first feature determination module 630 is configured to:
将彩色图像和深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点;Determine each pair of pixel points with the same pixel coordinates in the normalized face image corresponding to the color image and the depth image as a pair of pixel points;
针对每一对像素点,确定其中彩色图像所对应的像素点的像素值属于肤色模型所定义的肤色范围,且其中深度图像所对应的像素点的像素值满足预设有效深度值条件时,将该对像素点中每个像素点分别标记为可信像素点。For each pair of pixels, it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image meets the preset effective depth value condition, the Each pixel in the pair of pixels is labeled as a trusted pixel.
可选的,通过对深度图像对应的归一化人脸图像进行深度一致性分析,确定深度图像的深度一致性特征时,第二特征确定模块640用于:Optionally, when depth consistency analysis is performed on the normalized face image corresponding to the depth image to determine the depth consistency feature of the depth image, the second feature determination module 640 is configured to:
将深度图像对应的归一化人脸图像划分为N*M个子区域,其中,N和M分别为大于等于3的整数;Divide the normalized face image corresponding to the depth image into N * M sub-regions, where N and M are integers greater than or equal to 3;
根据深度图像的每个子区域中像素值满足预先定义的有效深度值条件的像素点,确定每个子区域的直方图;Determine the histogram of each sub-region based on the pixel points in each sub-region of the depth image that satisfy the pre-defined effective depth value condition;
通过计算任意两个上述直方图的交叉熵或散度,确定深度图像的深度一致性特征。By calculating the cross entropy or divergence of any two of the above histograms, the depth consistency characteristics of the depth image are determined.
屏幕伪造人脸图像显示在不可弯曲或折叠的显示屏上,具有相当明显的平面特性;照片伪造人脸图像尽管可以被旋转、弯曲或折叠,往往也会保持较为规则的深度模式,例如类似圆柱的弯曲表面或渐变的深度信息;面具伪造人脸图像尽管可以达到相对真实的深度效果,但是面具较难模仿某些深度变化非常复杂的特殊区域,如鼻翼、鼻唇沟等。Screen fake face images are displayed on a non-bendable or foldable display screen, which has fairly obvious flat characteristics; although photo fake face images can be rotated, bent, or folded, they often maintain a more regular depth mode, such as a cylinder Curved surface or gradient depth information; although the fake face image of the mask can achieve a relatively real depth effect, it is difficult for the mask to imitate some special areas with very complicated depth changes, such as the nose wings, nasolabial folds, etc.
本发明的一些实施例中,将深度图像对应的归一化人脸图像沿水平和竖直方向平均划分成3*3个子区域,如图5所示。并按照从左往右、从上往下的顺序将这些区域分别记作p 1,p 2,...,p 9。然后,在深度图像对应的归一化人脸图像的每一个子区域p i中,进一步统计具有有效深度信息的像素点,即可信像素点,并使用直方图h i以大致度量该子区域的深度分布情况,可以有效的从空间信息维度进行活体进测。 In some embodiments of the present invention, the normalized face image corresponding to the depth image is equally divided into 3 * 3 sub-regions in the horizontal and vertical directions, as shown in FIG. 5. And in the order from left to right and from top to bottom, these regions are denoted as p 1 , p 2 , ..., p 9, respectively . Then, the normalized face image p i each subregion depth image corresponding to the further statistical having an effective pixel depth information, the pixels to the letter, and histogram h i of the sub-region to measure substantially The depth distribution can be used to conduct live test from the spatial information dimension.
在归一化人脸图像中,不仅彩色图像中存在非皮肤像素点的干扰, 结构光深度摄像头受自身成像原理限制,捕捉到的深度图像中也可能存在一定的缺陷或盲区,即一些像素点对应的深度信息无法通过结构光顺利恢复出来,在深度图像中形成了一些深度值不存在的像素点。在进行后续的分析之前,需要排除这些非皮肤像素点和深度值不存在的像素点的干扰,可以提高彩色图像与深度图像相关性分析的可靠性与稳定性。In the normalized face image, not only the interference of non-skin pixels in the color image, but the structured light depth camera is limited by its own imaging principle. There may also be some defects or blind spots in the captured depth image, that is, some pixels Corresponding depth information cannot be recovered smoothly through structured light, and some pixels in which depth values do not exist are formed in the depth image. Before the subsequent analysis, it is necessary to eliminate the interference between these non-skin pixels and pixels that have no depth value, which can improve the reliability and stability of the correlation analysis between the color image and the depth image.
可选的,根据第一特征确定模块630确定的关联性特征和所述第二特征确定模块640确定的深度一致性特征,对待检测目标进行人脸活体检测时,活体检测模块650用于:Optionally, according to the correlation feature determined by the first feature determination module 630 and the depth consistency feature determined by the second feature determination module 640, when performing face live detection on the target to be detected, the live detection module 650 is configured to:
通过第一核函数对上述关联性特征进行分类识别,确定第一识别结果,以及,通过第二核函数对深度一致性特征进行分类识别,确定第二识别结果;Classify and identify the above-mentioned correlation feature through a first kernel function, determine a first recognition result, and classify and recognize a depth consistency feature through a second kernel function, and determine a second recognition result;
通过对上述第一识别结果和上述第二识别结果进行加权融合,确定对该待检测目标进行人脸活体检测的结果。By performing weighted fusion on the first recognition result and the second recognition result, a result of performing face live detection on the target to be detected is determined.
可选的,分别确定彩色图像和深度图像对应的归一化人脸图像时,归一化模块620用于:Optionally, when a normalized face image corresponding to the color image and the depth image is determined, the normalization module 620 is configured to:
通过椭圆形模板分别提取所述彩色图像和所述深度图像中人脸区域图像;Extracting a face region image in the color image and the depth image respectively through an oval template;
分别对上述彩色图像中的人脸区域图像和上述深度图像中的人脸区域图像进行归一化处理,得到彩色图像对应的归一化人脸图像和深度图像对应的归一化人脸图像。Normalize the face area image in the color image and the face area image in the depth image, respectively, to obtain a normalized face image corresponding to the color image and a normalized face image corresponding to the depth image.
可选的,上述装置还包括:Optionally, the above device further includes:
像素对齐模块(图中未示出),用于对所述彩色图像和所述深度图像进行像素对齐。A pixel alignment module (not shown in the figure) is configured to perform pixel alignment on the color image and the depth image.
本发明实施例公开的人脸活体检测装置,通过获取待检测目标的彩色图像和深度图像;分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;通过对所述彩色图像的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征;以及,通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;根据所述关联性特征和所述深度特征,对所述待检测目标进行人脸活体检测,解决 了现有技术中存在的人脸活体检测效率低下和准确率低的问题。本发明实施例公开的人脸活体检测装置需要的彩色图像和深度图像可以同时采集,因此减少了图像采集时间,提升了人脸活体检测效率,同时,由于色彩信息中蕴含着丰富的纹理信息,通过结合待检测目标的图像中色彩信息和空间信息,对所述待检测目标进行人脸活体检测,由于利用了互补特征,信息更全面,因此有助于提升活体检测的准确性。The human face living body detection device disclosed in the embodiment of the present invention obtains a color image and a depth image of a target to be detected; determines a normalized face image corresponding to the color image and the depth image, respectively; Performing a correlation analysis on the normalized face image corresponding to the normalized face image and the depth image to determine the correlation feature of the color image and the depth image; and Normalize the face image to perform a depth consistency analysis to determine the depth consistency characteristics of the depth image. Based on the correlation characteristics and the depth characteristics, perform face live detection on the object to be detected, which solves the current problem. There are problems with low efficiency and accuracy of face live body detection in the technology. The color image and depth image required by the face living body detection device disclosed in the embodiment of the present invention can be collected simultaneously, thereby reducing the image acquisition time, improving the face living body detection efficiency, and because the color information contains rich texture information, By combining the color information and spatial information in the image of the target to be detected, the living body detection of the target to be detected is carried out. Since the complementary features are used, the information is more comprehensive, which helps to improve the accuracy of the living body detection.
相应的,本发明实施例还公开了一种电子设备,所述电子设备,包括存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例一所述的人脸活体检测方法。所述电子设备可以为手机、PAD、平板电脑、人脸识别机等。Accordingly, an embodiment of the present invention also discloses an electronic device. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the processor. The computer program implements the face live body detection method according to the first embodiment of the present invention. The electronic device may be a mobile phone, a PAD, a tablet computer, a face recognition machine, or the like.
相应的,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本发明实施例一所述的人脸活体检测方法的步骤。Correspondingly, an embodiment of the present invention further provides a computer-readable storage medium having stored thereon a computer program, which is executed by a processor to implement the steps of the face live body detection method according to the first embodiment of the present invention.
本发明的装置实施例与方法相对应,装置实施例中各模块和各单元的具体实现方式参见方法是实施例,此处不再赘述。The device embodiment of the present invention corresponds to a method. For specific implementation manners of each module and unit in the device embodiment, refer to the method is an embodiment, and details are not described herein again.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art may realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
本领域普通技术人员可以理解,在本发明所提供的实施例中,所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。Those of ordinary skill in the art can understand that, in the embodiments provided by the present invention, the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple Network unit. In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在 一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。When the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for making a computer device (which can be a personal computer, a server, or a network). Equipment, etc.) perform all or part of the steps of the method described in each embodiment of the present invention. The foregoing storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The foregoing is only a specific implementation of the present invention, but the scope of protection of the present invention is not limited to this. Those of ordinary skill in the art can realize that the units and algorithms of each example described in combination with the embodiments disclosed herein The steps can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

Claims (26)

  1. 一种人脸活体检测方法,其特征在于,包括:A face live body detection method, characterized in that it includes:
    获取待检测目标的彩色图像和深度图像;Obtaining color and depth images of the target to be detected;
    分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;Respectively determining a normalized face image corresponding to the color image and the depth image;
    通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征;以及,Determining correlation characteristics between the color image and the depth image by performing correlation analysis on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image; and,
    通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;Determining a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image;
    根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测。Performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature.
  2. 根据权利要求1所述的方法,其特征在于,所述通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征的步骤,包括:The method according to claim 1, wherein the determining is performed by performing correlation analysis on a normalized face image corresponding to the color image and a normalized face image corresponding to the depth image, The step of associating features between the color image and the depth image includes:
    通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点;Denoise processing is performed on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image by using a skin color model, and to determine the values in the normalized face image corresponding to the color image. A trusted pixel point and a trusted pixel point in a normalized face image corresponding to the depth image;
    确定所述彩色图像对应的归一化人脸图像的灰度化人脸图像;Determining a grayscale face image of a normalized face image corresponding to the color image;
    基于所述彩色图像对应的归一化人脸图像中的可信像素点,确定所述灰度化人脸图像的第一灰度直方图;以及,基于所述深度图像对应的归一化人脸图像中的可信像素点,确定所述深度图像的第二灰度直方图;Determining a first gray histogram of the grayed face image based on trusted pixels in the normalized face image corresponding to the color image; and based on the normalized person corresponding to the depth image A trusted pixel in a face image to determine a second grayscale histogram of the depth image;
    通过对所述第一灰度直方图和所述第二灰度直方图进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征。A correlation feature of the color image and the depth image is determined by performing correlation analysis on the first gray histogram and the second gray histogram.
  3. 根据权利要求2所述的方法,其特征在于,所述通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点的步骤, 包括:The method according to claim 2, wherein the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model, respectively, The step of determining a trusted pixel point in the normalized face image corresponding to the color image and a trusted pixel point in the normalized face image corresponding to the depth image includes:
    将所述彩色图像和所述深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点;Determining every two pixel points with the same pixel coordinates in the normalized face image corresponding to the color image and the depth image as a pair of pixel points;
    针对每一对像素点,确定其中彩色图像所对应的像素点的像素值属于所述肤色模型所定义的肤色范围,且其中深度图像所对应的像素点的像素值满足预设有效深度值条件时,将该对像素点中每个像素点分别标记为可信像素点。For each pair of pixels, it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image meets the preset effective depth value condition , Each pixel in the pair of pixels is marked as a trusted pixel.
  4. 根据权利要求2所述的方法,其特征在于,所述通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点的步骤,还包括:The method according to claim 2, wherein the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model, respectively, The step of determining the trusted pixels in the normalized face image corresponding to the color image and the trusted pixels in the normalized face image corresponding to the depth image further includes:
    采用预先定义的肤色模型来虑除会产生干扰的非皮肤像素点,所述肤色模型通过YCbCr色彩空间,对肤色在光照无关的色度平面内进行聚类,使得所述肤色模型适用于不同光照和不同肤色的多种环境。A pre-defined skin color model is used to consider non-skin pixels that may cause interference. The skin color model uses YCbCr color space to cluster skin colors in a light-independent chromaticity plane, so that the skin color model is suitable for different lights. And a variety of different skin tones.
  5. 根据权利要求3所述的方法,其特征在于,所述确定彩色图像对应的归一化人脸图像的灰度化人脸图像的步骤,包括:The method according to claim 3, wherein the step of determining a grayscale face image of a normalized face image corresponding to a color image comprises:
    通过对彩色图像对应的归一化人脸图像进行灰度化处理,以得到彩色图像对应的归一化人脸图像的灰度化人脸图像,或在获取到上述彩色图像之后,首先对获得的彩色图像进行灰度化处理,然后,通过椭圆形模板对灰度化处理后的彩色图像进行人脸区域图像提取和归一化处理,得到彩色图像对应的归一化人脸图像的灰度化人脸图像。The grayscale processing is performed on the normalized face image corresponding to the color image to obtain the grayscale face image of the normalized face image corresponding to the color image, or after obtaining the color image, the obtained first The grayscale image of the color image is processed, and then the grayscale processed color image is subjected to face area image extraction and normalization processing through an oval template to obtain the grayscale of the normalized face image corresponding to the color image. Face image.
  6. 根据权利要求3所述的方法,其特征在于,通过对所述第一灰度直方图和所述第二灰度直方图进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征的步骤,包括:The method according to claim 3, wherein the correlation between the color image and the depth image is determined by performing a correlation analysis on the first gray histogram and the second gray histogram. Features steps, including:
    采用典型相关分析对第一灰度直方图C i和所述第二灰度直方图D i进行相关性分析; The first canonical correlation analysis of the histogram C i and D i the second histogram correlation analysis;
    根据所述第一灰度直方图和所述第二灰度直方图在各自的最优投影方向上的特征向量,构建所述彩色图像和所述深度图像的关联性特征。According to feature vectors of the first grayscale histogram and the second grayscale histogram in respective optimal projection directions, a correlation feature of the color image and the depth image is constructed.
  7. 根据权利要求1所述的方法,其特征在于,所述通过对所述深度 图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征的步骤,包括:The method according to claim 1, wherein the step of determining a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image comprises:
    将所述深度图像对应的归一化人脸图像划分为N*M个子区域,其中,N和M分别为大于等于3的整数;Divide the normalized face image corresponding to the depth image into N * M sub-regions, where N and M are integers greater than or equal to 3;
    根据所述深度图像的每个所述子区域中像素值满足预先定义的有效深度值条件的像素点,确定每个所述子区域的直方图;Determining a histogram of each of the sub-regions according to pixels whose pixel values in each of the sub-regions of the depth image satisfy a predefined effective depth value condition;
    通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征。By calculating the cross entropy or divergence of any two of the histograms, a depth consistency feature of the depth image is determined.
  8. 根据权利要求7所述的方法,其特征在于,所述通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征的步骤,包括:The method according to claim 7, wherein the step of determining the depth consistency feature of the depth image by calculating the cross entropy or divergence of any two of the histograms comprises:
    通过子区域之间的散度度量子区域的深度分布情况,散度通过如下公式计算:The depth distribution of sub-regions is measured by the divergence between sub-regions. The divergence is calculated by the following formula:
    Figure PCTCN2018119758-appb-100001
    Figure PCTCN2018119758-appb-100001
    其中,h i(k)指的是在直方图h i中第k个元素,h j(k)指的是在直方图h j中第k个元素; Wherein, h i (k) refers to the histogram h i k-th element, h j (k) refers to the histogram h j k th element;
    或者,通过子区域之间的交叉熵度量子区域的深度分布情况,对于任意给定两个子区域对应的直方图h i和h j(1≤i≤9,1≤j≤9,i<j),采用交叉熵来衡量它们之间的深度分布一致性,直方图h i和h j的交叉熵计算方式为: Alternatively, the cross-entropy between subregions is used to measure the depth distribution of subregions. For any given two subregions, the histograms h i and h j (1≤i≤9, 1≤j≤9, i <j ), The cross-entropy is used to measure the consistency of the depth distribution between them. The cross-entropy of the histograms h i and h j is calculated as:
    Figure PCTCN2018119758-appb-100002
    Figure PCTCN2018119758-appb-100002
    其中,
    Figure PCTCN2018119758-appb-100003
    H(h i)是直方图h i的信息熵,D KL(h i||h j)是从h i到h j的KL散度,即h i相对于h j的相对熵。
    among them,
    Figure PCTCN2018119758-appb-100003
    H (h i) is the entropy of the histogram h i, D KL (h i || h j) from KL divergence to h i h j, i.e., h i h j with respect to the relative entropy.
  9. 根据权利要求1所述的方法,其特征在于,所述根据所述关联性 特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测的步骤,包括:The method according to claim 1, wherein the step of performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature comprises:
    通过第一核函数对所述关联性特征进行分类识别,确定第一识别结果,以及,通过第二核函数对所述深度一致性特征进行分类识别,确定第二识别结果;Classify and identify the correlation feature through a first kernel function, determine a first recognition result, and classify and identify the deep consistency feature through a second kernel function, and determine a second recognition result;
    通过对所述第一识别结果和所述第二识别结果进行加权融合,确定对所述待检测目标进行人脸活体检测的结果。By performing weighted fusion on the first recognition result and the second recognition result, a result of performing face live detection on the target to be detected is determined.
  10. 根据权利要求1至5任一项所述的方法,其特征在于,所述分别确定所述彩色图像和所述深度图像对应的归一化人脸图像的步骤,包括:The method according to any one of claims 1 to 5, wherein the step of separately determining a normalized face image corresponding to the color image and the depth image comprises:
    通过模板分别提取所述彩色图像和所述深度图像中人脸区域图像;Extracting a face region image in the color image and the depth image respectively through a template;
    分别对所述彩色图像中的人脸区域图像和所述深度图像中的人脸区域图像进行归一化处理,得到所述彩色图像对应的归一化人脸图像、所述深度图像对应的归一化人脸图像。Normalizing the face region image in the color image and the face region image in the depth image, respectively, to obtain a normalized face image corresponding to the color image and a normalization corresponding to the depth image A face image.
  11. 根据权利要求10所述的方法,其特征在于,所述通过模板分别提取所述彩色图像和所述深度图像中人脸区域图像的步骤,包括:The method according to claim 10, wherein the step of extracting the face image in the color image and the depth image by using a template comprises:
    通过人脸检测算法确定人眼位置;Determine the position of the human eye through a face detection algorithm;
    通过几何形状模板分别从彩色图像和深度图像中提取人脸区域图像。The facial shape image is extracted from the color image and the depth image respectively through the geometric shape template.
  12. 根据权利要求10所述的方法,其特征在于,所述分别确定所述彩色图像和所述深度图像对应的归一化人脸图像的步骤之前,包括:The method according to claim 10, wherein before the step of separately determining a normalized face image corresponding to the color image and the depth image, the method includes:
    对所述彩色图像和所述深度图像进行像素对齐。Pixel-aligning the color image and the depth image.
  13. 根据权利要求1所述的方法,其特征在于,所述获取待检测目标的彩色图像和深度图像包括:The method according to claim 1, wherein the acquiring a color image and a depth image of an object to be detected comprises:
    通过设置有自然光摄像头和深度摄像头的图像采集设备同时采集待检测目标的两幅图像,或者,在保持人脸信息不变的状态下,通过所述自然光摄像头和所述深度摄像头先后采集待检测目标的两幅图像。Two images of the target to be detected are collected simultaneously by an image acquisition device provided with a natural light camera and a depth camera, or, while the face information is maintained, the natural light camera and the depth camera are used to sequentially capture the target to be detected Two images.
  14. 一种人脸活体检测装置,其特征在于,包括:A human face living body detection device, comprising:
    图像获取模块,用于获取待检测目标的彩色图像和深度图像;An image acquisition module, configured to acquire a color image and a depth image of a target to be detected;
    归一化模块,用于分别确定所述彩色图像和所述深度图像对应的归一化人脸图像;A normalization module, configured to respectively determine normalized face images corresponding to the color image and the depth image;
    第一特征确定模块,用于通过对所述彩色图像对应的归一化人脸图像 和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征;以及,A first feature determination module, configured to determine the color image and the depth image by performing correlation analysis on a normalized face image corresponding to the color image and a normalized face image corresponding to the depth image Related characteristics; and
    第二特征确定模块,用于通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征;A second feature determination module, configured to determine a depth consistency feature of the depth image by performing a depth consistency analysis on a normalized face image corresponding to the depth image;
    活体检测模块,用于根据所述第一特征确定模块确定的关联性特征和所述第二特征确定模块确定的深度一致性特征,对所述待检测目标进行人脸活体检测。The living body detection module is configured to perform face live detection on the target to be detected according to the correlation features determined by the first feature determination module and the depth consistency features determined by the second feature determination module.
  15. 根据权利要求14所述的装置,其特征在于,通过对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征时,所述第一特征确定模块用于:The device according to claim 14, wherein the color image is determined by performing correlation analysis on a normalized face image corresponding to the color image and a normalized face image corresponding to the depth image. When it is associated with the depth image, the first feature determining module is configured to:
    通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点;Denoise processing is performed on the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image by using a skin color model, and to determine the values in the normalized face image corresponding to the color image. A trusted pixel point and a trusted pixel point in a normalized face image corresponding to the depth image;
    确定所述彩色图像对应的归一化人脸图像的灰度化人脸图像;Determining a grayscale face image of a normalized face image corresponding to the color image;
    基于所述彩色图像对应的归一化人脸图像中的可信像素点,确定所述灰度化人脸图像的第一灰度直方图;以及,基于所述深度图像对应的归一化人脸图像中的可信像素点,确定所述深度图像的第二灰度直方图;Determining a first gray histogram of the grayed face image based on trusted pixels in the normalized face image corresponding to the color image; and based on the normalized person corresponding to the depth image A trusted pixel in a face image to determine a second grayscale histogram of the depth image;
    通过对所述第一灰度直方图和所述第二灰度直方图进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征。A correlation feature of the color image and the depth image is determined by performing correlation analysis on the first gray histogram and the second gray histogram.
  16. 根据权利要求15所述的装置,其特征在于,通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点时,所述第一特征确定模块用于:The device according to claim 15, wherein the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by using a skin color model to determine the When the trusted pixels in the normalized face image corresponding to the color image and the trusted pixels in the normalized face image corresponding to the depth image are described, the first feature determination module is configured to:
    将所述彩色图像和所述深度图像各自对应的归一化人脸图像中像素坐标相同的每两个像素点,确定为一对像素点;Determining every two pixel points with the same pixel coordinates in the normalized face image corresponding to the color image and the depth image as a pair of pixel points;
    针对每一对像素点,确定其中彩色图像所对应的像素点的像素值属于所述肤色模型所定义的肤色范围,且其中深度图像所对应的像素点的像素 值满足预设有效深度值条件时,将该对像素点中每个像素点分别标记为可信像素点。For each pair of pixels, it is determined that the pixel value of the pixel corresponding to the color image belongs to the skin color range defined by the skin color model, and when the pixel value of the pixel corresponding to the depth image satisfies a preset effective depth value condition , Each pixel in the pair of pixels is marked as a trusted pixel.
  17. 根据权利要求15所述的装置,其特征在于,所述通过肤色模型对所述彩色图像对应的归一化人脸图像和所述深度图像对应的归一化人脸图像进行去噪处理,分别确定所述彩色图像对应的归一化人脸图像中的可信像素点和所述深度图像对应的归一化人脸图像中的可信像素点时,所述第一特征确定模块用于:The device according to claim 15, wherein the normalized face image corresponding to the color image and the normalized face image corresponding to the depth image are denoised by a skin color model, respectively, When determining the trusted pixels in the normalized face image corresponding to the color image and the trusted pixels in the normalized face image corresponding to the depth image, the first feature determination module is configured to:
    采用预先定义的肤色模型来虑除会产生干扰的非皮肤像素点,所述肤色模型通过YCbCr色彩空间,对肤色在光照无关的色度平面内进行聚类,使得所述肤色模型适用于不同光照和不同肤色的多种环境。A pre-defined skin color model is used to consider non-skin pixels that may cause interference. The skin color model uses YCbCr color space to cluster skin colors in a light-independent chromaticity plane, so that the skin color model is suitable for different lights. And a variety of different skin tones.
  18. 根据权利要求16所述的装置,其特征在于,所述确定彩色图像对应的归一化人脸图像的灰度化人脸图像时,所述第一特征确定模块用于:The device according to claim 16, wherein when the grayscale face image of the normalized face image corresponding to the color image is determined, the first feature determination module is configured to:
    通过对彩色图像对应的归一化人脸图像进行灰度化处理,以得到彩色图像对应的归一化人脸图像的灰度化人脸图像,或在获取到上述彩色图像之后,首先对获得的彩色图像进行灰度化处理,然后,通过椭圆形模板对灰度化处理后的彩色图像进行人脸区域图像提取和归一化处理,得到彩色图像对应的归一化人脸图像的灰度化人脸图像。The grayscale processing is performed on the normalized face image corresponding to the color image to obtain the grayscale face image of the normalized face image corresponding to the color image, or after obtaining the color image, the obtained first The grayscale image of the color image is processed, and then the grayscale processed color image is subjected to face area image extraction and normalization processing through an oval template to obtain the grayscale of the normalized face image corresponding to the color image. Face image.
  19. 根据权利要求16所述的装置,其特征在于,通过对所述第一灰度直方图和所述第二灰度直方图进行相关性分析,确定所述彩色图像和所述深度图像的关联性特征时,所述第一特征确定模块用于:The apparatus according to claim 16, wherein the correlation between the color image and the depth image is determined by performing a correlation analysis on the first gray histogram and the second gray histogram. When it is characterized, the first feature determination module is configured to:
    采用典型相关分析对第一灰度直方图C i和所述第二灰度直方图D i进行相关性分析: The first canonical correlation analysis of the histogram C i and D i the second histogram correlation analysis:
    根据所述第一灰度直方图和所述第二灰度直方图在各自的最优投影方向上的特征向量,构建所述彩色图像和所述深度图像的关联性特征。According to feature vectors of the first grayscale histogram and the second grayscale histogram in respective optimal projection directions, a correlation feature of the color image and the depth image is constructed.
  20. 根据权利要求14所述的装置,其特征在于,通过对所述深度图像对应的归一化人脸图像进行深度一致性分析,确定所述深度图像的深度一致性特征时,所述第二特征确定模块用于:The device according to claim 14, characterized in that, when a depth consistency analysis is performed on a normalized face image corresponding to the depth image to determine a depth consistency feature of the depth image, the second feature The determination module is used to:
    将所述深度图像对应的归一化人脸图像划分为N*M个子区域,其中,N和M分别为大于等于3的整数;Divide the normalized face image corresponding to the depth image into N * M sub-regions, where N and M are integers greater than or equal to 3;
    根据所述深度图像的每个所述子区域中像素值满足预先定义的有效 深度值条件的像素点,确定每个所述子区域的直方图;Determining a histogram of each of the sub-regions according to pixels whose pixel values in each of the sub-regions of the depth image satisfy a predefined valid depth value condition;
    通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征。By calculating the cross entropy or divergence of any two of the histograms, a depth consistency feature of the depth image is determined.
  21. 根据权利要求20所述的装置,其特征在于,所述通过计算任意两个所述直方图的交叉熵或散度,确定所述深度图像的深度一致性特征时,所述第二特征确定模块用于:The apparatus according to claim 20, wherein the second feature determining module is configured to determine a depth consistency feature of the depth image by calculating the cross entropy or divergence of any two of the histograms. Used for:
    通过子区域之间的散度度量子区域的深度分布情况,散度通过如下公式计算:The depth distribution of sub-regions is measured by the divergence between sub-regions. The divergence is calculated by the following formula:
    Figure PCTCN2018119758-appb-100004
    Figure PCTCN2018119758-appb-100004
    其中,h i(k)指的是在直方图h i中第k个元素,h j(k)指的是在直方图h j中第k个元素; Wherein, h i (k) refers to the histogram h i k-th element, h j (k) refers to the histogram h j k th element;
    或者,通过子区域之间的交叉熵度量子区域的深度分布情况,对于任意给定两个子区域对应的直方图h i和h j(1≤i≤9,1≤j≤9,i<j),采用交叉熵来衡量它们之间的深度分布一致性,直方图h i和h j的交叉熵计算方式为: Alternatively, the cross-entropy between subregions is used to measure the depth distribution of subregions. For any given two subregions, the histograms h i and h j (1≤i≤9, 1≤j≤9, i <j ), The cross-entropy is used to measure the consistency of the depth distribution between them. The cross-entropy of the histograms h i and h j is calculated as:
    Figure PCTCN2018119758-appb-100005
    Figure PCTCN2018119758-appb-100005
    Figure PCTCN2018119758-appb-100006
    Figure PCTCN2018119758-appb-100006
  22. 根据权利要求14所述的装置,其特征在于,根据所述关联性特征和所述深度一致性特征,对所述待检测目标进行人脸活体检测时,所述活体检测模块用于:The device according to claim 14, characterized in that, when performing face live detection on the target to be detected according to the correlation feature and the depth consistency feature, the living body detection module is configured to:
    通过第一核函数对所述关联性特征进行分类识别,确定第一识别结果,以及,通过第二核函数对所述深度一致性特征进行分类识别,确定第二识别结果;Classify and identify the correlation feature through a first kernel function, determine a first recognition result, and classify and identify the deep consistency feature through a second kernel function, and determine a second recognition result;
    通过对所述第一识别结果和所述第二识别结果进行加权融合,确定对所述待检测目标进行人脸活体检测的结果。By performing weighted fusion on the first recognition result and the second recognition result, a result of performing face live detection on the target to be detected is determined.
  23. 根据权利要求14至22任一项所述的装置,其特征在于,分别确定所述彩色图像和所述深度图像对应的归一化人脸图像时,所述归一化模块用于:The device according to any one of claims 14 to 22, wherein when determining a normalized face image corresponding to the color image and the depth image, the normalization module is configured to:
    通过模板分别提取所述彩色图像和所述深度图像中人脸区域图像;Extracting a face region image in the color image and the depth image respectively through a template;
    分别对所述彩色图像中的人脸区域图像和所述深度图像中的人脸区域图像进行归一化处理,得到所述彩色图像对应的归一化人脸图像、所述深度图像对应的归一化人脸图像。Normalizing the face region image in the color image and the face region image in the depth image, respectively, to obtain a normalized face image corresponding to the color image and a normalization corresponding to the depth image A face image.
  24. 根据权利要求23所述的装置,其特征在于,所述通过模板分别提取所述彩色图像和所述深度图像中人脸区域图像时,所述归一化模块用于:The device according to claim 23, wherein the normalization module is configured to: when extracting the face image in the color image and the depth image through a template, respectively:
    通过人脸检测算法确定人眼位置;Determine the position of the human eye through a face detection algorithm;
    通过几何形状模板分别从彩色图像和深度图像中提取人脸区域图像。The facial shape image is extracted from the color image and the depth image respectively through the geometric shape template.
  25. 一种电子设备,包括存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至13任意一项所述的人脸活体检测方法。An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the computer program, any one of claims 1 to 13 is implemented Face live body detection method as described in item 3.
  26. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1至13任意一项所述的人脸活体检测方法的步骤。A computer-readable storage medium having stored thereon a computer program, characterized in that, when the program is executed by a processor, the steps of the face live body detection method according to any one of claims 1 to 13 are implemented.
PCT/CN2018/119758 2018-06-29 2018-12-07 Method and device for face liveness detection WO2020000908A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810712065.7A CN108549886A (en) 2018-06-29 2018-06-29 A kind of human face in-vivo detection method and device
CN201810712065.7 2018-06-29

Publications (1)

Publication Number Publication Date
WO2020000908A1 true WO2020000908A1 (en) 2020-01-02

Family

ID=63493326

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119758 WO2020000908A1 (en) 2018-06-29 2018-12-07 Method and device for face liveness detection

Country Status (2)

Country Link
CN (1) CN108549886A (en)
WO (1) WO2020000908A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111222472A (en) * 2020-01-09 2020-06-02 西安知象光电科技有限公司 Face recognition method based on structural optical frequency domain features
CN111339958A (en) * 2020-02-28 2020-06-26 山东笛卡尔智能科技有限公司 Monocular vision-based face in-vivo detection method and system
CN111444850A (en) * 2020-03-27 2020-07-24 北京爱笔科技有限公司 Picture detection method and related device
CN111723761A (en) * 2020-06-28 2020-09-29 杭州海康威视系统技术有限公司 Method and device for determining abnormal face image and storage medium
CN111739046A (en) * 2020-06-19 2020-10-02 百度在线网络技术(北京)有限公司 Method, apparatus, device and medium for model update and image detection
CN111797735A (en) * 2020-06-22 2020-10-20 深圳壹账通智能科技有限公司 Face video recognition method, device, equipment and storage medium
CN112069331A (en) * 2020-08-31 2020-12-11 深圳市商汤科技有限公司 Data processing method, data retrieval method, data processing device, data retrieval device, data processing equipment and storage medium
CN113378715A (en) * 2021-06-10 2021-09-10 北京华捷艾米科技有限公司 Living body detection method based on color face image and related equipment
CN113807159A (en) * 2020-12-31 2021-12-17 京东科技信息技术有限公司 Face recognition processing method, device, equipment and storage medium thereof
CN114582003A (en) * 2022-04-24 2022-06-03 慕思健康睡眠股份有限公司 Sleep health management system based on cloud computing service
US11508188B2 (en) 2020-04-16 2022-11-22 Samsung Electronics Co., Ltd. Method and apparatus for testing liveness
CN116311477A (en) * 2023-05-15 2023-06-23 华中科技大学 Cross-identity consistency-oriented face movement unit detection model construction method

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549886A (en) * 2018-06-29 2018-09-18 汉王科技股份有限公司 A kind of human face in-vivo detection method and device
CN109711243B (en) * 2018-11-01 2021-02-09 长沙小钴科技有限公司 Static three-dimensional face in-vivo detection method based on deep learning
CN109325472B (en) * 2018-11-01 2022-05-27 四川大学 Face living body detection method based on depth information
CN111310528B (en) * 2018-12-12 2022-08-12 马上消费金融股份有限公司 Image detection method, identity verification method, payment method and payment device
CN109711384A (en) * 2019-01-09 2019-05-03 江苏星云网格信息技术有限公司 A kind of face identification method based on depth convolutional neural networks
CN110930547A (en) * 2019-02-28 2020-03-27 上海商汤临港智能科技有限公司 Vehicle door unlocking method, vehicle door unlocking device, vehicle door unlocking system, electronic equipment and storage medium
CN109977794A (en) * 2019-03-05 2019-07-05 北京超维度计算科技有限公司 A method of recognition of face is carried out with deep neural network
CN110111466A (en) * 2019-05-08 2019-08-09 广东赛翼智能科技有限公司 A kind of access control system and control method based on face recognition technology
CN110287796B (en) * 2019-05-24 2020-06-12 北京爱诺斯科技有限公司 Refractive screening method based on mobile phone and external equipment
CN110232418B (en) * 2019-06-19 2021-12-17 达闼机器人有限公司 Semantic recognition method, terminal and computer readable storage medium
CN110633691A (en) * 2019-09-25 2019-12-31 北京紫睛科技有限公司 Binocular in-vivo detection method based on visible light and near-infrared camera
CN112651268B (en) * 2019-10-11 2024-05-28 北京眼神智能科技有限公司 Method and device for eliminating black-and-white photo in living body detection and electronic equipment
CN111881706B (en) * 2019-11-27 2021-09-03 马上消费金融股份有限公司 Living body detection, image classification and model training method, device, equipment and medium
CN111079606B (en) * 2019-12-06 2023-05-26 北京爱笔科技有限公司 Face anti-counterfeiting method and device
WO2022226747A1 (en) * 2021-04-26 2022-11-03 华为技术有限公司 Eyeball tracking method and apparatus and storage medium
CN113627233A (en) * 2021-06-17 2021-11-09 中国科学院自动化研究所 Visual semantic information-based face counterfeiting detection method and device
CN113780222B (en) * 2021-09-17 2024-02-27 深圳市繁维科技有限公司 Face living body detection method and device, electronic equipment and readable storage medium
CN114694266A (en) * 2022-03-28 2022-07-01 广州广电卓识智能科技有限公司 Silent in-vivo detection method, system, equipment and storage medium
CN114926890B (en) * 2022-07-20 2022-09-30 北京远鉴信息技术有限公司 Method and device for distinguishing authenticity of face, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102197393A (en) * 2008-10-27 2011-09-21 微软公司 Image-based semantic distance
CN106372615A (en) * 2016-09-19 2017-02-01 厦门中控生物识别信息技术有限公司 Face anti-counterfeiting identification method and apparatus
CN107451510A (en) * 2016-05-30 2017-12-08 北京旷视科技有限公司 Biopsy method and In vivo detection system
CN107832677A (en) * 2017-10-19 2018-03-23 深圳奥比中光科技有限公司 Face identification method and system based on In vivo detection
CN107918773A (en) * 2017-12-13 2018-04-17 汉王科技股份有限公司 A kind of human face in-vivo detection method, device and electronic equipment
CN108549886A (en) * 2018-06-29 2018-09-18 汉王科技股份有限公司 A kind of human face in-vivo detection method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102197393A (en) * 2008-10-27 2011-09-21 微软公司 Image-based semantic distance
CN107451510A (en) * 2016-05-30 2017-12-08 北京旷视科技有限公司 Biopsy method and In vivo detection system
CN106372615A (en) * 2016-09-19 2017-02-01 厦门中控生物识别信息技术有限公司 Face anti-counterfeiting identification method and apparatus
CN107832677A (en) * 2017-10-19 2018-03-23 深圳奥比中光科技有限公司 Face identification method and system based on In vivo detection
CN107918773A (en) * 2017-12-13 2018-04-17 汉王科技股份有限公司 A kind of human face in-vivo detection method, device and electronic equipment
CN108549886A (en) * 2018-06-29 2018-09-18 汉王科技股份有限公司 A kind of human face in-vivo detection method and device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111222472B (en) * 2020-01-09 2023-12-15 西安知象光电科技有限公司 Face recognition method based on structural light frequency domain characteristics
CN111222472A (en) * 2020-01-09 2020-06-02 西安知象光电科技有限公司 Face recognition method based on structural optical frequency domain features
CN111339958A (en) * 2020-02-28 2020-06-26 山东笛卡尔智能科技有限公司 Monocular vision-based face in-vivo detection method and system
CN111339958B (en) * 2020-02-28 2023-08-29 南京鑫之派智能科技有限公司 Face living body detection method and system based on monocular vision
CN111444850A (en) * 2020-03-27 2020-07-24 北京爱笔科技有限公司 Picture detection method and related device
CN111444850B (en) * 2020-03-27 2023-11-14 北京爱笔科技有限公司 Picture detection method and related device
US11508188B2 (en) 2020-04-16 2022-11-22 Samsung Electronics Co., Ltd. Method and apparatus for testing liveness
US11836235B2 (en) 2020-04-16 2023-12-05 Samsung Electronics Co., Ltd. Method and apparatus for testing liveness
CN111739046A (en) * 2020-06-19 2020-10-02 百度在线网络技术(北京)有限公司 Method, apparatus, device and medium for model update and image detection
CN111797735A (en) * 2020-06-22 2020-10-20 深圳壹账通智能科技有限公司 Face video recognition method, device, equipment and storage medium
CN111723761B (en) * 2020-06-28 2023-08-11 杭州海康威视系统技术有限公司 Method, device and storage medium for determining abnormal face image
CN111723761A (en) * 2020-06-28 2020-09-29 杭州海康威视系统技术有限公司 Method and device for determining abnormal face image and storage medium
CN112069331A (en) * 2020-08-31 2020-12-11 深圳市商汤科技有限公司 Data processing method, data retrieval method, data processing device, data retrieval device, data processing equipment and storage medium
CN112069331B (en) * 2020-08-31 2024-06-11 深圳市商汤科技有限公司 Data processing and searching method, device, equipment and storage medium
CN113807159A (en) * 2020-12-31 2021-12-17 京东科技信息技术有限公司 Face recognition processing method, device, equipment and storage medium thereof
CN113378715A (en) * 2021-06-10 2021-09-10 北京华捷艾米科技有限公司 Living body detection method based on color face image and related equipment
CN113378715B (en) * 2021-06-10 2024-01-05 北京华捷艾米科技有限公司 Living body detection method based on color face image and related equipment
CN114582003A (en) * 2022-04-24 2022-06-03 慕思健康睡眠股份有限公司 Sleep health management system based on cloud computing service
CN116311477A (en) * 2023-05-15 2023-06-23 华中科技大学 Cross-identity consistency-oriented face movement unit detection model construction method

Also Published As

Publication number Publication date
CN108549886A (en) 2018-09-18

Similar Documents

Publication Publication Date Title
WO2020000908A1 (en) Method and device for face liveness detection
JP6449516B2 (en) Image and feature quality for ocular blood vessel and face recognition, image enhancement and feature extraction, and fusion of ocular blood vessels with facial and / or sub-facial regions for biometric systems
US10810423B2 (en) Iris liveness detection for mobile devices
Patel et al. Secure face unlock: Spoof detection on smartphones
CN106372629B (en) Living body detection method and device
Seo et al. Static and space-time visual saliency detection by self-resemblance
da Silva Pinto et al. Video-based face spoofing detection through visual rhythm analysis
Faraji et al. Face recognition under varying illuminations using logarithmic fractal dimension-based complete eight local directional patterns
CN108985210A (en) A kind of Eye-controlling focus method and system based on human eye geometrical characteristic
WO2016084072A1 (en) Anti-spoofing system and methods useful in conjunction therewith
CN110569756A (en) face recognition model construction method, recognition method, device and storage medium
CN108416291B (en) Face detection and recognition method, device and system
WO2019075666A1 (en) Image processing method and apparatus, terminal, and storage medium
TW200910223A (en) Image processing apparatus and image processing method
JP6351243B2 (en) Image processing apparatus and image processing method
JP6071002B2 (en) Reliability acquisition device, reliability acquisition method, and reliability acquisition program
Juneja Multiple feature descriptors based model for individual identification in group photos
CN113468954B (en) Face counterfeiting detection method based on local area features under multiple channels
Lin et al. A gender classification scheme based on multi-region feature extraction and information fusion for unconstrained images
Sun et al. Multimodal face spoofing detection via RGB-D images
Tandon et al. An efficient age-invariant face recognition
CN111126283A (en) Rapid in-vivo detection method and system for automatically filtering fuzzy human face
Nabatchian Human face recognition
Kaur et al. An analysis on gender classification and age estimation approaches
Kao et al. Gender Classification with Jointing Multiple Models for Occlusion Images.

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: 18924444

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/05/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18924444

Country of ref document: EP

Kind code of ref document: A1