Traffic remote sensing target detection method

By introducing lightweight multi-scale convolution module, convolution attention architecture and detection head in the YOLOv8 model, the problem of model calculation efficiency and large parameter scale is solved, and the lightweight and efficient detection performance of the model is realized, suitable for traffic Remote sensing object detection.

CN119169268APending Publication Date: 2024-12-20HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202411228471.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The YOLOv8 model has a large computing efficiency and parameter scale in object detection, which leads to too long training time and is difficult to meet the needs of practical applications.

Method used

DepthESPConv, a lightweight multi-scale convolution module, replaces the Conv module and C2f module in the original network, and introduces a new convolutional attention architecture CMPS, as well as innovative detection heads LAGCHead and lightweight convolution Fasterblock-DualConv modules, reducing the computational volume of the model and parameter quantity to improve detection performance.

Benefits of technology

It effectively reduces the model size and parameter quantity, improves detection accuracy and ability to deal with complex environments, significantly reduces training time, and is suitable for practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169268A_ABST
    Figure CN119169268A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic remote sensing target detection method which comprises the following steps: selecting an MAR20 remote sensing data set, and dividing into a training set, a verification set and a test set; a backbone network of the YOLOv8 is improved: a lightweight multi-scale convolution module DepthESPConv replaces a Conv module and a C2f module in the network, and a novel convolution attention architecture CMPS is introduced behind a DepthESPConv layer; a detection head LAGCHead is provided to replace an original detection head, and multi-dimensional enhancement of an input feature map is realized by utilizing feature weight calculation of three branches of linearity, space and channel; an innovative lightweight convolution Faster block-DualConv module is introduced to be fused with the C2f module, so that a new C2fDF module is obtained; training the constructed target detection model by using the divided remote sensing data set; and performing target detection on the training set by using the trained target detection model, and evaluating the performance of the model. Compared with an original YOLOv8 network model, the new network model has the advantages that the size of 22.6 M is reduced by 34.07%; the parameter quantity of the model is reduced by 51.36%, and meanwhile, the average precision MAP50 is basically kept unchanged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deep learning remote sensing detection, and in particular to a traffic remote sensing target detection method. Background Art

[0002] With the rapid development of deep learning technology, object detection algorithms based on convolutional neural networks (CNNs) have made significant progress. As a representative method in the field of object detection, the YOLO (You Only Look Once) series of algorithms have received widespread attention and application due to their efficient real-time performance and high detection accuracy. As the latest version of the YOLO series, YOLOv8 has greatly improved detection performance and speed. However, with the increase in the demand for object detection in actual application scenarios, higher requirements are placed on the computational efficiency and lightweight of the model.

[0003] In the research of target detection algorithms, how to further reduce the computational complexity and parameter size of the model while ensuring detection accuracy is an important issue to be solved. To address this issue, this paper proposes a series of improvement methods to improve the detection performance and lightweightness of YOLOv8.

[0004] Based on the YOLOv8 network structure, this paper proposes a lightweight multi-scale convolution module DepthESPConv to replace the Conv module and C2f module in the original network. The DepthESPConv module can significantly reduce the amount of calculation and parameter scale while ensuring the feature extraction capability. In order to further improve the detection performance of the model in complex environments, we introduced a new convolutional attention architecture CMPS after the DepthESPConv layer. CMPS takes advantage of the channel and position attention to effectively extract spatial relationships and improve the model's ability to handle complex environments.

[0005] In order to improve the adaptability and performance of the model at different scales, this paper proposes a new detection head LAGCHead to replace the original detection head. LAGCHead uses linear, spatial and channel feature weight calculation to achieve multi-dimensional enhancement of the input feature map.

[0006] In the neck structure of the YOLOv8 network, this paper introduces the innovative lightweight convolution Fasterblock-DualConv module and integrates it with the C2f module to form a new C2f_DF module. This improvement not only reduces the complexity of the network structure, but also improves the detection accuracy.

[0007] Through the above series of improvements, the target detection method proposed in this paper can effectively reduce the size and parameter amount of the model during detection, realize the lightweight model algorithm, and provide strong support for the practical application of the target detection algorithm. Summary of the invention

[0008] Purpose of the invention: In view of the technical problem that when YOLOv8 uses s weights to train a target detection model, the training time is too long due to the large number of parameters and GFLOPs. The present invention provides an improved lightweight remote sensing target detection algorithm for transportation. Based on the YOLOv8 network foundation, a lightweight multi-scale convolution module DepthESPConv is proposed to replace the Conv module and C2f module in the network, so that the backbone network is more lightweight, which can reduce the amount of calculation and parameters of the algorithm, and an innovative attention mechanism CMPS is added, and an innovative C2f_DF layer is added to the neck. At the same time, an innovative detection head is proposed to lightweight the model, which can effectively solve the above problems.

[0009] Technical solution: The present invention provides a traffic remote sensing target detection method, comprising the following steps:

[0010] Step 1: Select the MAR aircraft remote sensing dataset and randomly divide it into training set, validation set, and test set according to the proportion;

[0011] Step 2: Improve the backbone network of YOLOv8: Based on the YOLOv8 network foundation, replace the Conv module and C2f module in the backbone network with the DepthESPConv module, and delete the SPPF module;

[0012] Step 3: Introduce the CMPS attention mechanism after the DepthESPConv layer;

[0013] Step 4: Improve the YOLOv8 network neck structure: introduce the lightweight convolution Fasterblock-DualConv module and merge it with the C2f module to obtain a new C2f_DF module to replace the C2f module;

[0014] Step 5: Improve the detection head of the YOLOv8 network: Use the detection head LAGCHead to replace the original detection head. The detection head LAGCHead uses the feature weight calculation of three branches, linear, spatial and channel, to achieve multi-dimensional enhancement of the input feature map;

[0015] Step 6: Use the divided remote sensing data set to train the target detection model constructed in S2-S5;

[0016] Step 7: Use the trained target detection model to perform target detection on the training set and evaluate the performance of the model.

[0017] Furthermore, in step 2, the DepthESPConv module is used as the backbone network, and the DepthESPConv module includes a Conv layer and 9 DepthESPConv layers connected in series in sequence; the DepthESPConv layer combines the deep convolution DW, the point-by-point convolution PW and the SE module to achieve lightweight, and uses the h-swish activation function to replace the traditional ReLU function; the design of the DepthESPConv layer is specifically as follows;

[0018] First, the input data enters the residual connection part, and the input data is divided into two paths; one DW path: after deep convolution, convolution operations are performed independently in each channel without crossing channels; the other PW path: after point-by-point convolution, using a 1x1 convolution kernel to integrate the features between channels;

[0019] The output results of deep convolution and point-by-point convolution enter the SE module, which adjusts the weight of each channel through global information to enhance the representation ability of channel features;

[0020] The feature map output by the SE module is concatenated and Concat is performed through feature fusion. The fused features are nonlinearly transformed through normalization and h-swish activation function. After nonlinear activation, the feature map is divided into two paths again, each of which passes through a Conv2d convolution layer and then through the Sigmoid activation function to generate two independent feature maps. The two independent feature maps are weightedly added with the output of the residual connection part to reintegrate the feature map.

[0021] The integrated feature map is reduced to a global feature vector through global average pooling GAP, and the feature vector passes through a fully connected layer to output the final result.

[0022] Furthermore, step 3 adds a CMPS attention mechanism after the backbone network, combines channel and position attention, and calculates attention weights in the channel dimension and spatial dimension respectively; the channel attention mechanism captures global information and adjusts each channel; the position attention mechanism adjusts the features in the spatial dimension by paying attention to different positions in the feature map. The CMPS attention mechanism process is as follows:

[0023] 1) Channel Attention Mechanism:

[0024] Input 1: Input feature map is processed by channel attention mechanism;

[0025] Global average pooling: The input feature map undergoes a global average pooling operation to extract the global information of each channel and generate a global feature vector;

[0026] Convolutional layer: The pooled feature vector is processed through a convolutional layer;

[0027] Sigmoid activation function: The output of the convolutional layer passes through the Sigmoid activation function, mapping the result between 0 and 1 to generate the channel attention weight;

[0028] Channel weighting: The channel attention weight is multiplied by the original input feature channel by channel to adjust the channel and highlight the channel features. The weighted output is then passed to the position attention mechanism through the connection line as one of the inputs of the position attention mechanism.

[0029] 2) Position Attention Mechanism:

[0030] Input: Input 2 and the feature map passed by the channel attention mechanism are fused through the Add operation;

[0031] Global average pooling: Perform global average pooling on the integrated feature map in the width direction Pw and the height direction Ph to extract the global information of the spatial dimension;

[0032] Concat: concatenate the two vectors Pw and Ph to generate a comprehensive feature vector;

[0033] ConvBN-Swish: The concatenated feature vector is processed through a convolutional layer, batch normalization, and Swish activation function;

[0034] Split: The processed feature map is split into multiple parts, corresponding to different spatial position feature maps;

[0035] Sigmoid activation function: Each split feature map generates the corresponding spatial attention weight through the Sigmoid activation function;

[0036] Position weighting: The spatial attention weight is multiplied by the original feature map element by element to adjust the importance of different positions in the spatial dimension;

[0037] Output: The final output feature map after being processed by the position attention mechanism.

[0038] Furthermore, in step 4, based on the neck structure in YOLOv8, a lightweight convolution Fasterblock-DualConv module is introduced to replace the Bottleblock in the C2f module to obtain a C2f_DF module. The Fasterblock-DualConv module includes a Fasterblock module, a DualConv module, and a Conv module. The specific process of the Fasterblock-DualConv module is as follows:

[0039] The Fasterblock module performs a specific convolution operation on the input feature map, and selects the first or last continuous Cp channels to represent the entire feature map. The DualConv module performs a double-layer convolution operation on the Fasterblock module output feature map to further extract deep features. The Conv module performs a standard convolution operation on the DualConv module output feature map to obtain basic feature information.

[0040] The input feature map is concatenated with the output features of the Conv module to obtain the output of the Fasterblock-DualConv module.

[0041] The specific process of C2f_DF module is as follows:

[0042] The input feature map is first processed by a convolution layer to extract basic features; the feature map processed by convolution is then transmitted to the segmentation layer for processing, and the feature map is segmented into multiple feature channels; the segmented feature map is transmitted to the Fasterblock-DualConv module, and undergoes n times of feature extraction and processing; after each processing of the Fasterblock-DualConv module, part of the feature map is transmitted to the output feature map node for skip connection or feature fusion; all feature maps processed by the Fasterblock-DualConv module are transmitted to the splicing layer, and feature maps at different levels are spliced ​​together to form a comprehensive feature map;

[0043] The concatenated feature map is transmitted to the final convolutional layer for processing to obtain the final output feature map.

[0044] Furthermore, in step 5, the detection head LAGCHead includes three branches: a linear branch, a spatial branch and a channel branch, as follows:

[0045] (1) Linear branching

[0046] Global average pooling: The input features are first subjected to a global average pooling operation to extract the global information of the entire feature map;

[0047] Conv: The pooled feature map passes through a 1×1 convolution layer to perform linear combinations of features between channels;

[0048] h-swish: The output of the convolutional layer passes through the h-swish activation function;

[0049] HardSigmoid: The result after h-swish passes through a hard Sigmoid function, which limits the output value to between 0 and 1 and is used to generate the weight of each feature;

[0050] Multiplication operation: The generated weights are multiplied element-by-element by the input features to adjust the importance of the features;

[0051] (2) Space branch

[0052] Offset: Calculate the offset of the feature map to obtain the spatial translation of the feature map;

[0053] Conv: The offset feature map passes through a 3×3 convolution layer to extract local features in the spatial dimension;

[0054] Index: After the convolution operation, the feature map is indexed to rearrange or selectively output the convolved feature map;

[0055] Sigmoid: Generate spatial attention weights through the Sigmoid activation function to adjust the features of different spatial positions;

[0056] Multiplication operation: The generated spatial weights are multiplied element-by-element with the original input features to adjust the importance of different positions in the spatial dimension;

[0057] (3) Channel branching

[0058] Global average pooling: The input features are also subjected to global average pooling to extract the global information of the channel;

[0059] Fully connected layer: The pooled feature map passes through two fully connected layers, and the h-swish activation function is used in the middle to combine features in the channel dimension;

[0060] Normalization: The output of the fully connected layer is normalized to normalize the weights;

[0061] Multiplication operation: multiply the normalized weights by the input features channel by channel to adjust the importance of each channel;

[0062] Final output: The feature maps processed by multiple branches are integrated into the final output.

[0063] Beneficial effects:

[0064] Based on the YOLOv8 network foundation, this paper proposes a new lightweight multi-scale convolution module DepthESPConv to replace the Conv module and C2f module in the network, making the backbone network more lightweight and reducing the amount of calculation and parameters of the algorithm;

[0065] The present invention introduces a new convolutional attention architecture CMPS after the DepthESPConv layer, takes advantage of channel and position attention, calculates attention weights in the channel dimension and spatial dimension respectively, can effectively extract spatial relationships and improve the model's ability to handle complex environments;

[0066] The present invention proposes a new detection head LAGCHead to replace the original detection head, and uses the feature weight calculation of three branches, namely linear, spatial and channel, to achieve multi-dimensional enhancement of the input feature map;

[0067] The present invention improves the YOLOv8 network neck structure, introduces an innovative lightweight convolution Fasterblock-DualConv module and fuses it with the C2f module to obtain a new C2f_DF module, so as to reduce the complexity of the network structure and improve the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 This is a diagram of the improved YOLOv8 network structure in an embodiment of the present invention;

[0069] Figure 2 It is a diagram of the improved YOLOv8DepthESPConv network structure in an embodiment of the present invention;

[0070] Figure 3 This is a structural diagram of an improved CMPS in an embodiment of the present invention;

[0071] Figure 4 This is a structural diagram of the improved YOLOv8LAGCHead detection head in an embodiment of the present invention;

[0072] Figure 5 This is a structural diagram of the Fasterblock-DualConv module in an embodiment of the present invention;

[0073] Figure 6 It is a C2f_DF structure diagram in an embodiment of the present invention;

[0074] Figure 7 This is an improved YOLOv8 training result picture in an embodiment of the present invention.

[0075] Figure 8 It is an unimproved YOLOv8 detection data set image in the embodiment of the present invention;

[0076] Fig. 9 This is an improved YOLOv8 detection data set image in an embodiment of the present invention. DETAILED DESCRIPTION

[0077] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0078] The present invention discloses a traffic remote sensing target detection method, which specifically comprises the following steps:

[0079] Step 1: Select the MAR20 remote sensing dataset and divide it into training set, validation set, and test set.

[0080] The remote sensing aircraft dataset contains 5322 training sets and 1006 test sets. It is the basic data of the remote sensing detection dataset and is used for the training of the YOLO target detection series.

[0081] Step 2: Improve the backbone network of YOLOv8: Based on the YOLOv8 network foundation, a new lightweight multi-scale convolution module DepthESPConv is proposed to replace the Conv module and C2f module in the network, making the backbone network more lightweight, reducing the amount of algorithm calculation and parameters, and deleting the SPPF module. Figure 2 As shown in the figure, the DepthESPConv module is used as the backbone network, including one Conv layer and nine DepthESPConv layers; the DepthESPConv layer uses a combination of deep convolution DW, point-by-point convolution PW and SE modules to achieve lightweight, and uses the h-swish activation function to replace the traditional ReLU function, improving performance while maintaining computational efficiency. The DepthESPConv layer is specifically designed as follows;

[0082] First, the input data enters the residual connection part of the network. The purpose of the residual connection is to pass the input data directly to the output end and perform weighted addition with the feature maps that have been processed in a series. The input data is divided into two paths: 1) DW path: After depthwise convolution, convolution operations are performed independently in each channel without crossing channels. 2) PW path: After point-by-point convolution, using a 1x1 convolution kernel, the features between channels are integrated.

[0083] Then, the output results of the depthwise convolution and pointwise convolution enter the SE module, which adjusts the weight of each channel through global information to enhance the representation ability of channel features. The feature map output by the SE module is concatenated and convolved through feature fusion (Concat+Conv2d). Then, the fused features are nonlinearly transformed through normalization and h-swish activation function to enhance the representation ability of the network. After nonlinear activation, the feature map is divided into two paths again, each of which passes through a convolution layer (Conv2d) and then through the Sigmoid activation function to generate two independent feature maps. The two independent feature maps are weighted added with the input of the residual connection to reintegrate the feature map. The integrated feature map is reduced to a global feature vector through global average pooling (GAP). Finally, the feature vector passes through a fully connected layer to output the final result.

[0084] Step 3: Add a new CMPS attention mechanism after the backbone network. Figure 3As shown in the figure, the attention mechanism structure combines the advantages of channel and position attention, and calculates attention weights in the channel dimension and spatial dimension respectively. The channel attention mechanism captures global information and adjusts each channel; the position attention mechanism adjusts the features in the spatial dimension by paying attention to different positions in the feature map. The combination of the two helps the model better understand and process input features, and improves the performance of object detection or other computer vision tasks. The main process of the CMPS attention mechanism is as follows:

[0085] 1) Channel Attention Mechanism

[0086] Input 1: The input feature map is processed by the channel attention mechanism.

[0087] Global average pooling: The input feature map undergoes a global average pooling operation, which extracts the global information of each channel and generates a global feature vector.

[0088] Convolutional layer: The pooled feature vector is processed through a convolutional layer. The function of the convolutional layer is to perform a linear transformation on the global features to generate weights between channels.

[0089] Sigmoid activation function: The output of the convolutional layer passes through the Sigmoid activation function, mapping the result to between 0 and 1 to generate channel attention weights.

[0090] Channel weighting: The channel attention weight is multiplied by the original input feature channel by channel to adjust the channel and highlight the channel features. The weighted output is then passed to the position attention mechanism through the connection line as one of the inputs of the position attention mechanism.

[0091] 2) Position Attention Mechanism

[0092] Input: Input 2 and the feature map passed by the channel attention mechanism are fused through the Add operation;

[0093] Global average pooling: The integrated feature map is globally average pooled in the width direction (Pw) and the height direction (Ph) to extract the global information of the spatial dimension.

[0094] Concat: Concatenate the two vectors Pw and Ph to generate a comprehensive feature vector.

[0095] ConvBN-Swish: The concatenated feature vector is processed through a convolutional layer, batch normalization, and a Swish activation function. This step is used to enhance feature expression and provide more discriminative features for subsequent operations.

[0096] Split: The processed feature map is split into multiple parts, usually corresponding to different spatial location feature maps.

[0097] Sigmoid activation function: Each split feature map generates the corresponding spatial attention weight through the Sigmoid activation function.

[0098] Position Weights: These spatial attention weights are multiplied element-wise with the original feature map to adjust the importance of different positions in the spatial dimension.

[0099] Output: The final output feature map after being processed by the position attention mechanism.

[0100] Step 4: Based on step 2, replace the original v8 detection head with LAGCHead. Figure 4 As shown in the figure, the LAGCHead module achieves multi-dimensional enhancement of the input feature map by calculating the feature weights of three branches: linear, spatial, and channel. Each branch is responsible for adjusting the weights of the input features in different dimensions, and finally combines them to generate more discriminative feature outputs to improve the accuracy and robustness of the detection task.

[0101] The LAGCHead module includes three main branches: linear branch, spatial branch, and channel branch. The following is a detailed description of each branch and its overall detection process:

[0102] (1) Linear branching

[0103] Global average pooling: The input features first undergo a global average pooling operation to extract the global information of the entire feature map.

[0104] Conv: The pooled feature map passes through a 1×1 convolution layer to perform linear combinations of features between channels.

[0105] h-swish: The output of the convolutional layer is passed through the h-swish activation function to increase nonlinearity. h-swish is an improved activation function with good computational efficiency and performance.

[0106] HardSigmoid: The result after h-swish passes through a hard Sigmoid function, which limits the output value to between 0 and 1 and is used to generate the weight of each feature.

[0107] Multiplication operation: The generated weights are multiplied element-wise with the input features to adjust the importance of the features.

[0108] (2) Space branch

[0109] Offset: Calculate the offset of the feature map and obtain the spatial translation of the feature map.

[0110] Conv: The offset feature map passes through a 3×3 convolutional layer to extract local features in the spatial dimension.

[0111] Index: After the convolution operation, the feature map is indexed. This step may be to rearrange or selectively output the convolved feature map.

[0112] Sigmoid: Generate spatial attention weights through the Sigmoid activation function to adjust the features of different spatial positions. Multiplication operation: The generated spatial weights are multiplied element-by-element with the original input features to adjust the importance of different positions in the spatial dimension.

[0113] (3) Channel branching

[0114] Global average pooling: The input features are also subjected to global average pooling to extract the global information of the channel.

[0115] Fully connected layer: The pooled feature map passes through two fully connected layers, with the h-swish activation function in between. The fully connected layer is used to combine features in the channel dimension.

[0116] Normalization: The output of the fully connected layer is normalized to normalize the weights and ensure that the output feature weights are within an appropriate range.

[0117] Multiplication operation: These weights are multiplied by the input features channel by channel to adjust the importance of each channel.

[0118] Final output: The feature maps processed by multiple branches are integrated into the final output

[0119] Step 5: In the neck structure of YOLOv8, the C2f_DF structure is used to replace the C2f structure in the neck of the traditional YOLOv8; the C2f_DF module introduces the innovative lightweight convolution Fasterblock-DualConv module to replace the bottleblock of the C2f module to obtain a new C2f_DF module to reduce the number of parameters and calculations while maintaining good feature extraction capabilities. Figure 5 As shown in the figure, the specific process of the Fasterblock-DualConv module is:

[0120] Input feature map: The Fasterblock module performs a specific convolution operation on the input feature map. For the continuity of memory access, it usually selects the first or last continuous Cp channels to represent the entire feature map. Therefore, Fasterblock greatly compresses the number of parameters and calculations, and still maintains a good feature extraction capability to extract specific features.

[0121] The DualConv module performs a double-layer convolution operation on the input feature map to further extract deep features. The DualConv module 3×3 convolution moves on the feature map channel dimension, while the 1x1 convolution is performed on all input channels. It combines 3×3 group convolution and 1×1 point convolution on the same input feature map. Each N / G convolution filter processes M / G input feature map channels and extracts information from N / G output feature map channels; an M1×1 convolution kernel is added to each convolution filter. The design of DualConv reduces the parameters of the original backbone network model through the grouped convolution strategy, and promotes information sharing between convolution layers by retaining the original information of the input feature map and allowing maximum cross-channel communication through M1×1 convolution. That is, the operated output feature map is transmitted to a fusion module through a weighted fusion to obtain the output feature map M. The output feature map M is then transmitted to a grouped convolution module, in which M is divided into N groups of features, and each group of feature maps is further processed in more detailed groups. Each group of features is processed alternately by 3x3 convolution and 1x1 convolution. After the grouped convolution operation, the results of the grouped convolution are re-fused or concatenated to obtain the final output feature map, which has the same shape as the input.

[0122] The Conv module performs standard convolution operations on the input feature map to obtain basic feature information.

[0123] like Figure 6 As shown in the figure, the specific process of the C2f_DF module is as follows: the input feature map is first processed by a convolution layer to extract basic features. The feature map processed by convolution is then transmitted to the segmentation layer for processing, and the feature map is segmented into multiple feature channels. The segmented feature map is transmitted to the DFBlock module (Fasterblock-DualConv module) and undergoes n times of feature extraction and processing. After each processing of the DFBlock module, part of the feature map is transmitted to the output feature map node for skip connection or feature fusion. All feature maps processed by the DFBlock module are transmitted to the splicing layer, and feature maps at different levels are spliced ​​together to form a comprehensive feature map. The spliced ​​feature map is transmitted to the final convolution layer for processing to obtain the final output feature map.

[0124] Step 6: Use the divided remote sensing dataset to train the target detection model constructed in S2-S5.

[0125] Step 7: Use the trained target detection model to perform target detection on the training set and evaluate the performance of the model.

[0126] The original YOLOv8 network and the improved new YOLOv8 network were tested. The test process is as follows:

[0127] Original YOLOv8 network: Use YOLOv8s.pt weights and YOLOv8 network to iteratively train the MAR20 remote sensing dataset. The operating environment is CUDA11.8; Pytorch11.8; GPU NVIDIA GeForce RTX405016G. Model size: 22.6MB, number of parameters: 11133324, GFLOPs: 28.5.

[0128] During the model training process, after 400 training iterations, the dataset detection pictures are as follows Figure 8 As shown in the figure, 400 iterations and training under the weight s file have a large number of parameters, complex model training, and a long training time.

[0129] Experiments show that the accuracy of map50 reaches 99.5%. After 168 information processing layers, the number of parameters is 11133324 parameters, the GFLOPs reaches 28.5, and the model size is 22.6MB.

[0130] Improved YOLOv8 network: Use YOLOv8s.pt weights and YOLOv8 pure network to iteratively train the MAR20 remote sensing dataset. The operating environment: CUDA11.8; Pytorch11.8; GPUNVIDIAGeForceRTX405016G. Model size: 22.6MB, number of parameters: 11133324, GFLOPs: 28.5. MAR20 remote sensing dataset 400 iterations of training, the dataset detection diagram is as follows Fig. 9 As shown in the figure, the model training results show that: model size: 11.1MB, number of parameters: 5414380, GFLOPs: 14.9. Figure 7 As shown in the experiment, it can be seen that the accuracy of map50 reaches 99.2%.

[0131] Among them, the model size decreases: (22.6-14.9) / 22.6=34.07%;

[0132] Parameter quantity decreased: (11133324-5414380) / 11133324=51.36%;

[0133] The average precision map decreases: 0.995-0.992=0.003.

[0134] Table 1

[0135] Parameter quantity Model size GFLOPs Map50 Original yolov8 11133324 22.6MB 28.5 99.5% Improve yolov8 5414380 11.1MB 14.9 99.2%

[0136] The experimental results are shown in Table 1. On the remote sensing data set, the new network model has a model size of 14.9M, a 34.07% decrease from 22.6M of the original YOLOv8 network model; the number of model parameters has decreased by 51.36%, which is a significant effect. At the same time, the average accuracy MAP50 is 95.5%, which is about 0.003 percentage points lower than the original YOLOv8 network model. Basically, there is no reduction in accuracy.

[0137] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the present invention.

Claims

1. A traffic remote sensing target detection method, characterized in that: The following steps are involved: Step 1: Select the MAR aircraft remote sensing dataset and randomly divide it into training set, validation set, and test set according to the proportion; Step 2: Improve the backbone network of YOLOv8: Based on the YOLOv8 network foundation, replace the Conv module and C2f module in the backbone network with the DepthESPConv module, and delete the SPPF module; Step 3: Introduce the CMPS attention mechanism after the DepthESPConv layer; Step 4: Improve the YOLOv8 network neck structure: introduce the lightweight convolution Fasterblock-DualConv module and merge it with the C2f module to obtain a new C2f_DF module to replace the C2f module; Step 5: Improve the detection head of the YOLOv8 network: Use the detection head LAGCHead to replace the original detection head. The detection head LAGCHead uses the feature weight calculation of three branches, linear, spatial and channel, to achieve multi-dimensional enhancement of the input feature map; Step 6: Use the divided remote sensing data set to train the target detection model constructed in S2-S5; Step 7: Use the trained target detection model to perform target detection on the training set and evaluate the performance of the model.

2. A traffic remote sensing target detection method according to claim 1, characterized in that: In step 2, the DepthESPConv module is used as the backbone network. The DepthESPConv module includes a Conv layer and 9 DepthESPConv layers connected in series. The DepthESPConv layer combines the deep convolution DW, the point-by-point convolution PW and the SE module to achieve lightweight, and uses the h-swish activation function to replace the traditional ReLU function. The design of the DepthESPConv layer is specifically as follows: First, the input data enters the residual connection part, and the input data is divided into two paths; one DW path: after deep convolution, convolution operations are performed independently in each channel without crossing channels; the other PW path: after point-by-point convolution, using a 1x1 convolution kernel to integrate the features between channels; The output results of deep convolution and point-by-point convolution enter the SE module, which adjusts the weight of each channel through global information to enhance the representation ability of channel features; The feature map output by the SE module is concatenated and Concat is performed through feature fusion. The fused features are nonlinearly transformed through normalization and h-swish activation function. After nonlinear activation, the feature map is divided into two paths again, each of which passes through a Conv2d convolution layer and then through the Sigmoid activation function to generate two independent feature maps. The two independent feature maps are weightedly added with the output of the residual connection part to reintegrate the feature map. The integrated feature map is reduced to a global feature vector through global average pooling GAP, and the feature vector passes through a fully connected layer to output the final result.

3. A traffic remote sensing target detection method according to claim 1, characterized in that: In step 3, the CMPS attention mechanism is added after the backbone network, combining channel and position attention to calculate the attention weights in the channel dimension and spatial dimension respectively; the channel attention mechanism captures global information and adjusts each channel; the position attention mechanism adjusts the features in the spatial dimension by paying attention to different positions in the feature map. The CMPS attention mechanism process is as follows: 1) Channel Attention Mechanism: Input 1: Input feature map is processed by channel attention mechanism; Global average pooling: The input feature map undergoes a global average pooling operation to extract the global information of each channel and generate a global feature vector; Convolutional layer: The pooled feature vector is processed through a convolutional layer; Sigmoid activation function: The output of the convolutional layer passes through the Sigmoid activation function, mapping the result between 0 and 1 to generate the channel attention weight; Channel weighting: The channel attention weight is multiplied by the original input feature channel by channel to adjust the channel and highlight the channel features. The weighted output is then passed to the position attention mechanism through the connection line as one of the inputs of the position attention mechanism. 2) Position Attention Mechanism: Input: Input 2 and the feature map passed by the channel attention mechanism are fused through the Add operation; Global average pooling: Perform global average pooling on the integrated feature map in the width direction Pw and the height direction Ph to extract the global information of the spatial dimension; Concat: concatenate the two vectors Pw and Ph to generate a comprehensive feature vector; ConvBN-Swish: The concatenated feature vector is processed through a convolutional layer, batch normalization, and Swish activation function; Split: The processed feature map is split into multiple parts, corresponding to different spatial position feature maps; Sigmoid activation function: Each split feature map generates the corresponding spatial attention weight through the Sigmoid activation function; Position weighting: The spatial attention weight is multiplied by the original feature map element by element to adjust the importance of different positions in the spatial dimension; Output: The final output feature map after being processed by the position attention mechanism.

4. A traffic remote sensing target detection method according to claim 1, characterized in that: In step 4, based on the neck structure in YOLOv8, a lightweight convolution Fasterblock-DualConv module is introduced to replace the Bottleblock in the C2f module to obtain a C2f_DF module. The Fasterblock-DualConv module includes a Fasterblock module, a DualConv module, and a Conv module. The specific process of the Fasterblock-DualConv module is as follows: Input feature map, Fasterblock module performs specific convolution operation on the input feature map, selects the first or last continuous Cp channels to represent the entire feature map; DualConv module performs double-layer convolution operation on the Fasterblock module output feature map to further extract deep features; Conv module performs standard convolution operation on the DualConv module output feature map to obtain basic feature information; The input feature map is concatenated with the output features of the Conv module to obtain the output of the Fasterblock-DualConv module. The specific process of C2f_DF module is as follows: The input feature map is first processed by a convolution layer to extract basic features; the feature map processed by convolution is then transmitted to the segmentation layer for processing, and the feature map is segmented into multiple feature channels; the segmented feature map is transmitted to the Fasterblock-DualConv module, and undergoes n times of feature extraction and processing; after each processing of the Fasterblock-DualConv module, part of the feature map is transmitted to the output feature map node for skip connection or feature fusion; all feature maps processed by the Fasterblock-DualConv module are transmitted to the splicing layer, and feature maps at different levels are spliced ​​together to form a comprehensive feature map; The concatenated feature map is transmitted to the final convolutional layer for processing to obtain the final output feature map.

5. A traffic remote sensing target detection method according to claim 1, characterized in that: In step 5, the detection head LAGCHead includes three branches: a linear branch, a spatial branch and a channel branch, as follows: (1) Linear branching Global average pooling: The input features are first subjected to a global average pooling operation to extract the global information of the entire feature map; Conv: The pooled feature map passes through a 1×1 convolution layer to perform linear combinations of features between channels; h-swish: The output of the convolutional layer passes through the h-swish activation function; HardSigmoid: The result after h-swish passes through a hard Sigmoid function, which limits the output value to between 0 and 1 and is used to generate the weight of each feature; Multiplication operation: The generated weights are multiplied element-by-element by the input features to adjust the importance of the features; (2) Space branch Offset: Calculate the offset of the feature map to obtain the spatial translation of the feature map; Conv: The offset feature map passes through a 3×3 convolution layer to extract local features in the spatial dimension; Index: After the convolution operation, the feature map is indexed to rearrange or selectively output the convolved feature map; Sigmoid: Generate spatial attention weights through the Sigmoid activation function to adjust the features of different spatial positions; Multiplication operation: The generated spatial weights are multiplied element-by-element with the original input features to adjust the importance of different positions in the spatial dimension; (3) Channel branching Global average pooling: The input features are also subjected to global average pooling to extract the global information of the channel; Fully connected layer: The pooled feature map passes through two fully connected layers, and the h-swish activation function is used in the middle to combine features in the channel dimension; Normalization: The output of the fully connected layer is normalized to normalize the weights; Multiplication operation: multiply the normalized weights by the input features channel by channel to adjust the importance of each channel; Final output: The feature maps processed by multiple branches are integrated into the final output.

Citation Information

Cited By

  • Ore grinding hard rock target detection method and system based on HardRockNet network structure

    CN119672322A

  • Grinding rock target detection method and system based on HardRockNet network structure

    CN119672322B

  • Cast-in-place box girder image cross-key parameter identification method based on target detection and key information extraction

    CN119851303A

  • Cross-key parameter recognition method for cast-in-situ box girder images based on target detection and key information extraction

    CN119851303B

  • Liquid crystal screen defect detection method based on deformable convolution and feature fusion

    CN120014413A