A real-time infrared small target detection method based on dynamic selective transformer
By introducing a dynamic selective Transformer and multi-scale feature fusion method, the problem of background perturbation in infrared small target detection is solved, achieving efficient and accurate target detection, which is suitable for complex backgrounds and low-contrast environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-31
AI Technical Summary
Existing infrared small target detection methods are prone to the problem of attention allocation bias towards the background area in complex backgrounds, which leads to reduced attention to the target area, affects detection accuracy and increases computational overhead.
A real-time infrared small target detection method based on dynamic selective Transformer is adopted. By introducing a partial feature progressive pooling (PFPR) module and a dynamic selective Transformer (DST) module, and utilizing multi-scale feature fusion and dynamic sparse self-attention (DSSA) mechanism, the target region is prioritized, the homogeneity of background features is reduced, and the target detection performance is improved.
Under complex background and low contrast conditions, it significantly improves the detection accuracy of small infrared targets, reduces the false alarm rate and false negative rate, enhances the real-time performance and computational efficiency of the system, has strong adaptability, and can run efficiently on embedded devices.
Smart Images

Figure CN122493328A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of target detection technology, and in particular relates to a real-time infrared small target detection method based on dynamic selective Transformer. Background Technology
[0002] With the advancement of modern technology, infrared small target detection plays a crucial role in surveillance, imaging, and navigation systems. Especially in real-time detection, the demand for edge devices with limited computing resources is increasing, making low-power and efficient real-time detection technologies critical. However, existing detection methods, such as semantic segmentation-based detection models, typically face high computational overhead and performance bottlenecks in real-time target detection. Particularly in infrared images, the high uniformity of the background region can easily lead to over-attention of background features in the attention mechanism, thus affecting the detection accuracy of small targets. Therefore, there is an urgent need for a new method that can efficiently and accurately perform infrared small target detection in real-time environments, especially under low-contrast and complex background conditions.
[0003] Existing real-time infrared small target detection methods include those based on convolutional neural networks (CNNs), such as the YOLO series, and real-time detection networks based on Transformers (such as RT-DETR). These methods typically perform target detection through convolutional feature extraction and multi-scale fusion. However, Transformer-based networks like RT-DETR face a key problem when applied to infrared small target detection: due to the uniformity of the background region, the attention mechanism in the Transformer often allocates more attention to the background region, resulting in insufficient attention to the target region and thus affecting detection performance. This problem arises from the characteristics of self-attention computation in the Transformer layers and the high similarity of background region features.
[0004] Existing technologies primarily employ two strategies to address the infrared small target detection problem: one is a detection method based on convolutional neural networks, which captures target features through multi-scale feature extraction; the other is a detection method based on Transformers, such as RT-DETR, which uses a query vector encoded by position for target localization. While these methods improve the accuracy and efficiency of target detection to some extent, the problem of background-biased attention allocation still exists in infrared small target detection, especially against complex backgrounds. RT-DETR improves computational efficiency through a simplified encoding and decoding structure, but its background attention bias is particularly pronounced when processing infrared images.
[0005] The main drawback of existing technologies is the bias in attention mechanisms during infrared small target detection. In infrared images, background regions often have high similarity to target regions, leading to a larger proportion of background features being allocated in the Transformer, further reducing the attention given to the target region. This uneven attention distribution not only affects the model's detection accuracy but also increases computational overhead. In multi-layer Transformer structures, this bias intensifies with increasing layer count, creating a self-reinforcing loop that further degrades target detection performance. Summary of the Invention
[0006] This invention aims to address the problem of background bias in attention allocation during infrared small target detection in existing technologies. Existing methods, when processing infrared images with strong background uniformity, cannot effectively avoid over-focusing on background features, leading to the neglect of target features and thus affecting detection performance. To address this, this invention proposes a real-time infrared small target detection scheme based on Dynamic Selective Transformer. Based on a novel Real-Time Infrared Small Target Detection Transformer Network (RT-IstDT), it effectively reduces the feature homogeneity of the background region and improves the detection accuracy of the target region by introducing a Partial Feature Progressive Pooling (PFPR) module and a Dynamic Selective Transformer (DST) module. Specifically, the PFPR module reduces the homogeneity of background features through multi-scale feature diversification, while the DST module prioritizes the features of the target region through a Dynamic Sparse Self-Attention (DSSA) mechanism, thereby overcoming the attention allocation bias problem in existing technologies and improving the detection performance of infrared small targets.
[0007] The first aspect of this invention proposes a real-time infrared small target detection method based on dynamic selective Transformer, the method comprising: Step S1: Acquire real-time images from the infrared sensor, and preprocess and extract features from the real-time images through the input layer; Step S2: The extracted features are transmitted to the feature fusion module to enhance the target features in the real-time image through multi-scale feature fusion. Step S3: The fused features enter the DST module, which uses a dynamic sparse self-attention mechanism to selectively focus on small infrared target regions in the image, while maintaining the enhanced target features through the fine feature enhancer SFEFN. Step S4: Transmit the feature data of the infrared small target region to the output layer for target localization and classification, and output the detected target location and category information.
[0008] In step S1: Real-time images of the target area are captured using multiple infrared sensors; The input layer performs preprocessing, including denoising, background suppression, and edge enhancement, to remove irrelevant noise from the image and label the temperature differences of the target. The input layer uses a convolutional neural network to extract features from the preprocessed image. The extracted features include edge, texture, and heat source features.
[0009] In step S2: The feature fusion module utilizes a multi-scale convolutional neural network (CNN) to fuse image features at different scales. It uses different convolutional kernels to extract features from different regions of the image, generating feature maps at different scales. By fusing features at different scales, it detects targets of different sizes, thereby enhancing the target features in real-time images.
[0010] In step S3: DST stands for Dynamic Selective Transformer; the DST module processes the fused features using a self-attention mechanism and calculates the attention weight for each region. By selectively allocating computational resources through a dynamic sparse self-attention mechanism, priority is given to the part containing the target region. The similarity between each region and the background region is calculated and attention is assigned accordingly.
[0011] In step S4: The target's spatial location is accurately predicted by performing bounding box regression through location encoding; at the same time, the target is classified through a fully connected layer to obtain the target's category label, and the classification result is optimized using the cross-entropy loss function.
[0012] A second aspect of this invention proposes a real-time infrared small target detection system based on a dynamic selective Transformer, the system comprising: The input layer processing module is configured to: acquire real-time images from the infrared sensor, and perform preprocessing and feature extraction on the real-time images; The feature fusion module is configured to enhance target features in real-time images through multi-scale feature fusion based on the extracted features. The DST module is configured to: based on the fused features, adopt a dynamic sparse self-attention mechanism to selectively focus on small infrared target regions in the image, while maintaining the enhanced target features through a fine feature enhancer (SFEFN). The output layer processing module is configured to: locate and classify targets based on feature data in the infrared small target region, and output the detected target location and category information.
[0013] The input layer processing module is specifically configured as follows: Acquire real-time images of the target area captured by multiple infrared sensors; Perform preprocessing, including denoising, background suppression, and edge enhancement, to remove irrelevant noise from the image and label the temperature differences of the target. Feature extraction is performed on the preprocessed image using a convolutional neural network. The extracted features include edge, texture, and heat source features.
[0014] The feature fusion module is specifically configured as follows: By using a multi-scale convolutional neural network (CNN) to fuse image features at different scales, different convolutional kernels are used to extract features from different regions of the image, generating feature maps at different scales. By fusing features at different scales, targets of different sizes are detected, thereby enhancing the target features in real-time images.
[0015] DST stands for Dynamic Selective Transformer; the DST module is specifically configured as follows: The fused features are processed by a self-attention mechanism to calculate the attention weight of each region. Computational resources are selectively allocated through a dynamic sparse self-attention mechanism, prioritizing the parts containing the target region. The similarity between each region and the background region is calculated and attention is assigned accordingly.
[0016] The output layer processing module is specifically configured as follows: The target's spatial location is accurately predicted by performing bounding box regression through location encoding; at the same time, the target is classified through a fully connected layer to obtain the target's category label, and the classification result is optimized using the cross-entropy loss function.
[0017] In summary, by introducing PFPR and DST mechanisms, this invention overcomes the structural defects of existing technologies in infrared small target detection, especially in infrared images with low contrast and complex backgrounds, enabling more accurate identification and positioning of targets, thereby improving the real-time performance and accuracy of detection. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the framework for real-time infrared small target detection based on dynamic selective Transformer according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the operation of a terminal device according to an embodiment of the present invention; Figure 3 This is a schematic diagram of real-time infrared small target identification in an urban security monitoring system according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating infrared small target identification during real-time flight of a drone according to an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The first aspect of this invention proposes a real-time infrared small target detection method based on dynamic selective Transformer, the method comprising: Step S1: Acquire real-time images from the infrared sensor, and preprocess and extract features from the real-time images through the input layer; Step S2: The extracted features are transmitted to the feature fusion module to enhance the target features in the real-time image through multi-scale feature fusion. Step S3: The fused features enter the DST module, which uses a dynamic sparse self-attention mechanism to selectively focus on small infrared target regions in the image, while maintaining the enhanced target features through the fine feature enhancer SFEFN. Step S4: Transmit the feature data of the infrared small target region to the output layer for target localization and classification, and output the detected target location and category information.
[0022] In step S1: Real-time images of the target area are captured using multiple infrared sensors; The input layer performs preprocessing, including denoising, background suppression, and edge enhancement, to remove irrelevant noise from the image and label the temperature differences of the target. The input layer uses a convolutional neural network to extract features from the preprocessed image. The extracted features include edge, texture, and heat source features.
[0023] In step S2: The feature fusion module utilizes a multi-scale convolutional neural network (CNN) to fuse image features at different scales. It uses different convolutional kernels to extract features from different regions of the image, generating feature maps at different scales. By fusing features at different scales, it detects targets of different sizes, thereby enhancing the target features in real-time images.
[0024] In step S3: DST stands for Dynamic Selective Transformer; the DST module processes the fused features using a self-attention mechanism and calculates the attention weight for each region. By selectively allocating computational resources through a dynamic sparse self-attention mechanism, priority is given to the part containing the target region. The similarity between each region and the background region is calculated and attention is assigned accordingly.
[0025] In step S4: The target's spatial location is accurately predicted by performing bounding box regression through location encoding; at the same time, the target is classified through a fully connected layer to obtain the target's category label, and the classification result is optimized using the cross-entropy loss function.
[0026] A second aspect of this invention proposes a real-time infrared small target detection system based on a dynamic selective Transformer, the system comprising: The input layer processing module is configured to: acquire real-time images from the infrared sensor, and perform preprocessing and feature extraction on the real-time images; The feature fusion module is configured to enhance target features in real-time images through multi-scale feature fusion based on the extracted features. The DST module is configured to: based on the fused features, adopt a dynamic sparse self-attention mechanism to selectively focus on small infrared target regions in the image, while maintaining the enhanced target features through a fine feature enhancer (SFEFN). The output layer processing module is configured to: locate and classify targets based on feature data in the infrared small target region, and output the detected target location and category information.
[0027] The input layer processing module is specifically configured as follows: Acquire real-time images of the target area captured by multiple infrared sensors; Perform preprocessing, including denoising, background suppression, and edge enhancement, to remove irrelevant noise from the image and label the temperature differences of the target. Feature extraction is performed on the preprocessed image using a convolutional neural network. The extracted features include edge, texture, and heat source features.
[0028] The feature fusion module is specifically configured as follows: By using a multi-scale convolutional neural network (CNN) to fuse image features at different scales, different convolutional kernels are used to extract features from different regions of the image, generating feature maps at different scales. By fusing features at different scales, targets of different sizes are detected, thereby enhancing the target features in real-time images.
[0029] DST stands for Dynamic Selective Transformer; the DST module is specifically configured as follows: The fused features are processed by a self-attention mechanism to calculate the attention weight of each region. Computational resources are selectively allocated through a dynamic sparse self-attention mechanism, prioritizing the parts containing the target region. The similarity between each region and the background region is calculated and attention is assigned accordingly.
[0030] The output layer processing module is specifically configured as follows: The target's spatial location is accurately predicted by performing bounding box regression through location encoding; at the same time, the target is classified through a fully connected layer to obtain the target's category label, and the classification result is optimized using the cross-entropy loss function.
[0031] First implementation example Figure 1 As shown, the system first acquires real-time images from an infrared sensor, and then processes and extracts features from the raw images through the input layer. The pre-processed features are then transferred to the feature fusion module. The main task of this module is to enhance target features in the image through multi-scale feature fusion, reducing the impact of background noise and making the target more prominent. Next, the fused features enter the Dynamic Selective Transformer (DST) module, the core module of the entire system. The DST module employs a Dynamic Sparse Self-Attention (DSSA) mechanism, selectively focusing on information-rich regions in the image, especially small infrared target regions, avoiding over-focusing on background features and thus effectively improving target detection accuracy. The DST module's attention mechanism ensures that the background homogeneity problem is effectively suppressed, while the Fine Feature Enhancer (SFEFN) preserves the target features enhanced by the previous processing, preventing these features from being lost in subsequent processing. Finally, the features processed through these steps enter the output layer for target localization and classification, and the system outputs the detected target location and category information.
[0032] During the operation of the terminal device, the user interacts with the system through the App terminal device, such as Figure 2 As shown, the user first uploads an infrared image, which the system receives and processes using its algorithm. After the algorithm is selected, the system performs target recognition on the image and locates the target based on its features, ultimately outputting the target's specific location and category. This entire process ensures that the user can obtain accurate target detection results in real time.
[0033] This technical solution successfully solves the problems of background disturbance and unclear target features in infrared small target detection by using techniques such as dynamic selective Transformer and multi-scale feature fusion, enabling the system to perform real-time detection efficiently and accurately even in low-contrast and complex backgrounds.
[0034] The second embodiment (real-time infrared small target detection in urban security monitoring) is as follows: Figure 3 As shown, in this embodiment, the urban monitoring system first captures real-time images of the target area using multiple infrared cameras. Image data from each camera is transmitted in real-time to the central processing unit via a wireless network. The images then enter the system's input module, which is responsible for preprocessing the raw images. Specifically, the preprocessing module performs denoising, background suppression, and edge enhancement on the input infrared images, removing irrelevant noise and highlighting temperature differences of the target. A key step in this process is low-level feature extraction from the image using a convolutional neural network (CNN). The extracted features include edges, textures, and the contours of heat sources.
[0035] After feature extraction, the image features are transmitted to the feature fusion module. The feature fusion module further fuses image features at different scales using a multi-scale convolutional neural network (CNN). Specifically, this module uses 3x3, 5x5, and 7x7 convolutional kernels to extract features from different regions of the input image, generating feature maps at different scales. By fusing features at different scales, the system can more accurately detect small targets of varying sizes while reducing the impact of background noise.
[0036] Next, the fused multi-scale feature maps enter the Dynamic Selective Transformer (DST) module. In this module, the input feature maps are first processed using a self-attention mechanism, calculating the attention weight for each region. Specifically, the DST module selectively allocates computational resources through a Dynamic Sparse Self-Attention (DSSA) mechanism, prioritizing the portions of the image containing the target region. To this end, the system calculates the similarity between each region and the background region and assigns attention accordingly.
[0037] After processing by the DST module, the target regions in the feature maps are enhanced, and these feature maps are then fed into the target localization and classification module. This module performs bounding box regression on the target using positional encoding to accurately predict the target's spatial location. Simultaneously, the target category is classified using a fully connected layer (FC) to derive the target's category label. During this process, the system uses the cross-entropy loss function to optimize the classification results, thereby improving the model's classification accuracy.
[0038] Throughout the processing flow, the system outputs the target's location and category information for each frame of image it processes. Based on the optimized target detection results, the urban security system can detect potential threats in real time and take appropriate countermeasures.
[0039] The operating environment and parameter settings are as follows: Computing device: NVIDIA RTX 3090 GPU accelerates image processing.
[0040] Input image resolution: 640x480, the image is input into the system for processing at a rate of 30 frames per second.
[0041] During system training, a batch size of 4 was used, AdamW was employed as the optimizer, the initial learning rate was 0.0001, and a cosine annealing scheduler was used.
[0042] Each training session consists of 300 epochs. During training, the system optimizes object detection accuracy using training and validation sets and ensures the model's generalization ability.
[0043] The third embodiment (infrared small target detection during real-time flight of a UAV) is as follows: Figure 4 As shown, in this embodiment, the drone is equipped with an infrared camera to capture image data along its flight path in real time. The drone's built-in computing unit is responsible for receiving and processing these images. First, the image data passes through an input module for noise reduction and edge enhancement to highlight target information in the image. Specific operations in this process include using a convolutional neural network (CNN) to extract edges, heat source regions, and the contours of target objects in the image.
[0044] After feature extraction, the image features are transmitted to the feature fusion module. In this module, feature fusion is performed using a multi-scale convolutional neural network, extracting different detailed information from the image using convolutional kernels of different sizes (e.g., 3x3, 5x5, 7x7). The goal of this module is to enhance the resolution of the target region and suppress features in the background region, thereby improving the target detection capability.
[0045] The processed multi-scale feature maps are fed into the Dynamic Selective Transformer (DST) module. The DST module prioritizes target regions for attention and suppresses the influence of background regions through the Dynamic Sparse Self-Attention (DSSA) mechanism. The DSSA mechanism selectively allocates attention by calculating the similarity of each region, ensuring that target regions receive more computational resources while background regions are ignored.
[0046] The target localization and classification module uses the feature map output by the DST module to regress the bounding box of the target using position encoding, and then performs target classification through a fully connected layer. Finally, the system feeds back the target's position and category information to the UAV's flight control system.
[0047] The operating environment and parameter settings are as follows: Computing equipment: The drone's built-in NVIDIA Jetson Nano (4GB memory) processes image data in real time.
[0048] Input image resolution: 720x480.
[0049] System processing speed: 60 frames per second (FPS).
[0050] Each image is processed in 30ms, ensuring real-time flight control.
[0051] In summary, this invention overcomes the shortcomings of existing technologies in target detection under complex backgrounds and low contrast conditions by introducing a Dynamic Selective Transformer (DST) module and a multi-scale feature fusion mechanism. This invention has the following significant technical effects: (1) Improved accuracy of target detection; Compared with traditional infrared small target detection methods based on convolutional neural networks (CNN) and semantic segmentation, this invention significantly enhances the attention allocation capability of the target region by introducing a Dynamic Selective Transformer (DST) module. The DST module can effectively suppress background features and concentrate computational resources on the target region, thereby improving the detection accuracy of small targets in complex environments. Experimental results show that in infrared images with low contrast and strong noise perturbation, the detection accuracy of this invention is improved by more than 15%, and the false alarm rate and false negative rate are significantly reduced. (2) Reduced impact of background perturbation; In traditional infrared small target detection, the homogeneity and temperature uniformity of the background region often lead to background features being too similar to target features, causing misallocation of the attention mechanism and ultimately affecting the target detection effect. By introducing the dynamic sparse self-attention (DSSA) mechanism, this invention can dynamically adjust the attention allocation, prioritizing the target region in the image that differs greatly from the background, while suppressing the influence of the background region. This mechanism reduces background noise disturbance while improving the feature representation capability of the target region. (3) Enhanced real-time performance of the system; The scheme of this invention combines low-computational-cost multi-scale feature fusion with sparse self-attention mechanism, enabling the system to run efficiently in real-time application scenarios. Especially on embedded devices (such as drones and edge computing devices), the technology of this invention can process infrared images at a rate of 60 frames per second (FPS), meeting the requirements of real-time target detection. Compared with traditional methods, this invention significantly improves the real-time processing capability of the system while ensuring detection accuracy, and can respond to small targets in dynamic environments in a timely manner. (4) Optimized allocation of computing resources; Traditional detection methods often require complex computational interactions between the background region and the target region, resulting in a waste of computing resources. Through the dynamic selective attention allocation in the DST module, this invention optimizes the use of computing resources, focusing only on the target region, thereby improving computational efficiency and reducing the computational burden of the system, especially suitable for environments with limited computing resources in embedded hardware or edge devices. (5) High adaptability and ability to handle complex scenes: Through the combination of multi-scale feature fusion and self-attention mechanism, this invention enables the system to adaptively process infrared images in different scenes. Whether in the complex background environment of urban security monitoring or in the rapidly changing scene of UAV flight control, this invention can effectively perform target detection. This high adaptability makes this invention not only suitable for infrared small target detection, but also extendable to other visual tasks that require processing complex backgrounds.(6) Enhanced target localization and classification accuracy; This invention combines target localization and classification modules. After feature map processing enhanced by the DST module, the system can accurately locate and classify targets. Traditional methods struggle to distinguish targets from backgrounds in low-contrast scenes, while this invention significantly improves target localization and classification accuracy through enhanced feature representation and optimized attention allocation. The solution of this invention maintains high detection accuracy in both low-contrast and complex background environments.
[0052] In summary, compared with existing technologies, this invention has significant technical advantages, enabling efficient and accurate detection of small infrared targets under complex backgrounds and low contrast conditions. Through an optimized attention allocation mechanism and multi-scale feature fusion, this invention not only improves the accuracy of target detection but also enhances the system's real-time performance and computational efficiency. This technical solution effectively addresses the background perturbation problem faced by existing technologies and possesses strong adaptability, making it widely applicable in fields such as surveillance, imaging, and navigation.
[0053] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A real-time infrared small target detection method based on dynamic selective Transformer, characterized in that, The method includes: Step S1: Acquire real-time images from the infrared sensor, and preprocess and extract features from the real-time images through the input layer; Step S2: The extracted features are transmitted to the feature fusion module to enhance the target features in the real-time image through multi-scale feature fusion. Step S3: The fused features enter the DST module, which uses a dynamic sparse self-attention mechanism to selectively focus on small infrared target regions in the image, while maintaining the enhanced target features through the fine feature enhancer SFEFN. Step S4: Transmit the feature data of the infrared small target region to the output layer for target localization and classification, and output the detected target location and category information.
2. The real-time infrared small target detection method based on dynamic selective Transformer according to claim 1, characterized in that, In step S1: Real-time images of the target area are captured using multiple infrared sensors; The input layer performs preprocessing, including denoising, background suppression, and edge enhancement, to remove irrelevant noise from the image and label the temperature differences of the target. The input layer uses a convolutional neural network to extract features from the preprocessed image. The extracted features include edge, texture, and heat source features.
3. The real-time infrared small target detection method based on dynamic selective Transformer according to claim 2, characterized in that, In step S2: The feature fusion module utilizes a multi-scale convolutional neural network (CNN) to fuse image features at different scales. It uses different convolutional kernels to extract features from different regions of the image, generating feature maps at different scales. By fusing features at different scales, it detects targets of different sizes, thereby enhancing the target features in real-time images.
4. The real-time infrared small target detection method based on dynamic selective Transformer according to claim 3, characterized in that, In step S3: DST stands for Dynamic Selective Transformer; the DST module processes the fused features using a self-attention mechanism and calculates the attention weight for each region. By selectively allocating computational resources through a dynamic sparse self-attention mechanism, priority is given to the part containing the target region. The similarity between each region and the background region is calculated and attention is assigned accordingly.
5. The real-time infrared small target detection method based on dynamic selective Transformer according to claim 4, characterized in that, In step S4: The target's spatial location is accurately predicted by performing bounding box regression through location encoding; at the same time, the target is classified through a fully connected layer to obtain the target's category label, and the classification result is optimized using the cross-entropy loss function.
6. A real-time infrared small target detection system based on dynamic selective Transformer, characterized in that, The system includes: The input layer processing module is configured to: acquire real-time images from the infrared sensor, and perform preprocessing and feature extraction on the real-time images; The feature fusion module is configured to enhance target features in real-time images through multi-scale feature fusion based on the extracted features. The DST module is configured to: based on the fused features, adopt a dynamic sparse self-attention mechanism to selectively focus on small infrared target regions in the image, while maintaining the enhanced target features through a fine feature enhancer (SFEFN). The output layer processing module is configured to: locate and classify targets based on feature data in the infrared small target region, and output the detected target location and category information.
7. A real-time infrared small target detection system based on dynamic selective Transformer according to claim 6, characterized in that, The input layer processing module is specifically configured as follows: Acquire real-time images of the target area captured by multiple infrared sensors; Perform preprocessing, including denoising, background suppression, and edge enhancement, to remove irrelevant noise from the image and label the temperature differences of the target. Feature extraction is performed on the preprocessed image using a convolutional neural network. The extracted features include edge, texture, and heat source features.
8. A real-time infrared small target detection system based on dynamic selective Transformer according to claim 7, characterized in that, The feature fusion module is specifically configured as follows: By using a multi-scale convolutional neural network (CNN) to fuse image features at different scales, different convolutional kernels are used to extract features from different regions of the image, generating feature maps at different scales. By fusing features at different scales, targets of different sizes are detected, thereby enhancing the target features in real-time images.
9. A real-time infrared small target detection system based on dynamic selective Transformer according to claim 8, characterized in that, DST stands for Dynamic Selective Transformer; the DST module is specifically configured as follows: The fused features are processed by a self-attention mechanism to calculate the attention weight of each region. Computational resources are selectively allocated through a dynamic sparse self-attention mechanism, prioritizing the parts containing the target region. The similarity between each region and the background region is calculated and attention is assigned accordingly.
10. A real-time infrared small target detection system based on dynamic selective Transformer according to claim 9, characterized in that, The output layer processing module is specifically configured as follows: The target's spatial location is accurately predicted by performing bounding box regression through location encoding; at the same time, the target is classified through a fully connected layer to obtain the target's category label, and the classification result is optimized using the cross-entropy loss function.