Lightweight UAV image target detection method and system based on wavelet convolution
By introducing wavelet convolutional layer and lightweight adaptive feature extraction module into the YOLOv8 algorithm, the problem of high computational cost in resource-constrained environments is solved, and more efficient and accurate object detection is achieved, especially in complex scenarios.
Patent Information
- Application Number
- CN202411751467.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-04
AI Technical Summary
The existing YOLOv8 algorithm has high computational cost in resource-constrained environments, which affects detection accuracy, especially in complex scenarios.
The lightweight drone image object detection algorithm based on wavelet convolution is adopted. By designing the wavelet convolution layer (WTConv) and the lightweight adaptive feature extraction module (LAE), the number of parameters and calculation amount are reduced, while retaining multi-scale feature information.
It significantly reduces computing costs, improves detection efficiency and accuracy, and performs well in complex scenarios, and is suitable for resource-constrained application scenarios.
Smart Images

Figure CN119762747A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a lightweight unmanned aerial vehicle image target detection algorithm and system based on wavelet convolution. Background Art
[0002] Object detection is a key task in the field of computer vision and is widely used in scenarios such as autonomous driving, monitoring systems, and drone vision. The YOLO (You Only Look Once) series of algorithms have attracted much attention due to their excellent real-time and high efficiency. Among them, the YOLOv8 algorithm, as the latest version of the YOLO series, uses a series of advanced feature extraction and convolution operation technologies to improve the accuracy and speed of object detection.
[0003] Although YOLOv8 performs well in detection performance, its complex network structure and large number of parameters lead to high computational costs. This makes it challenging to apply YOLOv8 in resource-constrained environments (such as mobile devices and embedded systems). Existing convolution operations, especially standard convolution and deep network structures, often require high computing power and storage space, which puts great pressure on device performance and energy consumption.
[0004] In order to improve the computational efficiency of the YOLOv8 algorithm, researchers have proposed a variety of lightweight network architectures, but most methods still have an impact on detection accuracy. In addition, the existing lightweight models' strategies for feature extraction and information fusion often fail to fully utilize the information of multi-scale features, resulting in insufficient target detection performance in complex scenarios.
[0005] Therefore, there is an urgent need for a new lightweight target detection algorithm that can maintain efficient detection speed while improving the accuracy of target detection, especially in resource-constrained application scenarios. The improved scheme of the present invention can significantly reduce the computing cost to meet end-to-end industrial deployment, thereby enhancing the applicability and practical value of the algorithm. Summary of the invention
[0006] The purpose of the present invention is to provide a lightweight UAV image target detection algorithm and system based on wavelet convolution to reduce the computational cost and improve the detection efficiency and accuracy.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] In a first aspect, the present invention provides a method for constructing an image object detection model, comprising the following steps:
[0009] Step 1, constructing a backbone network, wherein the backbone network includes layers 0 to 9 connected in sequence;
[0010] Layer 0: Conv module, where the input image size is 640*640*3, the convolution kernel size k=3, the number of convolution kernels is 64, the step size stride=2, and the output feature map size is 320*320*64*w;
[0011] Layer 1: LAE module, where the convolution kernel size k = 3, stride = 2, the number of convolution kernels is 128, and the output feature map size is 320*320*128*w;
[0012] Layer 2: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 160*160*128*w;
[0013] Layer 3: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 80*80*256*w;
[0014] Layer 4: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 80*80*256*w;
[0015] Layer 5: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 40*40*512*w;
[0016] Layer 6: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 40*40*512*w;
[0017] Layer 7: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 20*20*1024*w;
[0018] Layer 8: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 20*20*1024*w;
[0019] Layer 9: SPPF module, where the pooling kernel size k=5 and the output feature map size 20*20*1024*w;
[0020] Step 2, constructing a neck network, wherein the neck network includes the 10th to 21st layers;
[0021] Layer 10: Upsample module, scale factor scale_factor = 2, upsampling algorithm is nearest neighbor interpolation, output feature map size 40*40*1024*w;
[0022] Layer 11: Concat module, which takes the output of layers 10 and 6 as the input of this layer. The concatenation dimension is 1, and the output feature map size is 40*40*1536*w;
[0023] Layer 12, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 40*40*512*w;
[0024] Layer 13, Upsample module, scale factor scale_factor = 2, upsampling algorithm is nearest neighbor interpolation, output feature map size 80*80*512*w;
[0025] The 14th layer, Concat module, takes the output of the 13th and 4th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 80*80*768*w;
[0026] Layer 15, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 80*80*256*w;
[0027] Layer 16, LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 40*40*256*w;
[0028] The 17th layer, Concat module, takes the output of the 16th and 12th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 40*40*768*w;
[0029] Layer 18, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 40*40*512*w;
[0030] Layer 19, LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 20*20*512*w;
[0031] The 20th layer, Concat module, takes the output of the 19th and 9th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 20*20*1536*w;
[0032] Layer 21, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 20*20*1024*w;
[0033] Step 3, constructing a detection head, wherein the detection head includes the 22nd to 24th layers;
[0034] The 22nd, 23rd, and 24th layers are all Detect modules, where the Conv parameters are convolution kernel size k=3, stride=1, and padding=1; the Conv2d parameters are convolution kernel size k=1, stride=1, and padding=0; the outputs of the 15th, 18th, and 21st layers of the neck network are used as the inputs of the 22nd, 23rd, and 24th layers of the Head, respectively.
[0035] Furthermore, the LAE module includes an adaptive feature extraction module and a lightweight feature extraction module. The adaptive feature extraction module extracts global features from the input of the LAE module through an average pooling layer, then uses convolution to generate channel weights, uses a five-dimensional recombination module to reorganize and dimensionally adjust the input feature map, and normalizes it through a Softmax function; the lightweight feature extraction module uses convolution to reduce the dimensionality of the feature map on the input of the LAE module, and uses a five-dimensional recombination module to map the height and width information of the input feature map to the channel dimension; the output of the lightweight feature extraction module and the output of the adaptive feature extraction module are multiplied together as the output of the LAE module.
[0036] Furthermore, the C2f_WTConv module includes a 1x1 convolutional layer, a Split, multiple Bottleneck modules, a Concat module and a 1x1 convolutional layer connected in sequence, wherein the output of the first convolutional layer, the output of the Split, and the output of each Bottleneck module are commonly connected to the input of the Concat module.
[0037] In a second aspect, the present invention provides a lightweight UAV image target detection method based on wavelet convolution, comprising the following steps:
[0038] Step 1: construct the experimental data set and divide it into training set, validation set and test set after preprocessing;
[0039] Step 2, training the model constructed by the method for constructing the image target detection model provided in the first aspect of the present invention to obtain a trained image target detection model;
[0040] Step 3: Preprocess the test set and input it into the trained image target detection model to output the target detection results.
[0041] Furthermore, during the training process of step 2, the image size of the input model is set to 640 pixels × 640 pixels, the training batch size is 16, the number of training rounds is 200, and the initial learning rate is 0.01.
[0042] The third invention, the present invention provides a lightweight UAV image target detection system based on wavelet convolution, comprising the following modules:
[0043] The experimental data set construction module is used to construct the experimental data set, which is divided into training set, validation set and test set after preprocessing;
[0044] A training module, used to train the model constructed by the method for constructing an image target detection model provided by the first aspect of the present invention by using a training link to obtain a trained image target detection model;
[0045] The target detection module is used to pre-process the test set and input it into the trained image target detection model to output the target detection results.
[0046] The present invention takes the traditional YOLOv8 algorithm as the baseline model, proposes a wavelet convolution layer (WTConv), and uses wavelet transform to solve the over-parameterization problem encountered by convolutional neural network (CNN) when realizing a large receptive field; proposes a lightweight adaptive feature extraction (LAE) module to extract important information from the input feature map, and weights the features according to the adaptive attention mechanism to improve the model's detection performance for the target area, which has the following advantages:
[0047] (1) Multi-scale feature extraction: Compared with traditional convolutional methods, LAE significantly reduces the number of parameters and computation while retaining rich semantic information.
[0048] (2) Adaptive Feature Extraction: LAE reduces the impact of noise by retaining more contextual information and high-resolution details in multi-scale feature maps. It combines global information from different locations through adaptive weights, making the model's attention more focused on the target area. This method converts the dimension of the feature map from four dimensions (batch, channel, height, width) to five dimensions (batch, channel, height, width, sampling factor), thereby retaining more information.
[0049] (3) Reduce computational cost: The LAE module uses grouped convolution to map input to output, and adopts N groups of grouped convolution to reduce the number of parameters to 1 / N of traditional convolution. In this way, LAE achieves four times downsampling while retaining important information about image edges and corners.
[0050] (4) Fusion of global and local information: During the downsampling process, LAE retains the global information and promotes the transition from high-resolution information to low-resolution information, enabling the model to better identify the target area.
[0051] (5) Larger receptive field: The C2f module of YOLOv8 usually relies on the local receptive field to extract detailed features, while C2f_WTConv can obtain a receptive field close to the global one, which helps to better capture the shape and global context information of the target.
[0052] (6) Enhanced low-frequency response: C2f_WTConv can improve the ability to understand shapes while maintaining sensitivity to high-frequency textures. It is suitable for target detection in scenes with occluded targets, complex backgrounds, or low resolution.
[0053] (7) Multi-frequency feature fusion: C2f_WTConv can more efficiently establish connections between multi-scale features, and is particularly suitable for processing small targets and complex background scenes.
[0054] (8) Parameter and computational overhead optimization: Compared with the method of using large kernel convolution to directly increase the receptive field, C2f_WTConv significantly reduces the number of parameters and computational overhead (such as reducing FLOPs), which is very suitable for the design requirements of lightweight models.
[0055] In general, the method and system of the present invention provide a more efficient, robust and easy-to-integrate target detection solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is the traditional YOLOv8 network structure;
[0057] Figure 2 It is a schematic diagram of the network structure of the image target detection model constructed by the present invention;
[0058] Figure 3 These are the experimental data results and training indicators of the LAEWT-YOLO model.
[0059] The present invention is further explained below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0060] 1. Build an image object detection model
[0061] YOLOv8 is a deep learning target detection algorithm released by Ultralytics in 2023. It draws on the advantages of previous versions such as YOLOv5 and YOLOv7 and has excellent performance. The model network structure of YOLOv8 is as follows Figure 1As shown in the figure, it mainly consists of four parts: input, backbone network, neck network and detection head. Among them, Input preprocesses the image input to the network and improves the image processing efficiency through adaptive scaling. Backbone consists of Conv, C2f and SPPF modules, which are used to extract feature information from the input image. C2f includes 2 Conv and n Bottleneck to extract richer gradient information; SPPF includes 3 consecutive maximum pooling operations to capture object information at different scales to improve the accuracy of target detection. The Neck part is composed of PAN (path aggregation network) and FPN (feature pyramid network) structures, which are used to fuse feature maps from different layers and scales, ensuring the feature extraction ability of the model in multi-scale scenarios. Head adopts a decoupled head structure and an anchor-free strategy. A total of 3 decoupled heads are used to complete image detection and classification tasks at different scales, and finally output the target category and detection frame position information.
[0062] Aiming at the problems of low small target detection accuracy, large model parameters, and difficult model deployment in drone images, this paper proposes the LAEWT-YOLO model based on YOLOv8n, designs a lightweight adaptive feature extraction (LAE) module to achieve multi-scale and adaptive feature extraction; designs a WTConv based on wavelet transform to provide a more efficient, robust and easy-to-integrate convolutional layer solution, solves the parameter expansion problem of CNN in the expansion of receptive field, and achieves a considerable lightweight effect. The overall structure of the model is as follows: Figure 2 shown.
[0063] 1. Design lightweight adaptive feature extraction module (LAE)
[0064] As the number of convolutional neural network layers increases, frequent convolution operations will map the feature information of all channels. The target features have similarities between different channels, resulting in deep feature maps containing a lot of repeated information, feature map information redundancy, and excessive model parameters. In order to design a low-latency, high-throughput, fast and efficient target detection model, the present invention proposes an LAE module that can simultaneously reduce redundant calculations and memory accesses, effectively extract spatial features, and improve the problem of low floating point operations (FLOPs) efficiency. The design of this module can not only improve the feature expression ability of the model, but also effectively reduce the computational complexity, providing a new solution for real-time target detection.
[0065] The LAE module (Lightweight Adaptive Feature Extraction Module) consists of two parts: Adaptive Feature Extraction Module and Lightweight Feature Extraction Module.
[0066] The adaptive feature extraction module extracts global features from the input of the LAE module through an average pooling layer (AvgPool2d), then uses convolution (Conv) to generate channel weights, uses a five-dimensional reorganization module (R) to reorganize and adjust the dimension of the input feature map, and normalizes it through the Softmax function to highlight important features.
[0067] The lightweight feature extraction module mainly uses convolution (Conv) to reduce the dimension of the feature map of the input of the LAE module. The five-dimensional reorganization module (R) remaps the height (Height) and width (Width) information of the input feature map to the channel (Channel) dimension to ensure that information loss is minimized during the downsampling process and the relevant information of local pixels is retained. The output of the lightweight feature extraction module and the output of the adaptive feature extraction module are multiplied as the output of the LAE module. The adaptive feature extraction module and the lightweight feature extraction module work together to optimize the feature extraction and fusion process and improve the accuracy and efficiency of target detection.
[0068] The LAE module can significantly improve the performance and efficiency of target detection by introducing an adaptive feature extraction module and a lightweight feature extraction module. This module effectively reduces the computational cost, allowing the model to run efficiently in a resource-constrained environment. At the same time, by enhancing the expression of important features, it improves the accuracy of target detection, especially in complex scenarios. In addition, the LAE module supports multi-scale feature extraction, further enhancing the ability to detect targets of different sizes, making it more flexible and practical in practical applications.
[0069] 2. Design C2f_WTConv module
[0070] The C2f_WTConv module is based on WTConv (wavelet convolution layer), which is designed to solve the over-parameterization problem faced by traditional convolutional neural networks (CNN) when expanding the receptive field. In high-dimensional feature extraction, CNN often makes the model bloated and difficult to efficiently capture multi-level features. WTConv processes different frequency bands of input data through wavelet transform (WT), which can effectively enhance the local and global feature extraction capabilities of the model, and improve the robustness and computational efficiency of the model.
[0071] The C2f_WTConv module includes a 1x1 convolutional layer (Conv), a Split, multiple Bottleneck modules, a Concat module, and a 1x1 convolutional layer (Conv) connected in sequence, where the output of the first convolutional layer, the output of the Split, and the output of each Bottleneck module are connected to the input of the Concat module. In the above design, the 1x1 convolutional layer and Split are used to map the number of input feature channels to the number of hidden channels in the middle to improve the efficiency of subsequent feature extraction. This is followed by multiple Bottleneck modules, which include standard convolutional layers (Conv) and wavelet convolutional layers (WTConv). The latter combines wavelet transform to process features of different frequency bands and effectively capture local and global information. The output of the wavelet convolutional layer is added to the input of the Bottleneck module through a shortcut connection as the output of the Bottleneck module to enhance feature transfer. The C2f_WTConv module not only optimizes the depth and diversity of feature extraction, but also reduces the number of parameters and computational complexity, so that the model has a better lightweight effect while maintaining high performance.
[0072] The advantages of WTConv are: Compared with traditional methods, the number of parameters of WTConv (C·K 2 (4L+1), K is the convolution kernel) only changes with the receptive field size (2 L K) grows logarithmically instead of quadratically; through hierarchical wavelet decomposition, WTConv can significantly expand the receptive field of CNN while the number of parameters only grows linearly, thus having an advantage in global feature extraction.
[0073] By integrating WTConv into the C2f mechanism, the C2f_WTConv module successfully achieves parameter reduction and computational burden reduction. This optimization not only improves the performance and efficiency of the model, but also makes it more lightweight during inference and easy to apply in resource-constrained environments.
[0074] 3. Based on the YOLOv8 model, an image target detection model (LAEWT-YOLO model) is constructed, which includes Backbone (backbone network), Neck (neck network), and Head (detection head).
[0075] ①Backbone (backbone network), including layers 0 to 9 connected in sequence, the structure of each layer is as follows:
[0076] Layer 0: Conv module, where the input image size is 640*640*3, the convolution kernel size k=3, the number of convolution kernels is 64, the step size stride=2, and the output feature map size is 320*320*64*w;
[0077] Layer 1: LAE module, where the convolution kernel size k = 3, stride = 2, the number of convolution kernels is 128, and the output feature map size is 320*320*128*w;
[0078] Layer 2: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 160*160*128*w;
[0079] Layer 3: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 80*80*256*w;
[0080] Layer 4: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 80*80*256*w;
[0081] Layer 5: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 40*40*512*w;
[0082] Layer 6: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 40*40*512*w;
[0083] Layer 7: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 20*20*1024*w;
[0084] Layer 8: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 20*20*1024*w;
[0085] Layer 9: SPPF module (fast pyramid pooling layer), where the pooling kernel size k=5 and the output feature map size is 20*20*1024*w;
[0086] (2) Neck (neck network)
[0087] Layer 10: Upsample module, scale factor scale_factor = 2, upsampling algorithm is nearest neighbor interpolation, output feature map size 40*40*1024*w;
[0088] Layer 11: Concat module, which takes the output of layers 10 and 6 as the input of this layer. The concatenation dimension is 1, and the output feature map size is 40*40*1536*w;
[0089] Layer 12, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 40*40*512*w;
[0090] Layer 13, Upsample module, scale factor scale_factor = 2, upsampling algorithm is nearest neighbor interpolation, output feature map size 80*80*512*w;
[0091] The 14th layer, the Concat module, takes the output of the 13th and 4th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 80*80*768*w.
[0092] Layer 15, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 80*80*256*w;
[0093] Layer 16, LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 40*40*256*w;
[0094] The 17th layer, Concat module, takes the output of the 16th and 12th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 40*40*768*w;
[0095] Layer 18, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 40*40*512*w;
[0096] Layer 19, LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 20*20*512*w;
[0097] The 20th layer, Concat module, takes the output of the 19th and 9th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 20*20*1536*w;
[0098] Layer 21, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 20*20*1024*w;
[0099] (3) Head (Detection head)
[0100] The 22nd, 23rd, and 24th layers are Detect modules, where the Conv parameters are convolution kernel size k=3, stride=1, and padding=1. The Conv2d parameters are convolution kernel size k=1, stride=1, and padding=0. The outputs of the 15th, 18th, and 21st layers of Neck are used as the inputs of the 22nd, 23rd, and 24th layers of Head, respectively.
[0101] After the Head decoupling head, the input from feature maps of different scales is processed. Small-scale feature maps (e.g., 80×80): contain more detail information, which helps detect small targets. Medium-scale feature maps (e.g., 40×40): balance detail and semantic information, which helps detect medium-sized targets. Large-scale feature maps (e.g., 20×20): contain more semantic information, which helps detect large targets. The algorithm of the present invention performs the same classification and regression tasks at each scale.
[0102] From the above, the algorithm of the present invention uses YOLOv8n as the baseline algorithm, and the width factor w=0.25.
[0103] 4. Constructing experimental data set
[0104] The VisDrone2019 dataset is a large-scale drone aerial photography dataset, containing more than 2.6 million annotated objects, including 10 different categories, such as pedestrians, vehicles (cars, trucks, buses), bicycles, tricycles, etc. The objects in the dataset are small in size and the number of objects is large, making object detection and classification difficult. It is suitable for the study of drone vision tasks such as object detection, tracking, and scene understanding. The dataset consists of 6471 training set images, 548 validation set images, and 1610 test set images. In order to enhance the size and diversity of the dataset, the image cutting method is used for data expansion. Specifically, the images in the original dataset are cropped into multiple 1024×1024 pixel sub-images with an interval of 200 pixels between adjacent blocks. There are a total of 23,750 images after cropping, from which 19,000 images are randomly selected as the training set, 2375 images as the new validation set, and 2375 images as the test set.
[0105] 5. Construct model training and evaluation indicators
[0106] (1) Model training platform and parameter setting
[0107] The hardware configuration of the model training and testing platform of the present invention is: 13th generation Intel Core i7-13700H CPU, NVIDIA GeForce RTX 4090 GPU, 24GB video memory. The software configuration includes Windows 11 operating system, PyTorch2.0.1 deep learning framework, 11.8 version CUDA, Python3.8 programming language, and Pycharm integrated development environment.
[0108] During training, the image size of the input model was set to 640 pixels × 640 pixels, the training batch size was 16, the number of training epochs was 200, the initial learning rate was 0.01, and the rest of the parameters used the default values.
[0109] (2) Evaluation indicators
[0110] The present invention uses precision (P), recall (R), and mean average precision (mAP@0.5) to evaluate the detection accuracy of the model, where the threshold of mAP is set to 0.5. Parameters are selected to evaluate the calculation scale of the model. The model weight is selected as the deployability evaluation indicator.
[0111] 6. Algorithm Evaluation
[0112] (1) Ablation experiment
[0113] In order to verify the actual effect of the changes in each module in the drone remote sensing dataset on small target detection, the algorithm detection performance of different modules was compared using the VisDrone2019 dataset under the same experimental environment. In this process, YOLOv8n was selected as the benchmark model, and the results after 200 epochs of training were output.
[0114] As shown in Table 1, when YOLOv8 is used as the baseline model, the performance of P, R, and m is average, and there is much room for improvement. After ablation experiments, it is verified that its network structure shows excellent performance improvement after reconstruction. Specifically, the average detection accuracy is significantly improved to 39.9%; at the same time, the number of parameters of the model is greatly reduced compared to the unreconstructed model, with a decrease of 23.1%. This result fully proves that the lightweight improvement of the network structure has a significant effect, which not only improves the detection accuracy, but also optimizes the complexity of the model.
[0115] Table 1 Ablation results of the improved algorithm on the VisDrone2019 dataset
[0116]
[0117] (2) Algorithm Evaluation
[0118] In order to prove the effectiveness of the LAEWT-YOLO algorithm, the model was trained 200 times with a batch-size of 8. The data results and various training indicators are as follows: Figure 3 shown. Figure 3 The vertical axis represents the index value, and the mean of the loss function is expressed in the unit of loss, reflecting the accuracy and comprehensiveness of the model detection results.
[0119] Depend on Figure 3 It can be seen that before the 50th training time, the mean of CIoU loss function and the mean of target detection loss dropped sharply, and then remained stable. The mAP with a P, R and IoU threshold of 0.5 rose sharply before 100 times, and then stabilized. To ensure that the features can be fully extracted, the number of training times is selected as 200, and the weight file with the best effect is used for detection.
[0120] In order to more comprehensively evaluate the general performance of the improved algorithm, a series of comparative experiments were conducted to compare the optimized algorithm with the current mainstream object detection algorithms.
[0121] As shown in Table 2, the improved algorithm performs well in average detection accuracy compared with mainstream algorithms, reaching 39.9%. Compared with other mainstream algorithms such as Faster R-CNN, YOLOv5, YOLOv7, YOLOv8, PP-YOLO and DAMO-YOLO, the improvement is 103.6%, 19.5%, 2.8%, 21.6%, 18.0% and 17.4% respectively. For the van, bicycle and motor categories, the algorithm achieved 45.7%, 28.8% and 44.9% AP values (Table 3). It is worth noting that although YOLOv7 has similar accuracy to this algorithm, and even some indicators are more accurate than this algorithm, its model parameters are 16 times that of this algorithm, and its model size is 15 times that of this algorithm.
[0122] Through performance comparison and analysis with common algorithms, the improved algorithm has achieved a good balance between lightweight, real-time performance and detection accuracy, and has more advantages in actual industrial-level lightweight applications and deployments.
[0123] Table 2 Parameter comparison of the improved model in the VisDrone2019 dataset
[0124]
[0125] Table 3 Experimental results of the improved model in the VisDrone2019 dataset
[0126]
[0127] The present invention takes the traditional YOLOv8 algorithm as the baseline model, proposes a wavelet convolution layer (WTConv), and uses wavelet transform to solve the over-parameterization problem encountered by convolutional neural network (CNN) when realizing a large receptive field; proposes a lightweight adaptive feature extraction (LAE) module to extract important information from the input feature map, and weights the features according to the adaptive attention mechanism to improve the model's detection performance for the target area, which has the following advantages:
[0128] (1) Multi-scale feature extraction: Compared with traditional convolutional methods, LAE significantly reduces the number of parameters and computation while retaining rich semantic information.
[0129] (2) Adaptive Feature Extraction: LAE reduces the impact of noise by retaining more contextual information and high-resolution details in multi-scale feature maps. It combines global information from different locations through adaptive weights, making the model's attention more focused on the target area. This method converts the dimension of the feature map from four dimensions (batch, channel, height, width) to five dimensions (batch, channel, height, width, sampling factor), thereby retaining more information.
[0130] (3) Reduce computational cost: The LAE module uses grouped convolution to map input to output, and adopts N groups of grouped convolution to reduce the number of parameters to 1 / N of traditional convolution. In this way, LAE achieves four times downsampling while retaining important information about image edges and corners.
[0131] (4) Fusion of global and local information: During the downsampling process, LAE retains the global information and promotes the transition from high-resolution information to low-resolution information, enabling the model to better identify the target area.
[0132] (5) Larger receptive field: The C2f module of YOLOv8 usually relies on the local receptive field to extract detailed features, while C2f_WTConv can obtain a receptive field close to the global one, which helps to better capture the shape and global context information of the target.
[0133] (6) Enhanced low-frequency response: C2f_WTConv can improve the ability to understand shapes while maintaining sensitivity to high-frequency textures. It is suitable for target detection in scenes with occluded targets, complex backgrounds, or low resolution.
[0134] (7) Multi-frequency feature fusion: C2f_WTConv can more efficiently establish connections between multi-scale features, and is particularly suitable for processing small targets and complex background scenes.
[0135] (8) Parameter and computational overhead optimization: Compared with the method of using large kernel convolution to directly increase the receptive field, C2f_WTConv significantly reduces the number of parameters and computational overhead (such as reducing FLOPs), which is very suitable for the design requirements of lightweight models.
[0136] In general, the present invention provides a more efficient, robust and easy-to-integrate target detection solution.
Claims
1. A method for constructing an image target detection model, characterized in that: The steps include: Step 1, constructing a backbone network, wherein the backbone network includes layers 0 to 9 connected in sequence; Layer 0: Conv module, where the input image size is 640*640*3, the convolution kernel size k=3, the number of convolution kernels is 64, the step size stride=2, and the output feature map size is 320*320*64*w; Layer 1: LAE module, where the convolution kernel size k = 3, stride = 2, the number of convolution kernels is 128, and the output feature map size is 320*320*128*w; Layer 2: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 160*160*128*w; Layer 3: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 80*80*256*w; Layer 4: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 80*80*256*w; Layer 5: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 40*40*512*w; Layer 6: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 40*40*512*w; Layer 7: LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 20*20*1024*w; Layer 8: C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 20*20*1024*w; Layer 9: SPPF module, where the pooling kernel size k=5 and the output feature map size 20*20*1024*w; Step 2, constructing a neck network, wherein the neck network includes the 10th to 21st layers; Layer 10: Upsample module, scale factor scale_factor = 2, upsampling algorithm is nearest neighbor interpolation, output feature map size 40*40*1024*w; Layer 11: Concat module, which takes the output of layers 10 and 6 as the input of this layer. The concatenation dimension is 1, and the output feature map size is 40*40*1536*w; Layer 12, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 40*40*512*w; Layer 13, Upsample module, scale factor scale_factor = 2, upsampling algorithm is nearest neighbor interpolation, output feature map size 80*80*512*w; The 14th layer, Concat module, takes the output of the 13th and 4th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 80*80*768*w; Layer 15, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 80*80*256*w; Layer 16, LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 40*40*256*w; The 17th layer, Concat module, takes the output of the 16th and 12th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 40*40*768*w; Layer 18, C2f_WTConv module, where the convolution kernel size k = 5, stride = 1, and the output feature map size is 40*40*512*w; Layer 19, LAE module, where the convolution kernel size k = 3, stride = 2, and the output feature map size is 20*20*512*w; The 20th layer, Concat module, takes the output of the 19th and 9th layers as the input of this layer. The dimension of Concat splicing is 1, and the output feature map size is 20*20*1536*w; Layer 21, C2f_WTConv module, where the convolution kernel size k=5, stride=1, and the output feature map size is 20*20*1024*w; Step 3, constructing a detection head, wherein the detection head includes the 22nd to 24th layers; The 22nd, 23rd, and 24th layers are all Detect modules, where the Conv parameters are convolution kernel size k=3, stride=1, and padding=1; the Conv2d parameters are convolution kernel size k=1, stride=1, and padding=0; the outputs of the 15th, 18th, and 21st layers of the neck network are used as the inputs of the 22nd, 23rd, and 24th layers of the Head, respectively.
2. The method for constructing an image target detection model according to claim 1, characterized in that: The LAE module includes an adaptive feature extraction module and a lightweight feature extraction module. The adaptive feature extraction module extracts global features from the input of the LAE module through an average pooling layer, then uses convolution to generate channel weights, uses a five-dimensional reorganization module to reorganize and adjust the dimension of the input feature map, and normalizes it through a Softmax function; The lightweight feature extraction module uses convolution to reduce the dimension of the feature map of the input of the LAE module, and uses a five-dimensional reorganization module to map the height and width information of the input feature map to the channel dimension; the output of the lightweight feature extraction module and the output of the adaptive feature extraction module are multiplied as the output of the LAE module.
3. The method for constructing an image target detection model according to claim 1, wherein: The C2f_WTConv module includes a 1x1 convolutional layer, a Split, multiple Bottleneck modules, a Concat module and a 1x1 convolutional layer connected in sequence, wherein the output of the first convolutional layer, the output of the Split, and the output of each Bottleneck module are connected to the input of the Concat module.
4. A lightweight UAV image target detection method based on wavelet convolution, characterized in that: The steps include: Step 1: construct the experimental data set and divide it into training set, validation set and test set after preprocessing; Step 2, training the model constructed by the method for constructing an image target detection model according to any one of claims 1 to 3 using a training method to obtain a trained image target detection model; Step 3: Preprocess the test set and input it into the trained image target detection model to output the target detection results.
5. The lightweight UAV image target detection method based on wavelet convolution as claimed in claim 4, characterized in that: During the training process of step 2, the image size of the input model is set to 640 pixels × 640 pixels, the training batch size is 16, the number of training rounds is 200, and the initial learning rate is 0.
01.
6. A lightweight UAV image target detection system based on wavelet convolution, characterized in that: Includes the following modules: The experimental data set construction module is used to construct the experimental data set, which is divided into training set, validation set and test set after preprocessing; A training module, used to train the model constructed by the method for constructing an image target detection model according to any one of claims 1 to 3 using a training link to obtain a trained image target detection model; The target detection module is used to pre-process the test set and input it into the trained image target detection model to output the target detection results.
Citation Information
Cited By
Lightweight target detection method and unmanned aerial vehicle image target detection method
CN120107572A
Tomato image real-time detection method, tomato image real-time detection system, tomato picking method and tomato picking system
CN120388367A