Infrared small target detection device and method based on Mama state space model
By using an infrared small target detection device based on the Mamba state-space model, the problems of traditional methods in capturing long-distance dependencies and high computational complexity are solved, achieving efficient and accurate detection on resource-constrained devices, and improving detection accuracy and model applicability.
Patent Information
- Application Number
- CN202512015143.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional infrared small target detection methods have limitations in capturing long-distance dependencies and are computationally complex, making it difficult to perform efficient and accurate detection on devices with limited computing resources.
An infrared small target detection device based on the Mamba state space model is adopted. Through selective state space blocks, state space reconstruction and selective gating mechanisms, combined with multi-scale feature aggregation and a lightweight detection head, feature extraction and target detection are achieved.
It improves the accuracy of small object detection, reduces the number of model parameters and computational complexity, making it suitable for deployment on resource-constrained devices, and enhances detection quality through multi-task loss functions and state space regularization strategies.
Smart Images

Figure CN121982285A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of infrared image processing technology, and in particular to an infrared small target detection device and method based on the Mamba state space model. Background Technology
[0002] Infrared small target detection has significant application value in fields such as military reconnaissance and security monitoring. Traditional infrared small target detection methods mainly rely on convolutional neural networks (CNNs) and Transformer architectures. While CNNs have good local feature extraction capabilities, they have limitations in capturing long-range dependencies. Although Transformers can establish global correlations, they have high computational complexity and are prone to attention diversion when dealing with small targets.
[0003] In recent years, state-space models (SSMs), represented by Mamba, have demonstrated superior performance. Compared to traditional methods, SSMs have linear computational complexity, making them more suitable as the foundation for lightweight models. SSMs have unique advantages in modeling sequential data and capturing long-range dependencies, which is of great significance for detecting small targets in infrared images. In practical applications, infrared detection equipment often needs to consider computational resource constraints; therefore, developing lightweight and efficient detection models has significant practical value. Summary of the Invention
[0004] The purpose of this application is to provide an infrared small target detection device and method based on the Mamba state-space model, so as to achieve efficient and accurate infrared small target detection under limited computing resources.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] On the one hand, this application provides an infrared small target detection device based on the Mamba state-space model, comprising:
[0007] The data preprocessing module is used to preprocess the original infrared images to obtain an infrared image set, and divide the infrared image set into a training set, a validation set, and a test set.
[0008] The model building module is used to build an infrared small target detection model based on the Mamba state space model.
[0009] The model training module is used to input the infrared images of the training set and validation set into the infrared small target detection model for target detection training;
[0010] The results output module is used to input the infrared images of the test set into the trained infrared small target detection model to obtain the detection results of infrared small targets.
[0011] Preferably, the model building module includes a feature extraction network, wherein:
[0012] The feature extraction network is composed of multiple cascaded selective state space modules, which are used to model long sequence features through linear attention mechanism and state space reconstruction.
[0013] Preferably, the selective state space module includes a selective state space block and a local feature enhancement unit, wherein:
[0014] The selective state space block includes two parallel processing paths, one of which includes linear transformation and SiLU activation function, and the other includes linear transformation, state space reconstruction, selective gating and layer normalization.
[0015] The local feature enhancement unit adopts a residual structure to enhance local information representation through multi-scale feature extraction.
[0016] Preferably, the model building module includes a multi-scale feature aggregation module, wherein:
[0017] The multi-scale feature aggregation module includes a state space reconstruction unit and a selective gating mechanism unit:
[0018] The state space reconstruction unit is used to calculate channel weights based on state space reconstruction and adaptive linear transformation.
[0019] The selective gating mechanism unit is used to generate spatial feature weight mapping through a selective gating mechanism.
[0020] Preferably, the multi-scale feature aggregation module further includes a feature fusion unit:
[0021] The feature fusion unit is used to perform feature fusion using element-wise multiplication.
[0022] Preferably, the device further includes a model optimization module:
[0023] The model optimization module is used to optimize the infrared small target detection model using an adaptive loss function and a state space regularization strategy.
[0024] Preferably, the model building module includes a detection head:
[0025] The detection head includes a classification branch, a regression branch, and a centrality branch, wherein:
[0026] The classification branch is used to predict the probability of the target category;
[0027] The regression branch is used to predict the target bounding box offset;
[0028] The centrality branch is used to predict the target centrality score.
[0029] Preferably, the detection head adopts a lightweight design.
[0030] On the other hand, this application also provides an infrared small target detection method based on the Mamba state-space model, including:
[0031] The original infrared images are preprocessed to obtain an infrared image set, which is then divided into a training set, a validation set, and a test set.
[0032] Construct an infrared small target detection model based on the Mamba state-space model;
[0033] The infrared images from the training set and validation set are input into the infrared small target detection model for target detection training.
[0034] The infrared images from the test set are input into the trained infrared small target detection model to obtain the detection results of infrared small targets.
[0035] On the other hand, this application also provides an electronic device,
[0036] A processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the method as described in any of the preceding claims.
[0037] Based on the above technical solution, this application can achieve the following technical effects:
[0038] 1. By introducing selective state space blocks as basic feature extraction units, long-range dependencies in infrared images can be effectively captured, improving the accuracy of small target detection;
[0039] 2. By adopting state-space reconstruction and selective gating mechanisms, the number of model parameters and computational complexity are significantly reduced, making the model more suitable for deployment on resource-constrained devices;
[0040] 3. Design a multi-scale feature aggregation module to enhance the model's ability to detect small targets at different scales through adaptive feature fusion;
[0041] 4. A multi-task loss function and state space regularization strategy are adopted to balance the tasks and improve the quality of the detection results. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of an infrared small target detection device based on the Mamba state-space model provided in an embodiment of this application;
[0043] Figure 2This is a schematic diagram of a detection model structure based on the Mamba state space model provided in an embodiment of this application;
[0044] Figure 3 This is a schematic diagram of a selective state space block structure provided in an embodiment of this application;
[0045] Figure 4 This is a schematic diagram of the structure of a multi-scale feature aggregation module provided in an embodiment of this application;
[0046] Figure 5 This is a schematic diagram of the detection head structure provided in one embodiment of this application;
[0047] Figure 6 This is a flowchart illustrating an infrared small target detection method based on the Mamba state-space model provided in an embodiment of this application. Detailed Implementation
[0048] The present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. The advantages and features of the present application will become clearer from the following description and claims. It should be noted that the drawings are all in a very simplified form and are not to scale, and are only used to facilitate and clarify the illustration of the embodiments of the present application.
[0049] It should be noted that, in order to clearly illustrate the content of this application, several embodiments are provided to further explain the different implementations of this application. These embodiments are enumerated rather than exhaustive. Furthermore, for the sake of brevity, content mentioned in the preceding embodiments is often omitted in the following embodiments. Therefore, content not mentioned in the following embodiments can be referred to in the preceding embodiments.
[0050] Example 1
[0051] like Figure 1 The diagram shown is a schematic of an infrared small target detection device based on the Mamba state-space model provided in this embodiment. It includes:
[0052] The data preprocessing module 102 is used to preprocess the original infrared images to obtain an infrared image set, and divide the infrared image set into a training set, a validation set and a test set;
[0053] Model building module 104 is used to build an infrared small target detection model based on the Mamba state space model;
[0054] The model training module 106 is used to input the infrared images of the training set and the validation set into the infrared small target detection model for target detection training;
[0055] The result output module 108 is used to input the infrared images of the test set into the trained infrared small target detection model to obtain the detection results of the infrared small targets.
[0056] Preferably, the model building module includes a feature extraction network, wherein:
[0057] The feature extraction network is constructed using multiple cascaded selective state space modules. These modules are used to model long-sequence features through a linear attention mechanism and state space reconstruction. This significantly reduces computational complexity while maintaining the ability to model long-sequence and multi-scale features.
[0058] Preferably, the selective state space module includes a selective state space block and a local feature enhancement unit, wherein:
[0059] The selective state space block comprises two parallel processing pathways. One pathway includes linear transformation and the SiLU activation function, while the other includes linear transformation, state space reconstruction, selective gating, and layer normalization. Based on this, the selective state space block is introduced as a fundamental feature extraction unit, effectively capturing long-range dependencies in infrared images and improving the accuracy of small target detection.
[0060] The local feature enhancement unit adopts a residual structure to enhance local information representation through multi-scale feature extraction.
[0061] Preferably, the model building module includes a multi-scale feature aggregation module, wherein:
[0062] The multi-scale feature aggregation module includes a state-space reconstruction unit and a selective gating mechanism unit. The state-space reconstruction unit is used to calculate channel weights based on state-space reconstruction and using adaptive linear transformation. The selective gating mechanism unit is used to generate spatial feature weight mappings through a selective gating mechanism. Based on this, the use of state-space reconstruction and selective gating significantly reduces the number of model parameters and computational complexity, making the model more suitable for deployment on resource-constrained devices.
[0063] Preferably, the multi-scale feature aggregation module further includes a feature fusion unit:
[0064] The feature fusion unit is used to perform feature fusion using element-wise multiplication.
[0065] Preferably, the device further includes a model optimization module:
[0066] The model optimization module is used to optimize the infrared small target detection model using an adaptive loss function and a state space regularization strategy. Based on this, the accuracy and generalization performance of small target detection are improved, tasks are balanced, and the quality of detection results is enhanced.
[0067] Preferably, the model building module includes a detection head:
[0068] The detection head includes a classification branch, a regression branch, and a centrality branch, wherein:
[0069] The classification branch is used to predict the probability of the target category;
[0070] The regression branch is used to predict the target bounding box offset;
[0071] The centrality branch is used to predict the target centrality score.
[0072] Preferably, the detection head adopts a lightweight design.
[0073] In one specific embodiment, the infrared small target detection model structure is as follows: Figure 2 As shown, the detection model mainly consists of a feature extraction network, a multi-scale feature aggregation module, and a detection head.
[0074] The feature extraction network includes multiple visual state space modules, each consisting of a selective state space block and a local feature enhancement unit. The selective state space block contains two parallel processing paths: the first path consists of linear transformation and the SiLU activation function, and the second path includes linear transformation, state space reconstruction, selective gating, and layer normalization. The local feature enhancement unit employs a residual structure to enhance local information representation through multi-scale feature extraction. Figure 3 As shown, the selective state space block contains two parallel processing paths:
[0075] 1) First path: Linear transformation → SiLU activation function;
[0076] 2) Second path: Linear transformation → State space reconstruction → Selective gating → Layer normalization;
[0077] 3) Finally, the two output paths are merged by element-wise multiplication.
[0078] The multi-scale feature aggregation module employs an adaptive feature fusion mechanism, achieving cross-scale feature interaction through selective gating; based on a state space reconstruction mechanism, it achieves adaptive feature fusion through selective attention, including two dimensions: channel attention and spatial attention. Figure 4 As shown:
[0079] 1) Channel attention calculation:
[0080] Based on state-space reconstruction, channel weights are calculated using adaptive linear transformation.
[0081] 2) Spatial attention calculation:
[0082] Spatial feature weight mapping is generated through a selective gating mechanism.
[0083] 3) Feature fusion:
[0084] F_out=F+F⊙F_channel+F⊙F_spatial
[0085] Where ⊙ represents element-wise multiplication, F represents the feature map, F_channel represents the channel attention feature map, F_spatial represents the spatial attention feature map, and F_out represents the output feature map.
[0086] like Figure 5 As shown, the detection head adopts a lightweight design and includes classification, regression, and centrality branches;
[0087] 1) Classification branch: Predicts the probability of the target category;
[0088] 2) Regression branch: Predicts the target bounding box offset;
[0089] 3) Centrality branch: Predict the centrality score of the target.
[0090] In one specific embodiment, the model optimization module is used to optimize the infrared small target detection model using an adaptive loss function and a state space regularization strategy:
[0091] Loss=λ1Lcls+λ2Lreg+λ3Lcenterness
[0092] Where Lcls is the classification loss, using Focal Loss; Lreg is the regression loss, using GIoU Loss; Lcenterness is the centrality loss, using BCE Loss; λ1, λ2, and λ3 are weight coefficients.
[0093] In one specific embodiment, the result output module inputs the test image into the trained model, processes it through non-maximum suppression (NMS), and obtains the final detection result.
[0094] In summary, this device introduces selective state space blocks as the basic feature extraction unit, effectively capturing long-range dependencies in infrared images and improving the accuracy of small target detection. It employs state space reconstruction and selective gating mechanisms to significantly reduce the number of model parameters and computational complexity, making the model more suitable for deployment on resource-constrained devices. A multi-scale feature aggregation module is designed to enhance the model's ability to detect small targets at different scales through adaptive feature fusion. A multi-task loss function and state space regularization strategy are used to balance various tasks and improve the quality of detection results.
[0095] Example 2
[0096] This embodiment provides an infrared small target detection method based on the Mamba state-space model, the method specifically including the following steps:
[0097] The original infrared images are preprocessed to obtain an infrared image set, which is then divided into a training set, a validation set, and a test set.
[0098] Construct an infrared small target detection model based on the Mamba state-space model;
[0099] The infrared images from the training set and validation set are input into the infrared small target detection model for target detection training.
[0100] The infrared images from the test set are input into the trained infrared small target detection model to obtain the detection results of infrared small targets.
[0101] In a specific embodiment, the detailed implementation process of the infrared small target detection method based on the Mamba state-space model is as follows: Figure 6 As shown.
[0102] S1, Data Preprocessing
[0103] Infrared images are acquired and preprocessed, including normalization and data augmentation. Data augmentation includes random flipping, rotation, and scaling to improve the model's generalization ability. The processed image set is then divided into training, validation, and test sets in an 8:1:1 ratio.
[0104] S2, Model Building
[0105] like Figure 2 As shown, the infrared small target detection model constructed in this invention comprises three main parts:
[0106] 1) Feature extraction network: It consists of multiple selective state space modules connected in series. Each module contains a selective state space block and a local feature enhancement unit.
[0107] 2) Multi-scale feature aggregation module: Employs state space reconstruction and selective gating mechanisms to achieve cross-scale feature interaction;
[0108] 3) Detection head: Includes classification, regression and centrality branches, and adopts a lightweight design.
[0109] like Figure 3 As shown, the selective state space block contains two parallel processing paths:
[0110] 1) First Pathway: Linear Transformation → SiLU Activation Function
[0111] 2) Second path: Linear transformation → State space reconstruction → Selective gating → Layer normalization
[0112] Finally, the two output paths are merged through element-wise multiplication.
[0113] like Figure 4 As shown, the implementation of the multi-scale feature aggregation module includes:
[0114] 1) Channel attention calculation:
[0115] Based on state-space reconstruction, channel weights are calculated using adaptive linear transformation.
[0116] 2) Spatial attention calculation:
[0117] Spatial feature weight mapping is generated through a selective gating mechanism.
[0118] 3) Feature fusion:
[0119] F_out=F+F⊙F_channel+F⊙F_spatial
[0120] Here, ⊙ represents element-wise multiplication.
[0121] like Figure 5 As shown, the detection head uses parallel branches:
[0122] 1) Classification branch: Predicting the probability of the target class.
[0123] 2) Regression branch: Predict the target bounding box offset
[0124] 3) Centrality branch: Predict the target centrality score
[0125] S3, Model Training
[0126] Model optimization is performed using a multi-task loss function and a state-space regularization strategy.
[0127] Loss=λ1Lcls+λ2Lreg+λ3Lcenterness
[0128] S4, Target Detection
[0129] The test image is input into the trained model and processed by non-maximum suppression (NMS) to obtain the final detection result.
[0130] Example 3
[0131] In another feasible embodiment, this embodiment provides a device for infrared small target detection based on the Mamba state-space model, the device specifically including:
[0132] A processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the steps as described in any of the above method embodiments.
[0133] Example 4
[0134] In another feasible embodiment, this embodiment provides a storage medium for infrared small target detection based on the Mamba state-space model, wherein the storage medium may specifically include:
[0135] The storage medium stores a processing program for infrared small target detection based on the Mamba state space model. When the processor executes the processing program for infrared small target detection based on the Mamba state space model, it implements the steps as described in any of the above method embodiments.
[0136] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. An infrared small target detection device based on the Mamba state-space model, characterized in that, include: The data preprocessing module is used to preprocess the original infrared images to obtain an infrared image set, and divide the infrared image set into a training set, a validation set, and a test set. The model building module is used to build an infrared small target detection model based on the Mamba state space model. The model training module is used to input the infrared images of the training set and validation set into the infrared small target detection model for target detection training; The results output module is used to input the infrared images of the test set into the trained infrared small target detection model to obtain the detection results of infrared small targets.
2. The method according to claim 1, characterized in that, The model building module includes a feature extraction network, wherein: The feature extraction network is composed of multiple cascaded selective state space modules, which are used to model long sequence features through linear attention mechanism and state space reconstruction.
3. The method according to claim 2, characterized in that, The selective state space module includes a selective state space block and a local feature enhancement unit, wherein: The selective state space block includes two parallel processing paths, one of which includes linear transformation and SiLU activation function, and the other includes linear transformation, state space reconstruction, selective gating and layer normalization. The local feature enhancement unit adopts a residual structure to enhance local information representation through multi-scale feature extraction.
4. The method according to claim 1, characterized in that, The model building module includes a multi-scale feature aggregation module, wherein: The multi-scale feature aggregation module includes a state space reconstruction unit and a selective gating mechanism unit, wherein: The state space reconstruction unit is used to calculate channel weights based on state space reconstruction and adaptive linear transformation. The selective gating mechanism unit is used to generate spatial feature weight mapping through a selective gating mechanism.
5. The method according to claim 4, characterized in that, The multi-scale feature aggregation module also includes a feature fusion unit: The feature fusion unit is used to perform feature fusion using element-wise multiplication.
6. The method according to claim 1, characterized in that, The device also includes a model optimization module: The model optimization module is used to optimize the infrared small target detection model using an adaptive loss function and a state space regularization strategy.
7. The method according to claim 1, characterized in that, The model building module includes a detection head: The detection head includes a classification branch, a regression branch, and a centrality branch, wherein: The classification branch is used to predict the probability of the target category; The regression branch is used to predict the target bounding box offset; The centrality branch is used to predict the target centrality score.
8. The method according to claim 7, characterized in that, The detection head features a lightweight design.
9. A method based on the infrared small target detection device according to claims 1-8, characterized in that, include: The original infrared images are preprocessed to obtain an infrared image set, which is then divided into a training set, a validation set, and a test set. Construct an infrared small target detection model based on the Mamba state-space model; The infrared images from the training set and validation set are input into the infrared small target detection model for target detection training. The infrared images from the test set are input into the trained infrared small target detection model to obtain the detection results of infrared small targets.
10. An electronic device, characterized in that, include: processor; And a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the method as described in claim 9.