Small target detection method under view angle of unmanned aerial vehicle based on SCGD-YOLO network
By improving the backbone, neck and detection head module of the SCGD-YOLO network, the problem of decreasing the accuracy of small target detection when drones are photographed at high altitudes is solved, and efficient and lightweight small target detection is achieved, which is suitable for drone viewing angle detection in complex environments.
Patent Information
- Application Number
- CN202510101054.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-02
AI Technical Summary
When drones take photos at high altitude, the resolution of small targets is low, and complex environmental interference leads to a decrease in detection accuracy. The existing target detection algorithms have shortcomings in small target detection.
Using a small object detection method from the perspective of the drone based on the SCGD-YOLO network, the lightweight Bottleneck module, a new feature pyramid structure and a lightweight detection head with shared convolution are introduced to reduce the amount of model parameters and calculations.
It improves the accuracy of small target detection of drones in complex environments, reduces the number of parameters and calculations of the model, and accelerates the detection speed and is suitable for real-time detection tasks.
Smart Images

Figure CN119919836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of small target detection under the perspective of an unmanned aerial vehicle (UAV), and in particular to a small target detection method under the perspective of an unmanned aerial vehicle (UAV) based on a SCGD-YOLO network. Background Art
[0002] Drones are widely used in remote sensing images, agricultural pest detection, disaster monitoring, industrial target detection and other fields. Drones have the characteristics of low cost, high flexibility and wide viewing angle, and can perform tasks such as monitoring, patrolling, target tracking, etc. However, many application scenarios involve the detection of small targets. On the one hand, due to the low resolution of small targets in the image and susceptibility to interference from complex environments, mutual occlusion between small targets and unstable shooting in high-altitude environments, it is extremely difficult to extract the features of small targets. On the other hand, most of the existing target detection algorithms are developed for the detection of targets of conventional sizes, and there are relatively few detection algorithms for specific scenarios of small targets.
[0003] Object detection is an important research direction in the field of computer vision, which aims to identify and locate objects from images or videos. The current object detection algorithms can be roughly divided into candidate region-based object detection algorithms and regression-based object detection algorithms; candidate region-based object detection algorithms include R-CNN, Faster R-CNN, Mask R-CNN, etc. At present, Faster R-CNN is a commonly used detection algorithm in object detection of deep learning methods, but its network parameters are large, the computational cost is high, and the reasoning speed is relatively slow, which is not suitable for real-time detection tasks. In order to solve the problem of slow reasoning speed, the YOLO series of algorithms came into being. This type of algorithm is a regression-based object detection algorithm. Since the selection of candidate boxes is cancelled, the object box and category prediction are directly generated in the original image, which simplifies the object detection process and pays more attention to speed and efficiency. Although the YOLO algorithm has a faster detection speed, it has a corresponding decrease in the detection of small targets from the perspective of drones due to the low target resolution. To this end, many studies in recent years have improved the detection accuracy of the model by introducing attention mechanisms, but this also makes the model parameters increase a lot, which makes it difficult to deploy the model later and affects its practicality in practical applications. Summary of the invention
[0004] The purpose of the present invention is to provide a small target detection method from the perspective of a drone based on the SCGD-YOLO network, and to solve the problem of reduced detection accuracy caused by low resolution of small targets and complex environmental interference when the drone is photographed at high altitude. In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0005] A small target detection method from the perspective of a drone based on the SCGD-YOLO network includes the following steps:
[0006] Step 1: Obtain an open source dataset of small targets from the perspective of a drone, and divide the dataset into a training set, a validation set, and a test set. The dataset contains ten categories, with small targets being the main category.
[0007] Preferably, the VisDrone 2019 dataset is used as the experimental dataset for training, verification, and testing. It collects objects photographed by drones in different positions, angles, and environments. It contains 10 categories, most of which are small targets. It is a dataset specifically used for small target detection.
[0008] Step 2: Configure the network environment required by the network model;
[0009] Preferably, the configured network environment is: Ubuntu 16.04LTS operating system, using a NVIDIA GTX3090 GPU network with 16GB video memory for experimental operation, using Python 3.8.16, Pytorch version 1.13.1 and torchvision 0.14.1.
[0010] Step 3: Build a SCGD-YOLO network model, which includes a backbone network, a neck network, and a detection head;
[0011] Preferably, the constructed SCGD-YOLO network model includes: the input image is first subjected to feature extraction by the backbone network, and the network gradually extracts low-level and high-level features of the image through convolutional layers, batch normalization and activation functions, and captures spatial information and semantic information in the image through multi-layer feature extraction; the extracted feature information is input into the neck network for feature fusion, and features of different layers are fused through the feature pyramid in the neck network; finally, the feature fusion information is sent to the detection head, the target information predicted by each network is output, and the category label, box coordinates and confidence of the output image are integrated.
[0012] Preferably, the SCGD-YOLO network model is improved based on YOLOv8 as the baseline model. First, the improved C2f-CAG and C2f-CFG modules are introduced into the backbone network and the neck network to replace the original C2f module. Secondly, the new feature pyramid structure SCOK is used to replace the feature pyramid of the original neck network. Finally, the decoupled head structure of the head network is replaced with a lightweight detection head LSDC containing shared convolution.
[0013] Preferably, in the improved C2f-CAG and C2f-CFG modules, the C2f-CAG structure introduces the CAFormer module in Transformer, the token mixer of the CAFormer module is a self-attention layer, and the Convolutional GLU gating mechanism in TransNext is used to replace the MLP layer in the CAFormer module. GLU controls the transmission of information flow in an adaptive manner, and uses convolution operations to replace traditional fully connected layers; the C2f-CFG structure introduces the ConvFormer module in Transformer, the token mixer of the ConvFormer module is a separable convolution, and the separable convolution is composed of depth-wise convolution and point-wise convolution. The depth convolution is used to extract spatial features, and the point-by-point convolution is used to extract channel features. At the same time, the Convolutional GLU gating mechanism is also used to replace the MLP layer in the ConvFormer module. The C2f-CAG and C2f-CFG modules are used in combination.
[0014] Preferably, the Convolutional GLU gating mechanism is a nonlinear activation function based on a gating mechanism, expressed as: GLU(x)=(W1x)⊙σ(W2x), wherein W1x is a linear transformation of the input as a feature extraction part, W2x is another linear transformation as a gating part, σ(·) is a sigmoid activation function, the output is controlled to be a gating between 0 and 1, and ⊙ represents element-wise multiplication.
[0015] Preferably, in the new feature pyramid SCOK, SPD-Conv is introduced to extract small target information. The SPD-Conv consists of a space-to-depth layer and a non-stepped convolution layer. SPD-Conv downsamples the feature map and retains all information in the channel dimension. The small target information in the SPD-Conv is spliced with the small target information in the feature layer, and then transmitted to the SPlit-Omni-Kernel module for feature fusion and output to the detection head for small target detection and positioning.
[0016] Preferably, the SPlit-Omni-Kernel module, according to the CSP residual idea, divides the input features into two branches, one of which is processed by the Omni-Kernel module, and the other remains unchanged, and finally reconstructs multi-scale information through feature cascading. The Omni-Kernel module includes a large branch, a global branch, and a local branch.
[0017] Preferably, in the shared convolution lightweight detection head LSDC, a 1×1 convolution is first used to adjust the number of channels, and then two 3×3 convolutions are used as shared weight convolutions to replace the original 12 3×3 convolutions for feature extraction. By introducing detail enhancement convolutions to capture small target information in the feature extraction stage, normalization is introduced in the 1×1 convolution, and normalization is introduced on the convolution of the feature extractor. The normalization process is derived as follows:
[0018]
[0019] Among them, N×C×H×W is the size of the defined input feature map x. The normalization method is: first, the number of channels is divided into multiple groups. Assuming that the number of channels is divided into G groups, each group contains C'=C / G. For the G groups, the mean μ is calculated for each group. g and variance in It is used to calculate the normalization of each channel in each group, normalize each element, and introduce a trainable scaling factor γ and offset β.
[0020] Preferably, the detail enhancement convolution includes five convolution layers deployed in parallel, including ordinary convolution, angular difference convolution, center difference convolution, horizontal difference convolution and vertical difference convolution, which are used to restore the spatial resolution of the image and enhance the details.
[0021] Step 4: Send the images and labels of the training data set to the constructed SCGD-YOLO network model for training, and adjust the corresponding hyperparameters according to the results of the validation set to obtain the best training results;
[0022] Preferably, the training method is as follows: no pre-trained model is used during the training process, the input size of the image is set to 640×640 pixels, 200 epochs are trained, the batch is set to 16, the initial learning rate is 0.01, and stochastic gradient descent (SGD) is used for parameter optimization, and the final weight file is saved after the training is completed.
[0023] Step 5: Send the images to be detected in the test set to the trained SCGD-YOLO network model for small target detection and output the detection results.
[0024] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0025] (1) Aiming at the weak small target detection capability of Bottleneck in the C2f module of the backbone network and the neck network in complex environments and the large number of parameters contained in its MLP, the present invention designs a new lightweight Bottleneck module, which reduces the number of parameters and computational complexity of the model while improving the network, thereby minimizing the delay overhead.
[0026] (2) The present invention designs a new feature pyramid module, which extracts small target information from the P2 feature layer and integrates the small target information with the P2 feature layer, thereby improving the feature fusion of different parts and the ability to capture small targets in UAV images. It can also maintain good detection accuracy in environments such as densely stacked vehicles and sunlight, and can improve the adaptability of UAVs in different environments.
[0027] (3) In view of the large number of parameters occupied by the decoupling head in the network model, a new detection head is designed. While retaining the decoupling head, a shared convolution module is introduced to reduce the number of parameters, and a detail enhancement convolution is introduced to improve the ability to capture small target information, so that the detection head can be lightweight while ensuring accuracy.
[0028] (4) The SCGD-YOLO algorithm proposed in the present invention has the characteristics of high precision, few parameters, and easy deployment, and has strong practicality and great application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0030] In the attached picture:
[0031] Figure 1 is an overall flow chart of an embodiment of the present invention;
[0032] Figure 2 An improved model diagram of an embodiment of the present invention;
[0033] Figure 3 Schematic diagram of the structure of C2f-CAG and C2f-CFG in an embodiment of the present invention;
[0034] Figure 4 It is a structural diagram of a new feature pyramid SCOK according to an embodiment of the present invention;
[0035] Figure 5 for Figure 4 The schematic diagram of the structure of the SPlit-Omni-Kernel module;
[0036] Figure 6 for Figure 5 The schematic diagram of the structure of the Omni-Kernel module;
[0037] Figure 7 It is a structural diagram of a shared weight detection head LSDC according to an embodiment of the present invention;
[0038] Figure 8 This is the detection effect diagram of the original model under the condition of densely stacked vehicles;
[0039] Fig. 9 This is a detection effect diagram of SCGD-YOLO in the case of densely stacked vehicles according to an embodiment of the present invention;
[0040] Fig.10 This is the detection effect diagram of the original model under sunlight;
[0041] Fig.11 This is a diagram showing the detection effect of SCGD-YOLO in a sunlight environment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Embodiments of the present invention are combined Figures 1 to 11 , specifically provides the following technical solutions: a small target detection method based on the SCGD-YOLO network from the perspective of the drone, combined with Figure 1 The specific steps include:
[0044] Step 1: Obtain an open source dataset of small targets from the perspective of drones on the Internet. This dataset contains ten categories, with small targets being the main category.
[0045] In this embodiment, the VisDrone 2019 dataset is used as an experimental dataset for training, verification, and testing. The dataset is collected by the AISKYEYE team of the Machine Learning and Data Mining Laboratory of Tianjin University. It collects objects photographed by drones in different positions, angles, and environments, including 10 categories. The training set accounts for 6471 pictures, the verification set accounts for 548 pictures, and the test set accounts for 1610 pictures. The ten categories of objects contained in the images are cars, pedestrians, bicycles, people, tricycles, trucks, convertible tricycles, buses, motorcycles, and trucks. Most of them are small targets, and it is a dataset specifically for small target detection.
[0046] Step 2: Configure the network environment required by the network model;
[0047] In this embodiment, the configured network environment is: Ubuntu 16.04LTS operating system, the network of NVIDIA GTX3090 GPU with 16GB video memory is used for experimental operation, and Python 3.8.16, Pytorch version 1.13.1 and torchvision 0.14.1 are used.
[0048] Step 3: Build the SCGD-YOLO network model. The SCGD-YOLO model is improved based on the YOLOv8 baseline model. The model includes a backbone network (Backbone), a neck network (Neck), and a detection head (Head). First, the improved C2f-CAG and C2f-CFG modules are introduced into the backbone network and the neck network to replace the original C2f module. Secondly, a new feature pyramid structure SCOK is designed to replace the feature pyramid of the original neck network. Finally, the decoupled head structure of the head network is replaced with a lightweight detection head LSDC containing shared convolutions.
[0049] In this embodiment, combined Figure 2 In the SCGD-YOLO network model diagram, the input image first passes through the backbone network for feature extraction. Through convolutional layers, batch normalization and activation functions, the network gradually extracts low-level and high-level features of the image. After multiple layers of feature extraction, the spatial information and semantic information in the image can be captured; then the extracted feature information is input into the neck network for feature fusion, and the features of different layers are fused through the feature pyramid in the neck network; finally, the feature fusion information is sent to the detection head, and the model will output the target information predicted by each network, and finally integrate the category label, box coordinates and confidence of the output image.
[0050] Furthermore, the present invention replaces the C2f modules in the backbone network and the main network with C2f-CAG and C2f-CFG modules. The structures of the two modules are as follows: Figure 3As shown in the figure, the C2f-CAG structure introduces the CAFormer module in Transformer. The token mixer of this module is a self-attention layer, which can more accurately distinguish which channels are more important in the feature extraction process, thereby dynamically adjusting the weight of each channel and improving the feature selection ability of the model. At the same time, the Convolutional The GLU gating mechanism replaces the MLP layer in the CAFormer module. GLU can control the transmission of information flow in an adaptive way, thereby enhancing the nonlinear expression ability of the model, and uses convolution operations to replace the traditional fully connected layer, thereby significantly reducing the number of model parameters and alleviating the computational burden. Similarly, the C2f-CFG structure introduces the ConvFormer module in the Transformer. The token mixer of this module is a separable convolution, which is composed of depth-wise convolution and point-wise convolution. The depth convolution is used to extract spatial features, and the point-by-point convolution is used to extract channel features, thereby reducing the amount of calculation and improving computational efficiency. At the same time, the above-mentioned GLU is also used to replace the MLP layer. The two modules of C2f-CAG and C2f-CFG are used together. Under the premise of ensuring that the detection accuracy is not reduced, the number of parameters is smaller and more lightweight.
[0051] For example, GLU is a nonlinear activation function based on a gating mechanism, and its expression is as follows:
[0052] GLU(x)=(W1x)⊙σ(W2x) (1)
[0053] Among them, W1x is the linear transformation of the input, which serves as the feature extraction part, W2x is another linear transformation, which serves as the gating part, σ(·) is the sigmoid activation function, and the output is controlled between 0 and 1. ⊙ represents element-wise multiplication.
[0054] Furthermore, in view of the poor extraction and fusion effect of small target information, a new feature pyramid structure SCOK is designed in the neck network. Figure 4 , Figure 4This is a schematic diagram of the structure of the new feature pyramid SCOK of the embodiment of the present invention. SPD-Conv consists of a space-to-depth layer and a non-stride convolution layer. Compared with the stride convolution layer and pooling layer in the CNN architecture, which will cause the loss of small target information, SPD-Conv downsamples the feature map but retains all the information in the channel dimension, so there will be no information loss. Therefore, SPD-Conv is introduced to extract small target information. After the small target information in SPD-Conv is integrated with the small target information in the P3 feature layer, considering that the feature information fusion is not sufficient, and processing all the small target information will greatly increase the number of parameters, the SPlit-Omni-Kernel module is designed, specifically combined with Figure 5 , Figure 5 for Figure 4 Schematic diagram of the structure of the SPlit-Omni-Kernel module. According to the CSP residual idea, the input features are divided into two branches, one of which is processed by the Omni-Kernel module, and the other remains unchanged. Finally, multi-scale information is reconstructed through feature cascading.
[0055] For example, the Omni-Kernel module is as follows: Figure 6 As shown in the figure, after the input feature map is processed by 1×1 convolution, it passes through large branches respectively, including 15×1 depth convolution, 15×15 depth convolution, and 1×15 depth convolution to capture small target information in different directions; the global branch is composed of a dual-domain channel attention module (DCAM) and a frequency-based spatial attention module (FSAM), and the dual-domain processing can make up for the global domain that cannot be covered by the large branch; the local branch adopts a simple 1×1 depth convolution layer to improve the utilization of feature information without increasing the complexity of the model. Finally, the results of these three branches are spliced with the feature map output by the 1×1 convolution on the input side and then processed by a 1×1 convolution. The value of the depth convolution K in the large branch affects the parameter quantity and accuracy of the model. Therefore, after testing, the present invention sets the value of K to 15 to achieve a balance between accuracy and parameter quantity.
[0056] In this embodiment, combined Figure 7 , replace the decoupled head structure of the head network with a lightweight detection head LSDC containing shared convolutions, such as Figure 7As shown in the figure. The detection head used in the original model is a decoupling head, which divides the target classification task and the bounding box regression task into two independent processes. This method can improve the feature extraction ability of the network to a certain extent. However, since each regression task requires two 3×3 convolutions to extract and process features, and a 1×1 convolution to adjust the bounding box and output the bounding box prediction information, and the network model needs to complete the detection of the feature layers of three scales, P3, P4, and P5, respectively, 12 3×3 convolutions and 6 1×1 convolutions are required, which greatly increases the number of parameters and the amount of calculation of the model. To solve this problem, two weight-sharing convolutions are used to replace 12 3×3 convolutions for image feature extraction. At the same time, considering that weight sharing can reduce the number of parameters and the amount of calculation, it will also lose some small target information, resulting in reduced accuracy. Therefore, detail enhancement convolution is introduced to capture small target information in the feature extraction stage to maintain the accuracy. Through a lot of research, it is found that the group normalization (GN) method has been proven to improve the classification and positioning accuracy of the detection head. Therefore, we try to introduce GN in the 1×1 convolution and the convolution of the feature extractor to compensate for the loss of accuracy. The process of GN is derived as follows:
[0057]
[0058]
[0059] In formulas (2) and (3), it is assumed that the size of the input feature map x is N×C×H×W. The GN method is to first divide the number of channels into multiple groups. Assuming that the number of channels is divided into G groups, each group contains C'=C / G. For these G groups, the mean μg and variance are calculated for each group. In formula (4), Calculate the normalization of each channel in each group. In formula (5), each element is normalized, and a trainable scaling factor γ and offset β are introduced to restore the expressive power of the model.
[0060] Step 4: Send the images and labels in the training data set to the network model for training, and adjust the corresponding hyperparameters according to the results of the validation set to obtain the best training results.
[0061] In this embodiment, the training method is as follows: no pre-trained model is used during the training process, the input size of the image is set to 640×640 pixels, 200 epochs are trained, the batch is set to 16, the initial learning rate is 0.01, and stochastic gradient descent (SGD) is used for parameter optimization, and the final weight file is saved after the training is completed.
[0062] Step 5: Send the images to be detected in the test set to the trained SCGD-YOLO model for small target detection.
[0063] In this embodiment, the ablation experiment results are analyzed below to verify the role of each module in the model. The ablation experiment results are shown in Table 1 below.
[0064] Table 1: Ablation experiment (√ means adding the module to the model)
[0065]
[0066]
[0067] For example, from the ablation experiment results in Table 1, it can be seen that compared with the baseline model YOLOv8s, after the introduction of the new feature pyramid network, the mAP50 and mAP50-95 of small target detection are improved by 2.9% and 2% respectively, and the number of parameters and the model size have increased to a certain extent, indicating that the feature pyramid for small targets can better capture the features of small targets to improve accuracy, but the introduction of more small target feature information causes the number of parameters and the model volume to increase.
[0068] Further, for the improvement of the C2f module in the YOLOv8 model, since the separable convolution is introduced in the C2f module of the neck network for lightweight, and the self-attention mechanism is used in the C2f module in the backbone network, after the introduction of the C2f-CAG and C2f-CFG modules, according to the experimental results, the average detection accuracy is very small, and the model parameters are reduced by 10.6%, and the model volume is reduced by 2.2MB. The improved LSDC detection head for the decoupling head of the benchmark model reduces the model parameters by 15.3%, the model volume is reduced by 1.7MB, and the mAP50 is only reduced by 0.1%, proving that the detection head has a lightweight effect. The modules proposed in the present invention are randomly combined, and the mAP50 and mAP50-95 of the model are improved, and the parameter amount is reduced compared with the benchmark model, but the introduction of small target feature information will cause the model volume to increase. Finally, the network model obtained by adding all modules has an mAP50 and mAP50-95 increase of 2.4% and 1.7% respectively, a parameter reduction of 27.5%, and a model size reduction of 4.3MB compared to the original baseline model, which is more conducive to deployment in drones and meets the small target detection task from the drone's perspective.
[0069] Preferably, in order to demonstrate the applicability of this type of algorithm in different scenarios, the TinyPerson dataset is selected for generalization experiments. The TinyPerson dataset is designed based on the detection of tiny targets at long distances and in large backgrounds. These images are collected from the Internet. The key feature of this dataset is that people are divided into two categories: sea personnel and land personnel. Sea personnel include people on boats, people lying in the water, etc., while land personnel include all other people. Most of the targets in this dataset are small targets, so it is used as a dataset for small target detection. The results of the generalization experiment are shown in Table 2 below.
[0070] Table 2: Generalization Experiment Results
[0071] Model P(%) R(%) mAP50(%) mAP50-95(%) Parameters(%) Model size / MB YOLOv8s 44.5 29.6 28.3 9.14 11.13 21.5 Ours 47.2 33.7 31.4 9.83 8.06 17.1
[0072] For example, from the generalization experiment results in Table 2, it can be seen that the precision (P), recall (R) and average precision (mAP50) of the improved model on the TinyPerson dataset are improved by 2.7%, 4.1% and 3.1% respectively compared with the baseline model, and the number of parameters is reduced by 27.6%, and the model size is reduced by 4.4MB, which fully verifies that the improved algorithm in this paper has good versatility and universality.
[0073] Preferably, this application will conduct two groups of comparative experiments. The first group is to compare the SCGD-YOLO algorithm in this paper with other algorithms in the YOLO series, and the second group is to compare it with other mainstream algorithms in the field of target detection in recent years. The results of the comparative tests are shown in Tables 3 and 4 below.
[0074] Table 3: Comparison test with YOLO series algorithms
[0075] Model P(%) R(%) mAP50(%) Parameters(M) YOLOv5s 42.5 31.9 31.0 7.04 YOLOv7-tiny 46.4 36.4 34.1 6.03 YOLOv7 51.3 42.0 39.6 36.53 YOLOv8s 50.3 38.3 39.1 11.13 YOLOv10s 50.2 38.7 39.4 7.22 YOLOv11s 49.7 37.9 38.6 9.42 Ours 53.7 39.5 41.5 8.06
[0076] For example, from the control experiment in Table 3, it can be seen that the SCGD-YOLO algorithm proposed in the present invention is significantly ahead of other YOLO series algorithms in terms of accuracy and average precision, and the model parameter amount is also relatively light in the YOLO series algorithms.
[0077] Table 4: Comparison test with other mainstream algorithms
[0078]
[0079] For example, from the control experiment in Table 4, it can be seen that the SCGD-YOLO algorithm proposed in the present invention is far ahead of other mainstream algorithms in terms of accuracy and average precision, and the number of parameters is much lower than that of other algorithms, which makes it more advantageous in model deployment.
[0080] In this embodiment, in order to demonstrate the effect achieved by the invention, Figure 8 , Fig. 9 , Fig.10 and Fig.11 Compare the detection graph of the improved model with the detection graph of the original model, as shown in Figure 8 As shown in Figure 2, in the case of densely packed vehicles, the original model can detect most of the vehicles and pedestrians, but the motorcycle and pedestrian at the lower right corner of the image cannot be identified because they only have half of the image. Fig. 9 As shown in Figure 2, the improved model can still identify the pedestrians and motorcycles that were missed in the lower right corner even in the case of dense vehicles; Fig.10 As shown in the figure, under sunlight, some information will be covered and difficult to extract. The original model can detect most vehicles and pedestrians, but the pedestrians in the upper left corner and right side of the picture cannot be identified due to sunlight and vehicle occlusion. Fig.11 As shown in the figure, the improved model can still identify pedestrians under sunlight and vehicle occlusion. The comparison chart shows that the improved model can still ensure better detection accuracy than the original model in different environments.
[0081] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0082] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A small target detection method from the perspective of a drone based on the SCGD-YOLO network, characterized by: The following steps are involved: Step 1: Obtain an open source dataset of small targets from the perspective of a drone, and divide the dataset into a training set, a validation set, and a test set. The dataset contains ten categories, with small targets being the main category. Step 2: Configure the network environment required by the network model; Step 3: Build a SCGD-YOLO network model, which includes a backbone network, a neck network, and a detection head; Step 4: Send the images and labels of the training data set to the constructed SCGD-YOLO network model for training, and adjust the corresponding hyperparameters according to the results of the validation set to obtain the best training results; Step 5: Send the images to be detected in the test set to the trained SCGD-YOLO network model for small target detection and output the detection results.
2. According to claim 1, a small target detection method based on the SCGD-YOLO network from the perspective of a drone is characterized by: The constructed SCGD-YOLO network model includes: the input image is first subjected to feature extraction by the backbone network, and the network gradually extracts low-level and high-level features of the image through convolutional layers, batch normalization and activation functions, and captures spatial information and semantic information in the image through multi-layer feature extraction; the extracted feature information is input into the neck network for feature fusion, and features of different layers are fused through the feature pyramid in the neck network; finally, the feature fusion information is sent to the detection head, the target information predicted by each network is output, and the category label, frame coordinates and confidence of the output image are integrated.
3. According to claim 1, a small target detection method based on the SCGD-YOLO network from the perspective of a drone is characterized by: The SCGD-YOLO network model is improved based on the YOLOv8 baseline model. First, the improved C2f-CAG and C2f-CFG modules are introduced into the backbone network and the neck network to replace the original C2f module. Secondly, the new feature pyramid structure SCOK is used to replace the feature pyramid of the original neck network. Finally, the decoupled head structure of the head network is replaced by a lightweight detection head LSDC containing shared convolution.
4. According to claim 3, a small target detection method based on the SCGD-YOLO network from the perspective of an unmanned aerial vehicle is characterized in that: In the improved C2f-CAG and C2f-CFG modules, the C2f-CAG structure introduces the CAFormer module in Transformer. The token mixer of the CAFormer module is a self-attention layer. The Convolutional GLU gating mechanism in TransNext is used to replace the MLP layer in the CAFormer module. GLU controls the transmission of information flow in an adaptive manner and uses convolution operations to replace traditional fully connected layers. The C2f-CFG structure introduces the ConvFormer module in Transformer. The token mixer of the ConvFormer module is a separable convolution, which is composed of depth-wise convolution and point-wise convolution. The depth-wise convolution is used to extract spatial features, and the point-by-point convolution is used to extract channel features. At the same time, the Convolutional GLU gating mechanism is also used to replace the MLP layer in the ConvFormer module. The C2f-CAG and C2f-CFG modules are used in combination.
5. According to claim 4, a small target detection method based on SCGD-YOLO network under the perspective of an unmanned aerial vehicle is characterized in that: The Convolutional GLU gating mechanism is a nonlinear activation function based on a gating mechanism, expressed as: GLU(x)=W1x)⊙σ(W2x), where W1x is a linear transformation of the input as a feature extraction part, W2x is another linear transformation as a gating part, σ(·) is a sigmoid activation function, and the output is controlled between 0 and 1. ⊙ represents element-wise multiplication.
6. According to claim 3, a small target detection method based on SCGD-YOLO network from the perspective of a drone is characterized by: In the new feature pyramid SCOK, SPD-Conv is introduced to extract small target information. The SPD-Conv consists of a space-to-depth layer and a non-stride convolution layer. SPD-Conv downsamples the feature map and retains all information in the channel dimension. The small target information in the SPD-Conv is concatenated with the small target information in the feature layer, and then transmitted to the SPlit-Omni-Kernel module for feature fusion and output to the detection head for small target detection and positioning.
7. The small target detection method based on the SCGD-YOLO network from the perspective of a drone according to claim 6, characterized in that: The SPlit-Omni-Kernel module, according to the CSP residual idea, divides the input features into two branches, one of which is processed by the Omni-Kernel module, and the other branch remains unchanged, and finally realizes the weighting of multi-scale information through feature cascading, and the Omni-Kernel module includes a large branch, a global branch, and a local branch.
8. The small target detection method based on the SCGD-YOLO network from the perspective of a drone according to claim 3, characterized in that: In the shared convolution lightweight detection head LSDC, 1×1 convolution is first used to adjust the number of channels, and then 2 3×3 convolutions are used as shared weight convolutions to replace the original 12 3×3 convolutions for feature extraction. By introducing detail enhancement convolution, small target information is captured in the feature extraction stage, and normalization is introduced in the 1×1 convolution, and normalization is introduced on the convolution of the feature extractor. The normalization process is derived as follows: Among them, N×C×H×W is the size of the defined input feature map x. The normalization method is: first, the number of channels is divided into multiple groups. Assuming that the number of channels is divided into G groups, each group contains C'=C / G. For the G groups, the mean μ is calculated for each group. g and variance in It is used to calculate the normalization of each channel in each group, normalize each element, and introduce a trainable scaling factor γ and offset β.
9. The small target detection method based on the SCGD-YOLO network from the perspective of a drone according to claim 8, characterized in that: The detail enhancement convolution includes five parallel deployed convolution layers, including ordinary convolution, angle difference convolution, center difference convolution, horizontal difference convolution and vertical difference convolution, which are used to restore the spatial resolution of the image and enhance the details.
10. The small target detection method based on the SCGD-YOLO network from the perspective of an unmanned aerial vehicle according to claim 1, characterized in that: The training method is as follows: no pre-trained model is used during the training process, parameters are optimized by using stochastic gradient descent, and the final weight file is saved after the training is completed.
Citation Information
Cited By
Soldering tin defect detection method and device, electronic equipment and storage medium
CN120411109A
Infrared small target detection method and system based on YOLOv8-SO algorithm
CN120747476A