Lightweight fingerprint living body detection method and device, computer equipment and storage medium

By deploying a dual-model architecture on the MCU, utilizing compression and segmentation techniques, and combining global contour and local texture feature discrimination, the problem of high-precision fingerprint liveness detection under MCU resource constraints is solved, thus improving anti-counterfeiting capabilities.

CN121354178APending Publication Date: 2026-01-16SHENZHEN ARATEK BIOMETRICS TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511193822.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Existing fingerprint liveness detection technologies struggle to achieve high-accuracy model deployment due to the stringent computing power and memory limitations of MCUs, and the loss of input information also leads to a decline in anti-counterfeiting capabilities.

Method used

A dual-model architecture is adopted. The first lightweight liveness detection model focuses on the global contour features of the compressed image, while the second lightweight liveness detection model focuses on the local texture details of the sub-block image. The fingerprint image is compressed to a preset resolution and divided into non-overlapping sub-block images, which are then judged separately. The results of the two models are combined to make a decision.

Benefits of technology

It significantly reduces memory usage, meets MCU resource constraints, enhances the ability to resist highly realistic forgery attacks on embedded devices, and achieves high-precision fingerprint liveness detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121354178A_ABST
    Figure CN121354178A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight fingerprint living body detection method and device, computer equipment and a storage medium, and relates to the technical field of fingerprint detection, a first lightweight living body detection model and a second lightweight living body detection model are deployed in an MCU, and the method comprises the following steps: collecting a fingerprint image to be detected; compressing the fingerprint image to a preset resolution to obtain a compressed image, and segmenting the fingerprint image to obtain a plurality of non-overlapping sub-block images; inputting the compressed image into a first lightweight living body detection model to obtain a first discrimination result of the fingerprint image; inputting each sub-block image into a second lightweight in-vivo detection model to obtain a discrimination result of each sub-block image, and determining a second discrimination result of the fingerprint image based on the in-vivo discrimination result of each sub-block image; and the fingerprint living body state of the fingerprint image is determined based on the first judgment result and the second judgment result of the fingerprint image, so that high-precision judgment of fingerprint living body detection can be realized under the harsh computing power and memory limitation of an MCU (Microprogrammed Control Unit).
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of fingerprint detection, and in particular to a lightweight fingerprint living body detection method and device, computer equipment and a storage medium. BACKGROUND

[0002] With the wide application of biometric technology, fingerprint recognition has become the mainstream means of identity verification due to its convenience and uniqueness. However, the traditional fingerprint recognition system is vulnerable to malicious attacks by fake fingerprints (such as silicone finger molds, high-definition printed images, etc.), and there is a serious security risk. To deal with such threats, fingerprint living body detection technology has emerged as the times require, and its core is to distinguish real human tissue from fake materials by analyzing the biological characteristic attributes of fingerprints (such as blood flow, sweat glands, texture elasticity, etc.). In recent years, living body detection algorithms based on deep learning have gradually become the mainstream solution in the industry due to their excellent discrimination ability.

[0003] In the environment of a host computer (such as a server, a smart phone) with sufficient computing resources, such algorithms usually use mature general deep learning network architectures (such as lightweight models such as MobileNet-V3, ShuffleNet, etc.), and rely on high-performance inference frameworks (such as TensorFlow, ncnn, etc.) to achieve efficient operation. These models are trained with a large number of real and fake fingerprint samples, and can capture subtle texture differences, material reflectance characteristics, and physiological dynamic features, thereby achieving high living body discrimination accuracy. Such solutions have achieved remarkable results in scenarios where computing power and memory resources are not limited, effectively improving the anti-fake ability of the system.

[0004] However, with the popularity of Internet of Things devices, a large number of low-cost embedded devices (such as smart door locks, attendance terminals, portable payment devices, etc.) need to integrate fingerprint living body detection functions to enhance security. Such devices generally use microcontroller units (MCU) as the core processor, which has fundamental limitations in hardware conditions: the computing power of the MCU is extremely limited, usually only with megahertz-level main frequency and single-core architecture, which cannot support the intensive calculations such as matrix multiplication required by general deep learning models. In addition, the dependence of mainstream deep learning inference frameworks on operating systems and runtime libraries further increases the complexity of deployment on MCUs in bare machine environments.

[0005] The prior art attempts to adapt the MCU by simplifying the model structure or reducing the input resolution, but this often leads to the loss of key discriminative features: if the fingerprint image is forcibly compressed to an extremely low resolution, although the memory limit can be met, the micro-texture details and local gradient information of the fingerprint are severely degraded in the compression process, making it difficult for the model to distinguish high-simulation fake fingerprints; if an attempt is made to retain the original image area, the memory requirement immediately overflows and the system cannot run. Therefore, the current technical route is caught in a dilemma: sacrificing discriminative accuracy for operability, or giving up deployability to maintain algorithm performance.

[0006] In summary, the core technical problem faced by the existing fingerprint liveness detection technology is: how to realize the deployment of a fingerprint liveness detection model with high discriminative accuracy under the severe computing power and memory limitations of an MCU, while avoiding the decline in anti-fake ability caused by the loss of input information. SUMMARY

[0007] Embodiments of the present application provide a lightweight fingerprint liveness detection method, device, computer equipment and storage medium, aiming to solve the problem of how to realize the deployment of a fingerprint liveness detection model with high discriminative accuracy under the severe computing power and memory limitations of an MCU, while avoiding the decline in anti-fake ability caused by the loss of input information.

[0008] In a first aspect, embodiments of the present application provide a lightweight fingerprint liveness detection method, wherein a first lightweight liveness detection model and a second lightweight liveness detection model are deployed in an MCU, and the method comprises:

[0009] acquiring a fingerprint image to be detected;

[0010] compressing the fingerprint image to a preset resolution to obtain a compressed image, and splitting the fingerprint image to obtain a plurality of non-overlapping sub-block images;

[0011] inputting the compressed image into the first lightweight liveness detection model to obtain a first discriminative result of the fingerprint image;

[0012] inputting each of the sub-block images into the second lightweight liveness detection model to obtain a discriminative result of each of the sub-block images, and determining a second discriminative result of the fingerprint image based on the liveness discriminative results of the sub-block images;

[0013] determining a fingerprint liveness state of the fingerprint image based on the first discriminative result and the second discriminative result of the fingerprint image.

[0014] A further technical solution is that the training process of the first lightweight liveness detection model comprises:

[0015] obtaining an initial sample training set, wherein the initial sample training set comprises an initial fingerprint sample image labeled;

[0016] compressing the initial fingerprint sample image to a preset resolution to obtain a compressed fingerprint sample image, wherein a first sample training set is constructed based on the compressed fingerprint sample image;

[0017] training a preset lightweight deep learning network based on the first sample training set to obtain the first lightweight living body detection model.

[0018] A further technical solution is that the training process of the second lightweight living body detection model includes:

[0019] splitting the initial fingerprint sample image to obtain a plurality of non-overlapping sub-block sample images, wherein a second sample training set is constructed based on the sub-block sample images;

[0020] training a preset lightweight deep learning network based on the second sample training set to obtain the second lightweight living body detection model.

[0021] A further technical solution is that the method further includes:

[0022] converting the first lightweight living body detection model and the second lightweight living body detection model into inference codes implemented in C language through a code generation tool, wherein model parameters of the first lightweight living body detection model are written into a header file of the inference code of the first lightweight living body detection model, and model parameters of the second lightweight living body detection model are written into a header file of the inference code of the second lightweight living body detection model;

[0023] compiling the inference codes and the header files of the first lightweight living body detection model and the second lightweight living body detection model into the MCU.

[0024] A further technical solution is that the splitting the fingerprint image to obtain a plurality of non-overlapping sub-block images includes:

[0025] uniformly splitting the fingerprint image into a plurality of non-overlapping sub-block images, wherein the resolution of each sub-block image is the preset resolution.

[0026] A further technical solution is that the living body discrimination result of the sub-block image includes pass and fail, and the determining the second discrimination result of the fingerprint image based on the living body discrimination result of each sub-block image includes:

[0027] calculating a proportion of the living body discrimination result of each sub-block image being pass;

[0028] if the proportion is greater than a preset proportion threshold, determining that the second discrimination result of the fingerprint image is pass;

[0029] If the proportion is not greater than a preset proportion threshold, it is determined that the second discrimination result of the fingerprint image is failed.

[0030] A further technical solution is that the fingerprint image is determined based on the first discrimination result and the second discrimination result of the fingerprint image.

[0031] If the first discrimination result and the second discrimination result of the fingerprint image are both passed, it is determined that the fingerprint image is a live fingerprint.

[0032] If any one or both of the first discrimination result and the second discrimination result of the fingerprint image is failed, it is determined that the fingerprint image is a non-live fingerprint.

[0033] In a second aspect, the embodiments of the present application further provide a lightweight fingerprint live detection device, which comprises units for executing the above method.

[0034] In a third aspect, the embodiments of the present application further provide a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the above method.

[0035] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the above method.

[0036] The embodiment of the present application provides a kind of lightweight fingerprint living body detection method, device, computer equipment and storage medium. Wherein, first lightweight living body detection model and second lightweight living body detection model are deployed in MCU, the method includes: the fingerprint image to be detected is collected;The fingerprint image is compressed to preset resolution, and compressed image is obtained, and the fingerprint image is split, and a plurality of non-overlapping sub-block images are obtained;The compressed image is input into the first lightweight living body detection model, and the first discrimination result of the fingerprint image is obtained;Each sub-block image is input into the second lightweight living body detection model, and the discrimination result of each sub-block image is obtained, and the second discrimination result of the fingerprint image is determined based on the living body discrimination result of each sub-block image;The first discrimination result and the second discrimination result of the fingerprint image are determined based on the fingerprint image, and the fingerprint living body state of the fingerprint image is determined.The present application can significantly reduce the memory occupation by compressing the fingerprint image to preset resolution and splitting the image into a plurality of non-overlapping sub-block images, and meet the stringent restrictions of MCU.The first lightweight living body detection model focuses on extracting global contour features from compressed image to identify overall morphological abnormalities, while the second lightweight living body detection model focuses on local texture details of sub-block image to identify material authenticity.Finally, the discrimination results of the two are fused to make decisions, and the complementarity of the double models is utilized to form cross-validation mechanism, which significantly improves the ability to resist high-simulation counterfeit attacks on embedded devices, thereby realizing high-precision fingerprint living body detection in MCU environment with limited resources. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0038] Figure 1 A flowchart of a lightweight fingerprint living body detection method provided by the embodiment of the present application is shown in the figure.

[0039] Figure 2 A schematic block diagram of a computer device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0041] It should be understood that the terms "comprises" and "comprising," when used in this specification and the following claims, indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0042] It should also be understood that the terms used in the specification of the application herein are used for the purpose of describing particular embodiments only and are not intended to limit the application. As used in the specification and the appended claims of the application, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0043] It should further be understood that the term "and / or" used in the specification of the application and the appended claims means one or more of the associated listed items as well as all possible combinations of the items and includes the combinations.

[0044] As used in the specification and the appended claims of the application, the term "if' can be interpreted as meaning "when" or "once" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be interpreted to mean "once determined" or "in response to a determination" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.

[0045] Referring to Figure 1 The embodiments of the application provide a lightweight fingerprint living body detection method. In the embodiments of the application, a first lightweight living body detection model and a second lightweight living body detection model are deployed in an MCU in advance. The first lightweight living body detection model and the second lightweight living body detection model can run on the MCU. In order to better illustrate the technical solutions of the application, first, the training and deployment of the first lightweight living body detection model and the second lightweight living body detection model are described as follows.

[0046] The training process of the first lightweight living body detection model includes the following steps: obtaining an initial sample training set, the initial sample training set including labeled initial fingerprint sample images; compressing the initial fingerprint sample images to a preset resolution to obtain compressed fingerprint sample images, wherein a first sample training set is constructed based on the compressed fingerprint sample images; training a preset lightweight deep learning network based on the first sample training set to obtain the first lightweight living body detection model.

[0047] In a specific implementation, the initial sample training set can use a general fingerprint image training set on the Internet or be collected by a person skilled in the art, and the present application is not specifically limited. The initial sample training set includes a large number of initial fingerprint sample images labeled (specifically labeled as living or non-living).

[0048] The lightweight deep learning network is a kind of neural network architecture specially designed for resource-constrained environments (such as MCU, mobile device), and the core goal is to significantly reduce the amount of calculation, parameter and memory occupation on the premise of maintaining high accuracy. This kind of network replaces traditional convolution and other heavy operations through innovative structure design, and realizes the balance of efficiency and performance. The lightweight deep learning network may be, for example, MobileNet, ShuffleNet, etc., and the present application is not specifically limited, and further, the lightweight deep learning network can be pruned, compressed, etc. according to the computing power of the MCU to further reduce its computing power requirement, and the present application is not specifically limited.

[0049] Further, the initial fingerprint sample image is compressed to a preset resolution to obtain a compressed fingerprint sample image, and the preset resolution is, for example, 96x96, which can be set according to the computing power of the MCU, and the present application is not specifically limited.

[0050] Further, the first lightweight living body detection model is obtained by training the preset lightweight deep learning network through the first sample training set. For example, under 96x96 pixels, the macrostructure of the fingerprint (such as core point, triangular region shape) can still be identified, while the counterfeit fingerprint often causes deformation of these areas due to manufacturing process defects (such as mold bubbles). The first lightweight living body detection model can establish a strong association between contour abnormalities and living body state by training a large number of compressed fingerprint sample images, such as identifying counterfeit traces such as rough edges and shape breaks.

[0051] Since the training data and inference data are homologous (both are compressed images), the first lightweight living body detection model does not need to be additionally adapted when deployed, avoiding the accuracy decline caused by the difference in input distribution. At the same time, the lightweight network structure (such as MobileNet) further reduces the dependence on sample size, so that the first lightweight living body detection model can efficiently converge on a small-scale data set, improving the accuracy of discrimination.

[0052] Further, the training process of the second lightweight living body detection model includes the following steps: the initial fingerprint sample image is divided to obtain a plurality of non-overlapping sub-block sample images, wherein a second sample training set is constructed based on the sub-block sample images; and a second lightweight living body detection model is obtained by training a preset lightweight deep learning network based on the second sample training set.

[0053] In specific implementation, the initial fingerprint sample image is divided to obtain a plurality of non-overlapping sub-block sample images, each sub-block sample image has the same resolution, for example, 96*96, which can be set according to the computing power of MCU, and the present application does not specifically limit it.

[0054] Further, a second sample training set is constructed based on the sub-block sample images, and a preset lightweight deep learning network is trained based on the second sample training set to obtain a second lightweight living body detection model.

[0055] In the embodiment of the present application, the second lightweight living body detection model is trained by the second sample training set, so that the second lightweight living body detection model focuses on the microscopic features of the local area of the fingerprint image. For example, the real skin has a unique gradient change around the sweat gland pore, while the printed counterfeit shows a uniform color block; the dermal ridge line has a natural irregular twist, while the 3D printed counterfeit shows a mechanical repeating pattern. The model can capture such subtle differences through independent learning of the sub-block sample image.

[0056] Further, the sub-block sample image is not compressed, and all the details information collected by the original sensor is retained, avoiding the loss of fingerprint information due to image compression. Each sub-block sample image is regarded as an independent sample, which enhances the sensitivity of the model to local counterfeit attacks (such as only part of the area is replaced). In addition, the uniform division strategy makes the model not need to pre-position the attention area, reduces the algorithm complexity, and is more suitable for the real-time requirement of MCU.

[0057] Further, the deployment process of the first lightweight living body detection model and the second lightweight living body detection model in MCU includes the following steps: the first lightweight living body detection model and the second lightweight living body detection model are respectively converted into inference code implemented in C language by a code generation tool, wherein the model parameters of the first lightweight living body detection model are written into the header file of the inference code of the first lightweight living body detection model, and the model parameters of the second lightweight living body detection model are written into the header file of the inference code of the second lightweight living body detection model; the inference code and the header file of the first lightweight living body detection model and the second lightweight living body detection model are compiled into the MCU.

[0058] In a specific implementation, the code generation tool, for example, an eAI tool, is not specifically limited in the present application. By converting the trained first lightweight living body detection model and the second lightweight living body detection model into C language implemented inference code through the code generation tool, respectively, and writing the model parameters of the first lightweight living body detection model and the second lightweight living body detection model into the header files of the corresponding inference code, respectively, and finally compiling the inference code and the header files of the first lightweight living body detection model and the second lightweight living body detection model into the MCU, the deployment of the first lightweight living body detection model and the second lightweight living body detection model is completed.

[0059] In the present application, the model is converted into C language implemented inference code through the code generation tool (such as eAI), so that the algorithm can run on the MCU in a bare machine environment. For example, the convolution operation is decomposed into loop and accumulation operation, which is implemented by pure C code without external library support.

[0060] The model parameters are written into the header file and stored in the form of constant array, and are directly embedded into the MCU firmware during compilation. This converts the model parameters from dynamic loading to static storage, saves the RAM overhead (without runtime loading of model weights), and at the same time improves the data access speed (constant array is stored in Flash, and is directly addressed through pointer). For example, the original model weight of 200KB is reduced to 50KB after INT8 quantization, and is directly compiled into Flash, only a few KB of RAM is used for inference intermediate variables, which meets the resource limitation of low-end MCU (such as STM32F4 series).

[0061] Further, the present application embodiment proposes a lightweight fingerprint living body detection method, comprising the following steps:

[0062] S1, collecting a fingerprint image to be detected.

[0063] In a specific implementation, the fingerprint image to be detected can be collected by a fingerprint collection device, for example, a fingerprint instrument, an access control device, a clock-in device, etc., and the present application is not specifically limited thereto.

[0064] S2, compressing the fingerprint image to a preset resolution to obtain a compressed image, and cutting the fingerprint image to obtain a plurality of non-overlapping sub-block images.

[0065] In a specific implementation, the preset resolution can be set based on the computing power of the MCU, for example, set to 96x96, and the present application is not specifically limited thereto. Further, the fingerprint image is cut to obtain a plurality of non-overlapping sub-block images, and the resolution of each sub-block image can be set based on the computing power of the MCU, for example, set to 96x96, and the present application is not specifically limited thereto.

[0066] In the present application, by compressing the input of the first lightweight living body detection model to a preset resolution fingerprint image (such as 96*96 pixels), the data volume is reduced to the range that can be carried by the MCU memory, avoiding the memory overflow caused by the large image in the traditional scheme; the second lightweight living body detection model uses the sub-block image obtained by dividing the original image as the input, and each sub-block image can maintain the same resolution as the compressed image, so that the model only needs to allocate the storage space of a single block image when processing, further reducing the instantaneous memory peak.

[0067] In some preferred embodiments, the above step "segmenting the fingerprint image to obtain a plurality of non-overlapping sub-block images" specifically comprises the following steps: uniformly segmenting the fingerprint image into a plurality of non-overlapping sub-block images, wherein the resolution of each sub-block image is the preset resolution.

[0068] In specific implementation, the fingerprint image is uniformly segmented into a plurality of sub-block images with a preset resolution (such as 96*96), ensuring that each block contains sufficient texture information. For example, the fingerprint ridge line period is about 20-50 pixels, and the 96*96 sub-block can accommodate 2-4 complete ridge lines, which is sufficient to analyze the local trend and breaking point.

[0069] Further, the non-overlapping segmentation method avoids repeated calculation, and the uniform grid division does not require complex positioning algorithms (such as key point detection), further saving MCU computing power.

[0070] S3, inputting the compressed image into the first lightweight living body detection model to obtain the first discrimination result of the fingerprint image.

[0071] In specific implementation, the compressed image is input into the first lightweight living body detection model to obtain the first discrimination result of the fingerprint image. The first discrimination result includes pass and fail.

[0072] In the present application, the first lightweight living body detection model focuses on the global contour features in the compressed image: although the reduced resolution causes the micro texture to be blurred, the overall shape, edge continuity and core area structure of the fingerprint are still retained, so that the first lightweight living body detection model can identify the shape distortion (such as edge burr, contour breakage, etc.) commonly seen in fake fingerprints.

[0073] S4, respectively inputting each sub-block image into the second lightweight living body detection model to obtain the discrimination result of each sub-block image, and determining the second discrimination result of the fingerprint image based on the living body discrimination result of each sub-block image.

[0074] In specific implementation, each sub-block image is input into the second lightweight living body detection model to obtain the discrimination result of each sub-block image, and the discrimination result of the sub-block image includes pass and fail.

[0075] Further, a second discrimination result of the fingerprint image is determined based on the living body discrimination results of the sub-block images. The second discrimination result includes pass and fail.

[0076] The second lightweight living body detection model focuses on local detail features of the sub-block images. Since the sub-block images are not compressed, biological features such as ridge line direction, sweat pore distribution and material reflection characteristics collected by the original sensor are completely retained, so that the model can detect high-fidelity counterfeit materials (such as mechanical repeatability of silicone film texture, gradient distortion of paper printing, etc.).

[0077] In the present application, the division detection strategy of the first lightweight living body detection model and the second lightweight living body detection model essentially decouples the two tasks of "macroscopic morphology discrimination" and "microscopic material analysis", avoiding feature confusion caused by information loss of a single model.

[0078] In some preferred embodiments, the living body discrimination results of the sub-block images include pass and fail in the step of "determining a second discrimination result of the fingerprint image based on the living body discrimination results of the sub-block images", which specifically includes the following steps: calculating the proportion of the living body discrimination results of the sub-block images being pass; if the proportion is greater than a preset proportion threshold, determining that the second discrimination result of the fingerprint image is pass; if the proportion is not greater than the preset proportion threshold, determining that the second discrimination result of the fingerprint image is fail.

[0079] In specific implementation, by counting the proportion of the sub-block image discrimination results being "pass" (such as more than 6 / 9 being living body), local area misjudgment is allowed. For example, real fingers may cause individual sub-block images to be misjudged as "fail" due to dry cracking and stains, but most sub-block images can still correctly identify living body features; and high-fidelity counterfeit fingerprints can fake some areas, but it is difficult to completely simulate skin texture on all sub-blocks (such as the difference in texture density between the fingertips and the palm).

[0080] The proportion threshold mechanism can flexibly adjust the security level. For example, in a financial scenario, a high threshold (≥8 / 9) is set to sacrifice a small amount of pass rate to improve the anti-fake strength; in a civilian scenario, a low threshold (≥5 / 9) is set to balance user experience and security. This design avoids over-sensitivity of the model to a single sub-block, and enhances the stability of the system in actual complex environments (such as wear of some areas of the finger).

[0081] S5, determining a fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image.

[0082] In specific implementation, the fingerprint living body state of the fingerprint image is determined based on the first discrimination result and the second discrimination result of the fingerprint image.

[0083] In the present application, the anti-counterfeiting reliability can be significantly improved through the synergistic fusion determination of the results of the two models. When the first lightweight liveness detection model determines as live based on the contour feature (for example, the shape conforms to the natural fingerprint), the second lightweight liveness detection model can perform secondary verification from the texture dimension (for example, detecting whether there is a non-biological material characteristic in the local area); on the contrary, if the counterfeit fingerprint breaks through the texture detection (such as part of the sub-block simulation succeeds), the contour anomaly may still trigger the alarm of the first lightweight liveness detection model. This double verification mechanism greatly improves the attack threshold and can resist various types of counterfeit means. At the same time, since the first lightweight liveness detection model and the second lightweight liveness detection model run independently, their error probabilities are not related to each other, and the overall false recognition rate of the system decreases geometrically, while the lightweight design ensures that this gain does not sacrifice real-time performance.

[0084] In some preferred embodiments, the above step of “determining the liveness state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image” specifically includes the following steps: if the first discrimination result and the second discrimination result of the fingerprint image are both passed, it is determined that the fingerprint image is a live fingerprint; if any one or both of the first discrimination result and the second discrimination result of the fingerprint image is not passed, it is determined that the fingerprint image is a non-live fingerprint.

[0085] In specific implementation, strict AND gate logic (both results passed to determine live fingerprint) is used to maximize the anti-counterfeiting capability. For example, when the counterfeit fingerprint breaks through the contour detection (the first lightweight liveness detection model fails), the texture detection (the second lightweight liveness detection model) can still be intercepted; on the contrary, if the texture is imitated, the contour anomaly will also trigger an alarm. Both models need to be deceived at the same time to be successful in the attack, which significantly improves the counterfeit threshold.

[0086] Further, the strategy of rejecting any failure prioritizes safety, which is especially suitable for high-risk scenarios such as payment and access control. Although false rejection may occur due to extreme conditions (such as a severely damaged true fingerprint), which can prompt the user to re-collect the fingerprint and does not cause too much impact on the user, compared with the risk of missing a counterfeit fingerprint, this design is more in line with the core needs of security products. At the same time, the independent running of the two models can be processed in parallel, and the decision delay only depends on the slower single-model inference time, which does not significantly increase the total time consumption.

[0087] The embodiment of the present application provides a lightweight fingerprint living body detection method, a first lightweight living body detection model and a second lightweight living body detection model are arranged in an MCU, and the method comprises the following steps: collecting a fingerprint image to be detected; compressing the fingerprint image to a preset resolution to obtain a compressed image, and cutting the fingerprint image to obtain a plurality of non-overlapping sub-block images; inputting the compressed image into the first lightweight living body detection model to obtain a first discrimination result of the fingerprint image; inputting each sub-block image into the second lightweight living body detection model respectively to obtain a discrimination result of each sub-block image, and determining a second discrimination result of the fingerprint image based on the living body discrimination results of the sub-block images; and determining a fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image. By compressing the fingerprint image to the preset resolution and cutting the image into a plurality of non-overlapping sub-block images, the memory occupation can be significantly reduced, and the strict restriction of the MCU is met. The first lightweight living body detection model focuses on extracting global contour features from the compressed image to identify overall morphological abnormalities, and the second lightweight living body detection model focuses on local texture details of the sub-block image to identify material authenticity. Finally, the discrimination results of the two models are fused to make a decision, the complementarity of the double models is utilized to form a cross-validation mechanism, the ability of resisting high-simulation fake attacks on the embedded device is significantly improved, and therefore high-precision fingerprint living body detection is realized in the MCU environment with limited resources.

[0088] Corresponding to the above lightweight fingerprint living body detection method, the present application also provides a lightweight fingerprint living body detection device. The lightweight fingerprint living body detection device comprises units for executing the above lightweight fingerprint living body detection method, and the lightweight fingerprint living body detection device can be configured in a desktop computer, a tablet computer, a laptop computer, and the like. Specifically, the lightweight fingerprint living body detection device comprises:

[0089] A collection unit is configured to collect a fingerprint image to be detected.

[0090] A preprocessing unit is configured to compress the fingerprint image to a preset resolution to obtain a compressed image, and cut the fingerprint image to obtain a plurality of non-overlapping sub-block images.

[0091] A first discrimination unit is configured to input the compressed image into the first lightweight living body detection model to obtain a first discrimination result of the fingerprint image.

[0092] A second discrimination unit is configured to input each sub-block image into the second lightweight living body detection model respectively to obtain a discrimination result of each sub-block image, and determine a second discrimination result of the fingerprint image based on the living body discrimination results of the sub-block images.

[0093] The determining unit is configured to determine a fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image.

[0094] In some preferred embodiments, the training process of the first lightweight living body detection model comprises:

[0095] An initial sample training set is obtained, and the initial sample training set comprises annotated initial fingerprint sample images.

[0096] The initial fingerprint sample images are compressed to a preset resolution to obtain compressed fingerprint sample images, and a first sample training set is constructed based on the compressed fingerprint sample images.

[0097] A preset lightweight deep learning network is trained based on the first sample training set to obtain the first lightweight living body detection model.

[0098] In some preferred embodiments, the training process of the second lightweight living body detection model comprises:

[0099] The initial fingerprint sample images are segmented to obtain a plurality of non-overlapping sub-block sample images, and a second sample training set is constructed based on the sub-block sample images.

[0100] A preset lightweight deep learning network is trained based on the second sample training set to obtain the second lightweight living body detection model.

[0101] In some preferred embodiments, the lightweight fingerprint living body detection device further comprises:

[0102] The converting unit is configured to convert the first lightweight living body detection model and the second lightweight living body detection model into inference codes implemented in C language respectively by a code generation tool, wherein model parameters of the first lightweight living body detection model are written into a header file of the inference code of the first lightweight living body detection model, and model parameters of the second lightweight living body detection model are written into a header file of the inference code of the second lightweight living body detection model.

[0103] The compiling unit is configured to compile the inference codes and the header files of the first lightweight living body detection model and the second lightweight living body detection model into the MCU.

[0104] In some preferred embodiments, the segmentation of the fingerprint image to obtain a plurality of non-overlapping sub-block images comprises:

[0105] The fingerprint image is uniformly segmented into a plurality of non-overlapping sub-block images, and a resolution of each of the sub-block images is the preset resolution.

[0106] In some preferred embodiments, the living body discrimination result of each of the sub-block images includes pass and fail, and the determining the second discrimination result of the fingerprint image based on the living body discrimination result of each of the sub-block images includes:

[0107] calculating a proportion of the sub-block images whose living body discrimination result is pass;

[0108] if the proportion is greater than a preset proportion threshold, determining that the second discrimination result of the fingerprint image is pass;

[0109] if the proportion is not greater than the preset proportion threshold, determining that the second discrimination result of the fingerprint image is fail.

[0110] In some preferred embodiments, the determining the fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image includes:

[0111] if the first discrimination result and the second discrimination result of the fingerprint image are both pass, determining that the fingerprint image is a living body fingerprint;

[0112] if any one or both of the first discrimination result and the second discrimination result of the fingerprint image is fail, determining that the fingerprint image is a non-living body fingerprint.

[0113] It should be noted that the specific implementation process of the above lightweight fingerprint living body detection device and each unit can be clearly understood by those skilled in the art, which can be referred to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be repeated here.

[0114] The above lightweight fingerprint living body detection device can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 2 .

[0115] Please refer to Figure 2 , Figure 2 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server, wherein the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and an electronic device with a communication function. The server can be a stand-alone server or a server cluster composed of multiple servers.

[0116] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.

[0117] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, can cause the processor 502 to perform a lightweight fingerprint liveness detection method.

[0118] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.

[0119] The non-volatile storage medium 503 provides an environment for the computer program 5032 to run. The computer program 5032, when executed by the processor 502, can cause the processor 502 to perform a lightweight fingerprint liveness detection method.

[0120] The network interface 505 is configured to perform network communication with other devices. Those skilled in the art can understand that the above structure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:

[0122] Collecting a fingerprint image to be detected;

[0123] Compressing the fingerprint image to a preset resolution to obtain a compressed image, and splitting the fingerprint image to obtain a plurality of non-overlapping sub-block images;

[0124] Inputting the compressed image into the first lightweight liveness detection model to obtain a first discrimination result of the fingerprint image;

[0125] Respectively inputting each of the sub-block images into the second lightweight liveness detection model to obtain a discrimination result of each of the sub-block images, and determining a second discrimination result of the fingerprint image based on the liveness discrimination results of the sub-block images;

[0126] Determining a fingerprint liveness state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image.

[0127] In some preferred embodiments, the training process of the first lightweight liveness detection model comprises:

[0128] Obtaining an initial sample training set, the initial sample training set comprising labeled initial fingerprint sample images;

[0129] compress the initial fingerprint sample image to a preset resolution to obtain a compressed fingerprint sample image, wherein a first sample training set is constructed based on the compressed fingerprint sample image;

[0130] train a preset lightweight deep learning network based on the first sample training set to obtain the first lightweight living body detection model.

[0131] In some preferred embodiments, the training process of the second lightweight living body detection model comprises:

[0132] split the initial fingerprint sample image to obtain a plurality of non-overlapping sub-block sample images, wherein a second sample training set is constructed based on the sub-block sample images;

[0133] train a preset lightweight deep learning network based on the second sample training set to obtain the second lightweight living body detection model.

[0134] In some preferred embodiments, the method further comprises:

[0135] convert the first lightweight living body detection model and the second lightweight living body detection model into inference codes implemented in C language respectively by a code generation tool, wherein model parameters of the first lightweight living body detection model are written into a header file of the inference code of the first lightweight living body detection model, and model parameters of the second lightweight living body detection model are written into a header file of the inference code of the second lightweight living body detection model;

[0136] compile the inference codes and the header files of the first lightweight living body detection model and the second lightweight living body detection model into the MCU.

[0137] In some preferred embodiments, the splitting the fingerprint image to obtain a plurality of non-overlapping sub-block images comprises:

[0138] uniformly split the fingerprint image into a plurality of non-overlapping sub-block images, wherein the resolution of each sub-block image is the preset resolution.

[0139] In some preferred embodiments, the living body discrimination result of the sub-block image comprises pass and fail, and the determination of the second discrimination result of the fingerprint image based on the living body discrimination result of each sub-block image comprises:

[0140] calculate the proportion of the living body discrimination result of each sub-block image being pass;

[0141] if the proportion is greater than a preset proportion threshold, determine that the second discrimination result of the fingerprint image is pass;

[0142] If the proportion is not greater than a preset proportion threshold, it is determined that a second discrimination result of the fingerprint image is failed.

[0143] In some preferred embodiments, determining the fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image comprises:

[0144] If the first discrimination result and the second discrimination result of the fingerprint image are both passed, it is determined that the fingerprint image is a living body fingerprint.

[0145] If any one or both of the first discrimination result and the second discrimination result of the fingerprint image is failed, it is determined that the fingerprint image is a non-living body fingerprint.

[0146] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and the processor 502 can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0147] It can be understood by those skilled in the art that all or part of the processes in the method of the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the above-mentioned method embodiments.

[0148] Therefore, the present application also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the following steps:

[0149] Acquiring a fingerprint image to be detected;

[0150] Compressing the fingerprint image to a preset resolution to obtain a compressed image, and splitting the fingerprint image to obtain a plurality of non-overlapping sub-block images;

[0151] Inputting the compressed image into the first lightweight living body detection model to obtain a first discrimination result of the fingerprint image;

[0152] inputting each of the sub-block images into the second lightweight living body detection model respectively to obtain a discrimination result of each of the sub-block images, and determining a second discrimination result of the fingerprint image based on the living body discrimination result of each of the sub-block images;

[0153] determining a fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image.

[0154] In some preferred embodiments, the training process of the first lightweight living body detection model comprises:

[0155] obtaining an initial sample training set, wherein the initial sample training set comprises annotated initial fingerprint sample images;

[0156] compressing the initial fingerprint sample images to a preset resolution to obtain compressed fingerprint sample images, wherein a first sample training set is constructed based on the compressed fingerprint sample images;

[0157] training a preset lightweight deep learning network based on the first sample training set to obtain the first lightweight living body detection model.

[0158] In some preferred embodiments, the training process of the second lightweight living body detection model comprises:

[0159] segmenting the initial fingerprint sample images to obtain a plurality of non-overlapping sub-block sample images, wherein a second sample training set is constructed based on the sub-block sample images;

[0160] training a preset lightweight deep learning network based on the second sample training set to obtain the second lightweight living body detection model.

[0161] In some preferred embodiments, the method further comprises:

[0162] converting the first lightweight living body detection model and the second lightweight living body detection model into inference codes implemented in C language respectively by a code generation tool, wherein model parameters of the first lightweight living body detection model are written into a header file of the inference code of the first lightweight living body detection model, and model parameters of the second lightweight living body detection model are written into a header file of the inference code of the second lightweight living body detection model;

[0163] compiling the inference codes and the header files of the first lightweight living body detection model and the second lightweight living body detection model into the MCU.

[0164] In some preferred embodiments, the segmenting the fingerprint image to obtain a plurality of non-overlapping sub-block images comprises:

[0165] uniformly split the fingerprint image into a plurality of non-overlapping sub-block images, wherein a resolution of each of the sub-block images is the preset resolution.

[0166] In some preferred embodiments, the living body discrimination result of each of the sub-block images comprises pass and fail, and the determining the second discrimination result of the fingerprint image based on the living body discrimination result of each of the sub-block images comprises:

[0167] calculating a proportion of the living body discrimination result of each of the sub-block images being pass;

[0168] if the proportion is greater than a preset proportion threshold, determining that the second discrimination result of the fingerprint image is pass;

[0169] if the proportion is not greater than the preset proportion threshold, determining that the second discrimination result of the fingerprint image is fail.

[0170] In some preferred embodiments, the determining the fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image comprises:

[0171] if the first discrimination result and the second discrimination result of the fingerprint image are both pass, determining that the fingerprint image is a living body fingerprint;

[0172] if any one or both of the first discrimination result and the second discrimination result of the fingerprint image is fail, determining that the fingerprint image is a non-living body fingerprint.

[0173] The storage medium is an entity, non-transient storage medium, for example, can be a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk or an optical disk, and various entity storage media that can store program codes. The computer readable storage medium can be non-volatile or volatile.

[0174] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0175] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. For example, the division of the units is merely a logical function division. 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 a possible implementation process, the steps of the described method can be performed in a different order, or can be omitted, or can be combined into another process, or can be implemented with other technical solutions.

[0176] The steps in the method embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the apparatus embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0177] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.

[0178] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0179] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, these modifications and variations of the present application are intended to be included within the scope of the present application, and the present application is intended to include these modifications and variations.

[0180] The above description is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any modifications or replacements within the technical scope disclosed by the present application can be easily thought by those skilled in the art, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A lightweight liveness detection method, characterized in that, The MCU is deployed with a first lightweight living body detection model and a second lightweight living body detection model, and the method comprises: Collecting a fingerprint image to be detected; Compressing the fingerprint image to a preset resolution to obtain a compressed image, and splitting the fingerprint image to obtain a plurality of non-overlapping sub-block images; Inputting the compressed image into the first lightweight living body detection model to obtain a first discrimination result of the fingerprint image; Respectively inputting each sub-block image into the second lightweight living body detection model to obtain a discrimination result of each sub-block image, and determining a second discrimination result of the fingerprint image based on the living body discrimination result of each sub-block image; Determining a fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image.

2. The lightweight liveness detection method of claim 1, wherein, The training process of the first lightweight living body detection model comprises: Obtaining an initial sample training set, wherein the initial sample training set comprises an initial fingerprint sample image labeled; Compressing the initial fingerprint sample image to a preset resolution to obtain a compressed fingerprint sample image, wherein a first sample training set is constructed based on the compressed fingerprint sample image; Training a preset lightweight deep learning network based on the first sample training set to obtain the first lightweight living body detection model.

3. The lightweight liveness detection method of claim 2, wherein, The training process of the second lightweight living body detection model comprises: Splitting the initial fingerprint sample image to obtain a plurality of non-overlapping sub-block sample images, wherein a second sample training set is constructed based on the sub-block sample images; Training a preset lightweight deep learning network based on the second sample training set to obtain the second lightweight living body detection model.

4. The lightweight liveness detection method of claim 3, wherein, The method further comprises: Converting the first lightweight living body detection model and the second lightweight living body detection model into inference codes implemented in C language by a code generation tool, wherein model parameters of the first lightweight living body detection model are written into a header file of the inference code of the first lightweight living body detection model, and model parameters of the second lightweight living body detection model are written into a header file of the inference code of the second lightweight living body detection model; Compiling the inference codes and the header files of the first lightweight living body detection model and the second lightweight living body detection model into the MCU.

5. The lightweight liveness detection method of claim 1, wherein, The splitting of the fingerprint image to obtain a plurality of non-overlapping sub-block images comprises: Uniformly splitting the fingerprint image into a plurality of non-overlapping sub-block images, wherein the resolution of each sub-block image is the preset resolution.

6. The lightweight liveness detection method of claim 1, wherein, The living body discrimination result of the sub-block image comprises pass and fail, and the determination of the second discrimination result of the fingerprint image based on the living body discrimination result of each sub-block image comprises: Calculating the proportion of the living body discrimination result of each sub-block image as pass; If the proportion is greater than a preset proportion threshold, determining that the second discrimination result of the fingerprint image is pass; If the proportion is not greater than the preset proportion threshold, determining that the second discrimination result of the fingerprint image is fail.

7. The lightweight liveness detection method of claim 1, wherein, The determination of the fingerprint living body state of the fingerprint image based on the first discrimination result and the second discrimination result of the fingerprint image comprises: If the first discrimination result and the second discrimination result of the fingerprint image are both passed, it is determined that the fingerprint image is a live fingerprint; If any one or both of the first discrimination result and the second discrimination result of the fingerprint image is not passed, it is determined that the fingerprint image is a non-live fingerprint.

8. A lightweight liveness detection device, characterized in that, The method comprises the following steps: acquiring a first image of a fingerprint image; acquiring a second image of the fingerprint image; determining a first discrimination result of the fingerprint image according to the first image; determining a second discrimination result of the fingerprint image according to the second image; and determining whether the fingerprint image is a live fingerprint or a non-live fingerprint according to the first discrimination result and the second discrimination result.

9. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1-7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program can implement the method according to any one of claims 1-7 when being executed by a processor. The storage medium stores a computer program, and the computer program can implement the method according to any one of claims 1-7 when being executed by a processor.

Citation Information

Patent Citations

  • Fingerprint identification method and device and computer readable storage medium

    CN109766738A

  • Living body detection method and device and computer readable storage medium

    CN110765924A

  • Face liveness detection method and apparatus, and electronic device

    IN201947018209A

  • Method and apparatus for extracting biological features, device, medium, and program product

    US20230095182A1