Liveness detection method, device and apparatus

By performing liveness probability analysis on the effective facial region and key parts of the image to be detected at different image qualities, generating quality-degraded images, and using deep learning to calculate the liveness probability value, the problem of detection failure caused by image compression and network transmission is solved, and accurate liveness detection under different image qualities is achieved.

CN115810206BActive Publication Date: 2025-12-19CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111067128.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-13
Publication Date
2025-12-19
Estimated Expiration
2041-09-13

AI Technical Summary

Technical Problem

Existing liveness detection technologies are prone to failure during image compression and network transmission, leading to algorithm failure.

Method used

By performing liveness probability analysis on the effective facial region and key facial parts of the image to be detected at different image qualities, multiple quality-degraded images are generated. Then, deep learning methods are used to calculate the liveness probability value, and a comprehensive judgment is made on whether the image contains a live person.

Benefits of technology

It effectively adapts to liveness detection with different image quality, avoids detection algorithm failure caused by image compression during network transmission, and improves detection accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115810206B_ABST
    Figure CN115810206B_ABST
Patent Text Reader

Abstract

The application provides a kind of live detection method, device and equipment, applied to artificial intelligence technical field.The method comprises: obtaining image to be detected;Extract the first image including the face effective area in the image to be detected, and the second image including the key part of face in the first image;Analyze the first probability value that the first image of different image quality includes live body respectively, and the second probability value that the second image of different image quality includes live body respectively;According to the first probability value and the second probability value, obtain the determination result whether the image to be detected includes live body.The method is used, by the overall region of face effective area and the key part of face in face effective area in the image to be detected, respectively, the live body probability analysis of different image quality is carried out, to be able to adapt to the live body detection in the image of different image quality, avoid the problem that detection algorithm may fail due to image compression when network transmission.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, in particular to a living body detection method, device and equipment. BACKGROUND

[0002] Living body detection is a method for determining the real physiological characteristics of an object in some identity verification scenarios. In face recognition applications, living body detection can verify whether a user is a real living person by using technologies such as face key point positioning and face tracking through combined actions such as blinking, opening the mouth, shaking the head, and nodding. This can effectively resist common attack methods such as photos, face swapping, masks, occlusion, and screen flipping, thereby helping users to identify fraudulent behavior and protecting the interests of users.

[0003] Existing living body detection technologies are mainly aimed at attack methods such as photo printing, flipping, and screen display. Some living body detection technologies can also detect 3D printed masks. In terms of detection methods, living body detection technologies mainly use texture detection, depth information detection, video coordination, and voice methods.

[0004] Existing living body detection algorithms may fail when processing compressed or lossy images. However, actual detection systems generally need to be transmitted over a network, with compressed images being sent by a front-end acquisition device to a detection system for detection. This transmission process inevitably introduces compression loss and may cause image quality degradation due to transcoding during network transmission, which causes the living body detection algorithm to fail. SUMMARY

[0005] The technical solution of the present application aims to provide a living body detection method, device and equipment to solve the problem of detection algorithm failure caused by image compression in the living body detection process of the prior art.

[0006] The present application provides a living body detection method, wherein the method comprises:

[0007] obtaining a to-be-detected image;

[0008] extracting a first image including a valid face area in the to-be-detected image, and a second image including a key part of the face in the first image;

[0009] analyzing first probability values of the first image of different image qualities including a living body, and second probability values of the second image of different image qualities including a living body;

[0010] obtaining a determination result of whether the to-be-detected image includes a living body according to the first probability values and the second probability values.

[0011] Optionally, the live body detection method, wherein analyzing the first image with different image qualities respectively comprises a first probability value of including a live body, comprises:

[0012] generating a plurality of quality-degraded images of the first image, wherein the image quality of each of the quality-degraded images is lower than the image quality of the first image;

[0013] analyzing each of the quality-degraded images respectively comprises a probability value of including a live body, and a plurality of the first probability values are obtained.

[0014] Optionally, the live body detection method, wherein analyzing the second image with different image qualities respectively comprises a second probability value of including a live body, comprises:

[0015] generating a plurality of quality-degraded images of the second image, wherein the image quality of each of the quality-degraded images is lower than the image quality of the second image;

[0016] analyzing each of the quality-degraded images respectively comprises a probability value of including a live body, and a plurality of the second probability values are obtained.

[0017] Optionally, the live body detection method, wherein the second image is a plurality of images, and different second images include different facial key parts;

[0018] wherein generating a plurality of quality-degraded images of the second image comprises:

[0019] corresponding to each of the second images, a plurality of corresponding quality-degraded images are respectively generated.

[0020] Optionally, the live body detection method, wherein different quality-degraded images have different image qualities.

[0021] Optionally, the live body detection method, wherein when a plurality of the quality-degraded images are arranged from high to low according to image quality, the difference between the image qualities of two adjacent quality-degraded images is a preset quality value.

[0022] Optionally, the live body detection method, wherein according to the first probability value and the second probability value, a determination result of whether the to-be-detected image includes a live body is obtained, comprises:

[0023] calculating the mean value of the first probability value and the second probability value;

[0024] when the mean value is greater than or equal to a preset value, a determination result of the to-be-detected image including a live body is obtained;

[0025] when the mean value is less than the preset value, a determination result of the to-be-detected image not including a live body is obtained.

[0026] Optionally, the living body detection method, wherein the extracting the first image including the face valid area in the to-be-detected image comprises:

[0027] obtaining the face area in the to-be-detected image;

[0028] extending the face area in the horizontal direction and the vertical direction respectively to the area of the preset range as the face valid area, and intercepting the face valid area to form the first image.

[0029] Optionally, the living body detection method, wherein before the analyzing the first probability value of the living body included in the first image of different image quality and the second probability value of the living body included in the second image of different image quality, the method further comprises:

[0030] performing image quality estimation on the first image to obtain an image quality estimation value;

[0031] performing normalization processing on the image quality estimation value to obtain a quality value in a preset quality representation range;

[0032] wherein the generating the multiple quality attenuation images of the first image comprises:

[0033] determining the image quality of each quality attenuation image of the multiple quality attenuation images of the first image according to the quality value;

[0034] generating the corresponding multiple quality attenuation images according to the determined image quality.

[0035] The embodiment of the present application further provides a living body detection device, wherein the device comprises:

[0036] an image acquisition module, configured to acquire a to-be-detected image;

[0037] an image processing module, configured to extract a first image including a face valid area in the to-be-detected image and a second image including a face key part in the first image;

[0038] a first analysis module, configured to analyze the first probability value of the living body included in the first image and the second probability value of the living body included in the second image;

[0039] a second analysis module, configured to obtain a determination result of whether the to-be-detected image includes the living body according to the first probability value and the second probability value.

[0040] The embodiment of the present application also provides a living body detection device, which comprises a processor, a memory and a program stored in the memory and executable on the processor, and the program is executed by the processor to realize the living body detection method according to any one of the above.

[0041] The embodiment of the present application also provides a readable storage medium, wherein the readable storage medium stores a program, and the program is executed by a processor to realize the steps in the living body detection method according to any one of the above.

[0042] The above technical solution of the present application has at least one of the following beneficial effects:

[0043] The living body detection method provided by the embodiment of the present application can adapt to the living body detection in images with different image qualities by respectively performing living body probability analysis on the overall region of the face effective region and the face key part in the face effective region of the to-be-detected image, and can avoid the problem of invalid detection algorithm caused by image compression during network transmission. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 The figure is a flowchart of the living body detection method provided by the embodiment of the present application.

[0045] Figure 2 The figure is a flowchart of one of the embodiments of the method provided by the embodiment of the present application.

[0046] Figure 3 The figure is a structural diagram of the living body detection device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the technical problems, technical solutions and advantages of the present application clearer, the following will be described in detail with reference to the drawings and specific embodiments.

[0048] In order to solve the problem of invalid detection algorithm caused by image compression in the living body detection process of the prior art, the embodiment of the present application provides a living body detection method, which can adapt to the living body detection in images with different image qualities by respectively performing living body probability analysis on the overall region of the face effective region and the face key part in the face effective region of the to-be-detected image, and can avoid the problem of invalid detection algorithm caused by image compression during network transmission.

[0049] One of the embodiments, as shown in the figure, Figure 1 The living body detection method provided by the embodiment of the present application comprises:

[0050] S110, acquiring a to-be-detected image;

[0051] S120, extract a first image including a face valid region in the image to be detected, and a second image including a face key part in the first image;

[0052] S130, analyze a first probability value of the first image including a living body in different image qualities, and a second probability value of the second image including a living body in different image qualities;

[0053] S140, obtain a determination result of whether the image to be detected includes a living body according to the first probability value and the second probability value.

[0054] Optionally, the living body detection method in the embodiment of the present application can be applied to an identity verification scene, such as a face recognition application, and through collecting a face recognition image, blinking, opening mouth, shaking head, nodding and other combined actions in the face are detected to verify whether a user is a real living body.

[0055] Therefore, in step S110, when the image to be detected is obtained, optionally, the obtained image to be detected is a photo obtained by photographing on the spot during identity verification, that is, a face image collected during the identity verification process; in another embodiment, the image to be detected can also be a photo generated by an attacker using printing, screen display, 3D mask or real photo face replacement.

[0056] By using the living body detection method in the embodiment, the face valid region in the image to be detected and the face key part in the face valid region are extracted, and the probability value of including a living body is determined by analyzing different image qualities, so that the probability value is determined according to different regions and different image qualities, and whether the image to be detected includes a living body is determined by comprehensive analysis, which can adapt to living body detection in images of different image qualities, and avoid the problem of invalid detection algorithm caused by image compression during network transmission.

[0057] In the embodiment of the present application, in step S130, when analyzing the first probability value of the first image including a living body in different image qualities, for the first image in different image qualities, the image quality of each first image is lower than the image quality of the face valid region; and when analyzing the second probability value of the second image including a living body in different image qualities, for the second image in different image qualities, the image quality of each second image is lower than the image quality of the face valid region.

[0058] By using the method, the living body detection method can be applied to an identity verification system for network transmission, and can meet the living body detection requirement even if the image quality is reduced due to image compression and transmission loss in network transmission, and can avoid the problem that the detection algorithm is invalid due to image compression in network transmission.

[0059] Optionally, in the living body detection method, after the step S110 of obtaining the to-be-detected image, the method further includes:

[0060] detecting the validity of the obtained to-be-detected image, that is, determining whether the to-be-detected image includes a face image, and when it is determined that the to-be-detected image includes the face image, it is determined that the to-be-detected image is valid, and the subsequent step is continued to be executed, otherwise, the detection of the to-be-detected image is abandoned.

[0061] On this basis, in the step S120 of extracting the first image including the face valid area in the to-be-detected image, the step includes:

[0062] obtaining the face area in the to-be-detected image;

[0063] extending the face area in the horizontal direction and the vertical direction by a preset range respectively to obtain a face valid area, and cutting the face valid area to form the first image.

[0064] Specifically, the face area is the valid area of the image, and in this embodiment, the image area is extended outward in the horizontal direction and the vertical direction respectively based on the width and the height of the face area, and the extended area is used as the face valid area for living body detection.

[0065] For example, taking the face image in the to-be-detected image as an example, for the face area, the face width is w pixels and the face height is h pixels, the face area is extended horizontally by ex times and vertically by ey times to obtain a face valid area; the face valid area is an image area which is centered on the face detection frame (w, h) and whose left and right edges are extended outward by ex×w / 2 pixels and whose upper and lower edges are extended outward by ey×h / 2 pixels.

[0066] Optionally, in specific application, the ex×w / 2 pixels and the ey×h / 2 pixels can be rounded respectively.

[0067] In addition, when the face area is close to the image boundary, the extension is stopped at the image boundary. Meanwhile, multiple extension multiples can be set according to needs, for example, the horizontal extension multiples can include ex1 and ex2, and the vertical extension multiples can include ey1 and ey2.

[0068] Specifically, four edges of the face region are respectively expanded in a horizontal direction by a first set expansion multiple (e.g., ex1) and in a vertical direction by a second set expansion multiple (e.g., ey1), and the expanded region is formed as a region of a preset range of the required expansion.

[0069] Optionally, in the embodiment of the present application, the first set expansion multiple and the second set expansion multiple can be determined by being selected from a plurality of preset expansion multiples.

[0070] Optionally, by selecting different expansion multiples, the method for detecting a living body can obtain a plurality of face effective regions of the image to be detected, and the first image extraction can be performed on each face effective region, and the second image including the face key part can be extracted from each first image, and the subsequent determination of whether the image to be detected includes a living body can be performed.

[0071] Specifically, in step S120, when the first image including the face effective region in the image to be detected is extracted, the first image is a plurality of images, and each first image corresponds to a face effective region after the face region is expanded in different ranges.

[0072] The second image including the face key part in the first image includes:

[0073] Corresponding to each first image, the second image corresponding to different face key parts is extracted.

[0074] The first probability value of the first image of different image quality including a living body and the second probability value of the second image of different image quality including a living body include:

[0075] Corresponding to each first image, the first probability value of the first image of different image quality including a living body is analyzed, and a plurality of first probability values are obtained. Corresponding to each first image, the second probability value of the second image of different image quality including a living body is analyzed, and a plurality of second probability values are obtained.

[0076] Specifically, in step S140, according to the obtained plurality of first probability values and the plurality of second probability values, the determination result of whether the image to be detected includes a living body is obtained.

[0077] Optionally, in step S120, the second image including the face key part in the first image includes:

[0078] The image region corresponding to the face key part of the face effective region in the first image is selected as the second image.

[0079] Optionally, the face effective region generally takes the forehead, eyebrows, mouth, nose, cheeks and the like as the key parts of the face.

[0080] In the selection of the second image, a selection frame in a rectangular shape or a circular shape or the like can be used to select the image of the above-mentioned parts on the face effective region to obtain a plurality of second images.

[0081] Optionally, in step S130, the analysis of the first probability value of the living body included in the first image of different image quality respectively comprises:

[0082] A plurality of quality-degraded images of the first image are generated, wherein the image quality of each of the quality-degraded images is lower than that of the first image.

[0083] The probability value of the living body included in each of the quality-degraded images is analyzed to obtain a plurality of first probability values.

[0084] In step S130, the analysis of the second probability value of the living body included in the second image of different image quality respectively comprises:

[0085] A plurality of quality-degraded images of the second image are generated, wherein the image quality of each of the quality-degraded images is lower than that of the second image.

[0086] The probability value of the living body included in each of the quality-degraded images is analyzed to obtain a plurality of second probability values.

[0087] In the analysis of the first probability value of the living body included in the first image of different image quality respectively and the analysis of the second probability value of the living body included in the second image of different image quality respectively, for the first image of different image quality, the image quality of each of the first images is lower than that of the face effective region; and for the second image of different image quality, the image quality of each of the second images is lower than that of the face effective region.

[0088] Optionally, before the analysis of the first probability value of the living body included in the first image of different image quality respectively and the analysis of the second probability value of the living body included in the second image of different image quality respectively in step S130, the method further comprises:

[0089] The image quality of the first image is estimated to obtain an image quality estimation value.

[0090] The image quality estimation value is normalized to obtain a quality value within a preset quality representation range.

[0091] wherein generating the plurality of quality-decay images of the first image comprises:

[0092] determining, according to the quality value, an image quality of each of the plurality of quality-decay images of the first image;

[0093] generating, according to the determined image quality, a corresponding plurality of quality-decay images.

[0094] Specifically, through the above-mentioned embodiments, before analyzing the first probability value of the first image of different image quality and the second probability value of the second image of different image quality, the image quality estimation of the face effective area in the image to be detected is performed, that is, the face effective area is taken as the input of deep learning quality estimation, and the image quality of the face effective area is inferred.

[0095] In addition, further, the image quality estimation value obtained by performing the image quality estimation can be normalized, that is, normalized in a preset representation range, such as normalized to an image quality between 1 level and 5 levels. On this basis, when generating the plurality of quality-decay images of the first image, it is determined that the image quality of each of the plurality of quality-decay images of the first image is located in the preset representation range, and is lower than the image quality of the face effective area after normalization; similarly, when generating the plurality of quality-decay images of the second image, it is determined that the image quality of each of the plurality of quality-decay images of the second image is also located in the preset representation range, and is lower than the image quality of the face effective area after normalization.

[0096] In addition, according to the above-mentioned manner, after determining the image quality of each of the plurality of quality-decay images of the first image, a quality-decay image with a corresponding image quality is generated according to the determined image quality; similarly, according to the above-mentioned manner, after determining the image quality of each of the plurality of quality-decay images of the second image, a quality-decay image with a corresponding image quality is generated according to the determined image quality.

[0097] In the embodiments of the present application, optionally, when generating the plurality of quality-decay images of the first image and generating the plurality of quality-decay images of the second image, different quality-decay images have different image qualities. In this way, by performing the probability value analysis including the living body on the quality-decay images of the first image of different image quality or on the quality-decay images of the second image of different image quality, the detection analysis results of the first image and the second image at different image qualities can be obtained, the comprehensiveness of image analysis is ensured, and the repeated analysis process is avoided.

[0098] Additionally, in the case of generating a plurality of quality-decayed images of the first image and a plurality of quality-decayed images of the second image, the difference between the image quality of two quality-decayed images arranged adjacently when the plurality of quality-decayed images are arranged from high to low in terms of image quality is a preset quality value.

[0099] For example, in the case of generating a plurality of quality-decayed images of the first image, the face effective region in the image to be detected is subjected to image quality estimation, and the quality value within the preset quality representation range obtained after normalization of the image quality estimation value is used to perform image quality decay on the first image to generate a plurality of quality-decayed images with different image qualities. Specifically, if the quality value obtained after normalization of the image quality estimation value of the face effective region is MosH, and K quality-decayed images with different image qualities are to be generated, then the difference between the image quality of two quality-decayed images arranged adjacently when the plurality of quality-decayed images are arranged from high to low in terms of image quality is a value calculated according to the formula (MosH-1) / K; K is an integer greater than or equal to 1.

[0100] Similarly, in the case of generating a plurality of quality-decayed images of the second image, the face effective region in the image to be detected is subjected to image quality estimation, and the quality value within the preset quality representation range obtained after normalization of the image quality estimation value is used to perform image quality decay on the second image to generate a plurality of quality-decayed images with different image qualities. Specifically, if the quality value obtained after normalization of the image quality estimation value of the face effective region is MosH, and P quality-decayed images with different image qualities are to be generated, then the difference between the image quality of two quality-decayed images arranged adjacently when the plurality of quality-decayed images are arranged from high to low in terms of image quality is a value calculated according to the formula (MosH-1) / P; P is an integer greater than or equal to 1.

[0101] It should be noted that the above-mentioned method of generating quality-decayed images is only for illustration, and is not limited thereto. For example, the difference between the image quality of the plurality of quality-decayed images is not limited to a preset quality value, as long as the plurality of quality-decayed images have different image qualities.

[0102] Optionally, in the embodiment of the present application, when the first images of different image qualities respectively include first probability values of living bodies, and the second images of different image qualities respectively include second probability values of living bodies, a deep learning method can be used to infer the plurality of quality decay images obtained according to the first images to obtain the probability values of living bodies in each quality decay image, that is, to obtain a plurality of first probability values; similarly, a deep learning method can be used to infer the plurality of quality decay images obtained according to the second images to obtain the probability values of living bodies in each quality decay image, that is, to obtain a plurality of second probability values.

[0103] In step S140, a determination result of whether the to-be-detected image includes a living body is obtained according to the first probability value and the second probability value, including:

[0104] Calculating the mean value of the first probability value and the second probability value;

[0105] When the mean value is greater than or equal to a preset value, a determination result of the to-be-detected image including a living body is obtained;

[0106] When the mean value is less than the preset value, a determination result of the to-be-detected image not including a living body is obtained.

[0107] Optionally, the mean value includes but is not limited to only an arithmetic mean value or a weighted mean value.

[0108] It should be noted that the living body detection method in the embodiment of the present application has no strict order limitation between the two implementation processes of extracting the first image including the face effective area in the to-be-detected image in steps S110 to S140, analyzing the first probability values of living bodies in the first images of different image qualities, and extracting the second image of the face key part from the first image, and analyzing the second probability values of living bodies in the second images of different image qualities.

[0109] In combination with Figure 2 It is shown that the specific implementation process of the living body detection method in the embodiment of the present application can include the following steps:

[0110] S210, obtaining a to-be-detected image;

[0111] S220, detecting a face effective area in the to-be-detected image to generate a first image;

[0112] S230, performing image quality estimation on the face effective area of the first image;

[0113] S240, generating a plurality of quality decay images of the first image;

[0114] S250, analyzing, by using a deep learning method, a first probability value that each of a plurality of quality decay images generated according to the first image includes a living body;

[0115] S260, extracting a face key part in the first image to generate a second image;

[0116] S270, generating a plurality of quality decay images of the second image;

[0117] S280, analyzing, by using a deep learning method, a second probability value that each of a plurality of quality decay images generated according to the second image includes a living body;

[0118] S290, obtaining a determination result of whether the to-be-detected image includes a living body according to the first probability value and the second probability value.

[0119] It should be noted that the implementation process of steps S230 to S250 and the implementation process of steps S260 to S290 do not have strict sequence limitation, and the two implementation processes can be executed in parallel.

[0120] According to the above, the living body detection method provided by the embodiment of the application estimates the quality of the face effective area of the to-be-detected image input by the user, generates a plurality of low-quality images (quality decay images) in the face effective area, selects a face key part in the face effective area to generate a plurality of low-quality images (quality decay images), performs deep learning network model operation by using the quality decay images generated by the face effective area and the quality decay images generated by the face key part, obtains the probability value that each of the quality decay images includes a living body, performs fusion calculation by using a plurality of probability values, and finally determines whether the to-be-detected image includes a living body, so as to ensure to obtain an accurate determination result, adapt to living body detection in images of different image qualities, and avoid the problem that the detection algorithm is invalid due to image compression that may occur during network transmission.

[0121] Another aspect of the embodiment of the application further provides a living body detection device, as shown in the figure, the device comprises: Figure 3

[0122] The image acquisition module 310 is configured to acquire a to-be-detected image.

[0123] The image processing module 320 is configured to extract a first image including a face effective area in the to-be-detected image, and a second image including a face key part in the first image.

[0124] The first analysis module 330 is configured to analyze a first probability value that the first image includes a living body, and a second probability value that the second image includes a living body.

[0125] ​The second analysis module 340 is configured to obtain a determination result of whether the to-be-detected image includes a living body according to the first probability value and the second probability value.

[0126] The living body detection device can adapt to the living body detection in images with different image qualities by performing living body probability analysis on the whole face effective area of the to-be-detected image and the face key part in the face effective area respectively, thereby avoiding the problem of invalid detection algorithm caused by image compression during network transmission.

[0127] Optionally, the living body detection device, wherein the first analysis module 330 analyzes the first image with different image qualities to obtain a first probability value of each image including a living body, including:

[0128] a plurality of quality-degraded images of the first image are generated, and the image quality of each quality-degraded image is lower than that of the first image;

[0129] a probability value of each quality-degraded image including a living body is analyzed to obtain a plurality of first probability values.

[0130] Optionally, the living body detection device, wherein the first analysis module 330 analyzes the second image with different image qualities to obtain a second probability value of each image including a living body, including:

[0131] a plurality of quality-degraded images of the second image are generated, and the image quality of each quality-degraded image is lower than that of the second image;

[0132] a probability value of each quality-degraded image including a living body is analyzed to obtain a plurality of second probability values.

[0133] Optionally, the living body detection device, wherein the second image is a plurality of images, and different second images include different face key parts.

[0134] The first analysis module 330 generates a plurality of quality-degraded images of the second image, including:

[0135] corresponding to each second image, a plurality of corresponding quality-degraded images are generated.

[0136] Optionally, the living body detection device, wherein different quality-degraded images have different image qualities.

[0137] Optionally, the living body detection device, wherein when the plurality of quality-degraded images are arranged from high to low according to image quality, the difference between the image qualities of two adjacent quality-degraded images is a preset quality value.

[0138] Optionally, the living body detection device, wherein the second analysis module 340 obtains a determination result of whether the to-be-detected image includes a living body according to the first probability value and the second probability value, comprising:

[0139] calculating a mean value of the first probability value and the second probability value;

[0140] when the mean value is greater than or equal to a preset value, obtaining a determination result that the to-be-detected image includes a living body;

[0141] when the mean value is less than the preset value, obtaining a determination result that the to-be-detected image does not include a living body.

[0142] Optionally, the living body detection device, wherein the image processing module 320 extracts a first image including a face effective area in the to-be-detected image, comprising:

[0143] obtaining a face area in the to-be-detected image;

[0144] extending the face area by a preset range in a horizontal direction and a vertical direction respectively to obtain a face effective area, and cutting the face effective area to form the first image.

[0145] Optionally, the living body detection device, wherein before the analysis of the first probability value of the first image of different image qualities respectively including a living body and the second probability value of the second image of different image qualities respectively including a living body, the image processing module is further used for:

[0146] performing image quality estimation on the first image to obtain an image quality estimation value;

[0147] performing normalization processing on the image quality estimation value to obtain a quality value within a preset quality representation range;

[0148] wherein the first analysis module 330 generates a plurality of quality attenuation images of the first image, comprising:

[0149] determining an image quality of each quality attenuation image of the plurality of quality attenuation images of the first image according to the quality value;

[0150] generating a corresponding plurality of quality attenuation images according to the determined image quality.

[0151] It should be noted that the living body detection device, the image acquisition module, the image processing module, the first analysis module and the second analysis module described in the embodiments of the present application are not limited to being independent modules, but can also be combined into an integrated structure, or the functions of one module can be implemented by multiple modules or sub-modules.

[0152] Another embodiment of the present application also provides a living body detection device, which comprises a processor, a memory and a program stored in the memory and executable on the processor, and the program is executed by the processor to implement the living body detection method according to any one of the above.

[0153] In combination Figures 1 to 2 With the specific implementation process of the living body detection method according to the embodiments of the present application, the specific implementation process of the living body detection method implemented by the processor executing the program of the living body detection device can be known by those skilled in the art, and will not be described in detail here.

[0154] In addition, the embodiments of the present application also provide a readable storage medium having a computer program stored thereon, and the program is executed by the processor to implement the steps of the living body detection method according to any one of the above.

[0155] Specifically, the readable storage medium is applied to the living body detection device described above, and when applied to the living body detection device, the execution steps of the living body detection method are as described above, and will not be described here.

[0156] In the several embodiments provided in the present application, it should be understood that the disclosed method and device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the units is only a logical function division. There can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0157] In addition, each functional unit in the embodiments of the present application can be integrated into one processing unit, or each unit can be physically separated, or two or more units can be integrated into one unit. The above integrated unit can be realized in the form of hardware, or in the form of hardware plus software function units.

[0158] The integrated unit in the form of software function unit can be stored in a computer readable storage medium. The software function unit is stored in a storage medium, and includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform part of steps of the transceiving method according to the embodiments of the present application. The storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0159] The above is the preferred embodiment of the present application, it should be pointed out that for the ordinary person in the art, without departing from the principles of the present application, can also make a number of improvements and refinements, these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method of detecting living matter, characterized by, The method comprises: acquiring an image to be detected; extracting a first image including a valid face area in the image to be detected, and a second image including a key part of a face in the first image; analyzing a first probability value of the first image of different image qualities respectively including a living body, and a second probability value of the second image of different image qualities respectively including a living body; obtaining a determination result of whether the image to be detected includes a living body according to the first probability value and the second probability value; wherein analyzing the first probability value of the first image of different image qualities respectively including a living body comprises: generating a plurality of quality attenuation images of the first image; wherein the image quality of each of the quality attenuation images is lower than that of the first image; analyzing the probability value of each of the quality attenuation images respectively including a living body to obtain a plurality of the first probability values; and / or analyzing the second probability value of the second image of different image qualities respectively including a living body comprises: generating a plurality of quality attenuation images of the second image; wherein the image quality of each of the quality attenuation images is lower than that of the second image; analyzing the probability value of each of the quality attenuation images respectively including a living body to obtain a plurality of the second probability values.

2. The living body detecting method according to claim 1, wherein The second image is a plurality, and different second images include different key parts of a face; wherein generating a plurality of quality attenuation images of the second image comprises: corresponding to each of the second images, a plurality of corresponding quality attenuation images are respectively generated.

3. The living body detecting method according to claim 1, wherein Different quality attenuation images have different image qualities.

4. The living body detecting method according to claim 3, wherein When a plurality of quality attenuation images are arranged from high to low according to image quality, the difference in image quality between two adjacent quality attenuation images is a preset quality value.

5. The living body detecting method according to claim 1, wherein According to the first probability value and the second probability value, obtaining a determination result of whether the image to be detected includes a living body comprises: calculating the mean value of the first probability value and the second probability value; when the mean value is greater than or equal to a preset value, obtaining a determination result that the image to be detected includes a living body; when the mean value is less than the preset value, obtaining a determination result that the image to be detected does not include a living body.

6. The living body detecting method according to claim 1, wherein The extraction of the first image including the valid face area in the image to be detected comprises: acquiring a face area in the image to be detected; extending the face area by a preset range in the horizontal direction and the vertical direction respectively to obtain a valid face area, and cutting the valid face area to form the first image.

7. The living body detecting method according to claim 1, wherein Before analyzing the first probability value of the first image of different image qualities respectively including a living body, and the second probability value of the second image of different image qualities respectively including a living body, the method further comprises: performing image quality estimation on the first image to obtain an image quality estimation value; performing normalization processing on the image quality estimation value to obtain a quality value within a preset quality representation range; wherein generating a plurality of quality attenuation images of the first image comprises: determining the image quality of each of the plurality of quality attenuation images of the first image according to the quality value; According to the determined image quality, a plurality of quality-decay images corresponding to the determined image quality are generated.

8. A living body detecting apparatus characterized by comprising: The device comprises: An image acquisition module, configured to acquire a to-be-detected image; An image processing module, configured to extract a first image including a face valid area in the to-be-detected image, and a second image including a key part of the face in the first image; A first analysis module, configured to analyze a first probability value of the first image including a living body under different image qualities, and a second probability value of the second image including a living body under different image qualities; A second analysis module, configured to obtain a determination result of whether the to-be-detected image includes a living body according to the first probability value and the second probability value; The first analysis module analyzes the first probability value of the first image including a living body under different image qualities, comprising: generating a plurality of quality-decay images of the first image; wherein the image quality of each of the quality-decay images is lower than that of the first image; analyzing a probability value of each of the quality-decay images including a living body, and obtaining a plurality of the first probability values; and / or The first analysis module analyzes the second probability value of the second image including a living body under different image qualities, comprising: generating a plurality of quality-decay images of the second image; wherein the image quality of each of the quality-decay images is lower than that of the second image; analyzing a probability value of each of the quality-decay images including a living body, and obtaining a plurality of the second probability values.

9. A living body detecting apparatus characterized by comprising: comprise: a processor, a memory, and a program stored in the memory and executable on the processor, and the program is executed by the processor to implement the living body detection method according to any one of claims 1 to 7.

10. A readable storage medium, characterized by, The readable storage medium stores a program, and the program is executed by the processor to implement the steps in the living body detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Human face living body detection method and device and computer equipment

    CN111626163A

  • Living body detection method and apparatus

    WO2021135639A1