Living body detection method, electronic equipment and computer readable medium

By generating multiple frames of original fingerprint images during the fingerprint enrollment and authentication stages, forming a time sequence diagram, and inputting it into the liveness detection model, the problems of strong hardware dependence and insufficient anti-counterfeiting material capabilities in existing technologies are solved, achieving higher liveness detection accuracy and hardware adaptability.

CN121747159APending Publication Date: 2026-03-27JIHAO TECHNOLOGY (TIANJIN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510942719.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, the liveness detection method for single-frame fingerprint images heavily relies on hardware parameters such as sensor model and screen transmittance, resulting in poor cross-hardware device compatibility and insufficient defense against highly realistic counterfeit materials.

Method used

The first fingerprint time sequence map is generated by acquiring multiple frames of original fingerprint images during the fingerprint enrollment stage, and the second fingerprint time sequence map is generated by acquiring multiple frames of original fingerprint images during the fingerprint authentication stage. These are then input into a pre-trained liveness detection model. Dynamic features are used to improve detection accuracy and enhance the model's adaptability to different hardware.

Benefits of technology

It improves the accuracy and generalization of liveness detection, and can train models without extensive data re-collection when faced with hardware changes, thus enhancing its adaptability to different hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121747159A_ABST
    Figure CN121747159A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a living body detection method, electronic equipment and a computer readable medium. The method comprises the steps that in the fingerprint authentication stage, a first image set and a second image set are obtained, the first image set comprises a first target fingerprint original image and a first fingerprint sequence diagram, the first fingerprint sequence diagram is generated based on multiple frames of first fingerprint original images obtained in the fingerprint input stage, the multiple frames of first fingerprint original images comprise the first target fingerprint original image, and the first target fingerprint original image is generated based on the first fingerprint sequence diagram; the second image set comprises a second target fingerprint original image and a second fingerprint time sequence image, the second fingerprint time sequence image is generated based on multiple frames of second fingerprint original images obtained in the fingerprint authentication stage, and the multiple frames of second fingerprint original images comprise the second target fingerprint original image; and inputting the first image set and the second image set into a pre-trained living body detection model to obtain a living body detection result. According to the embodiment, the accuracy of living body detection and the generalization of the living body detection model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to methods for detecting liveness, electronic devices, and computer-readable media. Background Technology

[0002] With the widespread application of optical under-display fingerprint recognition technology in the field of mobile device security authentication, the anti-counterfeiting capability of fingerprint recognition systems has become a key indicator for evaluating their security.

[0003] In existing technologies, liveness detection typically relies on the static features of a single-frame fingerprint image. This liveness detection method is heavily dependent on specific hardware parameters such as sensor model and screen transmittance, resulting in poor compatibility across hardware devices. Furthermore, by ignoring the dynamic features of the pressing process, it lacks sufficient defense against highly realistic counterfeit materials. Summary of the Invention

[0004] This application provides a liveness detection method, electronic device, and computer-readable medium that improve the accuracy of liveness detection and the generalization of liveness detection models.

[0005] In a first aspect, embodiments of this application provide a liveness detection method, the method comprising: during a fingerprint authentication stage, acquiring a first image set and a second image set, the first image set including a first target fingerprint original image and a first fingerprint timing image, the first fingerprint timing image being generated based on multiple frames of first fingerprint original images acquired during the fingerprint enrollment stage, the multiple frames of first fingerprint original images including the first target fingerprint original image; the second image set including a second target fingerprint original image and a second fingerprint timing image, the second fingerprint timing image being generated based on multiple frames of second fingerprint original images acquired during the fingerprint authentication stage, the multiple frames of second fingerprint original images including the second target fingerprint original image; and inputting the first image set and the second image set into a pre-trained liveness detection model to obtain a liveness detection result.

[0006] Secondly, embodiments of this application provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the methods described in the aspects.

[0007] Thirdly, embodiments of this application provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0009] The liveness detection method, electronic device, and computer-readable medium provided in this application, in the fingerprint authentication stage, firstly acquire a first image set and a second image set. The first image set includes a first target fingerprint original image and a first fingerprint timing image. The first fingerprint timing image is generated based on multiple frames of the first fingerprint original image acquired in the fingerprint enrollment stage, and the multiple frames of the first fingerprint original image include the first target fingerprint original image. The second image set includes a second target fingerprint original image and a second fingerprint timing image. The second fingerprint timing image is generated based on multiple frames of the second fingerprint original image acquired in the fingerprint authentication stage, and the multiple frames of the second fingerprint original image include the second target fingerprint original image. Then, the first image set and the second image set are input into a pre-trained liveness detection model to obtain a liveness detection result. On the one hand, since the first fingerprint timing image and the second fingerprint timing image input into the liveness detection model are generated based on multiple frames of the first fingerprint original image in the fingerprint enrollment stage and multiple frames of the second fingerprint original image in the fingerprint authentication stage, respectively, they contain the dynamic features of a live finger and the material to be tested in the fingerprint authentication stage, respectively. Since the dynamic changes during the pressing process of a live finger are difficult to simulate with counterfeit materials, the accuracy of liveness detection can be improved by introducing this dynamic feature. On the other hand, since the dynamic features in the first and second fingerprint timing maps are independent of hardware parameters, it is not necessary to re-collect a large amount of data for model training when faced with changes in parameters such as hardware modules or screen characteristics. This enhances the adaptability of the liveness detection model to different hardware and thus improves the generalization of the fingerprint detection model. Attached Figure Description

[0010] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0011] Figure 1 This is a flowchart illustrating an embodiment of the liveness detection method according to this application;

[0012] Figure 2 This is a flowchart of the liveness detection model training process according to this application;

[0013] Figure 3 This is a schematic diagram of the structure of one embodiment of the liveness detection device according to this application;

[0014] Figure 4 This is a schematic diagram of the structure of an electronic device used to implement the embodiments of this application. Detailed Implementation

[0015] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0016] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0017] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.

[0018] In recent years, biometric technology has been widely applied to various terminal devices and electronic devices. Biometric recognition technologies include, but are not limited to, fingerprint recognition, palmprint recognition, vein recognition, iris recognition, face recognition, liveness detection, and anti-counterfeiting technologies. Among them, fingerprint recognition typically includes optical fingerprint recognition, capacitive fingerprint recognition, and ultrasonic fingerprint recognition. With the rise of full-screen technology, fingerprint recognition modules can be placed in a partial or complete area under the display screen, thus forming under-display optical fingerprint recognition; alternatively, the optical fingerprint recognition module can be partially or completely integrated into the display screen of the electronic device, thus forming in-display optical fingerprint recognition. The aforementioned display screen can be an organic light-emitting diode (OLED) display or a liquid crystal display (LCD), etc. Fingerprint recognition methods typically include steps such as fingerprint image acquisition, preprocessing, feature extraction, and feature matching. Some or all of the above steps can be implemented using traditional computer vision (CV) algorithms or deep learning algorithms based on artificial intelligence (AI). Fingerprint recognition technology can be applied to portable or mobile terminals such as smartphones, tablets, and gaming devices, as well as other electronic devices such as smart door locks, cars, and bank ATMs, for fingerprint unlocking, fingerprint payment, fingerprint attendance, and fingerprint authentication.

[0019] Currently, liveness detection typically relies on static features from a single fingerprint image. This method is heavily dependent on specific hardware parameters such as sensor model and screen transmittance, resulting in poor cross-device compatibility. Furthermore, by ignoring the dynamic features of the pressing process, it lacks sufficient defense against highly realistic counterfeit materials. This application provides a liveness detection method that improves the accuracy and generalization of the liveness detection model.

[0020] Please refer to Figure 1This document illustrates a flow 100 of an embodiment of the liveness detection method according to this application. This liveness detection method can be applied to electronic devices. Electronic devices may include, but are not limited to, smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, in-vehicle computers, PDAs, desktop computers, set-top boxes, smart TVs, wearable devices, smart locks, etc.

[0021] This liveness detection method includes the following steps:

[0022] Step 101: In the fingerprint authentication stage, a first image set and a second image set are obtained. The first image set includes a first target fingerprint original image and a first fingerprint timing image. The first fingerprint timing image is generated based on multiple frames of the first fingerprint original image obtained in the fingerprint enrollment stage. The multiple frames of the first fingerprint original image include the first target fingerprint original image. The second image set includes a second target fingerprint original image and a second fingerprint timing image. The second fingerprint timing image is generated based on multiple frames of the second fingerprint original image obtained in the fingerprint authentication stage. The multiple frames of the second fingerprint original image include the second target fingerprint original image.

[0023] In this embodiment, the first image set can be generated during the fingerprint enrollment stage and includes the original image of the first target fingerprint, the first fingerprint image without substrate, and the first fingerprint timing image. The first image set is used for subsequent comparison with the second image set during the fingerprint authentication stage.

[0024] The first target fingerprint image is the original optical fingerprint image entered by the user during the fingerprint enrollment stage. Specifically, it can be one frame from multiple first fingerprint images acquired during the fingerprint enrollment stage, such as the last frame or the frame with the best quality, etc., without limitation. The first target fingerprint image contains features of a live fingerprint, such as fingerprint ridges, valleys, sweat pores, and other biometric features, as well as hardware noise.

[0025] The first fingerprint timing image is generated based on the aforementioned multiple frames of the original first fingerprint image. Specifically, it can be obtained by image fusion of multiple frames of the original first fingerprint image. Image fusion may include, but is not limited to, averaging the pixel values ​​of pixels at the same location, or weighted summing the pixel values ​​of pixels at the same location, etc., and is not specifically limited here. The first fingerprint timing image can reflect the dynamic changes of a living finger during the pressing process.

[0026] In this embodiment, the second fingerprint set can be generated during the fingerprint authentication stage, and includes the original image of the second target fingerprint, the second basalt-free fingerprint image, and the second fingerprint timing image. The second fingerprint set is used to compare with the first fingerprint set generated during the fingerprint enrollment stage to determine whether the fingerprint authentication request originates from a live fingerprint. In practice, fingerprint authentication can be performed in various scenarios, including but not limited to unlocking, payment, and login.

[0027] The second target fingerprint image is the original fingerprint image collected by the fingerprint module during the user's or attacker's fingerprint authentication attempt. Specifically, it can be one of the multiple frames of the second fingerprint image collected by the fingerprint module during the user's or attacker's fingerprint authentication attempt, such as the last frame image, the frame image with the best quality, etc., without limitation here.

[0028] The second fingerprint time sequence image is generated based on the aforementioned multiple frames of the original second fingerprint image. Specifically, it can be obtained by image fusion of multiple frames of the original second fingerprint image. Image fusion may include, but is not limited to, averaging the pixel values ​​of pixels at the same location, or weighted summing the pixel values ​​of pixels at the same location, etc., and is not specifically limited here. The second fingerprint time sequence image can reflect the dynamic characteristics of the fingerprint authentication process and helps to distinguish between liveness and attacks.

[0029] In some optional implementations of this embodiment, the first atlas can be generated through the following steps:

[0030] Step S11: During the fingerprint enrollment stage, multiple frames of the first fingerprint original image are acquired. Specifically, during the fingerprint enrollment stage, the user can press their finger on the fingerprint module or the display screen above the fingerprint module to continuously enroll multiple frames of the first fingerprint original image. For example, the user can use the same finger to enroll 5 frames of images, each frame being the same size. These images contain static features such as the texture, ridges, and valleys of the finger surface, reflecting the different states and details of the finger during the enrollment process.

[0031] Step S12: Determine the last frame of the first fingerprint original image from the multiple frames of first fingerprint original images as the first target fingerprint original image.

[0032] Step S13: Average the pixel values ​​of pixels at the same position in multiple frames of the original first fingerprint image to obtain the first fingerprint time sequence map.

[0033] Step S14: Combine the original image of the first target fingerprint and the timing image of the first fingerprint to generate the first image set.

[0034] By averaging the pixel values ​​of pixels at the same position in multiple frames of the original first fingerprint images to generate the first fingerprint time sequence map, multiple frames of the original first fingerprint images can be effectively fused. The first fingerprint time sequence map obtained after fusion can reflect the dynamic changes of live fingerprints, provide temporal dimension information for liveness detection, enrich fingerprint feature information, and improve the accuracy of liveness detection.

[0035] In some optional implementations of this embodiment, the first image set further includes a first substrate-removed fingerprint image. The first substrate-removed fingerprint image is an image generated after removing substrate noise from the original first target fingerprint image. Based on this, step S14 may further include the following steps:

[0036] Step S21: During the fingerprint enrollment stage, a first base image is acquired. The base image is an image acquired by the fingerprint module without finger pressure, reflecting information such as background noise and optical characteristics of the fingerprint module itself. The first base image is the base image acquired by the fingerprint module during the fingerprint enrollment stage.

[0037] Step S22: Based on the original target fingerprint image and the first substrate image, a first substrate-removed fingerprint image is generated. Specifically, the pixel values ​​of pixels at the same positions in the original target fingerprint image and the first substrate image are subtracted to obtain the first substrate-removed fingerprint image. The first substrate-removed fingerprint image can highlight fingerprint features and reduce the interference of hardware factors on fingerprint recognition.

[0038] Step S23: Summarize the original first target fingerprint image, the first base-removed fingerprint image, and the first fingerprint timing image to generate the first image set.

[0039] Understandably, in under-display fingerprint recognition scenarios, irrelevant information such as background noise and optical characteristics of the fingerprint module can interfere with fingerprint feature extraction. Acquiring a first substrate image without finger pressure, and generating a first substrate-removed fingerprint image based on the original target fingerprint image and the first substrate image, then inputting this image into the liveness detection model, allows the liveness detection model to take these irrelevant information into account during the liveness detection process, thereby improving the accuracy of liveness detection.

[0040] In some optional implementations of this embodiment, the above-mentioned second atlas can be generated through the following steps:

[0041] Step S31: During the fingerprint authentication phase, acquire multiple frames of the first fingerprint image. Specifically, during the fingerprint authentication phase, the user or attacker can repeatedly touch or press the fingerprint acquisition area multiple times, or continuously touch or press the fingerprint acquisition area and adjust the touch pressure or finger posture during the pressing process. The fingerprint module can acquire multiple frames of the second fingerprint image during this process.

[0042] Step S32: Determine the last frame of the second fingerprint original image from the multi-frame second fingerprint original image as the second target fingerprint original image.

[0043] Step S33: Average the pixel values ​​of pixels at the same position in multiple frames of the original second fingerprint image to obtain the second fingerprint time sequence map.

[0044] Step S34: Combine the original image of the second target fingerprint and the timing image of the second fingerprint to generate the second image set.

[0045] By averaging the pixel values ​​of pixels at the same position in multiple frames of the original second fingerprint images to generate a second fingerprint time sequence map, multiple frames of the original second fingerprint images can be effectively fused. The fused second fingerprint time sequence map can reflect the dynamic changes of the material under test during the fingerprint authentication process, providing temporal dimension information for liveness detection, enriching fingerprint feature information, and improving the accuracy of liveness detection.

[0046] In some optional implementations of this embodiment, the second image set further includes a second substrate-removed fingerprint image. The second substrate-removed fingerprint image is an image generated after removing substrate noise from the original second target fingerprint image. Based on this, step S34 may further include the following steps:

[0047] Step S41: During the fingerprint authentication phase, a second base image is acquired. The second base image is the base image acquired by the fingerprint module during the fingerprint authentication phase.

[0048] Step S42: Based on the original second target fingerprint image and the second base image, generate a second base-removed fingerprint image. Specifically, the pixel values ​​of pixels at the same positions in the original second target fingerprint image and the second base image can be subtracted to obtain the second base-removed fingerprint image.

[0049] Step S43: Summarize the original second target fingerprint image, the second baseless fingerprint image, and the second fingerprint timing image to generate the second image set.

[0050] Understandably, in under-display fingerprint recognition scenarios, irrelevant information such as background noise and optical characteristics of the fingerprint module can interfere with fingerprint feature extraction. Acquiring a second substrate image without finger pressure, and generating a second substrate-removed fingerprint image based on the original target fingerprint image and the second substrate image, then inputting this image into the liveness detection model, allows the liveness detection model to take these irrelevant information into account during the liveness detection process, thereby improving the accuracy of liveness detection.

[0051] Step 102: Input the first and second image sets into the pre-trained liveness detection model to obtain the liveness detection results.

[0052] In this embodiment, the liveness detection model is a model trained using machine learning methods for liveness detection. The liveness detection model receives a first image set and a second image set as input, analyzes the feature differences between the images, and thus determines whether the original fingerprint image of the second target is a live fingerprint image, thereby outputting a liveness detection result. The liveness detection result can be used to indicate whether the object currently requesting fingerprint authentication is alive. In practice, the liveness detection model can be obtained by training a model with classification capabilities.

[0053] Specifically, images from the first image set and images from the second image set can be stitched together along their channel dimensions to obtain a multi-channel image. This multi-channel image is then input into a pre-trained liveness detection model to obtain the liveness detection result.

[0054] As an example, the first image set includes the original image of the first target fingerprint, the first basal-removed fingerprint image, and the first fingerprint timing image; the second image set includes the original image of the second target fingerprint, the second basal-removed fingerprint image, and the second fingerprint timing image. Each image has a size of channel number × image height × image width, for example, 1 × 160 × 160. Therefore, after stitching the above six images along the channel dimension, the size is 6 × 160 × 160. Inputting the 6-channel image into the aforementioned liveness detection model yields the liveness detection result.

[0055] In some optional implementations of this embodiment, see [link to relevant documentation]. Figure 2 The liveness detection model can be trained through the following steps:

[0056] Step S51: Obtain the sample set.

[0057] Each sample in the sample set includes the target live fingerprint original image, the live fingerprint time sequence image, the target fingerprint to be tested original image, the fingerprint to be tested time sequence image, and annotation information. The live fingerprint time sequence image is generated based on multiple frames of live fingerprint original images entered by the user during the fingerprint enrollment stage. The multiple frames of live fingerprint original images include the target live fingerprint original image. The fingerprint to be tested time sequence image is generated based on multiple frames of fingerprint to be tested original images. The multiple frames of fingerprint to be tested original images include the target fingerprint to be tested original image. The annotation information indicates whether the target fingerprint to be tested original image is a live fingerprint image. For example, 1 indicates liveness, and 0 indicates an attack.

[0058] It should be noted that the methods for obtaining the original target live fingerprint image and the original target fingerprint image to be tested can refer to the methods for obtaining the first and second target fingerprint images described above; the methods for generating the live fingerprint timing map and the fingerprint timing map to be tested can refer to the methods for generating the first and second fingerprint timing maps described above. To avoid repetition, these will not be repeated here.

[0059] Step S52: Based on the sample set, a machine learning method is used to train the binary classification model to obtain the liveness detection model. The binary classification model can be a convolutional neural network, support vector machine, etc., and no specific limitation is made here.

[0060] During training, samples from the sample set are input one by one into the binary classification model to obtain the detection result output by the model. This detection result represents the probability that the fingerprint image being tested is a live fingerprint image. Then, based on the detection result and the annotation information of the input samples, a loss value can be determined. This loss value is the value of the loss function, a non-negative real-valued function used to characterize the difference between the detection result and the true result. Generally, the smaller the loss value, the better the robustness of the model. The loss function can be set according to actual needs. Afterwards, the parameters of the binary classification model can be updated using this loss value. Thus, with each input sample, the parameters of the binary classification model can be updated based on the loss value corresponding to that sample until training is complete.

[0061] In practice, training completion can be determined in several ways. For example, training can be considered complete when the accuracy of the detection results output by the binary classification model reaches a preset value (e.g., 99%). Another example is when the number of training iterations equals a preset number. Yet another example is when the loss value of the binary classification model converges. Here, if the binary classification model is successfully trained, it can be identified as a liveness detection model.

[0062] Because the liveness detection model incorporates both live fingerprint timing maps and test fingerprint timing maps during training—the live fingerprint timing map being generated from multiple frames of original live fingerprint images captured by the user during fingerprint enrollment, and the test fingerprint timing map being generated from multiple frames of original test fingerprint images—they both contain dynamic features of the live finger and the test material contacting or pressing the fingerprint acquisition area. By introducing these dynamic features, the liveness detection model can learn the dynamic changes during the pressing process of a live finger, which are difficult for forged materials to simulate, thereby improving the accuracy of liveness detection. Furthermore, since the dynamic features contained in the live fingerprint timing map and the test fingerprint timing map are independent of hardware parameters, it eliminates the need for extensive re-collection of data for model training when faced with changes in hardware modules or screen characteristics. This enhances the adaptability of the liveness detection model to different hardware, thereby improving the generalization ability of the fingerprint detection model.

[0063] In some optional implementations of this embodiment, the sample set includes time-series fingerprint images of different purities, where purity is the proportion of live fingerprint images in multiple frames of the original fingerprint images to be tested. For example, if all multiple frames of the original fingerprint images to be tested are live fingerprint images, then the purity of the time-series fingerprint image to be tested is 100%. As another example, if multiple frames of the original fingerprint images to be tested alternate between live and fake fingerprints, with half being live fingerprint images and half being attack material images, then the purity of the time-series fingerprint image to be tested is 50%. By introducing time-series fingerprint images of different purities into the sample set, the liveness detection model can learn the fingerprint feature variation patterns and statistical characteristics in complex situations such as the alternation of live and fake fingerprints. Therefore, when an attacker uses live fingers and attack materials alternately for fingerprint authentication, the liveness detection model can also make an accurate judgment, effectively improving the robustness and generalization ability of the liveness detection model.

[0064] In some optional implementations of this embodiment, each sample in the sample set further includes a liveness-based bare-base fingerprint and a bare-base fingerprint to be tested. The liveness-based bare-base fingerprint is generated by removing base noise from the original target liveness fingerprint image, and the bare-base fingerprint to be tested is generated by removing base noise from the original target fingerprint image. The method for removing base noise can be found in the descriptions of the above embodiments, and will not be repeated here to avoid repetition. By introducing the liveness-based bare-base fingerprint and the bare-base fingerprint to be tested during the training process of the liveness detection model, the liveness detection model can take into account information such as base noise during liveness detection, thereby improving the accuracy of liveness detection.

[0065] The method provided in the above embodiments of this application, in the fingerprint authentication stage, firstly acquires a first image set and a second image set. The first image set includes a first target fingerprint original image and a first fingerprint timing image. The first fingerprint timing image is generated based on multiple frames of the first fingerprint original image acquired in the fingerprint enrollment stage, and the multiple frames of the first fingerprint original image include the first target fingerprint original image. The second image set includes a second target fingerprint original image and a second fingerprint timing image. The second fingerprint timing image is generated based on multiple frames of the second fingerprint original image acquired in the fingerprint authentication stage, and the multiple frames of the second fingerprint original image include the second target fingerprint original image. Then, the first image set and the second image set are input into a pre-trained liveness detection model to obtain a liveness detection result. On the one hand, since the first fingerprint timing image and the second fingerprint timing image input into the liveness detection model are generated based on multiple frames of the first fingerprint original image in the fingerprint enrollment stage and multiple frames of the second fingerprint original image in the fingerprint authentication stage, respectively, they contain the dynamic features of a live finger and the material to be tested in the fingerprint authentication stage, respectively. Since it is difficult for counterfeit materials to simulate the dynamic changes during the pressing process of a live finger, the accuracy of liveness detection can be improved by introducing this dynamic feature. On the other hand, since the dynamic features in the first and second fingerprint timing maps are independent of hardware parameters, it is not necessary to re-collect a large amount of data for model training when faced with changes in parameters such as hardware modules or screen characteristics. This enhances the adaptability of the liveness detection model to different hardware and thus improves the generalization of the fingerprint detection model.

[0066] Further reference Figure 3 As an implementation of the methods shown in the above figures, this application provides an embodiment of a liveness detection device, which is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0067] like Figure 3 As shown, the liveness detection device 300 of this embodiment includes: an acquisition unit 301, used to acquire a first image set and a second image set during the fingerprint authentication stage. The first image set includes a first target fingerprint original image and a first fingerprint timing image. The first fingerprint timing image is generated based on multiple frames of first fingerprint original images acquired during the fingerprint enrollment stage. The multiple frames of first fingerprint original images include the first target fingerprint original image. The second image set includes a second target fingerprint original image and a second fingerprint timing image. The second fingerprint timing image is generated based on multiple frames of second fingerprint original images acquired during the fingerprint authentication stage. The multiple frames of second fingerprint original images include the second target fingerprint original image. A detection unit 302 is used to input the first image set and the second image set into a pre-trained liveness detection model to obtain a liveness detection result.

[0068] In some optional implementations of this embodiment, the first image set is generated through the following steps: during the fingerprint enrollment stage, multiple frames of the first fingerprint original image are acquired; the last frame of the first fingerprint original image in the multiple frames of the first fingerprint original image is determined as the first target fingerprint original image; the pixel values ​​of pixels at the same position in the multiple frames of the first fingerprint original image are averaged to obtain the first fingerprint time sequence image; the first target fingerprint original image and the first fingerprint time sequence image are summarized to generate the first image set.

[0069] In some optional implementations of this embodiment, the first image set further includes a first baseless fingerprint image; the first target fingerprint original image and the first fingerprint timing image are summarized to generate the first image set, including: acquiring a first base image during the fingerprint enrollment stage; generating the first baseless fingerprint image based on the first target fingerprint original image and the first base image; and summarizing the first target fingerprint original image, the first baseless fingerprint image, and the first fingerprint timing image to generate the first image set.

[0070] In some optional implementations of this embodiment, the second fingerprint set is generated through the following steps: during the fingerprint authentication stage, multiple frames of first fingerprint original images are acquired; the last frame of the multiple frames of second fingerprint original images is determined as the second target fingerprint original image; the pixel values ​​of pixels at the same position in the multiple frames of second fingerprint original images are averaged to obtain the second fingerprint timing map; the second target fingerprint original image and the second fingerprint timing map are summarized to generate the second fingerprint set.

[0071] In some optional implementations of this embodiment, the second fingerprint set further includes a second baseless fingerprint image; the second target fingerprint original image and the second fingerprint timing image are summarized to generate the second fingerprint set, including: in the fingerprint authentication stage, acquiring a second base image; generating a second baseless fingerprint image based on the second target fingerprint original image and the second base image; and summarizing the second target fingerprint original image, the second baseless fingerprint image, and the second fingerprint timing image to generate the second fingerprint set.

[0072] In some optional implementations of this embodiment, the liveness detection model is trained through the following steps: A sample set is obtained, where each sample includes a target live fingerprint original image, a live fingerprint time sequence image, a target fingerprint to be tested original image, a fingerprint to be tested time sequence image, and annotation information. The live fingerprint time sequence image is generated based on multiple frames of live fingerprint original images entered by the user during the fingerprint enrollment stage, and the multiple frames of live fingerprint original images include the target live fingerprint original image. The fingerprint to be tested time sequence image is generated based on multiple frames of fingerprint to be tested original images, and the multiple frames of fingerprint to be tested original images include the target fingerprint to be tested original image. The annotation information is used to indicate whether the target fingerprint to be tested original image is a live fingerprint image. Based on the sample set, a machine learning method is used to train a binary classification model to obtain the liveness detection model.

[0073] In some optional implementations of this embodiment, the sample set includes time-series images of fingerprints to be tested with different purities, where the purity is the proportion of live fingerprint images in the multiple frames of original fingerprint images to be tested.

[0074] In some optional implementations of this embodiment, each sample in the sample set further includes a live-substrate-removed fingerprint and a target-substrate-removed fingerprint. The live-substrate-removed fingerprint is generated by removing substrate noise from the original target live fingerprint image, and the target-substrate-removed fingerprint is generated by removing substrate noise from the original target-to-be-tested fingerprint image.

[0075] The apparatus provided in the above embodiments of this application, since the first fingerprint timing map and the second fingerprint timing map input to the liveness detection model are generated based on multiple frames of the first fingerprint original image during the fingerprint enrollment stage and multiple frames of the second fingerprint original image during the fingerprint authentication stage, respectively, contain the dynamic features of the live finger and the test material during the fingerprint authentication stage. Because the dynamic changes during the pressing process of a live finger are difficult to simulate with counterfeit materials, the accuracy of liveness detection can be improved by introducing these dynamic features. Furthermore, since the dynamic features in the first and second fingerprint timing maps are independent of hardware parameters, it is not necessary to re-collect a large amount of data for model training when facing changes in parameters such as hardware modules or screen characteristics. This enhances the adaptability of the liveness detection model to different hardware, thereby improving the generalization of the fingerprint detection model.

[0076] This application also provides an electronic device, including one or more processors and a storage device storing one or more programs thereon. When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described liveness detection method.

[0077] The following is for reference. Figure 4 It shows a schematic diagram of the structure of an electronic device used to implement some embodiments of this application. Figure 4The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this application.

[0078] like Figure 4 As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.

[0079] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, disks, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 4 Each box shown can represent a device or multiple devices as needed.

[0080] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described liveness detection method.

[0081] In particular, according to some embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined above in the methods of some embodiments of this application.

[0082] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the above-described liveness detection method.

[0083] It should be noted that the computer-readable medium described in some embodiments of this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0084] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0085] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: during the fingerprint authentication phase, acquire a first image set and a second image set, the first image set including a first target fingerprint original image and a first fingerprint timing image, the first fingerprint timing image being generated based on multiple frames of first fingerprint original images acquired during the fingerprint enrollment phase, the multiple frames of first fingerprint original images including the first target fingerprint original image; the second image set including a second target fingerprint original image and a second fingerprint timing image, the second fingerprint timing image being generated based on multiple frames of second fingerprint original images acquired during the fingerprint authentication phase, the multiple frames of second fingerprint original images including the second target fingerprint original image; and input the first image set and the second image set into a pre-trained liveness detection model to obtain a liveness detection result.

[0086] Computer program code for performing operations of some embodiments of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++; and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, or it can be connected to an external computer (e.g., via the Internet using an Internet service provider), including local area networks (LANs) or wide area networks (WANs).

[0087] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0088] The units described in some embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first determining unit, a second determining unit, a selecting unit, and a third determining unit. The names of these units do not necessarily limit the specific unit itself.

[0089] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0090] The above description is merely a selection of preferred embodiments of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this application.

Claims

1. A method for detecting liveness, characterized in that, The method includes: During the fingerprint authentication phase, a first image set and a second image set are acquired. The first image set includes a first target fingerprint original image and a first fingerprint timing image. The first fingerprint timing image is generated based on multiple frames of the first fingerprint original image acquired during the fingerprint enrollment phase. The multiple frames of the first fingerprint original image include the first target fingerprint original image. The second image set includes a second target fingerprint original image and a second fingerprint timing image. The second fingerprint timing image is generated based on multiple frames of the second fingerprint original image acquired during the fingerprint authentication phase. The multiple frames of the second fingerprint original image include the second target fingerprint original image. The first and second image sets are input into a pre-trained liveness detection model to obtain liveness detection results.

2. The method according to claim 1, characterized in that, The first atlas was generated through the following steps: During the fingerprint enrollment stage, multiple frames of the original first fingerprint image are acquired; The last frame of the first fingerprint original image in the multi-frame first fingerprint original image is determined as the first target fingerprint original image; The pixel values ​​of pixels at the same position in the multiple frames of the original first fingerprint image are averaged to obtain the first fingerprint time sequence image. The first target fingerprint original image and the first fingerprint time sequence image are combined to generate the first image set.

3. The method according to claim 2, characterized in that, The first image set also includes a first substrate-removed fingerprint image; the first target fingerprint original image and the first fingerprint timing image are summarized to generate the first image set, including: During the fingerprint enrollment stage, a first substrate image is acquired; Based on the first target fingerprint original image and the first substrate image, the first substrate-removed fingerprint image is generated; The first target fingerprint original image, the first baseless fingerprint image, and the first fingerprint timing image are summarized to generate the first image set.

4. The method according to claim 1, characterized in that, The second atlas was generated through the following steps: During the fingerprint authentication phase, multiple frames of the original first fingerprint image are acquired; The last frame of the multi-frame second fingerprint original image is determined as the second target fingerprint original image; The pixel values ​​of pixels at the same position in the multiple frames of the original second fingerprint image are averaged to obtain the second fingerprint timing map; The original image of the second target fingerprint and the timing image of the second fingerprint are combined to generate the second image set.

5. The method according to claim 4, characterized in that, The second image set also includes a second substrate-free fingerprint image; The original image of the second target fingerprint and the timing image of the second fingerprint are combined to generate the second image set, including: During the fingerprint authentication phase, a second base image is acquired; Based on the original target fingerprint image and the second substrate image, the second substrate-removed fingerprint image is generated; The second target fingerprint original image, the second baseless fingerprint image, and the second fingerprint timing image are combined to generate the second image set.

6. The method according to any one of claims 1-5, characterized in that, The liveness detection model is trained through the following steps: A sample set is obtained, and each sample in the sample set includes a target live fingerprint original image, a live fingerprint time sequence image, a target fingerprint to be tested original image, a fingerprint to be tested time sequence image, and annotation information. The live fingerprint time sequence image is generated based on multiple frames of live fingerprint original images entered by the user during the fingerprint enrollment stage. The multiple frames of live fingerprint original images include the target live fingerprint original image. The fingerprint time sequence image to be tested is generated based on multiple frames of fingerprint original images to be tested. The multiple frames of fingerprint original images to be tested include the target fingerprint original image. The annotation information is used to indicate whether the target fingerprint original image to be tested is a live fingerprint image. Based on the sample set, a machine learning method is used to train the binary classification model to obtain the liveness detection model.

7. The method according to claim 6, characterized in that, The sample set includes time-series images of fingerprints to be tested with different purities, where purity is the proportion of live fingerprint images in the original images of the multiple frames of fingerprints to be tested.

8. The method according to claim 6, characterized in that, Each sample in the sample set also includes a live-substrate-removed fingerprint and a target-substrate-removed fingerprint. The live-substrate-removed fingerprint is generated by removing substrate noise from the original target live-substrate fingerprint, and the target-substrate-removed fingerprint is generated by removing substrate noise from the original target-to-be-tested fingerprint.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method as claimed in any one of claims 1-8.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-8.