Multi-category small target dangerous area intrusion detection method based on aerial image of unmanned aerial vehicle
By employing a YOLOv1-based multi-class small target dangerous area intrusion detection method, which utilizes dynamic channel attention convolution and multi-scale dilated convolution attention mechanisms, combined with anomaly semantic weighted learning and anchor-free detection, the method solves the accuracy and efficiency problems of small target detection in complex scenarios, achieving high-precision, flexible and real-time intrusion detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-03-10
AI Technical Summary
Existing intrusion detection methods for dangerous areas struggle to accurately identify multiple types of small targets in complex scenarios, and traditional methods are inefficient and resource-intensive, making it difficult to meet real-time monitoring needs.
A multi-class small target dangerous area intrusion detection method based on YOLOv1 is adopted. By introducing dynamic channel attention convolution DyCAConv, improved feature fusion module BiFPN_Concat2 and multi-scale dilated convolution attention mechanism DilateBlock, combined with anomaly semantic weighted learning strategy, detection is performed using an anchor-free detection mechanism and multi-dimensional adaptive NMS.
It improves the accuracy and robustness of small target detection, reduces the rate of missed detections and false detections, and increases detection efficiency, making it suitable for deployment in real-time monitoring systems.
Smart Images

Figure CN121640236A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer vision and image detection, and relates to a dangerous area intrusion detection method, in particular, a multi-class small target dangerous area intrusion detection method based on unmanned aerial vehicle aerial image. BACKGROUND
[0002] In recent years, with the development of society and the progress of technology, the importance of safety protection in various fields has become increasingly prominent. The intrusion detection of dangerous areas, as a key link to ensure personnel safety, equipment safety and maintain normal production and living order, has attracted widespread attention. Timely and accurate detection and prevention of illegal intrusion of personnel or objects play a crucial role in preventing accidents and reducing losses.
[0003] Traditional dangerous area intrusion detection methods mainly rely on manual monitoring and simple sensor technology. Manual monitoring requires a large number of staff to stand guard for a long time, which not only has high cost, but also is prone to missed detection or misjudgment due to fatigue, negligence and other factors. Simple sensor technology, such as infrared sensors, pressure sensors, etc., can achieve intrusion detection to some extent, but its detection range is limited, easily disturbed by environmental factors, and cannot accurately identify and classify the intrusion target, making it difficult to meet the safety protection needs in complex scenarios.
[0004] With the continuous development of computer vision technology, image and video-based intrusion detection methods have gradually become a research hotspot. Traditional image processing methods mainly identify intrusion targets through threshold setting, edge detection, background subtraction and other techniques. However, these methods have many limitations. First, they are sensitive to environmental changes, and factors such as light changes and shadow interference can easily lead to unstable detection results. Second, traditional methods require manual design of complex feature extractors, making it difficult to adapt to the diversity and complexity of different scenarios. In addition, traditional image processing methods are low in efficiency when dealing with large-scale data, making it difficult to meet the real-time requirements of high-speed scenarios.
[0005] In recent years, the rise of deep learning technology has brought new opportunities for dangerous area intrusion detection, but existing deep learning models still face some challenges when applied to dangerous area intrusion detection. On the one hand, the scene of dangerous areas is complex and diverse, and there may be multiple types of intrusion targets, such as personnel, vehicles, animals, etc., and the size, shape, color and other characteristics of the targets differ greatly, which puts higher requirements on the recognition ability and generalization ability of the model. On the other hand, dangerous area intrusion detection usually needs to run in real-time monitoring systems, with strict restrictions on detection speed and resource occupation.
[0006] To solve the above problems, many researchers optimize the model performance by improving the network structure, in addition, data enhancement and transfer learning and other methods are also widely used to improve the generalization ability of the model. However, these improvement measures still face many challenges in practical application. For example, the dependence of deep learning model on the number of features leads to the problem of false detection and missed detection when detecting small targets, especially on small sample data set, the performance of the model is often difficult to satisfy. In addition, although the optimization of network structure improves the detection effect to a certain extent, it is often accompanied by the problems of large memory occupation, difficulty in realizing technology landing and low detection speed, which to a large extent limits its application in real-time monitoring system. SUMMARY
[0007] The purpose of the present application is to propose a multi-class small target dangerous area intrusion detection method based on unmanned aerial vehicle aerial image in view of the existing problems.
[0008] In order to overcome the shortcomings of the prior art, the technical scheme adopted by the present application is as follows: A multi-class small target dangerous area intrusion detection method based on unmanned aerial vehicle aerial image, the method is realized based on YOLOv11, and the method comprises the following steps: 7) Reference and preparation of data set: the training set and test set in VisDrone data set are introduced; 8) Enhance the learning of data features: before the image of the training set is input into the network model, each image is subjected to initial feature convolution of the model, and then dynamic channel attention convolution DyCAConv is adopted to obtain weight feature map for use by the next layer; 9) Introducing improved feature fusion module BiFPN_Concat2: the module is used for fusing two input features, and the proportion of different features is adjusted through dynamic weight, the two input features are feature maps from two different layers, and the two feature maps contain target information of different scales; 10) Introducing multiscale dilated convolution attention mechanism DilateBlock module: the module combines dilated convolution and self-attention mechanism to capture feature information of different scales; 11) Adopting abnormal semantic weighting learning strategy: On the basis of VisDrone dataset, adding labeled samples containing abnormal intrusion targets to construct a "normal-abnormal" binary classification auxiliary task, which is jointly trained with the target detection main task; generating abnormal feature attention map by comparing the feature differences between normal targets and abnormal targets during training, and multiplying the abnormal feature attention map with the weight feature map output by the dynamic channel attention convolution element by element; At the same time, the weight distillation strategy is adopted, and the feature map weight output by part of the epoch in the training process is input into the distillation network, and the optimal weight combination is selected by comparing the abnormal target detection accuracy, and the abnormal feature map considering normal and abnormal targets is generated; 12) Apply the weight of the abnormal feature map in step 5) to the test set image in step 1), and detect the potential intrusion target through the anchor-free mechanism, and use the multi-dimensional adaptive NMS to filter multiple predicted boxes during the detection process. The highest scoring predicted box is retained as the final intrusion target position.
[0009] Preferably, the dynamic channel attention convolution in step 2) includes: judging the dominant scale of the target in the current feature map in real time through the adaptive scale detection module; dynamically adjusting the group number of the grouped convolution based on the dominant scale; through multi-dimensional information aggregation, first aggregate the global information of each receptive field, then use the convolution network to generate the attention weight of each receptive field, and use the Softmax function to normalize to obtain a new feature map.
[0010] Preferably, the multi-dimensional information aggregation includes: aggregating global statistical information through average pooling, introducing edge perception pooling and texture feature aggregation, concatenating the average pooling result, edge perception pooling result and texture feature aggregation result in the channel dimension to form multi-dimensional context information; After concatenating the global features in the horizontal and vertical directions with the multi-dimensional context information, it is sequentially through a 1*1 convolution layer and a 3*3 depth separable convolution, then batch normalization, and nonlinear transformation using an activation function to generate intermediate features; The intermediate features are divided into two parts and then passed through a convolution layer, one generates horizontal channel attention weight, and the other generates vertical channel attention weight. The channel attention weight is normalized by the Sigmoid function; At the same time, the input feature map is compressed into a global feature vector through global average pooling, and a dynamic weight is generated through a fully connected layer and a Softmax function; The normalized horizontal channel attention weight, vertical channel attention weight and the dynamic weight are concatenated to generate a new feature weight map.
[0011] Preferably, generating a dynamic weight through a fully connected layer and a Softmax function includes: 2.11) Global feature vector extraction vector extraction; the mean value of each channel is calculated by global average pooling to obtain a global feature vector v with a dimension of Cx1x1; 2.12) Dimension mapping of fully connected layer; the global feature vector v is input into the fully connected layer for feature transformation, the channel dimension C is mapped to the target weight dimension K, K corresponds to the number of attention branches to be balanced, and an intermediate feature z is generated; 2.13) Softmax normalization to generate dynamic weights; apply the Softmax function to the output z of the fully connected layer to normalize it to the interval [0, 1], and the sum of all elements is 1, to obtain dynamic weights w dynamic .
[0012] Preferably, the improved feature fusion module of step 3) comprises: 3.1) Define two learning weight parameters and , the initial value is 1, which allows the network to dynamically adjust the weight according to the feature importance during the training process, and the weight parameter is initialized as follows: ; 3.2) Normalize the weight parameters in the range [0, 1], and the normalized weight is , i is the serial number of the i-th learning weight parameter in w; 3.3) Multiply the two input features and by the normalized weights and , respectively, to achieve dynamic weighted fusion; the weighted feature is represented as follows: ; 3.4) Concatenate the weighted features along the channel dimension to generate the fused feature output; the concatenation operation is represented as: ; where d represents the dimension of concatenation, torch.cat is a function in PyTorch for tensor concatenation, and dim is the specified dimension of concatenation.
[0013] Preferably, the multi-scale dilated convolution attention mechanism in step 4) comprises the following steps: 4.1) The input feature is decomposed into query Query, key Key and value Value three parts through a convolution layer qkv; a normalization layer LayerNorm is added using a DilateBlock module for normalization processing of the input feature; 4.2) DilateAttention submodule is used to calculate the attention of each head: the DilateAttention submodule first extracts feature points in the local neighborhood from the input features according to the set dilation rate and the size of the convolution kernel, the dilation rate includes different sizes of the dilation rate; the feature points are selected by sparse selection, that is, only the key points in the domain are selected, not all pixels; then 3*3 depth separable convolution is performed on the Qurey, Key and Value of the selected feature points; the attention weight is calculated by the dot product of the Query and Key after depth separable convolution, and is normalized by the Softmax function; the normalized attention weight is used to weight the sum of the value Value after depth separable convolution, to obtain the output feature of each position; 4.3) The DilateBlock module performs nonlinear transformation on the features through an MLP layer; the MLP layer is composed of two linear transformations, and an ELU activation function is inserted between the two layers; the DilateBlock module is configured with a random skip regularization after the MLP layer, which performs Bernoulli distribution sampling mask m e {0, 1} on the residual branch feature F output by the MLP, and in the training stage, the whole residual branch is suppressed in the form of mxF, and in the test stage, m is always 1, and the network restores the full depth; 4.4) A normalization layer is added through the DilateBlock module to normalize the output of 4.3); Preferably, the detection process in step 6) is as follows: 6.1) Weight matching and intrusion target detection: the weight of the abnormal feature map obtained by learning in step 5) is applied to the test set image in step 2); the potential intrusion target in the image is detected through the Anchor-Free mechanism: the input image is divided into fixed-size grids, and each grid unit is responsible for detecting the target inside it; the position of the target is represented by the center point coordinate; 6.2) Boundary box prediction: based on the feature map extracted by the YOLOv11 backbone network, the boundary box of each grid unit is predicted through convolution operation, and the offset value of the boundary box is calculated, which is the offset of the center coordinate of the boundary box relative to the center coordinate of the grid unit; 6.3) Target class detection: based on the feature map extracted by the YOLOv11 backbone network, the target class identification task is completed through convolution operation, in which the correlation probability between the target class in the boundary box of each grid unit and the known target class is calculated, and the probability is converted into an explicit probability distribution by using the softmax function; 6.4) A multi-dimensional adaptive NMS algorithm is used for screening: a dynamic IoU threshold is set based on the target category; the confidence and position stability score of each predicted bounding box are calculated. The position stability score is obtained based on the positional deviation between the current frame bounding box and the bounding box of the same target in the adjacent frame. The smaller the deviation, the higher the position stability score. The confidence and position stability scores are weighted to obtain a comprehensive score, and sorted from high to low according to the comprehensive score; boxes with an IoU higher than the first threshold with the same target bounding box in the current frame are removed. Then, bounding boxes with an IoU higher than the second threshold with the same target bounding box in the high-risk area are removed. Finally, the bounding box with the highest comprehensive score is retained as the final position of the intrusion target.
[0014] This invention employs Dynamic Channel Attention Convolution (DyCAConv), enabling the model to adaptively focus on key features in an image, particularly small targets. This module utilizes a dynamic grouping convolution strategy to improve the matching degree between the receptive field division and the target scale, effectively enhancing the feature representation of small targets and solving the problems of missed detections and false detections caused by weak feature capture. Dynamic Channel Attention Convolution allows it to adaptively focus on key features, strengthening feature representation and improving the detection accuracy of small targets.
[0015] This invention achieves more efficient multi-scale feature fusion by using an improved feature fusion module, BiFPN_Concat2, which dynamically adjusts the importance of features from different network levels using learnable weights. This enables the model to accurately detect targets at different scales (such as pedestrians, vehicles, and drones) simultaneously, significantly improving its robustness in handling complex multi-class tasks.
[0016] This invention utilizes the multi-scale dilated convolutional attention mechanism DilateBlock, combining the large receptive field of dilated convolution with the global modeling capability of self-attention, enabling the model to effectively capture the long-distance dependencies of targets and more comprehensive scale features, thereby improving detection accuracy in complex scenes (such as occlusion and cluttered backgrounds).
[0017] This invention introduces an anomaly semantic weighted learning strategy, adding anomalous target samples to the VisDrone dataset. It then utilizes an anomaly feature guidance module and a weight distillation strategy to select the combination of weights with the highest AP (Average Per Second). This makes the model more targeted in detecting anomalous intrusion targets such as drones and climbing tools, improves the accuracy of small target bounding box selection, and reduces the rate of repeated detection of dense targets.
[0018] The random skip regularizer (SPR) in the DilateBlock module of this invention dynamically blocks part of the gradient path during the training phase, forcing the model to learn multiple deep subnetworks, thereby achieving implicit ensemble and significantly improving the model's generalization performance, making it more adaptable to dangerous area intrusion detection tasks in different environments.
[0019] The Anchor-Free detection mechanism used in this invention avoids the problems of complex anchor point design and large computational load in the traditional Anchor-Based method, and simplifies the detection process.
[0020] This invention employs post-processing optimizations such as multi-scale adaptive nonmaximum suppression (NMS) to effectively reduce redundant bounding boxes, lower false alarms and duplicate detections, and improve overall detection efficiency. The solution offers high accuracy, flexibility, and real-time performance, making it suitable for deployment in real-time monitoring systems.
[0021] This invention enables the loss function of the DBI_YOLOv11 network model to converge and reach a stable state more quickly during training. This is due to the synergistic effect of components such as dynamic weight balancing in DyCAConv, LayerNorm in DilateBlock, BatchNorm2d, and h_swish activation function, which makes the training process more stable and allows for the use of a larger learning rate.
[0022] This invention sets a dynamic IoU threshold based on the target category. It obtains a comprehensive score based on the confidence and location stability score of each predicted bounding box. First, it removes bounding boxes with an IoU higher than the first threshold for the same target bounding box in the current frame. Then, it removes bounding boxes with an IoU higher than the second threshold for the same target bounding box in the current frame from the bounding boxes located in high-risk areas. Finally, it retains the bounding box with the highest comprehensive score as the final location of the intrusion target. This process effectively reduces false alarms and duplicate detections, especially improving the detection accuracy and reliability of small targets and abnormal targets. It increases the accuracy of predicted box screening for small targets by 30% and reduces the duplicate detection rate of dense targets by 25%. Attached Figure Description
[0023] The invention will be further understood from the following description taken in conjunction with the accompanying drawings. The components in the drawings are not necessarily drawn to scale, but rather the emphasis is on illustrating the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.
[0024] Figure 1 This is a flowchart of an embodiment of the present invention; Figure 2 This is a schematic diagram of the network structure in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of DyCAConv in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the convergence of the network model in an embodiment of the present invention; Figure 5 This is a diagram showing the actual testing results of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to its embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Other systems, methods, and / or features of this embodiment will become apparent to those skilled in the art after reviewing the following detailed description. The following description is intended to include all such additional systems, methods, features, and advantages within the scope of this invention and is protected by the appended claims. Further features of the disclosed embodiments are described in the following detailed description, and these features will become apparent from the following detailed description.
[0026] Example 1.
[0027] like Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown, this embodiment provides a method for intrusion detection of multi-category small target dangerous areas based on UAV aerial images. The method is implemented based on YOLOv11 and is characterized by including: 1) Dataset reference and preparation: Import the training and test sets from the VisDrone dataset; 2) Enhanced learning of data features: Before the images in the training set are input into the network model, each image is first convolved with the initial features of the model, and then the weight feature map is obtained by using dynamic channel attention convolution DyCAConv for use in the next layer. 3) Introducing the improved feature fusion module BiFPN_Concat2: This module aims to fuse two input features and adjust the weight of different features through dynamic weights. The two input features are feature maps from two different levels, which contain target information at different scales. 4) Introducing the DilateBlock module, a multi-scale dilated convolutional attention mechanism: This module captures feature information at different scales by combining dilated convolution and self-attention mechanisms; 5) An anomaly semantic weighted learning strategy is adopted: Based on the VisDrone dataset, labeled samples containing anomalous intrusion targets are added to construct a "normal-abnormal" binary classification auxiliary task, which is jointly trained with the main target detection task; during training, the feature differences between normal targets and anomalous targets are compared to generate an anomalous feature attention map, and the anomalous feature attention map is multiplied element-wise with the weight feature map output by the dynamic channel attention convolution; at the same time, a weight distillation strategy is adopted, and the feature map weights output by some epochs during training are input into the distillation network. By comparing the anomalous target detection accuracy, the optimal weight combination is selected to generate an anomalous feature map that takes into account both normal and anomalous targets; 6) Apply the weights of the abnormal feature maps from step 5) to the test set images from step 1), and use the Anchor-free mechanism to detect potential intrusion targets. The detection process uses multi-dimensional adaptive NMS filtering to filter multiple predicted boxes, and retains the predicted box with the highest score as the final location of the intrusion target.
[0028] The various types of small targets of this invention can be set according to user needs. In this embodiment, drones, climbing tools, and camouflaged personnel are preferred.
[0029] Preferably, the weight distillation strategy saves the data every 10 epochs during the training process, spanning 200 epochs. The optimal weight combination can be obtained through the following method: The specific selection process is as follows: First, each saved weighted sample is applied to the test set, and anomaly detection is performed using an anchor-free mechanism. Then, based on the annotation results of the test set, the core quantitative indicators corresponding to each weighted sample are calculated. The core quantitative indicators include anomaly detection accuracy, anomaly detection recall, F1-Score, and average precision (AP). Anomaly detection accuracy is the ratio of the number of correctly detected anomalies to the total number of detected anomalies. Anomaly detection recall is the ratio of the number of correctly detected anomalies to the actual number of anomalies in the dataset. F1-Score is the product of accuracy and recall multiplied by twice the sum of accuracy and recall. Average precision (AP) is the area under the precision-recall curves at different confidence thresholds (usually calculated as AP@0.5). Subsequently, the "optimal weight combination" is determined based on the optimal quantitative indicators, prioritizing the weighted sample with the highest AP.
[0030] Figure 2 This is a schematic diagram of the network structure of DBI_YOLOv11 in this embodiment of the invention. In the diagram, Input is the input of the dataset, Conv is the initial convolution, DyCAConv is the dynamic channel attention convolution, C3k2 is a fixed module in YOLOv11, namely a C3 module using a 2x2 convolution kernel. Similarly, SPPF, C2PSA, Upsample, and Detect are all fixed modules in YOLOv11, namely fast spatial pyramid pooling, C2f partial self-attention, upsampling, and detection head, respectively. BiFPN_Concat2 is an improved feature fusion module, and DilateBlock is a multi-scale dilated convolutional attention mechanism.
[0031] The images in this invention refer to images in drone aerial videos, i.e., drone aerial video sequences, and the dataset contains images of consecutive frames.
[0032] This invention references the publicly available VisDrone dataset, a large-scale UAV visual target detection dataset widely used in target detection, tracking, and related research fields. The VisDrone dataset contains rich image resources and detailed annotation information, providing fundamental data support for intrusion detection tasks in dangerous areas. In this invention, the training and test sets from the VisDrone dataset are directly used for model training and model performance evaluation, respectively.
[0033] This invention adds 1000 labeled samples containing anomalous targets (such as drones, climbing tools, and disguised personnel) to the VisDrone dataset, generating anomaly feature map weights that consider both normal and anomalous targets. The weights of these anomaly feature maps, learned through a network model, are used to distinguish between normal and intrusive behavior. These weights are then applied to the test set images in step 1), directly detecting potential intrusion targets using an anchor-free mechanism, avoiding the inaccuracy issues caused by improper anchor point design in anchor-based methods. During detection, multi-scale adaptive non-maximum suppression (NMS) is used to filter multiple predicted boxes, retaining the highest-scoring predicted box as the final intrusion target location, thereby effectively reducing false positives and duplicate detections. This method possesses high accuracy, flexibility, and real-time performance, effectively ensuring the safety of dangerous areas.
[0034] Example 2.
[0035] This embodiment should be understood as including all the features of at least one of the foregoing embodiments, and further improving upon them. The DyCAConv structure design of this invention achieves dynamic response adjustment of the convolution kernel by integrating grouped convolution, global information aggregation, and attention mechanisms. First, addressing the problem that traditional DyCAConv only divides local receptive fields through fixed grouped convolution and does not consider the requirements of target scale differences on the receptive field range, this invention's DyCAConv adopts a dynamic grouped convolution strategy to ensure that small targets obtain more refined local feature division, while large targets retain more complete global feature associations. Finally, the input feature map is divided into multiple local receptive fields through dynamic grouped convolution, which reduces computational complexity while efficiently extracting local features and improves the matching degree between receptive field division and target scale. Subsequently, a multi-dimensional information aggregation strategy is adopted. Specifically, this strategy aggregates the global information of each receptive field. On the one hand, it extracts global statistical information (such as pixel mean and feature distribution trend) within the receptive field through average pooling operations. On the other hand, it integrates the spatial dimension (feature associations at different locations within the receptive field) and the channel dimension (semantic complementary information of different feature channels) to locally aggregate the global information within the receptive field. Its core objective is to overcome the limitations of single-dimensional information, comprehensively capture the contextual relationships of features, and provide contextual information for the attention mechanism. Next, a lightweight convolutional network generates attention weights for each receptive field, and a Softmax function is used for normalization to highlight the importance of key features. Finally, these weights are used to dynamically adjust the response of the convolutional kernels, enabling them to adaptively focus on key features, thereby enhancing feature representation and improving network performance.
[0036] Preferably, the dynamic channel attention convolution in step 2) includes: determining the dominant scale of the target in the current feature map in real time through an adaptive scale detection module; dynamically adjusting the number of groups of grouped convolutions based on the dominant scale; firstly, aggregating the global information of each receptive field through multi-dimensional information aggregation, then using a convolutional network to generate attention weights for each receptive field, and using the Softmax function for normalization to obtain a new feature map. The weights in the new feature map are used to dynamically adjust the response of the convolution kernel.
[0037] The real-time determination of the dominant scale of the target in the current feature map and the dynamic adjustment of the number of groups of convolutions based on the dominant scale include: determining the size of the target in the current feature map; targets of 10-30 pixels are considered small targets, targets of 30-80 pixels are considered medium targets, and targets larger than 80 pixels are considered large targets; and adjusting the number of groups of convolutions based on the dominant scale: 8 groups for small targets, 4 groups for medium targets, and 2 groups for large targets. The lightweight convolutional network refers to a convolutional network that can be effectively deployed on resource-constrained devices, such as mobile phones, embedded devices, drones, or edge computing nodes, while maintaining model performance (such as accuracy). Examples include the MobileNet series (V1, V2, V3), the ShuffleNet series (V1, V2), SqueezeNet, and EfficientNet-Lite.
[0038] Preferably, the multi-dimensional information aggregation includes aggregating global statistical information through average pooling, introducing edge-aware pooling and texture feature aggregation, and concatenating the average pooling result, edge-aware pooling result, and texture feature aggregation result according to the channel dimension to form multi-dimensional context information; after concatenating the global features in the horizontal and vertical directions with the multi-dimensional context information, it is passed through a 1*1 convolutional layer and a 3*3 depthwise separable convolutional layer in sequence, and then batch normalized, and non-linear transformation is performed using an activation function to generate intermediate features; the intermediate features are split into two parts and then passed through a convolutional layer, one to generate horizontal channel attention weights and the other to generate vertical channel attention weights, and the channel attention weights are normalized by the Sigmoid function; at the same time, the input feature map is compressed into a global feature vector through global average pooling, and dynamic weights are generated through a fully connected layer and the Softmax function; the normalized horizontal channel attention weights, vertical channel attention weights and the dynamic weights are concatenated together to generate a new feature weight map. The global statistical information includes pixel mean, feature distribution trend, and the channel dimension is the semantic complementary information of different feature channels. Multi-dimensional information aggregation performs local aggregation on all information extracted by the average pooling operation in the receptive field to obtain the feature weight map of multi-dimensional context features.
[0039] Preferably, the dynamic channel attention convolution in step 2) includes: 2.1) The dominant scale of the target in the current feature map is determined in real time by the adaptive scale detection module: The input feature map is first compressed by two adaptive average pooling layers along the height and width directions respectively to extract global feature information in the horizontal and vertical directions; 2.2) The number of groups of grouped convolutions is dynamically adjusted based on the dominant scale. Within the selected grouped convolutional structure, the feature outputs obtained by dynamic channel attention convolution, which include offsets and adjustment scales (included in the weight feature map), are standardized using the BatchNorm2d operation. In the formula: x is the input feature value, E[x] represents the mean of the input feature map X, and Var[x] represents the variance of the input feature map X. These two parameters can be directly calculated during forward propagation. β and β are the adjusted variance and adjusted mean, with initial values of respectively. =1 and β=0 are parameters that are continuously updated in the backpropagation model; eps is the minimum value that ensures the stability of the calculation, with a default value of 1e-5.
[0040] 2.3) Through multi-dimensional information aggregation, the global information of each receptive field is first aggregated, and then the attention weights of each receptive field are generated using a convolutional network. The new feature map is obtained by normalization using the Softmax function, and the network convergence is accelerated by using the h_swish activation function.
[0041] The edge-aware pooling extracts target edge features within the receptive field using the Sobel operator, followed by pooling compression. Texture feature aggregation extracts local texture information using the LBP algorithm and concatenates it with the pooling result. This concatenation is what is referred to as Concat in the diagram.
[0042] This embodiment addresses the problem of low accuracy in small target detection due to weak key feature capture by employing Dynamic Channel Attention Convolution (DyCAConv), which adaptively focuses on key features, strengthens feature representation, and improves the accuracy of small target detection. When the training set images from step 2) are input into the network model of this invention, each image is first processed through the model's initial feature convolution before being input into the DyCAConv structure.
[0043] Example 3.
[0044] This embodiment should be understood to include at least all the features of any of the foregoing embodiments, and to further improve upon them; preferably, generating dynamic weights through a fully connected layer and a Softmax function includes: 2.11) Global Feature Vector Extraction: Let the input feature map be X∈R C×H×W (Where C is the number of channels, H is the feature map height, and W is the feature map width), the mean of each channel is calculated using global average pooling to obtain a global feature vector v of dimension C×1×1, calculated as follows: ; GlobalAvgPool() is a global average pooling operation, and : is a wildcard indicating that all channels are selected; 2.12) Fully Connected Layer Dimension Mapping: The global feature vector v is input into the fully connected layer for feature transformation, mapping the channel dimension C to the target weight dimension K (K corresponds to the number of attention branches to be balanced; here K=2, corresponding to the horizontal and vertical channel attention weights respectively), generating the intermediate feature z, calculated as follows: ; where FC() represents the fully connected layer operation; Among them, W fc ∈R K×C Let b be the learnable weight matrix of the fully connected layer. fc ∈R K It is a learnable bias vector.
[0045] 2.13) Softmax normalization generates dynamic weights: Applying the Softmax function to the output z of the fully connected layer normalizes it to the interval [0,1] with all elements summing to 1, resulting in dynamic weights w that have the physical meaning of "contribution percentage". dynamic The calculation formula is: ;where exp(z) i z is the natural constant e. i Power; In this invention, R represents the set of real numbers, and the superscript of R indicates that it has the dimension of a real vector space. These dynamic weights are used to balance the contributions of the channel attention weights in the horizontal and vertical directions to the feature map, thereby achieving the flexibility of dynamically adjusting the attention mechanism. In the feature weighting stage, each pixel of each channel of the input feature map is multiplied by the dynamically weighted channel attention weights to generate a weighted feature map. Finally, the weighted feature map is passed through a standard convolutional layer to complete feature extraction and channel number transformation, outputting the final feature map. The calculation can be expressed as: In the formula: This represents a grouped convolution of size i × i, where k represents the kernel size (i.e., scale), Norm represents normalization, X represents the input feature map, and F is the attention-weighted feature map, where F is derived from the attention map A. rf With the transformed receiver field spatial characteristics F rf Multiplying them together gives the result. Softmax is the normalized exponential function; AvgPool is average pooling; ELU is Exponential Linear Unit, an activation function; Norm is normalization. Note Figure A. rf With the transformed receiver field spatial characteristics F rf Multiplying them together yields F, which reflects the dynamic selection metric.
[0046] This embodiment effectively addresses the problem of weak key feature capture in small object detection by implementing a fully connected layer and a Softmax function to generate dynamic weights. The module employs a dynamic grouped convolution strategy, which adaptively adjusts the number of convolutional groups based on the dominant scale of the target in the input image (small, medium, large), achieving optimal matching between the receptive field and the target scale, thus improving the matching accuracy. Simultaneously, by fusing global statistical information, spatial correlation, and channel-dimensional semantic complementarity through a multi-dimensional information aggregation strategy, and combining this with attention weights generated by a lightweight convolutional network, the model can adaptively focus on key features, significantly enhancing its feature representation ability for small targets, thereby effectively reducing false negative and false positive rates.
[0047] Example 4.
[0048] This embodiment should be understood to include at least all the features of any of the foregoing embodiments, and to further improve upon them; preferably, the improved feature fusion module in step 3) includes: 3.1) Define two learning weight parameters and The initial value is 1, allowing the network to dynamically adjust the weights based on the importance of features during training. The weight parameters are initialized as follows: ; 3.2) To avoid training instability caused by the unboundedness of scalar, vector, or multidimensional tensor weights, the weight parameters in 3.1) are normalized to the range [0,1]. The normalized weights are: ; 3.3) Combine the two input features and Multiply by the normalized weights in 3.2 respectively. and This achieves dynamic weighted fusion; the weighted features are represented as follows: ; 3.4) Concatenate the weighted features from 3.3) along the channel dimension to generate the fused feature output; the concatenation operation is represented as: Where d represents the concatenation dimension, which defaults to the channel dimension, torch.cat is a function in PyTorch used for tensor concatenation, and dim specifies the concatenation dimension.
[0049] This embodiment significantly improves the model's ability to handle multi-class object detection tasks by improving the feature fusion module BiFPN_Concat2. This module dynamically adjusts the importance of features from different network levels through learnable weight parameters w1 and w2, achieving more efficient multi-scale feature fusion. This dynamic weighting mechanism allows the network to autonomously learn and balance the contributions of features at different scales (such as deep features containing information about large targets and shallow features containing details about small targets) during training, avoiding the limitations of fixed-weight fusion. Ultimately, this module enables the model to accurately detect targets of different scales (such as pedestrians and vehicles) simultaneously, enhancing the model's robustness and generalization ability in complex scenes.
[0050] Example 5.
[0051] This embodiment should be understood to include at least all the features of any of the foregoing embodiments, and to further improve upon them; preferably, the multi-scale dilated convolutional attention mechanism in step 4) includes the following steps: 4.1) The input features are first decomposed into three parts: query, key, and value through a convolutional layer (qkv); a normalization layer (LayerNorm) is added using the DilateBlock module to normalize the input features. 4.2) For each head, the DilateAttention submodule calculates dilated attention: The DilateAttention submodule first extracts feature points within the local neighborhood from the input features based on the set dilation rate and kernel size. The dilation rate includes different dilation rates. These feature points are selected using sparse selection, which means selecting only key points representing features within the neighborhood, rather than all pixels. Then, a 3*3 depthwise separable convolution is performed on the Query, Key, and Value of the extracted feature points within the local neighborhood for secondary refinement. The attention weights are calculated using the Query and Key. The dot product of ey is calculated and normalized using the Softmax function. The normalized attention weights are used to perform a weighted summation of the Value after the depthwise separable convolution to obtain the output feature at each position. The key points for the neighborhood feature representation refer to stable, repeatable, and information-rich pixels in the image, which typically possess one or more of the characteristics of corner points, speckles, and high-gradient / edge points. Key points can be selected based on the maximum value of the corner response intensity, or the maximum value of the weighted summation of the corner response intensity, speckle response intensity, and edge curvature values. In addition, they can be selected based on the following criteria: 4.2.1) Calculate the minimum feature value in two directions near each pixel, obtain the pixel with the minimum feature value greater than the preset threshold as the corner point, and obtain the corner point response intensity value and normalize it to R_coner; 4.2.2) Compare each pixel in the scale space with all points in the same scale, adjacent scales and spatial neighborhood, and obtain the pixel corresponding to the maximum or minimum pixel intensity as a blob, and obtain the blob response intensity value of each blob and normalize it to R_blod; 4.2.3) Find points on the object contour where the rate of curvature change is greater than the curvature threshold as edge points, and obtain the curvature value of each edge point and normalize it to R_curvature; 4.2.4) Integrate all pixels corresponding to corner points, spots, and edge points as a candidate point set. Calculate the Euclidean distance between any two points in the candidate point set. For two points with a distance less than a preset value, only the one with the larger RX is retained. ; 4.2.5) Calculate the gradients Gx and Gy in the x and y directions for all remaining candidate points, respectively, and calculate the gradient magnitude G(i,j) based on the obtained gradients. ; Key point index RY is obtained based on gradient magnitude. , where I is the number of pixel rows in the image and J is the number of pixel columns in the image; 4.2.6) Retain the positions of candidate points whose RY is greater than the keypoint index threshold and whose RY is also larger in adjacent frames as keypoints of the current image. The adjacent frame is preferably the previous frame; if there is no previous frame, it is compared with the next frame. That is, if a candidate point with a larger RY is in the previous frame, then the position of that candidate point that is at the same location as the current image is taken as the keypoint of the current image.
[0052] 4.3) After completing the multi-scale dilated convolutional attention calculation, the DilateBlock module performs a nonlinear transformation on the features through an MLP layer. The MLP layer consists of two linear transformation layers with an ELU activation function inserted between them. The DilateBlock module configures a Skip-Path Regulator (SPR) after the MLP layer. This regularizer performs a Bernoulli distribution sampling mask m∈{0,1} on the residual branch features F' output by the MLP. During the training phase, the entire residual branch is suppressed in the form of m×F'. During the testing phase, m is always 1, and the network recovers to its full depth. Since there is always a constant component in the gradient flow from the perspective of statistical expectation, as long as the probability of a random variable following the Bernoulli distribution being 1 is greater than the probability of being 0, the gradient will never vanish in expectation. Therefore, the SPR can converge by randomly blocking the residual branch during the training phase.
[0053] 4.4) The DilateBlock module adds a normalization layer (LayerNorm) after the MLP layer to normalize the input features.
[0054] Since shape recognition is prioritized, edge weights need to be increased. In this embodiment, the weights of the normalized blob response intensity value R_blod and the point response intensity value R_coner are reduced in the shape recognition image. Based on this, the first key point filtering is performed. The gradient magnitude is calculated for the remaining candidate points. Since the gradient magnitude represents the image sharpness, the positions of candidate points whose RY is greater than the key point index threshold and whose RY is larger in adjacent frames are retained as the key points of the current image. Using the image with higher sharpness as a reference, the key points of the image with higher sharpness are obtained as the key point positions of the current image, which can reduce the misjudgment rate caused by image blur.
[0055] This embodiment's DilateBlock multi-scale dilated convolutional attention mechanism effectively addresses the problems of insufficient scale feature capture and weak long-distance dependency perception in existing methods. This module innovatively combines the large receptive field of dilated convolution with the global modeling capability of self-attention. By setting different dilation rates, it captures multi-scale contextual information without increasing the number of parameters or computational cost. Simultaneously, its DilateAttention submodule improves efficiency by sparsely selecting key feature points for computation. Furthermore, the module's built-in Random Skip Regularizer (SPR) dynamically blocks some gradient paths during training, forcing the model to learn multiple deep subnetworks, achieving implicit ensemble and significantly improving the model's generalization performance, making it more adaptable to complex detection tasks in different environments.
[0056] Example 6.
[0057] This embodiment should be understood to include at least all the features of any of the foregoing embodiments, and to further improve upon them; preferably, the detection process in step 6) is as follows: 6.1) Weight Matching and Intrusion Target Detection: The feature map weights learned in step 5) are applied to the test set images in step 2). Potential intrusion targets in the images are detected using an Anchor-Free mechanism. In the Anchor-Free method, the input image is divided into a fixed-size grid, and each grid cell is responsible for detecting targets within its own cell; the target's position is represented by the coordinates of its center point, thus directly predicting the target's center position.
[0058] Traditional anchor-based methods pre-set a fixed number of anchor boxes (AnchorBoxes, also known as bounding boxes in this invention) with fixed scale and aspect ratio on each grid cell of the feature map. These anchor boxes cover different locations and possible target shapes throughout the image. During training, the model first calculates the IoU (Intersection over Union) between the ground truth target boxes and these pre-set anchor boxes, selects anchors with high matching scores as positive samples, then predicts the class and bounding box offset of these positive samples, and finally removes redundant predicted boxes using non-maximum suppression (NMS) to obtain the final detection result. This approach leads to inaccurate detection. The feature map weights learned in this invention are applied to the prediction of bounding boxes, avoiding the inaccuracy problem caused by unreasonable anchor design in traditional anchor-based methods.
[0059] 6.2) Bounding box prediction: Based on the feature maps extracted from the YOLOv11 backbone network, target bounding boxes are predicted for each grid cell through convolution operations. The offset values (tx, ty, tw, th) of the bounding box are calculated. th and tw determine the size of the predicted box, while tx and ty determine the center of the predicted box. The offset value is the amount of offset of the bounding box center relative to the center coordinates of the grid cell. Through these offset values, the location and size of potential intrusion targets can be determined, achieving accurate bounding box prediction. 6.3) Target category detection: Based on the feature map extracted by the YOLOv11 backbone network, the task of identifying the category of intrusion target is completed through convolution operation. In the process, for each grid cell, the association probability between the bounding box of each grid cell and each known target category is calculated. The softmax function is used to normalize these probability values and transform them into a clear probability distribution. 6.4) A multi-dimensional adaptive NMS algorithm is used for screening: a dynamic IoU threshold is set based on the target category (e.g., 0.3 for pedestrians, 0.5 for vehicles, and 0.25 for abnormal targets); the confidence and position stability score of each predicted box are calculated (the position deviation between the predicted box in the current frame and the matching box of the same target in the adjacent frame is calculated, and the smaller the deviation, the higher the position stability score); the confidence (weight 0.7) and the position stability score (weight 0.3) are weighted to obtain a comprehensive score, and sorted from high to low according to the comprehensive score; boxes with an IoU higher than the first threshold for the same target bounding box in the current frame are removed; then, bounding boxes with an IoU higher than the second threshold for the same target bounding box in the bounding boxes located in high-risk areas are removed (e.g., predicted boxes less than 5 meters from the fence are marked as high-risk); finally, the bounding box with the highest comprehensive score is retained as the final position of the intrusion target. Preferably, redundant boxes with IoU > 0.1 in the high-risk area are filtered a second time, and finally the bounding box with the highest score is retained as the final position of the intrusion target. The confidence score of a predicted bounding box is typically calculated as the product of the object's presence probability and the predicted class probability. Specifically, the model first determines whether the bounding box contains an object (objectness score), then predicts the object's class probabilities, and multiplies the highest class probability by the object probability to obtain a confidence score between 0 and 1. A higher value indicates that the model is more confident in the current detection result.
[0060] Preferably, the position stability score can be obtained in the following way: 1. First, using a target tracking algorithm, establish matching relationships between the current frame prediction box and the "same target" in the previous frame and the two previous frames, respectively. The current frame is at least the third frame.
[0061] 2. Then, for each matching pair, calculate the positional deviation (using Euclidean distance). The calculation process is as follows: Let the center coordinates of the predicted box in the current frame be (x0, y0), the center coordinates of the matching box in the previous frame be (x1, y1), and the center coordinates of the matching boxes in the previous two frames be (x2, y2). Calculate the deviation d1= d2= .
[0062] 3. Fusion method: A weighted average is used (e.g., the weight of the previous frame is 0.6, and the weight of the two previous frames is 0.4, because the closer to the current frame, the higher the positional reference value) to calculate the comprehensive deviation d = 0.6 × d1 + 0.4 × d2; Scoring conversion: The deviation is mapped to a position stability score (the smaller the deviation, the higher the score). For example, a linear mapping formula is used: score = 1 - (d / maximum possible deviation), ensuring that the score range is between 0 and 1.
[0063] This embodiment optimizes the detection process and improves the accuracy of the final results by employing an anchor-free detection mechanism combined with multi-dimensional adaptive NMS filtering. The anchor-free mechanism eliminates the complex anchor box design and matching process of traditional methods, simplifying the model structure, reducing computational overhead, and directly predicting the target center point, avoiding detection bias caused by unreasonable anchor point design. In the post-processing stage, the multi-dimensional adaptive NMS algorithm sets a dynamic IoU threshold based on the target category and comprehensively considers the confidence and positional stability score of the predicted box (obtained by calculating the displacement deviation with adjacent frames) for weighted sorting and filtering. This method effectively reduces false alarms and duplicate detections, especially improving the detection accuracy and reliability of small targets and fast-moving targets, thus improving the accuracy of predicted box filtering for small targets and reducing the duplicate detection rate of dense targets.
[0064] Figure 4 This diagram illustrates the convergence of the network model in this invention. The horizontal axis represents the number of iterations (epochs) during training. The vertical axis represents the training set bounding box loss, training / cls_loss, training set classification loss, and training / dfl_loss (focal loss). metrics / recall(B) represents the evaluation metric recall, metrics / precision(B) represents the evaluation metric precision (where precision represents precision and recall represents recall), val / box_loss represents the validation set bounding box loss, val / cls_loss represents the validation set classification loss, val / dfl_loss represents the validation set focal loss, metrics / mAP50(B) represents the evaluation metric average precision of mAP50, metrics / mAP50-95(B) represents the evaluation metric of mAP50-95, and map50 and map50-95 represent average precision. Figure 5 This is an illustration of the actual detection results of this invention. Different colors are used to distinguish different categories. For example, blue represents pedestrians, green represents cars, cyan represents vans, purple represents motorcycles, pink represents trucks, cyan represents people, white represents bicycles, and red represents tricycles. The number after each word indicates the confidence level of the detection model in that detection result.
[0065] While the invention has been described above with reference to various embodiments, it should be understood that many changes and modifications can be made without departing from the scope of the invention. That is, the methods, systems, and devices discussed above are examples. Various configurations can be appropriately omitted, substituted, or added to various processes or components. For example, in alternative configurations, methods can be performed in a different order than those described, and / or various components can be added, omitted, and / or combined. Moreover, features described with respect to certain configurations can be combined in various other configurations, such as different aspects and elements of the configuration can be combined in a similar manner. Furthermore, the elements therein can be updated as the technology develops; that is, many elements are examples and do not limit the scope of this disclosure or the claims.
[0066] In summary, the above detailed description is intended to be illustrative rather than restrictive, and it should be understood that these embodiments are for illustrative purposes only and not for limiting the scope of protection of the invention. After reading the description of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent changes and modifications also fall within the scope defined by the claims of this invention.
Claims
1. A multi-class small target dangerous area intrusion detection method based on unmanned aerial vehicle aerial image, the method is realized based on YOLOv11, characterized in that, Comprise: 1) Reference and preparation of data set: introduce the training set and test set in VisDrone data set; 2) Enhance the learning of data features: before the image input of the training set into the network model, each image is first subjected to the initial feature convolution of the model, and then the weight feature map is obtained by using dynamic channel attention convolution DyCAConv for the next layer; 3) Introduce improved feature fusion module BiFPN_Concat2: the module aims to fuse two input features, and simultaneously adjusts the proportion of different features through dynamic weight, the two input features are feature maps from two different levels, and the two feature maps contain target information of different scales; 4) Introduce multiscale dilated convolution attention mechanism DilateBlock module: the module captures feature information of different scales by combining dilated convolution and self-attention mechanism; 5) Adopt abnormal semantic weighted learning strategy: on the basis of VisDrone data set, add labeled samples containing abnormal intrusion targets to construct a "normal-abnormal" binary classification auxiliary task, and jointly train with the target detection main task; Generate abnormal feature attention map by comparing the feature differences between normal targets and abnormal targets during training, and multiply the abnormal feature attention map with the weight feature map output by dynamic channel attention convolution element by element; At the same time, a weight distillation strategy is adopted, the feature map weight output by part of the epoch in the training process is input into the distillation network, the optimal weight combination is screened by comparing the abnormal target detection accuracy, and the abnormal feature map considering normal and abnormal targets is generated; 6) Apply the weight of the abnormal feature map in step 5) to the test set image in step 1), and detect the potential intrusion target through the anchor-free mechanism, and the multi-dimensional adaptive NMS is used in the detection process to screen multiple prediction boxes, and the prediction box with the highest score is reserved as the final intrusion target position.
2. The multi-class small target dangerous area intrusion detection method based on UAV aerial images of claim 1, wherein, The dynamic channel attention convolution in step 2) comprises: judging the dominant scale of the target in the current feature map in real time through the adaptive scale detection module; dynamically adjusting the group number of grouped convolution based on the dominant scale; through multi-dimensional information aggregation, first aggregate the global information of each receptive field, then use convolution network to generate attention weight of each receptive field, and use Softmax function for normalization to obtain new feature map. 3.The multi-class small target dangerous area intrusion detection method based on UAV aerial images of claim 2, wherein, The multi-dimensional information aggregation includes: aggregating global statistical information by average pooling, introducing edge-aware pooling and texture feature aggregation, concatenating the average pooling result, the edge-aware pooling result and the texture feature aggregation result in the channel dimension to form multi-dimensional context information; after concatenating the global features in the horizontal and vertical directions with the multi-dimensional context information, sequentially performing batch normalization after a 1*1 convolution layer and a 3*3 depth separable convolution, and performing nonlinear transformation by using an activation function to generate intermediate features; after the intermediate features are split into two parts, one convolution layer is used to generate channel attention weights in the horizontal direction and channel attention weights in the vertical direction, the channel attention weights are normalized by a Sigmoid function; at the same time, the input feature map is compressed into a global feature vector by global average pooling, and a dynamic weight is generated by a fully connected layer and a Softmax function; the normalized horizontal channel attention weights, the vertical channel attention weights and the dynamic weight are concatenated to generate a new feature weight map. 4.The method of claim 3, wherein, Generating a dynamic weight by a fully connected layer and a Softmax function includes: 2.11) global feature vector extraction; the mean value of each channel is calculated by global average pooling to obtain a global feature vector v with a dimension of Cx1x1; 2.12) dimension mapping of the fully connected layer; the global feature vector v is input into the fully connected layer for feature transformation, the channel dimension C is mapped to the target weight dimension K, K corresponds to the number of attention branches to be balanced, and an intermediate feature z is generated; 2.13) Softmax normalization generates dynamic weights; apply the Softmax function to the fully connected layer output z to normalize to the [0, 1] interval, and the sum of all elements is 1, to get dynamic weights w dynamic . 5.The multi-class small target dangerous area intrusion detection method based on UAV aerial images of claim 4, wherein, The improved feature fusion module of step 3) includes: 3.1) Define two learning weight parameters and with initial value 1, allowing the network to dynamically adjust the weights according to feature importance during training, the weight parameters are initialized by: 3.2) Normalizing the weight parameters in the range of [0, 1], the normalized weight is , i is the serial number of the i-th learning weight parameter in w; 3.3) multiply the two input features and by the normalized weights and respectively, to achieve dynamic weighted fusion; the weighted features are represented as follows: ; 3.4) Concatenate the weighted features along the channel dimension to generate the fused feature output; the concatenation operation is represented as: ; where d represents the dimension of concatenation, torch.cat is a function in PyTorch for tensor concatenation, and dim is the specified dimension of concatenation. 6.The method of claim 5, wherein, The multi-scale dilated convolution attention mechanism in step 4) includes the following steps: 4.1) the input feature is decomposed into query Query, key Key and value Value three parts by a convolution layer qkv; a normalization layer LayerNorm is added by using a DilateBlock module for normalization processing of the input feature; 4.2) calculate the dilated attention of each head by the DilateAttention submodule: the DilateAttention submodule first extracts feature points in the local neighborhood from the input feature according to the set dilated rate and the convolution kernel size, the dilated rate includes dilated rates of different sizes; the feature points are selected by sparse selection, that is, only the key point positions of the domain feature expression are selected, not all pixels; then 3*3 depth separable convolution is performed on the selected Qurey, Key and Value of the feature points; the attention weight is calculated by the dot product of the Query and Key after the depth separable convolution, and is normalized by the Softmax function; the normalized attention weight is used for weighted summation of the value Value after the depth separable convolution to obtain the output feature of each position; 4.3) The DilationBlock module performs nonlinear transformation on the features through an MLP layer; the MLP layer is composed of two linear transformations, with an ELU activation function inserted between them; the DilationBlock module is configured with a random skip-connection regularizer after the MLP layer, which performs Bernoulli distribution sampling mask m e {0, 1} on the residual branch features F output by the MLP; in the training stage, the entire residual branch is suppressed in the form of mxF, and in the test stage, m is always 1, and the network restores full depth; 4.4) A normalization layer is added through the DilationBlock module to normalize the output of 4.3).
7. The multi-class small target dangerous area intrusion detection method based on UAV aerial images of claim 6, wherein, Step 6) The detection process is as follows: 6.1) Weight matching and intrusion target detection: apply the weights of the abnormal feature map obtained through learning in step 5) to the test set images in step 2); detect potential intrusion targets in the images through the Anchor-Free mechanism: the input image is divided into fixed-size grids, and each grid cell is responsible for detecting targets within it; the position of the target is represented by the center point coordinates; 6.2) Boundary box prediction: based on the feature map extracted by the YOLOv11 backbone network, the target boundary box is predicted for each grid cell through convolution operation, and the offset value of the boundary box is calculated, which is the offset of the center coordinates of the boundary box relative to the center coordinates of the grid cell; 6.3) Target class detection: based on the feature map extracted by the YOLOv11 backbone network, the target class identification task is completed through convolution operation, and in the process, the correlation probability between the target class in each grid cell and the known target class is calculated, and these probabilities are converted into an explicit probability distribution with the help of the softmax function; 6.4) Multi-dimensional adaptive NMS algorithm is used for screening: set a dynamic IoU threshold based on the target class; calculate the confidence score and position stability score of each predicted boundary box, the position stability score is obtained according to the position deviation of the current frame boundary box and the same target boundary box in the adjacent frame, the smaller the deviation, the higher the position stability score, the comprehensive score is obtained by weighting the confidence score and the position stability score, and the comprehensive score is sorted from high to low; remove the boundary box with IoU higher than the first threshold with the same target boundary box in the current frame, then remove the boundary box with IoU higher than the second threshold with the same target boundary box in the current frame among the boundary boxes in the high-risk area, and finally keep the boundary box with the highest comprehensive score as the final position of the intrusion target.
Citation Information
Cited By
Target identification method based on adaptive dynamic convolution feature extraction and detail enhancement
CN121884076A
Unmanned aerial vehicle tea tree disease detection method based on multidimensional receptive field attention
CN122024117A