Remote sensing small target detection method based on feature enhancement and scale adaptive head

By combining a local enhancement global suppression gating mechanism and a high-resolution P2 detection head with a scale-adaptive detection head and an optimized loss function, the problems of feature enhancement, scale adaptation and real-time performance in remote sensing small target detection are solved, achieving high-precision and robust remote sensing small target detection.

CN121921671APending Publication Date: 2026-04-24SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHWEST PETROLEUM UNIV
Filing Date
2026-01-15
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing remote sensing small target detection methods are prone to missed detections and false detections in complex backgrounds, and it is difficult to balance feature enhancement, scale adaptation and real-time performance. Traditional methods have low accuracy and insufficient robustness in remote sensing small target detection.

Method used

The Local Enhancement Global Suppression Gating (LEGS) mechanism is adopted to enhance the detailed features of small targets and suppress background interference. A new high-resolution P2 detector and a scale-adaptive detector (AASH) are added to dynamically adapt to targets of different scales. The loss function is optimized to achieve multi-task collaborative optimization.

Benefits of technology

It significantly improves the accuracy and robustness of remote sensing small target identification, reduces the false negative rate and false positive rate, and achieves accurate detection of small targets in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921671A_ABST
    Figure CN121921671A_ABST
Patent Text Reader

Abstract

The invention discloses a remote sensing small target detection method based on feature enhancement and a scale adaptive head, and relates to the technical field of deep learning target detection. According to the method, YOLOv12 is used as a basic framework, a local enhancement global suppression gating mechanism (LEGS) and a scale adaptive detection head (AASH) are creatively integrated, and a loss function is optimized. Small target detail features are enhanced and background interference is suppressed through an LEGS module, a P2 detection head and AASH are newly added to dynamically adapt to a multi-scale target, and a total loss function is fused with multiple types of loss items to guarantee an optimization effect. After data preprocessing, model training and parameter optimization, small targets such as low-altitude aircrafts and small vehicles in remote sensing images can be accurately detected, the problems of weak features, poor scale adaptation and the like are effectively solved, the omission ratio and the false detection rate are reduced, and the method is suitable for multiple fields such as territorial safety and urban planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning-based target detection technology, and in particular to a remote sensing small target detection method based on feature enhancement and scale-adaptive head. Background Technology

[0002] With the rapid development of aerospace and sensor technologies, the ability to acquire remote sensing images has been continuously improved, and its application in key areas such as homeland security, urban planning, environmental monitoring, agricultural remote sensing, and disaster emergency response has become increasingly profound. Remote sensing target detection, as a core task of remote sensing image interpretation, aims to accurately identify and locate targets of interest from complex remote sensing scenes, and small target detection is a particularly challenging research direction. Small remote sensing targets typically refer to targets that occupy less than 5% of the pixels in a remote sensing image; typical examples include low-altitude aircraft, small vehicles, miniature buildings, power line insulators, and small ships at sea. These targets possess significant inherent characteristics: First, their pixel ratio is extremely low, resulting in a severe lack of feature information in the target area, making them difficult to effectively distinguish from the background. Second, the background environment is complex and variable, easily affected by factors such as cloud cover, terrain undulations, vegetation cover, lighting changes, and noise interference, further weakening the target's features. Third, they exhibit significant scale differences; small targets of different scales may coexist in the same remote sensing image, and their poses are varied (e.g., different driving directions of vehicles, different orientations of buildings). Fourth, the target density distribution is uneven; in some scenes, there is a dense stacking of small targets, increasing the difficulty of detection. These characteristics lead to traditional target detection methods generally facing high false negative rates, high false positive rates, and low detection accuracy in remote sensing small target detection tasks, making it difficult to meet the stringent performance requirements of practical applications.

[0003] In reference 1 (Guo Jialin, Cao Yunfeng. Research on Improved YOLOv11s Aerial Small Target Detection Method [J / OL]. Computer Engineering and Applications, 1-18 [2025-12-15].), Guo Jialin proposed a lightweight aerial small target detection method based on improved YOLOv11s. The core of this method is to enhance small target feature capture through a dense cross-path feature pyramid network (DCP-FPN), compress parameter quantity through a lightweight convolutional module (Ghost-DSConv), and strengthen feature perception through a lightweight small target attention mechanism (LSTA). While this method can improve the model's ability to perceive image features, it suffers from drawbacks such as limited scene adaptability, insufficient robustness in extreme environments, a conflict between computational cost and real-time performance, unverifiable detection capabilities for dense, occluded, and ultra-small targets, and limited cross-architecture generalization. In reference 2 (Hu Jiahao, Li Yan, Cheng Zhiyuan, et al. Remote sensing small target detection algorithm based on Haar wavelet transform and dilated convolution [J]. Acta Photonica Sinica, 2025, 54(10):147-159.), Hu Jiahao et al. proposed a remote sensing small target detection algorithm RSSHD based on Haar wavelet transform and dilated convolution. The core of this algorithm is to preserve detailed features through a multi-channel fusion downsampling module (MFDM), expand the receptive field to capture multi-scale information through a receptive field enhancement feature extraction module (RFEM), and improve the sensitivity of three types of small target detection heads. This method can preserve core features through multi-channel parallel downsampling and improve feature extraction capability through convolution with a fixed dilation rate. However, because it only retains the low-frequency components of Haar wavelets, it may lose high-frequency details of small targets. It is also not suitable for the receptive field of ultra-small targets and is prone to feature redundancy. In reference 3 (LiY, YangY, AnY, et al. LARS: Remote Sensing Small Object Detection Network Based on Adaptive Channel Attention and Large Kernel Adaptation[J]. Remote Sensing, 2024, 16(16): 2906-2906.), LiY et al. proposed a remote sensing small object detection network LARS based on adaptive channel attention and large kernel adaptation. The core of the network is to focus on local features of small objects through adaptive channel attention blocks (ACA), optimize the receptive field to reduce localization ambiguity through large kernel adaptation blocks (LKA), and reduce sample classification confusion through layer batch normalization (LBN). The three work together to improve the feature capture ability, localization accuracy and classification stability of small objects. However, the network has the following drawbacks: large number of model parameters, insufficient lightweight design, poor class adaptation for small samples, need to improve robustness and interpretability in complex backgrounds, high computational cost and unclear real-time performance on low-power devices.

[0004] While the above-mentioned small target detection methods address different issues such as feature enhancement, receptive field optimization, and the introduction of attention mechanisms, none of them fully solve the core problems in remote sensing small target detection, including complex scene adaptation, accurate multi-scale feature capture, and the balance between lightweight design and real-time performance. To address these issues, this invention specifically designs an innovative Local Enhancement Global Suppression Gating (LEGS) mechanism and a Scale Adaptive Detection Head (AASH), and optimizes the loss function construction to form a more comprehensive remote sensing small target detection solution. Among them, the LEGS mechanism innovatively adopts a dual-branch collaborative design of "local enhancement + global suppression". It enhances the detailed response of small targets through shallow high-resolution features, while providing scene constraints with the help of low-resolution features. This effectively solves the pain points of small target features being easily submerged by the background and false detection caused by incorrect activation of shallow features. It breaks through the limitations of traditional feature enhancement methods that cannot balance detail preservation and background suppression. AASH innovatively adds a high-resolution P2 detection head to preserve the shallow features of ultra-small targets. Through a closed-loop design of scale information extraction, normalization, scale difference calculation and loss weighting, it solves the problems of low fault tolerance of anchor point matching, insufficient positive samples and difficulty of adapting a single detection head to multi-scale targets in traditional detection heads. It achieves dynamic adaptation of anchor box and target scale. In terms of loss function design, it innovatively introduces LEGS loss and AASH loss, and integrates them with the original bounding box regression loss, confidence loss and category classification loss in a weighted manner to form a total loss function that is more in line with the remote sensing small target detection scenario. This ensures accurate optimization of feature enhancement effect and scale adaptation accuracy during model training, thereby making up for the shortcomings of existing methods. Summary of the Invention

[0005] To improve the accuracy and robustness of remote sensing small target detection and address core issues such as weak small target features, susceptibility to being obscured by complex backgrounds, and poor scale adaptability, this invention proposes a remote sensing small target detection method based on feature enhancement and scale-adaptive heads. First, addressing the pain points of easily losing shallow features of remote sensing small targets and erroneously activating background textures, a Local Enhancement Global Suppression Gating Mechanism (LEGS) is designed. The local enhancement branch utilizes shallow high-resolution features to enhance the detailed response of small targets, while the global suppression branch uses low-resolution features to provide scene constraints, achieving synergistic optimization of detail preservation and background suppression. Second, addressing the problems of severe feature compression for ultra-small targets and low fault tolerance in anchor point matching in traditional detection heads, a high-resolution P2 detection head is innovatively added, and a scale-adaptive detection head (AASH) is constructed. Through a closed-loop design of scale information extraction, normalization, scale difference calculation, and loss weighting, it dynamically adapts to targets of different scales, solving the problems of insufficient positive samples and multi-scale target adaptation. Furthermore, based on the original loss function of YOLOv12, LEGS loss and AASH loss are introduced to form a total loss function for multi-task collaboration, which accurately optimizes the feature enhancement effect and scale adaptation accuracy. At the same time, relying on the YOLOv12 backbone network, the model's ability to detect small targets in complex scenes is further enhanced through multi-scale feature interaction and deep and shallow information fusion.

[0006] To achieve the above objectives, the technical solution of the present invention specifically includes the following steps: S1. Data preprocessing: The HIT-UAV remote sensing small target dataset is selected. The high-resolution remote sensing images containing small targets are resized and standardized. Data augmentation methods such as rotation, scaling, and flipping are used to improve the model's generalization ability and adapt it to complex remote sensing scenarios. S2. Network Model Construction: Following the three-tier architecture of YOLOv12 ("backbone network - neck network - detection head"), a LEGS module is embedded in the neck network, and a P2 branch is added to the detection head, incorporating AASH logic. Through upsampling and feature concatenation, cross-scale fusion of deep and shallow features is achieved, constructing a dedicated network adapted for remote sensing small target detection. The overall network model structure diagram is shown below. Figure 1 As shown; S3. Model Training: The pre-processed remote sensing images are input into the network in batches. Multi-scale basic features are extracted through the backbone network. The LEGS module is used to enhance the detailed features of small targets and suppress background interference. The AASH detection head is used to dynamically adapt to targets of different scales and output the target location and category information. The Adam optimizer is used to set a reasonable initial learning rate and number of training rounds to ensure that the model fully learns the feature patterns of small targets. S4. Calculate the loss value and optimize the parameters: Quantify the loss values ​​such as position deviation and misclassification through the improved total loss function, and use the backpropagation algorithm to iteratively update the model parameters until the loss value tends to stabilize and the detection accuracy no longer improves significantly. S5. Model Deployment and Detection Application: For remote sensing images of any resolution, the model adapts to the standard input size through adaptive scaling or sliding window cropping (including overlap compensation mechanism), and outputs accurate detection results through model inference, effectively reducing the false negative rate and false positive rate in complex backgrounds.

[0007] Furthermore, the network model construction in step S2 includes the following specific steps: S21. Constructing the basic network framework: The three-level architecture of "backbone network - neck network - detection head" of YOLOv12 is adopted. The backbone network retains core convolutional modules such as A2C2f, C3k2, and Conv, and gradually extracts deep semantic features of the image through downsampling. The neck network adopts upsampling and feature concatenation operations to achieve cross-scale fusion of deep and shallow features. The core difference from the original YOLOv12 is that the LEGS module is embedded in the neck network and a high-resolution P2 branch is added in the detection head part. S22. Constructing a Local Enhancement and Global Suppression Gating Mechanism (LEGS): This module consists of a local enhancement branch and a global suppression branch connected in parallel, forming a dual-branch collaborative architecture of "detail enhancement - background constraint". The local enhancement branch sequentially performs 3×3 depthwise convolution (DWConv), 1×1 convolution, and BN+SILU activation operations on shallow high-resolution feature maps to enhance the response intensity of key detail features such as small object edges and textures. The global suppression branch compresses the spatial dimension through average pooling (AvgPool), extracts global scene information through a fully connected layer (FC) + ReLU activation function, upsamples to restore feature size, and then generates a background suppression weight map through a spatial attention mechanism to suppress interfering features. The output features of the two branches are concatenated through channels and then gating weights are generated through a Sigmoid activation function to filter and optimize the fused features, ultimately yielding the output of the LEGS module. This process can be represented as: in, The LEGS module outputs a final feature map. Input feature map to the module, For local enhancement branch feature mapping function, This is the global suppression branch feature mapping function. This is a channel-level splicing operation. For activation function, This is an element-wise multiplication operation; S23. Constructing a Scale-Adaptive Detection Head (AASH): Based on the existing YOLOv12 detection heads P3 (80×80 feature map, downsampled by 8x), P4 (40×40 feature map, downsampled by 16x), and P5 (20×20 feature map, downsampled by 32x), a new detection head P2 (160×160 feature map, downsampled by 4x) is added. This allows a 32px ultra-small target to retain 7-8 pixels of detail information on the P2 feature map. Each detection head embeds the core logic of AASH, which captures the target scale features through a scale information extraction module, eliminates the influence of scale differences through scale normalization, and quantifies the scale matching degree between the anchor box and the target through a scale difference calculation module. Then, combined with a multilayer perceptron (MLP) to achieve loss weighting, the anchor box adaptation strategy is dynamically adjusted, forming four sets of detection heads: AASH-P2, AASH-P3, AASH-P4, and AASH-P5, which are adapted to ultra-small, small, medium, and large scale targets, respectively. S24. Overall Network Connection: The multi-scale feature maps output by the backbone network are first input into the LEGS module for feature enhancement and background suppression. The enhanced feature maps are then input into the neck network, where they are upsampled and stitched together with other layer features to complete cross-scale fusion. Finally, they are input into four AASH detection heads to output the detection results of multi-scale targets.

[0008] Furthermore, the improved total loss function in step S2 is a multi-task collaborative loss function, which is composed of a weighted average of bounding box regression loss (Lreg), confidence loss (Lconf), class classification loss (Lcls), LEGS loss (LLEGS), and AASH loss (LAASH), and its specific expression is as follows: in, , , , , The weight coefficients for each loss term are all set to 1 to ensure that each optimization objective exerts a balanced effort. The CIoU loss function is used to optimize the accuracy of the target bounding box position and angle prediction. A binary cross-entropy loss method is used to optimize the accuracy of the judgment on whether the detection box contains a target. Cross-entropy loss is used to improve the classification accuracy of the target category; It includes local enhancement loss and global suppression loss. Local enhancement loss constrains the enhancement effect of small target detail features, while global suppression loss quantifies the degree of suppression of background interference. To address the scale-fit loss, the scale-matching accuracy is optimized by penalizing the scale deviation between the anchor box and the target, thus solving the problem of insufficient positive samples.

[0009] Furthermore, in step S5, the model detection performance is comprehensively evaluated by average precision (AP), mean average precision (mAP0.5, mAP0.5:0.95), small target average precision (APs), and frame rate (FPS). Among them, mAP0.5:0.95 is the average precision with an IoU threshold from 0.5 to 0.95 and a step size of 0.05, which is used to measure the detection stability under different matching criteria. APs specifically evaluates the detection effect of small targets with an area of ​​less than 32×32 pixels, ensuring the model's ability to recognize ultra-small targets.

[0010] Furthermore, the model can process remote sensing image input sizes of 640×640 pixels. For remote sensing images exceeding this size, a sliding window is used to crop them into standard-sized sub-images. After detection, the sub-images are stitched together in their original positions. The cropped edge areas are eliminated by an overlap compensation mechanism to ensure the integrity of the entire image detection.

[0011] The beneficial effects of this invention are: 1. This invention innovatively designs a Local Enhancement Global Suppression Gating (LEGS) mechanism. This mechanism enhances key details such as edges and textures of small targets in shallow, high-resolution features through local enhancement branches, while simultaneously suppressing interference from complex backgrounds (such as dense buildings and repetitive forest textures) through global suppression branches. This effectively addresses the core pain points of weak features of small targets in remote sensing, their susceptibility to being overwhelmed by the background, and false detections caused by erroneous activation of shallow features. Combined with the newly added high-resolution P2 detection head, this ensures that ultra-small targets retain sufficient pixel information in the feature map, avoiding feature compression loss and significantly improving the accuracy of small target recognition.

[0012] 2. The Scale Adaptive Detection Head (AASH) constructed in this invention forms a collaborative architecture of four detection heads covering ultra-small, small, medium, and large-scale targets by adding a P2 detection head and optimizing the anchor frame scale matching logic. AASH's scale information extraction, normalization, scale difference calculation, and loss weighting closed-loop design dynamically adapt to the feature requirements of targets of different scales, effectively solving the problems of low anchor point matching tolerance, insufficient positive samples, and "overfitting of small targets + underfitting of large targets" in traditional detection heads. It achieves accurate detection across the entire range from ultra-small targets to targets of conventional scales, significantly reducing the false negative rate.

[0013] 3. This invention adds LEGS loss and AASH loss to the original loss function of YOLOv12, constructing a multi-task collaborative total loss function. LEGS loss precisely constrains feature enhancement and background suppression effects, while AASH loss optimizes scale matching accuracy. These complement the bounding box regression loss, confidence loss, and class classification loss, ensuring that the model training process simultaneously focuses on feature quality, scale adaptation, localization accuracy, and classification accuracy, avoiding performance imbalances caused by a single optimization objective. Combined with the Adam optimizer and reasonable hyperparameter settings, the model converges faster, has stronger training stability, and can fully learn the feature patterns of small remote sensing targets. Attached Figure Description

[0014] Figure 1 This is a diagram showing the overall network model structure of the remote sensing small target detection method based on feature enhancement and scale adaptation head used in the embodiments of the present invention. Figure 2 This is a structural diagram of the Local Enhancement Global Suppression Gating Mechanism (LEGS) described in the remote sensing small target detection method based on feature enhancement and scale adaptation head used in the embodiments of the present invention. Figure 3 This is a diagram of the P2 detection head structure used in the remote sensing small target detection method based on feature enhancement and scale adaptation head in the embodiments of the present invention. Figure 4 This is a flowchart illustrating the implementation of the scale-adaptive detection head (AASH) in the remote sensing small target detection method based on feature enhancement and scale-adaptive head used in embodiments of the present invention. Figure 5 The image shows the effect of the remote sensing small target detection method based on feature enhancement and scale adaptive head used in the embodiments of the present invention. Detailed Implementation

[0015] To provide a clearer understanding of the technical features, objectives, and beneficial effects of the present invention, an embodiment of the invention will be further described in conjunction with the accompanying drawings. This embodiment is only for further illustration of the invention and should not be construed as limiting the scope of protection of the invention. Non-essential improvements and adjustments made by those skilled in the art based on the content of the invention also fall within the scope of protection of the present invention.

[0016] In this embodiment, as Figure 1 As shown, this invention provides a remote sensing small target detection method based on feature enhancement and scale-adaptive head, the specific steps of which include: S1. Data preprocessing: The HIT-UAV remote sensing small target dataset is selected. The high-resolution remote sensing images containing small targets are resized and standardized. Data augmentation methods such as rotation, scaling, and flipping are used to improve the model's generalization ability and adapt it to complex remote sensing scenarios. Specifically, all input images were uniformly adjusted to a standard size of 640×640 pixels to facilitate batch processing and feature extraction by the network model. For ultra-large images in the HIT-UAV dataset with resolutions exceeding 4096×4096, bilinear interpolation was first used to adaptively scale them to 2048×2048 pixels, and then they were cropped into 640×640 pixel sub-images using a sliding window method with a window overlap rate of 15% to ensure that target information was not lost. Z-score normalization was performed on the RGB three-channel pixel values ​​of the images, and the mean and standard deviation of each channel were calculated. A combination of methods such as random rotation, proportional scaling, and horizontal / vertical flipping were used. The preprocessed and enhanced HIT-UAV dataset was divided into training, testing, and validation sets in a 7:2:1 ratio for parameter learning, performance evaluation, and training monitoring, respectively. S2. Network Model Construction: Based on the YOLOv12 architecture, an innovative Local Enhancement Global Suppression Gating (LEGS) mechanism and Scale Adaptive Detection Head (AASH) are incorporated, and the loss function is optimized to build an end-to-end network model suitable for remote sensing small target detection, achieving synergistic optimization of feature enhancement, scale adaptation, and accurate detection; the overall network model structure diagram is shown below. Figure 1 As shown; Specifically, the three-level architecture of YOLOv12, namely "backbone network - neck network - detection head", is adopted: the backbone network retains core modules such as A2C2f and C3k2, and extracts deep features through 5 downsampling; the neck network achieves cross-scale fusion through upsampling and feature concatenation, and embeds the LEGS module; the detection head adds a P2 branch, forming four sets of multi-scale detection architectures from AASH to P2 to P5, which are adapted to targets of all scales.

[0017] Specifically, in the LEGS module: This module consists of a local enhancement branch and a global suppression branch connected in parallel, forming a dual-branch collaborative architecture of "detail enhancement - background constraint". The local enhancement branch sequentially performs 3×3 depthwise convolution (DWConv), 1×1 convolution, and BN+SILU activation operations on the shallow high-resolution feature map to enhance the response strength of key detail features such as small object edges and textures. The global suppression branch compresses the spatial dimension through average pooling (AvgPool), extracts global scene information through a fully connected layer (FC) + ReLU activation function, upsamples to restore the feature size, and then generates a background suppression weight map through a spatial attention mechanism to suppress interfering features. The output features of the two branches are concatenated through channels and then gating weights are generated through a Sigmoid activation function to filter and optimize the fused features, finally obtaining the output of the LEGS module. This process can be represented as: in, The LEGS module outputs a final feature map. Input feature map to the module, For local enhancement branch feature mapping function, This is the global suppression branch feature mapping function. This is a channel-level splicing operation. For activation function, This is an element-wise multiplication operation; The AASH detection head specifically refers to: Based on the existing P3 (80×80 feature map, downsampled 8 times), P4 (40×40 feature map, downsampled 16 times), and P5 (20×20 feature map, downsampled 32 times) detection heads in YOLOv12, a new P2 detection head (160×160 feature map, downsampled 4 times) is added. This allows a 32px ultra-small target to retain 7-8 pixels of detail information on the P2 feature map. Each detection head embeds the AASH core logic, which captures the target scale features through the scale information extraction module, eliminates the influence of scale differences through scale normalization, and quantifies the scale matching degree between the anchor box and the target through the scale difference calculation module. Then, combined with the multilayer perceptron (MLP) to achieve loss weighting, the anchor box adaptation strategy is dynamically adjusted to form four sets of detection heads: AASH-P2, AASH-P3, AASH-P4, and AASH-P5, which are adapted to ultra-small, small, medium, and large scale targets, respectively. The multi-scale feature maps output by the backbone network are first input into the LEGS module for feature enhancement and background suppression. The enhanced feature maps are then input into the neck network, where they are upsampled and stitched together with other layer features to achieve cross-scale fusion. Finally, they are input into four AASH detection heads to output the detection results of multi-scale targets.

[0018] Furthermore, the improved total loss function in step S2 is a multi-task collaborative loss function, which is composed of a weighted average of bounding box regression loss (Lreg), confidence loss (Lconf), class classification loss (Lcls), LEGS loss (LLEGS), and AASH loss (LAASH), and its specific expression is as follows: in, , , , , The weight coefficients for each loss term are all set to 1 to ensure that each optimization objective exerts a balanced effort. The CIoU loss function is used to optimize the accuracy of the target bounding box position and angle prediction. A binary cross-entropy loss method is used to optimize the accuracy of the judgment on whether the detection box contains a target. Cross-entropy loss is used to improve the classification accuracy of the target category; It includes local enhancement loss and global suppression loss. Local enhancement loss constrains the enhancement effect of small target detail features, while global suppression loss quantifies the degree of suppression of background interference. To address the scale-fit loss, the scale-matching accuracy is optimized by penalizing the scale deviation between the anchor box and the target, thus solving the problem of insufficient positive samples.

[0019] S3. Model Training: Model training and target detection: The pre-processed remote sensing images are batch input into the constructed network. Multi-scale basic features are extracted through the backbone network. The LEGS module enhances the detailed features of small targets and suppresses interference from complex backgrounds. The AASH detection head is used to dynamically adapt to targets of different scales. Finally, the detection results containing target location and category information are output. Specifically, the network model uses the Adam optimizer for parameter updates, with the learning rate initially set to 0.0001 and adaptively adjusted during training based on the loss convergence. The total number of training rounds is set to 200 to ensure that the model fully learns the feature patterns of remote sensing small targets. S4. Calculate the loss value and optimize the parameters: Compare the detection results output by the network with the labeled information of the dataset, calculate the loss values ​​such as positional deviation and misclassification through the improved total loss function, and use the backpropagation algorithm to iteratively update the model parameters until the loss value tends to stabilize and the model detection accuracy no longer improves significantly. S5. Model Deployment and Detection Application: The trained network model can be directly used for remote sensing small target detection tasks. For remote sensing images of any resolution, it is first adaptively scaled to the standard input size, and after model inference, it outputs accurate small target recognition and localization results, effectively reducing the false negative rate and false positive rate in complex backgrounds.

[0020] Specifically, in step S5, the model detection performance is comprehensively evaluated by average precision (AP), mean average precision (mAP0.5, mAP0.5:0.95), small target average precision (APs), and frame rate (FPS). Among them, mAP0.5:0.95 is the average precision with an IoU threshold from 0.5 to 0.95 and a step size of 0.05, which is used to measure the detection stability under different matching criteria. APs specifically evaluates the detection effect of small targets with an area of ​​less than 32×32 pixels, ensuring the model's ability to recognize ultra-small targets.

[0021] Specifically, the model can process remote sensing images with an input size of 640×640 pixels. For remote sensing images exceeding this size, a sliding window is used to crop them into standard-sized sub-images. After detection, the sub-images are stitched together in their original positions. The cropped edge areas are eliminated by an overlap compensation mechanism to ensure the integrity of the entire image detection.

[0022] The method of the present invention has been described above. Those skilled in the art can implement the method of the present invention based on this description. Other embodiments obtained by those skilled in the art based on the above description of the present invention without inventive effort should all fall within the scope of protection of the present invention.

Claims

1. A remote sensing small target detection method based on feature enhancement and scale-adaptive head, characterized in that, Includes the following steps: S1. Data Preprocessing: The remote sensing image dataset is preprocessed by adjusting and standardizing the image size. The dataset includes high-resolution images with small targets. Appropriate data augmentation methods, such as rotation, scaling and flipping, are used to improve the generalization ability of the model. S2. Network Model Construction: Based on YOLOv12, the network model innovatively incorporates Local Enhancement Global Suppression Gating (LEGS) and Scale Adaptive Detection Head (AASH), and optimizes the loss function to build an end-to-end network model suitable for remote sensing small target detection, achieving synergistic optimization of feature enhancement, scale adaptation and accurate detection; the overall structure of the network model is shown in Figure 1. S3. Model Training: Model training and target detection: The pre-processed remote sensing images are batch input into the constructed network. Multi-scale basic features are extracted through the backbone network. The LEGS module enhances the detailed features of small targets and suppresses complex background interference. The AASH detection head is used to dynamically adapt to targets of different scales. Finally, the detection results containing target location and category information are output. Furthermore, the network model uses the Adam optimizer for parameter updates, with the learning rate initially set to 0.0001 and adaptively adjusted during training based on the loss convergence. The total number of training rounds is set to 200 to ensure that the model fully learns the feature patterns of remote sensing small targets. S4. Calculate the loss value and optimize the parameters: Compare the detection results output by the network with the labeled information of the dataset, calculate the loss values ​​such as positional deviation and misclassification through the improved total loss function, and use the backpropagation algorithm to iteratively update the model parameters until the loss value tends to stabilize and the model detection accuracy no longer improves significantly. S5. Model Deployment and Detection Application: The trained network model can be directly used for remote sensing small target detection tasks. For remote sensing images of any resolution, it is first adaptively scaled to the standard input size, and after model inference, it outputs accurate small target recognition and localization results, effectively reducing the false negative rate and false positive rate in complex backgrounds.

2. The remote sensing small target detection method based on feature enhancement and scale-adaptive head according to claim 1, characterized in that, The network model construction in step S2 includes the following specific steps: S21. Constructing the basic network framework: The three-level architecture of "backbone network - neck network - detection head" of YOLOv12 is adopted. The backbone network retains core convolutional modules such as A2C2f, C3k2, and Conv, and gradually extracts deep semantic features of the image through downsampling. The neck network adopts upsampling and feature concatenation operations to achieve cross-scale fusion of deep and shallow features. The core difference from the original YOLOv12 is that the LEGS module is embedded in the neck network and a high-resolution P2 branch is added in the detection head part. S22. Constructing a Local Enhancement and Global Suppression Gating Mechanism (LEGS): This module consists of a local enhancement branch and a global suppression branch connected in parallel, forming a dual-branch collaborative architecture of "detail enhancement - background constraint". The local enhancement branch sequentially performs 3×3 depthwise convolution (DWConv), 1×1 convolution, and BN+SILU activation operations on shallow high-resolution feature maps to enhance the response intensity of key detail features such as small object edges and textures. The global suppression branch compresses the spatial dimension through average pooling (AvgPool), extracts global scene information through a fully connected layer (FC) + ReLU activation function, upsamples to restore feature size, and then generates a background suppression weight map through a spatial attention mechanism to suppress interfering features. The output features of the two branches are concatenated through channels and then gating weights are generated through a Sigmoid activation function to filter and optimize the fused features, ultimately yielding the output of the LEGS module. This process can be represented as: in, The LEGS module outputs a final feature map. Input feature map to the module, For local enhancement branch feature mapping function, This is the global suppression branch feature mapping function. This is a channel-level splicing operation. For activation function, This is an element-wise multiplication operation; S23. Constructing a Scale-Adaptive Detection Head (AASH): Based on the existing YOLOv12 detection heads P3 (80×80 feature map, downsampled by 8x), P4 (40×40 feature map, downsampled by 16x), and P5 (20×20 feature map, downsampled by 32x), a new detection head P2 (160×160 feature map, downsampled by 4x) is added. This allows a 32px ultra-small target to retain 7-8 pixels of detail information on the P2 feature map. Each detection head embeds the core logic of AASH, capturing target scale features through a scale information extraction module, eliminating the influence of scale differences through scale normalization, quantifying the scale matching degree between the anchor box and the target through a scale difference calculation module, and then combining it with a multilayer perceptron (MLP) to achieve loss weighting. The anchor box adaptation strategy is dynamically adjusted to form four sets of detection heads: AASH-P2, AASH-P3, AASH-P4, and AASH-P5, which are adapted to ultra-small, small, medium, and large scale targets, respectively. S24. Overall Network Connection: The multi-scale feature maps output by the backbone network are first input into the LEGS module for feature enhancement and background suppression. The enhanced feature maps are then input into the neck network, where they are upsampled and stitched together with other layer features to complete cross-scale fusion. Finally, they are input into four AASH detection heads to output the detection results of multi-scale targets.

3. The remote sensing small target detection method based on feature enhancement and scale-adaptive head according to claim 1, characterized in that, The improved total loss function in step S2 is a multi-task collaborative loss function, which is composed of a weighted average of bounding box regression loss (Lreg), confidence loss (Lconf), class classification loss (Lcls), LEGS loss (LLEGS), and AASH loss (LAASH). The specific expression is as follows: in, , , , , The weight coefficients for each loss term are all set to 1 to ensure that each optimization objective exerts a balanced effort. The CIoU loss function is used to optimize the accuracy of the target bounding box position and angle prediction. A binary cross-entropy loss method is used to optimize the accuracy of determining whether a target is contained within the bounding box. Cross-entropy loss is used to improve the classification accuracy of the target category; It includes local enhancement loss and global suppression loss. Local enhancement loss constrains the enhancement effect of small target detail features, while global suppression loss quantifies the degree of suppression of background interference. To address the scale-fit loss, the scale-matching accuracy is optimized by penalizing the scale deviation between the anchor box and the target, thus solving the problem of insufficient positive samples.

4. The remote sensing small target detection method based on feature enhancement and scale-adaptive head according to claim 1, characterized in that, In step S5, the model detection performance is comprehensively evaluated by average precision (AP), mean average precision (mAP0.5, mAP0.5:0.95), small target average precision (APs), and frame rate (FPS). Among them, mAP0.5:0.95 is the average precision with an IoU threshold from 0.5 to 0.95 and a step size of 0.05, which is used to measure the detection stability under different matching criteria. APs specifically evaluates the detection effect of small targets with an area of ​​less than 32×32 pixels, ensuring the model's ability to recognize ultra-small targets.

5. The remote sensing small target detection method based on feature enhancement and scale-adaptive head according to claim 1, characterized in that, The model can process remote sensing images with an input size of 640×640 pixels. For remote sensing images exceeding this size, a sliding window is used to crop them into standard-sized sub-images. After detection, the sub-images are stitched together in their original positions. The cropped edge areas are eliminated by an overlap compensation mechanism to ensure the integrity of the entire image detection.