Living body detection method and device based on dazzle light perception state space modeling

By employing multi-directional scanning and fusion mechanisms and module combinations, the problem of information loss in state-space models during glare liveness detection was solved, achieving efficient glare reflection feature discrimination and improving the model's discrimination accuracy and robustness.

CN121661690APending Publication Date: 2026-03-13RECONOVA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing state-space models cannot effectively preserve and utilize the two-dimensional spatial structure information of images in glare liveness detection, resulting in the loss of local texture and structural information, which affects the model's discrimination accuracy and robustness.

Method used

A multi-directional scanning and fusion mechanism is adopted to unfold the feature map of the glare face image into sequential data along multiple scanning directions. After processing by a selective state space model, it is reshaped into a two-dimensional feature map. Combined with a visual state subspace module, a two-dimensional redundancy suppression convolution module, and a dynamic channel attention module, long-distance dependencies are captured and redundant information is suppressed.

Benefits of technology

While maintaining the linear complexity of the state-space model, it significantly improves the ability to distinguish subtle local features such as glare reflection, enhances the model's discrimination accuracy and robustness, and is suitable for generalization in complex real-world scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661690A_ABST
    Figure CN121661690A_ABST
Patent Text Reader

Abstract

The invention provides a living body detection method and device based on dazzle light perception state space modeling, and the method comprises the steps: carrying out the feature extraction of a dazzle light face image, inputting an extracted feature graph into a deep neural network based on a dazzle light state space module, and outputting a living body score after feature transformation and classification; judging whether the to-be-detected object is a real living body or not according to the living body score; wherein the dazzle state space module is used for expanding an input characteristic pattern into sequence data along a plurality of scanning directions; processing the sequence data in each scanning direction by applying a selective state space model so as to capture a long-distance dependency relationship in the glare face image; and the processed sequence data are fused and remodeled into a two-dimensional feature map which is used as the output of the dazzle light state space module. According to the method, the linear complexity advantage of the state space model is inherited, and meanwhile, the loss of local texture and structural information is effectively prevented, so that the discrimination capability of tiny local features such as dazzle light reflection is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of liveness detection technology, specifically to a liveness detection method and device based on glare perception state space modeling. Background Technology

[0002] Facial liveness detection is a key technology for ensuring the security of facial recognition systems. It aims to distinguish real faces from various spoofing attacks and can effectively defend against common attack methods, such as fraudulent activities using photos, videos, face-swapping technology, masks, occlusions, 3D animations, and screen captures. Among these, glare liveness detection actively projects a specific pattern of glare and analyzes subtle differences in the reflective properties of the facial skin and the attack props to determine whether the person is truly alive.

[0003] In recent years, state-space sequence models (such as the Mamba model) have shown great potential in long sequence modeling tasks. These models model sequences through their internal state transition mechanisms, capturing long-distance dependencies with linear computational complexity. This makes them significantly more computationally efficient than the Transformer architecture, whose computational complexity is quadratic with sequence length. Therefore, the industry has begun exploring the application of state-space models to image data in order to build more efficient visual understanding models.

[0004] However, state-space models have an inherent and serious drawback when processing image data: to model one-dimensional sequences, they must flatten the image feature maps, which have a two-dimensional spatial structure. This operation completely destroys the inherent two-dimensional neighborhood relationships between pixels, causing the loss of crucial local contextual information (such as edges, textures, and shapes) during serialization. For glare liveness detection tasks, the discriminative features between real skin and attack props are highly dependent on these subtle, localized reflection spots and texture patterns. Therefore, directly applying existing state-space models to glare liveness detection, while potentially offering computational efficiency, severely compromises the model's discriminative accuracy and robustness due to the loss of local details.

[0005] Therefore, the lack of a liveness detection method in the existing technology that can effectively preserve and utilize the two-dimensional spatial structure information of an image within the linear computational framework of a state-space model has become a major technical obstacle to successfully applying the state-space model to the field of glare liveness detection. Summary of the Invention

[0006] In view of this, in order to overcome the shortcomings of the existing technology, the purpose of this invention is to propose a liveness detection method and device based on glare perception state space modeling. It aims to inherit the linear complexity advantage of the state space model while effectively preventing the loss of local texture and structural information, thereby significantly improving the model's ability to distinguish subtle local features such as glare reflection.

[0007] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a liveness detection method based on glare perception state space modeling, comprising the following steps: Acquire the image of the face to be detected for glare; Feature extraction is performed on the glare face image, and the extracted feature map is input into a deep neural network based on the glare state space module. After feature transformation and classification, a liveness score is output. The liveness score is used to determine whether the object to be tested is a real living organism. The glare state space module is used to: unfold its input feature map into sequence data along multiple scanning directions; apply a selective state space model to the sequence data in each scanning direction to capture long-distance dependencies in the glare face image; and fuse and reshape the processed sequence data into a two-dimensional feature map as the output of the glare state space module.

[0008] Preferably, the deep neural network sequentially comprises: a basic convolutional module, N stages, a pooling module, and a classifier; wherein each stage consists of a glare state space module and a downsampling module, and N is an integer greater than 1.

[0009] Preferably, the step of fusing and reshaping the processed sequence data into a two-dimensional feature map specifically involves: The processed sequence data are inversely mapped back to the two-dimensional feature map format to obtain feature maps for each scanning direction. The feature maps of each scanning direction are weighted and summed using learnable weight parameters to obtain a fused two-dimensional feature map.

[0010] Preferably, the plurality of scanning directions include the following four directions: a row forward scanning direction starting from the upper left corner of the feature map; a row reverse scanning direction starting from the upper right corner of the feature map; a column forward scanning direction starting from the lower left corner of the feature map; and a column reverse scanning direction starting from the lower right corner of the feature map.

[0011] Preferably, the glare state space module sequentially integrates the following modules: The visual state subspace module processes input features to capture long-range glare context dependencies while preserving the two-dimensional spatial structure of the image. The two-dimensional redundancy suppression convolution module processes the features output by the visual state subspace module to suppress redundant information in both spatial and channel dimensions. The dynamic channel attention module processes the features output by the two-dimensional redundancy suppression convolution module to adaptively calibrate key glare discrimination features.

[0012] Preferably, the visual state subspace module processes the input feature sequence in the following manner: Reshape the input feature sequence into a two-dimensional feature map; The first branch features are obtained by performing convolution and activation processing on the two-dimensional feature map through the first branch. The second branch performs convolution and activation processing on the two-dimensional feature map, and further processes it through a two-dimensional selective scanning mechanism to obtain the second branch features; The first branch features and the second branch features are multiplied element-wise, and then convolution and reshaping are performed to output the final feature sequence.

[0013] Preferably, the two-dimensional redundancy suppression convolution module performs spatial redundancy suppression and channel redundancy suppression sequentially: The spatial redundancy suppression separates the effective information region and the redundant information region from the input features through a gating mechanism, and then performs cross-fusion. The channel redundancy suppression process involves processing the input features through dual-path convolution and adaptively fusing the outputs of the two paths based on channel attention.

[0014] Preferably, the spatial redundancy suppression specifically includes: Generate spatial attention weights based on input features; The first gating module and the second gating module are used to separate the effective information features and the redundant information features from the input features; The effective information features and redundant information features are cross-added and spliced ​​to complete spatial redundancy suppression.

[0015] Preferably, the channel redundancy suppression specifically includes: The features output by spatial redundancy suppression are separated into first path features and second path features; The first path features are respectively processed by group convolution and point convolution, and then the features are added element by element; The second path feature is processed by point convolution and then concatenated with its own residual. The outputs from the two processed paths are concatenated and fused using adaptive weights based on channel attention to output the final feature.

[0016] Preferably, the dynamic channel attention module processes the input features through the following process: The input features are sequentially subjected to a first convolution, GELU activation, and a second convolution to obtain intermediate features; The intermediate features are subjected to global average pooling, and then sequentially processed by the first convolution, ReLU activation, second convolution, and Sigmoid activation to generate channel weight vectors. The channel weight vector is multiplied by the input features of the dynamic channel attention module to obtain the output features.

[0017] Preferably, before inputting the glare face image into the deep neural network, the glare face image is normalized to limit the pixel values ​​to between 0 and 1.

[0018] Preferably, the step of determining whether the object to be detected is a real living person based on the liveness score specifically means: if the liveness score is greater than 0.5, it is determined to be a real person; if the liveness score is less than 0.5, it is determined to be a fake person.

[0019] Preferably, the deep neural network is obtained through the following training process: Data augmentation of training sample images is performed using one or more of the following methods: random rotation, random flipping, random shuffling of image blocks, addition of Gaussian noise, and random contrast enhancement. The network was trained using a stochastic gradient descent optimizer with a learning rate of 0.01, a training period of 200 epochs, a batch size of 1024, a momentum of 0.9, and an optimizer tuning policy of StepLR.

[0020] In a second aspect, the present invention provides a liveness detection device based on glare perception state space modeling, comprising: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the method described above.

[0021] Compared with the prior art, the live body detection method and device of the present invention have the following beneficial effects: 1. This invention introduces a multi-directional scanning and fusion mechanism into the state-space model, unfolding the feature map into a sequence along multiple scanning directions. The processed sequences are then fused and reshaped into a two-dimensional feature map, ensuring that the two-dimensional spatial neighborhood relationships of features are captured and preserved in different scanning paths throughout the processing. Compared to the simple processing of images that unidirectionally flattens them into a one-dimensional sequence in existing technologies, this invention, through multi-directional serialization and two-dimensional reshaping, effectively prevents the loss of local texture and structural information while inheriting the linear complexity advantage of the state-space model. This significantly improves the model's ability to discriminate subtle local features such as glare reflections.

[0022] 2. This invention uses learnable weight parameters to perform weighted fusion of feature maps in each scanning direction. It can automatically learn and assign different importance weights to feature maps in different scanning directions according to different input content and task requirements. This can effectively highlight the directional features that contribute the most to the current glare discrimination and suppress interference from secondary or noisy directions.

[0023] 3. This invention sequentially integrates three sub-modules into its glare state space module: the Visual State Subspace Module (VSSM), the Two-Dimensional Redundancy Reduction Convolution Module (SCRU), and the Dynamic Channel Attention Module (DCAM). This integration achieves a progressive optimization effect through global-local feature synergy enhancement: the VSSM module prioritizes the capture of global context and two-dimensional structure; the SCRU module refines features based on this, explicitly removing redundancy in spatial and channel dimensions; and the DCAM module performs channel-level calibration, adaptively amplifying key discriminative features. The sequential integration of these three modules produces a synergistic effect, realizing a progressive optimization from "global structure modeling" to "local redundancy suppression" and then to "discriminative feature calibration," resulting in final output features that possess rich context, pure information, and outstanding discriminative power.

[0024] 4. The visual state subspace module of this invention employs a dual-branch parallel structure and an element-wise multiplication fusion method. One branch (containing 2D selective scanning) captures long-range dependencies, while the other branch (convolutional activation only) preserves local details. Element-wise multiplication then fuses these dependencies, allowing local details to directly modulate global contextual information. This enhances components of global features related to high-frequency local details, while suppressing those that are not, thus preserving both macroscopic structure and microscopic texture in the output. Simultaneously, one branch remains lightweight, alleviating the computational burden of 2D scanning and achieving a good balance between performance and efficiency.

[0025] 5. The dual-dimensional redundancy suppression convolution module of this invention employs both spatial and channel-level redundancy suppression. Through spatial dimension gating separation and cross-fusion, it effectively suppresses spatial background noise in the feature map, highlighting the foreground discrimination region. Through channel dimension dual-path processing and attention fusion, it suppresses redundant channels with low information content, highlighting key feature channels. Explicit redundancy suppression in two core dimensions not only directly improves the discriminative power of features but also, by removing a large amount of invalid information, is equivalent to efficient model compression, reducing the amount of data required for subsequent computation and laying the foundation for lightweight deployment of the model on edge devices.

[0026] 6. The dynamic channel attention module of this invention, through a bottleneck structure composed of two convolutional layers, can dynamically generate content-related channel weights based on input features. This enables the model to automatically and discriminatively enhance feature channels carrying discriminative reflectance information and suppress channels affected by noise or irrelevant information when faced with glare images of different lighting and skin textures. This greatly improves the model's generalization ability and robustness in complex real-world scenarios.

[0027] 7. This invention combines "multi-directional scanning" with a "selective state-space model," which is not a simple functional superposition, but rather addresses the fundamental shortcomings of state-space models in visual tasks: the selective state-space model is responsible for capturing long-range dependencies within a sequence with linear complexity, while the multi-directional scanning mechanism provides the state-space model with input rich in two-dimensional structural information by constructing sequences in different spatial directions; multi-directional scanning ensures that local neighborhood relationships are preserved in at least one scanning sequence, while the selective state-space model can efficiently learn complementary contextual information from these sequences from different perspectives. The combination of these two approaches achieves a balance between information integrity and computational efficiency.

[0028] 8. This invention employs a sequential connection between the Visual State Subspace (VSSM) module and the subsequent Two-Dimensional Redundancy Reduction (SCRU) module. The VSSM module, through its dual branches and two-dimensional selective scanning, aims to capture global and local features with minimal information loss. While its output features are comprehensive, they inevitably contain a large amount of background and redundant information irrelevant to liveness detection. This invention refines the VSSM output through the SCRU module, enabling the network to retain potentially useful information to the maximum extent before efficiently filtering and condensing it. This ensures high discriminative power while avoiding feature loss that might result from premature information filtering. The two modules work together to maximize feature utilization efficiency.

[0029] 9. The dual-dimensional redundancy suppression module SCRU of the present invention adopts a serial processing order of first performing spatial redundancy suppression and then channel redundancy suppression: Spatial redundancy suppression is first performed at the macroscopic level to identify and suppress large areas of spatial background, while simultaneously recovering potentially subtle and useful information through a cross-fusion strategy; subsequently, channel redundancy suppression performs a secondary screening at the more microscopic channel dimension, focusing on which feature patterns are critical. By first performing coarse-grained region localization and then fine-grained feature pattern selection, the computational waste caused by directly processing large amounts of spatially redundant data at the channel level is avoided.

[0030] 10. This invention employs a collaborative approach of three core modules (VSSM, SCRU, DCAM) and an N-stage macroscopic network architecture. Within each stage, the glare state space module performs a complete feature transformation and enhancement on the input features. A downsampling module is then placed after each glare state space module, enabling the next stage's glare state space module to process more semantically abstract features at a lower resolution and a more macroscopic scale. By applying the same feature enhancement process to multiple feature scales at different network depths, the model can enhance not only detailed texture features at shallow levels but also semantically clear abstract features at deeper levels. This achieves comprehensive, multi-scale modeling of glare reflection patterns from microscopic to macroscopic perspectives, significantly enhancing the model's discriminative power. Attached Figure Description

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

[0032] In the diagram: Figure 1 This is a simplified flowchart of the liveness detection method of the present invention; Figure 2 This is a simplified flowchart of the glare state space module of the present invention; Figure 3 This is a simplified flowchart of the visual state subspace module of the present invention; Figure 4 This is a simplified flowchart of the two-dimensional selective scanning mechanism of the present invention; Figure 5 This is a simplified flowchart of the two-dimensional redundancy suppression module of the present invention; Figure 6 This is a simplified flowchart of the dynamic channel attention module of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the embodiments of this invention will be further described in detail below with reference to specific examples and the accompanying drawings. The described embodiments are only some, not all, of the embodiments described in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative effort are within the scope of protection of this application.

[0034] It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments. The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be decomposed, combined, or partially merged; therefore, the actual execution order may change depending on the actual situation.

[0035] Example 1 This invention proposes a liveness detection method based on glare perception state space modeling. The diffuse reflection and polarization differences generated by glare on real skin and attack props can be regarded as natural discrimination signals. This method utilizes this characteristic to achieve high-precision identification of glare liveness detection through a glare state space module.

[0036] The overall framework includes the following processing flow: refer to Figure 1 The input image is a 128×128 resolution face image with glare, after face detection and alignment. This image first undergoes shallow feature extraction via a convolutional module. Then, it sequentially passes through a combination of four glare state space modules and a downsampling module, gradually reducing the feature map resolution from the initial 128×128 to 8×8. Finally, the feature map is processed by a pooling module to output the liveness score.

[0037] The overall idea of ​​this invention is to use the glare state space module to coordinate global-local modeling, enhance the glare detail representation through the visual state subspace module, and combine the dual-dimensional redundancy suppression convolution module and the dynamic channel attention module to complete the adaptive calibration of key information, thereby achieving high-precision and robust glare liveness detection.

[0038] The glare state space module, serving as the core unit for overall feature extraction and global-local coupling, comprises a visual state subspace module, a two-dimensional redundancy suppression convolution module, and a dynamic channel attention module. The visual state subspace module employs a dual-branch parallel structure. One branch performs channel expansion, depthwise convolution, and activation before handing the result over to a two-dimensional selective scanning mechanism for four-way global computation. The other branch performs only channel expansion and activation. The two branches are fused through element-wise multiplication, preserving the global glare context while enhancing high-frequency details, ultimately outputting a feature map of the same dimension as the input. The two-dimensional redundancy suppression convolution module compensates for any neighboring glare details that may be lost after flattening, thereby re-emphasizing local texture and reflection patterns within the global receptive field. The dynamic channel attention module generates input-dependent channel weights in real-time with extremely low computational overhead, suppressing redundant channels while significantly amplifying discriminative glare and texture channels to ensure robust discriminative features at output.

[0039] The following detailed description of the implementation principles, model training, and inference process of the glare state space module and its built-in modules, with reference to specific embodiments, is provided below.

[0040] (1) Glare state space module: In this embodiment, the glare state space module is used to capture the global reflection difference of glare on the surface of real skin and prosthesis through its built-in visual state subspace module. Then, the discriminative features are adaptively amplified by the two-dimensional redundancy suppression convolution module and the dynamic channel attention module, thereby optimizing the decision boundary and enhancing the generalization ability of the classifier in unknown lighting scenarios.

[0041] refer to Figure 2 Assuming input features The shape is [N,C,H,W], where N is the batch size, C is the number of feature map channels, and H and W are the height and width of the feature map, respectively.

[0042] First, the input features will be reshaped, and the reshaped features will be... The feature vectors are of shape [N, L, C] and are normalized and reshaped to obtain the features. The shape is [N,L,C], where L equals H*W.

[0043]

[0044] in, Indicates feature reshaping, Representation layer normalization.

[0045] Subsequently, features It will be sent to the visual state subspace module to obtain features. The shape is [N, L, C]. The features... and characteristics Add them together to obtain the features. Its shape is [N,L,C].

[0046]

[0047] in, This represents the visual state subspace module.

[0048] Next, features The features are obtained by sequentially passing through layer normalization, a two-dimensional redundancy suppression convolutional module, and a dynamic channel attention module. Its shape is [N,L,C].

[0049] in, Representation layer normalization, This represents a two-dimensional redundancy suppression convolutional module. This indicates the dynamic channel attention module.

[0050] Finally, features and characteristics Adding together yields the features The shape is [N, L, C]. For features... By reshaping the features, the output features can be obtained. Its shape is [N,C,H,W].

[0051]

[0052] in, This indicates feature reshaping.

[0053] (2) Visual state subspace module: In this embodiment, the visual state subspace module is used to significantly reduce the amount of computation while preserving the global glare context through a dual-branch parallel structure, so that the model can still run in real time on the edge device and maintain good generalization ability.

[0054] refer to Figure 3 Assuming the input features are The shape is [N,L,C], where N is the batch size, L is the sequence length, and C is the number of channels.

[0055] First, input features Perform feature reshaping to obtain features The shape is [N,C,H,W], where H*W equals L.

[0056] in, This indicates feature reshaping processing.

[0057] Subsequently, for one-third, the characteristic Features are obtained by sequentially passing through convolutional layers and activation layers. Its shape is [N,C,H,W].

[0058] in, Indicates a convolutional layer. This indicates the active layer.

[0059] Next, for branch two, features Features are obtained by sequentially passing through convolutional layers, activation layers, and a two-dimensional selective scanning mechanism. Its shape is [N,C,H,W].

[0060] in, Indicates a convolutional layer. Indicates the activation layer. This refers to a two-dimensional selective scanning mechanism that effectively captures long-distance dependencies in two-dimensional space by scanning along four different directions, while mitigating the problem of forgetting local details caused by the traditional Mamba scanning method.

[0061] Finally, the features and characteristics After element-wise multiplication, the output features are obtained by sequentially passing them through convolutional layers and feature reshaping. Its shape is [N,L,C].

[0062] in, This indicates feature reshaping processing.

[0063] (3) Two-dimensional selective scanning mechanism: The two-dimensional selective scanning mechanism proposed in this embodiment aims to overcome the inherent defects of the traditional Mamba state-space model, which destroys the two-dimensional neighborhood structure between pixels and leads to the loss of local details when processing two-dimensional images by flattening them into one-dimensional sequences. The core idea of ​​this mechanism is to preserve and fuse local neighborhood information in two-dimensional space through a four-directional scanning strategy while maintaining the linear computational complexity advantage of the state-space model, thereby more effectively capturing the long-distance dependencies of the image.

[0064] refer to Figure 4 Assuming the input feature map The shape is [N,C,H,W], where N is the batch size, C is the number of feature map channels, and H and W are the height and width of the feature map, respectively.

[0065] First, input feature map The sequence is expanded along four different directions to generate four independent scan sequences. Each expanded sequence is then scanned to simultaneously capture long-range dependencies in both the horizontal and vertical dimensions. The four scan directions are as follows: Scan the feature map row by row from the top left pixel to the bottom right pixel to obtain the sequence. ; Scan the feature map row by row from the top right pixel to the bottom left pixel to obtain the sequence. ; Scanning from the bottom left pixel to the top right pixel of the feature map in column order yields the sequence. ; Scanning from the bottom right pixel of the feature map to the top left pixel in column order yields the sequence. ; All shapes are [N,C,L], where L equals H*W.

[0066]

[0067]

[0068]

[0069] in, The scanning order is indicated by row-wise forward expansion (row-first, from left to right, from top to bottom). This indicates that rows are expanded in reverse order (row priority, from right to left, from top to bottom). This indicates a forward column expansion (column priority, from top to bottom, from left to right). This indicates that the columns are expanded in reverse order (column priority, from bottom to top, from left to right).

[0070] Next, for each expanded sequence, a selective state-space model is applied independently to obtain the output sequence. , , , The shapes are all [N, C, L]. The processing operations of the selective state-space model include: selectively updating the state and outputting the new state and output value based on the current input and previous hidden states. The selectivity is reflected in the fact that the parameters of the state transition and output equations are functions related to the input sequence, allowing them to dynamically adapt to the input content.

[0071]

[0072]

[0073]

[0074] in, This represents a selective state-space model.

[0075] Subsequently, the four processed output sequences were reconstructed back into a two-dimensional feature map format to obtain feature maps in four directions. , , and All shapes are [N,C,H,W].

[0076]

[0077]

[0078]

[0079] in, This indicates a forward and reverse mapping of rows. Indicates the reverse mapping of rows. This indicates a forward and reverse mapping of columns. This indicates the reverse mapping of columns.

[0080] Finally, the four feature maps are weighted and summed using four learnable parameters to obtain the output feature. Its shape is [N,C,H,W].

[0081] in, , , , This represents four learnable parameters.

[0082] (4) Two-dimensional redundancy suppression convolution module: In this embodiment, the dual-dimensional redundancy suppression convolution module aims to explicitly suppress spatial and channel-dimensional redundancy information in the feature map, thereby improving the discriminative power of glare features. This module first uses a spatial redundancy suppression module to explicitly separate the effective and redundant information regions along the spatial dimension and suppress spatial redundancy. Considering that the redundant regions still contain subtle glare information, a specific cross-addition strategy is used to fuse potentially useful information from the redundant regions into the effective information regions, enhancing the expressive power of spatial features and suppressing pure noise regions, thus enhancing feature expressive power. Subsequently, the channel redundancy suppression module separates the fused features and processes them using grouped convolution and point convolution paths respectively. Finally, the results of the two paths are fused using adaptive weights based on channel attention, dynamically suppressing redundant channels and highlighting channel features crucial for glare liveness detection.

[0083] refer to Figure 5 Assuming the input feature map The shape is [N,C,H,W], where N is the batch size, C is the number of channels, and H and W are the height and width of the feature map, respectively.

[0084] First, input the feature map. After normalization and activation layers, the features are obtained. Its shape is [N,C,H,W].

[0085] in, Indicates normalization, This indicates the active layer.

[0086] Subsequently, features The results obtained after passing through two gating modules are compared with the input features. Perform feature multiplication to obtain the features and The shapes are all [N,C,H,W], and the two features store valid information and redundant information respectively.

[0087]

[0088] in, and These represent gate control module 1 and gate control module 2, respectively.

[0089] Next, we will discuss the features separately. and Perform feature separation to obtain features and ,feature and The purpose of cross-adding the above four features is to superimpose redundant details into the effective information, and then concatenate the features to obtain the final feature set. Its shape is [N,C,H,W].

[0090]

[0091]

[0092] in, Indicates feature separation, This indicates feature splicing. This completes the spatial redundancy suppression process.

[0093] Subsequently, separation features , to obtain features and The two separated features are then passed through convolutional layers to obtain the feature vectors. and ,

[0094]

[0095]

[0096] in, Indicates feature separation, This indicates a convolutional layer.

[0097] Next, features After performing grouped convolution and point convolution respectively, the two resulting features are summed to obtain the feature. .feature The features obtained after point convolution are then combined with... By splicing, features are obtained. ,

[0098]

[0099] in, Represents grouped convolution. Represents point convolution. This indicates feature splicing.

[0100] Finally, splicing features and characteristics To obtain splicing features For features The channel weights are obtained by performing pooling and softmax processing sequentially. The weight and feature After performing element-wise feature multiplication, the output feature is obtained. Its shape is [N,C,H,W].

[0101]

[0102]

[0103] in, Indicates feature splicing, Indicates the pooling module, This indicates softmax processing. At this point, the channel redundancy suppression process is complete.

[0104] (5) Dynamic Channel Attention Module: In this embodiment, the dynamic channel attention module is used to re-label channel weights in real time based on the material reflection differences displayed by the current input, suppressing redundant bands, thereby providing adaptive discrimination information for the model.

[0105] refer to Figure 6 Assuming input features The shape is [N,C,H,W], where N is the batch size, C is the number of feature map channels, and H and W are the height and width of the feature map, respectively.

[0106] First, input features The sequence of convolutional layers, GELU activation layers, and another convolutional layer, through this compression-expansion structure, reduces computational cost while introducing nonlinear transformation capabilities to obtain features. Its shape is [N,C,H,W].

[0107] in, Indicates a convolutional layer. This indicates the GELU activation layer.

[0108] Subsequently, the features Global average pooling is performed to aggregate the H*W features of each channel into a scalar, which is then passed sequentially through a convolutional layer, a ReLU activation layer, another convolutional layer, and a Sigmoid activation layer to obtain the weight coefficients. The shape is [N,C,1,1].

[0109] in, Indicates global average pooling. Indicates a convolutional layer. Indicates the ReLU activation layer. This indicates the sigmoid activation layer.

[0110] Finally, the input features are multiplied by the weights to highlight key information and suppress redundant information, thus obtaining the output features. Its shape is [N,C,H,W].

[0111] in, This represents the weighting coefficient.

[0112] (6) Model training and inference: During model training, before inputting training sample images into the liveness detection model, the input images need to be processed using methods such as random rotation, random flipping, random shuffling by patch, adding Gaussian noise, and random contrast enhancement to improve the richness of the training samples. Subsequently, the input images are normalized, limiting the pixel values ​​to between 0 and 1.

[0113] In this embodiment, the training period of the model is 200 epochs. When the model is trained to 200 epochs, the model loss converges. The batch size is 1024, the learning rate is 0.01, the optimizer is SGD, the momentum is 0.9, and the optimizer tuning strategy is StepLR.

[0114] During model inference, the image is normalized before being input into the model. After the input image passes through a deep neural network based on a glare state space module, a liveness score of shape [N,1] is obtained. If the liveness score is greater than 0.5, the input is judged to be a real person; if it is less than 0.5, it is judged to be a fake.

[0115] Example 2 This embodiment provides a liveness detection device based on glare perception state space modeling, comprising: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the method as described in Embodiment 1.

[0116] The detection device includes a processor and a memory, and may also include an input system and an output system. The processor, memory, input system, and output system can be connected via a bus or other means. The input system can receive input digital or character information, as well as signal inputs that generate the method of this invention. The output system may include a display device such as a screen.

[0117] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions / modules corresponding to the methods in the embodiments of this application. Memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required for at least one function; the data storage area may store data created by the use of the method of this invention, etc. Furthermore, memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0118] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. This processor is typically used to control the overall operation of the detection device. In this embodiment, the processor is used to run program code stored in memory or process data. The processor of the detection device in this embodiment executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in memory, thereby implementing the steps of the above-described method embodiments.

[0119] It should be understood that, where there is no conflict, all the embodiments, features and advantages described above for the detection method according to the present invention are equally applicable to the detection device of the present invention.

[0120] Those skilled in the art will also understand that the various exemplary logic blocks, modules, and algorithmic steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of the various illustrative components, blocks, modules, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0121] Those skilled in the art will understand that the above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0122] Within the framework of this invention, the technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the present invention exist, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A liveness detection method based on glare perception state space modeling, characterized in that, Includes the following steps: Acquire the image of the face to be detected for glare; Feature extraction is performed on the glare face image, and the extracted feature map is input into a deep neural network based on the glare state space module. After feature transformation and classification, a liveness score is output. The liveness score is used to determine whether the object to be tested is a real living organism. The glare state space module is used to: unfold its input feature map into sequence data along multiple scanning directions; apply a selective state space model to the sequence data in each scanning direction to capture long-distance dependencies in the glare face image; and fuse and reshape the processed sequence data into a two-dimensional feature map as the output of the glare state space module.

2. The liveness detection method based on glare perception state space modeling according to claim 1, characterized in that, The deep neural network comprises, in sequence: A basic convolutional module, N stages, a pooling module, and a classifier; Each stage consists of a glare state space module and a downsampling module, where N is an integer greater than 1.

3. The liveness detection method based on glare perception state space modeling according to claim 1, characterized in that, The process of fusing and reshaping the processed sequence data into a two-dimensional feature map specifically involves: The processed sequence data are inversely mapped back to the two-dimensional feature map format to obtain feature maps for each scanning direction. The feature maps of each scanning direction are weighted and summed using learnable weight parameters to obtain a fused two-dimensional feature map.

4. The liveness detection method based on glare perception state space modeling according to claim 1, characterized in that, The glare state space module sequentially integrates the following modules: The visual state subspace module processes input features to capture long-range glare context dependencies while preserving the two-dimensional spatial structure of the image. The two-dimensional redundancy suppression convolution module processes the features output by the visual state subspace module to suppress redundant information in both spatial and channel dimensions. The dynamic channel attention module processes the features output by the two-dimensional redundancy suppression convolution module to adaptively calibrate key glare discrimination features.

5. The liveness detection method based on glare perception state space modeling according to claim 4, characterized in that, The visual state subspace module processes the input feature sequence in the following manner: Reshape the input feature sequence into a two-dimensional feature map; The first branch features are obtained by performing convolution and activation processing on the two-dimensional feature map through the first branch. The second branch performs convolution and activation processing on the two-dimensional feature map, and further processes it through a two-dimensional selective scanning mechanism to obtain the second branch features; The first branch features and the second branch features are multiplied element-wise, and then convolution and reshaping are performed to output the final feature sequence.

6. The liveness detection method based on glare perception state space modeling according to claim 4, characterized in that, The two-dimensional redundancy suppression convolutional module sequentially performs spatial redundancy suppression and channel redundancy suppression: The spatial redundancy suppression separates the effective information region and the redundant information region from the input features through a gating mechanism, and then performs cross-fusion. The channel redundancy suppression process involves processing the input features through dual-path convolution and adaptively fusing the outputs of the two paths based on channel attention.

7. The liveness detection method based on glare perception state space modeling according to claim 6, characterized in that, The spatial redundancy suppression specifically includes: Generate spatial attention weights based on input features; The first gating module and the second gating module are used to separate the effective information features and the redundant information features from the input features; The effective information features and redundant information features are cross-added and spliced ​​to complete spatial redundancy suppression.

8. The liveness detection method based on glare perception state space modeling according to claim 6, characterized in that, The channel redundancy suppression specifically includes: The features output by spatial redundancy suppression are separated into first path features and second path features; The first path features are respectively processed by group convolution and point convolution, and then the features are added element by element; The second path feature is processed by point convolution and then concatenated with its own residual. The outputs from the two processed paths are concatenated and fused using adaptive weights based on channel attention to output the final feature.

9. The liveness detection method based on glare perception state space modeling according to claim 4, characterized in that, The dynamic channel attention module processes input features through the following process: The input features are sequentially subjected to a first convolution, GELU activation, and a second convolution to obtain intermediate features; The intermediate features are subjected to global average pooling, and then sequentially processed by the first convolution, ReLU activation, second convolution, and Sigmoid activation to generate channel weight vectors. The channel weight vector is multiplied by the input features of the dynamic channel attention module to obtain the output features.

10. A liveness detection device based on glare perception state space modeling, characterized in that, include: One or more processors; Memory; One or more computer programs; The one or more computer programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method as described in any one of claims 1-10.