Efficient infrared small target detection method for night inspection task of unmanned aerial vehicle
By constructing a multi-level feature extraction network for infrared images and a hybrid attention mechanism, the difficulty of detecting small targets in UAV night patrols is solved, improving detection performance and anti-interference capabilities, and is suitable for UAV platforms with limited computing resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-03-27
AI Technical Summary
Detecting small targets in nighttime infrared inspections by drones is difficult, complex background interference leads to a high false detection rate, and defects in infrared image quality exacerbate the detection difficulty. Existing algorithms are insufficient to meet practical needs.
A multi-level feature extraction network for infrared images is constructed. By combining a hybrid attention mechanism and a loss function weighting strategy, the sensitivity and detection performance of small targets are improved through a high-resolution feature pyramid, a hybrid attention module, and an improved loss function.
It significantly improves the detection performance of small targets, reduces the false negative and false positive rates, and enhances the model's ability to distinguish and resist interference in complex backgrounds, making it suitable for UAV platforms with limited computing resources.
Smart Images

Figure CN121746962A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer algorithms, and particularly relates to an efficient infrared small target detection method for unmanned aerial vehicle night inspection tasks. BACKGROUND
[0002] With the rapid iteration and intelligent leap of unmanned system technology, unmanned aerial vehicles have been widely used in emergency rescue, environmental monitoring, power inspection, agricultural and forestry plant protection, geological exploration and many other fields due to their flexibility, low-cost deployment advantage and zero personnel risk characteristics, becoming the core tool for replacing traditional manual operation and improving the efficiency and safety of scene operation. In the field of infrastructure operation and maintenance, unmanned aerial vehicles have broken through the shackles of traditional ground inspection, such as "limited coverage, weak terrain adaptability and difficult night operation", and have gradually developed into a key technology for daily operation and maintenance of long-distance linear infrastructure (such as oil and gas pipelines and power transmission lines).
[0003] Among them, the application value of unmanned aerial vehicles in the field of oil and gas pipeline inspection is particularly prominent. China's oil and gas pipeline network is large in scale, and a large number of pipelines pass through complex areas such as deserts, mountains and forests. These areas are remote and rarely visited by people, becoming a high-risk area for "punching and stealing oil" illegal activities. Such activities not only result in huge losses of oil and gas resources, but also may cause pipeline leaks, explosions and environmental pollution, and other major safety accidents, seriously threatening the ecological environment, public safety and national energy security. Traditional manual inspection has the disadvantages of low efficiency, limited coverage, high labor cost and high safety risk due to the limitations of complex terrain, bad weather and insufficient night light in the wild, and it is difficult to achieve real-time monitoring of oil and gas pipelines in all weather and all directions; fixed monitoring equipment is limited by high deployment cost, many coverage blind spots and poor flexibility, and cannot meet the needs of long-distance pipeline inspection in the wild.
[0004] Thanks to the deep integration of unmanned systems and artificial intelligence technology, the intelligent pipeline inspection scheme based on unmanned aerial vehicles has become the industry mainstream. By carrying an infrared camera, unmanned aerial vehicles can break through the limitations of night light and achieve all-weather inspection of pipelines in the wild, and rely on target detection algorithms to automatically identify suspicious targets such as personnel, vehicles and construction machinery around the pipeline, and timely warn of illegal activities such as "punching and stealing oil", greatly improving the inspection efficiency and warning timeliness, providing key technical support for pipeline safety operation and maintenance, so the scheme has been widely used in the field of oil and gas pipeline operation and maintenance.
[0005] However, in the scene of infrared night inspection of pipelines in the wild, existing target detection algorithms still face many technical bottlenecks, making it difficult to meet the actual needs of detection performance, and the main problems are as follows: 1. Small target detection difficulty: In order to achieve wide coverage, the unmanned aerial vehicle needs to maintain a high flight altitude, which causes the ground personnel to appear as a small target with a pixel ratio of less than 1% in the infrared image. The feature information of such target is extremely sparse, only showing a weak thermal radiation profile, lacking texture and shape details, making it difficult for the algorithm to effectively extract the target and resulting in frequent missed detection. Meanwhile, the sparse distribution of personnel in the wild further exacerbates the difficulty of small target capture.
[0006] 2. High false detection rate caused by complex background interference: There are a large number of interference sources similar to personnel in terms of thermal radiation characteristics in the wild environment, including high-temperature radiation areas of power transmission line equipment, body heat radiation of mammals such as wild rabbits and wild boars, and local thermal anomaly areas of rocks and soil caused by day and night temperature difference. The infrared features of these interference targets are highly similar to personnel, making it difficult for the algorithm to accurately distinguish between targets and backgrounds, resulting in a sharp increase in false detection rate. This problem not only increases the burden of manual review, but also may reduce the credibility of early warning due to false positives, ultimately affecting the effectiveness of detection.
[0007] 3. Infrared image quality defects exacerbate detection difficulty: In the wild night scene, the quality of infrared images is easily affected by environmental noise, stability of unmanned aerial vehicle image transmission link, and camera hardware performance, showing low signal-to-noise ratio, weak contrast, and blurred target-background boundary. Such defects further weaken the weak features of small personnel targets, making them more difficult to identify, and ultimately worsening the problems of missed detection and false detection of the algorithm. SUMMARY
[0008] The present application provides an efficient infrared small target detection method for unmanned aerial vehicle night patrol task, which significantly improves the sensitivity to weak small targets by constructing an infrared image multi-level feature extraction network, combining a hybrid attention mechanism and a loss function weighting strategy, to solve the problems of missed detection and false detection of small targets in complex infrared backgrounds.
[0009] To achieve the above purpose, the present application provides an efficient infrared small target detection method for unmanned aerial vehicle night patrol task, which includes an infrared small target detection algorithm, a mixed attention module and a loss function; The infrared small target detection algorithm is composed of a backbone network, a high-resolution feature pyramid, a micro-small target detection head, a small target detection head and a medium-large target detection head. The backbone network is used to extract multi-scale features collected by the micro-small target detection head, the small target detection head and the medium-large target detection head. The high-resolution feature pyramid processes the multi-scale features to obtain original features. The original features are input into the micro-small target detection head, the small target detection head and the medium-large target detection head after processing, realizing the recognition of targets of different scales; The mixed attention module realizes extraction and optimization of channel and spatial dimension key information through a double-branch parallel feature enhancement structure for input features of the micro target detection head, the small target detection head and the medium and large target detection head. The loss function is based on the loss function of YOLO, and the area weight is introduced for small targets, the CIOU loss and the boundary box similarity degree measurement based on Gaussian distribution are combined, the mixed calculation is used to ensure the positioning consistency and enhance the sensitivity to the micro position deviation, the improved classification loss and the distribution focal loss are used for cooperative optimization, and the small target classification accuracy and the boundary box regression precision are improved; by adjusting the weights of the sub-losses, the model training process is more focused on the detection performance improvement of the infrared small target.
[0010] In an embodiment, the processing process of the high-resolution feature pyramid on the multi-scale features includes the following steps: S201, performing channel alignment on the multi-scale features through 1x1 convolution to form feature maps with 1 / 8 resolution and 1 / 16 resolution; S202, up-sampling the feature maps with 1 / 8 resolution and 1 / 16 resolution to 1 / 4 resolution respectively, and splicing in the channel dimension; S203, performing feature dimension reduction on the spliced feature maps again through 1x1 convolution, and projecting the features to the same feature space to eliminate the aliasing effect caused by up-sampling, to obtain original features.
[0011] In an embodiment, the original features are aggregated by the RepC3 module on one side to enhance the feature expression ability, and the ESA module is used to strengthen the attention of key target features, and output to the micro target detection head; On the other hand, the same scale features after channel alignment are spliced after down-sampling through 3x3 convolution, the deep semantic and shallow detail features are fused, the local feature aggregation is performed through the RepC3 module, and the ESA module is used to strengthen the attention of key target features, and output to the small target detection head; then the above down-sampling and feature fusion process is repeated to obtain the 1 / 16 resolution feature, which is processed by the RepC3 module and the ESA module and output to the medium and large target detection head, to realize layered detection and feature optimization of multi-scale targets.
[0012] In an embodiment, the high-resolution feature pyramid is represented as the following process: ; ① ; ② ; ③ In formulas ①, ② and ③, represents a 1x1 convolution operator; , and These are the features after dimensionality reduction via 1×1 convolution; , and These are the original features at different resolutions output by the backbone network.
[0013] In one embodiment, the upsampling to 1 / 4 resolution, followed by dimensional concatenation, and then 1×1 convolution for feature dimensionality reduction and projection onto the same feature space, is obtained by the following formula: ; ④ ⑤ In formulas ④ and ⑤, , and For upsampling operation and For splicing operations along the channel; This feature is further enhanced by local feature aggregation through the RepC3 module to improve its expressive power, and then the key target features are enhanced by attention through the ESA module. This process is shown below: ; ⑥ ; ⑦ In formulas ⑥ and ⑦, , Features are input into the small target detection head. For the RepC3 operator, To efficiently shuffle attention operators; Subsequently, Feature Process Operator downsampling and splicing, and then through Operators and The operator performs local feature aggregation and attention enhancement on key target features to obtain the input features for the small target detection head. This process is expressed by the following formula: ; ⑧ ; ⑨ In formulas ⑧ and ⑨, , Features are input to the small target detection head; at last, By repeating the above process, the input features of the medium-to-large target detection head are obtained. The process is represented as: ; ⑩ ;
[0014] Formula⑩、 middle, , Features are input into the medium-to-large target detection head.
[0015] In one embodiment, the mixed attention module is composed of a channel attention branch and a spatial attention branch that complement each other. The channel attention branch is used to suppress the channel response of interference information, and the spatial attention branch is used to enhance the spatial position response of the real target in infrared scenes to address the problem that the target and interference features are similar.
[0016] In one embodiment, the expression process of the shuffling attention module includes the following steps: S301. Divide the input features of the preceding ESA modules of the micro-target detection head, small target detection head, and medium-to-large target detection head into g groups, and further split them into two branches; S302. Input the channel attention branch into the channel attention branch, and first use the global average pooling operator. It captures global information about features and aggregates channel context information across spatial dimensions through lightweight computation. This is then used to generate attention weights via linear parameter modulation. Operator activation generates channel attention weights, which are applied to the original features to enhance the response strength of key channels, strengthen the expression of true channel features, and obtain channel-enhanced features. .
[0017] S303. In the spatial attention branch, the input features first pass through... and The processing of the two operators produces two complementary features. and ,pass Operations integrate two complementary features and , obtain fusion features , for fusion features Convolution processing is performed to capture long-range spatial dependencies, and dual-channel features are mapped to single-channel features, then... Activation Generates Spatial Attention Weights Spatial attention weights By applying element-wise multiplication to the original features, the response of the target's spatial location is enhanced, background clutter interference is suppressed, and the spatially enhanced feature is output. ; S304, Enhance the channel features and spatial enhancement features The data is stitched along the channel dimension, and a channel shuffling operation is introduced to promote the fusion of channel and spatial dimension enhancement information, ultimately yielding the fused feature output. .
[0018] In one embodiment, the loss function is optimized based on the original YOLO loss function, introducing an area-weighted mechanism to increase the contribution ratio of small targets in the total loss, combined with CIOU loss. Similarity measure with Gaussian Perform bounding box regression to enhance sensitivity to small displacements; The classification loss uses the distribution focus loss. Adjustments are made to the characteristics of small targets to improve the accuracy of category prediction and the refinement of bounding box regression. By dynamically balancing the weights of each loss term through hyperparameters, the model can focus more on the localization and classification optimization of small targets during training.
[0019] In one embodiment, the total loss of the loss function is expressed as follows: ;
[0020] formula middle, This is the binary cross-entropy loss function.
[0021] Compared with the prior art, the beneficial effects of this application are: 1. To address the issues of low pixel count and sparse features of small targets such as people in UAV high-altitude infrared images, which are easily submerged by background noise during deep network downsampling, resulting in severe loss of feature information, a High-Resolution Feature Pyramid Network (HRFPN) is proposed. First, 1×1 convolutions are used to align the channels of features at different scales to prevent any single scale feature from dominating the fusion process. Then, multi-scale features are integrated to construct a high-resolution feature map, fully preserving shallow-level details and using convolution operations to suppress feature aliasing. Finally, progressive downsampling is used to propagate the high-resolution features to deeper layers and fuse them with the original features of the same scale, thereby achieving a more robust multi-scale representation of small targets in infrared images.
[0022] 2. To address the high false detection rate caused by complex thermal environment interference and similar target features in nighttime infrared scenes, an Efficient Shuffle Attention (ESA) mechanism is proposed. This module extracts and enhances key features in both the channel and spatial dimensions through a dual-branch parallel structure. The channel attention branch uses global average pooling to capture global contextual information across channels and generates weights through parameter modulation to suppress channel responses corresponding to background thermal noise. The spatial attention branch performs global average pooling and global max pooling on the feature maps in the channel dimension, aggregating global channel information and generating a spatial attention weight map to enhance the spatial position response of the real target area while suppressing spatial information from irrelevant areas such as the background. The outputs of the two branches are concatenated and then the channel shuffle operation promotes information interaction between groups, breaking down feature isolation. This dynamically achieves background suppression and target enhancement in complex thermal environments, significantly improving the model's discriminative ability and anti-interference capability.
[0023] 3. Addressing the challenge of limited computing resources and the need for real-time processing in UAV-borne edge devices, this solution employs structural reparameterization and modular lightweight design. Complex branches are introduced during training to enhance feature extraction capabilities, while these branches are merged into a single path during inference. This significantly improves model performance without increasing actual inference time, drastically reducing the number of parameters and computational overhead. Furthermore, the high-resolution feature pyramid network and efficient shuffling attention module employed in this solution are both designed for extremely high computational efficiency. The former simplifies the multi-scale fusion process, reducing computational burden; the latter utilizes channel grouping and fusion of channel-spatial attention to replace computationally intensive self-attention methods, ensuring the network maintains high inference speed while enhancing features. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a framework diagram of the infrared small target detection algorithm provided in this application; Figure 2 The mixed-shuffle attention module structure provided in this application; Figure 3 A schematic diagram illustrating the quantity distribution of various targets within different pixel area ranges provided in this application; Figure 4A schematic diagram comparing the PR curves of EISD-Net and mainstream detection algorithms provided in this application; Figure 5 The intended recall rates of the algorithms provided in this application for detecting targets of different sizes; Figure 6 The precision of the algorithms provided in this application for detecting targets of different sizes; Figure 7 The F1 scores of the algorithms provided in this application for detecting targets of different sizes; Figure 8 A visualization of the qualitative comparison results between EISD-Net and mainstream detection algorithms provided in this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application are described clearly and completely below. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are also within the scope of protection of this application.
[0027] See Figures 1 to 8 As shown, this application provides an efficient infrared small target detection method for UAV nighttime inspection tasks, including an infrared small target detection algorithm, a mixed attention module, and a loss function; The infrared small target detection algorithm consists of a backbone network, a high-resolution feature pyramid, a micro-target detection head, a small target detection head, and a medium-to-large target detection head. The backbone network is used to extract multi-scale features collected by the micro-target detection head, the small target detection head, and the medium-to-large target detection head. The high-resolution feature pyramid processes the multi-scale features to obtain the original features. The processed original features are then input into the micro-target detection head, the small target detection head, and the medium-to-large target detection head to achieve the recognition of targets of different scales.
[0028] In extracting multi-scale features, the backbone network employs a collaborative operation of 3×3 convolutions and C3K2 modules, effectively suppressing computational redundancy while ensuring feature representation capabilities. To prevent the loss of small target features during downsampling, the backbone network only performs a 16x downsampling.
[0029] The mixed-shuffle attention module extracts and optimizes key information in the channel and spatial dimensions by using a dual-branch parallel feature enhancement structure on the input features of the micro-target detection head, small target detection head, and medium-to-large target detection head.
[0030] Among them, the mixed-shuffle attention module is designed to solve the problem of high false detection rate caused by interference and similarity of target features in complex infrared scenes for small target detection heads, medium and large target detection heads. Its dual-branch structure focuses on channel importance modeling and spatial saliency enhancement respectively. It improves feature discrimination through parallel processing, while reducing redundant calculations, and significantly improves detection accuracy and response speed without increasing network depth.
[0031] The loss function, based on YOLO, introduces area weights for small targets and combines CIOU loss with a Gaussian-based bounding box similarity metric. This hybrid calculation ensures consistent localization and enhances sensitivity to minor positional deviations. Simultaneously, an improved classification loss and a distribution focus loss are used for collaborative optimization to improve the classification accuracy of small targets and the regression precision of bounding boxes. By adjusting the weights of each sub-loss, the model training process focuses more on improving the detection performance of infrared small targets.
[0032] Optionally, the high-resolution feature pyramid's processing of the multi-scale features includes the following steps: S201. Channel alignment of the multi-scale features is performed using 1×1 convolution to form feature maps with 1 / 8 resolution and 1 / 16 resolution. S202. Upsample the feature maps at 1 / 8 resolution and 1 / 16 resolution to 1 / 4 resolution respectively, and then stitch them together in the channel dimension; S203. The spliced feature map is then subjected to 1×1 convolution to reduce the feature dimension. At the same time, the features are projected onto the same feature space to eliminate the aliasing effect caused by upsampling and obtain the original features.
[0033] The high-resolution feature pyramid is represented by the following process: ; ① ; ② ; ③ In formulas ①, ② and ③, This represents a 1×1 convolution operator; , and These are the features after dimensionality reduction via 1×1 convolution; , and These are the original features at different resolutions output by the backbone network.
[0034] Optionally, the original features are subjected to local feature aggregation through the RepC3 module to enhance feature representation capability, and the key target features are enhanced with attention through the ESA module before being output to the micro-target detection head. On the other hand, features of the same scale are downsampled by 3×3 convolution and concatenated with channels, and then deep semantic and shallow detail features are fused. After local feature aggregation by the RepC3 module, key target feature attention is enhanced by the ESA module, and the result is output to the small target detection head. Then, the downsampling and feature fusion process is repeated to obtain 1 / 16 resolution features, which are processed by the RepC3 module and the ESA module and then output to the medium and large target detection head, thus realizing hierarchical detection and feature optimization of multi-scale targets.
[0035] Optionally, the upsampling to 1 / 4 resolution, followed by dimensional concatenation, and then 1×1 convolution for feature dimensionality reduction and projection onto the same feature space, is obtained using the following formula: ; ④ ⑤ In formulas ④ and ⑤, , and For upsampling operation and For splicing operations along the channel; This feature is further enhanced by local feature aggregation through the RepC3 module to improve its expressive power, and then the key target features are enhanced by attention through the ESA module. This process is shown below: ; ⑥ ; ⑦ In formulas ⑥ and ⑦, , Features are input into the small target detection head. For the RepC3 operator, To efficiently shuffle attention operators; Subsequently, Feature Process Operator downsampling and splicing, and then through Operators and The operator performs local feature aggregation and attention enhancement on key target features to obtain the input features for the small target detection head. This process is expressed by the following formula: ; ⑧ ; ⑨ In formulas ⑧ and ⑨, , Features are input to the small target detection head; at last, By repeating the above process, the input features of the medium-to-large target detection head are obtained. The process is represented as: ; ⑩ ;
[0036] Formula⑩、 middle, , Features are input into the medium-to-large target detection head.
[0037] Optionally, the mixed attention module is composed of a channel attention branch and a spatial attention branch that complement each other. The channel attention branch is used to suppress the channel response of interference information, and the spatial attention branch is used to enhance the spatial position response of the real target in infrared scenes to address the problem that the target and interference features are similar.
[0038] In this embodiment, the channel attention branch focuses on suppressing the channel responses of interfering information. Specifically, global average pooling is used to capture global context information across channels. Compared to complex convolutional aggregation methods, global average pooling quickly obtains global channel information with extremely low computational cost, without requiring additional high-complexity calculations, and can accurately aggregate the distribution differences of interference and infrared target features in different channels. Next, adaptive channel weights are generated by combining parameter modulation, which relies on only a small number of learnable parameters. Subsequently, these weights are multiplied channel-by-channel with the original infrared features of this branch. Channel-by-channel multiplication is a lightweight element-level operation, which completes channel feature selection while avoiding introducing excessive computational burden. In this way, high-response channels corresponding to interference information are effectively suppressed, while the expression of the channels containing infrared target features is strengthened, thereby weakening the impact of interference on feature discriminability in the channel dimension.
[0039] The spatial attention branch aims to address the challenge of feature similarity between targets and interfering objects in infrared scenes by enhancing the spatial positional response of the real target to improve its recognizability. Specifically, this branch simultaneously performs global average pooling and global max pooling along the channel dimension—two lightweight operations that efficiently aggregate spatially distributed features, capturing the spatial average distribution information and salient feature information of infrared features without complex network structures. The resulting features are then concatenated to generate a fine-grained spatial attention weight map, which is then multiplied point-by-point with the original infrared features based on their spatial positions. This simple, element-level interaction-based operation controls computational complexity while precisely enhancing the feature response of the real target region, effectively suppressing the spatial information of the background and interfering regions, and reducing the interference of similar features on detection decisions.
[0040] After each branch completes feature enhancement in its respective dimension, the module concatenates the output features of the two branches and uses a channel shuffling operation to eliminate feature barriers between branches. Channel shuffling achieves cross-domain interaction only through feature dimension rearrangement, without relying on computationally complex convolution operations, thus promoting the fusion of channel and spatial enhancement information while maintaining computational efficiency. The final output features possess both interference-resistant channel discriminativeness and accurate spatial discrimination, enabling the infrared target detection system to dynamically suppress interference and enhance target features, significantly improving the model's ability to distinguish infrared targets and its anti-interference performance, and effectively reducing the false detection rate.
[0041] Taking the pre-processor ESA module of a small target detection head as an example, its input features are: The expression process of the shuffling attention module includes the following steps: S301, Input features from the pre-processor ESA module of the small target detection head. Divide into g groups, and further split into two branches. This process can be represented as: ; In the formula, As input to the channel attention branch, As input to the spatial attention branch, This is a grouping and splitting operator, whose function is to divide the input features into g groups along the channel dimension, and each group must contain... Each channel, then merges these g groups into two branches in sequence.
[0042] S302, Input the channel attention branch into the channel attention branch. First, use the global average pooling operator. It captures global information about features and aggregates channel context information across spatial dimensions through lightweight computation, then generates attention weights through linear parameter modulation. And by the operator The attention weights of the generated channels are activated and applied to the original features to enhance the response strength of key channels, thereby strengthening the expression of the true channel features and obtaining channel-enhanced features. This process can be represented as: ; ; ; In the formula, , , , For scaling parameters, For offset parameters, This is an element-wise multiplication operation.
[0043] S303. In the spatial attention branch, the input features first pass through... and The processing of the two operators produces two complementary features. and ,pass Operations integrate two complementary features and , obtain fusion features , for fusion features Convolution processing is performed to capture long-range spatial dependencies, and dual-channel features are mapped to single-channel features, then... Activation Generates Spatial Attention Weights Spatial attention weights By applying element-wise multiplication to the original features, the response of the target's spatial location is enhanced, background clutter interference is suppressed, and the spatially enhanced feature is output. This process is expressed by the following formula: ; ; ; ; ; In the formula, , It is a 7×7 convolution operator.
[0044] S304, Enhance the channel features and spatial enhancement features The data is stitched along the channel dimension, and a channel shuffling operation is introduced to promote the fusion of channel and spatial dimension enhancement information, ultimately yielding the fused feature output. This process can be expressed as: ; In the formula, This is a channel mixing operation.
[0045] Optionally, the loss function is optimized based on the original YOLO loss function, and an area weighting mechanism is introduced to increase the contribution ratio of small targets in the total loss. The bounding box regression is performed by combining CIOU loss and Gaussian similarity measurement, which not only ensures the consistency of localization, but also enhances the sensitivity to small displacements. The classification loss uses distributed focus loss to adjust the characteristics of small targets, improving the accuracy of class prediction and the refinement of bounding box regression. By dynamically balancing the weights of each loss term through hyperparameters, the model can focus more on the localization and classification optimization of small targets during training.
[0046] Optionally, the total loss of the loss function is expressed as follows: ;
[0047] formula middle, This is the binary cross-entropy loss function.
[0048] Data sets and evaluation metrics are presented through specific implementation examples. The evaluation dataset contains 36,000 images, used for model training, validation, and testing. The distribution of the entire dataset is as follows: Figure 3 As shown, this figure reflects the quantity distribution of five target categories—"personnel," "non-motorized vehicles," "cars," "trucks," and "construction machinery"—across different pixel area ranges. The pixel area ranges from 10 to 10,000 pixels, divided into 50 intervals with a logarithmic uniform distribution. Through horizontally stacked bar charts, the figure clearly presents the proportion and specific size of each target category within each area interval, providing a visual representation of the size characteristics distribution of different target categories.
[0049] Among them, personnel targets are more numerous in the smaller pixel area range, with an average pixel count of 216; non-motorized vehicles are distributed in multiple ranges, with an average pixel count of 1068; cars are present in a considerable number in the medium and large area ranges, with an average pixel count of 2048; trucks are concentrated in the large area range, with an average pixel count of 4925; and construction machinery targets are fewer in all ranges, concentrated in the large area range, with an average pixel count of 4025.
[0050] In terms of dataset partitioning, the 36,000 images are allocated in a 4:1:1 ratio to the training set, validation set, and test set. The training set contains 24,000 images, used for learning and fitting model parameters; the validation set contains 6,000 images, used for adjusting model hyperparameters and evaluating performance during training to optimize model generalization ability; and the test set also contains 6,000 images, serving as independent evaluation data to ultimately verify the model's actual performance on data not used in training, ensuring the objectivity and reliability of the evaluation results.
[0051] As shown in Table 1, the performance evaluation indicators for infrared small target detection include: Pr (precision) is the proportion of correctly identified targets, focusing on precision; Re (recall) is the proportion of correctly identified targets among all true values, focusing on recall; F1 is the harmonic mean of the two, balancing overall performance. AP is the average precision of a single category; mAP@.5 and mAP@.75 are the average AP values of all categories when IoU=0.5 and 0.75, respectively, with the latter requiring stricter standards; mAP@[.5:.95] is the average AP value of all categories when IoU ranges from 0.5 to 0.95 (step size 0.05), used to examine stability and robustness under different matching strictness.
[0052] Table 1. Target Detection Performance Evaluation Indicators
[0053] In practical applications, when evaluating UAV infrared small target detection algorithms, in addition to accuracy, model efficiency, computational complexity, and computational resource requirements are equally crucial. Inference speed is usually measured in frames per second (FPS). A higher FPS value means the model can process image streams faster and better meet real-time detection requirements. However, inference speed is often limited by the model's computational complexity, which is usually expressed as the number of giga-floating-point operations per second (GFLOPS), reflecting the model's computational resource requirements. A lower GFLOPS value usually means higher computational efficiency and is more suitable for deployment on edge devices with limited computing power. Furthermore, the number of trainable parameters (NP) of the model is also an important indicator for evaluating its practical application potential. NP represents the total number of parameters in the model that need to be learned and optimized, directly determining the model's disk and memory footprint, and is a fundamental factor affecting storage and computational resource requirements.
[0054] Experimental setup Table 2. Training Configuration and Hyperparameter Settings
[0055] The training configuration and hyperparameter settings are shown in Table 2. In this experiment, the resolution of all images was uniformly adjusted to 640×800 to maintain the aspect ratio. The methods used for comparison included YOLOv9, YOLOv10, YOLOv11, and YOLOv12. To ensure fairness, all methods did not use pre-trained weights and adopted the same data augmentation strategy and training configuration. Data augmentation included horizontal flipping, translation, scaling, random erasure, and automatic enhancement. HSV color adjustment, rotation, mosaic, and blending were disabled.
[0056] Comparative experimental results This section provides a comprehensive evaluation of the overall performance of the algorithms, focusing on the combined performance of different algorithms across all categories and their performance differences in specific categories. By comparing EISD-Net with the state-of-the-art YOLOv9 to v12 series algorithms, the superior adaptability and performance of EISD-Net in nighttime infrared scenes for small target detection tasks are fully demonstrated.
[0057] Table 3. Performance comparison of EISD-Net and mainstream detection algorithms on various targets.
[0058] As shown in Table 3, EISD-Net demonstrates comprehensive and balanced excellent performance across various target detection tasks. Of particular note is its significant advantage in the most challenging category of person detection, where such targets typically appear as small, feature-sparse objects in infrared images. EISD-Net achieves a precision of 95.7%, a recall of 77.1%, and mean precision (mAP@.5) and mean precision (mAP@.5:.95) of 91.1% and 61.2%, respectively, all significantly outperforming all comparable algorithms. This result fully demonstrates that EISD-Net's high-resolution feature pyramid structure and shuffling attention mechanism effectively preserve the detailed features of small targets, significantly improving its ability to detect minute targets.
[0059] EISD-Net also performed exceptionally well in other target detection categories. It achieved a 96.4% mAP@.5 in non-motorized vehicle detection, 96.6% mAP@.5 in car detection, and 92.3% and 95.4% mAP@.5 in truck and construction machinery detection, respectively. These results demonstrate that EISD-Net not only excels in challenging small target detection tasks but also maintains excellent detection performance across various target categories.
[0060] Furthermore, as shown in Figure 4, through comprehensive analysis of the five precision-recall curves, EISD-Net demonstrates superior small target detection performance in people category detection. Its precision curve is generally above the comparison model, especially maintaining a high recall rate in the high precision region (0.8-1.0), indicating that the algorithm can effectively identify more real targets while ensuring accuracy. This advantage stems from its high-resolution feature pyramid structure's ability to preserve detailed features, and the shuffling attention mechanism's effectiveness in suppressing background interference.
[0061] In other detection categories, EISD-Net also demonstrated stable performance. Specifically, it exhibited the largest area under the curve in non-motorized vehicle detection, maintained the best balance in car and truck detection, and maintained good precision even in high recall areas in construction machinery detection. These results collectively demonstrate the algorithm's ability to characterize small target features and its anti-interference performance in complex infrared scenes, providing a reliable technical solution for UAV inspection applications.
[0062] Table 4. Comparison of overall performance of EISD-Net and mainstream detection algorithms
[0063] As shown in Table 4, EISD-Net demonstrates a significant advantage in computational efficiency. Its performance data, precisely calculated, is as follows: inference speed reaches 109.2 FPS, a 75% improvement compared to YOLOv11m's 62.3 FPS and a 135% improvement compared to YOLOv9m's 46.4 FPS; computational complexity is 70.8 GFLOPS, a 35% reduction compared to YOLOv11m's 109.7 GFLOPS and an 11.5% reduction compared to YOLOv10m's 80.0 GFLOPS; the model parameter count is only 3.5M, an 82.7% reduction compared to YOLOv9m's 20.2M and a 78.8% reduction compared to YOLOv10m's 16.5M. These data indicate that EISD-Net significantly improves computational efficiency while maintaining optimal detection accuracy, making it particularly suitable for deployment on resource-constrained UAV embedded platforms, providing an efficient solution for real-time infrared small target detection.
[0064] Analysis of detection performance differences based on target size In nighttime patrol scenarios, the size differences of various targets are significant. Small targets such as people and non-motorized vehicles differ markedly from large targets such as trucks and construction machinery in the complex nighttime environment in terms of imaging characteristics, interference levels, and detection difficulty. This size difference directly affects the detection performance of algorithms. Small targets may be more difficult to accurately identify due to their low pixel ratio and susceptibility to occlusion, while large targets may face increased positioning difficulty due to their complex outlines and greater interaction with the background. Therefore, this section will analyze the performance differences of different algorithms in detecting targets of various sizes based on target size classification, focusing on exploring the adaptability of algorithms to small, medium, and large targets.
[0065] Experimental results demonstrate that EISD-Net exhibits superior performance in UAV infrared small target detection tasks, particularly excelling in the most challenging dimension of extremely small target detection. System analysis of three key metrics—recall, precision, and F1 score—clearly showcases the algorithm's comprehensive advantages. Regarding recall, for example… Figure 5 As shown, when the target size is in the extremely small range of 0-16 pixels, EISD-Net's recall rate significantly outperforms other comparison algorithms, reaching a relatively high level of approximately 0.6. This result proves that the algorithm can effectively capture more real targets and significantly reduce the risk of missed detections. As the target size increases, the performance of each algorithm gradually converges, but EISD-Net's advantage in extremely small targets remains significant. In terms of precision, from... Figure 6 As can be seen, EISD-Net maintains a leading precision performance in the 0-16 pixel range. This indicates that the algorithm can not only detect more targets but also maintain high recognition accuracy, effectively reducing the risk of misclassifying background interference as targets. This characteristic is particularly important in complex infrared backgrounds.
[0066] The F1 score, which comprehensively considers recall and precision, further confirms the superiority of EISD-Net. For example... Figure 7 As shown, within the 0-16 pixel range, EISD-Net achieves an F1 score of approximately 0.7, significantly higher than other comparative algorithms. This result fully demonstrates that the algorithm achieves the optimal balance between recall and recognition accuracy in small target detection tasks, exhibiting more balanced and reliable detection performance. EISD-Net's superior performance is primarily attributed to its innovative architectural design. The high-resolution feature pyramid structure effectively preserves the detailed features of small targets, preventing their loss in deep networks; while the shuffling attention mechanism enhances the target region and suppresses background interference by dynamically adjusting feature responses. The synergistic effect of these two core technologies enables the algorithm to achieve a performance breakthrough in the highly challenging infrared small target detection task.
[0067] Visualization of qualitative comparison results As shown in Figure 8, compared with YOLOv9, YOLOv10, YOLOv11, and YOLOv12, EISD-Net demonstrates superior detection performance for human targets in various complex scenarios. It has fewer missed detections and higher confidence when it detects a target, which means that the model has stronger generalization ability, higher recall rate, and more reliable detection results in complex environments, providing a better solution for practical applications.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A highly efficient infrared small target detection method for nighttime inspection missions using unmanned aerial vehicles (UAVs), characterized in that: This includes an infrared small target detection algorithm, a shuffling attention module, and a loss function; The infrared small target detection algorithm consists of a backbone network, a high-resolution feature pyramid, a micro-target detection head, a small target detection head, and a medium-to-large target detection head. The backbone network is used to extract multi-scale features collected by the micro-target detection head, the small target detection head, and the medium-to-large target detection head. The high-resolution feature pyramid processes the multi-scale features to obtain the original features. The processed original features are then input into the micro-target detection head, the small target detection head, and the medium-to-large target detection head to achieve the recognition of targets at different scales. The mixed-shuffle attention module extracts and optimizes key information of the channel and spatial dimensions by using a dual-branch parallel feature enhancement structure on the input features of the micro-target detection head, small target detection head, and medium-to-large target detection head. The loss function, based on YOLO, introduces area weights for small targets and combines CIOU loss with a Gaussian-based bounding box similarity metric. This hybrid calculation ensures consistent localization and enhances sensitivity to minor positional deviations. Simultaneously, an improved classification loss and a distribution focus loss are used for collaborative optimization to improve the classification accuracy of small targets and the regression precision of bounding boxes. By adjusting the weights of each sub-loss, the model training process focuses more on improving the detection performance of infrared small targets.
2. The efficient infrared small target detection method for UAV nighttime inspection missions according to claim 1, characterized in that: The high-resolution feature pyramid's processing of the multi-scale features includes the following steps: S201. Channel alignment of the multi-scale features is performed using 1×1 convolution to form feature maps with 1 / 8 resolution and 1 / 16 resolution. S202. Upsample the feature maps at 1 / 8 resolution and 1 / 16 resolution to 1 / 4 resolution respectively, and then stitch them together in the channel dimension; S203. The spliced feature map is then subjected to 1×1 convolution to reduce the feature dimension. At the same time, the features are projected onto the same feature space to eliminate the aliasing effect caused by upsampling and obtain the original features.
3. The efficient infrared small target detection method for UAV nighttime patrol missions according to claim 2, characterized in that: The original features are enhanced by local feature aggregation through the RepC3 module to improve feature representation, and the key target features are enhanced by attention through the ESA module before being output to the micro-target detection head. On the other hand, features of the same scale are downsampled by 3×3 convolution and concatenated with channels, and then deep semantic and shallow detail features are fused. After local feature aggregation by the RepC3 module, key target feature attention is enhanced by the ESA module, and the result is output to the small target detection head. Then, the downsampling and feature fusion process is repeated to obtain 1 / 16 resolution features, which are processed by the RepC3 module and the ESA module and then output to the medium and large target detection head, thus realizing hierarchical detection and feature optimization of multi-scale targets.
4. The efficient infrared small target detection method for UAV nighttime inspection missions according to claim 2, characterized in that: The high-resolution feature pyramid is represented by the following process: ; ① ; ② ; ③ In formulas ①, ② and ③, This represents a 1×1 convolution operator; , and These are the features after dimensionality reduction via 1×1 convolution; , and These are the original features at different resolutions output by the backbone network.
5. A highly efficient infrared small target detection method for UAV nighttime patrol missions according to claim 3, characterized in that: The upsampling to 1 / 4 resolution, followed by dimensional concatenation, and then 1×1 convolution for feature dimensionality reduction and projection onto the same feature space, is obtained through the following formula: ; ④ ; ⑤ In formulas ④ and ⑤, , and For upsampling operation and For splicing operations along the channel; This feature is further enhanced by local feature aggregation through the RepC3 module to improve its expressive power, and then the key target features are enhanced by attention through the ESA module. This process is shown below: ; ⑥ ; ⑦ In formulas ⑥ and ⑦, , Features are input into the small target detection head. For the RepC3 operator, To efficiently shuffle attention operators; Subsequently, Feature Process Operator downsampling and splicing, and then through Operators and The operator performs local feature aggregation and attention enhancement on key target features to obtain the input features for the small target detection head. This process is expressed by the following formula: ; ⑧ ; ⑨ In formulas ⑧ and ⑨, , Features are input to the small target detection head; at last, By repeating the above process, the input features of the medium-to-large target detection head are obtained. The process is represented as: ; ⑩ ; ⑪ In formulas ⑩ and ⑪, , Features are input into the medium-to-large target detection head.
6. A highly efficient infrared small target detection method for nighttime inspection tasks of unmanned aerial vehicles (UAVs) according to any one of claims 1-5, characterized in that: The mixed attention module is composed of a channel attention branch and a spatial attention branch that complement each other. The channel attention branch is used to suppress the channel response of interference information, and the spatial attention branch is used to enhance the spatial position response of the real target in infrared scenes to address the problem that the target and interference features are similar.
7. The efficient infrared small target detection method for UAV nighttime patrol missions according to claim 6, characterized in that: The expression process of the shuffling attention module includes the following steps: S301. Divide the input features of the preceding ESA modules of the micro-target detection head, small target detection head, and medium-to-large target detection head into g groups, and further split them into two branches; S302. Input the channel attention branch into the channel attention branch, and first use the global average pooling operator. It captures global information about features and aggregates channel context information across spatial dimensions through lightweight computation. This is then used to generate attention weights via linear parameter modulation. Operator activation generates channel attention weights, which are applied to the original features to enhance the response strength of key channels, strengthen the expression of true channel features, and obtain channel-enhanced features. ; S303. In the spatial attention branch, the input features first pass through and The processing of the two operators produces two complementary features. and ,pass Operations integrate two complementary features and , obtain fusion features , for fusion features Convolution processing is performed to capture long-range spatial dependencies, and dual-channel features are mapped to single-channel features, then... Activation Generates Spatial Attention Weights Spatial attention weights By applying element-wise multiplication to the original features, the response of the target's spatial location is enhanced, background clutter interference is suppressed, and the spatially enhanced feature is output. ; S304, Enhance the channel features and spatial enhancement features The data is stitched along the channel dimension, and a channel shuffling operation is introduced to promote the fusion of channel and spatial dimension enhancement information, ultimately yielding the fused feature output. .
8. The efficient infrared small target detection method for UAV nighttime inspection missions according to claim 1, characterized in that: The loss function is optimized based on the original YOLO loss function, introducing an area-weighted mechanism to increase the contribution of small targets to the total loss, and combining it with CIOU loss. Similarity measure with Gaussian Perform bounding box regression to enhance sensitivity to small displacements; The classification loss uses the distribution focus loss. Adjustments are made to the characteristics of small targets to improve the accuracy of category prediction and the refinement of bounding box regression. By dynamically balancing the weights of each loss term through hyperparameters, the model can focus more on the localization and classification optimization of small targets during training.
9. A highly efficient infrared small target detection method for UAV nighttime inspection missions according to claim 8, characterized in that: The total loss of the loss function is expressed as follows: ; ⑫ formula middle, This is the binary cross-entropy loss function.