WO2023241058A1 - 图像活体检测方法及装置 - Google Patents

图像活体检测方法及装置 Download PDF

Info

Publication number
WO2023241058A1
WO2023241058A1 PCT/CN2023/074146 CN2023074146W WO2023241058A1 WO 2023241058 A1 WO2023241058 A1 WO 2023241058A1 CN 2023074146 W CN2023074146 W CN 2023074146W WO 2023241058 A1 WO2023241058 A1 WO 2023241058A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
detected
image block
biometric
block
Prior art date
Application number
PCT/CN2023/074146
Other languages
English (en)
French (fr)
Inventor
高亮
周迅溢
曾定衡
Original Assignee
马上消费金融股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 马上消费金融股份有限公司 filed Critical 马上消费金融股份有限公司
Publication of WO2023241058A1 publication Critical patent/WO2023241058A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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
    • 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
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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

Definitions

  • the present application relates to the technical field of life detection, and in particular to an image life detection method and device.
  • Biometric technology has achieved tremendous development and progress in recent years, such as identity confirmation through face recognition and iris recognition.
  • the biometric system faces the risk of being attacked by disguising the user's biometric characteristics, such as using photos, videos, masks, head models and other prosthetic attack media to disguise biometric recognition.
  • Image liveness detection can judge the acquired biometric image to determine whether the biometric feature is the biometric feature of a real user or a disguised user, such as a face taken with a mobile phone, a face printed on paper, or 3D silicone Face masks, etc.
  • embodiments of the present application provide an image living body detection method, which includes: performing semantic segmentation processing on the image to be detected to obtain a first mask image corresponding to the medium image block in the image to be detected; Perform biometric detection on the image to obtain the boundary information of the biometric image block in the image to be detected; perform pixel processing on the image to be detected based on the boundary information to obtain a second mask image corresponding to the biometric image block ;Based on the first mask image and the second mask image, calculate the overlap degree of the medium image block and the biometric image block to obtain the overlap degree; determine the to-be-detected object according to the overlap degree Liveness detection results of images.
  • the image to be detected is first used as the segmentation target, the image to be detected is subjected to semantic segmentation processing, and the first mask image corresponding to the medium image block is obtained, and the semantic segmentation process is used to detect the elements in the image to be detected.
  • Prosthetic medium to achieve preliminary image living body detection secondly, identify the biological features in the image to be detected, obtain the boundary information of the biometric image block, and use the boundary information as a basis to perform corresponding pixel processing on the image to be detected, and obtain the second Mask image; then based on the first mask image and the second mask image, calculate the degree of overlap between the medium image block in the first mask image and the biometric image block in the second mask image, to to determine whether the biometric In the media image block, the detection accuracy of detecting whether the biometric feature is in the media image block is improved, and based on the calculated overlap degree, the living body detection result of the image to be detected is determined, so as to detect the media image block in the image to be detected.
  • the included biometric features prevent the biometric features in the media image block from being detected as live body features, thereby avoiding the impact on the live body detection results of the image to be detected, improving the effectiveness of image live body detection, and at the same time improving the detection of whether the biometric features are in the media image block. On the basis of the detection accuracy, the detection accuracy of image living body detection is further improved.
  • an image living body detection device including: a semantic segmentation processing module, used to perform semantic segmentation processing on the image to be detected, and obtain the first mask corresponding to the medium image block in the image to be detected.
  • Image used to perform semantic segmentation processing on the image to be detected, and obtain the first mask corresponding to the medium image block in the image to be detected.
  • biometric detection module used to perform biometric detection on the image to be detected, and obtain the boundary information of the biometric image block in the image to be detected
  • a pixel processing module used to perform biometric detection on the image to be detected based on the boundary information
  • the detection image is subjected to pixel processing to obtain a second mask image corresponding to the biometric image block
  • an overlap calculation module is used to calculate the medium image based on the first mask image and the second mask image.
  • the overlap degree is calculated between the block and the biometric image block to obtain the overlap degree
  • the detection result determination module is used to determine the living body detection result of the image to be detected according to the overlap degree.
  • embodiments of the present application provide an image life detection device, including: a processor; and a memory configured to store computer-executable instructions, which when executed cause the processor to The image living body detection method described in the first aspect is executed.
  • embodiments of the present application provide a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the image living body detection method as described in the first aspect. .
  • embodiments of the present application provide a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause the computer to execute the first aspect The image living body detection method.
  • Figure 1 is a processing flow chart of an image living body detection method provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of an image living body detection process provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of a semantic segmentation process provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of a biometric detection process provided by an embodiment of the present application.
  • Figure 5 is a processing flow chart of an image living body detection method applied to a face detection scene provided by an embodiment of the present application
  • Figure 6 is a schematic diagram of an image living body detection device provided by an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of an image living body detection device provided by an embodiment of the present application.
  • semantic segmentation processing is performed on the image to be detected, the prosthetic medium in the image to be detected is identified, and the first mask image corresponding to the medium image block is obtained to achieve a preliminary image
  • the basis of semantic segmentation can be explained through the output semantic segmentation results, which is interpretable.
  • identify the biological features in the image to be detected and perform pixel filling on the image to be detected based on the boundary information of the recognized biological features to obtain a second mask image.
  • the first mask image and the second mask image Calculate the overlap between the media image block of the prosthetic medium in the first mask image and the biometric image block in the second mask image to determine whether the biometric feature is in the media image block and improve the detection of whether the biometric feature is in the media image
  • the detection accuracy of the block is determined based on the degree of overlap. Based on this, based on the preliminary image living detection, the image living detection result is judged based on the overlap between the medium image block and the biometric image block.
  • Realize secondary image living body detection detect the biological characteristics contained in the medium image block in the image to be detected, and avoid the biological characteristics in the medium image block from being detected as living body characteristics, thereby avoiding the impact on the living body detection results of the image to be detected, and improving the image Effectiveness of liveness detection.
  • the image living body detection method provided by this embodiment specifically includes steps S102 to S110.
  • Step S102 Perform semantic segmentation processing on the image to be detected to obtain a first mask image corresponding to the medium image block in the image to be detected.
  • the medium image block described in this embodiment refers to the prosthetic medium area or range of the prosthetic medium in the image to be detected, such as the screen range or screen area of the electronic screen in the image a to be detected as shown in Figure 3 .
  • the first mask image includes a media image block and other image blocks in the image to be detected except for the media image block, where the pixel values of the pixels contained in the media image block are consistent with the pixel values of the pixels contained in the remaining image blocks. Pixel values are inconsistent.
  • the prosthetic medium refers to the medium of biometric counterfeit products that pretend to be real people, including but not limited to: electronic screens, paper photos, masks, and head molds.
  • the prosthetic medium is a paper photo containing facial information.
  • the prosthetic medium is an electronic screen containing eye information.
  • the first mask image shown in Figure 3 is a binary mask image.
  • a binary mask image means that each pixel on the image has only two possible values.
  • the pixel value of the pixel in the medium image block is 255, that is, the light area, and the rest of the image
  • the pixel value of the pixel in the block is set to 0, that is, the dark area; the light area and dark area here are only schematic.
  • the medium image block is 255, the medium
  • the image block is white, and when the pixel values of the pixels in the remaining image blocks are set to 0, the remaining image blocks are black.
  • semantic segmentation processing of the image to be detected can be performed. Specifically, pixel classification is performed on the prosthetic medium area and the remaining areas except the prosthetic medium area in the image to be detected, so as to obtain the first mask image corresponding to the media image block of the prosthetic medium.
  • a semantic segmentation model is introduced for semantic segmentation processing.
  • the image to be detected is subjected to semantic segmentation processing to obtain the image to be detected.
  • the process of detecting the first mask image corresponding to the medium image block in the image the following operations are performed:
  • the image to be detected is input into a semantic segmentation model, and the image to be detected is subjected to semantic segmentation processing to obtain the first mask image;
  • the semantic segmentation model includes an encoder and a decoder.
  • the encoder is used to extract features of the prosthetic medium in the image to be detected, and obtain the media features corresponding to the prosthetic medium; the decoder is used to perform feature extraction on the image to be detected based on the media features. Semantic segmentation is performed to obtain the first mask image.
  • the semantic segmentation model used in this embodiment can be a UNet model and a variant model of the UNet model, or a Deeplab model and a variant model of the Deeplab model.
  • the specific model type is not specifically limited here and will depend on the actual application. The scene is determined.
  • the image a to be detected is input into the semantic segmentation model.
  • the encoder extracts features of the electronic screen in the image to be detected to obtain the screen features corresponding to the electronic screen.
  • the decoder performs semantic segmentation on the image to be detected based on the screen features. , the first mask image is obtained, and the light-colored areas in the first mask image are medium image blocks.
  • the semantic segmentation model can also include an encoder, a decoder and an image processing module; the encoder performs layer-by-layer feature extraction and downsampling of the prosthetic medium in the image to be detected to obtain semantic features of each layer; the decoder fuses the semantic features of each layer And perform upsampling to obtain an upsampled image with the same size as the image to be detected; the image processing module discretizes the upsampled image to obtain a grayscale image; binarizes the grayscale image to obtain the first mask image .
  • the encoder performs layer-by-layer feature extraction and downsampling of the prosthetic medium in the image to be detected to obtain semantic features of each layer
  • the decoder fuses the semantic features of each layer And perform upsampling to obtain an upsampled image with the same size as the image to be detected
  • the image processing module discretizes the upsampled image to obtain a grayscale image; binarizes the grayscale image to obtain the first mask image .
  • the semantic segmentation model can also undergo model training before specific application; the specific application process of the semantic segmentation model has been explained above, and the model training process of the semantic segmentation model is explained in detail below.
  • Obtain the prosthetic medium image remove the prosthetic medium images that do not meet the requirements in the prosthetic medium image, perform annotation processing on the media image blocks and target image blocks on the removed prosthetic medium image, and generate the image sample data set.
  • the prosthetic medium images do not necessarily carry the user's biometric characteristics.
  • they can be used as training samples; such as electronic screen images, paper photo images, etc., electronic screen images and paper photo images. It does not need to carry the user's biometric characteristics.
  • the image sample data set used to train the model in this embodiment is compared to the deep learning model used in related technologies to achieve living body detection.
  • the data acquisition method is simple and the acquisition cost is low.
  • the deep learning model requires a large amount of data support and needs to obtain a large amount of data.
  • the prosthesis image here contains the user's biometric characteristics.
  • there are still very few attack samples in business scenarios resulting in a limited number of prosthetic images to be obtained, and it is necessary to customize the collection of prosthetic images; at the same time, in In the process of learning sample data through the model, over-fitting of the model may occur, and the model cannot be correctly classified during the application process.
  • the semantic segmentation model in this embodiment learns prosthetic medium characteristics, which reduces over-fitting. Combining risks helps to improve the accuracy of semantic segmentation processing.
  • the semantic segmentation model belongs to pixel-level supervision and fine-grained segmentation, which also improves the accuracy of semantic segmentation processing.
  • the encoder is a convolution layer, responsible for completing feature extraction;
  • the decoder is a deconvolution layer, responsible for upsampling the results output by the encoder; the convolution layer and deconvolution
  • the number of layers is not specifically limited here and is determined based on actual application scenarios.
  • Step S104 Perform biometric detection on the image to be detected to obtain boundary information of the biometric image blocks in the image to be detected.
  • the biometric image block described in this embodiment refers to the feature area or feature range of the biometric feature in the image to be detected; as shown in Figure 4, the face area or face range in the image a to be detected.
  • the boundary information refers to the information about the boundary of the biometric feature in the image to be detected.
  • the boundary information may be a boundary box.
  • the boundary information may also be in other boundary forms.
  • the biological characteristics include global face information or local face information, such as eye information.
  • biological characteristics can also be global body part information (such as other body part information except the head), or local body part information. (For example, part of the body part information in the rest of the body part information except the head).
  • the above-mentioned semantic segmentation processing of the image to be detected is performed to obtain the first mask image corresponding to the medium image block in the image to be detected.
  • biometric detection is performed on the image to be detected, thereby knowing the range of biometric features in the image to be detected, and obtaining the biometric feature. Boundary information of feature image blocks.
  • the biometric detection module can be used to generate Object feature detection, through modular detection methods, achieves high efficiency in biometric detection.
  • the following operations are performed:
  • the image to be detected is input into the biometric detection module for biometric detection to obtain the biometric image block; the boundary is constructed based on the position information of the boundary pixels of the biometric image block in the image to be detected. information.
  • the biometric detection module can be implemented using algorithms or other forms of architecture for biometric detection, such as MTCNN (Multi-task Cascaded Convolutional Networks, multi-task convolutional neural network). Face detection.
  • MTCNN Multi-task Cascaded Convolutional Networks, multi-task convolutional neural network. Face detection.
  • the image a to be detected is input into the biometric detection module for biometric detection to obtain the biometric image block.
  • the boundary information is constructed based on the position information of the boundary pixels of the biometric image block in the image a to be detected. That is the dotted box in the picture.
  • step S106 to step S110 are executed.
  • the image to be detected is determined to be a live image.
  • the preset feature rules include reflectivity threshold, presence of artifacts, presence of moiré, and/or presence of specular reflection.
  • steps S106 to Step S110 determine the final living body detection result of the image to be detected; if it does not match, it means that the image to be detected may be a living body image. In order to improve the living body detection efficiency of the image to be detected, it is determined that the image to be detected is a living body image.
  • the image to be detected may be a photo-type prosthetic image, and then steps S106 to S110 are further executed to determine the final living body detection result of the image to be detected. , if it does not exist, it means that the image to be detected may be a living image, and then it is determined that the image to be detected is a living image.
  • biometric image blocks calculate the image block area of each biometric image block in the multiple biometric image blocks based on the boundary information; determine the biometric image block with the largest area, and calculate the image block area among the multiple biometric image blocks.
  • biometric image blocks biometric image blocks other than the biometric image block with the largest area are eliminated.
  • Step S106 Perform pixel processing on the image to be detected based on the boundary information to obtain a second mask image corresponding to the biometric image block.
  • the second mask image in this embodiment includes a biometric image block and a target image block.
  • the target image block here is an image block composed of pixels outside the biometric image block in the image to be detected.
  • the biometric image The pixel values of the pixels contained in the block are inconsistent with the pixel values of the pixels contained in the target image block;
  • the second mask image shown in Figure 4 is a binary mask image, and the pixel values of the pixels in the biometric image block are is 255, which is the light area, and the pixel value of the pixel in the target image block is set to 0, which is the dark area; the specific colors of the biometric image block and the target image block are explained here as in the first mask image above ,No longer.
  • the above-mentioned biometric detection of the image to be detected is performed to obtain the boundary information of the biometric image block in the image to be detected.
  • the boundary information is used to perform pixel processing on the image to be detected to obtain a second mask image.
  • the pixel values of pixels in the biometric image block in the image to be detected and the pixels in the target feature image block can be The pixel values of the points are binarized to obtain a second mask image, so as to enhance the contrast intensity of the biometric image block and the target image block through the binarization process to facilitate subsequent overlap calculation.
  • the target image block is an image block composed of pixels outside the biometric image block in the image to be detected; for the biological feature
  • the pixel values of the pixels contained in the characteristic image block and the pixel values of the pixels contained in the target image block are binarized to obtain the second mask image; wherein, the pixels contained in the biometric image block are The pixel value of the point is determined as the first pixel value after binarization processing, and the pixel value of the pixel point included in the target image block is determined as the second pixel value after binarization processing.
  • the binarization process here refers to adjusting the pixel values of the pixels contained in the two image blocks into two different pixel values.
  • the pixel value of each pixel in the image to be detected may be different. Therefore, based on the boundary information, the biometric image block and the target image block can be distinguished in the image to be detected, and the The pixel values of the pixels contained in the biometric image block and the pixel values of the pixels contained in the target image block are binarized to obtain a second mask image. After binarization, the biometric image block contains The pixel value of the pixel point is determined as the first pixel value, and the pixel value of the pixel point included in the target image block is determined as the second pixel value.
  • the first pixel value is 255
  • the second pixel value is 0
  • the biometric image block is the light area in the picture after binarization
  • the target image block is the light area in the picture after binarization. dark area; here the first pixel value and the second pixel value can also be other values.
  • the values of the first pixel value and the second pixel value No specific limitation is made.
  • Step S108 Based on the first mask image and the second mask image, map the medium image block and the The overlap degree of the biometric image blocks is calculated to obtain the overlap degree.
  • the above-mentioned pixel filling of the image to be detected is based on the boundary information to obtain the second mask image corresponding to the biometric image block.
  • the medium image block and biometric characteristics are calculated.
  • the degree of overlap between image blocks is used to determine the living body detection result of the image to be detected based on the calculated overlap degree.
  • the overlap degree between the medium image block and the biometric image block is calculated in the following manner:
  • intersection image block refers to the image block of the intersection part between the medium image block and the biometric image block
  • union image block refers to the union part between the medium image block and the biometric image block.
  • image block; the area of the first image block is the area of the intersection image block; the area of the second image block is the area of the union image block.
  • the overlap degree between the media image block and the biometric image block is calculated in the following manner:
  • the ratio of the number of intersections and the number of unions is calculated as the degree of overlap.
  • the area calculation method or the pixel number calculation method if the area calculation method and the pixel number calculation method are calculated, If the overlap degree between the media image block and the biometric image block is inconsistent, the overlap degree between the media image block and the biometric image block can also be calculated by combining the area calculation method and the pixel number calculation method. For example, the overlap degree between the media image block and the biometric image block can be obtained by calculating the area calculation method.
  • the average degree of overlap calculated using the overlapping degree and pixel number calculation method is used as the overlap degree between the final media image block and the biometric image block; another example is using the overlap degree and pixel number calculation method calculated through the area calculation method to calculate The maximum value of the two obtained overlap degrees is used as the overlap degree between the final media image block and the biometric image block.
  • Step S110 Determine the life detection result of the image to be detected according to the degree of overlap.
  • the above is based on the first mask image and the second mask image, and the overlap degree of the medium image block and the biometric image block is calculated. Calculate and obtain the overlap degree.
  • the living body detection result of the image to be detected is determined, and it is specifically determined whether the image to be detected is a living body image or a prosthetic body image.
  • a preset overlap threshold can be set to distinguish the living body image and the prosthetic body image.
  • the following operations are performed:
  • the overlap degree is greater than or equal to the preset overlap threshold, it is determined that the image to be detected is a prosthetic image; if the overlap degree is less than the preset overlap threshold, it is determined that the image to be detected is a living image. .
  • the prosthetic image refers to a counterfeit user biometric image, such as a paper photo containing facial features
  • the live image refers to a real user biometric image, such as the user's real biometric image collected directly using a camera. Facial feature images.
  • the preset overlap threshold is 35%
  • the calculated overlap is 90%
  • the calculated overlap is greater than the preset overlap threshold, indicating that the biometric feature is more likely to be in the prosthetic medium, so it is determined to be detected
  • the image is a prosthetic image; for another example, the preset overlap threshold is 35%, the calculated overlap is 10%, and the calculated overlap is less than the preset overlap threshold, indicating the possibility that the biometric features are in the prosthetic medium is smaller, so the image to be detected is determined to be a living image.
  • the characteristics of a living body refer to the relevant characteristics of a living body, such as a living face.
  • the living face is in front of the mobile phone screen.
  • the image to be detected is the image of the living person's face on the mobile phone screen.
  • the overlap degree is greater than or equal to the preset overlap threshold, then calculate the media image block area of the media image block, and calculate the characteristic image block area of the biometric image block;
  • the image to be detected is a living image
  • the image to be detected is a prosthetic image.
  • the following takes the application of an image living body detection method provided in this embodiment in a face detection scene as an example.
  • the image living body detection method applied in a face detection scene provided by this embodiment is further described in conjunction with Figure 2 and Figure 5. For explanation, see Figure 5.
  • the image living body detection method applied to face detection scenarios specifically includes the following steps.
  • Step S502 input the image to be detected into the semantic segmentation model, perform semantic segmentation processing on the image to be detected, and obtain the first mask image corresponding to the medium image block in the image to be detected.
  • prosthetic media include but are not limited to: electronic screens, paper photos, masks, and head molds.
  • the prosthetic medium is an electronic screen
  • the image to be detected is semantically segmented
  • the first mask image corresponding to the media image block of the prosthetic medium, that is, the electronic screen is obtained.
  • the light-colored areas in the mask image are media image blocks, that is, electronic screen image blocks.
  • Step S504 Input the image to be detected into the face detection module to detect face information, obtain the face information image block, and construct boundary information based on the position information of the boundary pixels of the face information image block in the image to be detected.
  • face information is detected on the image to be detected, and the face information image block is obtained. Based on the position information of the pixel points at the boundary of the face information image block, the boundary information of the face information image block is constructed.
  • Step S506 Determine the target image block in the image to be detected based on the boundary information.
  • the target image block is an image block composed of pixels outside the face information image block in the image to be detected.
  • Step S508 Binarize the pixel values of the pixels contained in the face information image block and the pixel values of the pixels contained in the target image block to obtain a second mask image.
  • the pixel value of the pixel point included in the face information image block is determined as the first pixel value
  • the pixel value of the pixel point included in the target image block is determined as the second pixel value.
  • the target image block in the image to be detected is determined.
  • the face information image block here is the light-colored area in the second mask image, and the target image block is dark-colored. area; perform binarization processing on the pixel values of the pixels in the face information image block and the pixel values of the pixels in the target image block to obtain the second mask image.
  • Step S510 Determine the intersection image block and the union image block of the medium image block and the face information image block.
  • Step S512 Calculate the first image block area of the intersection image block, and calculate the second image block area of the union image block.
  • Step S514 Calculate the ratio of the area of the first image block and the area of the second image block as the degree of overlap between the media image block and the face information image block.
  • calculate the degree of overlap between the face information image block and the medium image block that is, determine the intersection image block and union image block of the medium image block and the face information image block, and calculate the first value of the intersection image block.
  • the area of the image block is calculated, and the area of the second image block of the union image block is calculated, and the ratio of the area of the first image block and the area of the second image block is calculated as the degree of overlap between the media image block and the face information image block.
  • steps S510 to S514 can also be replaced by: determining the intersection image block and the union image block of the medium image block and the face information image block; calculating the intersection number of pixel points contained in the intersection image block, and calculating the union image The number of unions of pixels contained in the block; calculate the ratio of the number of intersections and the number of unions as the degree of overlap between the media image block and the face information image block.
  • Step S516 If the overlap degree is greater than or equal to the preset overlap threshold, it is determined that the image to be detected is a prosthetic image.
  • Step S518 If the overlap degree is less than the preset overlap threshold, it is determined that the image to be detected is a living image.
  • An example of an image living body detection device provided by this application is as follows:
  • an image life detection method is provided.
  • an image life detection device is also provided, which will be described below with reference to the accompanying drawings.
  • FIG. 6 a schematic diagram of an image living body detection device provided in this embodiment is shown.
  • the description is relatively simple. For relevant parts, please refer to the corresponding description of the method embodiment provided above.
  • the device embodiments described below are merely illustrative.
  • This embodiment provides an image living body detection device, including: a semantic segmentation processing module 602, a biometric detection module 604, a pixel processing module 606, an overlap calculation module 608, and a detection result determination module 610.
  • the semantic segmentation processing module 602 is used to perform semantic segmentation processing on the image to be detected, and obtain the first mask image corresponding to the medium image block in the image to be detected.
  • the biometric detection module 604 is used to perform biometric detection on the image to be detected, and obtain the boundary information of the biometric image blocks in the image to be detected.
  • the pixel processing module 606 is configured to perform pixel processing on the image to be detected based on the boundary information to obtain a second mask image corresponding to the biometric image block.
  • the overlap degree calculation module 608 is configured to calculate the overlap degree of the medium image block and the biometric image block based on the first mask image and the second mask image to obtain an overlap degree.
  • the detection result determination module 610 is used to determine the living body detection result of the image to be detected according to the overlap degree.
  • An example of an image living body detection device provided by this application is as follows:
  • embodiments of the present application also provide an image living body detection device.
  • the image living body detection device is used to perform the image living body detection method provided above.
  • Figure 7 shows this A schematic structural diagram of an image life detection device provided in the embodiment of the application.
  • This embodiment provides an image living body detection device, including:
  • the image life detection device may vary greatly due to different configurations or performance, and may include one or more processors 701 and memory 702.
  • the memory 702 may store one or more storage application programs. or data. Among them, the memory 702 may be short-term storage or persistent storage.
  • the application program stored in the memory 702 may include one or more modules (not shown), and each module may include a series of computer-executable instructions in the image living body detection device.
  • the processor 701 may be configured to communicate with the memory 702 and execute a series of computer-executable instructions in the memory 702 on the image living body detection device.
  • the image living body detection device may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input/output interfaces 705, one or more keyboards 706, etc.
  • the image living body detection device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and Each module may include a series of computer-executable instructions for the image life detection device, and the one or more programs configured to be executed by one or more processors include computer-executable instructions for performing the following:
  • the media image block and the biometric image block perform an overlap degree calculation to obtain an overlap degree; and the living body detection result of the image to be detected is determined according to the overlap degree.
  • embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium provided in this embodiment is used to store computer-executable instructions. When executed by the processor, the computer-executable instructions implement the following process:
  • the media image block and the biometric image block perform an overlap degree calculation to obtain an overlap degree; and the living body detection result of the image to be detected is determined according to the overlap degree.
  • embodiments of the present application may be provided as methods, systems or computer program products. Therefore, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-readable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable image life detection device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the The instruction means implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions can also be loaded onto a computer or other programmable image life detection device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in a process or processes in the flow diagram and/or in a block or blocks in the block diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer-readable media, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media includes both persistent and non-volatile, removable and non-removable media that can be implemented by any method or technology for storage of information.
  • Information may be computer-readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • read-only memory read-only memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other memory technology
  • compact disc read-only memory CD-ROM
  • DVD digital versatile disc
  • Magnetic tape cassettes disk storage or other magnetic storage devices, or any other non-transmission medium, can be used to store information that can be accessed by a computing device.
  • computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • Embodiments of the present application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • One or more embodiments of the present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Abstract

本申请实施例提供了图像活体检测方法及装置,该方法,包括:对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;根据所述重叠度确定所述待检测图像的活体检测结果。

Description

图像活体检测方法及装置
交叉引用
本发明要求在2022年6月13日提交中国专利局、申请号为202210660276.7、发明名称为“图像活体检测方法及装置”的中国专利申请的优先权,该申请的全部内容通过引用结合在本发明中。
技术领域
本申请涉及活体检测技术领域,尤其涉及一种图像活体检测方法及装置。
背景技术
生物识别技术在近年来获得了巨大的发展与进步,比如通过人脸识别、虹膜识别进行身份确认等。但是生物识别系统面临伪装用户生物特征进行攻击的风险,比如通过照片、视频、面具、头部模型等假体攻击介质伪装进行生物识别。
在生物识别技术中,有需要进行图像活体检测。图像活体检测可以对获取的生物特征图像进行判断,确定该生物特征是真实用户的生物特征,还是伪装出来的用户的生物特征,比如用手机拍摄的人脸,纸张打印的人脸,或者3D硅胶人脸面具等。
发明内容
第一方面,本申请实施例提供了一种图像活体检测方法,包括:对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;根据所述重叠度确定所述待检测图像的活体检测结果。
可以看出,在本申请实施例中,首先将待检测图像作为分割目标,对待检测图像进行语义分割处理,得到介质图像块对应的第一掩码图像,通过语义分割处理检测待检测图像中的假体介质,实现初步的图像活体检测;其次识别待检测图像中的生物特征,得到生物特征图像块的边界信息,并将该边界信息作为依据,对待检测图像进行相应的像素处理,得到第二掩码图像;然后以第一掩码图像和第二掩码图像为依据,计算第一掩码图像中的介质图像块和第二掩码图像中的生物特征图像块之间的重叠度,以此来确定生物特征是否 处于介质图像块中,提升检测生物特征是否处于介质图像块的检测精度,并在计算获得的重叠度的基础上,确定待检测图像的活体检测结果,以此检测出待检测图像中介质图像块包含的生物特征,避免介质图像块中的生物特征被检测为活体特征,从而避免对待检测图像的活体检测结果产生影响,提升图像活体检测的有效性,同时在提升检测生物特征是否处于介质图像块的检测精度的基础上,进一步提升图像活体检测的检测精度。
第二方面,本申请实施例提供了一种图像活体检测装置,包括:语义分割处理模块,用于对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;生物特征检测模块,用于对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;像素处理模块,用于基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;重叠度计算模块,用于基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;检测结果确定模块,用于根据所述重叠度确定所述待检测图像的活体检测结果。
第三方面,本申请实施例提供了一种图像活体检测设备,包括:处理器;以及,被配置为存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器执行第一方面所述的图像活体检测方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被处理器执行时实现如第一方面所述的图像活体检测方法。
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如第一方面所述的图像活体检测方法。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图;
图1为本申请实施例提供的一种图像活体检测方法处理流程图;
图2为本申请实施例提供的一种图像活体检测过程的示意图;
图3为本申请实施例提供的一种语义分割过程的示意图;
图4为本申请实施例提供的一种生物特征检测过程的示意图;
图5为本申请实施例提供的一种应用于人脸检测场景的图像活体检测方法处理流程图;
图6为本申请实施例提供的一种图像活体检测装置示意图;
图7为本申请实施例提供的一种图像活体检测设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请的一部分实施例,而不是全部的实施例。基于本申请实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请的保护范围。
实际应用中,在进行活体检测过程中,往往需要借助模型,比如深度学习模型、基于rppg(Remote Photoplethysmography,远程光电体积描记术)信号监督的模型,但是这些模型对已知的攻击类型的防御性能较好,而对于未知攻击类型却不能准确地做出预测,比如各种材质的电子屏幕、各种纸质照片、各种材质的面具,属于开集,数据分布非常广,且无法穷举,这给模型学习带来很大的难度,使得图像活体检测的精确度不高。
针对于此,为了提升图像活体检测的精确度,一方面,对待检测图像进行语义分割处理,识别待检测图像中的假体介质,得到介质图像块对应的第一掩码图像,实现初步的图像活体检测,通过输出的语义分割结果可解释语义分割的依据,具有可解释性。另一方面,识别待检测图像中的生物特征,并基于识别出的生物特征的边界信息对待检测图像进行像素填充,得到第二掩码图像,借助第一掩码图像和第二掩码图像,计算第一掩码图像中假体介质的介质图像块与第二掩码图像中生物特征图像块的重叠度,以此来确定生物特征是否处于介质图像块中,提升检测生物特征是否处于介质图像块的检测精度,并以重叠度为依据确定图像活体检测结果,以此,在进行初步的图像活体检测的基础上,根据介质图像块与生物特征图像块的重叠度,判断图像活体检测结果,实现二次的图像活体检测,检测出待检测图像中介质图像块包含的生物特征,避免介质图像块中的生物特征被检测为活体特征,从而避免对待检测图像的活体检测结果产生影响,提升图像活体检测的有效性。
参照图1,本实施例提供的图像活体检测方法,具体包括步骤S102至步骤S110。
步骤S102,对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像。
本实施例所述介质图像块,是指待检测图像中假体介质的假体介质区域或者假体介质范围,如图3所示的待检测图像a中的电子屏幕的屏幕范围或者屏幕区域。所述第一掩码图像,包括介质图像块和在待检测图像中除介质图像块之外的其余图像块,其中,介质图像块包含的像素点的像素值与其余图像块包含的像素点的像素值不一致。
所述假体介质,是指冒充真人身份的生物特征仿冒品的介质,包括但不限于:电子屏幕、纸质照片、面具、头模,比如假体介质为包含人脸信息的纸质照片,再比如假体介质为包含眼睛信息的电子屏幕。
如图3所示的第一掩码图像为二值掩码图像,二值掩码图像是指图像上的每一个像素点只有两种可能的取值,介质图像块中的像素点的像素值为255,即浅色区域,其余图像 块中的像素点的像素值设置为0,即深色区域;此处的浅色区域和深色区域仅仅是示意性的,介质图像块中的像素点的像素值为255的情况下,介质图像块为白色,其余图像块中的像素点的像素值设置为0的情况下,其余图像块为黑色。
具体实施时,为了能精准地识别出待检测图像中的假体介质,实现对待检测图像的初步活体检测,为后续确定待检测图像的最终活体检测结果奠定基础,可对待检测图像进行语义分割处理,具体对待检测图像中的假体介质区域和除假体介质区域之外的其余区域进行像素分类,从而得到假体介质的介质图像块对应的第一掩码图像。
在具体的语义分割处理过程中,为了提升语义分割精度和效率,引入语义分割模型进行语义分割处理,本实施例提供的一种可选实施方式中,在对待检测图像进行语义分割处理,得到待检测图像中介质图像块对应的第一掩码图像的过程中,执行如下操作:
将所述待检测图像输入语义分割模型,对所述待检测图像进行语义分割处理,得到所述第一掩码图像;所述语义分割模型包含编码器和解码器。
其中,所述编码器用于对所述待检测图像中的假体介质进行特征提取,得到所述假体介质对应的介质特征;所述解码器用于基于所述介质特征对所述待检测图像进行语义分割,得到所述第一掩码图像。
需要说明的是,本实施例采用的语义分割模型可以是UNet模型以及UNet模型的变体模型,也可以是Deeplab模型以及Deeplab模型的变体模型,具体模型类型在此不作具体限定,根据实际应用场景确定。
具体的,所述特征提取包括:进行N次下采样处理,N=1、2、3….N是正整数,所述语义分割包括:进行N次上采样处理,并对上采样处理结果进行离散化处理,得到灰度图像,以及对灰度图像进行二值化处理,得到第一掩码图像。
如图3所示,将待检测图像a输入语义分割模型,通过编码器对待检测图像中的电子屏幕进行特征提取,得到电子屏幕对应的屏幕特征,通过解码器基于屏幕特征对待检测图像进行语义分割,得到第一掩码图像,第一掩码图像中浅色区域为介质图像块。
此外,语义分割模型也可包括编码器、解码器和图像处理模块;编码器对待检测图像中的假体介质进行逐层特征提取与下采样,得到各层语义特征;解码器融合各层语义特征并进行上采样,得到与待检测图像尺寸相同的上采样图像;图像处理模块对上采样图像进行离散化处理,获得灰度图像;将灰度图像进行二值化处理,得到第一掩码图像。
实际应用中,语义分割模型在具体应用之前,还可进行模型训练;上述已说明语义分割模型的具体应用过程,下述详细说明语义分割模型的模型训练过程。
(1)构建用于训练模型的图像样本数据集。
获取假体介质图像,将假体介质图像中不符合要求的假体介质图像进行剔除处理,对剔除处理后的假体介质图像进行介质图像块和目标图像块的标注处理,生成所述图像样本数据集。
需要说明的是,由于语义分割模型学习的目标在于假体介质,掌握假体介质的特征, 所以此处的假体介质图像不一定带有用户的生物特征,只要是假体介质类型的图像均可作为训练样本;比如电子屏幕图像、纸质照片图像等,电子屏幕图像和纸质照片图像中可以不携带用户的生物特征。
本实施例中用于训练模型的图像样本数据集,相较于相关技术中采用深度学习模型实现活体检测,数据获取方式简单,并且获取成本低,深度学习模型需要大量的数据支撑,需要获取大量的假体图像,此处的假体图像带有用户的生物特征,然而业务场景中攻击样例还是很少的,导致获取假体图像的数量有限,需要定制化采集假体图像;同时,在通过模型学习样本数据的过程中,可能发生模型的过拟合,在模型应用的过程中无法正确地进行分类,而本实施例中的语义分割模型学习的是假体介质特征,降低了过拟合风险,有助于提升语义分割处理的精准度,同时,语义分割模型属于像素级监督,细粒度分割,也提升了语义分割处理的精准度。
(2)构建初始语义分割模型。
构建编码器和解码器,其中,编码器为卷积层,负责完成特征提取;解码器为反卷积层,负责对编码器输出的结果进行上采样处理;其中的卷积层和反卷积层的层的数量在此不作具体限定,根据实际应用场景确定。
(3)对图像样本数据集中的图像样本数据进行预处理,得到预处理后的图像样本数据集。
对图像样本数据集中的图像样本数据进行数据增强处理,得到处理后的图像样本数据集;具体在进行数据增强处理的过程中,可选用的数据增强处理方式较多,比如可将原图随机裁剪任何一块电子屏幕区域的图像做倍增。
(4)利用预处理后的图像样本数据集对初始语义分割模型进行模型训练,获得语义分割模型。
步骤S104,对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息。
本实施例所述生物特征图像块,是指待检测图像中生物特征的特征区域或者特征范围;如图4所示的待检测图像a中的人脸区域或者人脸范围。
所述边界信息,是指待检测图像中生物特征边界的信息,所述边界信息可以是边界框,此外,边界信息还可以是其它的边界形式。所述生物特征,包括全局人脸信息或者局部人脸信息,比如眼睛信息,此外,生物特征还可以是全局身体部位信息(比如除头部之外的其余身体部位信息),或者局部身体部位信息(比如除头部之外的其余身体部位信息中的部分身体部位信息)。
上述对待检测图像进行语义分割处理,得到待检测图像中介质图像块对应的第一掩码图像,本步骤中,对待检测图像进行生物特征检测,从而获知待检测图像中的生物特征范围,得到生物特征图像块的边界信息。
具体实施时,为了提升生物特征检测精确度和效率,可利用生物特征检测模块进行生 物特征检测,通过模块化的检测方式,实现生物特征检测的高效化。本实施例提供的一种可选实施方式中,在对待检测图像进行生物特征检测,得到待检测图像中生物特征图像块的边界信息的过程中,执行如下操作:
将所述待检测图像输入生物特征检测模块进行生物特征检测,得到所述生物特征图像块;根据所述生物特征图像块的边界像素点在所述待检测图像中的位置信息,构建所述边界信息。
其中,所述生物特征检测模块,可以采用算法实现,也可以采用其他形式的用于进行生物特征检测的架构实现,比如采用MTCNN(Multi-task Cascaded Convolutional Networks,多任务卷积神经网络)进行人脸检测。
如图4所示,将待检测图像a输入生物特征检测模块进行生物特征检测,得到生物特征图像块,根据生物特征图像块的边界像素点在待检测图像a中的位置信息,构建边界信息,即图中的虚线框。
此外,在对待检测图像进行生物特征检测,得到待检测图像中生物特征图像块的边界信息执行之后,也可执行如下操作:
基于所述边界信息判断所述生物特征图像块是否符合预设特征规则。
若符合,则执行步骤S106至步骤S110。
若不符合,则确定所述待检测图像为活体图像。
其中,所述预设特征规则,包括反射率阈值、存在伪音、存在摩尔纹和/或存在镜面反射。
具体的,基于边界信息判断生物特征图像块是否符合预设特征规则;若符合,则说明待检测图像可能为假体图像,为了进一步提升活体检测精度,同时避免误检测,则进一步执行步骤S106至步骤S110,确定待检测图像的最终活体检测结果;若不符合,则说明待检测图像可能为活体图像,为了提升待检测图像的活体检测效率,则确定待检测图像为活体图像。
例如,基于边界信息判断生物特征图像块是否存在镜面反射,若存在,则说明待检测图像可能为照片类型的假体图像,则进一步执行步骤S106至步骤S110,确定待检测图像的最终活体检测结果,若不存在,则说明待检测图像可能为活体图像,则确定待检测图像为活体图像。
除此之外,在对待检测图像进行生物特征检测,得到待检测图像中生物特征图像块的边界信息执行之后,还可执行如下操作:
若检测出多个生物特征图像块,则根据所述边界信息计算所述多个生物特征图像块中各生物特征图像块的图像块面积;确定面积最大的生物特征图像块,并在所述多个生物特征图像块中将所述面积最大的生物特征图像块之外的生物特征图像块剔除。
由于实际应用中,在多个生物特征图像块中若存在活体特征,活体特征所呈现的面积较大,所以在检测到多个生物特征图像块的情况下,选择图像块面积最大的生物特征图像 块,进行后续的重叠度计算以及活体检测结果确定,以此提升待检测图像的活体检测效率。步骤S106,基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像。
本实施例所述第二掩码图像,包括生物特征图像块和目标图像块,此处的目标图像块为处于待检测图像中生物特征图像块之外的像素点组成的图像块,生物特征图像块包含的像素点的像素值与目标图像块包含的像素点的像素值不一致;如图4所示的第二掩码图像为二值掩码图像,生物特征图像块中的像素点的像素值为255,即浅色区域,目标图像块中的像素点的像素值设置为0,即深色区域;此处对生物特征图像块和目标图像块的具体颜色的解释如上述第一掩码图像,不再赘述。
上述对待检测图像进行生物特征检测,得到待检测图像中生物特征图像块的边界信息,本步骤中,借助边界信息对待检测图像进行像素处理,得到第二掩码图像,在具体的对待检测图像进行像素处理的过程中,在上述利用生物特征检测模块进行生物特征检测并构建边界信息的基础上,可对待检测图像中的生物特征图像块中的像素点的像素值和目标特征图像块中的像素点的像素值进行二值化处理,得到第二掩码图像,以通过二值化处理提升生物特征图像块和目标图像块的对比强度,便于进行后续的重叠度计算。
本实施例提供的一种可选实施方式中,在基于边界信息对待检测图像进行像素处理,得到生物特征图像块对应的第二掩码图像的过程中,执行如下操作:
基于所述边界信息在所述待检测图像中确定目标图像块;所述目标图像块为处于所述待检测图像中所述生物特征图像块之外的像素点组成的图像块;对所述生物特征图像块包含的像素点的像素值,和所述目标图像块包含的像素点的像素值进行二值化处理,得到所述第二掩码图像;其中,所述生物特征图像块包含的像素点的像素值在进行二值化处理之后被确定为第一像素值,所述目标图像块包含的像素点的像素值在进行二值化处理之后被确定为第二像素值。
此处的二值化处理,是指将2个图像块包含的像素点的像素值进行调整,调整为2个不同的像素值。
具体的,在进行二值化处理之前,待检测图像中每个像素点的像素值可能都具有差异,所以,基于边界信息可在待检测图像中区分生物特征图像块和目标图像块,并对生物特征图像块包含的像素点的像素值,和目标图像块包含的像素点的像素值,进行二值化处理,得到第二掩码图像,在进行二值化处理之后,生物特征图像块包含的像素点的像素值被确定为第一像素值,目标图像块包含的像素点的像素值被确定为第二像素值。
如图4所示,第一像素值为255,第二像素值为0,生物特征图像块在二值化处理后为图中的浅色区域,目标图像块在二值化处理后为图中的深色区域;此处第一像素值和第二像素值还可以是其它取值,在第一像素值不等于第二像素值的前提下,第一像素值和第二像素值的取值不作具体限定。
步骤S108,基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述 生物特征图像块进行重叠度计算,得到重叠度。
上述基于边界信息对待检测图像进行像素填充,得到生物特征图像块对应的第二掩码图像,本步骤中,以第一掩码图像和第二掩码图像为依据,计算介质图像块和生物特征图像块之间的重叠度,以根据计算获得的重叠度判断待检测图像的活体检测结果。
为了实现重叠度计算的灵活性,满足多种计算场景,下述提供2种介质图像块和生物特征图像块之间的重叠度的计算方式,包括面积计算方式和像素数目计算方式,具体对2种计算方式的实现过程进行详细说明。
(1)面积计算方式
本实施例提供的一种可选实施方式中,具体通过如下方式,计算介质图像块和生物特征图像块之间的重叠度:
确定所述介质图像块与所述生物特征图像块的交集图像块和并集图像块;计算所述交集图像块的第一图像块面积,以及计算所述并集图像块的第二图像块面积;计算所述第一图像块面积和所述第二图像块面积的比值,作为所述重叠度。
其中,所述交集图像块,是指介质图像块和生物特征图像块之间的交集部分的图像块;所述并集图像块,是指介质图像块和生物特征图像块之间的并集部分的图像块;所述第一图像块面积为交集图像块的面积;所述第二图像块面积为并集图像块的面积。
例如,计算交集图像块的第一图像块面积为36cm2,计算并集图像块的第二图像块面积为48cm2,则第一图像块面积和第二图像块面积的比值36/48=75%,作为介质图像块与生物特征图像块的重叠度。
(2)像素数目计算方式
本实施例提供的另一种可选实施方式中,具体通过如下方式,计算介质图像块和生物特征图像块之间的重叠度:
确定所述介质图像块与所述生物特征图像块的交集图像块和并集图像块;计算所述交集图像块包含的像素点的交集数目,以及计算所述并集图像块包含的像素点的并集数目;
计算所述交集数目和所述并集数目的比值,作为所述重叠度。
此外,除可利用上述面积计算方式或者像素数目计算方式2种计算方式计算介质图像块和生物特征图像块之间的重叠度的实现方式之外,若面积计算方式和像素数目计算方式计算获得的介质图像块和生物特征图像块之间的重叠度不一致,则还可结合面积计算方式和像素数目计算方式计算介质图像块和生物特征图像块之间的重叠度,比如取通过面积计算方式计算获得的重叠度和像素数目计算方式计算获得的重叠度的平均值作为最终介质图像块和生物特征图像块之间的重叠度;再比如取通过面积计算方式计算获得的重叠度和像素数目计算方式计算获得的重叠度二者中的最大值作为最终介质图像块和生物特征图像块之间的重叠度。
步骤S110,根据所述重叠度确定所述待检测图像的活体检测结果。
上述基于第一掩码图像和第二掩码图像,对介质图像块和生物特征图像块进行重叠度 计算,得到重叠度,本步骤中,以计算获得的重叠度为依据,确定待检测图像的活体检测结果,具体判断待检测图像为活体图像或者假体图像。
实际应用中,为了根据介质图像块和生物特征图像块之间的重叠度确定待检测图像的活体检测结果,可设置预设重叠度阈值,用以区分活体图像和假体图像。具体的,本实施例提供的一种可选实施方式中,在根据重叠度确定待检测图像的活体检测结果的过程中,执行如下操作:
若所述重叠度大于或者等于预设重叠度阈值,则确定所述待检测图像为假体图像;若所述重叠度小于所述预设重叠度阈值,则确定所述待检测图像为活体图像。
其中,所述假体图像,是指仿造的用户生物特征图像,比如包含人脸特征的纸质照片;所述活体图像,是指真实的用户生物特征图像,比如直接利用摄像头采集的用户真实的人脸特征图像。
例如,预设重叠度阈值为35%,计算获得的重叠度为90%,计算获得的重叠度大于预设重叠度阈值,说明生物特征处于假体介质中的可能性较大,所以确定待检测图像为假体图像;再例如,预设重叠度阈值为35%,计算获得的重叠度为10%,计算获得的重叠度小于预设重叠度阈值,说明生物特征处于假体介质中的可能性较小,所以确定待检测图像为活体图像。
此外,实际中还可能存在活体特征处于介质图像块中的情况,活体特征是指有生命的活体的相关特征比如活体人脸,例如采集待检测图像的过程中,活体人脸处于手机屏幕前方,利用另一手机摄像头从人脸前方进行拍摄,在此情况下,呈现出来的待检测图像即为活体人脸处于手机屏幕中的图像,针对于此,为了避免在此情况下的图像活体检测的偏差,可执行如下操作:
若所述重叠度大于或者等于所述预设重叠度阈值,则计算所述介质图像块的介质图像块面积,以及计算所述生物特征图像块的特征图像块面积;
若所述特征图像块面积大于或者等于所述介质图像块面积,则确定所述待检测图像为活体图像;
若所述特征图像块面积小于所述介质图像块面积,则确定所述待检测图像为假体图像。
下述以本实施例提供的一种图像活体检测方法在人脸检测场景的应用为例,结合附图2和附图5对本实施例提供的应用于人脸检测场景的图像活体检测方法进行进一步说明,参见图5,应用于人脸检测场景的图像活体检测方法,具体包括如下步骤。
步骤S502,将待检测图像输入语义分割模型,对待检测图像进行语义分割处理,得到待检测图像中介质图像块对应的第一掩码图像。
其中,假体介质包括但不限于:电子屏幕、纸质照片、面具、头模。
如图2所示的图像活体检测过程的示意图,假体介质为电子屏幕,将待检测图像进行语义分割处理,得到假体介质即电子屏幕的介质图像块对应的第一掩码图像,第一掩码图像中的浅色区域为介质图像块即电子屏幕图像块。
步骤S504,将待检测图像输入人脸检测模块进行人脸信息检测,得到人脸信息图像块,以及根据人脸信息图像块的边界像素点在待检测图像中的位置信息,构建边界信息。
如图2所示,对待检测图像进行人脸信息检测,得到人脸信息图像块,根据人脸信息图像块的边界处的像素点的位置信息,构建人脸信息图像块的边界信息。
步骤S506,基于边界信息在待检测图像中确定目标图像块。
其中,目标图像块为处于待检测图像中人脸信息图像块之外的像素点组成的图像块。
步骤S508,对人脸信息图像块包含的像素点的像素值,和目标图像块包含的像素点的像素值,进行二值化处理,得到第二掩码图像。
在二值化处理之后,人脸信息图像块包含的像素点的像素值被确定为第一像素值,目标图像块包含的像素点的像素值被确定为第二像素值。
如图2所示,以构建的边界信息为依据,确定待检测图像中的目标图像块,此处的人脸信息图像块即第二掩码图像中的浅色区域,目标图像块为深色区域;将人脸信息图像块中的像素点的像素值和目标图像块中的像素点的像素值进行二值化处理,得到第二掩码图像。
步骤S510,确定介质图像块与人脸信息图像块的交集图像块和并集图像块。
步骤S512,计算交集图像块的第一图像块面积,以及计算并集图像块的第二图像块面积。
步骤S514,计算第一图像块面积和第二图像块面积的比值,作为介质图像块和人脸信息图像块的重叠度。
如图2所示,计算人脸信息图像块和介质图像块之间的重叠度,即确定介质图像块与人脸信息图像块的交集图像块和并集图像块,计算交集图像块的第一图像块面积,以及计算并集图像块的第二图像块面积,并且计算第一图像块面积和第二图像块面积的比值,作为介质图像块和人脸信息图像块的重叠度。
此外,步骤S510至步骤S514还可被替换为:确定介质图像块与人脸信息图像块的交集图像块和并集图像块;计算交集图像块包含的像素点的交集数目,以及计算并集图像块包含的像素点的并集数目;计算交集数目和并集数目的比值,作为介质图像块和人脸信息图像块的重叠度。
步骤S516,若重叠度大于或者等于预设重叠度阈值,则确定待检测图像为假体图像。
步骤S518,若重叠度小于预设重叠度阈值,则确定待检测图像为活体图像。
本申请提供的一种图像活体检测装置实施例如下:
在上述的实施例中,提供了一种图像活体检测方法,与之相对应的,还提供了一种图像活体检测装置,下面结合附图进行说明。
参照图6,其示出了本实施例提供的一种图像活体检测装置示意图。
由于装置实施例对应于方法实施例,所以描述得比较简单,相关的部分请参见上述提供的方法实施例的对应说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例提供一种图像活体检测装置,包括:语义分割处理模块602、生物特征检测模块604、像素处理模块606、重叠度计算模块608和检测结果确定模块610。
语义分割处理模块602,用于对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像。
生物特征检测模块604,用于对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息。
像素处理模块606,用于基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像。
重叠度计算模块608,用于基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度。
检测结果确定模块610,用于根据所述重叠度确定所述待检测图像的活体检测结果。
本申请提供的一种图像活体检测设备实施例如下:
对应上述描述的一种图像活体检测方法,基于相同的技术构思,本申请实施例还提供一种图像活体检测设备,该图像活体检测设备用于执行上述提供的图像活体检测方法,图7为本申请实施例提供的一种图像活体检测设备的结构示意图。
本实施例提供的一种图像活体检测设备,包括:
如图7所示,图像活体检测设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器701和存储器702,存储器702中可以存储有一个或一个以上存储应用程序或数据。其中,存储器702可以是短暂存储或持久存储。存储在存储器702的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括图像活体检测设备中的一系列计算机可执行指令。更进一步地,处理器701可以设置为与存储器702通信,在图像活体检测设备上执行存储器702中的一系列计算机可执行指令。图像活体检测设备还可以包括一个或一个以上电源703,一个或一个以上有线或无线网络接口704,一个或一个以上输入/输出接口705,一个或一个以上键盘706等。
在一个具体的实施例中,图像活体检测设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对图像活体检测设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;根据所述重叠度确定所述待检测图像的活体检测结果。
本申请提供的一种计算机可读存储介质实施例如下:
对应上述描述的一种图像活体检测方法,基于相同的技术构思,本申请实施例还提供一种计算机可读存储介质。
本实施例提供的计算机可读存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被处理器执行时实现以下流程:
对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;根据所述重叠度确定所述待检测图像的活体检测结果。
需要说明的是,本申请中关于计算机可读存储介质的实施例与本申请中关于图像活体检测方法的实施例基于同一发明构思,因此该实施例的具体实施可以参见前述对应方法的实施,重复之处不再赘述。
上述对本申请特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
本领域内的技术人员应明白,本申请实施例可提供为方法、系统或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可读存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程图像活体检测设备的处理器以产生一个机器,使得通过计算机或其他可编程图像活体检测设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程图像活体检测设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程图像活体检测设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本申请实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请的一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本文件的实施例而已,并不用于限制本文件。对于本领域技术人员来说,本文件可以有各种更改和变化。凡在本文件的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本文件的权利要求范围之内。

Claims (20)

  1. 一种图像活体检测方法,所述方法包括:
    对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;
    对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;
    基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;
    基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;
    根据所述重叠度确定所述待检测图像的活体检测结果。
  2. 根据权利要求1所述的方法,其中,所述基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度,包括:
    确定所述介质图像块与所述生物特征图像块的交集图像块和并集图像块;
    计算所述交集图像块的第一图像块面积,以及计算所述并集图像块的第二图像块面积;
    计算所述第一图像块面积和所述第二图像块面积的比值,作为所述重叠度。
  3. 根据权利要求1所述的方法,其中,所述基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度,包括:
    确定所述介质图像块与所述生物特征图像块的交集图像块和并集图像块;
    计算所述交集图像块包含的像素点的交集数目,以及计算所述并集图像块包含的像素点的并集数目;
    计算所述交集数目和所述并集数目的比值,作为所述重叠度。
  4. 根据权利要求1所述的方法,其中,所述根据所述重叠度确定所述待检测图像的活体检测结果,包括:
    若所述重叠度大于或者等于预设重叠度阈值,则确定所述待检测图像为假体图像;
    若所述重叠度小于所述预设重叠度阈值,则确定所述待检测图像为活体图像。
  5. 根据权利要求1所述的方法,其中,所述根据所述重叠度确定所述待检测图像的活体检测结果,包括:
    若所述重叠度大于或者等于所述预设重叠度阈值,则计算所述介质图像块的面积和所述生物特征图像块的面积;
    若所述生物特征图像块的面积大于或者等于所述介质图像块的面积,则确定所述待检测图像为活体图像;
    若所述特征图像块的面积小于所述介质图像块的面积,则确定所述待检测图像为假体图像。
  6. 根据权利要求1所述的方法,其中,所述对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息,包括:
    将所述待检测图像输入生物特征检测模块进行生物特征检测,得到所述生物特征图像块;
    根据所述生物特征图像块的边界像素点在所述待检测图像中的位置信息,构建所述边界信息。
  7. 根据权利要求6所述的方法,其中,所述基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像,包括:
    基于所述边界信息在所述待检测图像中确定目标图像块;所述目标图像块为处于所述待检测图像中所述生物特征图像块之外的像素点组成的图像块;
    对所述生物特征图像块包含的像素点的像素值,和所述目标图像块包含的像素点的像素值进行二值化处理,得到所述第二掩码图像;
    其中,所述生物特征图像块包含的像素点的像素值在进行二值化处理之后被确定为第一像素值,所述目标图像块包含的像素点的像素值在进行二值化处理之后被确定为第二像素值。
  8. 根据权利要求1所述的方法,其中,所述对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像,包括:
    将所述待检测图像输入语义分割模型,对所述待检测图像进行语义分割处理,得到所述第一掩码图像;所述语义分割模型包含第一编码器和第一解码器;
    其中,所述第一编码器对所述待检测图像中的假体介质进行特征提取,得到所述假体介质对应的介质特征;所述第一解码器基于所述介质特征对所述待检测图像进行语义分割,得到所述第一掩码图像。
  9. 根据权利要求1所述的方法,其中,所述对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像,包括:
    将所述待检测图像输入语义分割模型,对所述待检测图像进行语义分割处理,得到所述第一掩码图像;所述语义分割模型包括:第二编码器、第二解码器和图像处理模块;
    其中,所述第二编码器用于对待检测图像中的假体介质进行逐层特征提取与下采样,得到各层语义特征;所述第二解码器用于融合各层语义特征并进行上采样,得到与所述待检测图像尺寸相同的上采样图像;所述图像处理模块对所述上采样图像进行离散化处理,获得灰度图像;以及将所述灰度图像进行二值化处理,得到所述第一掩码图像。
  10. 根据权利要求8或9所述的方法,其中,所述特征提取包括:N次下采样处理,N≥1、2、3….,N是正整数;
    所述语义分割包括:N次上采样处理,并对所述上采样处理的结果进行离散化处理,得到灰度图像;以及对所述灰度图像进行二值化处理。
  11. 根据权利要求8或9所述的方法,其中,所述语义分割模型的训练方式包括:
    根据假体介质图像构建图像样本数据集;
    对所述图像样本数据集中的假体介质图像进行预处理;所述预处理包括:数据增强处理;
    通过所述预处理后的图像样本数据集对初始语义分割模型进行模型训练,获得语义分割模型。
  12. 根据权利要求11所述的方法,其中,所述根据假体介质图像构建图像样本数据集,包括:
    获取假体介质图像;
    将所述假体介质图像中不符合预设要求的假体介质图像进行剔除处理;
    对剔除处理后的假体介质图像进行介质图像块和目标图像块的标注处理,生成所述图像样本数据集。
  13. 根据权利要求1所述的方法,其中,所述基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像,包括:
    基于所述边界信息判断所述生物特征图像块是否符合预设特征规则;
    在所述生物特征图像块符合预设特征规则的情况下,基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;
    其中,所述预设特征规则包括大于反射率阈值、存在伪音、存在摩尔纹和存在镜面反射中的至少一种。
  14. 根据权利要求1所述的方法,其中,在所述对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息之后,还包括:
    在检测出多个生物特征图像块的边界信息的情况下,根据所述边界信息计算各所述生物特征图像块的面积;
    确定面积最大的生物特征图像块,并剔除除所述面积最大的生物特征图像块之外的各所述生物特征图像块。
  15. 根据权利要求1所述的方法,其中,所述介质图像块是指待检测图像中假体介质的假体介质区域或者假体介质范围。
  16. 根据权利要求14所述的方法,其中,所述假体介质是指冒充真人身份的生物特征仿冒品的介质。
  17. 一种图像活体检测装置,所述装置包括:
    语义分割处理模块,用于对待检测图像进行语义分割处理,得到所述待检测图像中介质图像块对应的第一掩码图像;
    生物特征检测模块,用于对所述待检测图像进行生物特征检测,得到所述待检测图像中生物特征图像块的边界信息;
    像素处理模块,用于基于所述边界信息对所述待检测图像进行像素处理,得到所述生物特征图像块对应的第二掩码图像;
    重叠度计算模块,用于基于所述第一掩码图像和所述第二掩码图像,对所述介质图像块和所述生物特征图像块进行重叠度计算,得到重叠度;
    检测结果确定模块,用于根据所述重叠度确定所述待检测图像的活体检测结果。
  18. 一种图像活体检测设备,所述设备包括:
    处理器;以及,被配置为存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器执行如权利要求1-16任一项所述的图像活体检测方法。
  19. 一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机可执行指令,所述计算机可执行指令在被处理器执行时实现如权利要求1-16任一项所述的图像活体检测方法。
  20. 一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可使计算机实现如权利要求1-16任一项所述的图像活体检测方法。
PCT/CN2023/074146 2022-06-13 2023-02-01 图像活体检测方法及装置 WO2023241058A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210660276.7 2022-06-13
CN202210660276.7A CN117292440A (zh) 2022-06-13 2022-06-13 图像活体检测方法及装置

Publications (1)

Publication Number Publication Date
WO2023241058A1 true WO2023241058A1 (zh) 2023-12-21

Family

ID=89193089

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074146 WO2023241058A1 (zh) 2022-06-13 2023-02-01 图像活体检测方法及装置

Country Status (2)

Country Link
CN (1) CN117292440A (zh)
WO (1) WO2023241058A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060280344A1 (en) * 2005-06-13 2006-12-14 Samsung Electronics Co., Ltd. Illumination normalizing apparatus, method, and medium and face recognition apparatus, method, and medium using the illumination normalizing apparatus, method, and medium
CN107463875A (zh) * 2017-07-03 2017-12-12 金讯系统管理有限公司 一种判断人员身份的方法和装置
CN107609494A (zh) * 2017-08-31 2018-01-19 北京飞搜科技有限公司 一种基于静默式的人脸活体检测方法及系统
CN109325463A (zh) * 2018-10-16 2019-02-12 浙江中正智能科技有限公司 一种人脸实时跟踪方法
CN112307848A (zh) * 2019-08-01 2021-02-02 普兰特龙尼斯公司 检测视频会议中的欺骗说话者

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060280344A1 (en) * 2005-06-13 2006-12-14 Samsung Electronics Co., Ltd. Illumination normalizing apparatus, method, and medium and face recognition apparatus, method, and medium using the illumination normalizing apparatus, method, and medium
CN107463875A (zh) * 2017-07-03 2017-12-12 金讯系统管理有限公司 一种判断人员身份的方法和装置
CN107609494A (zh) * 2017-08-31 2018-01-19 北京飞搜科技有限公司 一种基于静默式的人脸活体检测方法及系统
CN109325463A (zh) * 2018-10-16 2019-02-12 浙江中正智能科技有限公司 一种人脸实时跟踪方法
CN112307848A (zh) * 2019-08-01 2021-02-02 普兰特龙尼斯公司 检测视频会议中的欺骗说话者

Also Published As

Publication number Publication date
CN117292440A (zh) 2023-12-26

Similar Documents

Publication Publication Date Title
Xiao et al. Image splicing forgery detection combining coarse to refined convolutional neural network and adaptive clustering
CN107958235B (zh) 一种人脸图像检测方法、装置、介质和电子设备
KR101896357B1 (ko) 객체를 검출하는 방법, 디바이스 및 프로그램
CN112052831B (zh) 人脸检测的方法、装置和计算机存储介质
CN108416291B (zh) 人脸检测识别方法、装置和系统
Zanardelli et al. Image forgery detection: a survey of recent deep-learning approaches
CN112800468B (zh) 一种基于隐私保护的数据处理方法、装置及设备
EP3674973A1 (en) Method and apparatus with liveness detection and object recognition
CN111626163B (zh) 一种人脸活体检测方法、装置及计算机设备
CN110263805B (zh) 证件验证、身份验证方法、装置及设备
Amerini et al. Deep learning for multimedia forensics
CN110942456B (zh) 篡改图像检测方法、装置、设备及存储介质
CN116453232A (zh) 人脸活体检测方法、人脸活体检测模型的训练方法和装置
Diallo et al. Improving robustness of image tampering detection for compression
Guan et al. RoadCapsFPN: Capsule feature pyramid network for road extraction from VHR optical remote sensing imagery
CN107886093B (zh) 一种字符检测方法、系统、设备及计算机存储介质
Mustafa et al. Obscenity detection using haar-like features and gentle Adaboost classifier
WO2023241058A1 (zh) 图像活体检测方法及装置
CN116798041A (zh) 图像识别方法、装置和电子设备
Ahmed et al. Image splicing detection and localisation using efficientnet and modified u-net architecture
Geradts et al. Interpol review of forensic video analysis, 2019–2022
CN114387496A (zh) 一种目标检测方法和电子设备
US11087121B2 (en) High accuracy and volume facial recognition on mobile platforms
Mehta et al. An Efficient Way to Detect and Recognize the Overlapped Coins using Otsu's Algorithm based on Hough Transform Technique
KR102488858B1 (ko) 손상된 유형물의 디지털 복원 방법, 장치 및 프로그램

Legal Events

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

Ref document number: 23822630

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023822630

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023822630

Country of ref document: EP

Effective date: 20240401