WO2023273050A1 - Living body detection method and apparatus, electronic device, and storage medium - Google Patents

Living body detection method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023273050A1
WO2023273050A1 PCT/CN2021/126438 CN2021126438W WO2023273050A1 WO 2023273050 A1 WO2023273050 A1 WO 2023273050A1 CN 2021126438 W CN2021126438 W CN 2021126438W WO 2023273050 A1 WO2023273050 A1 WO 2023273050A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
detection
living body
body detection
target object
Prior art date
Application number
PCT/CN2021/126438
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 WO2023273050A1 publication Critical patent/WO2023273050A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • G06V20/647Three-dimensional objects by matching two-dimensional images to three-dimensional objects
    • 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/161Detection; Localisation; Normalisation
    • 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

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular to a living body detection method and device, electronic equipment, and a storage medium.
  • Liveness detection can play a key role in related applications of face recognition, and can be used to prevent attackers from using prostheses for face forgery. Therefore, how to improve the accuracy of liveness detection has become an urgent problem to be solved in the field of computer vision.
  • the present disclosure proposes a living body detection technical solution.
  • a living body detection method comprising:
  • the two-dimensional image may include an infrared image and/or a color image
  • the target living detection method may include living detection based on at least two images in a depth image, an infrared image, and a color image
  • the depth image information may include depth
  • the size information and/or distance information of the image through the embodiments of the present disclosure, based on the depth image information contained in the depth map, fully consider the actual depth of the living body detection, and flexibly select the appropriate target living body detection method to realize the living body detection. It improves the accuracy and flexibility of liveness detection.
  • the determining the detection mode of the target living body based on the depth image information contained in the depth map includes: acquiring the target object at the depth based on the depth image information contained in the depth map.
  • the detection method of the target living body includes: living body detection based on the depth map and the two-dimensional image.
  • the living body detection based on two-dimensional images may include living body detection based on infrared images and/or color images
  • the living body detection based on depth maps and two-dimensional images may include living body detection based on depth maps and infrared images, based on For liveness detection based on depth maps and color images, or liveness detection based on depth maps, infrared images, and color images, through the embodiments of the present disclosure, when the size of the target object in the depth map is small, the depth map can be omitted and selected
  • a clearer two-dimensional image is used for live detection. On the one hand, it reduces the impact of the unclear depth map on the live detection accuracy and improves the accuracy of live detection. On the other hand, it can also reduce the impact of the depth map on the live detection distance. , which improves the recognition distance of liveness detection.
  • the acquiring the target size of the target object in the depth map based on the depth image information contained in the depth map includes: performing target object detection on the two-dimensional image, Obtaining a first detection image of the target object in the two-dimensional image; determining a first image correspondence between the depth map and the two-dimensional image based on the depth image information included in the depth map; according to the The first image correspondence relationship, combined with the first detection image, obtains the second detection image of the target object in the depth map; according to the size of the second detection image, determine the depth of the target object The target dimensions in the figure.
  • the first detection image may include an image of the location of the target object in the infrared image and/or an image of the location of the target object in the color image
  • the second detection image may include an image of the location of the target object in the depth map
  • the target size may include the length and/or width of the second detection image.
  • the method further includes: detecting the target object in the two-dimensional image Perform image quality detection on the first detection image to obtain an image quality detection result; if the image quality detection result is greater than a preset quality threshold, determine the relationship between the depth map and the depth image based on the depth image information contained in the depth map. A first image correspondence between two-dimensional images.
  • the image quality detection when the image quality detection result is greater than the preset quality threshold, enter the follow-up process such as determining the first image correspondence between the depth map and the two-dimensional image, the image quality detection can be used for subsequent entry
  • the image quality of the living body detection process is screened, thereby improving the image quality of the input image during the living body detection process, and then improving the accuracy of the living body detection.
  • the determining the target living body detection method based on the depth image information included in the depth map includes: acquiring the living body detection distance of the target object based on the depth image information included in the depth map ;
  • the target living body detection method includes: living body detection based on the two-dimensional image; in the case where the living body detection distance is less than or equal to a preset distance threshold , the target liveness detection method includes: liveness detection based on the depth map and the two-dimensional image.
  • the living body detection distance may include the distance between the target object and the living body detection device.
  • the depth map may be omitted and a more affected object may be selected. Two-dimensional images with less distance influence are used for liveness detection, which improves the accuracy of liveness detection while reducing the influence of depth maps on the distance of liveness detection and improving the recognition distance of liveness detection.
  • the two-dimensional image includes an infrared image and/or a color image
  • the target living body detection method includes: living body detection based on at least two images, and the at least two images include the depth At least two of the image, the infrared image, and the color image; based on the two-dimensional image, the living body detection of the target object is performed through the target living body detection method to obtain the living body detection of the target object
  • the results include: based on the at least two images, performing liveness detection on the target object through the target liveness detection method to obtain at least two intermediate liveness detection results, wherein the at least two intermediate liveness detection results are respectively the same as
  • the at least two types of images correspond; weights corresponding to the at least two intermediate living body detection results are obtained; based on the weights and the at least two intermediate living body detection results, the living body detection results of the target object are obtained.
  • the living body detection based on at least two kinds of images may include living body detection based on depth map and infrared image, living body detection based on depth map and color image, living body detection based on infrared image and color image, and depth map based , liveness detection of infrared images and color images
  • at least two intermediate liveness detection results may include at least two of the depth map liveness detection results, infrared image liveness detection results, and color image liveness detection results, through the embodiments of the present disclosure, can be in
  • the weight of the liveness detection result of the depth map is reduced by adaptive weighting, so that the weight of the liveness detection result corresponding to the depth map can also be reduced in the case of being attacked by a 3D prosthesis. Influence, to further improve the accuracy of liveness detection.
  • the obtaining the weights corresponding to the at least two intermediate living body detection results includes: determining the at least two intermediate living body detection results based on the training results of the weighted network layer in the living body detection network Corresponding weights respectively, wherein, the living body detection network is used to detect the living body of the target object through the target living body detection method; or, according to the depth image information and/or the two-dimensional image contained in the two-dimensional image The image information is used to determine weights corresponding to the at least two intermediate living body detection results.
  • the weights corresponding to at least two intermediate living body detection results may include the respective weights corresponding to the two intermediate living body detection results when two kinds of intermediate living body detection results are included, and may also include the case where three intermediate living body detection results are included.
  • the corresponding weights of the three intermediate living body detection results; the weights determined according to the two-dimensional image information contained in the depth image and/or the two-dimensional image may include the weight determined based on the distance in the depth map, or the weight determined based on the two-dimensional image.
  • the weights determined by the brightness or size, etc., through the embodiments of the present disclosure can flexibly determine the weights of different intermediate living body detection results in two ways, and improve the flexibility of the living body detection process, wherein the neural network is adaptively determined.
  • Weights corresponding to different intermediate liveness detection results so as to realize end-to-end liveness detection, improve the efficiency and accuracy of liveness detection; and adaptively determine the weights of different intermediate liveness detection results according to the actual situation of the liveness detection image, so that the obtained liveness The detection results are more in line with the real situation, further improving the accuracy of live detection.
  • the target living body detection method includes living body detection based on the depth map and the two-dimensional image; based on the two-dimensional image, the target living body detection method is used to detect
  • the liveness detection of the target object includes: performing liveness detection on the first detection image where the target object is located in the two-dimensional image through at least one first network branch in the liveness detection network; and, through the liveness detection network.
  • the second network branch performs liveness detection on the second detection image where the target object is located in the depth map.
  • the first network branch may include an infrared image liveness detection branch and/or a color image liveness detection branch
  • the first detection image may include a human face frame intercepted in an infrared image and/or a human face intercepted in a color image frame
  • the second network branch can include the depth map liveness detection branch
  • the second detection image can include the face frame intercepted in the depth map.
  • the target liveness detection method can include both depth map and two-dimensional image based
  • use the first detection image with a smaller size to quickly obtain the intermediate living body detection result corresponding to the two-dimensional image, and at the same time use the second detection image to obtain the intermediate living body detection result corresponding to the depth map, so as to pass
  • Multiple intermediate living body detection results jointly obtain the living body detection result of the target object more accurately, ensuring the accuracy of the living body detection and improving the efficiency of the living body detection.
  • the acquiring the depth map and the two-dimensional image of the target object includes: acquiring the depth map and the original two-dimensional image of the target object; based on the depth map, performing Registration processing, obtaining the two-dimensional image registered with the depth map, wherein the registration processing includes cropping processing and/or scaling processing.
  • the original two-dimensional image may include the original infrared image and/or the original color map
  • the registration may include the registration of resolution and spatial position.
  • the two-dimensional image configured with the depth map can be obtained.
  • the two-dimensional image is convenient for subsequent determination of the target size of the target object in the depth map based on the two-dimensional image, and acquisition of the first detection image and the second detection image, etc., thereby improving the detection efficiency of the living body detection as a whole.
  • the target living body detection method includes living body detection based on the two-dimensional image; based on the two-dimensional image, the target living body detection method is used to detect the target object's living body , comprising: acquiring a first detection image in the two-dimensional image where the target object is located; combining the first detection image according to a second image correspondence between the two-dimensional image and the original two-dimensional image , obtaining a third detection image of the target object in the original two-dimensional image; performing life detection on the third detection image through at least one first network branch in the life detection network.
  • the third detection image may include the regressed face frame in the original infrared image and/or the regressed face frame in the original color image.
  • the method further includes: in a case where it is determined that the target object is a living body based on the living body detection result, identifying the target object according to the two-dimensional image.
  • the target object can be identified when it is determined that the target object is a living body, which saves the identification process when the target object is not a living body, and improves the efficiency and confidence of identification.
  • a living body detection device including:
  • the image acquisition module is used to acquire the depth map and two-dimensional image of the target object;
  • the detection method determination module is used to determine the target living body detection method based on the depth image information contained in the depth map;
  • the living body detection module is used to determine the detection method based on the A two-dimensional image, performing a liveness detection on the target object through the target liveness detection method, and obtaining a liveness detection result of the target object.
  • the detection mode determination module is configured to: acquire the target size of the target object in the depth map based on the depth image information included in the depth map;
  • the target living detection method includes: live detection based on the two-dimensional image; or, when the target size is greater than or equal to the preset size threshold, the target living detection method Including: living body detection based on the depth map and the two-dimensional image.
  • the detection method determination module is further configured to: perform target object detection on the two-dimensional image to obtain a first detection image of the target object in the two-dimensional image; based on the The depth image information contained in the depth map determines a first image correspondence between the depth map and the two-dimensional image; according to the first image correspondence, combined with the first detection image, the depth map is obtained A second detection image of the target object; determining a target size of the target object in the depth map according to the size of the second detection image.
  • the detection method determination module is further configured to: perform image quality detection on the first detection image to obtain an image quality detection result; when the image quality detection result is greater than a preset quality threshold
  • the first image correspondence between the depth map and the two-dimensional image is determined based on the depth image information included in the depth map.
  • the detection mode determination module is configured to: acquire the living body detection distance of the target object based on the depth image information contained in the depth map; when the living body detection distance is greater than a preset distance threshold
  • the target living body detection method includes: living body detection based on the two-dimensional image; when the living body detection distance is less than or equal to a preset distance threshold, the target living body detection method includes: based on the Depth map and liveness detection of said 2D image.
  • the two-dimensional image includes an infrared image and/or a color image
  • the target living body detection method includes: living body detection based on at least two images, and the at least two images include the depth At least two of the image, the infrared image, and the color image
  • the living body detection module is configured to: based on the at least two kinds of images, perform living body detection on the target object through the target living body detection method, and obtain At least two intermediate living body detection results, wherein the at least two intermediate living body detection results correspond to the at least two images respectively; obtain the weights corresponding to the at least two intermediate living body detection results respectively;
  • the at least two intermediate living body detection results are obtained to obtain the living body detection result of the target object.
  • the living body detection module is further configured to: determine weights corresponding to the at least two intermediate living body detection results based on the training results of the weighted network layer in the living body detection network, wherein the living body The detection network is used to perform liveness detection on the target object through the target liveness detection method; or, according to the depth image information and/or the two-dimensional image information contained in the two-dimensional image, determine the at least two intermediate Weights corresponding to liveness detection results.
  • the target living detection method includes living detection based on the depth map and the two-dimensional image; the living detection module is configured to: use at least one first network in the living detection network branch, performing liveness detection on the first detection image where the target object is located in the two-dimensional image; Detect images for liveness detection.
  • the image acquisition module is configured to: acquire a depth map of the target object and an original two-dimensional image; based on the depth map, perform registration processing on the original two-dimensional image to obtain a The two-dimensional image registered with the depth map, wherein the registration processing includes cropping processing and/or scaling processing.
  • the target living body detection method includes living body detection based on the two-dimensional image; image; according to the second image correspondence between the two-dimensional image and the original two-dimensional image, combined with the first detection image, to obtain a third detection image of the target object in the original two-dimensional image; The living body detection is performed on the third detection image through at least one first network branch in the living body detection network.
  • the device is further configured to: identify the target object according to the two-dimensional image when it is determined that the target object is a living body based on the living body detection result.
  • an electronic device including:
  • a processor a memory for storing processor-executable instructions; wherein, the processor is configured to invoke the instructions stored in the memory to execute the above-mentioned living body detection method.
  • a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned living body detection method is implemented.
  • a computer program product including computer readable codes, or a volatile computer readable storage medium or a nonvolatile computer readable storage medium carrying computer readable codes, when the When the computer-readable codes are run in the processor of the electronic device, the processor in the electronic device executes to implement the above-mentioned living body detection method.
  • Fig. 1 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
  • Fig. 2 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
  • Fig. 3 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
  • Fig. 4 shows a schematic diagram of a network structure of a living body detection network according to an embodiment of the present disclosure.
  • Fig. 5 shows a block diagram of a living body detection device according to an embodiment of the present disclosure.
  • Fig. 6 shows a schematic diagram of an application example according to the present disclosure.
  • Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • Fig. 8 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • Fig. 1 shows a flow chart of a method for detecting a living body according to an embodiment of the present disclosure.
  • the method can be applied to a living body detecting device, and the living body detecting device can be a terminal device, a server, or other processing devices.
  • the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, Wearable equipment etc.
  • UE user equipment
  • PDA personal digital assistant
  • the living body detection method may be implemented by a processor invoking computer-readable instructions stored in a memory.
  • the living body detection method may include:
  • the target object may be any object to be detected, such as a person or an animal to be detected, and in some possible implementation manners, the target object may include a human face object and/or a human body object.
  • the number of target objects is not limited in the embodiments of the present disclosure, and can be a single object or multiple objects. In the case that the target object includes multiple objects, it can be simultaneously Liveness detection can be performed on multiple objects, or liveness detection can be performed on multiple objects separately, and which method to choose can be flexibly determined according to the actual situation.
  • the depth map may be an image in which the depth from the image capture device to at least one point in the captured scene is taken as a pixel value, and the depth map of the target object may reflect the geometric shape of the visible surface of the target object.
  • the manner of obtaining the depth map of the target object is not limited in the embodiments of the present disclosure, and can be flexibly determined according to actual conditions.
  • the depth map of the target object can be directly obtained from the image acquisition device, wherein the image
  • the acquisition device may be any device for image acquisition of the target object, such as a stereo camera or a Time of Flight (TOF, Time of Flight) camera.
  • TOF Time of Flight
  • the two-dimensional image of the target object can be any image obtained by collecting the two-dimensional image of the target object.
  • the two-dimensional image can be a related image for live detection, such as infrared (IR , Infrared Radiation) images and/or color images, etc.
  • the infrared image may be an image formed based on different thermal infrared differences between the target object itself and the background, less disturbed by ambient light, and the infrared image of the target object can be obtained at any time period.
  • a color image can be an image corresponding to multiple channels, such as RGB image (R means Red, red; G means Green, green; B means Blue, blue), CMYK image (C means Cyan, cyan; M means Magenta, magenta ; Y means Yellow, yellow; K means black, black) or YUV image (Y means Luminance, brightness; U and V mean Chrominance, chromaticity), etc.
  • the number of acquired depth maps and 2D images is not limited in the embodiments of the present disclosure.
  • One or more depth maps may be acquired, or one or more 2D images may be acquired, which can be flexibly selected according to actual conditions.
  • the method of acquiring the two-dimensional image of the target object is also not limited in the embodiments of the present disclosure, and can be flexibly determined according to actual conditions.
  • the two-dimensional image of the target object can be directly obtained from the image acquisition device.
  • the image acquisition device reference may be made to the foregoing disclosed embodiments, and details are not repeated here.
  • the depth map and the two-dimensional image of the target object can be acquired simultaneously or separately.
  • the images can be acquired at the same time or separately.
  • Depth image information can include the image information of the depth map itself, such as the size or resolution of the depth map, and can also include relevant information extracted from the depth map, such as determining the distance of the target object in space based on the depth map information etc.
  • the target living body detection method can be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments.
  • the target liveness detection methods may include liveness detection based on infrared images, liveness detection based on color images, liveness detection based on infrared images and color images, liveness detection based on depth maps and infrared images, depth-based Liveness detection based on image and color image or one or more implementations based on depth map, infrared image and color image.
  • the determination method of the target living body detection method can also be flexibly changed, for example, one or more target living body detection methods in the above disclosed embodiments can be selected based on the size of the target object in the depth map method, or select one or more target living body detection methods in the above-mentioned disclosed embodiments based on the living body detection distance of the target object, etc., see the following disclosed embodiments for details, and will not be expanded here.
  • the target object can be detected based on the two-dimensional image.
  • the process of the living detection can be flexibly determined according to the actual situation of the target living detection method.
  • the target living detection method can be realized.
  • Live detection based on two-dimensional images can be based on certain images in two-dimensional images, such as color images or depth maps, or live detection based on multiple images in two-dimensional images etc., can also be flexibly determined according to the actual situation of the detection method of the target living body.
  • the liveness detection result may include two cases of determining that the target object is alive and determining that the target object is not alive; in some possible implementations, the liveness detection result may also include whether the target object is alive or not. Confidence of living body and other types, etc.
  • the actual depth of the living body detection can be fully considered, and an appropriate target living body detection method can be flexibly selected to realize the living body detection, which improves the accuracy and flexibility of the living body detection.
  • S11 may include: acquiring a depth map of the target object and an original two-dimensional image; based on the depth map, performing registration processing on the original two-dimensional image to obtain a two-dimensional image registered with the depth map, Wherein, the registration processing includes cropping processing and/or scaling processing.
  • the original two-dimensional image may be a two-dimensional image obtained without any processing after image acquisition of the target object.
  • reference may be made to the implementation forms of the two-dimensional image in the above-mentioned disclosed embodiments, which will not be repeated here.
  • the depth map and the original two-dimensional image can be registered first, so that the depth map and the two-dimensional image The resolution and spatial position are all aligned with each other, thereby reducing the difficulty of subsequent image processing and liveness detection.
  • the manner of registration is not limited in this embodiment of the present disclosure.
  • the registration of the two-dimensional image and the depth map can be realized through cropping processing and/or scaling processing.
  • the configuration between the two-dimensional image and the depth map can also be realized through the registration network, wherein the registration network can be any neural network with image registration function, and its implementation form is not described in the embodiment of the present disclosure. limit.
  • the original two-dimensional image may include the original infrared image and the original color image.
  • the acquired original infrared image may itself have been co-registered with the depth map. In this case, only the original color image can be registered to obtain a color image configured with the depth map.
  • a two-dimensional image configured with a depth map, which facilitates the subsequent determination of the target size of the target object in the depth map based on the two-dimensional image, and acquisition of the first detection image and the second detection image, etc., thereby improving the overall quality of the living body. Detection efficiency of detection.
  • Fig. 2 shows a flow chart of a living body detection method according to an embodiment of the present disclosure.
  • S12 may include:
  • the target living body detection method includes: living body detection based on a two-dimensional image. or,
  • the target living body detection method includes: living body detection based on a depth map and a two-dimensional image.
  • the target size may be the size of the target object in the depth map, for example, it may include the length of the long side and/or the side length of the short side of the target object in the depth map, or include the resolution of the target object in the depth map, etc. .
  • the implementation of S121 can be flexibly selected according to the actual situation.
  • the target size of the target object can be jointly determined based on the size information of the depth map in the depth image information and the proportion of the target object in the depth map.
  • the target size can also be determined through the proportional relationship between the 2D image and the depth map, and the size of the target object in the 2D image.
  • the target size can be compared with a preset size threshold to determine a target liveness detection method.
  • the size of the preset size threshold can be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
  • the target living body detection method can be determined as the living body detection based on the two-dimensional image, so as to omit the living body detection process based on the depth map and improve While improving the accuracy of liveness detection, the calculation amount of liveness detection is reduced, and the efficiency of liveness detection is improved.
  • the living body detection based on the two-dimensional image may be realized based on all kinds of two-dimensional images, or it may be based on one of the two-dimensional images Or live detection realized by multiple images, etc., can be flexibly selected according to the actual situation.
  • the living body detection based on the two-dimensional image may include the living body detection based on the infrared image and/or the color image.
  • the target size is greater than or equal to the preset size threshold, it may indicate that the target object in the depth image is relatively clear. In this case, the target object may be detected based on the depth image. Therefore, in a possible implementation, when the target size is greater than or equal to the preset size threshold, the target living body detection method can be determined as the living body detection based on the depth map and the two-dimensional image, so as to improve the accuracy of the living body detection .
  • liveness detection based on depth maps and two-dimensional images may include, liveness detection based on depth maps and infrared images, liveness detection based on depth maps and color images, and liveness detection based on depth maps, infrared images and color images.
  • liveness detection may include, liveness detection based on depth maps and infrared images, liveness detection based on depth maps and color images, and liveness detection based on depth maps, infrared images and color images.
  • the depth map when the size of the target object in the depth map is small, the depth map can be omitted and a clearer two-dimensional image can be selected for live detection.
  • the impact of precision improves the accuracy of liveness detection.
  • it can also reduce the influence of the depth map on the liveness detection distance and improve the recognition distance of liveness detection.
  • Fig. 3 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
  • S121 may include:
  • the first detection image is an image extracted from a two-dimensional image where the target object is located, for example, may include a detection image extracted from an infrared image and/or a detection image extracted from a color image.
  • the first detection image may be an image of the entire and/or part of the target object extracted from the two-dimensional image, for example, the first detection image may be based on the overall detection frame of the target object, the target object The detection image determined by the human body detection frame or the face detection frame of the target object.
  • the method of detecting the target object on the two-dimensional image to obtain the first detection image is not limited in the embodiment of the present disclosure, and can be flexibly selected according to the actual situation.
  • the detection network is used to obtain the detection frame output by the target object detection network, and the two-dimensional image is clipped based on the detection frame to obtain the first detection image.
  • the implementation manner of the target object detection network is not limited in the embodiments of the present disclosure, and any neural network with an object detection function may be used as an implementation form of the target object detection network.
  • the first image correspondence between the depth map and the two-dimensional image may also be determined based on depth image information included in the depth map.
  • the first image corresponding relationship may be an image coordinate transformation relationship between the depth map and the two-dimensional image.
  • the method of determining the corresponding relationship of the first image based on the depth image information can be flexibly determined according to the actual situation. In some possible implementations, it can be combined with The information such as the size, resolution, and the position of the corner points of the two-dimensional image is used to determine the position transformation relationship of the pixels between the depth map and the two-dimensional image as the corresponding relationship of the first image.
  • the aligned two-dimensional image is used as the transformed two-dimensional image, and based on the image correspondence between the transformed two-dimensional image and the two-dimensional image, the first image correspondence between the depth map and the two-dimensional image can be determined.
  • the depth map and the two-dimensional image can be directly determined
  • the correspondence between the first images is mutual correspondence.
  • the implementation order of S1211 and S1212 can be flexibly determined according to the actual situation, and can be implemented simultaneously or sequentially in a certain order, etc., which are not limited in the embodiments of the present disclosure.
  • the position and size of the target object in the depth map can be determined, so as to obtain the location of the target object in the depth map The second detection image of .
  • the second detection image may also be an image occupied by the whole and/or part of the target object in the depth map, and its implementation may refer to the first detection image, which will not be repeated here.
  • the specific process of obtaining the second detection image can also be flexibly selected according to the actual situation.
  • the position of the first detection image in the two-dimensional image can be transformed into the depth map through the corresponding relationship of the first image, so as to determine the target position of the object in the depth map, and crop the depth map based on the position to obtain a second detection image.
  • the target size of the target object in the depth map can be determined according to the size of the second detection image.
  • the target size is determined based on which size of the second detection image is not limited in this embodiment of the present disclosure.
  • the target size may be a size determined based on the length and/or width of the second detection image, In some possible implementation manners, the target size may also be a size having a maximum value or a minimum value among the length and width of the second detection image.
  • the size of the second detection image may be the overall size and/or partial size of the target object
  • the overall size of the target object can be deduced according to the partial size, for example, according to the size ratio between the face and the human body of most faces, the partial size Convert to the overall size to obtain the target size
  • the partial size can also be directly used as the target size
  • the preset size threshold can be the threshold set according to the partial size of the target object
  • the preset size threshold may be a size threshold set based on the face size of the target object.
  • a two-dimensional image can be used to locate the target object, and the first image correspondence between the two-dimensional image and the depth map can be used to conveniently determine the target size of the target object in the depth map.
  • the size determination method is more convenient and has higher accuracy, thereby improving the efficiency and accuracy of living body detection.
  • the method proposed in the embodiment of the present disclosure may further include: performing image quality detection on the first detection image to obtain the image quality detection result; when the image quality detection result is greater than the preset quality threshold In the case of , based on the depth image information included in the depth map, determine the first image correspondence between the depth map and the two-dimensional image.
  • the image quality detection result may include the image quality of the first detected image under one or more evaluation criteria, and the evaluation standard may be flexibly set according to the actual situation, and is not limited to the following disclosed embodiments, for example, it may include clarity , completeness or brightness and other one or more quality evaluation criteria.
  • the manner of performing image quality detection on the first detection image is not limited in this embodiment of the present disclosure, and may be flexibly selected according to actual conditions.
  • the first detected image can be input into the quality detection network to obtain the image quality detection result output by the quality detection network, wherein the quality detection network can be any neural network with image quality detection function, in this paper
  • the output image quality detection result may be a comprehensive detection result under the above-mentioned multiple evaluation standards, or may be individual evaluation results under one or more evaluation standards.
  • image quality detection on the first detection image through a relevant image quality detection algorithm, for example, determine the integrity of the first detection image through corner point detection, and determine the second detection image through a sharpness recognition method. Detecting the sharpness quality of the image, or determining the quality of lightness and darkness of the first detecting image based on the color values of the pixels in the first detecting image.
  • respective preset quality thresholds may be set for multiple judging criteria, and the image quality detection results under at least one judging standard are compared with the preset quality thresholds respectively, and at least one judging criterion When the image quality detection results under the standard are all greater than their corresponding preset quality thresholds, it is considered that the image quality detection results are greater than the preset quality thresholds.
  • a comprehensive image quality detection result may also be obtained based on the image quality detection result under at least one evaluation standard, and the comprehensive image quality detection result is compared with the set comprehensive preset quality threshold to obtain Get the comparison result.
  • the image quality detection result is greater than the preset quality threshold, it can be considered that the quality of the first detection image meets the requirements of living body detection, and in this case, it can go to S1212.
  • the image quality detection when the image quality detection result is greater than the preset quality threshold, enter the follow-up process such as determining the first image correspondence between the depth map and the two-dimensional image, the image quality detection can be used for subsequent entry
  • the image quality of the living body detection process is screened, thereby improving the image quality of the input image during the living body detection process, and then improving the accuracy of the living body detection.
  • the image quality detection result when the image quality detection result is less than or equal to the preset quality threshold, it may be considered that the quality of the first detection image is low, and correspondingly, the 2D image corresponding to the first detection image The image quality may also be low, in which case the liveness detection result based on the two-dimensional image is highly likely to be inaccurate. Therefore, in a possible implementation manner, when the image quality detection result is less than or equal to the preset quality threshold, the living body detection based on the acquired two-dimensional image may be stopped.
  • a new depth map and two-dimensional image can be acquired again, and through the living body detection method proposed in the embodiment of the present disclosure, based on the newly acquired
  • the depth map and two-dimensional image of the image can be used to realize the living body detection, etc.; in some possible implementations, it is also possible to directly exit the living body detection process, etc.
  • S12 may include: acquiring the living body detection distance of the target object based on the depth image information contained in the depth map; when the living body detection distance is greater than the preset distance threshold, the target living body detection method includes: based on Liveness detection of two-dimensional images; in the case that the living body detection distance is less than or equal to the preset distance threshold, target living body detection methods include: liveness detection based on depth maps and two-dimensional images.
  • the living body detection distance can be the distance between the target object and the living body detection device. How to obtain the living body detection distance based on the depth image information contained in the depth map can be flexibly determined according to the actual situation, and is not limited to the following public implementations. example.
  • the distance between the target object and the image acquisition device may be determined according to the depth distance represented by at least one pixel in the depth map, and the distance between the image acquisition device and the living body detection device may be corresponding relationship, to determine the liveness detection distance between the target object and the liveness detection device; in a possible implementation, when the liveness detection device itself includes an image acquisition device, it can be based on at least one pixel reflected in the depth map The depth distance directly determines the liveness detection distance between the target object and the liveness detection device.
  • the living body detection distance may be compared with a preset distance threshold to determine a target living body detection method.
  • the distance of the preset distance threshold can also be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
  • the target object in the depth map may have low definition.
  • the accuracy of live detection based on the depth map is low, which may affect the Overall accuracy of liveness detection. Therefore, in a possible implementation, when the living body detection distance is greater than the preset distance threshold, the target living body detection method can be determined as the living body detection based on the two-dimensional image, so as to omit the living body detection process based on the depth map, While improving the accuracy of liveness detection, the calculation amount of liveness detection is reduced, and the efficiency of liveness detection is improved.
  • the target object in the depth map may be relatively clear.
  • the liveness detection of the target object may be performed based on the depth map. Therefore, in a possible implementation, when the living body detection distance is less than or equal to the preset distance threshold, the target living body detection method can be determined as the living body detection based on the depth map and the two-dimensional image, so as to improve the accuracy of the living body detection. precision.
  • the implementation forms of the living body detection based on the depth map and the two-dimensional image can also refer to the above-mentioned disclosed embodiments, which will not be repeated here.
  • the depth map can be omitted and a two-dimensional image that is less affected by the distance can be selected for living body detection, which improves the accuracy of living body detection and reduces the depth.
  • the influence of the graph on the liveness detection distance improves the recognition distance of the liveness detection.
  • the two-dimensional image may include an infrared image and/or a color image
  • the target living body detection method may include a detection method based on a two-dimensional image, or a detection method based on a depth map and a two-dimensional image
  • the target living detection method may include: live detection based on at least two images, wherein the at least two images may be a depth map and an infrared image, a depth map and a color image, an infrared image and a color image images, or depth maps, infrared images, and color images.
  • S13 may include: based on at least two kinds of images, perform liveness detection on the target object by means of target liveness detection to obtain at least two intermediate liveness detection results; obtain at least two intermediate liveness detection results corresponding weights; based on the weights and at least two intermediate living body detection results, the living body detection results of the target object are obtained.
  • the intermediate living body detection result may be a detection result obtained by performing living body detection based on one of the images, since the target living body detection method may include living body detection based on at least two images, correspondingly, it may be obtained separately from at least two images Corresponding to at least two intermediate living body detection results.
  • liveness detection can be performed based on depth maps, infrared images, and color images.
  • intermediate liveness detection results corresponding to depth maps and intermediate liveness detection results corresponding to infrared images can be obtained respectively.
  • the living body detection can be performed based on the infrared image and the color image.
  • an intermediate living body detection result corresponding to the infrared image and an intermediate living body detection result corresponding to the color image can be respectively obtained.
  • weights corresponding to different intermediate living body detection results can be further obtained, and weighted summation is performed according to the weight and at least two intermediate living body detection results to obtain the living body detection result of the target object.
  • the method of obtaining the weights corresponding to different intermediate living body detection results can be flexibly determined according to the actual situation.
  • the respective weights can be preset for different intermediate living body detection results and the preset weights can be directly to read.
  • adaptive weights adapted to the actual conditions of the at least two images may also be acquired in other manners. Wherein, the manner of acquiring the adaptive weight can be flexibly determined according to the actual conditions of at least two images, see the following disclosed embodiments for details, and will not be expanded here.
  • weights of intermediate liveness detection results corresponding to the same type of images may be different.
  • the weight of the intermediate living body detection result corresponding to the infrared image may be A
  • the weight of the intermediate living body detection result corresponding to the infrared image may be B
  • the values of A and B may be different or the same, which is flexible according to the actual situation It only needs to be determined, and there is no limitation in this embodiment of the present disclosure.
  • the process of obtaining the living body detection result of the target object based on the weight and at least two intermediate living body detection results is not limited in the embodiment of the present disclosure. In a possible implementation manner, at least two intermediate living body detection results can be respectively corresponding to it The weights are multiplied and then summed to obtain the liveness detection result of the target object.
  • the weight of the depth map live body detection results can be reduced by adaptive weighting, so that the depth map can also be reduced when it is attacked by a 3D prosthesis.
  • the impact of the corresponding living body detection results further improves the accuracy of living body detection.
  • obtaining weights corresponding to at least two intermediate live body detection results may include: determining weights corresponding to at least two intermediate live body detection results based on the training results of the weighted network layer in the live body detection network, Among them, the living body detection network is used to detect the living body of the target object through the target living body detection method. Alternatively, according to the depth image information and/or the two-dimensional image information contained in the two-dimensional image, the weights corresponding to at least two intermediate living body detection results are determined respectively.
  • the living body detection network may be a network used to detect the living body of the target object, and its implementation form is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments.
  • the living body detection network may include at least a first network branch and a second network branch, wherein the first network branch may be used to realize living body detection based on two-dimensional images, and the second network branch may be used to It is used to realize liveness detection based on depth map.
  • the two-dimensional images may include infrared images and/or color images, therefore, in a possible implementation manner, the number of first network branches may be two, which are respectively used to implement infrared-based Image liveness detection and color image based liveness detection.
  • Different branches in the liveness detection network can be trained together or individually.
  • the embodiment of the present disclosure does not limit the training method of the liveness detection network, and any neural network training method can be used to train the liveness detection network.
  • the target liveness detection method includes depth maps and infrared images.
  • the infrared image can be input into the first network branch corresponding to the infrared image, and the depth map can be input into the second network branch, so as to realize the living body detection under the target living body detection mode;
  • the target living detection method includes living detection based on depth map, infrared image and color image
  • the infrared image can be input into the first network branch corresponding to the infrared image
  • the color image can be input into the first network corresponding to the color image branch, and input the depth map into the second network branch, so as to realize the liveness detection under the target liveness detection mode.
  • FIG. 4 shows a schematic diagram of a network structure of a living body detection network according to an embodiment of the present disclosure.
  • the living body detection network may further include a weighted network layer, which may be connected with the weighted network layer respectively.
  • the second network branch is connected to the output end of the first network branch, so as to carry out weighted summation on the intermediate living body detection results output by the second network branch and the first network branch, so as to obtain the living body detection result of the target object.
  • the training of the weighted network layer can also be realized.
  • weights corresponding to at least two intermediate living body detection results may be determined.
  • the weight may also be determined according to the depth image information and/or the two-dimensional image information included in the two-dimensional image.
  • determining the weight based on the depth image information may be based on the living body detection distance in the depth image information to determine the weight of the intermediate living body detection result corresponding to the depth image.
  • the accuracy of the intermediate liveness detection result corresponding to the depth map may be low, so a smaller weight can be assigned to it, and the specific correspondence between the weight and the liveness detection distance can be flexibly set according to the actual situation.
  • the two-dimensional image information may be related information included in the two-dimensional image, such as information such as the size and brightness of the two-dimensional image, which is not limited in this embodiment of the present disclosure.
  • the weight is determined based on two-dimensional image information, and its implementation method can also be flexibly determined. In some possible implementation methods, in the case of high brightness, the intermediate living body detection based on the color image is relatively more accurate.
  • the preset brightness threshold assigns a higher weight to the intermediate living body detection result corresponding to the color image when the brightness of the color image exceeds the preset brightness threshold, where the preset brightness
  • the value of the threshold and the value of the assigned weight are not limited in the embodiments of the present disclosure, and can be flexibly selected according to actual conditions.
  • the intermediate living body detection based on the infrared image is relatively more accurate, so in the same way, when the size of the infrared image is large, the infrared image Assign higher weights etc.
  • the weights of different intermediate living body detection results can be flexibly determined in two ways, and the flexibility of the living body detection process can be improved, wherein the weights corresponding to different intermediate living body detection results are adaptively determined through a neural network, so that Realize end-to-end liveness detection, improve the efficiency and accuracy of liveness detection; and adaptively determine the weight of different intermediate liveness detection results according to the actual situation of the liveness detection image, so that the obtained liveness detection results are more in line with the real situation, further improving the liveness Detection accuracy.
  • the target living body detection method may include living body detection based on a depth map and a two-dimensional image
  • S13 may include: using at least one first network branch in the living body detection network to detect the target object in the two-dimensional image Live body detection is performed on the first detected image. And, through the second network branch in the living body detection network, live body detection is performed on the second detection image where the target object is located in the depth map.
  • the implementation forms of the living body detection network, the first network branch, the second network branch, the first detection image and the second detection image can refer to the above disclosed embodiments, and will not be repeated here.
  • the first detection image can be the image where the target object is extracted from the two-dimensional image
  • inputting the first detection image to the first network branch for live body detection can effectively reduce the amount of computation in the live body detection process, Improve the efficiency of liveness detection.
  • the first network branch may include the first network branch corresponding to the infrared image and the first network branch corresponding to the color image, in order to realize the detection of the first detection image where the target object is located in the two-dimensional image.
  • only the first detection image extracted from the infrared image can be input into the first network branch corresponding to the infrared image, or only the first detection image extracted from the color image can be input.
  • the image is input to the first network branch corresponding to the color image, and the first detected image extracted from the infrared image and the color image can also be input to the first network branch corresponding to each.
  • the second detection image may be the image where the target object is extracted from the depth map
  • inputting the second detection image to the second network branch for liveness detection can also improve the efficiency of liveness detection.
  • the target living body detection method includes the living body detection based on the depth map and the two-dimensional image at the same time
  • the intermediate living body detection corresponding to the two-dimensional image can be quickly obtained by using the first detection image with a smaller size
  • the intermediate living body detection result corresponding to the depth map is obtained by using the second detection image at the same time, so that the living body detection result of the target object can be obtained more accurately through multiple intermediate living body detection results, and the accuracy of the living body detection is improved while ensuring the accuracy of the living body detection. efficiency.
  • the target living body detection method may include living body detection based on a two-dimensional image
  • S13 may include: using at least one first network branch in the living body detection network to detect the second branch of the target object in the two-dimensional image
  • a detection image is used for liveness detection.
  • the depth map when the depth map is unclear or the distance is far away, the depth map can be omitted and the living body detection can be realized through the two-dimensional image, thereby improving the overall accuracy of the living body detection.
  • the detection method of the target living body may include the living body detection based on the two-dimensional image
  • S13 may include: acquiring the first detection image where the target object is located in the two-dimensional image; The corresponding relationship between the second image, combined with the first detection image, to obtain the third detection image of the target object in the original two-dimensional image; through at least one first network branch in the living body detection network, perform liveness detection on the third detection image .
  • the second image corresponding relationship may be an image coordinate transformation relationship between the two-dimensional image and the original image.
  • the two-dimensional image may be an image obtained after registration processing is performed on the original two-dimensional image, so during the registration process, the second The correspondence between the two images.
  • the first detection image is the image where the target object is located extracted from the two-dimensional image, and based on the corresponding relationship of the second image, the first detection image where the target object is located can be extracted from the original two-dimensional image.
  • Three detection images the coordinate position of the first detection image in the two-dimensional image can be transformed through the second image correspondence to obtain the coordinate position of the target object in the original two-dimensional image, based on the coordinate The position is used to crop the original two-dimensional image to obtain a third detection image.
  • the third detection image may also include the third detection image extracted from the original infrared image.
  • registration processing such as cropping and/or scaling may be performed on the original 2D image, so that the resolution or definition of the 2D image is lower than the original 2D image.
  • image so the third detection image obtained from the original two-dimensional image can have higher image quality than the first detection image extracted from the two-dimensional image, and the accuracy of living body detection based on the third detection image Can also be higher.
  • the third detection image with higher resolution intercepted in the original infrared image and/or the original color image can be used to detect Live detection is performed to effectively improve the accuracy of live detection, and more accurate live detection results can be obtained even when the depth map is omitted.
  • the living body detection method proposed by the embodiment of the present disclosure may further include: when the target object is determined to be a living body based on the living body detection result, identifying the target object according to the two-dimensional image.
  • identifying the target object based on the two-dimensional image may include identifying the target object based on a color image, or identifying the target object based on an infrared image, or identifying the target object based on a color image and an infrared image. Identification.
  • the specific manner of identity recognition is not limited in the embodiment of the present disclosure, and any process that can realize identity recognition based on images can be used as the realization manner of identity recognition.
  • the identity recognition of the target object can be realized through any neural network with identity recognition function.
  • the process may end without identifying the target object.
  • the target object can be identified when it is determined that the target object is a living body, which saves the identification process when the target object is not a living body, and improves the efficiency and confidence of identification.
  • Fig. 5 shows a block diagram of a living body detection device 20 according to an embodiment of the present disclosure.
  • the device includes: an image acquisition module 21, configured to acquire a depth map and a two-dimensional image of a target object.
  • the detection mode determination module 22 is configured to determine a target living body detection mode based on the depth image information included in the depth map.
  • the living body detection module 23 is configured to detect the living body of the target object through the target living body detection method based on the two-dimensional image, and obtain the living body detection result of the target object.
  • the detection mode determination module is used to: obtain the target size of the target object in the depth map based on the depth image information contained in the depth map; when the target size is smaller than the preset size threshold, the target living body
  • the detection method includes: living body detection based on a two-dimensional image; or, when the target size is greater than or equal to a preset size threshold, the target living body detection method includes: living body detection based on a depth map and a two-dimensional image.
  • the detection mode determination module is further used to: detect the target object on the two-dimensional image to obtain the first detection image of the target object in the two-dimensional image; determine the depth based on the depth image information contained in the depth map The first image correspondence between the map and the two-dimensional image; according to the first image correspondence, combined with the first detection image, a second detection image of the target object in the depth map is obtained; according to the size of the second detection image, the target object is determined Object size in the depth map.
  • the detection mode determination module is further configured to: perform image quality detection on the first detection image to obtain an image quality detection result; when the image quality detection result is greater than a preset quality threshold, The contained depth image information determines the first image correspondence between the depth map and the two-dimensional image.
  • the detection mode determination module is configured to: obtain the living body detection distance of the target object based on the depth image information contained in the depth map; Including: living body detection based on two-dimensional images; when the living body detection distance is less than or equal to the preset distance threshold, the target living body detection method includes: living body detection based on depth map and two-dimensional image.
  • the two-dimensional image includes an infrared image and/or a color image
  • the target living body detection method includes: living body detection based on at least two images, and the at least two images include a depth image, an infrared image, and a color image. at least two; the living body detection module is used for: based on at least two kinds of images, through the target live body detection method to carry out live body detection on the target object, to obtain at least two intermediate live body detection results, wherein the at least two intermediate live body detection results are respectively the same as at least The two images correspond; weights corresponding to at least two intermediate living body detection results are obtained; based on the weights and the at least two intermediate living body detection results, the living body detection results of the target object are obtained.
  • the living body detection module is further configured to: determine weights corresponding to at least two intermediate living body detection results based on the training results of the weighted network layer in the living body detection network, wherein the living body detection network is used to pass the target Liveness detection is performed on the target object in the liveness detection mode; or, according to the depth image information and/or the two-dimensional image information contained in the two-dimensional image, the weights corresponding to at least two intermediate liveness detection results are determined respectively.
  • the target living detection method includes living detection based on a depth map and a two-dimensional image; the living detection module is configured to: use at least one first network branch in the living detection network to detect the Liveness detection is performed on the first detection image where the object is located; and liveness detection is performed on the second detection image where the target object is located in the depth map through the second network branch in the liveness detection network.
  • the image acquisition module is used to: acquire the depth map of the target object and the original two-dimensional image; based on the depth map, perform registration processing on the original two-dimensional image to obtain a two-dimensional image registered with the depth map images, wherein the registration process includes cropping and/or scaling.
  • the target living detection method includes living detection based on two-dimensional images; the living detection module is used to: obtain the first detection image where the target object is located in the two-dimensional image; The second image correspondence between the images is combined with the first detection image to obtain a third detection image of the target object in the original two-dimensional image; through at least one first network branch in the living body detection network, liveness is performed on the third detection image detection.
  • the device is further configured to: identify the target object according to the two-dimensional image when it is determined that the target object is a living body based on the living body detection result.
  • the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
  • Fig. 6 shows a schematic diagram of an application example according to the present disclosure.
  • an embodiment of the present disclosure proposes a living body detection method, and the living body detection process may include the following process:
  • S31 Collect an image of a person subject to be detected by the camera, and obtain an original depth image D, an original infrared image I, and an original RGB image V of the person object from the camera.
  • the adaptive weight can be obtained by the living body detection network, and can also be obtained from the image information in the original depth map D, the original infrared image I and the original RGB image V, where the image information can include the living body detection distance, image brightness or image size, etc. .
  • the living body detection method proposed in the application example of the disclosure can support a longer recognition distance and is easier to apply; it has higher defense and detection accuracy, and also has a higher pass rate of real people; in addition, the application example of the disclosure proposes
  • the liveness detection network can be obtained by deforming the relevant liveness detection network model, which is easy to implement.
  • the second network branch of the liveness detection network based on the depth map can be trained separately, and the training method is more flexible and easy to train.
  • the living body detection method proposed in the application example of the present disclosure can be used in scenarios such as face access control and face payment, which facilitates farther-distance face-swiping traffic and payment, and is more convenient. At the same time, higher defense can also improve the security of access control and property.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor.
  • the computer readable storage medium may be a non-transitory computer readable storage medium.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure also provides a computer program product, including computer readable codes.
  • the processor in the device executes the method for implementing the living body detection method provided in any of the above embodiments. instruction.
  • the embodiments of the present disclosure also provide another computer program product, which is used for storing computer-readable instructions, and when the instructions are executed, the computer executes the operations of the living body detection method provided in any of the above-mentioned embodiments.
  • Embodiments of the present disclosure also provide another computer program product, including computer-readable codes, or a volatile computer-readable storage medium or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer can
  • the processor in the electronic device executes instructions for implementing the living body detection method provided in any one of the above embodiments.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • FIG. 7 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
  • electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
  • the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • the power supply component 806 provides power to various components of the electronic device 800 .
  • Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
  • the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 .
  • the audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
  • the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • NFC near field communication
  • the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmable gate array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
  • FIG. 8 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs.
  • the application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server TM , Mac OS X TM , UnixTM, Linux TM , FreeBSD TM or the like.
  • the modules contained in the living body detection device 20 correspond to the hardware modules contained in the electronic equipment provided as terminals, servers or other forms of equipment. It is a flexible decision and is not limited to the following disclosed embodiments.
  • each module contained in the life detection device 20 may correspond to the processing component 802 in the electronic device in the form of a terminal; in one example, each module contained in the life detection device 20 may also It corresponds to the processing unit 1922 in the electronic device in the form of a server.
  • a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
  • the present disclosure can be a system, method and/or computer program product.
  • a computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disc read only memory
  • DVD digital versatile disc
  • memory stick floppy disk
  • mechanically encoded device such as a printer with instructions stored thereon
  • a hole card or a raised structure in a groove and any suitable combination of the above.
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, including object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as via the Internet using an Internet service provider). connect).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA)
  • FPGA field programmable gate array
  • PDA programmable logic array
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically realized by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. Wait.
  • a software development kit Software Development Kit, SDK

Landscapes

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

Abstract

The present disclosure relates to a living body detection method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring a depth map and a two-dimensional image of a target object; on the basis of depth image information included in the depth map, determining a target living body detection means; and, on the basis of the two-dimensional image, performing living body detection on the target object by using the target living body detection means, and obtaining a living body detection result for the target object.

Description

活体检测方法及装置、电子设备和存储介质Liveness detection method and device, electronic equipment and storage medium
本申请要求2021年06月30日提交、申请号为202110737711.7,发明名称为“活体检测方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on June 30, 2021, with the application number 202110737711.7, and the title of the invention is "living body detection method and device, electronic equipment and storage medium", the entire content of which is incorporated in this application by reference .
技术领域technical field
本公开涉及图像处理技术领域,尤其涉及一种活体检测方法及装置、电子设备和存储介质。The present disclosure relates to the technical field of image processing, and in particular to a living body detection method and device, electronic equipment, and a storage medium.
背景技术Background technique
活体检测可以在人脸识别的相关应用中起关键作用,能够用于防止攻击者使用假体进行人脸伪造。因此,如何提高活体检测的精度,成为计算机视觉领域中一个亟待解决的问题。Liveness detection can play a key role in related applications of face recognition, and can be used to prevent attackers from using prostheses for face forgery. Therefore, how to improve the accuracy of liveness detection has become an urgent problem to be solved in the field of computer vision.
发明内容Contents of the invention
本公开提出了一种活体检测技术方案。The present disclosure proposes a living body detection technical solution.
根据本公开的一方面,提供了一种活体检测方法,包括:According to an aspect of the present disclosure, a living body detection method is provided, comprising:
获取目标对象的深度图和二维图像;基于所述深度图包含的深度图像信息,确定目标活体检测方式;基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到所述目标对象的活体检测结果。Acquiring a depth map and a two-dimensional image of the target object; determining a target living body detection method based on the depth image information contained in the depth map; based on the two-dimensional image, performing a living body detection on the target object through the target living body detection method , to obtain the liveness detection result of the target object.
本公开实施例中,二维图像可以包括红外图像和/或彩色图像,目标活体检测方式可以包括基于深度图像、红外图像以及彩色图中的至少两种图像的活体检测,深度图像信息可以包括深度图像的尺寸信息和/或距离信息,通过本公开实施例,可以基于深度图包含的深度图像信息,充分考虑到活体检测的实际深度情况,灵活选择合适的目标活体检测方式以实现活体检测,提升了活体检测的精度和灵活程度。In the embodiment of the present disclosure, the two-dimensional image may include an infrared image and/or a color image, and the target living detection method may include living detection based on at least two images in a depth image, an infrared image, and a color image, and the depth image information may include depth The size information and/or distance information of the image, through the embodiments of the present disclosure, based on the depth image information contained in the depth map, fully consider the actual depth of the living body detection, and flexibly select the appropriate target living body detection method to realize the living body detection. It improves the accuracy and flexibility of liveness detection.
在一种可能的实现方式中,所述基于所述深度图包含的深度图像信息,确定目标活体检测方式,包括:基于所述深度图包含的深度图像信息,获取所述目标对象在所述深度图中的目标尺寸;在所述目标尺寸小于预设尺寸阈值的情况下,所述目标活体检测方式包括:基于所述二维图像的活体检测;或,在所述目标尺寸大于或等于预设尺寸阈值的情况下,所述目标活体检测方式包括:基于所述深度图和所述二维图像的活体检测。In a possible implementation manner, the determining the detection mode of the target living body based on the depth image information contained in the depth map includes: acquiring the target object at the depth based on the depth image information contained in the depth map. The target size in the figure; when the target size is smaller than the preset size threshold, the target living detection method includes: living detection based on the two-dimensional image; or, when the target size is greater than or equal to the preset In the case of a size threshold, the detection method of the target living body includes: living body detection based on the depth map and the two-dimensional image.
本公开实施例中,基于二维图像的活体检测可以包括基于红外图像和/或彩色图像的活体检测,基于深度图和二维图像的活体检测可以包括基于深度图和红外图像的活体检测、基于深度图和彩色图像的活体检测、或是基于深度图、红外图像以及彩色图像的活体检测,通过本公开实施例,可以在深度图中目标对象的尺寸较小的情况下,省略深度图而选择较为清晰的二维图像来进行活体检测,一方面减少了由于不清晰的深度图对活体检测精度的影响,提升了活体检测的精度,另一方面也可以减少深度图在活体检测距离上的影响,提升了活体检测的识别距离。In the embodiments of the present disclosure, the living body detection based on two-dimensional images may include living body detection based on infrared images and/or color images, and the living body detection based on depth maps and two-dimensional images may include living body detection based on depth maps and infrared images, based on For liveness detection based on depth maps and color images, or liveness detection based on depth maps, infrared images, and color images, through the embodiments of the present disclosure, when the size of the target object in the depth map is small, the depth map can be omitted and selected A clearer two-dimensional image is used for live detection. On the one hand, it reduces the impact of the unclear depth map on the live detection accuracy and improves the accuracy of live detection. On the other hand, it can also reduce the impact of the depth map on the live detection distance. , which improves the recognition distance of liveness detection.
在一种可能的实现方式中,所述基于所述深度图包含的深度图像信息,获取所述目标对象在所述深度图中的目标尺寸,包括:对所述二维图像进行目标对象检测,得到所述二维图像中所述目标对象的第一检测图像;基于所述深度图包含的深度图像信息,确定所述深度图与所述二维图像之间的第一图像对应关系;根据所述第一图像对应关系,结合所述第一检测图像,得到所述深度图中所述目标对象的第二检测图像;根据所述第二检测图像的尺寸,确定所述目标对象在所述深度图中的目标尺寸。In a possible implementation manner, the acquiring the target size of the target object in the depth map based on the depth image information contained in the depth map includes: performing target object detection on the two-dimensional image, Obtaining a first detection image of the target object in the two-dimensional image; determining a first image correspondence between the depth map and the two-dimensional image based on the depth image information included in the depth map; according to the The first image correspondence relationship, combined with the first detection image, obtains the second detection image of the target object in the depth map; according to the size of the second detection image, determine the depth of the target object The target dimensions in the figure.
本公开实施例中,第一检测图像可以包括红外图像中目标对象所在位置的图像和/或彩色图像中目标对象所在位置的图像,第二检测图像可以包括深度图中目标对象所在位置的图像,目标尺寸可以包括第二检测图像的长度尺寸和/或宽度尺寸,通过本公开实施例,可以利用二维图像对目标对象进行定位,并利用二维图像与深度图之间的第一图像对应关系来便捷地确定目标对象在深度图中的目标尺寸,这种目标尺寸的确定方式更为便捷且具有较高的精度,从而提升活体检测的效率和精度。In the embodiment of the present disclosure, the first detection image may include an image of the location of the target object in the infrared image and/or an image of the location of the target object in the color image, and the second detection image may include an image of the location of the target object in the depth map, The target size may include the length and/or width of the second detection image. Through the embodiments of the present disclosure, the target object may be positioned using the two-dimensional image, and the first image correspondence between the two-dimensional image and the depth map may be used. To conveniently determine the target size of the target object in the depth map, this method of determining the target size is more convenient and has higher accuracy, thereby improving the efficiency and accuracy of liveness detection.
在一种可能的实现方式中,在所述对所述二维图像进行目标对象检测,得到所述二维图像中所述 目标对象的第一检测图像之后,所述方法还包括:对所述第一检测图像进行图像质量检测,得到图像质量检测结果;在所述图像质量检测结果大于预设质量阈值的情况下,基于所述深度图包含的深度图像信息,确定所述深度图与所述二维图像之间的第一图像对应关系。In a possible implementation manner, after the target object detection is performed on the two-dimensional image to obtain the first detected image of the target object in the two-dimensional image, the method further includes: detecting the target object in the two-dimensional image Perform image quality detection on the first detection image to obtain an image quality detection result; if the image quality detection result is greater than a preset quality threshold, determine the relationship between the depth map and the depth image based on the depth image information contained in the depth map. A first image correspondence between two-dimensional images.
本公开实施例中,通过在图像质量检测结果大于预设质量阈值的情况下,进入确定深度图与二维图像之间的第一图像对应关系等后续过程,可以利用图像质量检测,对后续进入活体检测过程的图像质量进行筛选,从而提升活体检测过程中输入图像的图像质量,继而提升活体检测的精度。In the embodiment of the present disclosure, when the image quality detection result is greater than the preset quality threshold, enter the follow-up process such as determining the first image correspondence between the depth map and the two-dimensional image, the image quality detection can be used for subsequent entry The image quality of the living body detection process is screened, thereby improving the image quality of the input image during the living body detection process, and then improving the accuracy of the living body detection.
在一种可能的实现方式中,所述基于所述深度图包含的深度图像信息,确定目标活体检测方式,包括:基于所述深度图包含的深度图像信息,获取所述目标对象的活体检测距离;在所述活体检测距离大于预设距离阈值的情况下,所述目标活体检测方式包括:基于所述二维图像的活体检测;在所述活体检测距离小于或等于预设距离阈值的情况下,所述目标活体检测方式包括:基于所述深度图和所述二维图像的活体检测。In a possible implementation manner, the determining the target living body detection method based on the depth image information included in the depth map includes: acquiring the living body detection distance of the target object based on the depth image information included in the depth map ; In the case where the living body detection distance is greater than a preset distance threshold, the target living body detection method includes: living body detection based on the two-dimensional image; in the case where the living body detection distance is less than or equal to a preset distance threshold , the target liveness detection method includes: liveness detection based on the depth map and the two-dimensional image.
本公开实施例中,活体检测距离可以包括目标对象与活体检测装置之间的距离,通过本公开实施例,可以在目标对象与活体检测装置距离较远的情况下,省略深度图而选择较为受距离影响较小的二维图像来进行活体检测,提升活体检测精度的同时,减少深度图在活体检测距离上的影响,提升了活体检测的识别距离。In the embodiment of the present disclosure, the living body detection distance may include the distance between the target object and the living body detection device. Through the embodiment of the present disclosure, when the distance between the target object and the living body detection device is relatively far, the depth map may be omitted and a more affected object may be selected. Two-dimensional images with less distance influence are used for liveness detection, which improves the accuracy of liveness detection while reducing the influence of depth maps on the distance of liveness detection and improving the recognition distance of liveness detection.
在一种可能的实现方式中,所述二维图像包括红外图像和/或彩色图像,所述目标活体检测方式包括:基于至少两种图像的活体检测,所述至少两种图像包括所述深度图像、所述红外图像以及所述彩色图像中的至少两种;所述基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到所述目标对象的活体检测结果,包括:基于所述至少两种图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到至少两种中间活体检测结果,其中,所述至少两种中间活体检测结果分别与所述至少两种图像对应;获取所述至少两种中间活体检测结果分别对应的权重;基于所述权重与所述至少两种中间活体检测结果,得到所述目标对象的活体检测结果。In a possible implementation manner, the two-dimensional image includes an infrared image and/or a color image, and the target living body detection method includes: living body detection based on at least two images, and the at least two images include the depth At least two of the image, the infrared image, and the color image; based on the two-dimensional image, the living body detection of the target object is performed through the target living body detection method to obtain the living body detection of the target object The results include: based on the at least two images, performing liveness detection on the target object through the target liveness detection method to obtain at least two intermediate liveness detection results, wherein the at least two intermediate liveness detection results are respectively the same as The at least two types of images correspond; weights corresponding to the at least two intermediate living body detection results are obtained; based on the weights and the at least two intermediate living body detection results, the living body detection results of the target object are obtained.
本公开实施例中,基于至少两种图像的活体检测,可以包括基于深度图和红外图像的活体检测、基于深度图和彩色图像的活体检测、基于红外图像和彩色图像的活体检测以及基于深度图、红外图像和彩色图像的活体检测,至少两种中间活体检测结果可以包括深度图活体检测结果、红外图像活体检测结果、彩色图像活体检测结果中的至少两种,通过本公开实施例,可以在包含至少两种中间活体检测结果的情况下,通过自适应加权的方式降低深度图活体检测结果的权重,从而在受到3D假体攻击的情况下也可以降低深度图对应的活体检测结果所产生的影响,进一步提升活体检测的精度。In the embodiment of the present disclosure, the living body detection based on at least two kinds of images may include living body detection based on depth map and infrared image, living body detection based on depth map and color image, living body detection based on infrared image and color image, and depth map based , liveness detection of infrared images and color images, at least two intermediate liveness detection results may include at least two of the depth map liveness detection results, infrared image liveness detection results, and color image liveness detection results, through the embodiments of the present disclosure, can be in In the case of including at least two intermediate liveness detection results, the weight of the liveness detection result of the depth map is reduced by adaptive weighting, so that the weight of the liveness detection result corresponding to the depth map can also be reduced in the case of being attacked by a 3D prosthesis. Influence, to further improve the accuracy of liveness detection.
在一种可能的实现方式中,所述获取所述至少两种中间活体检测结果分别对应的权重,包括:基于活体检测网络中加权网络层的训练结果,确定所述至少两种中间活体检测结果分别对应的权重,其中,所述活体检测网络用于通过所述目标活体检测方式对所述目标对象进行活体检测;或者,根据所述深度图像信息和/或所述二维图像包含的二维图像信息,确定所述至少两种中间活体检测结果分别对应的权重。In a possible implementation manner, the obtaining the weights corresponding to the at least two intermediate living body detection results includes: determining the at least two intermediate living body detection results based on the training results of the weighted network layer in the living body detection network Corresponding weights respectively, wherein, the living body detection network is used to detect the living body of the target object through the target living body detection method; or, according to the depth image information and/or the two-dimensional image contained in the two-dimensional image The image information is used to determine weights corresponding to the at least two intermediate living body detection results.
至少两种中间活体检测结果分别对应的权重,可以包括包含两种中间活体检测结果的情况下,两种中间活体检测结果各自对应的权重,也可以包括包含三种中间活体检测结果的情况下,三种中间活体检测结果各自对应的权重;根据深度图像和/或二维图像包含的二维图像信息所确定的权重,可以包括基于深度图中的距离确定的权重,或是基于二维图像的亮度或尺寸等所确定的权重等,通过本公开实施例,可以通过两种方式灵活地确定不同中间活体检测结果的权重,提升活体检测过程的灵活性,其中通过神经网络的方式自适应地确定不同中间活体检测结果对应的权重,从而实现端到端的活体检测,提升活体检测的效率和精度;而根据活体检测的图像的实际情况来自适应地确定不同中间活体检测结果的权重,使得得到的活体检测结果更加符合真实情况,进一步提升活体检测的精度。The weights corresponding to at least two intermediate living body detection results may include the respective weights corresponding to the two intermediate living body detection results when two kinds of intermediate living body detection results are included, and may also include the case where three intermediate living body detection results are included. The corresponding weights of the three intermediate living body detection results; the weights determined according to the two-dimensional image information contained in the depth image and/or the two-dimensional image may include the weight determined based on the distance in the depth map, or the weight determined based on the two-dimensional image The weights determined by the brightness or size, etc., through the embodiments of the present disclosure, can flexibly determine the weights of different intermediate living body detection results in two ways, and improve the flexibility of the living body detection process, wherein the neural network is adaptively determined. Weights corresponding to different intermediate liveness detection results, so as to realize end-to-end liveness detection, improve the efficiency and accuracy of liveness detection; and adaptively determine the weights of different intermediate liveness detection results according to the actual situation of the liveness detection image, so that the obtained liveness The detection results are more in line with the real situation, further improving the accuracy of live detection.
在一种可能的实现方式中,所述目标活体检测方式包括基于所述深度图和所述二维图像的活体检测;所述基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,包括:通过活体检测网络中的至少一个第一网络分支,对所述二维图像中所述目标对象所在的第一检测图像进行活体检测;以及,通过活体检测网络中的第二网络分支,对所述深度图中所述目标对象所在的第二检测图像进行活体检测。In a possible implementation manner, the target living body detection method includes living body detection based on the depth map and the two-dimensional image; based on the two-dimensional image, the target living body detection method is used to detect The liveness detection of the target object includes: performing liveness detection on the first detection image where the target object is located in the two-dimensional image through at least one first network branch in the liveness detection network; and, through the liveness detection network. The second network branch performs liveness detection on the second detection image where the target object is located in the depth map.
本公开实施例中,第一网络分支可以包括红外图像活体检测分支和/或彩色图像活体检测分支,第一检测图像可以包括红外图像中截取的人脸框和/或彩色图像中截取的人脸框,第二网络分支可以包括深度图活体检测分支,第二检测图像可以包括深度图中截取的人脸框,通过本公开实施例,可以在目标活体检测方式同时包括基于深度图和二维图像的活体检测的情况下,利用尺寸较小的第一检测图像,较快地得到二维图像对应的中间活体检测结果,同时利用第二检测图像得到与深度图对应的中间活体检测结果,从而通过多种中间活体检测结果共同较为精确地得到目标对象的活体检测结果,确保活体检测精度的同时提高了活体检测的效率。In the embodiment of the present disclosure, the first network branch may include an infrared image liveness detection branch and/or a color image liveness detection branch, and the first detection image may include a human face frame intercepted in an infrared image and/or a human face intercepted in a color image frame, the second network branch can include the depth map liveness detection branch, and the second detection image can include the face frame intercepted in the depth map. Through the embodiments of the present disclosure, the target liveness detection method can include both depth map and two-dimensional image based In the case of living body detection, use the first detection image with a smaller size to quickly obtain the intermediate living body detection result corresponding to the two-dimensional image, and at the same time use the second detection image to obtain the intermediate living body detection result corresponding to the depth map, so as to pass Multiple intermediate living body detection results jointly obtain the living body detection result of the target object more accurately, ensuring the accuracy of the living body detection and improving the efficiency of the living body detection.
在一种可能的实现方式中,所述获取目标对象的深度图和二维图像,包括:获取目标对象的深度图和原始二维图像;基于所述深度图,对所述原始二维图像进行配准处理,得到与所述深度图配准的所述二维图像,其中,所述配准处理包括裁剪处理和/或缩放处理。In a possible implementation manner, the acquiring the depth map and the two-dimensional image of the target object includes: acquiring the depth map and the original two-dimensional image of the target object; based on the depth map, performing Registration processing, obtaining the two-dimensional image registered with the depth map, wherein the registration processing includes cropping processing and/or scaling processing.
本公开实施例中,原始二维图像可以包括原始红外图像和/或原始彩色图,配准可以包括分辨率与空间位置上的配准,通过本公开实施例,可以获取与深度图配置的二维图像,便于后续基于二维图像确定深度图中目标对象的目标尺寸,以及获取第一检测图像和第二检测图像等,从而整体提升活体检测的检测效率。In the embodiment of the present disclosure, the original two-dimensional image may include the original infrared image and/or the original color map, and the registration may include the registration of resolution and spatial position. Through the embodiment of the present disclosure, the two-dimensional image configured with the depth map can be obtained. The two-dimensional image is convenient for subsequent determination of the target size of the target object in the depth map based on the two-dimensional image, and acquisition of the first detection image and the second detection image, etc., thereby improving the detection efficiency of the living body detection as a whole.
在一种可能的实现方式中,所述目标活体检测方式包括基于所述二维图像的活体检测;所述基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,包括:获取所述二维图像中所述目标对象所在的第一检测图像;根据所述二维图像与所述原始二维图像之间的第二图像对应关系,结合所述第一检测图像,得到所述原始二维图像中所述目标对象的第三检测图像;通过活体检测网络中的至少一个第一网络分支,对所述第三检测图像进行活体检测。In a possible implementation manner, the target living body detection method includes living body detection based on the two-dimensional image; based on the two-dimensional image, the target living body detection method is used to detect the target object's living body , comprising: acquiring a first detection image in the two-dimensional image where the target object is located; combining the first detection image according to a second image correspondence between the two-dimensional image and the original two-dimensional image , obtaining a third detection image of the target object in the original two-dimensional image; performing life detection on the third detection image through at least one first network branch in the life detection network.
本公开实施例中,第三检测图像可以包括原始红外图像中回归的人脸框和/或原始彩色图像中回归的人脸框,通过本公开实施例,可以在基于二维图像进行活体检测且省略深度图的情况下,通过在原始红外图像和/或原始彩色图像中截取的具有更高分辨率的第三检测图像来进行活体检测,从而有效提升活体检测的精度,在省略深度图的情况下也可以得到较为准确的活体检测结果。In the embodiment of the present disclosure, the third detection image may include the regressed face frame in the original infrared image and/or the regressed face frame in the original color image. Through the embodiment of the present disclosure, it is possible to perform living body detection based on a two-dimensional image and In the case of omitting the depth map, the living body detection is performed through the third detection image with higher resolution intercepted in the original infrared image and/or the original color image, thereby effectively improving the accuracy of the living body detection. In the case of omitting the depth map A more accurate biopsy result can also be obtained.
在一种可能的实现方式中,所述方法还包括:在基于所述活体检测结果确定所述目标对象为活体的情况下,根据所述二维图像,对所述目标对象进行身份识别。In a possible implementation manner, the method further includes: in a case where it is determined that the target object is a living body based on the living body detection result, identifying the target object according to the two-dimensional image.
通过本公开实施例,可以在确定目标对象为活体的情况下再对目标对象进行身份识别,节省了目标对象为非活体情况下的身份识别过程,提高身份识别的效率和置信度。Through the embodiments of the present disclosure, the target object can be identified when it is determined that the target object is a living body, which saves the identification process when the target object is not a living body, and improves the efficiency and confidence of identification.
根据本公开的一方面,提供了一种活体检测装置,包括:According to an aspect of the present disclosure, a living body detection device is provided, including:
图像获取模块,用于获取目标对象的深度图和二维图像;检测方式确定模块,用于基于所述深度图包含的深度图像信息,确定目标活体检测方式;活体检测模块,用于基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到所述目标对象的活体检测结果。The image acquisition module is used to acquire the depth map and two-dimensional image of the target object; the detection method determination module is used to determine the target living body detection method based on the depth image information contained in the depth map; the living body detection module is used to determine the detection method based on the A two-dimensional image, performing a liveness detection on the target object through the target liveness detection method, and obtaining a liveness detection result of the target object.
在一种可能的实现方式中,所述检测方式确定模块用于:基于所述深度图包含的深度图像信息,获取所述目标对象在所述深度图中的目标尺寸;在所述目标尺寸小于预设尺寸阈值的情况下,所述目标活体检测方式包括:基于所述二维图像的活体检测;或,在所述目标尺寸大于或等于预设尺寸阈值的情况下,所述目标活体检测方式包括:基于所述深度图和所述二维图像的活体检测。In a possible implementation manner, the detection mode determination module is configured to: acquire the target size of the target object in the depth map based on the depth image information included in the depth map; In the case of a preset size threshold, the target living detection method includes: live detection based on the two-dimensional image; or, when the target size is greater than or equal to the preset size threshold, the target living detection method Including: living body detection based on the depth map and the two-dimensional image.
在一种可能的实现方式中,所述检测方式确定模块进一步用于:对所述二维图像进行目标对象检 测,得到所述二维图像中所述目标对象的第一检测图像;基于所述深度图包含的深度图像信息,确定所述深度图与所述二维图像之间的第一图像对应关系;根据所述第一图像对应关系,结合所述第一检测图像,得到所述深度图中所述目标对象的第二检测图像;根据所述第二检测图像的尺寸,确定所述目标对象在所述深度图中的目标尺寸。In a possible implementation manner, the detection method determination module is further configured to: perform target object detection on the two-dimensional image to obtain a first detection image of the target object in the two-dimensional image; based on the The depth image information contained in the depth map determines a first image correspondence between the depth map and the two-dimensional image; according to the first image correspondence, combined with the first detection image, the depth map is obtained A second detection image of the target object; determining a target size of the target object in the depth map according to the size of the second detection image.
在一种可能的实现方式中,所述检测方式确定模块还用于:对所述第一检测图像进行图像质量检测,得到图像质量检测结果;在所述图像质量检测结果大于预设质量阈值的情况下,基于所述深度图包含的深度图像信息,确定所述深度图与所述二维图像之间的第一图像对应关系。In a possible implementation manner, the detection method determination module is further configured to: perform image quality detection on the first detection image to obtain an image quality detection result; when the image quality detection result is greater than a preset quality threshold In some cases, the first image correspondence between the depth map and the two-dimensional image is determined based on the depth image information included in the depth map.
在一种可能的实现方式中,所述检测方式确定模块用于:基于所述深度图包含的深度图像信息,获取所述目标对象的活体检测距离;在所述活体检测距离大于预设距离阈值的情况下,所述目标活体检测方式包括:基于所述二维图像的活体检测;在所述活体检测距离小于或等于预设距离阈值的情况下,所述目标活体检测方式包括:基于所述深度图和所述二维图像的活体检测。In a possible implementation manner, the detection mode determination module is configured to: acquire the living body detection distance of the target object based on the depth image information contained in the depth map; when the living body detection distance is greater than a preset distance threshold In the case where the target living body detection method includes: living body detection based on the two-dimensional image; when the living body detection distance is less than or equal to a preset distance threshold, the target living body detection method includes: based on the Depth map and liveness detection of said 2D image.
在一种可能的实现方式中,所述二维图像包括红外图像和/或彩色图像,所述目标活体检测方式包括:基于至少两种图像的活体检测,所述至少两种图像包括所述深度图像、所述红外图像以及所述彩色图像中的至少两种;所述活体检测模块用于:基于所述至少两种图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到至少两种中间活体检测结果,其中,所述至少两种中间活体检测结果分别与所述至少两种图像对应;获取所述至少两种中间活体检测结果分别对应的权重;基于所述权重与所述至少两种中间活体检测结果,得到所述目标对象的活体检测结果。In a possible implementation manner, the two-dimensional image includes an infrared image and/or a color image, and the target living body detection method includes: living body detection based on at least two images, and the at least two images include the depth At least two of the image, the infrared image, and the color image; the living body detection module is configured to: based on the at least two kinds of images, perform living body detection on the target object through the target living body detection method, and obtain At least two intermediate living body detection results, wherein the at least two intermediate living body detection results correspond to the at least two images respectively; obtain the weights corresponding to the at least two intermediate living body detection results respectively; The at least two intermediate living body detection results are obtained to obtain the living body detection result of the target object.
在一种可能的实现方式中,所述活体检测模块进一步用于:基于活体检测网络中加权网络层的训练结果,确定所述至少两种中间活体检测结果分别对应的权重,其中,所述活体检测网络用于通过所述目标活体检测方式对所述目标对象进行活体检测;或者,根据所述深度图像信息和/或所述二维图像包含的二维图像信息,确定所述至少两种中间活体检测结果分别对应的权重。In a possible implementation manner, the living body detection module is further configured to: determine weights corresponding to the at least two intermediate living body detection results based on the training results of the weighted network layer in the living body detection network, wherein the living body The detection network is used to perform liveness detection on the target object through the target liveness detection method; or, according to the depth image information and/or the two-dimensional image information contained in the two-dimensional image, determine the at least two intermediate Weights corresponding to liveness detection results.
在一种可能的实现方式中,所述目标活体检测方式包括基于所述深度图和所述二维图像的活体检测;所述活体检测模块用于:通过活体检测网络中的至少一个第一网络分支,对所述二维图像中所述目标对象所在的第一检测图像进行活体检测;以及,通过活体检测网络中的第二网络分支,对所述深度图中所述目标对象所在的第二检测图像进行活体检测。In a possible implementation manner, the target living detection method includes living detection based on the depth map and the two-dimensional image; the living detection module is configured to: use at least one first network in the living detection network branch, performing liveness detection on the first detection image where the target object is located in the two-dimensional image; Detect images for liveness detection.
在一种可能的实现方式中,所述图像获取模块用于:获取目标对象的深度图和原始二维图像;基于所述深度图,对所述原始二维图像进行配准处理,得到与所述深度图配准的所述二维图像,其中,所述配准处理包括裁剪处理和/或缩放处理。In a possible implementation manner, the image acquisition module is configured to: acquire a depth map of the target object and an original two-dimensional image; based on the depth map, perform registration processing on the original two-dimensional image to obtain a The two-dimensional image registered with the depth map, wherein the registration processing includes cropping processing and/or scaling processing.
在一种可能的实现方式中,所述目标活体检测方式包括基于所述二维图像的活体检测;所述活体检测模块用于:获取所述二维图像中所述目标对象所在的第一检测图像;根据所述二维图像与所述原始二维图像之间的第二图像对应关系,结合所述第一检测图像,得到所述原始二维图像中所述目标对象的第三检测图像;通过活体检测网络中的至少一个第一网络分支,对所述第三检测图像进行活体检测。In a possible implementation manner, the target living body detection method includes living body detection based on the two-dimensional image; image; according to the second image correspondence between the two-dimensional image and the original two-dimensional image, combined with the first detection image, to obtain a third detection image of the target object in the original two-dimensional image; The living body detection is performed on the third detection image through at least one first network branch in the living body detection network.
在一种可能的实现方式中,所述装置还用于:在基于所述活体检测结果确定所述目标对象为活体的情况下,根据所述二维图像,对所述目标对象进行身份识别。In a possible implementation manner, the device is further configured to: identify the target object according to the two-dimensional image when it is determined that the target object is a living body based on the living body detection result.
根据本公开的一方面,提供了一种电子设备,包括:According to an aspect of the present disclosure, an electronic device is provided, including:
处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述活体检测方法。A processor; a memory for storing processor-executable instructions; wherein, the processor is configured to invoke the instructions stored in the memory to execute the above-mentioned living body detection method.
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述活体检测方法。According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned living body detection method is implemented.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
根据本公开的一方面,提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的易失性计算机可读存储介质或非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现上述活体检测方法。According to an aspect of the present disclosure, there is provided a computer program product including computer readable codes, or a volatile computer readable storage medium or a nonvolatile computer readable storage medium carrying computer readable codes, when the When the computer-readable codes are run in the processor of the electronic device, the processor in the electronic device executes to implement the above-mentioned living body detection method.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1示出根据本公开一实施例的活体检测方法的流程图。Fig. 1 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
图2示出根据本公开一实施例的活体检测方法的流程图。Fig. 2 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
图3示出根据本公开一实施例的活体检测方法的流程图。Fig. 3 shows a flowchart of a living body detection method according to an embodiment of the present disclosure.
图4示出根据本公开一实施例的活体检测网络的网络结构示意图。Fig. 4 shows a schematic diagram of a network structure of a living body detection network according to an embodiment of the present disclosure.
图5示出根据本公开一实施例的活体检测装置的框图。Fig. 5 shows a block diagram of a living body detection device according to an embodiment of the present disclosure.
图6示出根据本公开一应用示例的示意图。Fig. 6 shows a schematic diagram of an application example according to the present disclosure.
图7示出根据本公开实施例的一种电子设备的框图。Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
图8示出根据本公开实施例的一种电子设备的框图。Fig. 8 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present disclosure may be practiced without some of the specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art have not been described in detail so as to obscure the gist of the present disclosure.
图1示出根据本公开一实施例的活体检测方法的流程图,该方法可以应用于活体检测装置,活体检测装置可以为终端设备、服务器或者其他处理设备等。其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。Fig. 1 shows a flow chart of a method for detecting a living body according to an embodiment of the present disclosure. The method can be applied to a living body detecting device, and the living body detecting device can be a terminal device, a server, or other processing devices. Wherein, the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, Wearable equipment etc.
在一些可能的实现方式中,该活体检测方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。In some possible implementation manners, the living body detection method may be implemented by a processor invoking computer-readable instructions stored in a memory.
如图1所示,所述活体检测方法可以包括:As shown in Figure 1, the living body detection method may include:
S11,获取目标对象的深度图和二维图像。S11. Acquire a depth map and a two-dimensional image of a target object.
其中,目标对象可以是待进行活体检测的任意对象,比如可以是待进行活体检测的人物或是动物等,在一些可能的实现方式中,目标对象可以包括人脸对象和/或人体对象等。目标对象的数量在本公开实施例中不做限制,可以为单个对象,也可以为多个对象,在目标对象包括多个对象的情况下,可以通过本公开实施例中提出的活体检测方法同时对多个对象进行活体检测,也可以分别对多个对象进行活体检测等,选用何种方式可以根据实际情况灵活决定。Wherein, the target object may be any object to be detected, such as a person or an animal to be detected, and in some possible implementation manners, the target object may include a human face object and/or a human body object. The number of target objects is not limited in the embodiments of the present disclosure, and can be a single object or multiple objects. In the case that the target object includes multiple objects, it can be simultaneously Liveness detection can be performed on multiple objects, or liveness detection can be performed on multiple objects separately, and which method to choose can be flexibly determined according to the actual situation.
深度图可以是将从图像采集设备到采集场景中至少一个点的深度作为像素值的图像,目标对象的深度图可以反映目标对象可见表面的几何形状。获取目标对象的深度图的方式在本公开实施例中不做限制,可以根据实际情况灵活决定,在一些可能的实现方式中,可以从图像采集设备中直接获取目标对象的深度图,其中,图像采集设备可以是对目标对象进行图像采集的任意设备,比如立体照相机或飞行时间(TOF,Time of Flight)照相机等。The depth map may be an image in which the depth from the image capture device to at least one point in the captured scene is taken as a pixel value, and the depth map of the target object may reflect the geometric shape of the visible surface of the target object. The manner of obtaining the depth map of the target object is not limited in the embodiments of the present disclosure, and can be flexibly determined according to actual conditions. In some possible implementations, the depth map of the target object can be directly obtained from the image acquisition device, wherein the image The acquisition device may be any device for image acquisition of the target object, such as a stereo camera or a Time of Flight (TOF, Time of Flight) camera.
目标对象的二维图像可以是对目标对象进行二维图像采集所得到的任意图像,在一些可能的实现方式中,二维图像可以是用于进行活体检测的相关图像,比如可以包括红外(IR,Infrared Radiation)图像和/或彩色图像等。The two-dimensional image of the target object can be any image obtained by collecting the two-dimensional image of the target object. In some possible implementations, the two-dimensional image can be a related image for live detection, such as infrared (IR , Infrared Radiation) images and/or color images, etc.
其中,红外图像可以是基于目标对象本身与背景间产生的不同的热红外线差所形成的图像,受到环境光的干扰较小,在任意时间段均可以获取目标对象的红外图像。彩色图像可以是对应多个通道的图像,比如RGB图像(R表示Red,红色;G表示Green,绿色;B表示Blue,蓝色)、CMYK图像(C表示Cyan,青色;M表示Magenta,品红色;Y表示Yellow,黄色;K表示black,黑色)或YUV图像(Y表示Luminance,明亮度;U和V表示Chrominance,色度)等。Wherein, the infrared image may be an image formed based on different thermal infrared differences between the target object itself and the background, less disturbed by ambient light, and the infrared image of the target object can be obtained at any time period. A color image can be an image corresponding to multiple channels, such as RGB image (R means Red, red; G means Green, green; B means Blue, blue), CMYK image (C means Cyan, cyan; M means Magenta, magenta ; Y means Yellow, yellow; K means black, black) or YUV image (Y means Luminance, brightness; U and V mean Chrominance, chromaticity), etc.
获取的深度图和二维图像的数量在本公开实施例中不做限制,可以为获取一张或多张深度图,也可以获取一张或多张二维图像等,根据实际情况灵活选择即可。The number of acquired depth maps and 2D images is not limited in the embodiments of the present disclosure. One or more depth maps may be acquired, or one or more 2D images may be acquired, which can be flexibly selected according to actual conditions.
获取目标对象的二维图像的方式在本公开实施例中同样不做限制,可以根据实际情况灵活决定,在一些可能的实现方式中,可以从图像采集设备中直接获取目标对象的二维图像,图像采集设备的实现方式可以参考上述各公开实施例,在此不再赘述。The method of acquiring the two-dimensional image of the target object is also not limited in the embodiments of the present disclosure, and can be flexibly determined according to actual conditions. In some possible implementations, the two-dimensional image of the target object can be directly obtained from the image acquisition device. For the implementation manner of the image acquisition device, reference may be made to the foregoing disclosed embodiments, and details are not repeated here.
在一些可能的实现方式中,目标对象的深度图和二维图像可以同时获取,也可以分别获取,在二维图像包括多种形式的图像的情况下,深度图与二维图像中的不同形式的图像可以同时获取,也可以分别获取等。In some possible implementations, the depth map and the two-dimensional image of the target object can be acquired simultaneously or separately. The images can be acquired at the same time or separately.
S12,基于深度图包含的深度图像信息,确定目标活体检测方式。S12. Based on the depth image information included in the depth map, determine a target living body detection method.
深度图像信息,可以包括深度图本身的图像信息,比如深度图的尺寸或是分辨率等,也可以包括从深度图中提取到的相关信息,比如可以基于深度图确定目标对象在空间中的距离信息等。Depth image information can include the image information of the depth map itself, such as the size or resolution of the depth map, and can also include relevant information extracted from the depth map, such as determining the distance of the target object in space based on the depth map information etc.
目标活体检测方式的实现方式可以根据实际情况灵活选择,不局限于下述各公开实施例。在一些可能的实现方式中,目标活体检测方式可以包括基于红外图像的活体检测、基于彩色图像的活体检测、基于红外图像和彩色图像的活体检测、基于深度图和红外图像的活体检测、基于深度图和彩色图像的活体检测或是基于深度图、红外图像和彩色图像的活体检测等一种或多种实现方式。The implementation of the target living body detection method can be flexibly selected according to the actual situation, and is not limited to the following disclosed embodiments. In some possible implementations, the target liveness detection methods may include liveness detection based on infrared images, liveness detection based on color images, liveness detection based on infrared images and color images, liveness detection based on depth maps and infrared images, depth-based Liveness detection based on image and color image or one or more implementations based on depth map, infrared image and color image.
随着深度图像信息中信息内容的不同,目标活体检测方式的确定方式也可以灵活发生变化,比如可以基于深度图中目标对象的尺寸选定上述公开实施例中的一种或多种目标活体检测方式,或是基于目标对象的活体检测距离来选定上述公开实施例中的一种或多种目标活体检测方式等,详见下述各公开实施例,在此先不做展开。As the information content in the depth image information is different, the determination method of the target living body detection method can also be flexibly changed, for example, one or more target living body detection methods in the above disclosed embodiments can be selected based on the size of the target object in the depth map method, or select one or more target living body detection methods in the above-mentioned disclosed embodiments based on the living body detection distance of the target object, etc., see the following disclosed embodiments for details, and will not be expanded here.
S13,基于二维图像,通过目标活体检测方式对目标对象进行活体检测,得到目标对象的活体检测结果。S13, based on the two-dimensional image, perform liveness detection on the target object through a target liveness detection method, and obtain a liveness detection result of the target object.
通过S12中确定的目标活体检测方式,可以基于二维图像对目标对象进行活体检测,其中,活体检测的过程可以根据目标活体检测方式的实际情况灵活决定,比如可以通过可以实现目标活体检测方式的一种或多种神经网络或是神经网络的分支来实现活体检测等。Through the target living detection method determined in S12, the target object can be detected based on the two-dimensional image. The process of the living detection can be flexibly determined according to the actual situation of the target living detection method. For example, the target living detection method can be realized. One or more kinds of neural networks or branches of neural networks to realize living body detection and the like.
基于二维图像实现的活体检测,可以是基于二维图像中的某种图像,比如彩色图像或深度图所实现的活体检测,也可以是基于二维图像中的多种图像所实现的活体检测等,同样可以根据目标活体检测方式的实际情况灵活决定。Live detection based on two-dimensional images can be based on certain images in two-dimensional images, such as color images or depth maps, or live detection based on multiple images in two-dimensional images etc., can also be flexibly determined according to the actual situation of the detection method of the target living body.
在一些可能的实现方式中,活体检测结果可以包括确定目标对象为活体以及确定目标对象为非活 体的两种情况;在一些可能的实现方式中,活体检测结果也可以包括目标对象为活体以及非活体等类型的置信度等。In some possible implementations, the liveness detection result may include two cases of determining that the target object is alive and determining that the target object is not alive; in some possible implementations, the liveness detection result may also include whether the target object is alive or not. Confidence of living body and other types, etc.
通过本公开实施例,可以基于深度图包含的深度图像信息,充分考虑到活体检测的实际深度情况,灵活选择合适的目标活体检测方式以实现活体检测,提升了活体检测的精度和灵活程度。Through the embodiments of the present disclosure, based on the depth image information contained in the depth map, the actual depth of the living body detection can be fully considered, and an appropriate target living body detection method can be flexibly selected to realize the living body detection, which improves the accuracy and flexibility of the living body detection.
在一种可能的实现方式中,S11可以包括:获取目标对象的深度图和原始二维图像;基于深度图,对原始二维图像进行配准处理,得到与深度图配准的二维图像,其中,配准处理包括裁剪处理和/或缩放处理。其中,原始二维图像可以是对目标对象进行图像采集后,未经任何处理所得到的二维图像。其实现形式可以参考上述各公开实施例中二维图像的实现形式,在此不再赘述。In a possible implementation manner, S11 may include: acquiring a depth map of the target object and an original two-dimensional image; based on the depth map, performing registration processing on the original two-dimensional image to obtain a two-dimensional image registered with the depth map, Wherein, the registration processing includes cropping processing and/or scaling processing. Wherein, the original two-dimensional image may be a two-dimensional image obtained without any processing after image acquisition of the target object. For the implementation form, reference may be made to the implementation forms of the two-dimensional image in the above-mentioned disclosed embodiments, which will not be repeated here.
在一种可能的实现方式中,为了便于后续基于深度图和二维图像对目标对象进行活体检测,可以先将深度图和原始二维图像进行配准处理,以使得深度图和二维图像的分辨率与空间位置等都相互对齐,从而降低后续进行图像处理和活体检测的难度。In a possible implementation, in order to facilitate the subsequent liveness detection of the target object based on the depth map and the two-dimensional image, the depth map and the original two-dimensional image can be registered first, so that the depth map and the two-dimensional image The resolution and spatial position are all aligned with each other, thereby reducing the difficulty of subsequent image processing and liveness detection.
其中,配准的方式在本公开实施例中不做限定,在一种可能的实现方式中,可以通过裁剪处理和/或缩放处理等,实现二维图像与深度图的配准,在一些可能的实现方式中,还可以通过配准网络实现二维图像与深度图之间的配置,其中配准网络可以是具有图像配准功能的任意神经网络,其实现形式在本公开实施例中不做限制。Wherein, the manner of registration is not limited in this embodiment of the present disclosure. In a possible implementation manner, the registration of the two-dimensional image and the depth map can be realized through cropping processing and/or scaling processing. In some possible In the implementation mode, the configuration between the two-dimensional image and the depth map can also be realized through the registration network, wherein the registration network can be any neural network with image registration function, and its implementation form is not described in the embodiment of the present disclosure. limit.
在一些可能的实现方式中,原始二维图像可以包括原始红外图像和原始彩色图像,在一些可能的实现方式中,获取到的原始红外图像可能本身已与深度图相互配准,在这种情况下,可以仅对原始彩色图像进行配准处理,以得到与深度图配置的彩色图像。In some possible implementations, the original two-dimensional image may include the original infrared image and the original color image. In some possible implementations, the acquired original infrared image may itself have been co-registered with the depth map. In this case In this case, only the original color image can be registered to obtain a color image configured with the depth map.
通过本公开实施例,可以获取与深度图配置的二维图像,便于后续基于二维图像确定深度图中目标对象的目标尺寸,以及获取第一检测图像和第二检测图像等,从而整体提升活体检测的检测效率。Through the embodiments of the present disclosure, it is possible to obtain a two-dimensional image configured with a depth map, which facilitates the subsequent determination of the target size of the target object in the depth map based on the two-dimensional image, and acquisition of the first detection image and the second detection image, etc., thereby improving the overall quality of the living body. Detection efficiency of detection.
图2示出根据本公开一实施例的活体检测方法的流程图,如图所示,在一种可能的实现方式中,S12可以包括:Fig. 2 shows a flow chart of a living body detection method according to an embodiment of the present disclosure. As shown in the figure, in a possible implementation manner, S12 may include:
S121,基于深度图包含的深度图像信息,获取目标对象在深度图中的目标尺寸。S121. Based on the depth image information contained in the depth map, acquire the target size of the target object in the depth map.
S122,在目标尺寸小于预设尺寸阈值的情况下,目标活体检测方式包括:基于二维图像的活体检测。或者,S122. In the case that the size of the target is smaller than the preset size threshold, the target living body detection method includes: living body detection based on a two-dimensional image. or,
S123,在目标尺寸大于或等于预设尺寸阈值的情况下,目标活体检测方式包括:基于深度图和二维图像的活体检测。S123. In the case that the size of the target is greater than or equal to the preset size threshold, the target living body detection method includes: living body detection based on a depth map and a two-dimensional image.
其中,目标尺寸可以是深度图中目标对象的尺寸,比如可以包括目标对象在深度图中长边的边长和/或短边的边长,或是包括目标对象在深度图中的分辨率等。Wherein, the target size may be the size of the target object in the depth map, for example, it may include the length of the long side and/or the side length of the short side of the target object in the depth map, or include the resolution of the target object in the depth map, etc. .
S121的实现方式可以根据实际情况灵活选择,比如可以基于深度图像信息中深度图的尺寸信息,以及目标对象在深度图中所占的比例来共同确定目标对象的目标尺寸,在一些可能的实现方式中,还可以通过二维图像和深度图之间的比例关系,以及二维图像中目标对象的尺寸来确定目标尺寸等。S121的具体实现方式可以详见下述各公开实施例,在此先不做展开。The implementation of S121 can be flexibly selected according to the actual situation. For example, the target size of the target object can be jointly determined based on the size information of the depth map in the depth image information and the proportion of the target object in the depth map. In some possible implementation methods In , the target size can also be determined through the proportional relationship between the 2D image and the depth map, and the size of the target object in the 2D image. The specific implementation manner of S121 can be referred to the following disclosed embodiments in detail, and will not be expanded here.
基于获取的目标尺寸,可以将目标尺寸与预设尺寸阈值进行比较,以确定目标活体检测方式。其中,预设尺寸阈值的尺寸大小可以根据实际情况灵活设定,在本公开实施例中不做限定。Based on the acquired target size, the target size can be compared with a preset size threshold to determine a target liveness detection method. Wherein, the size of the preset size threshold can be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
在目标尺寸小于预设尺寸阈值的情况下,可以表明深度图中目标对象的尺寸较小,在这种情况下,基于深度图来对目标对象进行活体检测的精度较低,从而可能影响到活体检测的整体精度。因此,在一种可能的实现方式中,可以在目标尺寸小于预设尺寸阈值的情况下,将目标活体检测方式确定为基于二维图像的活体检测,以省略基于深度图的活体检测过程,提升活体检测精度的同时降低活体检测的计算量,提升活体检测的效率。When the target size is smaller than the preset size threshold, it can indicate that the size of the target object in the depth map is small. In this case, the accuracy of live detection of the target object based on the depth map is low, which may affect the live body The overall accuracy of the detection. Therefore, in a possible implementation, when the target size is smaller than the preset size threshold, the target living body detection method can be determined as the living body detection based on the two-dimensional image, so as to omit the living body detection process based on the depth map and improve While improving the accuracy of liveness detection, the calculation amount of liveness detection is reduced, and the efficiency of liveness detection is improved.
其中,由于二维图像中可以包括多种类型的图像,因此,基于二维图像的活体检测可以是基于所 有种类的二维图像所实现的活体检测,也可以是基于二维图像中的一种或多种图像所实现的活体检测等,根据实际情况灵活选择即可。在一些可能的实现方式中,基于二维图像的活体检测可以包括基于红外图像和/或彩色图像的活体检测。Among them, since the two-dimensional image may include multiple types of images, the living body detection based on the two-dimensional image may be realized based on all kinds of two-dimensional images, or it may be based on one of the two-dimensional images Or live detection realized by multiple images, etc., can be flexibly selected according to the actual situation. In some possible implementation manners, the living body detection based on the two-dimensional image may include the living body detection based on the infrared image and/or the color image.
在目标尺寸大于或等于预设尺寸阈值的情况下,可以表明深度图中目标对象较为清晰,在这种情况下,可以基于深度图来对目标对象进行活体检测。因此,在一种可能的实现方式中,可以在目标尺寸大于或等于预设尺寸阈值的情况下,将目标活体检测方式确定为基于深度图和二维图像的活体检测,以提高活体检测的精度。If the target size is greater than or equal to the preset size threshold, it may indicate that the target object in the depth image is relatively clear. In this case, the target object may be detected based on the depth image. Therefore, in a possible implementation, when the target size is greater than or equal to the preset size threshold, the target living body detection method can be determined as the living body detection based on the depth map and the two-dimensional image, so as to improve the accuracy of the living body detection .
其中,由于二维图像中可以包括多种类型的图像,因此,基于深度图和二维图像的活体检测,可以是基于深度图与所有种类的二维图像所实现的活体检测,也可以是基于深度图与二维图像中的一种或多种图像所实现的活体检测等,根据实际情况灵活选择即可。在一些可能的实现方式中,基于深度图和二维图像的活体检测可以包括,基于深度图和红外图像的活体检测、基于深度图和彩色图像的活体检测以及基于深度图、红外图像和彩色图像的活体检测等一种或多种实现方式。Among them, since the two-dimensional image can include multiple types of images, the living body detection based on the depth map and the two-dimensional image can be realized based on the depth map and all kinds of two-dimensional images, or it can be based on The liveness detection realized by one or more images in the depth map and the two-dimensional image can be flexibly selected according to the actual situation. In some possible implementations, liveness detection based on depth maps and two-dimensional images may include, liveness detection based on depth maps and infrared images, liveness detection based on depth maps and color images, and liveness detection based on depth maps, infrared images and color images One or more implementations such as liveness detection.
通过本公开实施例,可以在深度图中目标对象的尺寸较小的情况下,省略深度图而选择较为清晰的二维图像来进行活体检测,一方面减少了由于不清晰的深度图对活体检测精度的影响,提升了活体检测的精度,另一方面也可以减少深度图在活体检测距离上的影响,提升了活体检测的识别距离。Through the embodiments of the present disclosure, when the size of the target object in the depth map is small, the depth map can be omitted and a clearer two-dimensional image can be selected for live detection. The impact of precision improves the accuracy of liveness detection. On the other hand, it can also reduce the influence of the depth map on the liveness detection distance and improve the recognition distance of liveness detection.
图3示出根据本公开一实施例的活体检测方法的流程图,如图所示,在一种可能的实现方式中,S121可以包括:Fig. 3 shows a flowchart of a living body detection method according to an embodiment of the present disclosure. As shown in the figure, in a possible implementation manner, S121 may include:
S1211,对二维图像进行目标对象检测,得到二维图像中目标对象的第一检测图像;S1211. Perform target object detection on the two-dimensional image to obtain a first detected image of the target object in the two-dimensional image;
S1212,基于深度图包含的深度图像信息,确定深度图与二维图像之间的第一图像对应关系;S1212. Based on the depth image information included in the depth map, determine a first image correspondence between the depth map and the two-dimensional image;
S1213,根据第一图像对应关系,结合第一检测图像,得到深度图中目标对象的第二检测图像;S1213. Obtain a second detection image of the target object in the depth map in combination with the first detection image according to the correspondence relationship of the first image;
S1214,根据第二检测图像的尺寸,确定目标对象在深度图中的目标尺寸。S1214. Determine the target size of the target object in the depth map according to the size of the second detection image.
其中,第一检测图像是从二维图像中提取出的目标对象所在的图像,比如可以包括从红外图像中提取出的检测图像和/或从彩色图像中提取出的检测图像等。Wherein, the first detection image is an image extracted from a two-dimensional image where the target object is located, for example, may include a detection image extracted from an infrared image and/or a detection image extracted from a color image.
在一些可能的实现方式中,第一检测图像可以是从二维图像中提取出的目标对象整体和/或部分所在的图像,比如第一检测图像可以是基于目标对象的整体检测框、目标对象的人体检测框或是目标对象的人脸检测框等所确定的检测图像。In some possible implementations, the first detection image may be an image of the entire and/or part of the target object extracted from the two-dimensional image, for example, the first detection image may be based on the overall detection frame of the target object, the target object The detection image determined by the human body detection frame or the face detection frame of the target object.
对二维图像进行目标对象检测以得到第一检测图像的方式在本公开实施例中不做限定,可以根据实际情况灵活选择,在一些可能的实现方式中,可以将二维图像通过具有目标对象检测网络,以得目标对象检测网络输出的检测框,并基于检测框对二维图像进行剪裁,来得到第一检测图像。其中,目标对象检测网络的实现方式在本公开实施例中不做限制,任何具有对象检测功能的神经网络,均可以作为目标对象检测网络的实现形式。The method of detecting the target object on the two-dimensional image to obtain the first detection image is not limited in the embodiment of the present disclosure, and can be flexibly selected according to the actual situation. The detection network is used to obtain the detection frame output by the target object detection network, and the two-dimensional image is clipped based on the detection frame to obtain the first detection image. Wherein, the implementation manner of the target object detection network is not limited in the embodiments of the present disclosure, and any neural network with an object detection function may be used as an implementation form of the target object detection network.
在一些可能的实现方式中,除了通过目标对象检测得到第一检测图像以外,还可以基于深度图包含的深度图像信息,确定深度图与二维图像之间的第一图像对应关系。In some possible implementation manners, in addition to obtaining the first detection image through target object detection, the first image correspondence between the depth map and the two-dimensional image may also be determined based on depth image information included in the depth map.
其中,第一图像对应关系可以是深度图与二维图像之间的图像坐标变换关系。基于深度图像信息确定第一图像对应关系的方式可以根据实际情况灵活决定,在一些可能的实现方式中,可以根据深度图像信息中深度图的尺寸、分辨率以及边角点的位置等信息,结合二维图像的尺寸、分辨率以及边角点的位置等信息,来确定深度图与二维图像之间像素点的位置变换关系,作为第一图像对应关系。在一些可能的实现方式中,也可以根据深度图像信息中深度图的尺寸、分辨率以及边角点的位置等信息,来直接对二维图像进行图像变换,得到分辨率和空间位置与深度图对齐的二维图像作为变换后的二维图像,则基于变换后的二维图像与二维图像之间的图像对应关系,可以确定深度图与二维图像之间的第一图像对应关系。Wherein, the first image corresponding relationship may be an image coordinate transformation relationship between the depth map and the two-dimensional image. The method of determining the corresponding relationship of the first image based on the depth image information can be flexibly determined according to the actual situation. In some possible implementations, it can be combined with The information such as the size, resolution, and the position of the corner points of the two-dimensional image is used to determine the position transformation relationship of the pixels between the depth map and the two-dimensional image as the corresponding relationship of the first image. In some possible implementations, it is also possible to directly perform image transformation on the two-dimensional image according to the size, resolution, and position of the corner points in the depth image information to obtain the resolution and spatial position and the depth map The aligned two-dimensional image is used as the transformed two-dimensional image, and based on the image correspondence between the transformed two-dimensional image and the two-dimensional image, the first image correspondence between the depth map and the two-dimensional image can be determined.
在一些可能的实现方式中,在二维图像是上述公开实施例中对原始二维图像进行配准处理所得到的配准后的二维图像的情况下,可以直接确定深度图与二维图像之间的第一图像对应关系为相互对应。In some possible implementations, when the two-dimensional image is the registered two-dimensional image obtained by performing registration processing on the original two-dimensional image in the above disclosed embodiments, the depth map and the two-dimensional image can be directly determined The correspondence between the first images is mutual correspondence.
需要注意的是,在本公开实施例中,S1211和S1212的实现顺序可以根据实际情况灵活决定,可以同时实现,也可以按照一定的顺序依次实现等,在本公开实施例中不做限制。It should be noted that, in the embodiments of the present disclosure, the implementation order of S1211 and S1212 can be flexibly determined according to the actual situation, and can be implemented simultaneously or sequentially in a certain order, etc., which are not limited in the embodiments of the present disclosure.
根据第一检测图像在二维图像中的位置,以及深度图和二维图像之间的第一图像对应关系,可以确定目标对象在深度图中的位置和大小,从而得到深度图中目标对象所在的第二检测图像。According to the position of the first detection image in the two-dimensional image, and the first image correspondence between the depth map and the two-dimensional image, the position and size of the target object in the depth map can be determined, so as to obtain the location of the target object in the depth map The second detection image of .
其中,第二检测图像同样可以是目标对象整体和/或部分在深度图中所占的图像,其实现方式可以参考第一检测图像,在此不再赘述。得到第二检测图像的具体过程同样可以根据实际情况灵活选择,在一个示例中,可以将第一检测图像在二维图像中的位置,通过第一图像对应关系变换至深度图中,从而确定目标对象在深度图中的位置,并基于该位置对深度图进行裁剪以得到第二检测图像。Wherein, the second detection image may also be an image occupied by the whole and/or part of the target object in the depth map, and its implementation may refer to the first detection image, which will not be repeated here. The specific process of obtaining the second detection image can also be flexibly selected according to the actual situation. In one example, the position of the first detection image in the two-dimensional image can be transformed into the depth map through the corresponding relationship of the first image, so as to determine the target position of the object in the depth map, and crop the depth map based on the position to obtain a second detection image.
由于第二检测图像是深度图中目标对象所在的图像,因此根据第二检测图像的尺寸,可以确定目标对象在深度图中的目标尺寸。基于第二检测图像的哪些尺寸来确定目标尺寸在本公开实施例中不做限制,在一些可能的实现方式中,目标尺寸可以是基于第二检测图像的长度和/或宽度所确定的尺寸,在一些可能的实现方式中,目标尺寸也可以是第二检测图像的长度和宽度中具有最大值或最小值的尺寸等。Since the second detection image is the image where the target object is located in the depth map, the target size of the target object in the depth map can be determined according to the size of the second detection image. The target size is determined based on which size of the second detection image is not limited in this embodiment of the present disclosure. In some possible implementation manners, the target size may be a size determined based on the length and/or width of the second detection image, In some possible implementation manners, the target size may also be a size having a maximum value or a minimum value among the length and width of the second detection image.
在一些可能的实现方式中,由于第二检测图像可以是目标对象的整体和/或部分在深度图中的图像,因此,第二检测图像的尺寸可以是目标对象的整体尺寸和/或部分尺寸,在第二检测图像的尺寸是目标对象的部分尺寸的情况下,可以根据部分尺寸推断出目标对象的整体尺寸,比如根据大部分人脸的人脸和人体之间的尺寸比例,将部分尺寸变换为整体尺寸以得到目标尺寸;在一些可能的实现方式中,也可以直接将部分尺寸作为目标尺寸,在这种情况下,预设尺寸阈值可以是根据目标对象的部分尺寸所设定的阈值,比如预设尺寸阈值可以是基于目标对象人脸尺寸大小所设置的尺寸阈值。In some possible implementations, since the second detection image may be an image in which the whole and/or part of the target object is in the depth map, the size of the second detection image may be the overall size and/or partial size of the target object , when the size of the second detection image is the partial size of the target object, the overall size of the target object can be deduced according to the partial size, for example, according to the size ratio between the face and the human body of most faces, the partial size Convert to the overall size to obtain the target size; in some possible implementations, the partial size can also be directly used as the target size, in this case, the preset size threshold can be the threshold set according to the partial size of the target object For example, the preset size threshold may be a size threshold set based on the face size of the target object.
通过本公开实施例,可以利用二维图像对目标对象进行定位,并利用二维图像与深度图之间的第一图像对应关系来便捷地确定目标对象在深度图中的目标尺寸,这种目标尺寸的确定方式更为便捷且具有较高的精度,从而提升活体检测的效率和精度。Through the embodiments of the present disclosure, a two-dimensional image can be used to locate the target object, and the first image correspondence between the two-dimensional image and the depth map can be used to conveniently determine the target size of the target object in the depth map. The size determination method is more convenient and has higher accuracy, thereby improving the efficiency and accuracy of living body detection.
在一种可能的实现方式中,在S1211之后,本公开实施例提出的方法还可以包括:对第一检测图像进行图像质量检测,得到图像质量检测结果;在图像质量检测结果大于预设质量阈值的情况下,基于深度图包含的深度图像信息,确定深度图与二维图像之间的第一图像对应关系。In a possible implementation, after S1211, the method proposed in the embodiment of the present disclosure may further include: performing image quality detection on the first detection image to obtain the image quality detection result; when the image quality detection result is greater than the preset quality threshold In the case of , based on the depth image information included in the depth map, determine the first image correspondence between the depth map and the two-dimensional image.
其中,图像质量检测结果可以包括第一检测图像在一种或多种评判标准下的图像质量,评判标准可以根据实际情况灵活设定,不局限于下述各公开实施例,比如可以包括清晰度、完整度或是明暗度等一种或多种质量评判标准。Wherein, the image quality detection result may include the image quality of the first detected image under one or more evaluation criteria, and the evaluation standard may be flexibly set according to the actual situation, and is not limited to the following disclosed embodiments, for example, it may include clarity , completeness or brightness and other one or more quality evaluation criteria.
对第一检测图像进行图像质量检测的方式在本公开实施例中不做限制,可以根据实际情况灵活选择。在一些可能的实现方式中,可以将第一检测图像输入质量检测网络,以得到质量检测网络输出的图像质量检测结果,其中,质量检测网络可以是具有图像质量检测功能的任意神经网络,在本公开实施例中不做限定,输出的图像质量检测结果可以为上述多种评判标准下的综合检测结果,也可以为在一种或多种评判标准下各自的评判结果等。在一些可能的实现方式中,也可以通过相关的图像质量检测算法来对第一检测图像进行图像质量检测,比如通过边角点检测确定第一检测图像的完整度,通过清晰度识别方法确定第一检测图像的清晰度质量,或是通过对第一检测图像中像素点的颜色值确定第一检测图像的明暗度质量等。The manner of performing image quality detection on the first detection image is not limited in this embodiment of the present disclosure, and may be flexibly selected according to actual conditions. In some possible implementations, the first detected image can be input into the quality detection network to obtain the image quality detection result output by the quality detection network, wherein the quality detection network can be any neural network with image quality detection function, in this paper There is no limitation in the disclosed embodiments, and the output image quality detection result may be a comprehensive detection result under the above-mentioned multiple evaluation standards, or may be individual evaluation results under one or more evaluation standards. In some possible implementations, it is also possible to perform image quality detection on the first detection image through a relevant image quality detection algorithm, for example, determine the integrity of the first detection image through corner point detection, and determine the second detection image through a sharpness recognition method. Detecting the sharpness quality of the image, or determining the quality of lightness and darkness of the first detecting image based on the color values of the pixels in the first detecting image.
基于得到的图像质量检测结果,可以与预设质量阈值进行比较,来确定后续的执行步骤。其中,预设质量阈值的数值大小可以根据实际情况灵活决定,在本公开实施例中不做限制。在一些可能的实 现方式中,可以为多个评判标准分别设置各自对应的预设质量阈值,并将至少一个评判标准下的图像质量检测结果分别与预设质量阈值进行比较,并在至少一个评判标准下的图像质量检测结果均大于各自对应的预设质量阈值的情况下,认为图像质量检测结果大于预设质量阈值。在一些可能的实现方式中,也可以基于至少一个评判标准下的图像质量检测结果得到综合的图像质量检测结果,并将其综合的图像质量检测结果与设置的综合的预设质量阈值进行比较以得到比较结果。Based on the obtained image quality detection result, it can be compared with the preset quality threshold to determine the subsequent execution steps. Wherein, the numerical value of the preset quality threshold can be flexibly determined according to actual conditions, and is not limited in this embodiment of the present disclosure. In some possible implementation manners, respective preset quality thresholds may be set for multiple judging criteria, and the image quality detection results under at least one judging standard are compared with the preset quality thresholds respectively, and at least one judging criterion When the image quality detection results under the standard are all greater than their corresponding preset quality thresholds, it is considered that the image quality detection results are greater than the preset quality thresholds. In some possible implementation manners, a comprehensive image quality detection result may also be obtained based on the image quality detection result under at least one evaluation standard, and the comprehensive image quality detection result is compared with the set comprehensive preset quality threshold to obtain Get the comparison result.
在图像质量检测结果大于预设质量阈值的情况下,可以认为第一检测图像的质量符合活体检测的要求,在这种情况下,可以进入到S1212。If the image quality detection result is greater than the preset quality threshold, it can be considered that the quality of the first detection image meets the requirements of living body detection, and in this case, it can go to S1212.
在一些可能的实现方式中,在S1212的实现顺序与S1211的实现顺序相同,或是在S1211之前的情况下,可以在确定图像质量检测结果大于预设质量阈值后,直接进入到S1213。In some possible implementation manners, when the implementation sequence of S1212 is the same as that of S1211, or before S1211, after it is determined that the image quality detection result is greater than the preset quality threshold, directly enter into S1213.
本公开实施例中,通过在图像质量检测结果大于预设质量阈值的情况下,进入确定深度图与二维图像之间的第一图像对应关系等后续过程,可以利用图像质量检测,对后续进入活体检测过程的图像质量进行筛选,从而提升活体检测过程中输入图像的图像质量,继而提升活体检测的精度。In the embodiment of the present disclosure, when the image quality detection result is greater than the preset quality threshold, enter the follow-up process such as determining the first image correspondence between the depth map and the two-dimensional image, the image quality detection can be used for subsequent entry The image quality of the living body detection process is screened, thereby improving the image quality of the input image during the living body detection process, and then improving the accuracy of the living body detection.
在一些可能的实现方式中,在图像质量检测结果小于或等于预设质量阈值的情况下,可以认为第一检测图像的质量较低,相应地,与该第一检测图像对应的二维图像的图像质量也可能较低,在这种情况下,基于二维图像进行活体检测所得到的活体检测结果极有可能不准确。因此,在一种可能的实现方式中,在图像质量检测结果小于或等于预设质量阈值的情况下,可以停止基于获取到的二维图像进行活体检测。In some possible implementations, when the image quality detection result is less than or equal to the preset quality threshold, it may be considered that the quality of the first detection image is low, and correspondingly, the 2D image corresponding to the first detection image The image quality may also be low, in which case the liveness detection result based on the two-dimensional image is highly likely to be inaccurate. Therefore, in a possible implementation manner, when the image quality detection result is less than or equal to the preset quality threshold, the living body detection based on the acquired two-dimensional image may be stopped.
在停止基于获取到的二维图像进行活体检测以后,在一种可能的实现方式中,可以重新获取新的深度图以及二维图像,并通过本公开实施例提出的活体检测方法,基于新获取的深度图和二维图像来实现活体检测等;在一些可能的实现方式中,也可以直接退出活体检测过程等。After stopping the living body detection based on the acquired two-dimensional image, in a possible implementation, a new depth map and two-dimensional image can be acquired again, and through the living body detection method proposed in the embodiment of the present disclosure, based on the newly acquired The depth map and two-dimensional image of the image can be used to realize the living body detection, etc.; in some possible implementations, it is also possible to directly exit the living body detection process, etc.
通过在图像质量检测结果小于或等于预设质量阈值的情况下,停止基于获取到的二维图像进行活体检测,通过上述过程,可以在第一检测图像的图像质量较低的情况下,及时停止后续过程,从而减小无效的计算,提高活体检测的精度和效率。By stopping the living body detection based on the acquired two-dimensional image when the image quality detection result is less than or equal to the preset quality threshold, through the above process, it is possible to stop in time when the image quality of the first detection image is low Follow-up process, thereby reducing invalid calculations and improving the accuracy and efficiency of liveness detection.
在一种可能的实现方式中,S12可以包括:基于深度图包含的深度图像信息,获取目标对象的活体检测距离;在活体检测距离大于预设距离阈值的情况下,目标活体检测方式包括:基于二维图像的活体检测;在活体检测距离小于或等于预设距离阈值的情况下,目标活体检测方式包括:基于深度图和二维图像的活体检测。In a possible implementation manner, S12 may include: acquiring the living body detection distance of the target object based on the depth image information contained in the depth map; when the living body detection distance is greater than the preset distance threshold, the target living body detection method includes: based on Liveness detection of two-dimensional images; in the case that the living body detection distance is less than or equal to the preset distance threshold, target living body detection methods include: liveness detection based on depth maps and two-dimensional images.
其中,活体检测距离可以是目标对象距离活体检测装置之间的距离,如何基于深度图包含的深度图像信息获取活体检测距离,其实现方式可以根据实际情况灵活决定,不局限于下述各公开实施例。在一种可能的实现方式中,可以根据深度图中至少一个像素点所体现的深度距离,确定目标对象与图像采集设备之间的距离,并根据图像采集设备与活体检测装置之间的位置对应关系,确定目标对象与活体检测装置之间的活体检测距离;在一种可能的实现方式中,在活体检测装置本身包含图像采集设备的情况下,可以根据深度图中至少一个像素点所反映的深度距离,直接确定目标对象与活体检测装置之间的活体检测距离。Among them, the living body detection distance can be the distance between the target object and the living body detection device. How to obtain the living body detection distance based on the depth image information contained in the depth map can be flexibly determined according to the actual situation, and is not limited to the following public implementations. example. In a possible implementation, the distance between the target object and the image acquisition device may be determined according to the depth distance represented by at least one pixel in the depth map, and the distance between the image acquisition device and the living body detection device may be corresponding relationship, to determine the liveness detection distance between the target object and the liveness detection device; in a possible implementation, when the liveness detection device itself includes an image acquisition device, it can be based on at least one pixel reflected in the depth map The depth distance directly determines the liveness detection distance between the target object and the liveness detection device.
基于获取的活体检测距离,可以将活体检测距离与预设距离阈值进行比较,以确定目标活体检测方式。其中,预设距离阈值的距离大小同样可以根据实际情况灵活设定,在本公开实施例中不做限定。Based on the obtained living body detection distance, the living body detection distance may be compared with a preset distance threshold to determine a target living body detection method. Wherein, the distance of the preset distance threshold can also be flexibly set according to actual conditions, and is not limited in this embodiment of the present disclosure.
在活体检测距离大于预设距离阈值的情况下,深度图中的目标对象可能清晰度较低,在这种情况下,基于深度图来对目标对象进行活体检测的精度较低,从而可能影响到活体检测的整体精度。因此,在一种可能的实现方式中,可以在活体检测距离大于预设距离阈值的情况下,将目标活体检测方式确定为基于二维图像的活体检测,以省略基于深度图的活体检测过程,提升活体检测精度的同时降低活体检测的计算量,提升活体检测的效率。When the live detection distance is greater than the preset distance threshold, the target object in the depth map may have low definition. In this case, the accuracy of live detection based on the depth map is low, which may affect the Overall accuracy of liveness detection. Therefore, in a possible implementation, when the living body detection distance is greater than the preset distance threshold, the target living body detection method can be determined as the living body detection based on the two-dimensional image, so as to omit the living body detection process based on the depth map, While improving the accuracy of liveness detection, the calculation amount of liveness detection is reduced, and the efficiency of liveness detection is improved.
其中,基于二维图像的活体检测的实现形式可以参考上述各公开实施例,在此不再赘述。Wherein, for the implementation form of the living body detection based on the two-dimensional image, reference may be made to the above-mentioned disclosed embodiments, which will not be repeated here.
在活体检测距离小于或等于预设距离阈值的情况下,深度图中目标对象可能较为清晰,在这种情况下,可以基于深度图来对目标对象进行活体检测。因此,在一种可能的实现方式中,可以在活体检测距离小于或等于预设距离阈值的情况下,将目标活体检测方式确定为基于深度图和二维图像的活体检测,以提高活体检测的精度。When the liveness detection distance is less than or equal to the preset distance threshold, the target object in the depth map may be relatively clear. In this case, the liveness detection of the target object may be performed based on the depth map. Therefore, in a possible implementation, when the living body detection distance is less than or equal to the preset distance threshold, the target living body detection method can be determined as the living body detection based on the depth map and the two-dimensional image, so as to improve the accuracy of the living body detection. precision.
其中,基于深度图和二维图像的活体检测的实现形式同样可以参考上述各公开实施例,在此不再赘述。Wherein, the implementation forms of the living body detection based on the depth map and the two-dimensional image can also refer to the above-mentioned disclosed embodiments, which will not be repeated here.
通过本公开实施例,可以在目标对象与活体检测装置距离较远的情况下,省略深度图而选择较为受距离影响较小的二维图像来进行活体检测,提升活体检测精度的同时,减少深度图在活体检测距离上的影响,提升了活体检测的识别距离。Through the embodiments of the present disclosure, when the distance between the target object and the living body detection device is relatively long, the depth map can be omitted and a two-dimensional image that is less affected by the distance can be selected for living body detection, which improves the accuracy of living body detection and reduces the depth. The influence of the graph on the liveness detection distance improves the recognition distance of the liveness detection.
如上述各公开实施例所述,二维图像可以包括红外图像和/或彩色图像,而目标活体检测方式可以包括基于二维图像的检测方式,或是基于深度图和二维图像的检测方式,因此,在一些可能的实现方式中,目标活体检测方式可以包括:基于至少两种图像的活体检测,其中,至少两种图像可以是深度图与红外图像,深度图与彩色图像,红外图像与彩色图像,或是深度图、红外图像与彩色图像等。As described in the above disclosed embodiments, the two-dimensional image may include an infrared image and/or a color image, and the target living body detection method may include a detection method based on a two-dimensional image, or a detection method based on a depth map and a two-dimensional image, Therefore, in some possible implementations, the target living detection method may include: live detection based on at least two images, wherein the at least two images may be a depth map and an infrared image, a depth map and a color image, an infrared image and a color image images, or depth maps, infrared images, and color images.
因此,在一种可能的实现方式中,S13可以包括:基于至少两种图像,通过目标活体检测方式对目标对象进行活体检测,得到至少两种中间活体检测结果;获取至少两种中间活体检测结果分别对应的权重;基于权重与至少两种中间活体检测结果,得到目标对象的活体检测结果。Therefore, in a possible implementation manner, S13 may include: based on at least two kinds of images, perform liveness detection on the target object by means of target liveness detection to obtain at least two intermediate liveness detection results; obtain at least two intermediate liveness detection results corresponding weights; based on the weights and at least two intermediate living body detection results, the living body detection results of the target object are obtained.
其中,中间活体检测结果可以是基于其中一种图像进行活体检测所得到的检测结果,由于目标活体检测方式可以包括基于至少两种图像的活体检测,因此相应地,可以得到与至少两种图像分别对应的至少两种中间活体检测结果。举例来说,在一个示例中,可以基于深度图、红外图像与彩色图像进行活体检测,在这种情况下,可以分别得到与深度图对应的中间活体检测结果、与红外图像对应的中间活体检测结果和与彩色图像对应的中间活体检测结果。在一个示例中,可以基于红外图像与彩色图像进行活体检测,在这种情况下,可以分别得到与红外图像对应的中间活体检测结果,以及与彩色图像对应的中间活体检测结果。Wherein, the intermediate living body detection result may be a detection result obtained by performing living body detection based on one of the images, since the target living body detection method may include living body detection based on at least two images, correspondingly, it may be obtained separately from at least two images Corresponding to at least two intermediate living body detection results. For example, in one example, liveness detection can be performed based on depth maps, infrared images, and color images. In this case, intermediate liveness detection results corresponding to depth maps and intermediate liveness detection results corresponding to infrared images can be obtained respectively. Results and intermediate liveness detection results corresponding to color images. In an example, the living body detection can be performed based on the infrared image and the color image. In this case, an intermediate living body detection result corresponding to the infrared image and an intermediate living body detection result corresponding to the color image can be respectively obtained.
基于得到的至少两种中间活体检测结果,可以进一步获取不同中间活体检测结果分别对应的权重,并根据权重和至少两种中间活体检测结果进行加权求和,以得到目标对象的活体检测结果。Based on the obtained at least two intermediate living body detection results, weights corresponding to different intermediate living body detection results can be further obtained, and weighted summation is performed according to the weight and at least two intermediate living body detection results to obtain the living body detection result of the target object.
其中,获取不同中间活体检测结果分别对应的权重的方式可以根据实际情况灵活决定,在一种可能的实现方式中,可以为不同中间活体检测结果预先设置各自的权重并直接对该预先设置的权重进行读取。在一些可能的实现方式中,也可以通过其他方式,获取与至少两种图像的实际情况相适应的自适应权重。其中,自适应权重的获取方式可以根据至少两种图像的实际情况灵活决定,详见下述各公开实施例,在此先不做展开。Among them, the method of obtaining the weights corresponding to different intermediate living body detection results can be flexibly determined according to the actual situation. In a possible implementation, the respective weights can be preset for different intermediate living body detection results and the preset weights can be directly to read. In some possible implementation manners, adaptive weights adapted to the actual conditions of the at least two images may also be acquired in other manners. Wherein, the manner of acquiring the adaptive weight can be flexibly determined according to the actual conditions of at least two images, see the following disclosed embodiments for details, and will not be expanded here.
在一些可能的实现方式中,随着目标活体检测方式的不同,同种图像对应的中间活体检测结果的权重可能会不同。举例来说,在一种可能的实现方式中,在目标活体检测方式为基于深度图、红外图像和彩色图像的活体检测的情况下,红外图像对应的中间活体检测结果的权重可能为A,而在目标活体检测方式为基于红外图像和彩色图像的活体检测的情况下,红外图像对应的中间活体检测结果的权重可能为B,A和B的数值可能存在差异,也可能相同,根据实际情况灵活确定即可,在本公开实施例中不做限制。In some possible implementation manners, with different target liveness detection methods, weights of intermediate liveness detection results corresponding to the same type of images may be different. For example, in a possible implementation, in the case that the target living body detection method is based on the depth map, infrared image and color image, the weight of the intermediate living body detection result corresponding to the infrared image may be A, and In the case that the target living body detection method is based on infrared image and color image, the weight of the intermediate living body detection result corresponding to the infrared image may be B, and the values of A and B may be different or the same, which is flexible according to the actual situation It only needs to be determined, and there is no limitation in this embodiment of the present disclosure.
基于权重与至少两种中间活体检测结果得到目标对象的活体检测结果的过程在本公开实施例中不做限制,在一种可能的实现方式中,可以将至少两种中间活体检测结果分别与其对应的权重相乘后进行求和,以得到目标对象的活体检测结果。The process of obtaining the living body detection result of the target object based on the weight and at least two intermediate living body detection results is not limited in the embodiment of the present disclosure. In a possible implementation manner, at least two intermediate living body detection results can be respectively corresponding to it The weights are multiplied and then summed to obtain the liveness detection result of the target object.
通过本公开实施例,可以在包含至少两种中间活体检测结果的情况下,通过自适应加权的方式降 低深度图活体检测结果的权重,从而在受到3D假体攻击的情况下也可以降低深度图对应的活体检测结果所产生的影响,进一步提升活体检测的精度。Through the embodiments of the present disclosure, in the case of including at least two intermediate living body detection results, the weight of the depth map live body detection results can be reduced by adaptive weighting, so that the depth map can also be reduced when it is attacked by a 3D prosthesis. The impact of the corresponding living body detection results further improves the accuracy of living body detection.
在一种可能的实现方式中,获取至少两种中间活体检测结果分别对应的权重,可以包括:基于活体检测网络中加权网络层的训练结果,确定至少两种中间活体检测结果分别对应的权重,其中,活体检测网络用于通过目标活体检测方式对目标对象进行活体检测。或者,根据深度图像信息和/或二维图像包含的二维图像信息,确定至少两种中间活体检测结果分别对应的权重。In a possible implementation manner, obtaining weights corresponding to at least two intermediate live body detection results may include: determining weights corresponding to at least two intermediate live body detection results based on the training results of the weighted network layer in the live body detection network, Among them, the living body detection network is used to detect the living body of the target object through the target living body detection method. Alternatively, according to the depth image information and/or the two-dimensional image information contained in the two-dimensional image, the weights corresponding to at least two intermediate living body detection results are determined respectively.
其中,活体检测网络可以是用于对目标对象进行活体检测的网络,其实现形式在本公开实施例中不做限定,不局限于下述各公开实施例。在一种可能的实现方式中,活体检测网络可以包括至少一个第一网络分支和第二网络分支,其中,第一网络分支可以用于实现基于二维图像的活体检测,第二网络分支可以用于实现基于深度图的活体检测。如上述各公开实施例所述,二维图像可以包括红外图像和/或彩色图像,因此,在一种可能的实现方式中,第一网络分支的数量可以为两个,分别用于实现基于红外图像的活体检测和基于彩色图像的活体检测。Wherein, the living body detection network may be a network used to detect the living body of the target object, and its implementation form is not limited in the embodiments of the present disclosure, and is not limited to the following disclosed embodiments. In a possible implementation manner, the living body detection network may include at least a first network branch and a second network branch, wherein the first network branch may be used to realize living body detection based on two-dimensional images, and the second network branch may be used to It is used to realize liveness detection based on depth map. As described in the above disclosed embodiments, the two-dimensional images may include infrared images and/or color images, therefore, in a possible implementation manner, the number of first network branches may be two, which are respectively used to implement infrared-based Image liveness detection and color image based liveness detection.
活体检测网络中的不同分支可以共同训练,也可以各自单独训练,本公开实施例不对活体检测网络的训练方式加以限制,任意神经网络的训练方法均可以用于对活体检测网络进行训练。Different branches in the liveness detection network can be trained together or individually. The embodiment of the present disclosure does not limit the training method of the liveness detection network, and any neural network training method can be used to train the liveness detection network.
随着目标活体检测方式的不同,活体检测网络中的不同分支可以在活体检测过程中灵活使用,举例来说,在一种可能的实现方式中,在目标活体检测方式包含基于深度图和红外图像的活体检测的情况下,可以将红外图像输入与红外图像对应的第一网络分支,将深度图输入第二网络分支,以实现目标活体检测方式下的活体检测;在一种可能的实现方式中,在目标活体检测方式包含基于深度图、红外图像和彩色图像的活体检测的情况下,可以将红外图像输入与红外图像对应的第一网络分支,将彩色图像输入与彩色图像对应的第一网络分支,以及将深度图输入第二网络分支,以实现目标活体检测方式下的活体检测。With different target liveness detection methods, different branches in the liveness detection network can be flexibly used in the liveness detection process. For example, in a possible implementation, the target liveness detection method includes depth maps and infrared images. In the case of living body detection, the infrared image can be input into the first network branch corresponding to the infrared image, and the depth map can be input into the second network branch, so as to realize the living body detection under the target living body detection mode; in a possible implementation , in the case where the target living detection method includes living detection based on depth map, infrared image and color image, the infrared image can be input into the first network branch corresponding to the infrared image, and the color image can be input into the first network corresponding to the color image branch, and input the depth map into the second network branch, so as to realize the liveness detection under the target liveness detection mode.
图4示出根据本公开一实施例的活体检测网络的网络结构示意图,如图所示,在一种可能的实现方式中,活体检测网络还可以包括加权网络层,该加权网络层可以分别与第二网络分支和第一网络分支的输出端相连接,从而对第二网络分支和第一网络分支输出的中间活体检测结果进行加权求和,以得到目标对象的活体检测结果。FIG. 4 shows a schematic diagram of a network structure of a living body detection network according to an embodiment of the present disclosure. As shown in the figure, in a possible implementation manner, the living body detection network may further include a weighted network layer, which may be connected with the weighted network layer respectively. The second network branch is connected to the output end of the first network branch, so as to carry out weighted summation on the intermediate living body detection results output by the second network branch and the first network branch, so as to obtain the living body detection result of the target object.
在活体检测网络包含该加权网络层的情况下,在对活体检测网络进行训练的过程中,可以同样实现对该加权网络层的训练,在这种情况下,基于训练后加权网络层所得到的训练结果,可以确定至少两种中间活体检测结果分别对应的权重。In the case that the liveness detection network includes the weighted network layer, in the process of training the liveness detection network, the training of the weighted network layer can also be realized. In this case, based on the obtained weighted network layer after training As a training result, weights corresponding to at least two intermediate living body detection results may be determined.
在一种可能的实现方式中,也可以根据深度图像信息和/或二维图像包含的二维图像信息,来确定权重。其中,基于深度图像信息确定权重,可以是基于深度图像信息中的活体检测距离,来确定与深度图对应的中间活体检测结果的权重,举例来说,在一些可能的实现方式中,在活体检测距离较大的情况下,深度图对应的中间活体检测结果的精度可能较低,因此可以为其分配较小的权重,权重与活体检测距离之间的具体对应关系可以根据实际情况灵活设定,在本公开实施例中不做限制。In a possible implementation manner, the weight may also be determined according to the depth image information and/or the two-dimensional image information included in the two-dimensional image. Wherein, determining the weight based on the depth image information may be based on the living body detection distance in the depth image information to determine the weight of the intermediate living body detection result corresponding to the depth image. For example, in some possible implementations, in the living body detection In the case of a large distance, the accuracy of the intermediate liveness detection result corresponding to the depth map may be low, so a smaller weight can be assigned to it, and the specific correspondence between the weight and the liveness detection distance can be flexibly set according to the actual situation. There is no limitation in the embodiments of the present disclosure.
二维图像信息可以是二维图像包含的相关信息,比如二维图像的尺寸以及亮度等信息,在本公开实施例中不做限制。基于二维图像信息确定权重,其实现方式同样可以灵活决定,在一些可能的实现方式中,在亮度较高的情况下,基于彩色图像进行活体检测所得到的中间活体检测相对来说更加精确,因此可以根据二维图像中彩色图像的亮度和预设亮度阈值进行比较,在彩色图像亮度超过预设亮度阈值的情况下为彩色图像对应的中间活体检测结果分配更高的权重,其中预设亮度阈值的数值和分配的权重的数值在本公开实施例中均不做限制,可以根据实际情况灵活选择。在一些可能的实现方式中,在尺寸较大的情况下,基于红外图像进行活体检测所得到的中间活体检测相对更精确,因此同理可以在红外图像的尺寸较大的情况下,为红外图像分配更高的权重等。The two-dimensional image information may be related information included in the two-dimensional image, such as information such as the size and brightness of the two-dimensional image, which is not limited in this embodiment of the present disclosure. The weight is determined based on two-dimensional image information, and its implementation method can also be flexibly determined. In some possible implementation methods, in the case of high brightness, the intermediate living body detection based on the color image is relatively more accurate. Therefore, it is possible to compare the brightness of the color image in the two-dimensional image with the preset brightness threshold, and assign a higher weight to the intermediate living body detection result corresponding to the color image when the brightness of the color image exceeds the preset brightness threshold, where the preset brightness The value of the threshold and the value of the assigned weight are not limited in the embodiments of the present disclosure, and can be flexibly selected according to actual conditions. In some possible implementations, when the size of the infrared image is large, the intermediate living body detection based on the infrared image is relatively more accurate, so in the same way, when the size of the infrared image is large, the infrared image Assign higher weights etc.
通过本公开实施例,可以通过两种方式灵活地确定不同中间活体检测结果的权重,提升活体检测过程的灵活性,其中通过神经网络的方式自适应地确定不同中间活体检测结果对应的权重,从而实现端到端的活体检测,提升活体检测的效率和精度;而根据活体检测的图像的实际情况来自适应地确定不同中间活体检测结果的权重,使得得到的活体检测结果更加符合真实情况,进一步提升活体检测的精度。Through the embodiments of the present disclosure, the weights of different intermediate living body detection results can be flexibly determined in two ways, and the flexibility of the living body detection process can be improved, wherein the weights corresponding to different intermediate living body detection results are adaptively determined through a neural network, so that Realize end-to-end liveness detection, improve the efficiency and accuracy of liveness detection; and adaptively determine the weight of different intermediate liveness detection results according to the actual situation of the liveness detection image, so that the obtained liveness detection results are more in line with the real situation, further improving the liveness Detection accuracy.
在一种可能的实现方式中,目标活体检测方式可以包括基于深度图和二维图像的活体检测,S13可以包括:通过活体检测网络中的至少一个第一网络分支,对二维图像中目标对象所在的第一检测图像进行活体检测。以及,通过活体检测网络中的第二网络分支,对深度图中目标对象所在的第二检测图像进行活体检测。In a possible implementation manner, the target living body detection method may include living body detection based on a depth map and a two-dimensional image, and S13 may include: using at least one first network branch in the living body detection network to detect the target object in the two-dimensional image Live body detection is performed on the first detected image. And, through the second network branch in the living body detection network, live body detection is performed on the second detection image where the target object is located in the depth map.
其中,活体检测网络、第一网络分支、第二网络分支、第一检测图像以及第二检测图像的实现形式均可以参考上述各公开实施例,在此不再赘述。Wherein, the implementation forms of the living body detection network, the first network branch, the second network branch, the first detection image and the second detection image can refer to the above disclosed embodiments, and will not be repeated here.
由于第一检测图像可以是从二维图像中提取出的目标对象所在的图像,因此,将第一检测图像输入至第一网络分支进行活体检测,可以有效减小活体检测过程中的计算量,提升活体检测效率。Since the first detection image can be the image where the target object is extracted from the two-dimensional image, inputting the first detection image to the first network branch for live body detection can effectively reduce the amount of computation in the live body detection process, Improve the efficiency of liveness detection.
如上述公开实施例所述,第一网络分支可以包括与红外图像对应的第一网络分支以及与彩色图像对应的第一网络分支,为了实现对二维图像中目标对象所在的第一检测图像所进行的活体检测,在一种可能的实现方式中,可以仅将从红外图像中提取的第一检测图像输入红外图像对应的第一网络分支,也可以仅将从彩色图像中提取的第一检测图像输入彩色图像对应的第一网络分支,还可以将从红外图像和彩色图像中分别提取的第一检测图像,输入至各自对应的第一网络分支等。As described in the above disclosed embodiments, the first network branch may include the first network branch corresponding to the infrared image and the first network branch corresponding to the color image, in order to realize the detection of the first detection image where the target object is located in the two-dimensional image. In a possible implementation manner, only the first detection image extracted from the infrared image can be input into the first network branch corresponding to the infrared image, or only the first detection image extracted from the color image can be input The image is input to the first network branch corresponding to the color image, and the first detected image extracted from the infrared image and the color image can also be input to the first network branch corresponding to each.
同理,由于第二检测图像可以是从深度图中提取出的目标对象所在的图像,因此,将第二检测图像输入至第二网络分支进行活体检测,同样可以提升活体检测效率。Similarly, since the second detection image may be the image where the target object is extracted from the depth map, inputting the second detection image to the second network branch for liveness detection can also improve the efficiency of liveness detection.
通过本公开实施例,可以在目标活体检测方式同时包括基于深度图和二维图像的活体检测的情况下,利用尺寸较小的第一检测图像,较快地得到二维图像对应的中间活体检测结果,同时利用第二检测图像得到与深度图对应的中间活体检测结果,从而通过多种中间活体检测结果共同较为精确地得到目标对象的活体检测结果,确保活体检测精度的同时提高了活体检测的效率。Through the embodiments of the present disclosure, when the target living body detection method includes the living body detection based on the depth map and the two-dimensional image at the same time, the intermediate living body detection corresponding to the two-dimensional image can be quickly obtained by using the first detection image with a smaller size As a result, the intermediate living body detection result corresponding to the depth map is obtained by using the second detection image at the same time, so that the living body detection result of the target object can be obtained more accurately through multiple intermediate living body detection results, and the accuracy of the living body detection is improved while ensuring the accuracy of the living body detection. efficiency.
在一种可能的实现方式中,目标活体检测方式可以包括基于二维图像的活体检测,S13可以包括:通过活体检测网络中的至少一个第一网络分支,对二维图像中目标对象所在的第一检测图像进行活体检测。In a possible implementation manner, the target living body detection method may include living body detection based on a two-dimensional image, and S13 may include: using at least one first network branch in the living body detection network to detect the second branch of the target object in the two-dimensional image A detection image is used for liveness detection.
本公开实施例的实现形式可以参考上述公开实施例,在此不再赘述。通过本公开实施例,可以在深度图不清晰或是距离较远的情况下,省略深度图而通过二维图像来实现活体检测,提升活体检测的整体精度。For the implementation forms of the embodiments of the present disclosure, reference may be made to the above-mentioned disclosed embodiments, and details are not repeated here. Through the embodiments of the present disclosure, when the depth map is unclear or the distance is far away, the depth map can be omitted and the living body detection can be realized through the two-dimensional image, thereby improving the overall accuracy of the living body detection.
在一种可能的实现方式中,目标活体检测方式可以包括基于二维图像的活体检测,S13可以包括:获取二维图像中目标对象所在的第一检测图像;根据二维图像与原始二维图像之间的第二图像对应关系,结合第一检测图像,得到原始二维图像中目标对象的第三检测图像;通过活体检测网络中的至少一个第一网络分支,对第三检测图像进行活体检测。In a possible implementation manner, the detection method of the target living body may include the living body detection based on the two-dimensional image, and S13 may include: acquiring the first detection image where the target object is located in the two-dimensional image; The corresponding relationship between the second image, combined with the first detection image, to obtain the third detection image of the target object in the original two-dimensional image; through at least one first network branch in the living body detection network, perform liveness detection on the third detection image .
其中,第二图像对应关系可以是二维图像与原始图像之间的图像坐标变换关系。如上述各公开实施例所述,在一种可能的实现方式中,二维图像可以是对原始二维图像进行配准处理后所得到的图像,因此在配准的过程中,可以自动确定第二图像对应关系。Wherein, the second image corresponding relationship may be an image coordinate transformation relationship between the two-dimensional image and the original image. As described in the above disclosed embodiments, in a possible implementation manner, the two-dimensional image may be an image obtained after registration processing is performed on the original two-dimensional image, so during the registration process, the second The correspondence between the two images.
如上述各公开实施例所述,第一检测图像是从二维图像中提取出的目标对象所在的图像,则基于第二图像对应关系,可以从原始二维图像中提取出目标对象所在的第三检测图像。在一种可能的实现方式中,可以通过第二图像对应关系,对第一检测图像在二维图像中的坐标位置进行变换,以得到目标对象在原始二维图像中的坐标位置,基于该坐标位置对原始二维图像进行裁剪,可以得到第三检测 图像。As described in the above disclosed embodiments, the first detection image is the image where the target object is located extracted from the two-dimensional image, and based on the corresponding relationship of the second image, the first detection image where the target object is located can be extracted from the original two-dimensional image. Three detection images. In a possible implementation manner, the coordinate position of the first detection image in the two-dimensional image can be transformed through the second image correspondence to obtain the coordinate position of the target object in the original two-dimensional image, based on the coordinate The position is used to crop the original two-dimensional image to obtain a third detection image.
由于第一检测图像可以包括从红外图像中提取的第一检测图像和/或从彩色图像中提取的第一检测图像,相应地,第三检测图像也可以包括从原始红外图像中提取的第三检测图像和/或从原始彩色图像中提取的第三检测图像。Since the first detection image may include the first detection image extracted from the infrared image and/or the first detection image extracted from the color image, correspondingly, the third detection image may also include the third detection image extracted from the original infrared image. An inspection image and/or a third inspection image extracted from the original color image.
通过活体检测网络中的至少一个第一网络分支对第三检测图像进行活体检测的方式,可以参考上述公开实施例中对第一检测图像进行活体检测的方式,在此不再赘述。For the method of performing life detection on the third detection image through at least one first network branch in the life detection network, reference may be made to the method of performing life detection on the first detection image in the above-mentioned disclosed embodiments, which will not be repeated here.
由于在将原始二维图像与深度图配准的过程中,可能会对原始二维图像进行裁剪和/或缩放等配准处理,使得二维图像的分辨率或清晰度等低于原始二维图像,故从原始二维图像中得到的第三检测图像,相对于从二维图像中提取的第一检测图像来说,可以具有更高的图像质量,基于第三检测图像进行活体检测的精度也可以更高。During the process of registering the original 2D image with the depth map, registration processing such as cropping and/or scaling may be performed on the original 2D image, so that the resolution or definition of the 2D image is lower than the original 2D image. image, so the third detection image obtained from the original two-dimensional image can have higher image quality than the first detection image extracted from the two-dimensional image, and the accuracy of living body detection based on the third detection image Can also be higher.
因此,通过本公开实施例,可以在基于二维图像进行活体检测且省略深度图的情况下,通过在原始红外图像和/或原始彩色图像中截取的具有更高分辨率的第三检测图像来进行活体检测,从而有效提升活体检测的精度,在省略深度图的情况下也可以得到较为准确的活体检测结果。Therefore, through the embodiments of the present disclosure, in the case of performing living body detection based on two-dimensional images and omitting the depth map, the third detection image with higher resolution intercepted in the original infrared image and/or the original color image can be used to detect Live detection is performed to effectively improve the accuracy of live detection, and more accurate live detection results can be obtained even when the depth map is omitted.
在一种可能的实现方式中,本公开实施例提出的活体检测方法还可以包括:在基于活体检测结果确定目标对象为活体的情况下,根据二维图像,对目标对象进行身份识别。其中,根据二维图像对目标对象进行身份识别,可以包括基于彩色图像对目标对象进行身份识别,也可以包括基于红外图像对目标对象进行身份识别,或是基于彩色图像和红外图像对目标对象进行身份识别。在一些可能的实现方式中,还可以根据二维图像,结合深度图,对目标对象实现三维的身份识别等。身份识别的具体方式在本公开实施例中不做限制,任何可以基于图像实现身份识别的过程,均可以作为身份识别的实现方式。在一种可能的实现方式中,可以通过任意具有身份识别功能的神经网络,实现目标对象的身份识别。In a possible implementation manner, the living body detection method proposed by the embodiment of the present disclosure may further include: when the target object is determined to be a living body based on the living body detection result, identifying the target object according to the two-dimensional image. Among them, identifying the target object based on the two-dimensional image may include identifying the target object based on a color image, or identifying the target object based on an infrared image, or identifying the target object based on a color image and an infrared image. Identification. In some possible implementation manners, it is also possible to implement three-dimensional identification of the target object based on the two-dimensional image combined with the depth map. The specific manner of identity recognition is not limited in the embodiment of the present disclosure, and any process that can realize identity recognition based on images can be used as the realization manner of identity recognition. In a possible implementation manner, the identity recognition of the target object can be realized through any neural network with identity recognition function.
在一种可能的实现方式中,在基于活体检测结果确定目标对象为非活体的情况下,则可以结束流程而不对目标对象进行身份识别。通过本公开实施例,可以在确定目标对象为活体的情况下再对目标对象进行身份识别,节省了目标对象为非活体情况下的身份识别过程,提高身份识别的效率和置信度。In a possible implementation manner, if the target object is determined to be non-living based on the liveness detection result, the process may end without identifying the target object. Through the embodiments of the present disclosure, the target object can be identified when it is determined that the target object is a living body, which saves the identification process when the target object is not a living body, and improves the efficiency and confidence of identification.
图5示出根据本公开实施例的活体检测装置20的框图,如图5所示,所述装置包括:图像获取模块21,用于获取目标对象的深度图和二维图像。检测方式确定模块22,用于基于深度图包含的深度图像信息,确定目标活体检测方式。活体检测模块23,用于基于二维图像,通过目标活体检测方式对目标对象进行活体检测,得到目标对象的活体检测结果。Fig. 5 shows a block diagram of a living body detection device 20 according to an embodiment of the present disclosure. As shown in Fig. 5 , the device includes: an image acquisition module 21, configured to acquire a depth map and a two-dimensional image of a target object. The detection mode determination module 22 is configured to determine a target living body detection mode based on the depth image information included in the depth map. The living body detection module 23 is configured to detect the living body of the target object through the target living body detection method based on the two-dimensional image, and obtain the living body detection result of the target object.
在一种可能的实现方式中,检测方式确定模块用于:基于深度图包含的深度图像信息,获取目标对象在深度图中的目标尺寸;在目标尺寸小于预设尺寸阈值的情况下,目标活体检测方式包括:基于二维图像的活体检测;或,在目标尺寸大于或等于预设尺寸阈值的情况下,目标活体检测方式包括:基于深度图和二维图像的活体检测。In a possible implementation, the detection mode determination module is used to: obtain the target size of the target object in the depth map based on the depth image information contained in the depth map; when the target size is smaller than the preset size threshold, the target living body The detection method includes: living body detection based on a two-dimensional image; or, when the target size is greater than or equal to a preset size threshold, the target living body detection method includes: living body detection based on a depth map and a two-dimensional image.
在一种可能的实现方式中,检测方式确定模块进一步用于:对二维图像进行目标对象检测,得到二维图像中目标对象的第一检测图像;基于深度图包含的深度图像信息,确定深度图与二维图像之间的第一图像对应关系;根据第一图像对应关系,结合第一检测图像,得到深度图中目标对象的第二检测图像;根据第二检测图像的尺寸,确定目标对象在深度图中的目标尺寸。In a possible implementation, the detection mode determination module is further used to: detect the target object on the two-dimensional image to obtain the first detection image of the target object in the two-dimensional image; determine the depth based on the depth image information contained in the depth map The first image correspondence between the map and the two-dimensional image; according to the first image correspondence, combined with the first detection image, a second detection image of the target object in the depth map is obtained; according to the size of the second detection image, the target object is determined Object size in the depth map.
在一种可能的实现方式中,检测方式确定模块还用于:对第一检测图像进行图像质量检测,得到图像质量检测结果;在图像质量检测结果大于预设质量阈值的情况下,基于深度图包含的深度图像信息,确定深度图与二维图像之间的第一图像对应关系。In a possible implementation manner, the detection mode determination module is further configured to: perform image quality detection on the first detection image to obtain an image quality detection result; when the image quality detection result is greater than a preset quality threshold, The contained depth image information determines the first image correspondence between the depth map and the two-dimensional image.
在一种可能的实现方式中,检测方式确定模块用于:基于深度图包含的深度图像信息,获取目标对象的活体检测距离;在活体检测距离大于预设距离阈值的情况下,目标活体检测方式包括:基于二 维图像的活体检测;在活体检测距离小于或等于预设距离阈值的情况下,目标活体检测方式包括:基于深度图和二维图像的活体检测。In a possible implementation, the detection mode determination module is configured to: obtain the living body detection distance of the target object based on the depth image information contained in the depth map; Including: living body detection based on two-dimensional images; when the living body detection distance is less than or equal to the preset distance threshold, the target living body detection method includes: living body detection based on depth map and two-dimensional image.
在一种可能的实现方式中,二维图像包括红外图像和/或彩色图像,目标活体检测方式包括:基于至少两种图像的活体检测,至少两种图像包括深度图像、红外图像以及彩色图像中的至少两种;活体检测模块用于:基于至少两种图像,通过目标活体检测方式对目标对象进行活体检测,得到至少两种中间活体检测结果,其中,至少两种中间活体检测结果分别与至少两种图像对应;获取至少两种中间活体检测结果分别对应的权重;基于权重与至少两种中间活体检测结果,得到目标对象的活体检测结果。In a possible implementation manner, the two-dimensional image includes an infrared image and/or a color image, and the target living body detection method includes: living body detection based on at least two images, and the at least two images include a depth image, an infrared image, and a color image. at least two; the living body detection module is used for: based on at least two kinds of images, through the target live body detection method to carry out live body detection on the target object, to obtain at least two intermediate live body detection results, wherein the at least two intermediate live body detection results are respectively the same as at least The two images correspond; weights corresponding to at least two intermediate living body detection results are obtained; based on the weights and the at least two intermediate living body detection results, the living body detection results of the target object are obtained.
在一种可能的实现方式中,活体检测模块进一步用于:基于活体检测网络中加权网络层的训练结果,确定至少两种中间活体检测结果分别对应的权重,其中,活体检测网络用于通过目标活体检测方式对目标对象进行活体检测;或者,根据深度图像信息和/或二维图像包含的二维图像信息,确定至少两种中间活体检测结果分别对应的权重。In a possible implementation, the living body detection module is further configured to: determine weights corresponding to at least two intermediate living body detection results based on the training results of the weighted network layer in the living body detection network, wherein the living body detection network is used to pass the target Liveness detection is performed on the target object in the liveness detection mode; or, according to the depth image information and/or the two-dimensional image information contained in the two-dimensional image, the weights corresponding to at least two intermediate liveness detection results are determined respectively.
在一种可能的实现方式中,目标活体检测方式包括基于深度图和二维图像的活体检测;活体检测模块用于:通过活体检测网络中的至少一个第一网络分支,对二维图像中目标对象所在的第一检测图像进行活体检测;以及,通过活体检测网络中的第二网络分支,对深度图中目标对象所在的第二检测图像进行活体检测。In a possible implementation, the target living detection method includes living detection based on a depth map and a two-dimensional image; the living detection module is configured to: use at least one first network branch in the living detection network to detect the Liveness detection is performed on the first detection image where the object is located; and liveness detection is performed on the second detection image where the target object is located in the depth map through the second network branch in the liveness detection network.
在一种可能的实现方式中,图像获取模块用于:获取目标对象的深度图和原始二维图像;基于深度图,对原始二维图像进行配准处理,得到与深度图配准的二维图像,其中,配准处理包括裁剪处理和/或缩放处理。In a possible implementation, the image acquisition module is used to: acquire the depth map of the target object and the original two-dimensional image; based on the depth map, perform registration processing on the original two-dimensional image to obtain a two-dimensional image registered with the depth map images, wherein the registration process includes cropping and/or scaling.
在一种可能的实现方式中,目标活体检测方式包括基于二维图像的活体检测;活体检测模块用于:获取二维图像中目标对象所在的第一检测图像;根据二维图像与原始二维图像之间的第二图像对应关系,结合第一检测图像,得到原始二维图像中目标对象的第三检测图像;通过活体检测网络中的至少一个第一网络分支,对第三检测图像进行活体检测。In a possible implementation, the target living detection method includes living detection based on two-dimensional images; the living detection module is used to: obtain the first detection image where the target object is located in the two-dimensional image; The second image correspondence between the images is combined with the first detection image to obtain a third detection image of the target object in the original two-dimensional image; through at least one first network branch in the living body detection network, liveness is performed on the third detection image detection.
在一种可能的实现方式中,装置还用于:在基于活体检测结果确定目标对象为活体的情况下,根据二维图像,对目标对象进行身份识别。In a possible implementation manner, the device is further configured to: identify the target object according to the two-dimensional image when it is determined that the target object is a living body based on the living body detection result.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
应用场景示例Application Scenario Example
图6示出根据本公开一应用示例的示意图,如图所示,本公开实施例提出了一种活体检测方法,该活体检测的过程可以包括如下过程:Fig. 6 shows a schematic diagram of an application example according to the present disclosure. As shown in the figure, an embodiment of the present disclosure proposes a living body detection method, and the living body detection process may include the following process:
S31,通过相机待进行活体检测的人物对象进行图像采集,并从相机中获取该人物对象的原始深度图D,原始红外图像I以及原始RGB图像V。S31. Collect an image of a person subject to be detected by the camera, and obtain an original depth image D, an original infrared image I, and an original RGB image V of the person object from the camera.
S32,对原始红外图像I和原始RGB图像V进行裁剪和缩放,使其分辨率和空间位置与原始深度图D对齐,得到对齐后的红外图像i和RGB图像v。S32. Crop and scale the original infrared image I and the original RGB image V to align their resolution and spatial position with the original depth map D, and obtain aligned infrared image i and RGB image v.
S33,对红外图像i进行人脸检测,得到人脸框bbox,作为从红外图像中提取的第一检测图像。S33. Perform face detection on the infrared image i to obtain a face frame bbox as a first detection image extracted from the infrared image.
S34,对bbox进行人脸质量检测,得到图像质量检测结果,在图像质量检测结果低于预设质量阈值的情况下,中止当前过程并返回S31重新获取图像。S34. Perform face quality detection on the bbox to obtain an image quality detection result. If the image quality detection result is lower than the preset quality threshold, stop the current process and return to S31 to obtain an image again.
S35,根据bbox,在RGB图像v中裁剪出对应的人脸框box_v,并在原始深度图中裁剪出对应的人脸框box_d,作为第二检测图像,同时将box_d的长度和/或宽度作为目标尺寸。S35, according to bbox, cut out the corresponding face frame box_v in the RGB image v, and cut out the corresponding face frame box_d in the original depth image as the second detection image, and use the length and/or width of box_d as target size.
S36,在目标尺寸小于预设尺寸阈值的情况下,将bbox和box_v分别对应回原始红外图像I和原始RGB图像V中,得到从原始红外图像中截取的人脸框box_I和原始RGB图像中截取的人脸框box_V,作 为待检测人脸框。S36, in the case that the target size is smaller than the preset size threshold, correspond bbox and box_v back to the original infrared image I and the original RGB image V respectively, and obtain the face frame box_I intercepted from the original infrared image and the original RGB image intercepted The face frame box_V is used as the face frame to be detected.
S37,在目标尺寸大于或等于预设尺寸阈值的情况下,将box_d、bbox和box_v作为待检测人脸框。S37. When the target size is greater than or equal to the preset size threshold, use box_d, bbox, and box_v as human face frames to be detected.
S38,将待检测人脸框输入活体检测网络,得到活体检测网络输出的一个或多个人脸框分别对应的中间活体检测结果,以及一个或多个中间活体检测结果分别对应的自适应权重,其中,自适应权重可以由活体检测网络得到,也可以根据原始深度图D,原始红外图像I以及原始RGB图像V中的图像信息所得到,其中图像信息可以包括活体检测距离、图像亮度或图像尺寸等。S38, input the human face frame to be detected into the living body detection network, and obtain the intermediate living body detection results respectively corresponding to one or more human face frames output by the living body detection network, and the adaptive weights respectively corresponding to one or more intermediate living body detection results, wherein , the adaptive weight can be obtained by the living body detection network, and can also be obtained from the image information in the original depth map D, the original infrared image I and the original RGB image V, where the image information can include the living body detection distance, image brightness or image size, etc. .
S39,根据自适应权重,对一个或多个中间活体检测结果进行加权,得到最终的活体检测结果。S39. Weight one or more intermediate living body detection results according to the adaptive weight to obtain a final living body detection result.
本公开应用示例提出的活体检测方法,可以支持更远的识别距离,更加易于应用;且具有较高的防御力和检测精度,也具有较高的真人通过率;另外,本公开应用示例中提出的活体检测网络可以通过相关的活体检测网络模型变形后得到,易于实现,同时活体检测网络中基于深度图进行活体检测的第二网络分支可以单独训练,训练方式更加灵活,易于训练。The living body detection method proposed in the application example of the disclosure can support a longer recognition distance and is easier to apply; it has higher defense and detection accuracy, and also has a higher pass rate of real people; in addition, the application example of the disclosure proposes The liveness detection network can be obtained by deforming the relevant liveness detection network model, which is easy to implement. At the same time, the second network branch of the liveness detection network based on the depth map can be trained separately, and the training method is more flexible and easy to train.
本公开应用示例提出的活体检测方法可以用于人脸门禁以及人脸支付等场景,便于更远距离的刷脸通行与支付,更加便利。同时更高的防御力也可以提高门禁和财产的安全性。The living body detection method proposed in the application example of the present disclosure can be used in scenarios such as face access control and face payment, which facilitates farther-distance face-swiping traffic and payment, and is more convenient. At the same time, higher defense can also improve the security of access control and property.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned method embodiments mentioned in this disclosure can all be combined with each other to form a combined embodiment without violating the principle and logic. Due to space limitations, this disclosure will not repeat them. Those skilled in the art can understand that, in the above method in the specific implementation manner, the specific execution order of each step should be determined according to its function and possible internal logic.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor. The computer readable storage medium may be a non-transitory computer readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现如上任一实施例提供的活体检测方法的指令。An embodiment of the present disclosure also provides a computer program product, including computer readable codes. When the computer readable codes run on the device, the processor in the device executes the method for implementing the living body detection method provided in any of the above embodiments. instruction.
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的活体检测方法的操作。The embodiments of the present disclosure also provide another computer program product, which is used for storing computer-readable instructions, and when the instructions are executed, the computer executes the operations of the living body detection method provided in any of the above-mentioned embodiments.
本公开实施例还提供了另一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的易失性计算机可读存储介质或非易失性计算机可读存储介质,当计算机可读代码在电子设备的处理器中运行时,电子设备中的处理器执行用于实现如上任一实施例提供的活体检测方法的指令。Embodiments of the present disclosure also provide another computer program product, including computer-readable codes, or a volatile computer-readable storage medium or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer can When the read code runs in the processor of the electronic device, the processor in the electronic device executes instructions for implementing the living body detection method provided in any one of the above embodiments.
电子设备可以被提供为终端、服务器或其它形态的设备。Electronic devices may be provided as terminals, servers, or other forms of devices.
图7示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 7 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
参照图7,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。7, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM), 可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to various components of the electronic device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 . For example, the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
图8示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图8,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 8 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, electronic device 1900 may be provided as a server. Referring to FIG. 8 , electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows Server TM,Mac OS X TM,UnixTM,Linux TM,FreeBSD TM或类似。 Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 . The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server , Mac OS X , Unix™, Linux , FreeBSD or the like.
在一些可能的实现方式中,活体检测装置20中包含的模块,与被提供为终端、服务器或其他形态的设备的电子设备中所包含的硬件模块相互对应,对应方式可以根据电子设备的设备形态灵活决定,不局限于下述各公开实施例。举例来说,在一个示例中,活体检测装置20中所包含的各模块可以与终端形态的电子设备中的处理组件802对应;在一个示例中,活体检测装置20中所包含的各模块也可以与服务器形态的电子设备中的处理组件1922对应。In some possible implementations, the modules contained in the living body detection device 20 correspond to the hardware modules contained in the electronic equipment provided as terminals, servers or other forms of equipment. It is a flexible decision and is not limited to the following disclosed embodiments. For example, in one example, each module contained in the life detection device 20 may correspond to the processing component 802 in the electronic device in the form of a terminal; in one example, each module contained in the life detection device 20 may also It corresponds to the processing unit 1922 in the electronic device in the form of a server.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure can be a system, method and/or computer program product. A computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是——但不限于——电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言-诸如Smalltalk、C++等,以及常规的过程式编程语言-诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络-包括局域网(LAN)或广域网(WAN)-连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, including object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as via the Internet using an Internet service provider). connect). In some embodiments, an electronic circuit, such as a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA), can be customized by utilizing state information of computer-readable program instructions, which can Various aspects of the present disclosure are implemented by executing computer readable program instructions.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理 器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically realized by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. Wait.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Having described various embodiments of the present disclosure above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principle of each embodiment, practical application or improvement of technology in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.

Claims (15)

  1. 一种活体检测方法,包括:A living body detection method, comprising:
    获取目标对象的深度图和二维图像;Obtain a depth map and a 2D image of the target object;
    基于所述深度图包含的深度图像信息,确定目标活体检测方式;Based on the depth image information contained in the depth map, determine the detection method of the target living body;
    基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到所述目标对象的活体检测结果。Based on the two-dimensional image, a living body detection is performed on the target object through the target living body detection manner, and a living body detection result of the target object is obtained.
  2. 根据权利要求1所述的方法,其中,所述基于所述深度图包含的深度图像信息,确定目标活体检测方式,包括:The method according to claim 1, wherein said determining the target living body detection method based on the depth image information included in the depth map comprises:
    基于所述深度图包含的深度图像信息,获取所述目标对象在所述深度图中的目标尺寸;Acquiring the target size of the target object in the depth map based on the depth image information included in the depth map;
    在所述目标尺寸小于预设尺寸阈值的情况下,所述目标活体检测方式包括:基于所述二维图像的活体检测;或,In the case that the target size is smaller than a preset size threshold, the target living detection method includes: living detection based on the two-dimensional image; or,
    在所述目标尺寸大于或等于预设尺寸阈值的情况下,所述目标活体检测方式包括:基于所述深度图和所述二维图像的活体检测。In the case that the size of the target is greater than or equal to a preset size threshold, the target living detection method includes: living detection based on the depth map and the two-dimensional image.
  3. 根据权利要求2所述的方法,其中,所述基于所述深度图包含的深度图像信息,获取所述目标对象在所述深度图中的目标尺寸,包括:The method according to claim 2, wherein said obtaining the target size of the target object in the depth map based on the depth image information included in the depth map comprises:
    对所述二维图像进行目标对象检测,得到所述二维图像中所述目标对象的第一检测图像;performing target object detection on the two-dimensional image to obtain a first detected image of the target object in the two-dimensional image;
    基于所述深度图包含的深度图像信息,确定所述深度图与所述二维图像之间的第一图像对应关系;determining a first image correspondence between the depth map and the two-dimensional image based on depth image information included in the depth map;
    根据所述第一图像对应关系,结合所述第一检测图像,得到所述深度图中所述目标对象的第二检测图像;Obtaining a second detection image of the target object in the depth map in combination with the first detection image according to the first image correspondence;
    根据所述第二检测图像的尺寸,确定所述目标对象在所述深度图中的目标尺寸。Determine the target size of the target object in the depth map according to the size of the second detection image.
  4. 根据权利要求3所述的方法,其中,在所述对所述二维图像进行目标对象检测,得到所述二维图像中所述目标对象的第一检测图像之后,所述方法还包括:The method according to claim 3, wherein, after the target object detection is performed on the two-dimensional image to obtain the first detected image of the target object in the two-dimensional image, the method further comprises:
    对所述第一检测图像进行图像质量检测,得到图像质量检测结果;performing image quality inspection on the first inspection image to obtain an image quality inspection result;
    在所述图像质量检测结果大于预设质量阈值的情况下,基于所述深度图包含的深度图像信息,确定所述深度图与所述二维图像之间的第一图像对应关系。If the image quality detection result is greater than a preset quality threshold, based on depth image information included in the depth map, determine a first image correspondence between the depth map and the two-dimensional image.
  5. 根据权利要求1至4中任意一项所述的方法,其中,所述基于所述深度图包含的深度图像信息,确定目标活体检测方式,包括:The method according to any one of claims 1 to 4, wherein said determining the target living body detection method based on the depth image information contained in the depth map includes:
    基于所述深度图包含的深度图像信息,获取所述目标对象的活体检测距离;Acquiring the living body detection distance of the target object based on the depth image information included in the depth map;
    在所述活体检测距离大于预设距离阈值的情况下,所述目标活体检测方式包括:基于所述二维图像的活体检测;In the case where the living body detection distance is greater than a preset distance threshold, the target living body detection method includes: living body detection based on the two-dimensional image;
    在所述活体检测距离小于或等于预设距离阈值的情况下,所述目标活体检测方式包括:基于所述深度图和所述二维图像的活体检测。In a case where the living body detection distance is less than or equal to a preset distance threshold, the target living body detection manner includes: living body detection based on the depth map and the two-dimensional image.
  6. 根据权利要求1至5中任意一项所述的方法,其中,所述二维图像包括红外图像和/或彩色图像,所述目标活体检测方式包括:基于至少两种图像的活体检测,所述至少两种图像包括所述深度图像、所述红外图像以及所述彩色图像中的至少两种;The method according to any one of claims 1 to 5, wherein the two-dimensional image includes an infrared image and/or a color image, and the target living body detection method includes: living body detection based on at least two images, the at least two images comprising at least two of the depth image, the infrared image, and the color image;
    所述基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到所述目标对象的活体检测结果,包括:Based on the two-dimensional image, the liveness detection of the target object is performed through the target living body detection method, and the living body detection result of the target object is obtained, including:
    基于所述至少两种图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到至少两种中间活体检测结果,其中,所述至少两种中间活体检测结果分别与所述至少两种图像对应;Based on the at least two types of images, the target object is detected by the target living body detection method to obtain at least two intermediate living body detection results, wherein the at least two intermediate living body detection results are respectively different from the at least two image correspondence;
    获取所述至少两种中间活体检测结果分别对应的权重;Acquiring weights respectively corresponding to the at least two intermediate living body detection results;
    基于所述权重与所述至少两种中间活体检测结果,得到所述目标对象的活体检测结果。A living body detection result of the target object is obtained based on the weight and the at least two intermediate living body detection results.
  7. 根据权利要求6所述的方法,其中,所述获取所述至少两种中间活体检测结果分别对应的权重,包括:The method according to claim 6, wherein said obtaining weights corresponding to said at least two intermediate living body detection results respectively comprises:
    基于活体检测网络中加权网络层的训练结果,确定所述至少两种中间活体检测结果分别对应的权重,其中,所述活体检测网络用于通过所述目标活体检测方式对所述目标对象进行活体检测;或者,Based on the training results of the weighted network layer in the living body detection network, determine the weights corresponding to the at least two intermediate living body detection results, wherein the living body detection network is used to detect the target object through the target living body detection method. detection; or,
    根据所述深度图像信息和/或所述二维图像包含的二维图像信息,确定所述至少两种中间活体检测结果分别对应的权重。According to the depth image information and/or the two-dimensional image information included in the two-dimensional image, determine the respective weights corresponding to the at least two intermediate living body detection results.
  8. 根据权利要求1至7中任意一项所述的方法,其中,所述目标活体检测方式包括基于所述深度图和所述二维图像的活体检测;The method according to any one of claims 1 to 7, wherein the target living detection method comprises living detection based on the depth map and the two-dimensional image;
    所述基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,包括:The live detection of the target object through the target live detection method based on the two-dimensional image includes:
    通过活体检测网络中的至少一个第一网络分支,对所述二维图像中所述目标对象所在的第一检测图像进行活体检测;以及,Performing liveness detection on the first detection image where the target object is located in the two-dimensional image by using at least one first network branch in the liveness detection network; and,
    通过活体检测网络中的第二网络分支,对所述深度图中所述目标对象所在的第二检测图像进行活体检测。Liveness detection is performed on the second detection image where the target object is located in the depth map through the second network branch in the liveness detection network.
  9. 根据权利要求1至8中任意一项所述的方法,其中,所述获取目标对象的深度图和二维图像,包括:The method according to any one of claims 1 to 8, wherein said acquiring the depth map and the two-dimensional image of the target object comprises:
    获取目标对象的深度图和原始二维图像;Obtain the depth map and the original 2D image of the target object;
    基于所述深度图,对所述原始二维图像进行配准处理,得到与所述深度图配准的所述二维图像,其中,所述配准处理包括裁剪处理和/或缩放处理。Based on the depth map, registration processing is performed on the original two-dimensional image to obtain the two-dimensional image registered with the depth map, wherein the registration processing includes cropping processing and/or scaling processing.
  10. 根据权利要求9所述的方法,其中,所述目标活体检测方式包括基于所述二维图像的活体检测;The method according to claim 9, wherein the target living body detection method comprises living body detection based on the two-dimensional image;
    所述基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,包括:The live detection of the target object through the target live detection method based on the two-dimensional image includes:
    获取所述二维图像中所述目标对象所在的第一检测图像;Acquiring a first detection image where the target object is located in the two-dimensional image;
    根据所述二维图像与所述原始二维图像之间的第二图像对应关系,结合所述第一检测图像,得到所述原始二维图像中所述目标对象的第三检测图像;Obtaining a third detected image of the target object in the original two-dimensional image in combination with the first detected image according to a second image correspondence between the two-dimensional image and the original two-dimensional image;
    通过活体检测网络中的至少一个第一网络分支,对所述第三检测图像进行活体检测。The living body detection is performed on the third detection image through at least one first network branch in the living body detection network.
  11. 根据权利要求1至10中任意一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 10, wherein the method further comprises:
    在基于所述活体检测结果确定所述目标对象为活体的情况下,根据所述二维图像,对所述目标对象进行身份识别。In a case where it is determined that the target object is a living body based on the living body detection result, the target object is identified according to the two-dimensional image.
  12. 一种活体检测装置,包括:A living body detection device, comprising:
    图像获取模块,用于获取目标对象的深度图和二维图像;An image acquisition module, configured to acquire a depth map and a two-dimensional image of the target object;
    检测方式确定模块,用于基于所述深度图包含的深度图像信息,确定目标活体检测方式;A detection mode determination module, configured to determine a target living body detection mode based on the depth image information contained in the depth map;
    活体检测模块,用于基于所述二维图像,通过所述目标活体检测方式对所述目标对象进行活体检测,得到所述目标对象的活体检测结果。The liveness detection module is configured to perform liveness detection on the target object through the target liveness detection method based on the two-dimensional image, and obtain a liveness detection result of the target object.
  13. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。Wherein, the processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1-11.
  14. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。A computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
  15. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的易失性计算机可 读存储介质或非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行用于实现权利要求1-11中的任一权利要求所述的方法。A computer program product, comprising computer readable codes, or a volatile computer readable storage medium or a nonvolatile computer readable storage medium bearing computer readable codes, when the computer readable codes are stored in an electronic device When running in the processor, the processor in the electronic device executes the method described in any one of claims 1-11.
PCT/CN2021/126438 2021-06-30 2021-10-26 Living body detection method and apparatus, electronic device, and storage medium WO2023273050A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110737711.7A CN113469036A (en) 2021-06-30 2021-06-30 Living body detection method and apparatus, electronic device, and storage medium
CN202110737711.7 2021-06-30

Publications (1)

Publication Number Publication Date
WO2023273050A1 true WO2023273050A1 (en) 2023-01-05

Family

ID=77876653

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/126438 WO2023273050A1 (en) 2021-06-30 2021-10-26 Living body detection method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113469036A (en)
WO (1) WO2023273050A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113469036A (en) * 2021-06-30 2021-10-01 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832677A (en) * 2017-10-19 2018-03-23 深圳奥比中光科技有限公司 Face identification method and system based on In vivo detection
US20190034702A1 (en) * 2017-07-26 2019-01-31 Baidu Online Network Technology (Beijing) Co., Ltd. Living body detecting method and apparatus, device and storage medium
US20190347823A1 (en) * 2018-05-10 2019-11-14 Beijing Sensetime Technology Development Co., Ltd Method and apparatus for detecting living body, system, electronic device, and storage medium
CN110852134A (en) * 2018-07-27 2020-02-28 北京市商汤科技开发有限公司 Living body detection method, living body detection device, living body detection system, electronic device, and storage medium
CN111079576A (en) * 2019-11-30 2020-04-28 腾讯科技(深圳)有限公司 Living body detection method, living body detection device, living body detection equipment and storage medium
CN111382639A (en) * 2018-12-30 2020-07-07 深圳市光鉴科技有限公司 Living body face detection method and device
CN111666901A (en) * 2020-06-09 2020-09-15 创新奇智(北京)科技有限公司 Living body face detection method and device, electronic equipment and storage medium
CN113469036A (en) * 2021-06-30 2021-10-01 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805024B (en) * 2018-04-28 2020-11-24 Oppo广东移动通信有限公司 Image processing method, image processing device, computer-readable storage medium and electronic equipment
CN109711243B (en) * 2018-11-01 2021-02-09 长沙小钴科技有限公司 Static three-dimensional face in-vivo detection method based on deep learning
CN109871773A (en) * 2019-01-21 2019-06-11 深圳市云眸科技有限公司 Biopsy method, device and door access machine
CN111582155B (en) * 2020-05-07 2024-02-09 腾讯科技(深圳)有限公司 Living body detection method, living body detection device, computer equipment and storage medium
CN112232323B (en) * 2020-12-15 2021-04-16 杭州宇泛智能科技有限公司 Face verification method and device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034702A1 (en) * 2017-07-26 2019-01-31 Baidu Online Network Technology (Beijing) Co., Ltd. Living body detecting method and apparatus, device and storage medium
CN107832677A (en) * 2017-10-19 2018-03-23 深圳奥比中光科技有限公司 Face identification method and system based on In vivo detection
US20190347823A1 (en) * 2018-05-10 2019-11-14 Beijing Sensetime Technology Development Co., Ltd Method and apparatus for detecting living body, system, electronic device, and storage medium
CN110852134A (en) * 2018-07-27 2020-02-28 北京市商汤科技开发有限公司 Living body detection method, living body detection device, living body detection system, electronic device, and storage medium
CN111382639A (en) * 2018-12-30 2020-07-07 深圳市光鉴科技有限公司 Living body face detection method and device
CN111079576A (en) * 2019-11-30 2020-04-28 腾讯科技(深圳)有限公司 Living body detection method, living body detection device, living body detection equipment and storage medium
CN111666901A (en) * 2020-06-09 2020-09-15 创新奇智(北京)科技有限公司 Living body face detection method and device, electronic equipment and storage medium
CN113469036A (en) * 2021-06-30 2021-10-01 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN113469036A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
US20220004742A1 (en) Method for face recognition, electronic equipment, and storage medium
US20210097715A1 (en) Image generation method and device, electronic device and storage medium
US11321575B2 (en) Method, apparatus and system for liveness detection, electronic device, and storage medium
WO2021031609A1 (en) Living body detection method and device, electronic apparatus and storage medium
CN109889724B (en) Image blurring method and device, electronic equipment and readable storage medium
CN108154465B (en) Image processing method and device
JP2016531362A (en) Skin color adjustment method, skin color adjustment device, program, and recording medium
TWI777112B (en) Method, apparatus and electronic device for image processing and storage medium
CN108154466B (en) Image processing method and device
CN110569822A (en) image processing method and device, electronic equipment and storage medium
CN110944230B (en) Video special effect adding method and device, electronic equipment and storage medium
CN112219224B (en) Image processing method and device, electronic equipment and storage medium
CN110555930B (en) Door lock control method and device, electronic equipment and storage medium
WO2022077970A1 (en) Method and apparatus for adding special effects
CN112184787A (en) Image registration method and device, electronic equipment and storage medium
WO2022151686A1 (en) Scene image display method and apparatus, device, storage medium, program and product
US20220084237A1 (en) Method and apparatus for determining an icon position
CN108040204A (en) A kind of image capturing method based on multi-cam, device and storage medium
EP3816927B1 (en) Method and apparatus for training image processing models, and storage medium
CN106982327A (en) Image processing method and device
CN115205172A (en) Image processing method and device, electronic equipment and storage medium
WO2023273050A1 (en) Living body detection method and apparatus, electronic device, and storage medium
US11265529B2 (en) Method and apparatus for controlling image display
CN110110742B (en) Multi-feature fusion method and device, electronic equipment and storage medium
CN109271863B (en) Face living body detection method and device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21947977

Country of ref document: EP

Kind code of ref document: A1