An unmanned aerial vehicle target detection network method based on yolov7-tiny multi-model fusion
The UAV target detection network method based on Yolov7-tiny multi-model fusion introduces a small target detection layer, ASFF-L, and DCNS deformable convolution, which solves the problems of target detail loss and difficulty in small target detection in UAV images, and achieves more efficient target detection and tracking, improving detection accuracy and real-time performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGCHUN UNIV OF SCI & TECH
- Filing Date
- 2024-05-14
- Publication Date
- 2026-06-05
AI Technical Summary
Existing drone target detection algorithms face problems when processing drone images, such as loss of target details due to top-down perspective, difficulty in detecting small targets, high false detection rate, high false negative rate, and insufficient real-time performance, especially in complex scenarios where the detection effect is poor.
We adopt a UAV target detection network method based on Yolov7-tiny multi-model fusion. By introducing small and very small target detection layers, the spatial adaptive feature fusion module ASFF-L, and DCNS deformable convolution, we enhance feature extraction and detection capabilities.
It improves the accuracy and real-time performance of small target detection, reduces false positives and false negatives, and enhances the detection performance and robustness of the model in complex scenarios.
Smart Images

Figure CN118351294B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV image detection technology, specifically to a UAV ground target detection network method based on YOLOv7-tiny multi-model fusion. Background Technology
[0002] With the rapid development and popularization of drone technology, it has been widely applied in various fields, such as geographic reconnaissance, disaster monitoring, and agricultural plant protection. Drones can quickly obtain detailed information about the ground by capturing high-definition images through their onboard cameras. However, in practical applications, drone-based ground target detection faces many challenges, especially in complex scenarios with a large number of targets, overlapping targets, and small targets dominating the field. Traditional target detection algorithms often exhibit poor detection performance, high false positive and false negative rates.
[0003] To address these challenges, researchers have continuously explored and proposed new object detection algorithms. Deep learning-based object detection algorithms have made significant progress in this area. Compared to traditional methods, deep learning algorithms can automatically learn feature representations of targets and improve detection accuracy and speed through training on large-scale datasets. In the field of UAV ground target detection, the application of deep learning algorithms has become a research hotspot.
[0004] However, existing deep learning algorithms still face several challenges when processing drone images. First, the top-down perspective of drone images leads to a loss of target details, making feature extraction and recognition difficult. Second, the images contain numerous small targets with low pixel counts and resolutions, often obscured, making them difficult for traditional target detection algorithms to identify effectively. Furthermore, real-time performance is a crucial factor to consider for drone target detection algorithms, as drones need to acquire and process image data in real time during flight.
[0005] To address these challenges, researchers have proposed a series of deep learning-based UAV ground target detection algorithms. These algorithms have innovated and improved upon feature extraction, network structure, and training strategies. For example, they have introduced attention mechanisms to enhance the network's ability to focus on target features; employed multi-scale feature fusion to improve the detection performance of small targets; and optimized the network structure to reduce computational load and increase detection speed. These improvements have, to some extent, enhanced the accuracy and real-time performance of UAV ground target detection.
[0006] However, several issues remain to be addressed. First, how to further reduce the number of model parameters and computational load while maintaining detection accuracy to meet the real-time detection needs of edge devices such as drones. Second, how to more effectively address false positives and false negatives in small target detection, improving robustness and reliability. Furthermore, achieving more efficient target detection and tracking in complex real-world scenarios is also a key focus of current research.
[0007] Therefore, this invention aims to design a UAV ground target detection network method based on Yolov7-tiny multi-model fusion. By introducing small and very small target detection layers, a spatially adaptive feature fusion ASFF-L detection head, and DCNS deformable convolution, the accuracy and real-time performance of UAV ground target detection are improved. Furthermore, ablation experiments and comparative analysis are used to verify the effectiveness of the improved algorithm, providing a new solution to the challenges of UAV ground target detection. Summary of the Invention
[0008] (a) Technical problems to be solved
[0009] To address the shortcomings of existing technologies, this invention provides a UAV ground target detection network method based on Yolov7-tiny multi-model fusion, which solves the problems mentioned in the background.
[0010] (II) Technical Solution
[0011] To achieve the above objectives, the present invention specifically adopts the following technical solution:
[0012] A method for UAV ground target detection network based on Yolov7-tiny multi-model fusion includes the following steps:
[0013] S1. Construct a simplified YOLOv7-tiny network structure based on YOLOv7;
[0014] S2. Introduce a detection layer for small and extremely small targets;
[0015] S3. Introduce the DCNS deformable convolutional detection head in the small target detection layer;
[0016] S4. Introduce the adaptive feature fusion module ASFF-L in the feature fusion section;
[0017] S5. Conduct ablation experiments to verify the effectiveness of each step above and compare it with other algorithms to ensure that the improved model has improved performance.
[0018] Furthermore, in S1, the simplified improved YOLOV7-tiny network structure consists of four parts: Input, Backbone, Neck, and Head.
[0019] The S11 and Neck sections focus on the feature fusion network, which combines feature maps from different levels through upsampling and fusion operations to improve target detection performance.
[0020] S12. Utilize feature pyramid networks for multi-scale feature fusion to enhance the accuracy of target detection and the receptive field of targets at different scales;
[0021] S13. In the prediction head section, YOLOv7-tiny, compared to YOLOv7, adjusts the number of channels by using standard convolutional Conv and introduces the IDetect detection head. After detection, it outputs predicted features, resulting in the trained YOLOv7-tiny model.
[0022] Furthermore, in S2, when the small target detection layer performs prediction regression, the size of the anchor box is set to the size of the small target obtained after K-means clustering analysis of the dataset, which is more suitable for actual detection tasks.
[0023] Furthermore, in S3, the variable convolution module has multiple layers of deformable convolution and employs a modulation mechanism, as follows:
[0024] S31. Replace the 3×3 convolutional layer in the original module with deformable convolution. The deformable convolutional network learns deformation parameters and samples the positions of non-rectangular regions, thus enabling the model to better handle factors such as the appearance of the target.
[0025] S32. Design a modulation mechanism in a deformable convolutional module to enhance the deformable convolutional neural network's control over the spatial support region. This modulation mechanism allows the deformable convolutional neural network module to not only adjust the offset of the perceived input features but also adjust the amplitude of input features from different spatial locations. In extreme cases, the module can decide not to receive signals from a specific location by setting its feature amplitude to zero. The modulation mechanism can be calculated through the following process.
[0026] Given a convolution kernel function for K sample points, let ωk be the K positional weights and y be pre-specified offsets, where the input feature map x and output feature map y represent the features at position P, respectively. The modulated deformable convolution can be expressed as:
[0027]
[0028] in and These are the learnable offset and modulation scalar at the k-th position, respectively; modulation scalar Within the range [0,1], The value is a real number with no range constraints. To address the issue of introducing irrelevant regions during feature extraction, this paper adds not only an offset to each sampling point in DCNS but also a weight coefficient to distinguish whether the introduced region is a region of interest. If the region where the sampling point is located is an irrelevant region, the weight is learned to be 0. The specific formula is shown below.
[0029]
[0030] and The value is obtained by applying a separate convolutional layer to the same input feature map, which has the same spatial resolution as the current convolutional layer.
[0031] Furthermore, in S4, ASFF-L differs from previous multi-level feature fusion methods based on elements and / or cascades. Its core idea is to adaptively learn the spatial weights for feature map fusion at each scale. The AFSS-L model first generates feature maps at different scales (level 1-level 4) through FPN, and then fuses these level 1-level 4 scale maps into four corresponding scale feature maps. Taking ASFF-L4 as an example, the size of the feature maps at all four scales is first reset to the level 4 scale, and then a fusion weight is learned. This allows for better learning of the contribution of different feature scales to the predicted feature map. The fusion process is shown in formula (1), and then... Scaling to On the feature map, the feature vector at position (i,j) is denoted as Integrate the corresponding levels Features:
[0032]
[0033] It is the output feature map The (i,j)th vector; It is the four levels on the feature map relative to the level The spatial weights are adaptively learned by the network; It can be a simple scalar variable, shared across all channels, requiring... ∈[0,1].
[0034] Furthermore, the model training and testing in S5 includes the following steps:
[0035] S51. Design an improved YOLOv7-tiny model, including an input layer, a backbone network layer, and a head layer.
[0036] S52. The training set is fed into the input layer, where a mosaic preprocessing operation is performed on the input image to obtain a preprocessed image. This preprocessed image is then fed into the backbone network layer, where feature extraction is performed to extract target information of different sizes. The extracted features are fused in the head layer, resulting in large, medium, and small features based on their pixel proportions. These features are finally fed into the detection head, which outputs predicted features after detection, thus obtaining the trained YOLOv7-tiny model.
[0037] S53. Using mean accuracy (mAP), number of model parameters (Parameters / M), and computational cost (FLOPs / G) as evaluation metrics, we tested the impact of adding various methods to the original model on the model. In this experiment, we trained the model on the VisDrone2019 dataset for 200 epochs. Before training the input network, we adjusted the input images to 640×640 pixels. We conducted six sets of ablation experiments under the same experimental conditions for comparison.
[0038] (III) Beneficial Effects
[0039] Compared with existing technologies, this invention provides a UAV ground target detection network method based on Yolov7-tiny multi-model fusion, which has the following beneficial effects:
[0040] This invention improves the detection performance of small targets by adding small and very small target detection layers. Because the feature map resolution of shallow networks is relatively high, they are better able to capture detailed image features, resulting in more accurate localization of small targets. This solves the problem of inaccurate small target localization caused by the decrease in feature map resolution as network depth increases, better helping the model capture global information and contextual small target information, and enhancing the feature extraction capability for small targets.
[0041] This invention utilizes ASFF-L in the Detection part of the network model to address the issue of feature inconsistency between different layers when an image contains both large and small targets. Unlike previous multi-level feature fusion methods based on element-wise sums or concatenation, ASFF-L's core idea is to adaptively learn the spatial weights for feature mapping fusion at various scales. This adaptive spatial feature fusion learns a method to spatially filter conflicting information to suppress inconsistencies, thereby improving the invariance of feature scales and enhancing the stability and reliability of model features at different scales after the addition of a detection layer.
[0042] This invention introduces a DCNS module as a detection head in the neck part of the network. This module can sample non-rectangular regions, allowing the model to better handle factors such as the appearance of the target. Analysis of its adaptive behavior reveals that while the spatial support of the neural network better conforms to the object structure than conventional convolutional neural networks, this support may extend far beyond the region of interest, making the features susceptible to the influence of image background information. To address this issue, this paper introduces a deformable convolutional neural network structure. By improving modeling capabilities and enhancing training, the performance of the receptive field in relevant regions is improved, enabling the model to fit the region of interest more efficiently, thereby reducing the influence of background information on the target features. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the process of the present invention;
[0044] Figure 2 This is a schematic diagram of the YOLO-DA network model structure of the present invention;
[0045] Figure 3 This is a schematic diagram of the feature extraction network model structure after adding a small target size in this invention;
[0046] Figure 4 This is a schematic diagram of the AFSS-L network model structure of the present invention;
[0047] Figure 5 This is a schematic diagram illustrating the specific parameter configuration of the model training environment for this invention;
[0048] Figure 6 This is a schematic diagram showing the comparison of ablation experiments under the same conditions according to the present invention;
[0049] Figure 7 This is a schematic diagram of a comparative experiment of different detection algorithms of the present invention;
[0050] Figure 8 This is a schematic diagram comparing the nighttime small target detection performance of the present invention;
[0051] Figure 9 This is a schematic diagram comparing the occlusion target detection effects of the present invention;
[0052] Figure 10 This is a schematic diagram comparing the dense target detection performance of the present invention;
[0053] Figure 11 This is a schematic diagram comparing the blurry target detection effects of the present invention;
[0054] Figure 12 This is a schematic diagram comparing the detection performance of extremely small targets according to the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] Example
[0057] like Figure 1-12 As shown, an embodiment of the present invention proposes a UAV ground target detection network method based on Yolov7-tiny multi-model fusion, which includes the following steps:
[0058] like Figure 2 As shown, S1 constructs an improved YOLOv7-tiny network structure based on YOLOv7 with a simplified network architecture. The improvements are mainly in the feature extraction and prediction head parts. In the model's Neck part, the large target detection layer is removed, and P2 and P3 small and micro-target detection layers are inserted, along with an additional detection head to improve the detection performance of small targets. An improved DCNS module is introduced into the newly added P2 and P3 prediction heads. This improved model not only better adapts to the geometric transformations of targets but also extends deformable convolution to enhance modeling capabilities. By adding a weighted penalty, the network helps identify the target's location region, improving feature extraction capabilities. To address the issue of large scale changes in UAV images, an improved ASFF adaptive spatial feature fusion module is introduced, which can better suppress inconsistencies in conflicting information, thereby improving the scale invariance of features.
[0059] like Figure 3 As shown, S2 introduces a detection layer specifically for small and extremely small targets. While the original feature extraction network model is effective for targets of normal scale, the limited target size due to the high altitude of UAVs leads to incomplete detection of small target features. To address these issues, this invention reconstructs and improves the original network detection layer. The improved method is as follows: Figure 3 As shown in the diagram, the Neck section is first modified from a two-step downsampling structure to a three-step downsampling structure, introducing two layers for small and tiny object detection, while removing the maximal object detection layer from the original network. A detection layer structure specifically designed for small objects is then implemented. The optimized object detection layer can better help the model capture global information and contextual information about small objects, enhancing its feature extraction capability for small objects.
[0060] S3. Constructing an integrated DCNS deformable convolutional module: Geometric deformation caused by scale, pose, viewpoint, and some deformation factors is a major challenge in small object detection. This invention introduces a DCNS module as a detection head in the neck part of the network. It can sample non-rectangular regions, allowing the model to better handle factors such as object appearance. Through research on its adaptive behavior, it is found that although the spatial support of the neural network is more consistent with the object structure than that of a conventional convolutional neural network, this support may extend far beyond the region of interest, causing features to be affected by image background information. To solve this problem, this invention introduces a deformable convolutional neural network structure, which improves the performance of the receptive field in the relevant region by enhancing modeling ability and stronger training. By more comprehensively integrating deformable convolutions within the network and introducing a modulation mechanism that extends the deformation modeling range, the modeling ability is enhanced, enabling the model to fit the region of interest more efficiently.
[0061] This invention improves the deformable convolutional module in two ways: First, it enhances the network's modeling capabilities. This is achieved by expanding the use of more deformable convolutional layers in the module, replacing the original 3×3 convolutional layers with deformable convolutions. Second, it adds a modulation mechanism to the deformable convolutional module to enhance the deformable convolutional neural network's control over its spatial support region. Using this method, the deformable convolutional neural network module can not only adjust the offset of perceived input features but also adjust the amplitude of input features from different spatial locations. In extreme cases, the module can decide not to receive signals from a specific location by setting its feature amplitude to zero. Since the image content from the corresponding spatial location will be greatly reduced or have no impact on the module's output, the modulation mechanism provides the network module with another dimension of freedom to adjust its spatial support region.
[0062] Given a convolution kernel with K sampling positions, let ωk and Pk represent the weight and pre-specified offset at the Kth position, respectively. The modulated deformable convolution can be represented as:
[0063]
[0064] Where Δpk and Δmk are the learnable offset and modulation scalar at the k-th position, respectively. The modulation scalar Δmk is in the range [0,1], and Δpk is a real number with no range constraints.
[0065] To address the issue of introducing irrelevant regions, DCNS not only adds an offset to each sampling point but also a weight coefficient to distinguish whether the introduced region is of interest. If the region at a sampling point is not of interest, the weight is learned to be 0. The specific formula is as follows:
[0066]
[0067] The values of △Pk and △mk are obtained by applying a separate convolutional layer to the same input feature map, which has the same characteristics as...
[0068] The current convolutional layers maintain the same spatial resolution. Through the improvements above, when dealing with the receptive field of small objects, DCNS's sampling range is too large. Besides the small object we are interested in, it includes other irrelevant parts. The purpose of deformable convolution is to utilize spatial redundancy and perform tasks such as classification based on the correlation of local spaces. The previous module's excessive offset negatively impacted performance, while the improved DCNS effectively controls the offset, avoiding the extraction of irrelevant features and better showcasing the model's expressive power.
[0069] like Figure 4 As shown, S4 is a detection head that integrates adaptive spatial feature fusion (ASFF-L). Conical feature representation is a common method for addressing scale variation issues in object detection. However, inconsistencies between different feature scales are a major limitation of single-shot detection based on feature pyramids. This invention employs a novel four-detector-head data-driven pyramid feature fusion strategy called Adaptive Spatial Feature Fusion (ASFF-L). It learns spatial filtering methods to suppress inconsistencies, thereby improving feature scale invariance with almost no increase in computation.
[0070] This invention uses ASFF-L in the Detection part of the improved network model to address the feature inconsistency between different layers when an image contains both large and small targets. Unlike previous multi-level feature fusion methods based on element-wise sums or concatenation, ASFF-L's core idea is to adaptively learn the spatial weights for feature map fusion at each scale. First, feature maps at different scales (levels 1-4) are generated using FPN. Then, ASFF-L (adaptively spatial feature fusion large) is used for fusion. The idea is to fuse the level 1-level 4 scale maps into four corresponding scale feature maps, with the fusion weights adaptively adjusted. Taking ASFF-3 as an example, the maps at all three scales are first resized to the level 3 scale, and then a fusion weight is learned. This allows for a better understanding of the contribution of different feature scales to the predicted feature map. Specifically... Figure 4 As shown.
[0071] In ASFF, gradients are calculated in the following way:
[0072]
[0073] in , , , [0,1]. Since the above coefficients can be learned through backpropagation of the network, they can often produce effective coefficients.
[0074] S5. Conduct ablation experiments to verify the effectiveness of each improvement step and compare with other algorithms to ensure that the improved model has improved performance; the specific parameter configuration of the experimental environment for training the model of this invention is as follows: Figure 5 As shown, the dataset used in this invention is the VisDrone2019 dataset, which was jointly collected by the AISKYEYE team of the Machine Learning and Data Mining Laboratory at Tianjin University. VisDrone2019, as a drone aerial photography dataset, is designed for complex environments and is captured by various drone cameras, featuring wide coverage, numerous scenes, and diverse categories.
[0075] The experiments in this invention use precision (P), recall (R), mean average precision (mAP), number of model parameters (Params), computational complexity (FLOPs), and frames per second (FPS) as the main evaluation metrics. Among these, multi-class mean precision (mAP) is an important metric for evaluating the algorithm, used to assess the overall performance of the detection algorithm for target classification.
[0076] The main indicator calculation formulas are as follows:
[0077]
[0078] To verify the effectiveness of the proposed YOLO-DA algorithm, ablation experiments were conducted on the proposed small object detection layer, ASFF-L feature fusion module, and DCN convolution. Average precision (mAP), number of model parameters (Parameters / M), and computational cost (FLOPs / G) were used as evaluation metrics to examine the impact of adding various methods to the original model. The experiments were conducted on the VisDrone2019 dataset, trained for 200 epochs, and the input images were resized to 640×640 before training. Six sets of ablation experiments were performed under identical experimental conditions for comparison. The results after training are shown below. Figure 6 As shown.
[0079] To verify the effectiveness of the proposed algorithm, a comparative experiment was conducted on the VisDrone2019 dataset, comparing the proposed algorithm with current mainstream algorithms. The input images were adjusted to 640×640 pixels, and 200 epochs of training were performed, as detailed in Figure 7. The selected mainstream algorithms included DroneEye2020, Cascade R-CNN, DMNet, CenterNet, DSM-YOLOv5, and other drone aerial target detection algorithms for comparison.
[0080] S6. To verify the effectiveness of the YOLO-DA algorithm in this invention on the UAV small target dataset, UAV images in complex scenes from the VisDrone 2019 test set were selected for testing. The detection results are as follows: Figure 8 , Figure 9 , Figure 10 , Figure 11 , Figure 12 As shown, the left side shows the detection effect of YOLOv7-tiny, and the right side shows the detection effect of the YOLO-DA algorithm of this invention.
[0081] like Figure 8 As shown, the ASFF-L adaptive multi-scale fusion module used in this invention demonstrates the learning effect of different feature scales on the predicted feature map.
[0082] like Figure 9 , Figure 11 As shown, this invention demonstrates the detection performance of occluded targets and blurred targets under motion conditions after adding the DCN deformable convolution module. It has a very good effect on targets with incomplete occlusion information features and blurred or deformed targets.
[0083] like Figure 10 , Figure 12 As shown, this invention, after adding small target and extremely small target detection layers, can perform better classification and localization for dense small target detection, and also significantly improves the detection effect of dense small targets.
[0084] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for UAV ground target detection network based on Yolov7-tiny multi-model fusion, characterized in that, Includes the following steps: S1. Construct a simplified YOLOv7-tiny network structure based on YOLOv7; the improved network structure is mainly improved in the feature extraction part and the prediction head part. S2. Introduce detection layers for small and extremely small targets; remove the large target detection layer in the Neck part of the model, insert P2 and P3 small and extremely small target detection layers, and add a detection head to improve the detection performance of small targets; S3. Introduce the DCNS deformable convolutional detection head in the small target detection layer; introduce the improved DCNS module in the newly added P2 and P3 prediction head parts; S4. Introduce the adaptive feature fusion module ASFF-L in the feature fusion section; introduce the improved ASFF-L adaptive spatial feature fusion module in the Head header; In S4, ASFF-L differs from previous multi-level feature fusion methods based on element-wise concatenation or cascading. Its core idea is to adaptively learn the spatial weights for feature map fusion at each scale. The ASFF-L model first generates feature maps at different scales (levels 1-4) through FPN, then fuses these level 1-level 4 maps into four corresponding scale feature maps. The adaptive feature fusion module, ASFF-L4, first resets the size of all four scale feature maps to the level 4 scale, and then learns a fusion weight. This allows for a better understanding of the contribution of different feature scales to the predicted feature map. The fusion process is shown in the formula, and then... Scaling to On the feature map, the feature vector at position (i,j) is denoted as Integrate the corresponding levels Features: ; It is the output feature map The (i,j)th vector; It is the four levels on the feature map relative to the level The spatial weights are adaptively learned by the network; It is a simple scalar variable, shared across all channels, requiring... ∈[0,1]; S5. Conduct ablation experiments to verify the effectiveness of each of the above steps and ensure that the improved model has improved performance.
2. The UAV ground target detection network method based on Yolov7-tiny multi-model fusion according to claim 1, characterized in that: In S1, the simplified improved YOLOV7-tiny network structure consists of four parts: Input, Backbone, Neck, and Head. The S11 and Neck sections focus on the feature fusion network, which combines feature maps from different levels through upsampling and fusion operations to improve target detection performance. S12. Utilize feature pyramid networks for multi-scale feature fusion to enhance the accuracy of target detection and the receptive field of targets at different scales; S13. In the prediction head part, YOLOv7-tiny, compared with YOLOv7, adjusts the number of channels by using standard convolution Conv and introduces the IDetect detection head. After detection, it outputs predicted features to obtain the trained YOLOv7-tiny model.
3. The UAV ground target detection network method based on Yolov7-tiny multi-model fusion according to claim 1, characterized in that: In S2, when the small target detection layer performs prediction regression, the anchor box size is set to the small target size obtained after K-means clustering analysis of the dataset, which is more suitable for actual detection tasks.
4. The UAV ground target detection network method based on Yolov7-tiny multi-model fusion according to claim 1, characterized in that: In S3, the variable convolution module has multiple layers of deformable convolution and employs a modulation mechanism, as follows: S31. Replace the 3×3 convolutional layer in the original module with deformable convolution. The deformable convolutional network learns deformation parameters and samples the positions of non-rectangular regions, thus enabling the model to better handle factors such as the appearance of the target. S32. Design a modulation mechanism in a deformable convolutional module to enhance the control capability of the deformable convolutional neural network over the spatial support region. This modulation mechanism enables the deformable convolutional neural network module to adjust not only the offset of the perceived input features, but also the amplitude of the input features from different spatial locations. In extreme cases, the module decides not to receive signals from specific locations by setting its feature amplitude to zero. The modulation mechanism can be calculated through the following process. Given a convolution kernel function with K sample points, let ωk be the weights at the K locations. It is a pre-specified offset, where the input feature map x and the output feature map y represent the features at position P, respectively. The modulated deformable convolution is represented as: ; in and These are the learnable offset and modulation scalar at the k-th position, respectively; modulation scalar Within the range [0,1], The value is a real number with no range constraints. To address the issue of introducing irrelevant regions during feature extraction, this paper adds not only an offset to each sampling point in DCNS but also a weight coefficient to distinguish whether the introduced region is a region of interest. If the region where the sampling point is located is an irrelevant region, the weight is learned to be 0. The specific formula is shown below. ; and The value is obtained by applying a separate convolutional layer to the same input feature map. This represents the sum of the elements participating in the operation within the convolutional layer, used to perform a normalized average of the operation results on the feature map; this convolutional layer has the same spatial resolution as the current convolutional layer.
5. The UAV ground target detection network method based on Yolov7-tiny multi-model fusion according to claim 1, characterized in that: The model training and testing in S5 includes the following steps: S51. Design an improved YOLOv7-tiny model, including an input layer, a backbone network layer, and a head layer. S52. The training set is fed into the input layer, where a mosaic preprocessing operation is performed on the input image to obtain a preprocessed image. This preprocessed image is then fed into the backbone network layer, where feature extraction is performed to extract target information of different sizes. The extracted features are fused in the head layer, resulting in large, medium, and small features based on their pixel proportions. These features are finally fed into the detection head, which outputs predicted features after detection, thus obtaining the trained YOLOv7-tiny model. S53. Using mean accuracy (mAP), number of model parameters (Parameters / M), and computational complexity (FLOPs / G) as evaluation metrics, we examined the impact of adding various methods to the original model on the model. In this experiment, we trained the model on the VisDrone2019 dataset for 200 epochs. Before training the input network, we adjusted all input images to 640×640 pixels. We conducted six sets of ablation experiments under the same experimental conditions for comparison.