Lightweight detection method, device and equipment for unmanned aerial vehicle photoelectric small target and medium

By improving the lightweight detection model, the problems of feature loss and limited accuracy of traditional YOLO-like models in the detection of small photoelectric targets in UAVs are solved, and efficient lightweight detection results are achieved.

CN122265896APending Publication Date: 2026-06-23湖南工商大学

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
湖南工商大学
Filing Date
2026-05-22
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Traditional YOLO-like models suffer from problems such as easy loss of small target features, misalignment of semantic information and spatial location, low efficiency of feature pyramid network fusion, and limited accuracy of bounding box regression in the detection of small targets by urban low-altitude UAVs. It is difficult to achieve a balance between model lightweighting and detection accuracy.

Method used

A lightweight detection model is adopted, which includes a feature cross-coupling module, a decoupled downsampling module, a progressive multi-scale enhancement module, and a lightweight attention enhancement module. Multi-scale feature extraction and fusion are performed through the backbone network and the neck network. Combined with an improved regression loss function, feature preservation and accuracy improvement are achieved.

Benefits of technology

This improved the accuracy and efficiency of UAV photoelectric target detection, reduced the number of model parameters, and achieved synergistic optimization of model lightweighting and detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265896A_ABST
    Figure CN122265896A_ABST
Patent Text Reader

Abstract

The application discloses a lightweight detection method and device for an unmanned aerial vehicle photoelectric small target, an equipment and a medium, designs an unmanned aerial vehicle identification technology field, and comprises the following steps: collecting an unmanned aerial vehicle photoelectric image and preprocessing, adopting a lightweight detection model containing feature cross coupling, decoupling downsampling, gradual multi-scale enhancement and other modules, completing feature extraction, multi-scale fusion and classification regression, and combining non-maximum suppression to output a detection result. The small target features are effectively reserved, the detection accuracy and efficiency of the unmanned aerial vehicle photoelectric small target in a complex scene are improved, the model parameter quantity is reduced, and precision and lightweight are cooperatively optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drone identification technology, and in particular to a lightweight detection method, device, equipment, and medium for small photoelectric targets on drones. Background Technology

[0002] Current mainstream solutions for UAV photoelectric detection mostly employ YOLO series single-stage detection models. These models extract features through a backbone network, fuse multi-scale features through a neck network, and perform classification and bounding box regression using a detection head, achieving end-to-end target detection. Existing technologies typically reduce the number of model parameters by lightweighting the backbone network, simplifying the feature fusion structure, and optimizing convolutional modules. They also combine feature pyramid structures to improve small target detection capabilities. Some solutions improve bounding box regression accuracy by modifying the loss function to meet the real-time detection requirements of low-altitude security scenarios.

[0003] Traditional YOLO-like models have significant drawbacks in detecting small photoelectric targets such as UAVs in urban low-altitude environments: the low pixel ratio of small targets (UAVs) leads to the loss of shallow spatial features after multiple downsampling, resulting in misalignment between semantic information and spatial location, causing missed detections and positioning errors; the multi-scale information fusion efficiency of feature pyramid networks is low, failing to adequately consider both local details and global context, and exhibiting poor adaptability to complex backgrounds; traditional bounding box regression loss is sensitive to small target position shifts, has limited overlapping areas, unstable regression gradients, and limited positioning accuracy; furthermore, lightweight improvements often come at the cost of detection accuracy, making it difficult to achieve an effective balance between model parameter count, detection accuracy, and inference speed.

[0004] Therefore, how to improve the accuracy and efficiency of UAV photoelectric target detection while maintaining the model's lightweight nature has become an urgent problem to be solved. Summary of the Invention

[0005] The main objective of this application is to provide a lightweight detection method, apparatus, and medium for small photoelectric targets on unmanned aerial vehicles (UAVs), aiming to solve the technical problem of how to improve the detection accuracy and efficiency of small photoelectric targets on UAVs.

[0006] To achieve the above objectives, this application proposes a lightweight detection method for small optoelectronic targets on unmanned aerial vehicles (UAVs), comprising: Acquire photoelectric images of drones in urban low-altitude scenarios; The photoelectric image of the UAV is preprocessed to obtain a standardized input image; The standardized input image is processed by a preset lightweight detection model to obtain the target category confidence and bounding box coordinates. The preset lightweight detection model includes a backbone network, a neck network, and a detection head. The backbone network includes basic convolutional units, a feature cross-coupling module, a decoupled downsampling module, a progressive multi-scale enhancement module, a fast spatial pyramid pooling module, and a lightweight attention enhancement module. The neck network includes a cross-stage dual convolutional kernel module, an upsampling module, and a decoupled downsampling module. The detection head includes three detection output layers, each including a classification branch and a regression branch. The target category confidence and bounding box coordinates are matched and non-maximum suppression is applied to obtain the UAV detection results; The step of inputting the standardized input image into a preset lightweight detection model for processing to obtain the UAV detection result includes: The standardized input image is input into the backbone network of a preset lightweight detection model for feature extraction, resulting in a multi-scale feature map set. The multi-scale feature map set is input into the neck network of the preset lightweight detection model for feature fusion to obtain a multi-scale fused feature map; The multi-scale fused feature map is input into the three detection output layers of the detection head of the preset lightweight detection model. The target category confidence is obtained through the classification branch corresponding to each detection output layer, and the bounding box coordinates are obtained through the regression branch corresponding to each detection output layer.

[0007] In one embodiment, the step of inputting the standardized input image into the backbone network of a preset lightweight detection model for feature extraction to obtain a multi-scale feature map set includes: The standardized input image is input into a basic convolutional unit for shallow feature extraction and resolution reduction to obtain a shallow feature map. The shallow feature map is input into the feature cross-coupling module for channel segmentation and spatial semantic collaborative fusion to obtain an enhanced feature map. By decoupling the downsampling module, the enhanced feature map is spatially downsampled and channel extended to separate the processing, resulting in a downsampled feature map. The downsampled feature map is input into the progressive multi-scale enhancement module for multi-receptive field feature fusion to obtain a fused feature map; The fused feature map is subjected to multi-scale pooling and feature stitching by a fast spatial pyramid pooling module to obtain a stitched feature map; The spliced ​​feature map is adaptively adjusted in terms of channel weights and focused in terms of spatial region by using a lightweight attention enhancement module to obtain a multi-scale feature map set.

[0008] In one embodiment, the step of inputting the shallow feature map into the feature cross-coupling module for channel segmentation and spatial semantic co-fusion to obtain an enhanced feature map includes: The shallow feature map is divided into a first feature branch and a second feature branch according to a preset channel ratio coefficient; The semantic information of the first feature branch is enhanced by convolution operation to obtain channel semantic features; Spatial information is preserved in the second feature branch by point convolution operation to obtain spatially sensitive features; The channel semantic features are subjected to depthwise separable convolution to aggregate spatial features, and the spatially sensitive features are subjected to lightweight convolution mapping to generate spatial attention weights. The channel semantic features and the spatially sensitive features are cross-fused according to the spatial attention weights to obtain an enhanced feature map.

[0009] In one embodiment, the step of separating spatial downsampling and channel expansion of the enhanced feature map through a decoupled downsampling module to obtain a downsampled feature map includes: Obtain the number of input channels of the enhanced feature map, and calculate the preset number of groups based on the number of input channels; The enhanced feature map is subjected to grouped convolution operation according to the preset number of groups, and spatial downsampling is performed with a preset stride to obtain an intermediate feature map. The intermediate feature map is expanded by point convolution to obtain a channel-expanded feature map; The channel extended feature map is reconstructed to obtain a downsampled feature map.

[0010] In one embodiment, the step of inputting the downsampled feature map into a progressive multi-scale enhancement module for multi-receptive field feature fusion to obtain a fused feature map includes: Local feature maps are obtained by performing local feature extraction on the downsampled feature map through depthwise convolution with a preset first convolution kernel size; The local feature map is transformed and fused by convolution with a preset second convolution kernel size to obtain a transformed feature map; The contextual feature map is obtained by performing a convolution with a preset third convolution kernel size to capture contextual information from the transformed feature map. Global semantic information is captured by convolution with a preset fourth convolution kernel size to obtain a global semantic feature map, wherein the second convolution kernel size is smaller than the first convolution kernel size, the first convolution kernel size is smaller than the third convolution kernel size, and the third convolution kernel size is smaller than the fourth convolution kernel size; The global semantic feature map and the downsampled feature map are fused by residual connection to obtain a fused feature map.

[0011] In one embodiment, the step of inputting the multi-scale feature map set into the neck network of the preset lightweight detection model for feature fusion to obtain a multi-scale fused feature map includes: The multi-scale feature map set is input into the cross-stage dual convolutional kernel module for cross-stage feature extraction and splitting fusion to obtain cross-stage feature maps. The upsampling module performs resolution restoration and high-level semantic transfer on the cross-stage feature map to obtain the upsampled feature map; The upsampled feature map is separated into spatial downsampling and channel expansion by the decoupled downsampling module in the neck network to obtain the neck downsampled feature map; The cross-stage feature map, upsampled feature map, and neck downsampled feature map are spliced ​​across layers and shuffled through channels to obtain a multi-scale fused feature map.

[0012] In one embodiment, the step of inputting the multi-scale fused feature map into the three detection output layers of the detection head of the preset lightweight detection model, obtaining the target class confidence through the classification branch corresponding to each detection output layer, and obtaining the bounding box coordinates through the regression branch corresponding to each detection output layer includes: The multi-scale fused feature map is input into three detection output layers respectively. The class probability of the multi-scale fused feature map is predicted by the classification branch corresponding to each detection output layer to obtain the target class confidence. By using the regression branches corresponding to each detection output layer, the bounding box parameters of the multi-scale fused feature map are predicted to obtain a set of predicted bounding boxes. The predicted bounding boxes in the predicted bounding box set are mapped to the corresponding preset labeled real bounding boxes as two-dimensional Gaussian distributions to obtain the predicted Gaussian distribution and the real Gaussian distribution. The second-order distance metric is calculated based on the predicted Gaussian distribution and the actual Gaussian distribution. The second-order distance metric is normalized to a preset interval by using an exponential function mapping to obtain a normalized distance loss value. The normalized distance loss value and the intersection-union ratio loss value are weighted and fused according to preset weighting coefficients to obtain the fused regression loss value; The predicted bounding box set is optimized based on the fusion regression loss value to obtain the bounding box coordinates.

[0013] Furthermore, to achieve the above objectives, this application also proposes a lightweight detection device for small photoelectric targets of unmanned aerial vehicles (UAVs), the lightweight detection device for small photoelectric targets of UAVs comprising: The acquisition module is used to acquire photoelectric images of drones in urban low-altitude scenarios; The processing module is used to preprocess the photoelectric image of the UAV to obtain a standardized input image; The detection module is used to input the standardized input image into a preset lightweight detection model for processing to obtain the target category confidence and bounding box coordinates. The preset lightweight detection model includes a backbone network, a neck network, and a detection head. The backbone network includes basic convolutional units, a feature cross-coupling module, a decoupled downsampling module, a progressive multi-scale enhancement module, a fast spatial pyramid pooling module, and a lightweight attention enhancement module. The neck network includes a cross-stage dual convolutional kernel module, an upsampling module, and a decoupled downsampling module. The detection head includes three detection output layers, each including a classification branch and a regression branch. The module is also used to input the standardized input image into the backbone network of the preset lightweight detection model for feature extraction, obtaining a multi-scale feature map set; input the multi-scale feature map set into the neck network of the preset lightweight detection model for feature fusion, obtaining a multi-scale fused feature map; and input the multi-scale fused feature map into the three detection output layers of the detection head of the preset lightweight detection model, obtaining the target category confidence through the classification branch corresponding to each detection output layer and the bounding box coordinates through the regression branch corresponding to each detection output layer. The results module is used to match and suppress non-maximum values ​​of the target category confidence and bounding box coordinates to obtain the UAV detection results.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the lightweight detection method for small photoelectric targets of UAVs as described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the lightweight detection method for small photoelectric targets of UAVs as described above.

[0016] This application acquires and preprocesses UAV photoelectric images, employing a lightweight detection model that includes modules such as feature cross-coupling, decoupled downsampling, and progressive multi-scale enhancement to complete feature extraction, multi-scale fusion, and classification regression. The model combines non-maximum suppression to output detection results. This effectively preserves the features of small targets, improving the accuracy and efficiency of detecting small UAV photoelectric targets in complex scenes, reducing the number of model parameters, and achieving a synergistic optimization of accuracy and lightweight design. Attached Figure Description

[0017] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the first embodiment of the lightweight detection method for small optoelectronic targets of UAVs according to this application. Figure 2 This is a block diagram of the preset lightweight detection model structure of the first embodiment of the lightweight detection method for small photoelectric targets of UAVs in this application; Figure 3 This is a flowchart illustrating the second embodiment of the lightweight detection method for small optoelectronic targets of UAVs in this application. Figure 4 This is a schematic diagram of the module structure of the lightweight detection device for small photoelectric targets of UAVs in this application; Figure 5 This is a schematic diagram of the hardware operating environment of the lightweight detection method for small photoelectric targets of UAVs in the embodiments of this application.

[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0022] Current mainstream solutions for UAV photoelectric detection mostly employ YOLO series single-stage detection models. These models extract features through a backbone network, fuse multi-scale features through a neck network, and perform classification and bounding box regression using a detection head, achieving end-to-end target detection. Existing technologies typically reduce the number of model parameters by lightweighting the backbone network, simplifying the feature fusion structure, and optimizing convolutional modules. They also combine feature pyramid structures to improve small target detection capabilities. Some solutions improve bounding box regression accuracy by modifying the loss function to meet the real-time detection requirements of low-altitude security scenarios.

[0023] Traditional YOLO-like models suffer from significant drawbacks in detecting small electro-optical targets from low-altitude UAVs in urban areas: the low pixel ratio of small targets (UAVs) leads to the loss of shallow spatial features after multiple downsampling, resulting in misalignment between semantic information and spatial location, causing missed detections and localization errors; the low efficiency of multi-scale information fusion in feature pyramid networks fails to adequately consider local details and global context, exhibiting poor adaptability to complex backgrounds; traditional bounding box regression loss is sensitive to small target positional shifts, has limited overlapping areas, and suffers from unstable regression gradients, limiting localization accuracy; furthermore, lightweight improvements often come at the cost of detection accuracy, making it difficult to achieve an effective balance between model parameter count, detection accuracy, and inference speed. Therefore, improving the accuracy and efficiency of UAV electro-optical target detection while maintaining model lightweightness has become an urgent problem to be solved.

[0024] Therefore, this application proposes a lightweight detection method for small optoelectronic targets of UAVs to solve the above problems.

[0025] Based on the above, this application also provides a lightweight detection method for small photoelectric targets on unmanned aerial vehicles (UAVs), referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the lightweight detection method for small optoelectronic targets of unmanned aerial vehicles (UAVs) according to this application. In this embodiment, the lightweight detection method for small optoelectronic targets of UAVs includes steps S10-S40: Step S10: Acquire photoelectric images of the drone in a low-altitude urban scene.

[0026] It should be noted that urban low-altitude scenarios refer to the flight space within urban areas that is close to the ground and at a relatively low altitude. This space includes a variety of complex environments such as buildings, vegetation, roads, and the sky, and is a common operating range for drones. Drone photoelectric images refer to visible light images containing drone targets acquired through optical imaging equipment. These images can reveal the drone's shape, texture, and spatial location information, and are the raw data for target detection.

[0027] Specifically, firstly, photoelectric detection equipment (such as visible light cameras or infrared thermal imagers) deployed in urban low-altitude security areas continuously scans and images the monitored airspace, capturing raw photoelectric image data containing UAV targets in real time. Secondly, the captured raw photoelectric image data is digitally sampled according to a preset acquisition frame rate (30fps) and a preset resolution (1920×1080) to obtain a UAV photoelectric image sequence. This is done because photoelectric detection can acquire the spatial structure and texture features of UAVs, maintaining strong spatial resolution and target discrimination capability through multi-scale feature fusion under complex background conditions. Compared with radar detection, it has higher accuracy in identifying low, slow, and small targets, and compared with radio identification, it is less susceptible to interference from signals in the same frequency band.

[0028] Step S20: Preprocess the UAV photoelectric image to obtain a standardized input image.

[0029] Specifically, the first step is to perform geometric correction and distortion correction on the UAV's photoelectric image to eliminate the impact of optical lens distortion on target localization, resulting in a corrected image. Then, the corrected image undergoes scale normalization, adjusting the image resolution to a preset input size (640×640) using bilinear interpolation, resulting in a normalized image. Finally, the normalized image is standardized by dividing the pixel values ​​of the RGB channels by a preset normalization coefficient (e.g., 255), subtracting the preset mean, and dividing by the preset standard deviation, resulting in a standardized input image. This preprocessing is necessary because neural network models are sensitive to the scale and distribution of input data. Standardizing the input size and pixel values ​​accelerates model convergence and improves detection stability, much like providing athletes of different heights with standard-sized sportswear to ensure fair execution of competition rules.

[0030] Step S30: Input the standardized input image into the preset lightweight detection model for processing to obtain the target category confidence and bounding box coordinates.

[0031] It should be noted that the pre-trained lightweight detection model refers to a deep learning detection model that has been pre-trained and whose parameters have been streamlined and optimized. This model is an improvement on the YOLOv11 model and is designed for the detection of small photoelectric targets on UAVs, balancing detection accuracy and computational efficiency. Figure 2The preset lightweight detection model shown includes a backbone network, a neck network, and a detection head. The backbone network comprises basic convolutional units (CBS), a feature cross-coupling module (FCC), a decoupled downsampling module (Down), a progressive multi-scale enhancement module (PMSE), a fast spatial pyramid pooling module (SPPF), and a lightweight attention enhancement module (C2PSA). The neck network includes a cross-stage dual convolutional kernel module (C3K2), an upsampling module (Upsample), and a decoupled downsampling module (Down). The detection head includes three detection output layers (Detect), with classification and regression branches. The backbone network is responsible for extracting basic features from the image, using multi-layer modules to mine and represent multi-scale features. The neck network is responsible for fusing and enhancing the features output from the backbone network, enabling interaction and complementarity between features at different levels. The detection head is responsible for classifying and regressing the target based on the fused features, directly outputting the key detection results. The basic convolutional unit refers to the convolutional combination structure in the backbone network that performs initial feature extraction, completing the initial feature extraction and resolution adjustment of the image. The feature cross-coupling module refers to the feature processing module used to fuse spatial and semantic information, mitigating the problems of feature loss and positional misalignment for small targets. The decoupled downsampling module refers to a downsampling structure that separates spatial downsampling and channel expansion, reducing feature detail loss and computational cost. The progressive multi-scale enhancement module refers to an enhancement module that extracts features step-by-step through convolutions with different receptive fields, improving the model's adaptability to changes in the scale of small targets. The fast spatial pyramid pooling module refers to a lightweight multi-scale pooling fusion structure that aggregates global contextual information with low computational cost. The lightweight attention enhancement module refers to an attention structure used to adaptively enhance important features, focusing on the target region and suppressing background interference. The cross-stage dual convolutional kernel module refers to a module in the neck network that uses dual convolutional kernels to achieve cross-stage feature fusion, enhancing feature representation and channel integration capabilities. The upsampling module refers to a feature magnification structure used to improve the resolution of the feature map, achieving effective alignment between high-level and shallow features. The three detection output layers refer to detection branches corresponding to features at different scales, adapting to the multi-scale distribution characteristics of UAV targets. The classification branch is the branch in the detection output layer used to determine the category of the target, outputting the probability that the target belongs to a UAV. The regression branch is the branch in the detection output layer used to predict the target's location, outputting the position and size parameters of the target's bounding box.Traditional YOLOv11 models use the CIoU loss function to enhance the geometric consistency of target localization. However, this method still has limitations in detecting small-scale UAVs. Specifically, the overlap between the predicted bounding box and the ground truth bounding box is limited, resulting in a weak regression optimization signal. Furthermore, the large size variations of small UAVs and the unstable influence of center point offsets easily cause fluctuations in the regression gradient, making the aspect ratio constraint of CIoU highly sensitive to changes in the scale of small targets, thus affecting localization accuracy. Therefore, this paper introduces a weighted fusion of normalized Wasserstein distance (NWD) and CIoU as the regression loss function.

[0032] Specifically, the standardized input image is fed into a pre-defined lightweight detection model, and processed layer by layer through the backbone network, neck network, and detection head. The backbone network extracts multi-scale features through basic convolutional units, feature cross-coupling modules, decoupled downsampling modules, progressive multi-scale enhancement modules, fast spatial pyramid pooling modules, and lightweight attention enhancement modules. The neck network fuses and enhances multi-scale features through cross-stage dual convolutional kernel modules, upsampling modules, and decoupled downsampling modules. The detection head outputs the target class confidence and bounding box coordinates through the classification and regression branches of the three detection output layers, respectively.

[0033] Furthermore, to systematically evaluate the applicability and effectiveness of the preset lightweight detection model (hereinafter referred to as FSN-YOLO) described in this embodiment in anti-drone target detection scenarios, experimental research was conducted based on the TIB-Dut drone dataset. The TIB-Dut dataset is constructed by fusing partial samples from two public datasets, the TIB-Net dataset and the DUT Anti-UAV dataset, totaling 4255 images, all uniformly labeled in YOLO format. This dataset contains flight images of different types of drones in various complex scenarios such as the sky, forests, buildings, and lawns, covering different time periods and weather conditions, demonstrating strong scene diversity and practical application value. The model input image size is 640×640 pixels, using a stochastic gradient descent optimizer with an initial learning rate of 0.01, 300 training epochs, and a batch size of 16. All experiments were conducted under a unified configuration to ensure the objectivity and scientific rigor of the experimental verification. This embodiment uses parameters such as precision (P), recall (R), mean precision (R), number of model parameters, and detection speed (Frames Per Second, FPS) to comprehensively evaluate the model's detection accuracy, complexity, and computational efficiency. Precision and recall measure the accuracy of the model's predictions and its target detection capability. The mean precision at an intersection-union (IU) threshold of 0.5 is denoted as mAP50, a metric derived from the PASCAL VOC evaluation standard, primarily measuring the model's target detection capability. The mean precision across IU thresholds ranging from 0.5 to 0.95 with a step size of 0.05 is denoted as mAP50:95, a metric derived from the COCO evaluation system, which uses a multi-threshold averaging method to more rigorously evaluate the model's localization accuracy. The number of parameters measures the model's size, reflecting its computational complexity and storage overhead. Frames per second are used to evaluate the model's inference efficiency, comprehensively analyzing the balance between detection accuracy and computational efficiency. To verify the effectiveness of each module in FSN-YOLO, an ablation experiment was set up using YOLOv11n as the baseline model. A unified dataset and training configuration were adopted to ensure the objectivity and scientific nature of the experimental verification. The results are shown in Table 1.

[0034] Table 1 Ablation Experiment Results The ablation experiments described above show that replacing the C3K2 module in the backbone network with the Feature Cross-Coupled (FCC) module improves recall and mAP50 by 11.8% and 5.5%, respectively, indicating that the FCC module can significantly enhance the model's feature representation ability for small-target UAVs. Introducing the Decoupled Downsampling (Down) module and Progressive Multi-Scale Enhancement (PMSE) module into the YOLOv11n model reduces the number of model parameters by approximately 1.79M and improves mAP50:95 by 3.5%. Introducing the Normalized Distance Loss (NWD) function improves the detection precision of UAVs by 4.7%, reducing gradient instability issues in regression for small-target UAVs in images. Compared to the YOLOv11n baseline model, the method described in this application improves precision, recall, mAP50, and mAP50:95 by 7.5%, 12.1%, 6.7%, and 4.3%, respectively, while reducing the number of parameters by approximately 1.82M. The experimental results above show that the improvements to each module described in this embodiment can synergistically optimize the detection accuracy and model efficiency of YOLOv11n.

[0035] Furthermore, to further verify the performance advantages of the model described in this embodiment, it was compared with YOLO-DAP, PWM-YOLOv11n, and several representative single-stage detection models. All models were trained and tested under the same conditions, and the experimental results are shown in Table 2.

[0036] Table 2 Comparison of experimental data results The comparative experimental results above demonstrate that FSN-YOLO exhibits significant advantages in several key metrics. Compared to the benchmark model YOLOv11n, FSN-YOLO reduces the number of parameters by approximately 70.6%, while improving recall and mAP50 by 11.6% and 6.4%, respectively, achieving a good balance between lightweight design and performance. Compared to the similar lightweight model PWM-YOLOv11n, FSN-YOLO achieves superior detection accuracy with half the number of parameters. Compared to YOLO-DAP, FSN-YOLO improves average accuracy by 2.2% and reduces the number of parameters by 38%. In summary, FSN-YOLO achieves a good balance between model lightweight design, detection accuracy, and inference speed, and possesses a real-time processing capability of 144 frames per second, making it suitable for resource-constrained anti-drone detection scenarios.

[0037] Step S40: Matching and non-maximum suppression are performed on the target category confidence and bounding box coordinates to obtain the UAV detection results.

[0038] It should be noted that target category confidence refers to the numerical value output by the model indicating the degree of confidence that an image region belongs to a drone target. This value is calculated by the classification branch of the detection head and is used to measure the reliability of the classification result. Bounding box coordinates refer to a set of data output by the model that marks the position and occupied area of ​​the drone target in the image. This data is calculated by the regression branch of the detection head and is used to determine the specific location of the target. Matching refers to establishing a one-to-one correspondence between the target category confidence and the corresponding bounding box coordinates, so that each set of location information has a corresponding confidence level label. Non-maximum suppression is a filtering operation used to remove duplicate and redundant detection boxes. This operation retains the detection result with the highest confidence and removes other results that overlap with high-confidence boxes.

[0039] Specifically, firstly, the target category confidence level is compared with a preset confidence threshold (e.g., 0.25). Candidate detection boxes with confidence levels higher than the preset threshold are selected, resulting in a preliminary set of detection boxes. The reason for setting a confidence threshold for preliminary screening is that the detection head outputs prediction results for a large number of background regions during inference. Threshold filtering can eliminate obviously erroneous low-confidence predictions, reducing the computational burden of subsequent processing. This is similar to screening resumes to eliminate obviously unqualified applicants during recruitment, thus improving interview efficiency. Next, the intersection-union ratio (IUR) of the bounding boxes in the preliminary set is calculated. When the IUR of two bounding boxes is greater than a preset non-maximum suppression threshold (e.g., 0.45), the bounding boxes with higher confidence are retained, while those with lower confidence are removed, resulting in a deduplicated set of detection boxes. Non-maximum suppression is performed because the detection head may generate multiple overlapping predicted boxes for the same target in adjacent grid cells. Cross-Union Comparison (CICC) measures the degree of overlap and retains the optimal box, eliminating redundant detections and preventing the same target from being reported repeatedly. This is similar to ensuring only one attendance record is made if the same person is called multiple times during roll call. Finally, the bounding box coordinates in the deduplicated detection box set are paired and combined with the corresponding target category confidence scores to generate a UAV detection result containing the target category label, confidence score, and bounding box position parameters. This pairing and combination is necessary because the category label output by the classification branch and the position coordinates output by the regression branch come from different branches of the detection head. Associating the category information and position information of the same detection box is necessary to form a complete detection result.

[0040] This embodiment acquires and preprocesses UAV photoelectric images, employing a lightweight detection model that includes modules such as feature cross-coupling, decoupled downsampling, and progressive multi-scale enhancement to complete feature extraction, multi-scale fusion, and classification regression. Non-maximum suppression is then used to output the detection results. This effectively preserves the features of small targets, improving the accuracy and efficiency of detecting small UAV photoelectric targets in complex scenes, reducing the number of model parameters, and achieving a synergistic optimization of accuracy and lightweight design.

[0041] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 The lightweight detection method for small photoelectric targets of UAVs, step S30, further includes steps S201 to S203: Step S201: Input the standardized input image into the backbone network of the preset lightweight detection model for feature extraction to obtain a multi-scale feature map set.

[0042] It should be noted that step S201 includes: First, the standardized input image is input into the basic convolutional unit for shallow feature extraction and resolution reduction to obtain a shallow feature map. Specifically, first, a 640×640×3 standardized input image is input into the first convolutional layer. A 3×3 standard convolutional kernel slides across the image in the height and width directions with a stride of 1 and padding of 1. Element-wise multiplication and accumulation are performed on the 3×3×3 local pixel region covered by each convolutional kernel, and a bias term is added to output a 640×640×64 first feature map. Then, the first feature map is input into the batch normalization layer. The mean and variance of the feature values ​​of each channel in the batch of 16 samples are calculated. The mean is subtracted from each feature value, the variance is divided, and then multiplied by the learned scaling factor and a translation factor is added to output a 640×640×64 normalized feature map. This is done because the input distribution of each layer will shift during neural network training. Normalization can stabilize the numerical range of intermediate layer features and accelerate model convergence. Next, the normalized feature map is input into the SiLU activation function layer. Negative values ​​are compressed to near-zero values, while positive values ​​are preserved and their expression is enhanced, resulting in a 640×640×64 activation feature map. This is done because the superposition of multiple linear operations is still equivalent to a single-layer linear transformation; only through non-linear activation can the neural network be given the ability to learn complex patterns. Finally, the activation feature map is input into a downsampling layer, where 128 3×3 convolutional kernels with a stride of 2 are used to reduce the spatial resolution from 640×640 to 320×320, and expand the number of channels from 64 to 128, outputting a 320×320×128 shallow feature map. This is done because as the network depth increases, it is necessary to gradually expand the receptive field to capture a wider range of contextual information, while increasing the number of channels to accommodate richer feature expressions. The 320×320 spatial size still retains sufficient localization accuracy, and the 128 channels provide ample representational capacity for subsequent deep feature extraction.

[0043] Next, the shallow feature map is input into the feature cross-coupling module for channel segmentation and spatial semantic co-fusion to obtain an enhanced feature map. Further, the shallow feature map is divided into a first feature branch and a second feature branch according to a preset channel scaling factor; semantic information enhancement is performed on the first feature branch through convolution operations to obtain channel semantic features; spatial information preservation is performed on the second feature branch through point convolution operations to obtain spatially sensitive features; depthwise separable convolution is applied to the channel semantic features for spatial feature aggregation, and lightweight convolution mapping is performed on the spatially sensitive features to generate spatial attention weights; the channel semantic features and spatially sensitive features are cross-fused according to the spatial attention weights to obtain the enhanced feature map. First, the 320×320×128 shallow feature map is segmented along the channel dimension according to the scaling factor. The network is segmented with a resolution of 0.5, with the first 64 channels serving as the first feature branch (320×320×64) and the last 64 channels serving as the second feature branch (320×320×64). This is done because increasing the channel proportion of the spatial branch enhances the deep network's ability to represent target features and location information, mitigates the spatial information attenuation caused by downsampling, and allows semantic and spatial information to have independent processing paths.

[0044] Then, the 320×320×64 first feature branch is input into a standard convolutional layer, and channel expansion and semantic enhancement are performed through 128 1×1 convolutional kernels, outputting 320×320×128 channel semantic features. This is done because 1×1 convolution can aggregate semantic information between channels without changing the spatial resolution, enhancing the high-level abstract representation of features.

[0045] Next, the 320×320×64 second feature branch is input into the point convolutional layer, and channel mapping is performed through 64 1×1 convolutional kernels to output 320×320×64 spatially sensitive features. This is done because point convolution has few parameters and is computationally lightweight, and can perform appropriate channel transformation while preserving the original spatial structure information, avoiding the destruction of spatial details by complex calculations.

[0046] Then, depthwise separable convolutions are applied to the 320×320×128 channel semantic features. First, 128 3×3 depthwise convolutional kernels are used to perform independent spatial filtering on each channel. Then, 64 1×1 pointwise convolutional kernels are used for channel compression, outputting a 320×320×64 spatial aggregated semantic feature map. Simultaneously, lightweight convolutional mapping is applied to the 320×320×64 spatially sensitive features, generating a 320×320×32 spatial attention weight map using 32 1×1 convolutional kernels. This is done because depthwise separable convolutions decouple spatial filtering from channel transformation, with only about 1 / 8 the number of parameters of standard convolutions, maintaining a lightweight model while aggregating spatial features. The lightweight convolutional mapping generates attention weights, which can adaptively identify key target regions.

[0047] Finally, the 320×320×32 spatial attention weight map is expanded to 320×320×64 through bilinear interpolation, and then multiplied element-wise with the 320×320×64 spatial aggregated semantic feature map to obtain weighted semantic features. The 320×320×128 channel semantic features are processed through global average pooling and fully connected layers to generate 64-dimensional channel attention weights, which are then multiplied element-wise with the 320×320×64 spatial sensitivity features to obtain weighted spatial features. The 320×320×64 weighted semantic features and the 320×320×64 weighted spatial features are then added element-wise, and then channel integration is performed using 128 1×1 convolutional kernels to output an enhanced feature map of 320×320×128. The specific formula is as follows: in, Represents enhanced feature maps; Channel semantic features; It is a spatially sensitive feature; Indicates channel attention weights; Indicates spatial attention weights; This indicates element-wise multiplication; This indicates element-wise addition; This represents the activation function. These represent the height and width of the shallow feature map, respectively. Indicates the height direction index. Indicates the width direction index. Represents a spatial aggregation semantic feature map; This represents the Sigmoid activation function. This represents a lightweight convolutional mapping function. This is done because it allows the spatial aggregation features of the semantic branches to be guided by spatial attention, and the sensitive features of the spatial branches to be calibrated by channel attention, achieving bidirectional complementary fusion.

[0048] Next, the enhanced feature map is spatially downsampled and channel expanded separately by decoupling the downsampling module to obtain a downsampled feature map. Further, the number of input channels of the enhanced feature map is obtained, and a preset number of groups is calculated based on the number of input channels. Grouped convolution operations are performed on the enhanced feature map according to the preset number of groups, and spatial downsampling is performed with a preset stride to obtain an intermediate feature map. The intermediate feature map is then expanded in channel number through point convolution to obtain a channel-expanded feature map. Finally, the channel-expanded feature map is reconstructed to obtain the downsampled feature map. Specifically, first, the number of input channels (128) of the 320×320×128 enhanced feature map is obtained. Dividing the number of input channels (128) by 2 gives 64, which is used as the number of groups. This is done because setting the number of groups for grouped convolution to half the number of input channels can maintain sufficient feature representation while reducing interference between channels. 64 groups avoid both too many groups leading to too few channels and information fragmentation, and too few groups losing the meaning of group isolation. Then, the 320×320×128 enhanced feature map is evenly divided into 64 groups along the channel dimension, with each group containing 2 channels. A 3×3 convolutional kernel with a stride of 2 is independently performed on each group, resulting in an output feature map of size 160×160×1 for each group. The 64 groups are then concatenated to obtain an intermediate feature map of 160×160×64. This is done because a convolution with a stride of 2 reduces the spatial resolution from 320×320 to 160×160, achieving spatial downsampling; while the grouping operation isolates the 128 channels into 64 independent groups for convolution, avoiding information aliasing between different channels during downsampling. Next, the 160×160×64 intermediate feature map is input into a point convolutional layer, which expands the channel count using 256 1×1 convolutional kernels, outputting a channel-expanded feature map of 160×160×256. This is done because a 1×1 convolution can expand the number of channels from 64 to 256 without changing the 160×160 spatial resolution, enhancing feature representation and providing sufficient channel capacity for subsequent progressive multi-scale enhancement modules to perform multi-receptive field fusion. Finally, the 160×160×256 channel-expanded feature map is reorganized, rearranging the 256 channels according to a preset reorganization rule to output a 160×160×256 downsampled feature map. This is done because the semantic information distribution of each channel may be uneven after channel expansion; the reorganization operation arranges semantically related channels adjacently, which is beneficial for subsequent convolutional layers to extract combined features more efficiently.

[0049] The downsampled feature map is then input into a progressive multi-scale enhancement module for multi-receptive field feature fusion to obtain a fused feature map. Further, local features are extracted from the downsampled feature map using a depthwise convolution with a preset first kernel size to obtain a local feature map; channel transformation and feature fusion are performed on the local feature map using a convolution with a preset second kernel size to obtain a transformed feature map; context information is captured from the transformed feature map using a convolution with a preset third kernel size to obtain a context feature map; global semantic information is captured from the context feature map using a convolution with a preset fourth kernel size to obtain a global semantic feature map, where the second kernel size is smaller than the first kernel size, the first kernel size is smaller than the third kernel size, and the third kernel size is smaller than the fourth kernel size; the global semantic feature map and the downsampled feature map are then fused using residual connections to obtain a fused feature map. Specifically, a 160×160×256 downsampled feature map is input into a depthwise convolutional layer. A 3×3 depthwise convolutional kernel with a preset first kernel size performs independent local spatial filtering on each channel, with a stride of 1 and padding of 1, outputting a 160×160×256 local feature map. Then, the 160×160×256 local feature map is input into a pointwise convolutional layer, where a 1×1 convolutional kernel with a preset second kernel size performs channel transformation and feature fusion, outputting a 160×160×256 transformed feature map. Next, the 160×160×256 transformed feature map is input into a standard convolutional layer, where a 5×5 convolutional kernel with a preset third kernel size performs convolution operations with a stride of 1 and padding of 2, outputting a 160×160×256 context feature map. Then, the 160×160×256 contextual feature map is input into a standard convolutional layer. A 7×7 convolutional kernel with a preset fourth kernel size is used for convolution with a stride of 1 and padding of 3, outputting a 160×160×256 global semantic feature map. This is done because the receptive field of the 7×7 kernel is further expanded to 49 pixels, enabling the aggregation of global semantic information from the entire feature map and the identification of scene-level contextual patterns, such as typical building cluster distribution and vegetation cover in urban low-altitude security scenarios. Padding of 3 maintains the same output size. Finally, the 160×160×256 global semantic feature map is element-wise added to the 160×160×256 downsampled feature map. Residual connections are used to achieve multi-scale information aggregation, outputting a 160×160×256 fused feature map. This is done because residual connections directly add the features, which have undergone four levels of processing (3×3 local features, 1×1 channel fusion, 5×5 context, and 7×7 global semantics), to the original input. This preserves the basic information of the original feature map while adding rich semantics enhanced by multiple receptive fields. It's like adding different floors with different functions to the existing foundation while maintaining the stability of the foundation, ultimately forming a composite feature representation that combines local sophistication and global understanding.

[0050] Then, the fused feature map is subjected to multi-scale pooling and feature concatenation using a fast spatial pyramid pooling module to obtain a concatenated feature map. Specifically, the 160×160×256 fused feature map is first input into three parallel pooling branches simultaneously. The first branch performs pooling operation using a 5×5 max pooling kernel with a stride of 1, outputting a 160×160×256 first pooled feature map; the second branch performs pooling operation using a 9×9 max pooling kernel with a stride of 1, outputting a 160×160×256 second pooled feature map; and the third branch performs pooling operation using a 13×13 max pooling kernel with a stride of 1, outputting a 160×160×256 third pooled feature map. This is done because pooling kernels of different scales can capture spatial context information of different ranges. The 5×5 pooling kernel aggregates local neighborhood information, the 9×9 pooling kernel aggregates medium-range information, and the 13×13 pooling kernel aggregates a larger range of global information. Parallel processing of the three scales can simultaneously obtain multi-level contextual features. Then, the fused feature map is concatenated with the first, second, and third pooling feature maps along the channel dimension to obtain a concatenated feature map of 160×160×1024. This is done because concatenating the original fused feature map with pooling feature maps of three scales expands the number of channels from 256 to 1024, including the original local details and the contextual information after three-level aggregation, forming a rich multi-scale feature representation.

[0051] Finally, a lightweight attention enhancement module is used to adaptively adjust the channel weights and focus spatial regions on the stitched feature map, resulting in a multi-scale feature map set. Specifically, firstly, the 160×160×1024 stitched feature map is input into a global average pooling layer, and the average value is calculated for 160×160 spatial locations of each channel, outputting a 1×1×1024 global statistical vector. Then, the 1×1×1024 global statistical vector is input into a fully connected layer, first undergoing dimensionality reduction compression through 256 neurons, and then dimensionality restoration through 1024 neurons, with nonlinearity introduced by the ReLU activation function in between, outputting a 1×1×1024 channel weight vector. This is done because the bottleneck structure of dimensionality reduction-dimensionality restoration can learn the nonlinear interaction relationship between channels, identifying which channels have a strong response to UAV targets and which channels have a strong response to background noise. Next, the 1×1×1024 channel weight vector is mapped to the range of 0 to 1 using the Sigmoid function, generating 1024 channel attention coefficients between 0 and 1. This approach is used because the Sigmoid output has probabilistic interpretability; a coefficient closer to 1 indicates a more important channel, while a coefficient closer to 0 indicates a less important channel, thus quantifying channel importance. Next, the 160×160×1024 concatenated feature map is multiplied channel-by-channel by the 1×1×1024 channel attention coefficients. For each channel, the 160×160 spatial locations are uniformly multiplied by the corresponding attention coefficient, outputting a 160×160×1024 weighted feature map. This is done to enhance the feature responses of important channels and suppress the feature responses of unimportant channels, achieving adaptive weighting of channel dimensions. Finally, the 160×160×1024 weighted feature map is compressed through a 1×1 convolutional layer, outputting a 160×160×256 multi-scale feature map set. This is done to compress 1024 channels back to 256 channels, removing redundant information, retaining core features, and maintaining the spatial resolution, providing a regular multi-scale feature input for subsequent feature fusion in the neck network.

[0052] Step S202: Input the multi-scale feature map set into the neck network of the preset lightweight detection model for feature fusion to obtain the multi-scale fused feature map.

[0053] It should be noted that step S202 includes: inputting the multi-scale feature map set into the cross-stage dual convolutional kernel module for cross-stage feature extraction and splitting fusion to obtain the cross-stage feature map; performing resolution restoration and high-level semantic transfer on the cross-stage feature map through the upsampling module to obtain the upsampled feature map; performing spatial downsampling and channel expansion separation processing on the upsampled feature map through the decoupled downsampling module in the neck network to obtain the neck downsampled feature map; and performing cross-layer concatenation and channel shuffling on the cross-stage feature map, the upsampled feature map, and the neck downsampled feature map to obtain the multi-scale fused feature map.

[0054] Specifically, firstly, a 160×160×256 multi-scale feature map set is input into a cross-stage dual convolutional kernel module, which uniformly splits it into two 128-channel sub-feature maps along the channel dimension. The first sub-feature map is convolved using a 3×3 standard convolutional kernel with a stride of 1 and padding of 1, outputting a 160×160×128 first convolutional feature map. The second sub-feature map is convolved using a 5×5 standard convolutional kernel with a stride of 1 and padding of 2, outputting a 160×160×128 second convolutional feature map. The first and second convolutional feature maps are then concatenated along the channel dimension to obtain a 160×160×256 concatenated feature map. Finally, the concatenated feature map is fused and interacts with information using a 1×1 convolutional kernel, outputting a 160×160×256 cross-stage feature map. This is done because 3×3 convolutional kernels are suitable for extracting fine local textures, while 5×5 convolutional kernels are suitable for extracting larger regional patterns; the parallel dual-branch approach can simultaneously capture feature information at different scales.

[0055] Then, the cross-stage feature map is input into the upsampling module, where the spatial resolution is doubled using nearest-neighbor interpolation, outputting a 320×320×256 upsampled feature map. This is done because nearest-neighbor interpolation replicates adjacent pixel values ​​for rapid upsampling with extremely low computational cost, while simultaneously transferring deep semantic information to a higher-resolution spatial grid, preparing for subsequent fusion with low-level features of the same scale in the backbone network. Next, the upsampled feature map is input into the decoupled downsampling module in the neck network. First, it is grouped into 128 groups using a 3×3 grouped convolutional kernel with a stride of 2, dividing the 320×320×256 into 128 groups, each with 2 channels. Each group is convolved independently and outputs a 160×160×1. The 128 groups are concatenated to obtain a 160×160×128 intermediate feature map; then, a 1×1 convolutional kernel is used for channel expansion, outputting a 160×160×256 neck downsampled feature map. Finally, the cross-stage feature maps, upsampled feature maps, and neck downsampled feature maps are concatenated across layers and stacked along the channel dimension to obtain a 160×160×768 stacked feature map. The stacked feature map is divided into 4 groups of 192 channels each, and the channels within each group are rearranged to allow adjacent feature channels from different sources to be interleaved, outputting a 160×160×768 shuffled feature map. The shuffled feature map is then compressed and integrated using a 1×1 convolution kernel, outputting a 160×160×256 multi-scale fusion feature map. This is done because cross-layer concatenation aggregates features from three different sources: the deep semantics of the backbone, the high-level semantics recovered from upsampling, and the mid-level semantics of the neck downsampling. Channel shuffling breaks down source boundaries to promote cross-scale information interaction, ultimately compressing the data into 256 regular channels.

[0056] Step S203: Input the multi-scale fused feature map into the three detection output layers of the detection head of the preset lightweight detection model, obtain the target category confidence through the classification branch corresponding to each detection output layer, and obtain the bounding box coordinates through the regression branch corresponding to each detection output layer.

[0057] It should be noted that step S203 includes: inputting the multi-scale fused feature map into three detection output layers respectively; predicting the class probability of the multi-scale fused feature map through the classification branch corresponding to each detection output layer to obtain the target class confidence; predicting the bounding box parameters of the multi-scale fused feature map through the regression branch corresponding to each detection output layer to obtain a set of predicted bounding boxes; mapping the predicted bounding boxes in the set of predicted bounding boxes and the corresponding preset labeled ground truth bounding boxes to two-dimensional Gaussian distributions respectively to obtain the predicted Gaussian distribution and the ground truth Gaussian distribution; calculating the second-order distance metric based on the predicted Gaussian distribution and the ground truth Gaussian distribution; normalizing the second-order distance metric to a preset interval through an exponential function mapping to obtain the normalized distance loss value; weighting and fusing the normalized distance loss value and the intersection-union ratio (IUGR) loss value according to preset weight coefficients to obtain the fused regression loss value; and optimizing the set of predicted bounding boxes according to the fused regression loss value to obtain the bounding box coordinates.

[0058] Specifically, firstly, a 160×160×256 multi-scale fused feature map is input into three detection output layers. The first detection output layer receives a large-scale feature map (20×20×256, with the largest receptive field) and performs full convolutional prediction on the large-scale feature map using a 3×3 convolutional kernel, stride 1, and padding 1. Each grid cell outputs the class probability distribution of three preset anchor boxes, and the maximum probability among the classes is taken as the target class confidence of the anchor box to obtain the first target class confidence. At the same time, the horizontal and vertical coordinate offsets of the center point of each anchor box relative to the preset reference box and the width and height scaling factors are output through three 3×3 convolutional kernels to obtain the first bounding box coordinates. This layer is responsible for detecting small target drones in the image. This is done because the 20×20 large-scale feature map corresponds to a 32×32 pixel grid in the original 640×640 image. Each pixel represents a 32×32 area in the original image. Small targets have a low pixel ratio in the original image. After being downsampled by the deep network, they retain detectable feature responses on the minimum resolution feature map. It's like looking for tiny objects in a thumbnail, which requires observation under the highest magnification.

[0059] Then, the second detection output layer receives a mid-scale feature map (40×40×256), and similarly performs classification and regression predictions using three 3×3 convolutional kernels, outputting the second target class confidence score and the second bounding box coordinates. This layer is responsible for detecting mid-scale targets. Finally, the third detection output layer receives a small-scale feature map (80×80×256), and outputs the third target class confidence score and the third bounding box coordinates using three 3×3 convolutional kernels. This layer is responsible for detecting large targets. This is done because the three detection output layers with different resolutions form a pyramid structure: the 20×20 layer uses a large receptive field to detect small targets, the 40×40 layer uses a medium receptive field to detect medium targets, and the 80×80 layer uses a small receptive field to detect large targets. This multi-scale hierarchical detection can cover the entire scale range.

[0060] Next, the coordinates of the first bounding box, the second bounding box, and the third bounding box are combined into a set of predicted bounding boxes, and each predicted bounding box is... B p = ( cx p ,cy p ,w p ,h p Each of these is mapped to a two-dimensional Gaussian distribution to obtain the predicted Gaussian distribution. N p ;Preset the actual bounding box B g = ( cx g ,cy g ,w g ,h g Similarly, it is mapped to the true Gaussian distribution. N g This is done because by representing the rectangular bounding box as a two-dimensional Gaussian distribution, the uncertainty of the target's position is quantified into a probability distribution. Small targets have small bounding box areas and small covariance matrix element values, resulting in a concentrated and sharp distribution. Large targets have large bounding box areas and large covariance matrix element values, resulting in a smooth and diffuse distribution. This representation can more precisely characterize the geometric properties of targets at different scales.

[0061] Then, the second-order Wasserstein distance is calculated between each predicted Gaussian distribution and its corresponding true Gaussian distribution, resulting in 25,200 second-order distance metrics. The specific formula is as follows: in Represents the square of the second-order distance metric; This represents the x-coordinate of the center point of the predicted bounding box. This represents the ordinate of the center point of the predicted bounding box. This indicates the width of the predicted bounding box. Indicates the height of the predicted bounding box; This represents the x-coordinate of the center point of the actual bounding box. This represents the ordinate of the center point of the predicted bounding box. This represents the width of the actual bounding box. This represents the height of the ground truth bounding box. This is done because the Wasserstein distance measures the minimum transport cost between two probability distributions. Even if the predicted box and the ground truth box do not overlap, the distance value remains non-zero and the gradient is stable, avoiding the gradient vanishing problem of the traditional Intersection over Union (IoU) loss when the overlapping region is zero.

[0062] Next, the second-order distance metric is normalized to the interval between 0 and 1 using an exponential function mapping to obtain the normalized distance loss value. The specific calculation formula is as follows: in This is a normalization constant related to the average size of the dataset target. It is an exponential function. This is done because the exponential function compresses any positive distance value to between 0 and 1. The closer the value is to 1, the more similar the predicted box is to the true box; the closer it is to 0, the greater the difference. This forms a loss value that can be directly used for network optimization.

[0063] Then, the normalized distance loss value and the intersection-union ratio loss value are weighted and fused to obtain the fused regression loss value, calculated using the following formula: Where λ is the weighting coefficient. This represents the fusion regression loss value. The intersection-union ratio (IUGR) loss value is used. This is because the normalized distance loss is stable to translation and scale changes of small targets, while the IUGR loss is highly sensitive to overlapping regions of large targets. The weighted fusion of the two can take into account the regression optimization needs of targets at different scales, much like adding both salt and sugar to a dish to enhance flavor; a single seasoning cannot create a complex taste. Finally, backpropagation optimization is performed on the predicted bounding box set based on the fused regression loss value. The parameters of the detector head convolution kernel are updated using the stochastic gradient descent algorithm to minimize the fused regression loss value. After multiple iterations, the optimized bounding box coordinates are obtained. This is because the loss value guides the direction of network parameter adjustment; the smaller the loss, the closer the predicted box is to the true box. Through continuous optimization, the model learns to accurately locate drone targets.

[0064] This embodiment extracts multi-scale features from a standardized input image via a backbone network to obtain a set of multi-scale feature maps. These features are then fused via a neck network to generate a multi-scale fused feature map. Finally, the target category confidence and bounding box coordinates are output by detecting the classification and regression branches of the first three detection output layers. By relying on lightweight modules such as feature cross-coupling and decoupled downsampling, the efficiency of small target feature representation and fusion is significantly improved, the number of model parameters is reduced, and the detection accuracy and positioning stability of electro-optical small target UAVs in complex scenarios are effectively enhanced.

[0065] Based on the first embodiment of this application, this application also provides a lightweight detection device for small photoelectric targets of UAVs. Please refer to... Figure 4 The device includes: The acquisition module 10 is used to acquire photoelectric images of drones in urban low-altitude scenarios.

[0066] The processing module 20 is used to preprocess the UAV photoelectric images to obtain standardized input images.

[0067] The detection module 30 is used to input the standardized input image into a preset lightweight detection model for processing, obtaining the target category confidence and bounding box coordinates. The preset lightweight detection model includes a backbone network, a neck network, and a detection head. The backbone network includes basic convolutional units, a feature cross-coupling module, a decoupled downsampling module, a progressive multi-scale enhancement module, a fast spatial pyramid pooling module, and a lightweight attention enhancement module. The neck network includes a cross-stage dual convolutional kernel module, an upsampling module, and a decoupled downsampling module. The detection head includes three detection output layers, each with a classification branch and a regression branch. The module is also used to input the standardized input image into the backbone network of the preset lightweight detection model for feature extraction, obtaining a multi-scale feature map set. The multi-scale feature map set is then input into the neck network of the preset lightweight detection model for feature fusion, obtaining a multi-scale fused feature map. The multi-scale fused feature map is then input into the three detection output layers of the detection head of the preset lightweight detection model. The target category confidence is obtained through the classification branch corresponding to each detection output layer, and the bounding box coordinates are obtained through the regression branch corresponding to each detection output layer.

[0068] Result module 40 is used to match the target category confidence and bounding box coordinates and perform non-maximum suppression processing to obtain the UAV detection results.

[0069] The lightweight detection device for small photoelectric targets of UAVs provided in this application adopts the lightweight detection method for small photoelectric targets of UAVs in the above embodiments, which can solve the technical problem of how to improve the detection accuracy and efficiency of small photoelectric targets of UAVs. Compared with the prior art, the beneficial effects of the lightweight detection device for small photoelectric targets of UAVs provided in this application are the same as the beneficial effects of the lightweight detection method for small photoelectric targets of UAVs provided in the above embodiments, and other technical features in the lightweight detection device for small photoelectric targets of UAVs are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0070] This application provides a lightweight detection device for small photoelectric targets of unmanned aerial vehicles (UAVs). The lightweight detection device for small photoelectric targets of UAVs includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the lightweight detection method for small photoelectric targets of UAVs in the first embodiment described above.

[0071] The following is for reference. Figure 5 This document illustrates a structural schematic diagram of a lightweight detection device for small photoelectric targets of unmanned aerial vehicles (UAVs) suitable for implementing embodiments of this application. The lightweight detection device for small photoelectric targets of UAVs in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and vehicle-mounted terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The lightweight detection device for small photoelectric targets of UAVs shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0072] like Figure 5As shown, a lightweight inspection device for small optoelectronic targets of UAVs may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the lightweight inspection device for small optoelectronic targets of UAVs. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the lightweight detection equipment for small electro-optical targets of UAVs to exchange data wirelessly or via wired communication with other devices. Although various lightweight detection equipment for small electro-optical targets of UAVs are shown in the figures, it should be understood that it is not required to implement or possess all of the shown. More or fewer may be implemented alternatively.

[0073] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0074] The lightweight detection device for small photoelectric targets of UAVs provided in this application adopts the lightweight detection method for small photoelectric targets of UAVs in the above embodiments, which can solve the technical problem of how to improve the detection accuracy and efficiency of small photoelectric targets of UAVs. Compared with the prior art, the beneficial effects of the lightweight detection device for small photoelectric targets of UAVs provided in this application are the same as the beneficial effects of the lightweight detection method for small photoelectric targets of UAVs provided in the above embodiments, and other technical features in the lightweight detection device for small photoelectric targets of UAVs are the same as the features disclosed in the method of the previous embodiment, and will not be repeated here.

[0075] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0076] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0077] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the lightweight detection method for small photoelectric targets of UAVs in the above embodiments.

[0078] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible storage medium containing or storing a program that can be executed by instructions, used by a device, or used in conjunction with it. The program code contained on the computer-readable storage medium may be transmitted using any suitable storage medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0079] The aforementioned computer-readable storage medium may be included in a lightweight inspection device for small photoelectric targets of UAVs; or it may exist independently and not be assembled into a lightweight inspection device for small photoelectric targets of UAVs.

[0080] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a lightweight detection device for small electro-optical targets of a UAV, enable the device to write computer program code for performing the operations of this application in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.

[0082] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0083] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned lightweight detection method for small photoelectric targets on UAVs. This method addresses the technical problem of improving the accuracy and efficiency of detecting small photoelectric targets on UAVs. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the lightweight detection method for small photoelectric targets on UAVs provided in the above embodiments, and will not be elaborated upon here.

[0084] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the lightweight detection method for small photoelectric targets of unmanned aerial vehicles as described above.

[0085] The computer program product provided in this application can solve the technical problem of how to improve the detection accuracy and efficiency of small photoelectric targets of UAVs. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the lightweight detection method for small photoelectric targets of UAVs provided in the above embodiments, and will not be repeated here.

[0086] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A lightweight detection method for small optoelectronic targets on unmanned aerial vehicles (UAVs), characterized in that, The method includes: Acquire photoelectric images of drones in urban low-altitude scenarios; The photoelectric image of the UAV is preprocessed to obtain a standardized input image; The standardized input image is processed by a preset lightweight detection model to obtain the target category confidence and bounding box coordinates. The preset lightweight detection model includes a backbone network, a neck network, and a detection head. The backbone network includes basic convolutional units, a feature cross-coupling module, a decoupled downsampling module, a progressive multi-scale enhancement module, a fast spatial pyramid pooling module, and a lightweight attention enhancement module. The neck network includes a cross-stage dual convolutional kernel module, an upsampling module, and a decoupled downsampling module. The detection head includes three detection output layers, each including a classification branch and a regression branch. The target category confidence and bounding box coordinates are matched and non-maximum suppression is applied to obtain the UAV detection results; The step of inputting the standardized input image into a preset lightweight detection model for processing to obtain the UAV detection result includes: The standardized input image is input into the backbone network of a preset lightweight detection model for feature extraction, resulting in a multi-scale feature map set. The multi-scale feature map set is input into the neck network of the preset lightweight detection model for feature fusion to obtain a multi-scale fused feature map; The multi-scale fused feature map is input into the three detection output layers of the detection head of the preset lightweight detection model. The target category confidence is obtained through the classification branch corresponding to each detection output layer, and the bounding box coordinates are obtained through the regression branch corresponding to each detection output layer.

2. The method as described in claim 1, characterized in that, The step of inputting the standardized input image into the backbone network of a preset lightweight detection model for feature extraction to obtain a multi-scale feature map set includes: The standardized input image is input into a basic convolutional unit for shallow feature extraction and resolution reduction to obtain a shallow feature map. The shallow feature map is input into the feature cross-coupling module for channel segmentation and spatial semantic collaborative fusion to obtain an enhanced feature map. By decoupling the downsampling module, the enhanced feature map is spatially downsampled and channel extended to separate the processing, resulting in a downsampled feature map. The downsampled feature map is input into the progressive multi-scale enhancement module for multi-receptive field feature fusion to obtain a fused feature map; The fused feature map is subjected to multi-scale pooling and feature stitching by a fast spatial pyramid pooling module to obtain a stitched feature map; The spliced ​​feature map is adaptively adjusted in terms of channel weights and focused in terms of spatial region by using a lightweight attention enhancement module to obtain a multi-scale feature map set.

3. The method as described in claim 2, characterized in that, The step of inputting the shallow feature map into the feature cross-coupling module for channel segmentation and spatial semantic co-fusion to obtain the enhanced feature map includes: The shallow feature map is divided into a first feature branch and a second feature branch according to a preset channel ratio coefficient; The semantic information of the first feature branch is enhanced by convolution operation to obtain channel semantic features; Spatial information is preserved in the second feature branch by point convolution operation to obtain spatially sensitive features; The channel semantic features are subjected to depthwise separable convolution to aggregate spatial features, and the spatially sensitive features are subjected to lightweight convolution mapping to generate spatial attention weights. The channel semantic features and the spatially sensitive features are cross-fused according to the spatial attention weights to obtain an enhanced feature map.

4. The method as described in claim 2, characterized in that, The step of separating spatial downsampling and channel expansion of the enhanced feature map through the decoupled downsampling module to obtain the downsampled feature map includes: Obtain the number of input channels of the enhanced feature map, and calculate the preset number of groups based on the number of input channels; The enhanced feature map is subjected to grouped convolution operation according to the preset number of groups, and spatial downsampling is performed with a preset stride to obtain an intermediate feature map. The intermediate feature map is expanded by point convolution to obtain a channel-expanded feature map; The channel extended feature map is reconstructed to obtain a downsampled feature map.

5. The method as described in claim 2, characterized in that, The step of inputting the downsampled feature map into the progressive multi-scale enhancement module for multi-receptive field feature fusion to obtain the fused feature map includes: Local feature maps are obtained by performing local feature extraction on the downsampled feature map through depthwise convolution with a preset first convolution kernel size; The local feature map is transformed and fused by convolution with a preset second convolution kernel size to obtain a transformed feature map; The contextual feature map is obtained by performing a convolution with a preset third convolution kernel size to capture contextual information from the transformed feature map. Global semantic information is captured by convolution with a preset fourth convolution kernel size to obtain a global semantic feature map, wherein the second convolution kernel size is smaller than the first convolution kernel size, the first convolution kernel size is smaller than the third convolution kernel size, and the third convolution kernel size is smaller than the fourth convolution kernel size; The global semantic feature map and the downsampled feature map are fused by residual connection to obtain a fused feature map.

6. The method as described in claim 1, characterized in that, The step of inputting the multi-scale feature map set into the neck network of the preset lightweight detection model for feature fusion to obtain a multi-scale fused feature map includes: The multi-scale feature map set is input into the cross-stage dual convolutional kernel module for cross-stage feature extraction and splitting fusion to obtain cross-stage feature maps. The upsampling module performs resolution restoration and high-level semantic transfer on the cross-stage feature map to obtain the upsampled feature map; The upsampled feature map is separated into spatial downsampling and channel expansion by the decoupled downsampling module in the neck network to obtain the neck downsampled feature map; The cross-stage feature map, upsampled feature map, and neck downsampled feature map are spliced ​​across layers and shuffled through channels to obtain a multi-scale fused feature map.

7. The method as described in claim 1, characterized in that, The steps of inputting the multi-scale fused feature map into the three detection output layers of the detection head of the preset lightweight detection model, obtaining the target class confidence through the classification branch corresponding to each detection output layer, and obtaining the bounding box coordinates through the regression branch corresponding to each detection output layer include: The multi-scale fused feature map is input into three detection output layers respectively. The class probability of the multi-scale fused feature map is predicted by the classification branch corresponding to each detection output layer to obtain the target class confidence. By using the regression branches corresponding to each detection output layer, the bounding box parameters of the multi-scale fused feature map are predicted to obtain a set of predicted bounding boxes. The predicted bounding boxes in the predicted bounding box set are mapped to the corresponding preset labeled real bounding boxes as two-dimensional Gaussian distributions to obtain the predicted Gaussian distribution and the real Gaussian distribution. The second-order distance metric is calculated based on the predicted Gaussian distribution and the actual Gaussian distribution. The second-order distance metric is normalized to a preset interval by using an exponential function mapping to obtain a normalized distance loss value. The normalized distance loss value and the intersection-union ratio loss value are weighted and fused according to preset weighting coefficients to obtain the fused regression loss value; The predicted bounding box set is optimized based on the fusion regression loss value to obtain the bounding box coordinates.

8. A lightweight detection device for small optoelectronic targets on unmanned aerial vehicles (UAVs), characterized in that, The device includes: The acquisition module is used to acquire photoelectric images of drones in urban low-altitude scenarios; The processing module is used to preprocess the photoelectric image of the UAV to obtain a standardized input image; The detection module is used to input the standardized input image into a preset lightweight detection model for processing to obtain the target category confidence and bounding box coordinates. The preset lightweight detection model includes a backbone network, a neck network, and a detection head. The backbone network includes basic convolutional units, a feature cross-coupling module, a decoupled downsampling module, a progressive multi-scale enhancement module, a fast spatial pyramid pooling module, and a lightweight attention enhancement module. The neck network includes a cross-stage dual convolutional kernel module, an upsampling module, and a decoupled downsampling module. The detection head includes three detection output layers, each including a classification branch and a regression branch. The module is also used to input the standardized input image into the backbone network of the preset lightweight detection model for feature extraction, obtaining a multi-scale feature map set; input the multi-scale feature map set into the neck network of the preset lightweight detection model for feature fusion, obtaining a multi-scale fused feature map; and input the multi-scale fused feature map into the three detection output layers of the detection head of the preset lightweight detection model, obtaining the target category confidence through the classification branch corresponding to each detection output layer and the bounding box coordinates through the regression branch corresponding to each detection output layer. The results module is used to match and suppress non-maximum values ​​of the target category confidence and bounding box coordinates to obtain the UAV detection results.

9. A lightweight detection device for small optoelectronic targets on unmanned aerial vehicles (UAVs), characterized in that, The device includes: a memory, a processor, and a lightweight detection program for small photoelectric targets of unmanned aerial vehicles (UAVs) stored in the memory and running on the processor, the lightweight detection program for small photoelectric targets of UAVs being configured to implement the steps of the lightweight detection method for small photoelectric targets of UAVs as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores a lightweight detection program for small photoelectric targets of UAVs. When the processor executes the lightweight detection program for small photoelectric targets of UAVs, it implements the steps of the lightweight detection method for small photoelectric targets of UAVs as described in any one of claims 1-7.