A SimAM-fused YOLOv8 unmanned aerial vehicle identification method

CN122598037APending Publication Date: 2026-08-18DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610667283.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-15
Publication Date
2026-08-18

AI Technical Summary

Benefits of technology

[0052]1. Significantly improves the detection sensitivity of small-scale UAVs: The introduction of SimAM in the Neck part enables the network to perform secondary feature filtering at the critical stage of feature fusion. By calculating three-dimensional (spatial + channel) attention weights, SimAM can keenly capture the abnormal response of small targets in local space (based on spatial inhibition theory), thereby effectively strengthening the weak features of small targets and significantly reducing the missed detection of long-range UAVs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122598037A_ABST
    Figure CN122598037A_ABST
Patent Text Reader

Abstract

This application belongs to the field of computer vision and UAV monitoring technology. Addressing the problems of low accuracy and poor real-time performance in recognizing small-scale UAV targets in complex backgrounds, this invention discloses a YOLOv8 recognition method based on the Neck network fusion of the SimAM attention mechanism. The method includes: constructing and preprocessing a multi-scene UAV image dataset; constructing a SimAM-YOLOv8 model, introducing a parameter-free attention module SimAM during the Neck network feature aggregation stage, and using an energy function to recalibrate the three-dimensional weights of multi-scale features, enhancing feature extraction capabilities without increasing the number of parameters; training the model using a composite loss function and saving the optimal weights; and finally deploying it on an edge computing terminal for real-time inference. This invention significantly improves the detection accuracy of small targets in complex environments while maintaining the lightweight advantage of the original model, and can be widely applied to airport airspace security monitoring and low-altitude defense systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the fields of computer vision, deep learning, and airspace security monitoring technology, specifically relating to a target detection technology based on convolutional neural networks. More specifically, this application relates to a method for high-precision, real-time identification and localization of multi-scale (especially small-scale) UAV targets in complex backgrounds by introducing a parameter-free attention mechanism, SimAM (SimpleAttentionModule), into the neck feature fusion stage of the YOLOv8 network architecture to enhance feature extraction and fusion capabilities. This application can be widely applied to low-altitude airspace defense systems, airport airspace security monitoring, security for major events, border patrols, and anti-UAV early warning systems for critical infrastructure (such as nuclear power plants and substations). Background Technology

[0002] With the rapid development of microelectronics, wireless communication, and control theory, the unmanned aerial vehicle (UAV) industry has experienced explosive growth. Consumer-grade drones, with their low cost, ease of operation, and powerful functions, have been widely used in aerial photography, geographic surveying, agricultural plant protection, power line inspection, and logistics delivery. However, the widespread adoption of drone technology is a double-edged sword; while bringing convenience, it also poses unprecedented challenges and threats to public safety, privacy protection, and national security.

[0003] In recent years, incidents of unauthorized drone flights have occurred frequently, severely disrupting the normal takeoffs and landings of civil aviation flights and even causing large-scale airport shutdowns. In densely populated areas such as sporting events and concerts, illegal drone filming not only infringes on privacy but also poses a risk of crashes and injuries. More seriously, drones may be used by criminals to carry explosives, biological agents, or conduct illegal reconnaissance, posing an asymmetric security threat to sensitive areas such as government agencies, military bases, and nuclear facilities. Therefore, building an all-weather, high-precision, and rapid-response counter-drone detection and identification system has become an urgent need in the field of public security for all countries.

[0004] Existing counter-drone detection technologies mainly fall into four categories: radar detection, radio spectrum monitoring, acoustic detection, and photoelectric / visual detection. Each technology has its limitations.

[0005] 1. Radar Detection Technology: Although it has a relatively long detection range, it often falls short when dealing with consumer-grade drones that are "low, slow, and small" (flying at low altitudes, moving slowly, and having a small radar cross-section). The fuselages of small drones are mostly made of plastic, resulting in an extremely small radar cross-section (RCS) (usually less than 0.01 square meters). They are easily obscured by ground clutter from urban buildings, trees, or birds, leading to large blind spots and a high false alarm rate.

[0006] 2. Radio spectrum monitoring technology: This technology locates drones by detecting the image or data transmission signals between them and the ground remote control station. However, this technology is less effective, or even completely ineffective, for drones that fly in radio silence along pre-planned routes, or for modified drones that use frequency hopping spread spectrum or encrypted communication technologies.

[0007] 3. Acoustic detection technology: This technology uses sonar arrays to collect the characteristic frequencies of UAV rotors. However, in complex urban acoustic environments (such as traffic noise, wind noise, and crowd noise), its effective detection range is usually limited to within a few hundred meters, and its positioning accuracy is poor, making it difficult to meet the needs of large-scale deployment.

[0008] 4. Photoelectric / Visual Detection Technology: This technology utilizes visible light or infrared cameras to acquire target images, combined with image processing algorithms for identification. It offers advantages such as intuitive visualization, convenient evidence collection, and passive detection without electromagnetic radiation. In particular, with the rise of deep learning technology, target detection algorithms based on convolutional neural networks (CNNs) (such as Faster R-CNN, SSD, and the YOLO series) have made breakthroughs in the field of visual recognition, making it possible to use surveillance cameras for real-time automatic identification of drones.

[0009] Among numerous deep learning object detection algorithms, the YOLO series has become the preferred solution for industrial deployment due to its excellent balance between detection speed and accuracy. As of the time of this application, YOLOv8, as an advanced version of this series, has further pushed the performance limits of object detection by introducing C2f modules (CSPBottleneckwith2convolutions), a decoupled head structure, and an anchor-free design.

[0010] However, directly applying the native YOLOv8 model to complex anti-drone visual detection tasks still presents several significant technical bottlenecks:

[0011] First, the problem of feature loss for small targets is severe. In typical security monitoring scenarios, cameras cover a wide area, and drone targets often occupy only a very small number of pixels in the image (e.g., less than 32×32 pixels), posing a typical challenge for small target detection. During the process of multi-layer downsampling to expand the receptive field, the detailed features of small targets (such as rotor shape and arm structure) are easily lost as the spatial resolution decreases. This results in insufficient effective information in the deep feature maps to represent the target, leading to missed detections.

[0012] Second, background interference is extremely strong. Aerial footage often contains complex dynamic backgrounds, such as flowing clouds, swaying treetops, strong light reflections, and birds in flight. Birds, in particular, have visual appearances and trajectories very similar to drones at long distances, easily leading to a large number of false positives. While native YOLOv8 has powerful feature extraction capabilities, it struggles to accurately focus on subtle drone target features amidst complex background noise without targeted attention guidance.

[0013] Third, the limitations of the feature fusion mechanism. YOLOv8's Neck section employs a PAN-FPN (Path Aggregation Network + Feature Pyramid Network) structure for multi-scale feature fusion. Although it enhances gradient flow and feature reuse through the C2f module, at the feature fusion node, feature maps from different levels are typically concatenated using a simple concat operation, homogenizing information from all channels and spatial locations. This approach ignores the varying importance of different feature channels and spatial regions for the recognition task, leading to amplified background noise and reduced discrimination capability of the final detection head.

[0014] To address the aforementioned issues, existing improvements typically involve introducing attention mechanisms into the network, such as Squeeze-and-Excitation (SE), Convolutional Block Attention Module (CBAM), or Efficient Channel Attention (ECA). However, these traditional attention modules suffer from the following drawbacks:

[0015] Single dimension: SE and ECA mainly focus on the dependencies of the channel dimension and compress spatial information through global average pooling, which precisely discards the spatial details that are crucial for the localization of small targets.

[0016] High computational overhead: Although CBAM combines channel and spatial attention, its spatial attention branch requires large-size convolution or pooling operations and introduces fully connected layers (FC) or additional convolutional layers, which increases the number of model parameters and computational cost (FLOPs). This is disadvantageous for applications that need to be deployed on edge devices with limited computing power.

[0017] In 2021, Yang et al. proposed an attention mechanism called SimAM (SimpleAttentionModule). Unlike existing attention modules based on learned weights, SimAM is based on the theory of spatial suppression in neuroscience, directly inferring the three-dimensional attention weights of each neuron in the feature map by defining an energy function. SimAM has two significant advantages: first, it is parameter-free, meaning it does not require any additional convolutional or fully connected parameters and can achieve feature recalibration solely through mathematical calculations; second, it infers three-dimensional weights, considering both spatial and channel dimensions, focusing not only on "what" features are important (channel domain) but also on "where" features are important (spatial domain).

[0018] While SimAM has theoretical advantages and existing literature mentions its application to YOLOv5 or YOLOv7, a systematic solution is currently lacking for the more specialized and compact architecture of the YOLOv8 model, particularly in finding the optimal fusion strategy within its unique Neck structure (including the C2f module and multi-scale fusion paths) to maximize UAV detection performance. The internal structure of the YOLOv8 C2f module differs from that of the YOLOv5 C3 module and the YOLOv7 ELAN module; a lack of targeted adaptation for direct application will lead to poor feature propagation or unstable gradient optimization.

[0019] In summary, developing a method that can deeply integrate the advantages of the advanced YOLOv8 architecture and the SimAM parameterless attention mechanism to effectively solve the problem of UAV recognition in small-scale and complex backgrounds without significantly increasing the computational burden is a technical problem that urgently needs to be solved in this field.

[0020] Application content

[0021] This application aims to address the technical problems of existing YOLOv8 models when handling UAV targets in complex dynamic backgrounds at small scales, such as insufficient feature extraction, weak background interference resistance, and reduced inference speed due to the introduction of additional parameters by traditional attention mechanisms. This application provides a YOLOv8 UAV recognition method based on a SimAM attention mechanism fused at the Neck. By strategically embedding parameterless SimAM modules into key nodes of the YOLOv8 feature fusion network (Neck), it achieves refined recalibration of multi-scale features, significantly improving the accuracy, recall, and robustness of target detection.

[0022] To achieve the above objectives, the technical solution adopted in this application is as follows:

[0023] A YOLOv8 drone recognition method based on the Neck-side fusion SimAM attention mechanism includes the following steps:

[0024] Step S1: Construct a multi-scenario drone image dataset and perform enhanced preprocessing.

[0025] Acquire visible light images or video frames of drones covering multiple scenes including urban areas, suburbs, and mountainous regions, and under various weather conditions such as sunny days, rainy days, and dusk, to construct the original dataset. Label drone targets in the images with rectangular bounding boxes, and classify them as "drone".

[0026] Preprocessing and augmentation of the labeled dataset includes:

[0027] 1. Size normalization: The input image size is uniformly adjusted to 640×640 pixels, and adaptive padding is used to prevent image distortion.

[0028] 2. Mosaic Data Augmentation: Using the Mosaic technique, four images are randomly selected, scaled, cropped, arranged, and stitched together to create a new training image. This operation significantly enriches the detection background, increases the number of small targets in a single training batch, and helps improve the model's robustness to small scales.

[0029] 3. Blending Enhancement and Geometric Transformation: Perform image blending, random rotation, translation, shearing, and color gamut perturbation with a certain probability to simulate complex lighting and flight attitude.

[0030] Step S2: Construct the SimAM-YOLOv8 object detection network model.

[0031] The model is logically divided into three parts: Backbone, Neck, and Head.

[0032] 4. Backbone section: Employs an improved CSPDarknet structure for image feature extraction. It includes several CBS modules (Conv+BN+SiLU, where BN stands for Batch Normalization and SiLU stands for Sigmoid Linear Unit), C2f module (CSPBottleneckwith2convolutions), and SPPF (Spatial Pyramid Pooling-Fast) module.

[0033] 5. Neck section: Employs a PAN-FPN (PathAggregationNetwork + FeaturePyramidNetwork) architecture to perform bidirectional fusion of large, medium, and small features. This section includes top-down upsampling paths and bottom-up downsampling paths, using the Concat operation to concatenate features and the C2f module to aggregate features.

[0034] Core improvement: A SimAM parameterless attention module is introduced in the feature aggregation stage of the Neck network. Specifically, a SimAM module is connected in series after the output of each C2f module in the Neck network.

[0035] Construction of the SimAM module: The SimAM module does not contain any learnable weight parameters (such as convolutional kernel weights or fully connected layer weights). Its working principle is based on calculating the input feature map using an energy function. Each neuron energy value The formula is as follows:

[0036] (1)

[0037] in, This represents the activation value of the neuron at the current position; This represents the mean value of all neurons within the current channel; This represents the variance of all neurons within the current channel; This represents the total number of neurons within the channel; To prevent regularization constants with denominators of zero.

[0038] Calculated energy value The smaller the value, the greater the difference between the neuron and its surrounding neurons, and the higher its importance. Finally, the energy value is converted into attention weights using the Sigmoid function, and then weighted according to the original feature map.

[0039] (2)

[0040] in Energy values ​​for all neurons The matrix formed This is the output feature map after SimAM enhancement.

[0041] 6. Head Section: A decoupled head structure is adopted, which performs category classification and bounding box regression through two parallel convolutional branches. The classification branch outputs the confidence score of the "drone" category, and the regression branch outputs the coordinate offset of the target box and the distributed focal loss (DFL) parameter.

[0042] Step S3: Define the composite loss function and perform end-to-end training.

[0043] Construct a composite loss function that includes classification loss, regression loss, and distribution loss. :

[0044] (3)

[0045] (Bounding box regression loss): CIoU (CompleteIoU) loss is used to optimize the overlap between the predicted box and the ground truth box, the distance between the center points and the aspect ratio, thereby improving the positioning accuracy.

[0046] (Classification loss): Weighted loss is applied to address the imbalance between positive and negative samples, focusing on learning the difficult samples.

[0047] (Distribution loss): Used to optimize the uncertainty of the bounding box, making the boundaries of the predicted box more accurate.

[0048] Using the dataset processed in step S1, the SimAM-YOLOv8 model is iteratively trained using the stochastic gradient descent (SGD) optimizer and the cosine annealing learning rate strategy (Cosine AnnealingLR) until the loss function converges, and the optimal model weights are saved.

[0049] Step S4: Deployment and inference recognition.

[0050] The trained SimAM-YOLOv8 model is deployed on a computing terminal. The image or video stream to be detected is input into the model. After backbone feature extraction, SimAM-enhanced neck feature fusion, and head prediction output, a result list containing several candidate boxes is obtained. Finally, the weighted non-maximum suppression (Soft-NMS) algorithm is used to remove redundant boxes with high overlap and low confidence, and the final UAV target location and confidence score are output.

[0051] Compared with the prior art, this application has the following significant advantages:

[0052] 1. Significantly improves the detection sensitivity of small-scale UAVs: The introduction of SimAM in the Neck part enables the network to perform secondary feature filtering at the critical stage of feature fusion. By calculating three-dimensional (spatial + channel) attention weights, SimAM can keenly capture the abnormal response of small targets in local space (based on spatial inhibition theory), thereby effectively strengthening the weak features of small targets and significantly reducing the missed detection of long-range UAVs.

[0053] 2. Significantly enhanced anti-interference capability under complex dynamic backgrounds: Traditional YOLOv8 is prone to misjudgment when faced with cloud edges, leaf textures, or flying birds due to texture similarity. SimAM uses energy functions to automatically find "distinctive" neurons, which can effectively suppress large areas of similar background textures, thereby highlighting foreground targets and significantly reducing the false alarm rate.

[0054] 3. Achieves efficient upgrade with "zero parameter" increment: Unlike the SE module which introduces fully connected layers or the CBAM module which introduces convolutional layers, the SimAM module used in this application is calculated entirely based on statistical features and closed-form solution formulas, without adding any network weight parameters. This means that the model size remains almost unchanged, and because SimAM operations are highly parallelizable, its impact on inference speed is negligible, meeting the stringent real-time requirements of anti-drone systems.

[0055] 4. Improved feature pyramid representation quality: In the YOLOv8 Neck structure, feature maps undergo multiple upsampling and splicing processes, which can easily introduce aliasing effects. This application chooses to connect SimAM immediately after the C2f module (feature recombination and refinement module), which is equivalent to performing a "purification" after each feature aggregation. This ensures that the features passed to the next level and the final detection head are high-quality features selected by the attention mechanism, fundamentally improving the expressive power of the feature pyramid. Attached Figure Description

[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0057] Figure 1 This is a schematic diagram of the overall architecture of the SimAM-YOLOv8 object detection network model.

[0058] Figure 2 This is a schematic diagram of the internal structure of the C2f module in a YOLOv8 network, where bottleneck is the bottleneck module.

[0059] Figure 3 This is a schematic diagram of the internal structure of the CBS module in a YOLOv8 network.

[0060] Figure 4 This is a schematic diagram of the internal structure of the SPFF module in a YOLOv8 network.

[0061] Figure 5 This is a schematic diagram illustrating the mathematical and geometric meaning of the energy function in the SimAM attention mechanism.

[0062] Figure 6 This is a schematic diagram illustrating the relationship between energy and attention in the SimAM attention mechanism.

[0063] Figure 7 This is the confusion matrix diagram of the method of this application in the test set.

[0064] Figure 8 This is the training result of the method in this application.

[0065] Figure 9 This is a diagram illustrating the drone detection effect of the method described in this application.

[0066] Figure 10 The initialization interface of the drone early warning system designed for the method of this application.

[0067] Figure 11 The video monitoring interface of the drone early warning system designed for the method of this application. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0069] Example 1: A UAV Identification Method Based on SimAM-YOLOv8

[0070] This embodiment proposes an improved YOLOv8 target detection method specifically for visual recognition tasks of UAV targets. This method addresses the challenges of detecting small targets and dealing with significant background interference by integrating a SimAM parameterless attention module into the feature fusion network (Neck).

[0071] 1. Dataset Construction and Preprocessing (Step S1)

[0072] High-quality datasets are fundamental for training deep learning models. For the drone identification task, this embodiment adopts the following strategy:

[0073] (1) Data collection:

[0074] Acquire or collect video sequences and still images containing drone targets. Data sources should include:

[0075] Multiple models: including common quadcopter, hexcopter, fixed-wing drones and racing drones.

[0076] Multiple scenarios: urban high-rise backgrounds, where complex building textures can easily lead to false detections; open sky backgrounds, where the main challenge is cloud interference; mountain / forest backgrounds, where the main challenges are foliage occlusion and texture interference.

[0077] Multi-scale: Covering everything from close-up targets that occupy more than 50% of the frame to small distant targets that occupy only 10×10 pixels.

[0078] Multiple lighting conditions: front lighting, backlighting, cloudy days, dusk, etc.

[0079] (2) Data labeling:

[0080] Use tools such as LabelImg to annotate the drones in the image with rectangular boxes, and save the generated label file in YOLO standard format (.txt).

[0081] (3) Data augmentation:

[0082] To improve the model's generalization ability, especially its ability to detect small targets, the following enhancement methods are adopted:

[0083] Mosaic enhancement: Enabled by default during YOLOv8 training. It stitches together four training images after random scaling, cropping, and rearranging them into a single large image. This not only enriches the background and simulates multi-object scenes but also significantly increases the exposure frequency of small objects during training, resulting in more stable statistical data distribution during BatchNormalization computation.

[0084] Mixup enhancement: Overlay two images with a certain transparency ratio to enable the model to learn more robust feature overlay patterns.

[0085] HSV color gamut transformation: randomly adjusts hue, saturation, and value to simulate imaging differences under different weather conditions and sensors.

[0086] (4) Anchor frame strategy:

[0087] Although YOLOv8 is an anchor-free algorithm and no longer requires pre-clustering of anchor boxes, it internally uses a TaskAlignedAssigner to assign positive and negative samples. During the preprocessing stage, it is necessary to ensure that the image size is uniformly 640×640 to adapt to the network stride.

[0088] 2. SimAM-YOLOv8 network model construction (step S2)

[0089] This embodiment makes targeted improvements to the YOLOv8 network structure. For example... Figure 1 As shown, the improved model consists of the CSPDarknet backbone, the SimAM-enhanced Neck, and the decoupled Head.

[0090] 2.1 Backbone Network

[0091] The backbone network is responsible for extracting features layer by layer from the original image. This embodiment uses the YOLOv8 CSPDarknet53 architecture, whose core components include:

[0092] Conv module: A standard convolutional layer containing Conv2d, BatchNorm2d, and SiLU activation functions, responsible for feature extraction and nonlinear transformation.

[0093] C2f module (CSPBottleneckwith2convolutions): such as Figure 2 As shown, the C2f module is the core design of YOLOv8. It references the ELAN structure of YOLOv7 and achieves richer gradient flow information through more branched cross-layer connections (Split channel splitting operation and Concat channel concatenation operation), thus improving feature extraction capabilities while maintaining lightweight design.

[0094] SPPF module (SpatialPyramidPooling-Fast): such as Figure 4 As shown, located at the end of the backbone network, three cascaded max pooling layers are used to fuse receptive fields of different scales, transforming feature maps of arbitrary size into feature vectors of fixed length, thereby enhancing the ability to abstract spatial layout.

[0095] The backbone network ultimately outputs three feature layers:

[0096] P3 detector head: 80×80 resolution (when input is 640), 256 channels. It retains a significant amount of shallow geometric detail, which is crucial for small target detection.

[0097] P4 detector head: 40×40 resolution, 512 channels. Contains medium-scale semantic information.

[0098] P5 detector head: 20×20 resolution, 1024 channels. Includes high-level semantic abstraction and has the largest receptive field.

[0099] 2.2 Neck Network – A Convergence Innovation of SimAM

[0100] The Neck section is responsible for multi-scale feature fusion. YOLOv8 adopts a PAN-FPN structure: FPN (Feature Pyramid Network) transmits strong semantic features from top to bottom, while PAN (Path Aggregation Network) transmits strong localization features from bottom to top through downsampling.

[0101] The improvement in this application is the introduction of the SimAM attention mechanism into the core feature processing stage of the Neck network.

[0102] Fusion location: such as Figure 1 As shown, the Neck network contains multiple C2f modules for fusing features from different sources after the Concat operation. This application connects a SimAM module in series at the output of the C2f module in each Neck layer.

[0103] Detailed path analysis:

[0104] 1. Top-down path:

[0105] The P5 feature is upsampled and concatenated with the P4 feature, then passed through the first C2f_Neck module. SimAM-1 is added to the output.

[0106] The output above is further upsampled and concatenated with the P3 features, then passed through the second C2f_Neck module. SimAM-2 is added to this output. This is a crucial node for detecting small targets, and SimAM-2 plays a vital role. It effectively suppresses background noise introduced by upsampling and enhances the details of small targets in the P3 layer.

[0107] 2. Bottom-up path:

[0108] The output of SimAM-2 is downsampled (Convstride=2) and concatenated with the P4 feature, then passed through a third C2f_Neck module. SimAM-3 is then added to this output.

[0109] The output of SimAM-3 is downsampled and concatenated with P5 features, then passed through a fourth C2f_Neck module. SimAM-4 is then added to this output.

[0110] Design rationale: The C2f module completes feature aggregation and refinement. Adding SimAM afterward is equivalent to performing a "full-dimensional quality check" on the aggregated features. Using SimAM's energy function, the model can dynamically evaluate the importance of each spatial location and channel, assigning higher weights to the UAV target area and lower weights to background areas such as the sky and clouds, thereby outputting high-purity features to the detection head.

[0111] 2.3 SimAM Attention Module Principles and Implementation

[0112] SimAM (SimpleAttentionModule) is the core component of this application.

[0113] Theoretical basis:

[0114] SimAM is based on the phenomenon of "spatial inhibition" in neuroscience, which states that active neurons inhibit the activity of surrounding neurons. This means that neurons with significant information (such as the edges or corners of a drone) should exhibit firing patterns that are significantly different from those of the surrounding background neurons.

[0115] Derivation of the energy function:

[0116] To quantify this difference, SimAM is used for each neuron. An energy function is defined. This function measures neurons. With other neurons in the same channel The linear separability between them. If The easier it is to be linearly distinguished from surrounding neurons, the lower its energy and the higher its importance.

[0117] The energy function is defined as:

[0118] (4)

[0119] In the above formula, we hope to find the transformation parameters. and This makes the target neuron After transformation, it approaches 1, while the background neurons... After transformation, it approaches -1.

[0120] Fast closed-form solution:

[0121] The essence of SimAM lies in the existence of a fast closed-form solution to the aforementioned optimization problem, which does not require iterative training through SGD.

[0122] (5)

[0123] (6)

[0124] This leads to the minimum energy value:

[0125] (7)

[0126] in, and These are the mean and variance of the current channel. This formula shows that the energy value is only related to the value of the neuron and the statistics of the channel it belongs to.

[0127] Feature enhancement operations:

[0128] Since lower energy levels indicate higher importance, we take the reciprocal of the energy level as the attention weight.

[0129] The entire process involves only basic tensor operations, fully utilizes the parallel computing capabilities of the GPU, and does not introduce any learnable parameters.

[0130] 2.4 Detection Head and Loss Function

[0131] The SimAM-enhanced feature map is then fed into DetectHead.

[0132] Classification branch: Using BCELoss. Because SimAM suppresses the background, the classification branch will be more confident in distinguishing between "background" and "drone".

[0133] Regression branch: using DFL (DistributionFocalLoss) and CIoULoss.

[0134] DFL: Models the position of the bounding box as a probability distribution. Since the edges of small targets are blurred, DFL can use the expected value of the distribution to optimize localization, making it particularly suitable for targets such as drones whose edges are easily affected by lighting.

[0135] CIoU: Taking into account the overlap area, center distance, and aspect ratio, it accelerates convergence.

[0136] 3. Experimental Verification and Result Analysis (Example Data)

[0137] To verify the effectiveness of this application, a comparative experiment was conducted on a self-built dataset containing 6,000 drone images. The dataset was divided into training and validation sets in an 8:2 ratio.

[0138] Experimental environment:

[0139] GPU: NVIDIA GeForce RTX 4060

[0140] Framework: PyTorch1.12, UltralyticsYOLOv8

[0141] Epochs=500

[0142] Batch=32

[0143] Imgsize=640

[0144] Evaluation indicators:

[0145] mAP@0.5: The average precision when the IoU threshold is 0.5.

[0146] Params (M): Number of model parameters (millions).

[0147] Comparative experimental results (as shown in Table 1):

[0148] Table 1

[0149]

[0150] Results analysis:

[0151] 1. Improved Accuracy: This application (SimAM-YOLOv8n) achieves an improvement in mAP@0.5 compared to the baseline model, significantly outperforming the improvements of SE and CBAM. This is attributed to SimAM's 3D attention mechanism, which can capture the features of small targets more precisely.

[0152] 2. Parameterless advantage: The number of parameters in this application is completely consistent with the baseline model, while SE and CBAM both increase the number of parameters.

[0153] A drone countermeasure monitoring terminal based on the method of this application is described, and a hardware implementation method utilizing the above-mentioned SimAM-YOLOv8 algorithm is introduced.

[0154] System components:

[0155] 1. Front-end data collection.

[0156] 2. Edge computing unit.

[0157] 3. Algorithm Deployment:

[0158] Use the TensorRT tool to convert the trained SimAM-YOLOv8PyTorch model into .engine format.

[0159] Since SimAM only contains standard operators (mean, variance, sigmoid), TensorRT can perform layer fusion optimization on it to further improve inference speed.

[0160] 4. Business Logic:

[0161] The video stream is retrieved via the RTSP protocol.

[0162] Each frame of image is fed into the SimAM-YOLOv8 engine for inference.

[0163] If a drone is detected and the confidence level is >0.4, the system automatically selects the target and drives the PTZ camera to track it.

[0164] Simultaneously, an audible and visual alarm signal is triggered, and the alarm information is sent to the command center via a 4G / 5G module.

[0165] 5. Interface display.

[0166] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any modifications or substitutions made by those skilled in the art within the scope of the technology disclosed in this application should be covered 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.

Claims

1. A YOLOv8 drone identification method integrating SimAM, Its features are, Includes the following steps: Step S1: Data Construction and Preprocessing; Construct a drone image dataset containing multiple scenes and scales, and perform enhanced preprocessing on the dataset to generate training and validation sets; Step S2: Network Model Construction; Construct a target detection network model based on SimAM-YOLOv8; The model includes a Backbone network, a Neck feature fusion network, and a Head detection network; wherein, the Neck feature fusion network introduces a parameterless attention module in the feature aggregation stage to perform three-dimensional weight recalibration on multi-scale features; Step S3: Model training; Construct a composite loss function that includes classification loss, regression loss and distribution loss, use the training set to train the SimAM-YOLOv8 model end-to-end, evaluate the model performance through the validation set, and save the optimal weight parameters. Step S4: Reasoning and Recognition; Deploy the trained model on the edge computing terminal to perform real-time reasoning on the video stream or image to be detected, and output the position coordinates and confidence level of the drone target.

2. The UAV identification method according to claim 1, characterized in that, The enhanced preprocessing in step S1 specifically includes: The input image size is uniformly adjusted to the preset size, and adaptive grayscale bar filling is used to maintain the original aspect ratio; Using the Mosaic data augmentation strategy, four images are randomly selected and randomly scaled, cropped, arranged, and stitched together to form a new training image. The image is subjected to blending enhancement and geometric transformation, the geometric transformation including random rotation, translation, shearing and random perturbation of the HSV color gamut space.

3. The UAV identification method according to claim 1, characterized in that, The specific implementation of introducing the SimAM module into the Neck feature fusion network in step S2 is as follows: The Neck network adopts a PAN-FPN architecture; A SimAM module is connected in series after the output of each C2f module in the Neck network; The SimAM module receives the feature map output by the C2f module, calculates the energy value of each neuron in the feature map, generates an attention weight matrix based on the energy values, and finally multiplies the weight matrix element-wise with the original feature map to output the enhanced feature map. .

4. The UAV identification method according to claim 3, characterized in that, The SimAM module defines an energy function based on the spatial inhibition theory of neuroscience, for the first channel of a specific feature map. Each neuron, its energy value The calculation formula is: (1) in, The target value for the current neuron; This is the mean of all neurons in the current channel; This represents the variance of all neurons within the current channel; This represents the total number of neurons within the channel; Here is the regularization constant; The enhanced feature map The calculation formula is: (2) in, For all The energy matrix formed This is the activation function.

5. The UAV identification method according to claim 1, characterized in that, The composite loss function in step S3 Loss from bounding box regression Classification loss and distributed focal loss The weighted average is calculated using the following formula: (3) in, The CIoU (Complete IoU) loss function is used to measure the overlap between the predicted bounding box and the ground truth bounding box, the distance between the center points, and the consistency of the aspect ratio.

6. The UAV identification method according to claim 1, characterized in that, In step S4, the edge computing terminal is an embedded device equipped with a GPU; the inference process also includes using the TensorRT inference engine to accelerate the trained model with FP16 half-precision quantization.

7. A drone identification system applying the drone identification method according to any one of claims 1-6, characterized in that, include: The image acquisition module is used to capture video image data of the monitored area in real time. The processor is used to run the SimAM-YOLOv8 object detection algorithm; Memory, used to store computer programs and pre-trained model weight files; The alarm module triggers an audible and visual alarm or sends a warning message to the control platform when the processor detects that the confidence level of the drone target exceeds a preset threshold.