A real-time traffic detection method for unmanned aerial vehicle visual sensing device
By using the segmentation and shuffling network SCSNet and the grouped local attention convolution GLAConv in the drone visual sensing device, the problems of scale differences and background interference when the drone is photographed at an oblique angle at high altitude are solved, and efficient traffic is achieved. Object detection balances the real-time performance and accuracy of the detector.
Patent Information
- Application Number
- CN202311542873.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-11-20
AI Technical Summary
When UAVs capture images at high altitudes at oblique angles, targets of the same category have different scales due to different distances, which increases the difficulty of detection. Traffic objects occupy a small part of large field of view images, and background information interferes seriously, causing the detector to suffer from inaccuracies in speed and accuracy. It is difficult to balance between them.
The feature extraction network SCSNet based on segmentation and shuffling and the grouped local attention convolution GLAConv are used to generate richer multi-scale representations through multi-receptive field features and attention mechanisms, suppress background information interference, and improve the real-time performance and performance of the detector. accuracy.
The lightweight backbone network design for UAV real-time traffic detection is realized, which improves the real-time performance and accuracy of the detector in complex traffic scenes, can effectively handle scale differences and background interference, and improves the fine-grained information of small target detection. Get.
Smart Images

Figure CN117557923B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence, and in particular relates to a real-time traffic detection method for a drone visual sensor device. Background Art
[0002] In recent years, drones have gradually become an important tool for solving traffic problems, thanks to their inherent flexibility and the ability to perceive the environment provided by object detection technology. Object detection technology is one of the key technologies of drone systems, which can help drones achieve comprehensive monitoring of traffic scenes or rapid handling of traffic accidents. Drones that deploy powerful intelligent algorithms (such as object detectors, multi-object trackers) usually need to independently handle some specific perception and computing tasks. However, in the ever-changing traffic scenes, the complexity of detection tasks has led to a higher demand for drone object detectors.
[0003] The main difficulties in developing product functions for traffic-oriented target characteristics are as follows:
[0004] (1) When drones take images at high altitudes and at oblique angles, even targets of the same category will have obvious scale differences due to different distances. When targets of large scale differences appear in the same image, it often increases the difficulty of detecting small targets;
[0005] (2) In drone datasets with a large field of view, traffic objects usually only occupy a small part of the image, and the vast majority of pixels in the image are composed of complex background information, such as roadside vegetation, water surface reflections, crosswalks, etc. These factors will cause significant interference to the detection process of the target detector;
[0006] (3) Compared with autonomous vehicles or roadside units, drones have many advantages such as high maneuverability and low cost, but these greatly limit their computing power and resources. Therefore, when designing object detectors, it is necessary to consider how to achieve a better balance between speed and accuracy. Summary of the invention
[0007] In order to meet the real-time detection performance in traffic scenes and further improve the applicability of UAV environment perception theory in industrial design scenes, the present invention provides a real-time traffic detection method for a UAV visual sensing device.
[0008] A real-time traffic detection method for a drone visual sensor device of the present invention is specifically as follows:
[0009] Step 1: The drone collects aerial images and divides them into training sets and test sets after preprocessing.
[0010] Step 2: Use the efficient segmentation and shuffling-based feature extraction network SCSNet to extract the feature information of drone aerial images.
[0011] Step 3: Use the grouped local attention convolution GLAConv that combines multi-receptive field features and attention mechanism to help a large amount of feature information generate richer multi-scale representations and suppress the interference of background information.
[0012] Step 4: Generate a class probability map and a series of bounding boxes with confidence scores in the prediction stage, and then use non-maximum suppression (NMS) to filter out bounding boxes with low confidence scores. The remaining bounding boxes with category labels are the final detection results.
[0013] Furthermore, the segmentation and shuffling based feature extraction network SCSNet consists of Conv convolution module and SCSBlock module;
[0014] Conv convolution module: The Conv convolution module is the basic unit in SCSNet, which is used to extract the features of the input image and construct a nonlinear feature map between the input and output. The Conv convolution module of SCSNet uses convolution kernels with a size of 3×3, 6×6 and a step size of 2 to implement downsampling operations. The Conv convolution module is mainly composed of three parts: conventional convolution layer, BN layer and SiLU function.
[0015] SCSBlock module: The SCSBlock module consists of SCSConv and cross-stage connection operations; SCSConv adopts the gradient path and performs feature aggregation only in the last stage of the computation block.
[0016] Furthermore, the grouped local attention convolution GLAConv is specifically:
[0017] Assume that the input feature space of GLAConv is First, the input feature space X is convolved with 1×1 groups of 4 to establish the correlation within the feature space of each group. Next, the obtained feature space Y is divided into 4 independent feature subspaces, and each feature subspace y is convolved separately. i Send it into LAM with different coverage rates to obtain the feature subspace m after local attention enhancement i Finally, the concatenation and shuffling operations are used to disrupt the features of different groups, and the n×n grouped convolution operation is used to establish the interaction between the features of different groups to obtain the final output feature space Z:
[0018]
[0019]
[0020] in, Represents the use of LAM for the i-th feature subspace y i The coverage is k i The local attention map, k i The sizes are set to 5, 7, 9, and 11 respectively. and They represent 1×1 grouped convolution and n×n grouped convolution respectively, and the size of n×n is 1×1 or 3×3 depending on whether GLAConv is a downsampling layer.
[0021] The beneficial technical effects of the present invention are:
[0022] 1. This paper proposes a lightweight segmentation and shuffling backbone network SCSNet and a grouped local attention convolution GLAConv to guide the real-time traffic target detection task of UAVs, achieving a good balance between real-time performance and accuracy.
[0023] 2. The segmentation and shuffling network SCSNet of the present invention obtains more fine-grained information of shallow features at the lowest cost, and better solves the balance problem between real-time performance and accuracy under the perception conditions of drone visual sensors. Unlike other advanced backbone networks, in order to break the design paradigm of heavy backbone and light neck, there is no excessive stacking of basic blocks in the backbone network. At the same time, segmentation and shuffling operations are used to reduce the number of parameters and the amount of calculation of the calculation blocks, thereby providing a more balanced detector design paradigm. This backbone network structure not only realizes frequent gradient information exchange, but also makes the detector very efficient in the feature extraction stage.
[0024] 3. The grouped local attention convolution GLAConv of the present invention establishes long-range dependencies between features through local sliding windows with different coverage rates, further refining the features of small targets in the image while avoiding the detector focusing on complex background information. Compared with the existing mainstream attention methods, GLAConv's local sliding window strategy achieves more efficient attention learning. At the same time, the architecture of multiple coverage windows makes it more capable of coping with drone aerial photography scenes with large scale differences. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The present invention combines SCSNet and GLAConv to construct a model SCSDet for real-time traffic target detection of unmanned aerial vehicles.
[0026] Figure 2 The overall structure of the SCSNet feature extraction network based on segmentation and shuffling.
[0027] Figure 3 It is the Conv convolution module structure.
[0028] Figure 4 This is the operating principle of channel shuffling.
[0029] Figure 5 It is the SCSConv convolution structure.
[0030] Figure 6 It is the SCSBlock module structure.
[0031] Figure 7 It is the local attention module LAM structure.
[0032] Figure 8 The structure of the grouped local attention convolution GLAConv.
[0033] Fig. 9 This is the effect diagram of traffic target detection. DETAILED DESCRIPTION
[0034] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0035] Based on the characteristics of the drone dataset, this paper designs a new backbone network SCSNet based on segmentation and shuffling, and combines the advantages of multi-scale design and attention mechanism to propose a grouped local attention convolution GLAConv. Combining SCSNet and GLAConv, a model SCSDet for real-time traffic target detection of drones is constructed. Figure 1 shown.
[0036] A real-time traffic detection method for a drone visual sensor device of the present invention is specifically as follows:
[0037] Step 1: The drone collects aerial images and divides them into training sets and test sets after preprocessing.
[0038] Step 2: Use the efficient segmentation and shuffling-based feature extraction network SCSNet to extract the feature information of drone aerial images.
[0039] SCSNet, a feature extraction network based on segmentation and shuffling.
[0040] In complex traffic scenarios, drones need to be able to quickly and accurately detect key information about the surrounding environment. Therefore, with the rapid development of drones and artificial intelligence technology, higher requirements are placed on the accuracy and real-time performance of drone detectors. In order to achieve high-precision and high-real-time drone detectors, a new lightweight backbone network design paradigm is proposed: a feature extraction network SCSNet based on segmentation and shuffling. The overall structure of the network is as follows: Figure 2As shown in the figure, C1 is the input feature, C5 is the output feature, and C2-C4 represent the intermediate features. It can be found that the designed SCSNet network is mainly composed of Conv convolution module and SCS Block module, which are as follows:
[0041] (1) Conv convolution module: The Conv module is the basic unit in SCSNet, which is mainly used to extract the features of the input image and construct a nonlinear feature map between the input and output. The Conv convolution module of SCSNet uses convolution kernels with a size of 3×3, 6×6 and a step size of 2 to implement downsampling operations. The Conv convolution module mainly consists of three parts: the conventional convolution layer, the BN layer, and the SiLU function. Its structure is as follows: Figure 3 shown.
[0042] (2) SCSBlock module: In the feature fusion solution of traditional detectors, excessive use of pixel-level addition operations will bring additional memory access costs. The channel-level concat operation involves the use of additional transformation layers to limit the number of output channels, but the inconsistency between the input and output channels of the transformation layer limits the propagation speed of the network. To avoid the above problems, channel splitting operations and channel shuffling operations are introduced to avoid using too many transformation layers. The channel splitting operation refers to splitting the input features into several groups from the channel dimension, while the channel shuffling operation refers to shuffling the feature maps in different groups. Figure 4 Demonstrates the principle of the shuffle operation.
[0043] Among them, grouping refers to dividing the input features into N groups from the channel dimension and performing dimensional transformation. Transposition refers to transposing the feature information and concatenating them according to the number of groups to form the final output features.
[0044] Based on the above segmentation and shuffling operations, a lightweight segmentation and shuffling convolution SCSConv is first proposed. Figure 5 As shown in Figure 2, SCSConv divides the input feature space into a reinforcement branch and a cross-connection branch through a split operation.
[0045] The reinforcement branch uses 1×1 convolution and 3×3 convolution to extract the feature space of the first part after segmentation. The feature space of the second part in the cross-connection branch is directly concatenated with the output of the reinforcement branch. In the final output stage, a shuffle operation is used to establish a dependency between the two branches.
[0046] Based on the proposed SCSConv, an effective gradient path is designed and an efficient basic module SCSBlock is proposed. SCSBlock undertakes most of the feature extraction work in SCSNet. Its structure is as follows Figure 6 shown.
[0047] The SCSBlock module consists of SCSConv and cross-stage connection operations. First, feature aggregation is performed only in the last stage of the computational block (the dashed part on the right of the figure) to ensure efficient parallel computation. In addition, local operations with cross-stage connections are used to avoid excessive reuse of gradient information from different layers. Unlike other backbone networks, in order to break the design paradigm of heavy backbone and light neck, there is no excessive stacking of basic blocks in the backbone network. At the same time, splitting and shuffling operations are used to reduce the number of parameters and the amount of computation of the computational blocks, in this way to provide a more balanced detector design paradigm. This backbone network structure not only realizes frequent gradient information exchange, but also makes the detector very efficient in the feature extraction stage.
[0048] Step 3: Use the grouped local attention convolution GLAConv that combines multi-receptive field features and attention mechanism to help a large amount of feature information generate richer multi-scale representations and suppress the interference of background information.
[0049] Compared with general natural shooting scenes, drones can cover a wider area at high altitudes, that is, they have a larger field of view. However, this large field of view also leads to a problem that cannot be ignored, that is, small-scale traffic targets often only occupy a very small area in the image, while the vast majority of pixels in the image are background information irrelevant to the detection task. In this case, the detector needs to deal with more interference from background information, which increases the computational complexity and time cost, thereby reducing the real-time performance and accuracy of the algorithm.
[0050] To address the above issues, a grouped local attention convolution GLAConv is proposed to help the detector suppress the interference of background information as much as possible. The core component of GLAConv is the local attention module LAM, which is a mixed domain attention module. At present, mainstream attention modules such as SE, CBAM, CA, etc. mostly enhance the features of the region of interest by summarizing the information of all positions in the image through a global window. However, in aerial images with higher image resolution, the computational complexity of this method is also relatively higher. Therefore, in order to overcome this problem, LAM designs a local sliding window strategy to calculate the channel interaction and spatial interaction within the coverage domain. Its structure is as follows: Figure 7 shown.
[0051] LAM can be divided into two parts: local channel attention and local spatial attention. Assume that the input feature space of LAM is First, the local channel attention is weighted, and the input feature space Y is compressed into a one-dimensional feature vector along the spatial dimension using the global average pooling operation. Then, the coverage rate is k iThe 1D convolution is used to obtain the local cross-channel interaction of the feature vector, and the attention weights of different channels are obtained after normalization using the Sigmoid activation function. Finally, the original input feature space Y is multiplied by the local channel attention weight to perform the channel weighting operation of the feature space, and the feature space H after local channel attention enhancement can be obtained:
[0052]
[0053] Among them, F c (·) represents the local channel attention map, The coverage is k i 1D convolution, σ represents the Sigmoid activation function, Represents a global average pooling operation.
[0054] Next, we further use local spatial attention to highlight the feature expression of important areas. We use global average pooling and global maximum pooling operations to compress the input feature space H into a two-dimensional feature map along the channel dimension. Then, we use a coverage of k i The 2D convolution is used to scan the compressed feature map to establish local spatial interactions. Similarly, the Sigmoid activation function is used to perform normalization operations to obtain the attention weights of different spatial regions. Finally, the local spatial attention weights are used to perform spatial weighted operations on the input feature space H to obtain the final output feature space M:
[0055]
[0056] Among them, F s (·) represents the local spatial attention map, The coverage is k i 2D convolution, σ represents the sigmoid activation function, and They represent the global average pooling operation and the global maximum pooling operation respectively.
[0057] LAM deeply explores the important information inside the input features along the two dimensions of channel and space, and can control the coverage k i The size of determines the scope of attention prediction. However, a single coverage is not enough to cover all scenarios of UAV traffic target detection tasks. Therefore, based on LAM, a grouped local attention convolution GLAConv with a series of different coverage windows is further proposed. The structure of GLAConv is as follows Figure 8 shown.
[0058] Assume that the input feature space of GLAConv is First, the input feature space X is convolved with 1×1 groups of 4 to establish the correlation within the feature space of each group. Next, the obtained feature space Y is divided into 4 independent feature subspaces, and each feature subspace y is convolved separately. i Send it into LAM with different coverage rates to obtain the feature subspace m after local attention enhancement i Finally, the concatenation and shuffling operations are used to disrupt the features of different groups, and the n×n grouped convolution operation is used to establish the interaction between the features of different groups to obtain the final output feature space Z:
[0059]
[0060]
[0061] in, Represents the use of LAM for the i-th feature subspace y i The coverage is k i The local attention map, k i The sizes are set to 5, 7, 9, and 11 respectively. and They represent 1×1 grouped convolution and n×n grouped convolution respectively, and the size of n×n is 1×1 or 3×3 depending on whether GLAConv is a downsampling layer.
[0062] GLAConv enables the detector to selectively process information and invest limited resources more in the area of interest to obtain more detailed information about small-scale traffic targets. Finally, the proposed GLAConv is deployed in the feature fusion part of the detector to establish effective long-range dependencies for it during the feature fusion process.
[0063] Step 4: Generate a class probability map and a series of bounding boxes with confidence scores in the prediction stage, and then use non-maximum suppression (NMS) to filter out bounding boxes with low confidence scores. The remaining bounding boxes with category labels are the final detection results.
[0064] The real-time traffic target detection method of the UAV of the present invention has been applied to the visual sensor device carried by the UAV and used in conjunction with the UAV visual detection task. The effect is as follows: Fig. 9 shown.
[0065] The present invention proposes a novel lightweight backbone network: the Segmentation and Shuffle Network (SCSNet), which aims to obtain high-quality feature extraction with low-cost segmentation and shuffle operations, and designs an efficient feature transfer path from the perspective of gradient utilization to obtain gradient combinations that are more beneficial to small-scale traffic objects and a smaller computational burden.
[0066] Combining multi-receptive field features and attention mechanism, a grouped local attention convolution GLAConv is designed. This method refines important information about small-scale traffic objects in deep neural networks by setting a series of convolution kernels with different coverage rates, which is very beneficial for the detector to simultaneously detect targets of different scales and distinguish potential sensitive areas from non-sensitive areas.
Claims
1. A real-time traffic detection method for a drone visual sensor device, characterized in that: Specifically: Step 1: The drone collects aerial images and divides them into training sets and test sets after preprocessing; Step 2: Use the efficient segmentation and shuffling network SCSNet to extract the feature information of the drone aerial image; Based on the segmentation and shuffling network SCSNet consists of several Conv convolution modules and SCS Block modules; Conv convolution module: The Conv convolution module is the basic unit in SCSNet, which is used to extract the features of the input image and construct a nonlinear feature map between the input and output. The Conv convolution module of SCSNet uses convolution kernels with a size of 3×3, 6×6 and a step size of 2 to implement downsampling operations. The Conv convolution module is mainly composed of three parts: the conventional convolution layer, the BN layer, and the SiLU function. SCSBlock module: The structure of the SCSBlock module consists of several SCSConv modules, Conv modules, and cross-stage connection operations. SCSConv adopts the gradient path and performs feature aggregation only in the last stage of the computation block; SCSConv divides the input feature space into a reinforcement branch and a cross-connection branch through a segmentation operation. The reinforcement branch uses 1×1 convolution and 3×3 convolution to extract the feature space of the first part after segmentation, and the feature space of the second part in the cross-connection branch is directly spliced with the output of the reinforcement branch. Step 3: Use the grouped local attention convolution GLAConv that combines multi-receptive field features and attention mechanism to help a large amount of feature information generate richer multi-scale representations and suppress the interference of background information; The grouped local attention convolution GLAConv consists of a grouped convolution layer, a local attention module LAM layer, and split and shuffle operations; The local attention module LAM consists of global average pooling, global maximum pooling, convolutional layer and Sigmoid activation function; Step 4: Generate a class probability map and a series of bounding boxes with confidence scores in the prediction stage, and then use non-maximum suppression (NMS) to filter out bounding boxes with low confidence scores. The remaining bounding boxes with category labels are the final detection results.
2. A real-time traffic detection method for a drone visual sensor device according to claim 1, characterized in that: The grouped local attention convolution GLAConv is specifically: Assume that the input feature space of GLAConv is First, the input feature space X is convolved with 1×1 groups of 4 to establish the correlation within the feature space of each group. Next, the obtained feature space Y is divided into 4 independent feature subspaces, and each feature subspace y is convolved separately. i Send it to the local attention module LAM with different coverage rates to obtain the feature subspace m after local attention enhancement i Finally, the concatenation and shuffling operations are used to disrupt the features of different groups, and the n×n grouped convolution operation is used to establish the interaction between the features of different groups to obtain the final output feature space Z: in, Represents the use of LAM for the i-th feature subspace y i The coverage is k i The local attention map, k i The sizes are set to 5, 7, 9, and 11 respectively. and They represent 1×1 grouped convolution and n×n grouped convolution respectively, and the size of n×n is 1×1 or 3×3 depending on whether GLAConv is a downsampling layer.
