Liveness detection methods and systems

By acquiring images in multiple spectral bands and fusing features from material recognition and liveness detection models, the accuracy and user experience issues of liveness detection under high-precision head model attacks are solved, achieving efficient and low-perturbation liveness detection.

CN116152937BActive Publication Date: 2026-05-26ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2023-02-16
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing liveness detection methods suffer from poor user experience and reduced detection performance when faced with high-precision head model attacks, and cannot effectively distinguish between real users and high-precision head models.

Method used

By acquiring images of target users across multiple spectral bands, and utilizing material recognition and liveness detection models, material features and liveness features are fused to identify user material features to assist in liveness detection, thereby improving detection accuracy and user experience.

Benefits of technology

It improves the detection accuracy of high-precision head model attacks, reduces the disturbance to users, and is suitable for various liveness detection scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116152937B_ABST
    Figure CN116152937B_ABST
Patent Text Reader

Abstract

The liveness detection method and system provided in this specification obtains the spectral images of the target user in K spectral bands, and after obtaining a multispectral image set, inputs the multispectral image set into a material recognition model to obtain the fused material features and liveness material probability of the target user. When the liveness material probability is greater than a preset liveness material probability threshold, liveness detection is performed on the multispectral image set based on the fused material features to obtain the liveness detection result of the target user, and the liveness detection result is output. This scheme can improve the detection performance of liveness detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of liveness detection, and more particularly to a liveness detection method and system. Background Technology

[0002] In recent years, with the rapid development of internet technology, liveness detection has become an indispensable part of facial recognition systems, effectively intercepting non-liveness attack samples. While continuous advancements in liveness detection computation have enabled efficient detection of common liveness attacks, challenges remain with high-precision head-mounted attacks. Existing liveness detection methods for these high-precision head-mounted attacks often employ multi-action interaction or multimodal data for liveness detection.

[0003] In the process of researching and practicing existing technologies, the inventors of this application discovered that in liveness detection based on multi-action interaction, compared with other types of attacks, users need to complete more actions, which makes the user cooperation time longer and cannot be applied to scenarios with high failure effects. In addition, in liveness detection based on multimodal data, the more modalities there are, the higher the detection rate of high-precision head modalities. However, with the increase of modalities, the disturbance rate to users will also increase significantly. Therefore, under the premise of ensuring user experience, the detection performance of liveness detection will be reduced. Summary of the Invention

[0004] This manual provides a more accurate method and system for liveness detection.

[0005] In a first aspect, this specification provides a liveness detection method, comprising: obtaining spectral images of a target user in K spectral bands to obtain a multispectral image group, wherein K is a positive integer greater than 1; inputting the multispectral image group into a material recognition model to obtain fused material features and liveness material probability of the target user; and when the liveness material probability is greater than a preset liveness material probability threshold, performing liveness detection on the multispectral image group based on the fused material features to obtain a liveness detection result of the target user, and outputting the liveness detection result.

[0006] In some embodiments, obtaining the spectral images of the target user in K spectral bands to obtain a multispectral image group includes: uniformly sampling K spectral bands in a preset spectral range, wherein the spectral distance between adjacent spectral bands in the K spectral bands is the same; and acquiring images of the target user in the K spectral bands to obtain K spectral images corresponding to the K spectral bands, and using the K spectral images as the multispectral image group.

[0007] In some embodiments, the preset spectral range includes the infrared to ultraviolet spectral range.

[0008] In some embodiments, the value range of K includes [20, 50].

[0009] In some embodiments, the training process of the material recognition model includes the following steps: obtaining a first multispectral image sample group, the multispectral image sample group including K first spectral image samples corresponding to the K spectral bands; inputting the first multispectral image sample group into a preset material recognition model to obtain an image material feature set and a predicted material category; and based on the image material feature set and the predicted material category, converging the preset material recognition model to obtain the trained material recognition model.

[0010] In some embodiments, the preset material recognition model includes a first feature encoding network, a multispectral relationship prediction network, and a material prediction network. The step of inputting the first multispectral image sample group into the preset material recognition model to obtain an image material feature set and a predicted material category includes: inputting the first multispectral image sample group into the first feature encoding network to obtain sample image material features corresponding to each of the K first spectral image samples, wherein the sample image material features characterize the response intensity of the user material in the first multispectral image sample group on different spectral bands; inputting the sample image material features into the multispectral relationship prediction network to obtain candidate sample image material features corresponding to adjacent spectral bands, wherein the adjacent spectral bands are spectral bands adjacent to the spectral band corresponding to the sample image material features; inputting the sample image material features corresponding to the K first spectral image samples into the material prediction network to obtain fused sample material features and the predicted material category corresponding to the fused sample material features; and using the sample image material features and the candidate sample image material features as the image material feature set.

[0011] In some embodiments, the step of converging the preset material recognition model to obtain the trained material recognition model includes: obtaining the labeled material categories of the first multispectral image sample group, and comparing the labeled material categories with the predicted material categories to obtain material classification loss information; obtaining a first feature difference between the material features of the candidate sample images in the image material feature set and the material features of the sample images in the corresponding spectral band, and determining feature regression loss information based on the first feature difference; and fusing the material classification loss information and the feature regression loss information, and converging the preset material recognition model based on the fused material recognition loss information to obtain the material recognition model.

[0012] In some embodiments, after inputting the multispectral image group into the material recognition model to obtain the fused material features and liveness probability of the target user, the method further includes: determining the target user as an attacking user when the liveness probability is less than the preset liveness probability threshold; and using the attacking user as the liveness detection result of the target user and outputting the liveness detection result.

[0013] In some embodiments, performing liveness detection on the multispectral image group to obtain the liveness detection result of the target user includes: extracting features from the multispectral image group using a liveness detection model to obtain liveness features for each spectral image in the multispectral image group; fusing the liveness features to obtain fused liveness features corresponding to the multispectral image group; and classifying the target user based on the fused liveness features and the fused material features to obtain the liveness detection result of the target user.

[0014] In some embodiments, the step of performing liveness classification on the target user to obtain the liveness detection result of the target user includes: determining the attack probability of the target user based on the fused liveness feature and the fused material feature; and determining the liveness detection result of the target user as an attacking user when the attack probability is greater than a preset attack probability threshold.

[0015] In some embodiments, the method further includes: when the attack probability is less than the preset attack probability threshold, determining that the target user's liveness detection result is a live user.

[0016] In some embodiments, the training process of the liveness detection model includes the following steps: obtaining a second multispectral image sample group and inputting the second multispectral image sample group into the material recognition model to obtain the target fused material features corresponding to the second multispectral image sample group; inputting the target fused material features and the second multispectral image sample group into a preset liveness detection model to obtain the predicted fused material features and the predicted liveness category set corresponding to the second multispectral image sample group; and converging the preset liveness detection model based on the predicted fused material features, the target fused material features, and the predicted liveness category set to obtain the trained liveness detection model.

[0017] In some embodiments, the preset liveness detection model includes a second feature encoding network, a feature fusion network, a diverse fusion detection network, and a decoupling learning network; the second multispectral image sample group includes K second spectral image samples corresponding to the K spectral bands; and the step of inputting the target fused material feature and the second multispectral image sample group into the preset liveness detection model to obtain the predicted fused material feature and the predicted liveness category set corresponding to the second multispectral image sample group includes: inputting the second multispectral image sample group into the second feature encoding network to obtain the sample liveness feature corresponding to each of the K second spectral image samples; inputting the sample liveness feature into the feature fusion network to obtain the sample fused liveness feature corresponding to the second multispectral image sample group and the first predicted liveness category corresponding to the sample fused liveness feature; inputting the sample fused liveness feature and the target fused material feature into the diverse fusion detection network to obtain the second predicted liveness category corresponding to the second multispectral image sample group; and using the first predicted liveness category and the second predicted liveness category as the predicted liveness category set; and inputting the sample fused liveness feature into the decoupling learning network to obtain the predicted fused material feature.

[0018] In some embodiments, the convergence of the preset liveness detection model to obtain the trained liveness detection model includes: obtaining the labeled liveness categories corresponding to the second multispectral image sample group, and comparing the labeled liveness categories with the predicted liveness categories in the predicted liveness category set to obtain liveness classification loss information; comparing the target fused material features with the predicted fused material features to obtain decoupling loss information, wherein the constraint condition of the decoupling loss information is that the second feature difference between the predicted fused material features and the target fused material features is greater than a preset feature difference threshold; and fusing the liveness classification loss information and the decoupling loss information, and converging the preset liveness detection model based on the fused liveness detection loss information to obtain the liveness detection model.

[0019] In some embodiments, comparing the labeled liveness category with the predicted liveness category in the predicted liveness category set to obtain liveness classification loss information includes: comparing the labeled liveness category with a first predicted liveness category to obtain first initial liveness classification loss information; comparing the labeled liveness category with a second predicted liveness category to obtain second initial liveness classification loss information; and fusing the first initial liveness classification loss information and the second initial liveness classification loss information to obtain the liveness classification loss information.

[0020] In some embodiments, comparing the labeled liveness category with the predicted liveness categories in the predicted liveness category set to obtain liveness classification loss information includes: comparing the labeled liveness category with a first predicted liveness category to obtain first initial liveness classification loss information; comparing the labeled liveness category with a second predicted liveness category to obtain second initial liveness classification loss information; comparing the first predicted liveness category with the second predicted liveness category to obtain prediction consistency loss information; and fusing the first initial liveness classification loss information, the second initial liveness classification loss information, and the prediction consistency loss information to obtain the liveness classification loss information.

[0021] Secondly, this specification also provides a liveness detection system, comprising: at least one storage medium storing at least one instruction set for performing liveness detection; and at least one processor communicatively connected to the at least one storage medium, wherein, when the liveness detection system is running, the at least one processor reads the at least one instruction set and executes the liveness detection method described in the first aspect of this specification according to the instructions of the at least one instruction set.

[0022] As can be seen from the above technical solutions, the liveness detection method and system provided in this specification, after obtaining the spectral images of the target user in K spectral bands and obtaining a multispectral image group, inputs the multispectral image group into a material recognition model to obtain the fused material features and liveness material probability of the target user. When the liveness material probability is greater than a preset liveness material probability threshold, liveness detection is performed on the multispectral image group based on the fused material features to obtain the liveness detection result of the target user and output the liveness detection result. Since this solution identifies the user material and material features corresponding to each region in the image based on the difference in multispectral response between the attacking user and the live user in the detection of high-precision head-mounted attacks, and then performs liveness detection on the multispectral image group of the target user based on the material features as auxiliary detection information when the user material has the risk of attack material, it can not only identify high-precision head-mounted attacks more efficiently and accurately, but also can be deployed in various liveness detection scenarios with a lower disturbance rate to users. Therefore, it can improve the detection performance of liveness detection.

[0023] Other functions of the liveness detection methods and systems provided in this specification will be partially listed in the following description. The figures and examples described below will be readily apparent to those skilled in the art. The inventive aspects of the liveness detection methods and systems provided in this specification can be fully understood through practice or use of the methods, apparatus, and combinations described in the detailed examples below. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A schematic diagram illustrating an application scenario of a liveness detection system provided according to an embodiment of this specification is shown.

[0026] Figure 2 A hardware structure diagram of a computing device provided according to an embodiment of this specification is shown;

[0027] Figure 3 A flowchart of a liveness detection method according to an embodiment of this specification is shown;

[0028] Figure 4 A schematic diagram illustrating the overall process of liveness detection in a face recognition scenario according to embodiments of this specification is shown; and

[0029] Figure 5 A schematic flowchart of a multispectral liveness detection process for a target user is shown according to an embodiment of this specification. Detailed Implementation

[0030] The following description provides specific application scenarios and requirements for this specification, intended to enable those skilled in the art to make and use the contents of this specification. Various partial modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but rather to the widest scope consistent with the claims.

[0031] The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not restrictive. For example, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. When used in this specification, the terms “comprising,” “including,” and / or “containing” mean that the associated integers, steps, operations, elements, and / or components are present, but do not exclude the presence of one or more other features, integers, steps, operations, elements, components, and / or groups, or that other features, integers, steps, operations, elements, components, and / or groups may be added to the system / method.

[0032] Considering the following description, these and other features of this specification, as well as the operation and function of the related components of the structure, and the economy of assembly and manufacture of the parts, can be significantly improved. All of these form part of this specification with reference to the accompanying drawings. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.

[0033] The flowcharts used in this specification illustrate operations implemented according to some embodiments of this specification. It should be clearly understood that the operations in the flowcharts may not be implemented in a sequential order. Instead, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.

[0034] For ease of description, the terms that will appear in the following descriptions will be explained as follows:

[0035] Multispectral imaging: Using specialized imaging equipment, data from users can be collected in multiple spectral bands (such as infrared, visible light, ultraviolet, etc.).

[0036] Material analysis: This refers to determining the material of different regions of an image based on the image itself. There can be various types of materials, such as living material and attack material (non-living material). The living material can include materials corresponding to skin or real biological features, while the attack material can include materials corresponding to paper, masks, screens, or other attack types, and so on.

[0037] Liveness detection (liveness attack prevention): refers to the technology of using artificial intelligence models to detect and intercept liveness attacks. There are many types of liveness attacks, such as mobile phone screens, printed paper, masks or high-precision head molds, etc.

[0038] High-precision head molds: These are head molds made at high cost. They are almost indistinguishable from real people under visible light, NIR and other spectra, and can even blink, open their mouths or perform other interactive actions.

[0039] Before describing the specific embodiments in this specification, the application scenarios of this specification will be introduced as follows:

[0040] The liveness detection method provided in this manual can be applied to any liveness detection scenario. For example, in a face payment scenario, the liveness detection method in this manual can be used to perform liveness detection on the collected face image of the user to be paid; in an identity verification scenario, the liveness detection method in this manual can be used to perform liveness detection on the collected identity image of the user; it can also be applied to any face recognition scenario, which will not be elaborated here.

[0041] Those skilled in the art should understand that the liveness detection methods and systems described in this specification are also within the scope of protection of this specification when applied to other application scenarios.

[0042] Figure 1 This diagram illustrates an application scenario of a liveness detection system 001 provided according to an embodiment of this specification. The liveness detection system 001 (hereinafter referred to as System 001) can be applied to liveness detection in any scenario, such as liveness detection in face payment scenarios, liveness detection in identity verification scenarios, liveness detection in face recognition scenarios, etc. Figure 1 As shown, system 001 may include user 100, client 200, server 300, and network 400.

[0043] User 100 can be the user who triggers the liveness detection of the target user. User 100 can perform the liveness detection operation on client 200. User 100 can be the target user or other users.

[0044] Client 200 can be a device for performing liveness detection on a target user in response to a liveness detection operation by user 100. In some embodiments, the liveness detection method can be executed on client 200. In this case, client 200 may store data or instructions for executing the liveness detection method described herein, and may execute or be used to execute said data or instructions. In some embodiments, client 200 may include a hardware device with data processing capabilities and the necessary programs required to drive the hardware device to operate. Figure 1As shown, client 200 can communicate with server 300. In some embodiments, server 300 can communicate with multiple clients 200. In some embodiments, client 200 can interact with server 300 through network 400 to receive or send messages, such as receiving or sending multimodal image groups of a target user. In some embodiments, client 200 may include mobile devices, tablets, laptops, built-in devices in motor vehicles, or similar content, or any combination thereof. In some embodiments, the mobile device may include smart home devices, smart mobile devices, virtual reality devices, augmented reality devices, or similar devices, or any combination thereof. In some embodiments, the smart home device may include smart TVs, desktop computers, or any combination thereof. In some embodiments, the smart mobile device may include smartphones, personal digital assistants, gaming devices, navigation devices, or any combination thereof. In some embodiments, the virtual reality device or augmented reality device may include virtual reality headsets, virtual reality glasses, virtual reality controllers, augmented reality headsets, augmented reality glasses, augmented reality controllers, or similar content, or any combination thereof. For example, the virtual reality device or the augmented reality device may include Google Glass, head-mounted displays, VR, etc. In some embodiments, the built-in device in the motor vehicle may include an in-vehicle computer, an in-vehicle TV, etc. In some embodiments, the client 200 may include an image acquisition device for acquiring spectral images of the target user in K spectral bands, thereby obtaining a multispectral image set. In some embodiments, the image acquisition device may be a two-dimensional image acquisition device (such as an RGB camera), or a combination of a two-dimensional image acquisition device (such as an RGB camera) and a depth image acquisition device (such as a 3D structured light camera, a laser detector, etc.), or it may be a multispectral image acquisition device corresponding to multiple spectra. In some embodiments, the client 200 may be a device with positioning technology for locating the position of the client 200.

[0045] In some embodiments, the client 200 may have one or more applications (APPs) installed. The APPs provide the user 100 with the ability and interface to interact with the outside world via the network 400. The APPs include, but are not limited to: web browser APPs, search APPs, chat APPs, shopping APPs, video APPs, financial management APPs, instant messaging tools, email clients, social media platform software, etc. In some embodiments, a target APP may be installed on the client 200. The target APP can acquire spectral images of the target user in K spectral bands for the client 200, thereby obtaining a multispectral image set. In some embodiments, the user 100 can also trigger a liveness detection request through the target APP. The target APP can respond to the liveness detection request and execute the liveness detection method described in this specification. The liveness detection method will be described in detail later.

[0046] Server 300 may be a server providing various services, such as a backend server supporting liveness detection of multispectral image sets acquired on client 200. In some embodiments, the liveness detection method may be executed on server 300. In this case, server 300 may store data or instructions for executing the liveness detection method described herein, and may execute or be used to execute said data or instructions. In some embodiments, server 300 may include hardware devices with data processing capabilities and the necessary programs required to drive the hardware devices. Server 300 may communicate with multiple clients 200 and receive data sent by clients 200.

[0047] Network 400 serves as a medium to provide a communication connection between client 200 and server 300. Network 400 facilitates the exchange of information or data. For example... Figure 1 As shown, client 200 and server 300 can connect to network 400 and transmit information or data to each other through network 400. In some embodiments, network 400 can be any type of wired or wireless network, or a combination thereof. For example, network 400 may include cable networks, wired networks, fiber optic networks, telecommunications networks, intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), and Bluetooth. TM Network, ZigBee TMA network, a near-field communication (NFC) network, or a similar network. In some embodiments, network 400 may include one or more network access points. For example, network 400 may include wired or wireless network access points, such as base stations or internet exchange points, through which one or more components of client 200 and server 300 can connect to network 400 to exchange data or information.

[0048] It should be understood that Figure 1 The number of clients 200, servers 300, and networks 400 shown is merely illustrative. Depending on implementation needs, there can be any number of clients 200, servers 300, and networks 400.

[0049] It should be noted that the liveness detection method can be executed entirely on the client 200, entirely on the server 300, or partially on the client 200 and partially on the server 300.

[0050] Figure 2 A hardware structure diagram of a computing device 600 provided according to an embodiment of this specification is shown. The computing device 600 can execute the liveness detection method described in this specification. The liveness detection method is described in other parts of this specification. When the liveness detection method is executed on a client 200, the computing device 600 can be the client 200. When the liveness detection method is executed on a server 300, the computing device 600 can be the server 300. When the liveness detection method can be executed partly on the client 200 and partly on the server 300, the computing device 600 can be both the client 200 and the server 300.

[0051] like Figure 2 As shown, the computing device 600 may include at least one storage medium 630 and at least one processor 620. In some embodiments, the computing device 600 may also include a communication port 650 and an internal communication bus 610. Additionally, the computing device 600 may include I / O components 660.

[0052] The internal communication bus 610 can connect different system components, including storage medium 630, processor 620 and communication port 650.

[0053] I / O component 660 supports input / output between computing device 600 and other components.

[0054] Communication port 650 is used for data communication between computing device 600 and external sources. For example, communication port 650 can be used for data communication between computing device 600 and network 400. Communication port 650 can be a wired communication port or a wireless communication port.

[0055] Storage medium 630 may include a data storage device. The data storage device may be a non-transitory storage medium or a temporary storage medium. For example, the data storage device may include one or more of a disk 632, a read-only storage medium (ROM) 634, or a random access storage medium (RAM) 636. Storage medium 630 also includes at least one instruction set stored in the data storage device. The instructions are computer program code, which may include programs, routines, objects, components, data structures, procedures, modules, etc., that execute the liveness detection method provided in this specification.

[0056] At least one processor 620 can be communicatively connected to at least one storage medium 630 and a communication port 650 via an internal communication bus 610. At least one processor 620 is used to execute the at least one instruction set described above. When the computing device 600 is running, at least one processor 620 reads the at least one instruction set and, according to the instructions of the at least one instruction set, executes the liveness detection method provided in this specification. Processor 620 can execute all the steps included in the liveness detection method. Processor 620 can be in the form of one or more processors. In some embodiments, processor 620 may include one or more hardware processors, such as a microcontroller, microprocessor, reduced instruction set computer (RISC), application-specific integrated circuit (ASIC), application-specific instruction set processor (ASIP), central processing unit (CPU), graphics processing unit (GPU), physical processing unit (PPU), microcontroller unit, digital signal processor (DSP), field-programmable gate array (FPGA), advanced RISC machine (ARM), programmable logic device (PLD), any circuit or processor capable of performing one or more functions, or any combination thereof. For illustrative purposes only, only one processor 620 is described in this specification for the computing device 600. However, it should be noted that the computing device 600 may also include multiple processors. Therefore, the operation and / or method steps disclosed in this specification may be executed by one processor as described herein, or they may be executed jointly by multiple processors. For example, if processor 620 of the computing device 600 in this specification executes steps A and B, it should be understood that steps A and B may also be executed jointly or separately by two different processors 620 (e.g., a first processor executes step A, a second processor executes step B, or the first and second processors jointly execute steps A and B).

[0057] Figure 3A flowchart of a liveness detection method P100 according to an embodiment of this specification is shown. As previously described, computing device 600 can execute the liveness detection method P100 of this specification. Specifically, processor 620 can read an instruction set stored in its local storage medium and then execute the liveness detection method P100 of this specification according to the instructions in the instruction set. Figure 3 As shown, method P100 may include:

[0058] S110: Obtain the spectral images of the target user in K spectral bands to obtain a multispectral image group.

[0059] Where K is a positive integer greater than 1. The range of K can be set according to the actual application, for example, it can include [20, 50], or any range of values ​​other than a positive integer greater than 1, etc. The spectral distance between adjacent spectral bands in the K spectral bands can be the same.

[0060] The spectral image can be a user image of the target user acquired within a specific spectral band. The spectrum can be the pattern of monochromatic light dispersed by a dispersive system (such as a prism or grating) and arranged sequentially according to wavelength (or frequency); it is also known as the optical spectrum. The user image can be an image containing the biometric features of the target user. These biometric features can include at least one of the following: face, torso, iris, sclera, fingerprint, palm print, voiceprint, or skeletal projection.

[0061] The multispectral image group can include K spectral images, each corresponding to a spectral band.

[0062] There are several ways to obtain the spectral images of the target user across K spectral bands, as follows:

[0063] For example, the processor 620 can directly receive the spectral images of the target user in K spectral bands uploaded by the user 100 or the target user through the client 200 or the terminal, thereby obtaining K spectral images and using them as a multispectral image group. Alternatively, it can obtain the spectral images of the target user in K spectral bands from the network or a spectral image database, thereby obtaining a multispectral image group. Or, it can also acquire the spectral images of the target user in K spectral bands through a multispectral image acquisition device, thereby obtaining a multispectral image group. Or, when the number of spectral images in the multispectral image group is large or the image memory is large, it can also receive a liveness detection request, which carries the storage address of the multispectral image group, and obtain the multispectral image group based on the storage address, and so on.

[0064] There are several ways to acquire spectral images of the target user in K spectral bands using an image acquisition device. For example, the processor 620 can uniformly sample K spectral bands within a preset spectral range, acquire images of the target user in K spectral bands, obtain K spectral images, and use the K spectral images as a multispectral image group.

[0065] The image acquisition device can be a multispectral imaging device. In facial recognition scenarios, a multispectral acquisition system can be built using a multispectral imaging device and integrated into the facial recognition system, thereby replacing the original acquisition camera.

[0066] The preset spectral range can include the infrared to ultraviolet spectrum. Commonly acquired spectral images use the visible (RGB) and near-infrared bands, but high-precision head models have overcome imaging anomalies in the visible and near-infrared bands. Therefore, the spectral range corresponding to the K bands in this scheme can include the infrared to ultraviolet spectrum. Within this range, due to the difference between the head model's material and human skin, it often exhibits anomalies in certain spectral bands (or wavelengths), thereby improving the detection accuracy against high-precision head model attacks.

[0067] S120: Input the multispectral image group into the material recognition model to obtain the fused material features and liveness material probability of the target user.

[0068] The material recognition model can be a model that identifies the material corresponding to the target user in each spectral image of the multispectral image group. The fused material features can be the features obtained by fusing the material features of each spectral image in the multispectral image group.

[0069] The liveness probability can be defined as the probability that the target user's material is a live material. The liveness probability can also be understood as the identified target user's material being skin, facial material, or a material possessed by a live user.

[0070] There are several ways to input multispectral image sets into a material recognition model to obtain the fused material features and liveness material probability of the target user, as follows:

[0071] For example, the processor 620 can input a multispectral image set into a material recognition model, encode the material features of K spectral image samples in the multispectral image set to obtain K image material features, fuse the K image material features to obtain fused material features, and classify the target user's material based on the fused material features to obtain the liveness material probability of the target user, and so on.

[0072] Among them, image material features can be feature vectors related to the material of an image region in a spectral image. Image material features can characterize the intensity of the user's material response in different spectral bands of a multispectral image sample group. Fused material features can be feature vectors obtained by fusing image material features. There are various fusion methods, such as feature concatenation, feature value addition, or weighted addition, etc.

[0073] In some embodiments, the processor 620 can also train a preset material recognition model to obtain a trained material recognition model. Then, based on a multispectral image set, the trained material recognition model is used to identify the target user's material characteristics, thereby obtaining the target user's fused material features and liveness probability. The training process of the material recognition model may include: the processor 620 obtaining a first multispectral image sample set, which includes K first spectral image samples corresponding to K spectral bands; inputting the first multispectral image sample set into the preset material recognition model to obtain an image material feature set and a predicted material category; and converging the preset material recognition model based on the image material feature set and the predicted material category to obtain the trained material recognition model.

[0074] The preset material recognition model may include a first feature encoding network, a multispectral relationship prediction network, and a material prediction network. The first feature encoding network is configured to extract features from the first spectral image samples in the multispectral image sample group, thereby obtaining the sample image material features corresponding to each first spectral image sample. The sample image material features characterize the response intensity of the user material in different spectral bands within the first multispectral image sample group. Since different user materials have different curves corresponding to their response intensities in different spectral bands, the sample image material features can be used to analyze the user material corresponding to different regions in the first spectral image samples within the first multispectral image sample group. The multispectral prediction network is configured to predict candidate image material features for adjacent spectral bands based on the sample image material features. The sample image material features of adjacent spectral bands predicted by the multispectral prediction network can be used to characterize the relationship between spectra. The material prediction network is configured to fuse the sample image material features corresponding to K first spectral image samples, and based on the fused sample image material features, determine the predicted material category corresponding to the first multispectral image sample group. There are several ways to input the first multispectral image sample group into a preset material recognition model to obtain an image material feature set and a predicted material category. For example, the processor 620 can input the first multispectral image sample group into a first feature encoding network to obtain the sample image material features corresponding to each of the K first spectral image samples. The sample image material features can be input into a multispectral image relationship prediction network to obtain candidate image material features corresponding to adjacent spectral bands. The adjacent spectral bands can be spectral bands adjacent to the spectral bands corresponding to the sample image material features. The sample image material features corresponding to the K first spectral image samples can be input into a material prediction network to obtain fused sample material features and the predicted material category corresponding to the fused sample material features. The sample image material features and candidate sample image features are used as an image material feature set.

[0075] After obtaining the image material feature set and the predicted material category, the processor 620 can converge the preset material recognition model based on the image material features and the predicted material category to obtain the trained material recognition model. There are several ways to converge the preset material recognition model. For example, the processor 620 can obtain the labeled material category of the first multispectral image sample group and compare the labeled material category with the predicted material category to obtain material classification loss information. It can also obtain the first feature difference between the material features of candidate sample images in the image material feature set and the material features of sample images in the corresponding spectral bands. Based on the first feature difference, it can determine the feature regression loss information, fuse the material classification loss information and the feature regression loss information, and converge the preset material recognition model based on the fused material recognition loss information to obtain the material recognition model.

[0076] The material classification loss information can be the loss information generated when classifying the materials of the first multispectral image sample group. There are various ways to compare the labeled material category with the predicted material category to obtain the material classification loss information. For example, the processor 620 can use the cross-entropy loss function to compare the labeled material category with the predicted material category to obtain the material classification loss information. Alternatively, it can use other types of loss functions to compare the labeled material category with the predicted material category to obtain the material classification loss information, and so on.

[0077] The feature regression loss information can be the loss information generated by the multispectral relationship prediction network when performing feature regression on the material features of sample images in adjacent spectral bands. There are several ways to obtain the first feature difference between the material features of candidate images and the material features of corresponding spectral bands in the image material feature set. For example, the processor 620 can select the material features of the spectral bands corresponding to the material features of candidate images from the image material feature set, determine the difference in feature distance, feature similarity, or feature value between the candidate image material features and the material features of the sample images, and use this difference as the first feature difference. After obtaining the first feature difference, the processor 620 can determine the feature regression loss information based on it.

[0078] After determining the material classification loss information and the feature regression loss information, the processor 620 can fuse the material classification loss information and the feature regression loss information to obtain the fused material recognition loss information. There are several ways to fuse the material classification loss information and the feature regression loss information. For example, the processor 620 can directly add the material classification loss information and the feature regression loss to obtain the fused material recognition loss information, as shown in formula (1):

[0079] Loss total =oss cls +oss feature (1)

[0080] Among them, Loss total Loss information can be identified for materials. cls Loss information can be classified for materials. feature It can be used for feature regression loss information.

[0081] In some embodiments, the processor 620 may also obtain material recognition weights, and based on the material recognition weights, weight the material classification loss information and the feature regression loss information respectively, and add the weighted material classification loss information and the weighted feature regression loss information together to obtain the fused material recognition loss information.

[0082] After fusing the material classification loss information and the feature regression loss information, the processor 620 can converge the preset material recognition model based on the fused material classification loss information, thereby obtaining the material recognition model. There are several ways to converge the preset material recognition model. For example, the processor 620 can use a gradient descent algorithm to update the network parameters of the preset material recognition model based on the material classification loss information, thereby obtaining an updated material recognition model. The processor then updates the preset material recognition parameters to the updated material recognition model and returns to the step of obtaining the first multispectral image sample group until the preset material recognition model converges, thus obtaining the trained material recognition model.

[0083] It should be noted that the network structure of the trained material recognition model may include the first feature encoding network and the material prediction network in the preset material recognition model, or it may include all the network structures in the preset material recognition model. However, when performing material recognition on a group of multispectral images, the multispectral relationship prediction network is usually not used.

[0084] S130: When the probability of a live material is greater than the preset live material probability threshold, live detection is performed on the multispectral image group based on the fused material features to obtain the live detection result of the target user and output the live detection result.

[0085] The liveness detection result can include either the target user being a live user or the attacking user. A live user is a user with live biometric characteristics, meaning the target user is a real person. An attacking user can be a non-live user, such as a user represented by a high-precision head model, paper, screen, or mask.

[0086] When the probability of a living material is greater than a preset threshold, there are several ways to perform liveness detection on the multispectral image group based on the fused material features. These methods are as follows:

[0087] For example, when the probability of a live material is greater than a preset live material probability threshold, the processor 620 can use a liveness detection model to extract features from the multispectral image group, obtain the liveness features of each spectral image in the multispectral image, fuse the liveness features to obtain the fused liveness features corresponding to the multispectral image group, and perform liveness classification on the target user based on the fused liveness features and fused material features to obtain the liveness detection result of the target user.

[0088] Among them, liveness features can be feature information in the spectral image that represents the liveness category of the target user. There are various ways to fuse liveness features. For example, the processor 620 can directly stitch together K liveness features to obtain the fused liveness features corresponding to the multispectral image group, or it can add K liveness features together to obtain the fused liveness features corresponding to the multispectral image group, and so on.

[0089] After fusing the liveness features, the processor 620 can classify the target user based on the fused liveness features and fused material features, thereby obtaining the liveness detection result of the target user. There are multiple ways to classify the target user as live. For example, the processor 620 can determine the attack probability of the target user based on the fused liveness features and fused material features, and determine the target user's liveness detection result as an attack user when the attack probability is greater than a preset attack probability threshold; or, determine the target user's liveness detection result as a live user when the attack probability is less than the preset attack probability threshold.

[0090] In some embodiments, the processor 620 may also directly input the multispectral image group into the liveness detection model without fusing material features, thereby obtaining the attack probability of the target user, and determining the liveness detection result of the target user as an attacking user when the attack probability is greater than a preset attack probability threshold; or, determining the liveness detection result of the target user as a live user when the attack probability is less than the preset attack probability threshold.

[0091] In some embodiments, the processor 620 can train a preset liveness detection model to obtain a trained liveness detection model, and then use the liveness detection model to perform liveness detection on a target user. The training process of the liveness detection model may include the following steps: the processor 620 can obtain a second multispectral image sample group and input the second multispectral image sample group into a material recognition model to obtain the target fused material features corresponding to the second multispectral image sample group; input the target fused material features and the second multispectral image sample group into the preset liveness detection model to obtain the predicted fused material features and the predicted liveness category set corresponding to the second multispectral image sample group; and converge the preset liveness detection model based on the predicted fused material features, the target fused material features, and the predicted liveness category set to obtain the trained liveness detection model.

[0092] The second multispectral image sample group comprises K second-spectral image samples corresponding to K spectral bands. The preset liveness detection model may include a second feature encoding network, a feature fusion network, a diverse fusion detection network, and a decoupling learning network. The second feature encoding network is configured to encode liveness-related feature information in the second-spectral image samples, thereby obtaining sample liveness features corresponding to each second-spectral image sample. The feature fusion network is configured to fuse the K sample liveness features to obtain fused liveness features, and based on the fused liveness features, determine a first predicted liveness category corresponding to the second multispectral image sample. The diverse fusion detection network is configured to fuse the fused liveness features and sample fusion material features to obtain a second predicted liveness category corresponding to the second multispectral image sample group. The decoupling learning network is configured to predict the fused material features corresponding to the second multispectral image sample group based on the fused liveness features, thereby obtaining predicted fused material features. There are several ways to input the target fused material features and the second multispectral image sample group into the predictive liveness detection model to obtain the predicted liveness category corresponding to the predicted fused material features and the second multispectral image sample group. For example, the processor 620 can input the second multispectral image sample group into the second feature encoding network to obtain the sample liveness features corresponding to each of the K second multispectral image samples. The sample liveness features are then input into the feature fusion network to obtain the sample fused liveness features and the first predicted liveness category corresponding to the sample fused liveness features of the second multispectral image sample group. The sample fused liveness features and the target fused material features are then input into the diverse fusion detection network to obtain the second predicted liveness category corresponding to the second multispectral image sample group. The first predicted liveness category and the second predicted liveness category are then used as the predicted liveness category set. Finally, the sample fused liveness features are input into the decoupling learning network to obtain the predicted fused material features.

[0093] After obtaining the predicted fused material features and the predicted liveness category set, the processor 620 can converge the preset liveness detection model based on the predicted fused material features, the predicted liveness category set, and the target fused material features to obtain the trained liveness detection model. There are several ways to converge the preset liveness detection model. For example, the processor 620 can obtain the labeled liveness categories corresponding to the second multispectral image sample group, compare the labeled liveness categories with the predicted liveness categories in the predicted liveness category set to obtain liveness classification loss information, compare the target fused material features with the predicted fused material features to obtain decoupling loss information, fuse the liveness classification loss information and decoupling loss information, and converge the preset liveness detection model based on the fused liveness detection loss information to obtain the liveness detection model.

[0094] The liveness classification loss information can be the loss information generated when performing liveness classification on the second multispectral image sample group. There are several ways to compare the labeled liveness category with the predicted liveness category in the predicted liveness category set to obtain the liveness classification loss information. For example, the processor 620 can compare the labeled liveness category with the first predicted liveness category to obtain first initial liveness classification loss information, compare the labeled liveness category with the second predicted liveness category to obtain second initial liveness classification loss information, and fuse the first initial liveness classification loss information and the second initial liveness classification loss information to obtain the liveness classification loss information. Alternatively, it can compare the labeled liveness category with the first predicted liveness category to obtain first initial liveness classification loss information, compare the labeled liveness category with the second predicted liveness category to obtain second initial liveness classification loss information, compare the first predicted liveness category with the second predicted liveness category to obtain prediction consistency loss information, and fuse the first initial liveness classification loss information, the second initial liveness classification loss information, and the prediction consistency loss information to obtain the liveness classification loss information.

[0095] The prediction consistency loss information can be the loss information generated by the difference between the predicted liveness categories when predicting the liveness category of the second multispectral image sample. The constraint condition for the prediction consistency loss information can be to constrain the error between the first predicted liveness category and the second predicted liveness category to be within a preset error range, that is, the first predicted liveness category and the second predicted liveness category should be as consistent as possible.

[0096] The methods for determining the first initial liveness classification loss information and the second initial liveness classification loss information are similar to those for determining the material classification loss information, as detailed above, and will not be repeated here.

[0097] The decoupling loss information can be the loss information generated when predicting fused material features based on fused liveness features. The constraint condition for the decoupling loss information can be that the second feature difference between the predicted fused material features and the target fused material features is greater than a preset feature difference threshold. In other words, the difference between the predicted fused material features and the true target fused material features should be as large as possible, so that the liveness features decoupled from the image features and the image material features are as complementary as possible, thereby improving the accuracy of liveness detection. There are several ways to compare the target fused material features with the predicted fused material features to obtain the decoupling loss information. For example, the processor 620 can obtain the feature difference between the target fused material features and the predicted fused material features, obtain the second feature difference, and determine the decoupling loss information based on the second feature difference.

[0098] The types of feature differences can be varied, such as feature distance, feature similarity, or the difference in feature values, etc.

[0099] After determining the liveness classification loss information and the decoupling loss information, the processor 620 can fuse the liveness classification loss information and the decoupling loss information to obtain the fused liveness detection loss information. There are several ways to fuse the liveness classification loss information and the decoupling loss information. For example, the processor 620 can directly add the liveness classification loss information and the decoupling loss information to obtain the fused liveness detection loss information; alternatively, it can obtain the liveness detection weights and, based on these weights, separately weight the liveness classification loss information and the decoupling loss information, then add the weighted liveness classification loss information and the weighted decoupling loss information to obtain the liveness detection loss information, and so on.

[0100] After fusing the liveness classification loss information and the decoupling loss information, the processor 620 can converge the preset liveness detection model based on the fused liveness detection model, thereby obtaining the liveness detection model. The convergence method for the preset liveness detection model is similar to the convergence method for the preset material recognition model, as detailed above, and will not be repeated here.

[0101] After obtaining the trained liveness detection model, the processor 620 can perform liveness detection on the multispectral image set based on the liveness detection model. The liveness detection process is described above, thereby obtaining the liveness detection result for the target user. Then, the liveness detection result for the target user is output. There are several ways to output the liveness detection result. For example, the processor 620 can directly send the liveness detection result to user 100 or the client 200, terminal, or server corresponding to the target user, so that the client 200, terminal, or server can respond to the request of the target user or the target user based on the liveness detection result. Alternatively, the liveness detection result can be directly visualized, and so on.

[0102] There are several ways to visualize the liveness detection results. For example, the processor 620 can directly display the liveness detection result, or it can display the liveness detection result through sound and light (for example, by broadcasting the liveness detection result by voice, or by displaying different types of liveness detection results by displaying different colored lights, or by displaying the liveness detection result through sound and light linkage), or it can display the liveness detection result for specific types of liveness detection results (for example, only displaying the liveness detection result for attacking users, or only displaying the liveness detection result for normal users, etc.), and so on.

[0103] In some embodiments, after determining or outputting the liveness detection result of the target user, the processor 620 may respond to the target user or the request corresponding to the target user based on the liveness detection result. There may be various ways to respond. For example, the processor 620 may directly intercept the target user or the request corresponding to the target user, or the processor 620 may directly perform secondary verification on the target user and, based on the secondary verification result, provide a final response to the target user or the request corresponding to the target user, and so on.

[0104] In some embodiments, when the probability of a liveness detection is less than a preset liveness detection probability threshold, the processor 620 can determine that the target user is an attacking user, and use the attacking user as the target user's liveness detection result, and output the target user's liveness detection result. The process of outputting the liveness detection result can be referred to the above description, and will not be repeated here.

[0105] In face recognition scenarios, this solution can perform liveness detection on high-precision head models based on multispectral imaging material analysis. The overall detection process can include four parts: multispectral data acquisition, multispectral material analysis, multispectral liveness detection, and model deployment and liveness detection. Figure 4 As shown, the specific details are as follows:

[0106] (1) Multispectral Data Acquisition: Conventional spectral image acquisition involves image acquisition in the visible light spectrum (i.e., RGB band) and near-infrared band. However, high-cost head models have overcome the imaging anomalies in the visible light and near-infrared bands. To overcome the current data acquisition problem (inability to distinguish between live subjects and high-precision head models), this solution utilizes multispectral equipment for multispectral image acquisition, involving multiple spectral bands. Since the material of the head model is different from human facial skin, anomalies will inevitably appear in some bands. During the multispectral data acquisition process, a multispectral acquisition system can be built using multispectral imaging equipment and integrated into the face recognition device to replace the original acquisition camera. Within the spectral range of the multispectral acquisition system, K spectral bands (K is generally best between 20 and 50) are uniformly sampled, and images are acquired in the K spectral bands to obtain K images, each corresponding to one spectral band; these K images constitute a multispectral image group.

[0107] (2) Multispectral Material Analysis: Traditional material analysis methods are generally based on monospectral images. Since monospectral images show consistent performance across many materials, the accuracy of material analysis using monospectral images is relatively low. To overcome this problem, this solution uses multispectral data for material analysis. Multispectral data characterizes the target's response across multiple spectral bands, thus comprehensively characterizing the differences in materials and further improving the classification accuracy for living and attack materials. In multispectral material analysis, the material recognition model is mainly used to analyze the K spectral images in the acquired multispectral image set. The training process of the material recognition model can be found above and will not be repeated here.

[0108] (3) Multispectral liveness detection model training: Based on the material features after material classification and multispectral images, liveness detection is performed through a liveness detection model. In liveness detection, the liveness detection model can also capture attack clues other than material features, thereby improving the overall liveness detection performance. The specific training process of the liveness detection model can be found above, and will not be repeated here.

[0109] (4) Model Deployment and Liveness Detection: Deploy the trained material recognition (classification) model and liveness detection model to the cloud or terminal device (client 200). Use a face recognition system equipped with a multispectral system to collect the user's multispectral face image, obtaining a multispectral face image set. Input the multispectral face image set into the material classification model to obtain the face material probability p1. For a threshold T1, if p1 is greater than T1, continue liveness detection through the liveness detection model; otherwise, it is judged as an attacking user and directly intercepted. When p1 is greater than T1, input the multispectral face image set into the liveness detection model. Alternatively, the fused material features output by the material recognition model and the multispectral face image set can be input into the liveness detection model to obtain the attack probability p2 of the target user. For a threshold T2, if p2 is greater than T2, it is judged as an attacking user; otherwise, it is judged as a live user. Specifically, it can be done as follows: Figure 5 As shown.

[0110] This solution utilizes multispectral imaging equipment to acquire multispectral images of the user. Then, based on the differences in multispectral responses between human and non-human faces, the target user's material is identified. When the user's material poses an attack risk, liveness detection is performed on the multispectral image set based on fused material features, thereby achieving detection of high-precision head models. This solution can be deployed in various scenarios, has a lower disturbance rate to users, and improves the detection accuracy for high-precision head models, thus enhancing the performance of liveness detection.

[0111] In summary, the liveness detection method P100 and system 001 provided in this specification, after obtaining the spectral images of the target user in K spectral bands and obtaining a multispectral image set, input the multispectral image set into a material recognition model to obtain the fused material features and liveness material probability of the target user. When the liveness material probability is greater than a preset liveness material probability threshold, liveness detection is performed on the multispectral image set based on the fused material features to obtain the liveness detection result of the target user, and the liveness detection result is output. Because this scheme, in the detection of high-precision head-mounted attacks, identifies the user material and material features corresponding to each region in the image based on the difference in multispectral responses between the attacking user and the live user, and further, when the user material has the risk of attack material, uses the material features as auxiliary detection information to perform liveness detection on the multispectral image set of the target user, it can not only more efficiently and accurately identify high-precision head-mounted attacks, but also can be deployed in various liveness detection scenarios with a lower disturbance rate to users. Therefore, it can improve the detection performance of liveness detection.

[0112] This specification, in another aspect, provides a non-transitory storage medium storing at least one set of executable instructions for performing liveness detection. When the executable instructions are executed by a processor, they instruct the processor to implement the steps of the liveness detection method P100 described herein. In some possible embodiments, various aspects of this specification can also be implemented as a program product comprising program code. When the program product is run on a computing device 600, the program code causes the computing device 600 to perform the steps of the liveness detection method P100 described herein. The program product for implementing the above method may employ a portable compact disk read-only memory (CD-ROM) containing program code and may run on the computing device 600. However, the program product of this specification is not limited thereto. In this specification, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system. The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A 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 readable storage media include: electrical connections having one or more wires, portable disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination thereof. The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying 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 readable storage medium may also be any readable medium other than a readable storage medium that can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. Program code for performing the operations described herein can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on computing device 600, partially on computing device 600, as a standalone software package, partially on computing device 600 and partially on a remote computing device, or entirely on a remote computing device.

[0113] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0114] In summary, after reading this detailed disclosure, those skilled in the art will understand that the foregoing detailed disclosure is presented by way of example only and is not restrictive. Although not explicitly stated herein, those skilled in the art will understand that this specification requires various reasonable changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be made by this specification and are within the spirit and scope of the exemplary embodiments described herein.

[0115] Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, "an embodiment," "an embodiment," and / or "some embodiments" mean that a particular feature, structure, or characteristic described in connection with that embodiment may be included in at least one embodiment of this specification. Therefore, it is to be emphasized and understood that two or more references to "an embodiment" or "an embodiment" or "alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. Moreover, specific features, structures, or characteristics may be suitably combined in one or more embodiments of this specification.

[0116] It should be understood that in the foregoing description of the embodiments in this specification, various features are combined in a single embodiment, drawing, or description for the purpose of simplifying the description and aiding in the understanding of a feature. However, this does not mean that the combination of these features is necessary, and those skilled in the art may readily identify some of the devices as separate embodiments when reading this specification. That is, the embodiments in this specification can also be understood as an integration of multiple secondary embodiments. It is also valid when each secondary embodiment contains fewer than all the features of a single foregoing disclosed embodiment.

[0117] Each patent, patent application, publication of the patent application, and other materials such as articles, books, specifications, publications, documents, articles, etc., cited herein may be incorporated by reference. All contents used for all purposes, except for any history of prosecution documents relating to it, that may be inconsistent with or conflict with this document, or any such history of prosecution documents that may have a limiting effect on the widest extent of the claims, are now or hereafter associated with this document. For example, in the event of any inconsistency or conflict between the description, definition, and / or use of terms associated with any of the included materials and the terms, description, definition, and / or used in connection with this document, the terms used herein shall prevail.

[0118] Finally, it should be understood that the embodiments disclosed herein are illustrative of the principles of the embodiments described in this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely examples and not limitations. Those skilled in the art can implement the applications described in this specification using alternative configurations based on the embodiments in this specification. Therefore, the embodiments in this specification are not limited to the embodiments precisely described in the applications.

Claims

1. A method for detecting liveness, comprising: Collect spectral images of the target user uniformly sampled in K spectral bands within a preset spectral range to obtain a multispectral image group, where K is a positive integer greater than 1; The multispectral image set is input into a material recognition model to obtain the fused material features and liveness probability of the target user. The fused material features include the features obtained by fusing the image material features of each spectral image in the multispectral image set; and When the probability of a live object is greater than a preset live object probability threshold, liveness detection is performed on the multispectral image group based on the fused material features to obtain the liveness detection result of the target user, and the liveness detection result is output. The training process of the material recognition model includes the following steps: A first multispectral image sample group is obtained, wherein the multispectral image sample group includes K first spectral image samples corresponding to the K spectral bands. The first multispectral image sample group is input into a first feature encoding network to obtain the sample image material features corresponding to each of the K first spectral image samples. The sample image material features characterize the response intensity of the user material in different spectral bands in the first multispectral image sample group. The material features of the sample images are input into a multispectral relation prediction network to obtain the material features of candidate sample images corresponding to adjacent spectral bands. The adjacent spectral bands are those adjacent to the spectral bands corresponding to the material features of the sample images. The material features of the sample images corresponding to the K first spectral image samples are input into the material prediction network to obtain the fused sample material features and the predicted material category corresponding to the fused sample material features. The material features of the sample images and the material features of the candidate sample images are used as the image material feature set. Based on the image material feature set and the predicted material category, the preset material recognition model is converged to obtain the trained material recognition model.

2. The liveness detection method according to claim 1, wherein, The acquisition of spectral images of the target user uniformly sampled in K spectral bands within a preset spectral range yields a multispectral avatar group, including: K spectral bands are uniformly sampled within a preset spectral range, wherein adjacent spectral bands have the same spectral distance; and Images of the target user are acquired in the K spectral bands to obtain K spectral images corresponding to the K spectral bands, and the K spectral images are used as the multispectral image group.

3. The liveness detection method according to claim 2, wherein, The preset spectral range includes the infrared to ultraviolet spectrum.

4. The live detection method according to claim 1, wherein, The value range of K includes [20, 50].

5. The liveness detection method according to claim 1, wherein, The process of converging the preset material recognition model to obtain the trained material recognition model includes: Obtain the labeled material category of the first multispectral image sample group, and compare the labeled material category with the predicted material category to obtain material classification loss information; Obtain the first feature difference between the candidate sample image material features and the sample image material features of the corresponding spectral band in the image material feature set, and determine the feature regression loss information based on the first feature difference; and The material classification loss information and the feature regression loss information are fused together, and the preset material recognition model is converged based on the fused material recognition loss information to obtain the material recognition model.

6. The liveness detection method according to claim 1, wherein, After inputting the multispectral image set into the material recognition model to obtain the fused material features and liveness material probability of the target user, the method further includes: When the probability of a live object is less than the preset probability threshold, the target user is determined to be an attacking user; and The attacking user is used as the liveness detection result of the target user, and the liveness detection result is output.

7. The live detection method according to claim 1, wherein, The step of performing liveness detection on the multispectral image group to obtain the liveness detection result of the target user includes: A liveness detection model is used to extract features from the multispectral image group to obtain the liveness features of each spectral image in the multispectral image group; The liveness features are fused to obtain the fused liveness features corresponding to the multispectral image group; and Based on the fused liveness features and the fused material features, the target user is classified as a liveness subject to obtain the liveness detection result of the target user.

8. The liveness detection method according to claim 7, wherein, The step of performing liveness classification on the target user to obtain the liveness detection result of the target user includes: Based on the fused liveness features and the fused material features, the attack probability of the target user is determined; and When the attack probability is greater than a preset attack probability threshold, the liveness detection result of the target user is determined to be the attacking user.

9. The liveness detection method according to claim 8, wherein, Also includes: When the attack probability is less than the preset attack probability threshold, the liveness detection result of the target user is determined to be a live user.

10. The liveness detection method according to claim 7, wherein, The training process of the liveness detection model includes the following steps: A second multispectral image sample group is obtained and input into the material recognition model to obtain the target fused material features corresponding to the second multispectral image sample group; The target fused material features and the second multispectral image sample group are input into a preset liveness detection model to obtain a predicted liveness category set corresponding to the predicted fused material features and the second multispectral image sample group; and Based on the predicted fused material features, the target fused material features, and the predicted liveness category set, the preset liveness detection model is converged to obtain the trained liveness detection model.

11. The liveness detection method according to claim 10, wherein, The preset liveness detection model includes a second feature encoding network, a feature fusion network, a multi-element fusion detection network, and a decoupling learning network; the second multispectral image sample group includes K second spectral image samples corresponding to the K spectral bands; and The step of inputting the target fused material features and the second multispectral image sample group into a preset liveness detection model to obtain a predicted liveness category set corresponding to the predicted fused material features and the second multispectral image sample group includes: The second multispectral image sample group is input into the second feature encoding network to obtain the sample liveness features corresponding to each of the K second spectral image samples. The liveness features of the samples are input into the feature fusion network to obtain the sample fused liveness features corresponding to the second multispectral image sample group and the first predicted liveness category corresponding to the sample fused liveness features. The fused liveness features of the samples and the fused material features of the target are input into the diverse fusion detection network to obtain the second predicted liveness category corresponding to the second multispectral image sample group. The first predicted liveness category and the second predicted liveness category are used as the predicted liveness category set. The sample fusion liveness features are input into a decoupled learning network to obtain the predicted fusion material features.

12. The liveness detection method according to claim 10, wherein, The preset liveness detection model is converged to obtain the trained liveness detection model, including: Obtain the labeled liveness category corresponding to the second multispectral image sample group, and compare the labeled liveness category with the predicted liveness category in the predicted liveness category set to obtain liveness classification loss information; The target fused material features are compared with the predicted fused material features to obtain decoupling loss information. The constraint condition for the decoupling loss information is that the second feature difference between the predicted fused material features and the target fused material features is greater than a preset feature difference threshold. The liveness classification loss information and the decoupling loss information are fused together, and the preset liveness detection model is converged based on the fused liveness detection loss information to obtain the liveness detection model.

13. The liveness detection method according to claim 12, wherein, The step of comparing the labeled liveness category with the predicted liveness categories in the predicted liveness category set to obtain liveness classification loss information includes: The labeled liveness category is compared with the first predicted liveness category to obtain the first initial liveness classification loss information; The labeled liveness category is compared with the second predicted liveness category to obtain the second initial liveness classification loss information; and The first initial liveness classification loss information and the second initial liveness classification loss information are fused together to obtain the liveness classification loss information.

14. The liveness detection method according to claim 12, wherein, The step of comparing the labeled liveness category with the predicted liveness categories in the predicted liveness category set to obtain liveness classification loss information includes: The labeled liveness category is compared with the first predicted liveness category to obtain the first initial liveness classification loss information; The labeled liveness category is compared with the second predicted liveness category to obtain the second initial liveness classification loss information; The first predicted liveness category is compared with the second predicted liveness category to obtain prediction consistency loss information; and The first initial liveness classification loss information, the second initial liveness classification loss information, and the prediction consistency loss information are fused to obtain the liveness classification loss information.

15. A liveness detection system, comprising: At least one storage medium storing at least one instruction set for performing liveness detection; as well as At least one processor is communicatively connected to the at least one storage medium. When the liveness detection system is running, the at least one processor reads the at least one instruction set and executes the liveness detection method according to any one of claims 1-14 according to the instructions of the at least one instruction set.