Traffic sign detection method based on high-resolution network and lightweight attention mechanism

By adopting high-resolution network and light attention mechanism in traffic sign detection, the problems of calculation consumption and hyperparameter adjustment of Anchor-Based model are solved, and more efficient and accurate traffic sign detection is achieved.

CN114267025BActive Publication Date: 2025-02-14TIANJIN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111487758.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-02-14
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The current target detection Anchor-Based model consumes a lot of computing resources when calculating the anchor box, and the setting of the anchor box hyperparameters has a great impact on the detection performance, resulting in manual adjustments on different data sets.

Method used

Traffic sign detection method based on high-resolution network and light attention mechanism is adopted, feature extraction and fusion is performed through high-resolution networks, and a lightweight attention mechanism is introduced to enhance detection performance.

Benefits of technology

Improve the accuracy and efficiency of traffic sign detection, reduce the consumption of computing resources, and eliminate the need to manually adjust the anchor box hyperparameters to adapt to different data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114267025B_ABST
    Figure CN114267025B_ABST
Patent Text Reader

Abstract

A traffic sign detection method based on a high-resolution network and a lightweight attention mechanism includes: constructing a data set and performing data preprocessing to form a training set and a test set; building a traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism, including: an input unit, a multi-resolution network unit for extracting image features, a multi-resolution network output fusion unit for fusing multi-scale features, and an output prediction unit connected in series. The training set is used to train the traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism; the test set is used to test the traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism. In the present invention, in a high-resolution network, the high-resolution representation is maintained by connecting high-resolution to low-resolution convolutions in parallel, and the high-resolution representation is enhanced by repeatedly fusing multi-scale features across parallel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a traffic sign detection method, and more particularly to a traffic sign detection method based on a high-resolution network and a lightweight attention mechanism. Background Art

[0002] Traffic signs contain a wealth of traffic information, such as speed limits, road condition prompts, pedestrian condition prompts, etc. They are one of the important facilities on the road, which can help drivers better understand real-time road information, thereby reducing traffic congestion and traffic accidents. Traffic sign detection is also an important function in autonomous driving systems. In practical applications, due to the regular shape and bright colors of traffic signs, domestic and foreign scholars mainly solved the problem of traffic sign detection by combining multiple image processing methods in the early stages of research. In recent years, with the development of computers and the continuous improvement of hardware levels, detection methods based on neural networks have been widely used and have occupied an important position in the field of traffic sign detection.

[0003] The patent "A traffic sign detection method based on YOLOv4 algorithm" (China, 202110676065.8) reduces the number of model parameters by using a lightweight backbone instead of the original YOLOv4 backbone; the patent "A traffic sign detection method based on regional attention" (China, 202110425906.8) increases the detection accuracy by introducing an attention mechanism in FasterR-CNN. The above method adopts the Anchor-Based detection model, which regresses the boundary of the target by setting dense anchor boxes on the feature map. The Anchor-Based model has a high recall rate, but it also spends a lot of computing resources when calculating the anchor box. At the same time, the setting of the anchor box hyperparameters (such as the number, size, and aspect ratio of the anchor box) has a great influence on the target detection performance. Therefore, when using the Anchor-Based model, the hyperparameters of the anchor box need to be manually adjusted according to different data sets. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a traffic sign detection method based on a high-resolution network and a lightweight attention mechanism, which can directly predict the category and position of the target in view of the shortcomings of the current anchor-based model for target detection.

[0005] The technical solution adopted by the present invention is: a traffic sign detection method based on a high-resolution network and a lightweight attention mechanism, comprising the following steps:

[0006] Step 1: Build a data set and perform data preprocessing to form a training set and a test set;

[0007] Step 2: Build a traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism, including the following connected in sequence: an input unit, a multi-resolution network unit for extracting image features, a multi-resolution network output fusion unit for fusing multi-scale features, and an output prediction unit.

[0008] Step 3: Use the training set obtained in step 1 to train the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism;

[0009] Step 4: Use the test set obtained in step 1 to test the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism.

[0010] The data set described in step 1 is a Chinese traffic sign data set TT100K published by Tsinghua University and Tencent, which contains 45 types of traffic signs with an appearance frequency greater than 100 and is used for training and testing the neural network; the data preprocessing is to randomly crop the original image into an image of 512×512 pixels according to the area where the traffic sign is located, and the cropped image contains more than one traffic sign, and the annotation of the traffic sign detection frame in the cropped image is obtained according to the original annotation file; the incomplete traffic sign in the cropped image is used to simulate the situation when the traffic sign is blocked.

[0011] A traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism is built through the deep learning framework PyTorch. The input unit includes: the input original image is subjected to a 7×7 convolution layer to perform preliminary extraction of shallow features to obtain a feature map, and the convolution kernel size of the convolution layer is 7×7, the step size is 2, and the number of output channels is 64; the feature map is then sequentially passed through a BN layer to prevent gradient disappearance, a RELU activation function layer, and a maximum pooling layer with a step size of 2 and a pooling window of 2×2, and the feature map constitutes the input of the multi-resolution network unit.

[0012] The multi-resolution network unit described in step 2 includes:

[0013] After the received feature map is subjected to feature extraction again by the first light attention mechanism residual block, it enters the second light attention mechanism residual block and enters the third light attention mechanism residual block through the first pooling convolution layer respectively. The outputs of the second light attention mechanism residual block and the third light attention mechanism residual block enter the first fusion module and the second fusion module respectively. The output of the first fusion module enters the fourth light attention mechanism residual block, and the output of the second fusion module enters the fifth light attention mechanism residual block. The output of the third light attention mechanism residual block also enters the sixth light attention mechanism residual block through the second pooling convolution layer. The outputs of the fourth light attention mechanism residual block, the fifth light attention mechanism residual block and the sixth light attention mechanism residual block enter the third fusion module, the first fusion module and the second fusion module respectively. Four fusion modules and a fifth fusion module, the output of the third fusion module enters the seventh light attention mechanism residual block, the output of the fourth fusion module enters the eighth light attention mechanism residual block, the output of the fifth fusion module enters the ninth light attention mechanism residual block, the output of the sixth light attention mechanism residual block also enters the tenth light attention mechanism residual block through the third pooling convolution layer, the outputs of the seventh light attention mechanism residual block, the eighth light attention mechanism residual block, the ninth light attention mechanism residual block and the tenth light attention mechanism residual block all enter the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module respectively, and the outputs of the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module enter the multi-resolution network output fusion unit.

[0014] The first light attention mechanism residual block, the second light attention mechanism residual block, the third light attention mechanism residual block, the fourth light attention mechanism residual block, the fifth light attention mechanism residual block, the sixth light attention mechanism residual block, the seventh light attention mechanism residual block, the eighth light attention mechanism residual block, the ninth light attention mechanism residual block and the tenth light attention mechanism residual block have the same structure, and are all composed of four light attention mechanism residual layers connected in series in sequence. The residual mapping part of each light attention mechanism residual layer has two 3×3 convolution modules connected in series, and the direct mapping part of the first light attention mechanism residual layer has a 1×1 convolution module that processes the received feature map. The direct mapping parts of the following three light attention mechanism residual layers do not process the received feature maps. The outputs of the residual mapping part and the direct mapping part of each light attention mechanism residual layer are added and enter the light attention mechanism module. The light attention mechanism module constitutes the output of the light attention mechanism residual layer.

[0015] The first pooling convolution layer, the second pooling convolution layer and the third pooling convolution layer have the same structure, and all include an average pooling layer, a 1×1 convolution layer, a BN layer and a RELU layer connected in series.

[0016] The first fusion module, the second fusion module, the third fusion module, the fourth fusion module, the fifth fusion module, the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module have the same structure, and all of them add corresponding elements of the received multiple feature maps.

[0017] The multi-resolution network output fusion unit for fusing multi-scale features described in step 2 includes: a first bilinear interpolation, a second bilinear interpolation, a third bilinear interpolation, a channel dimension splicing layer and a lightweight attention mechanism, wherein the first bilinear interpolation, the second bilinear interpolation, and the third bilinear interpolation correspond to the outputs of the seventh fusion module, the eighth fusion module, and the ninth fusion module in the multi-resolution network unit respectively, and the outputs of the first bilinear interpolation, the second bilinear interpolation, and the third bilinear interpolation and the output of the sixth fusion module in the multi-resolution network unit enter the lightweight attention mechanism through the channel dimension splicing layer together, and the output of the lightweight attention mechanism enters the output prediction unit.

[0018] The lightweight attention mechanism module includes: a first path consisting of a global average pooling layer, a first compression layer, a first one-dimensional convolution layer and a first dimensional expansion layer connected in series, and a second path consisting of a global maximum pooling layer, a second compression layer, a second one-dimensional convolution layer and a second dimensional expansion layer connected in series, wherein the global average pooling layer and the global maximum pooling layer receive input feature maps, and the output feature maps of the first path and the second path are added and then multiplied with the input feature map after passing through a Sigmoid layer to obtain the output of the lightweight attention mechanism module.

[0019] The output prediction unit described in step 2 includes three branches with the same structure, each of which is composed of a 3×3 convolution module and a 1×1 convolution module connected in series. The inputs of the three branches are connected to the output of the multi-resolution network output fusion unit. The first branch is used to predict the center point position of 45 types of traffic sign detection frames; the second branch is used to predict the width and height of each type of traffic sign; the third branch is used to predict the offset of the center point; the prediction information of these three branches represents the position and type of traffic signs in the image.

[0020] The traffic sign detection method based on a high-resolution network and a lightweight attention mechanism of the present invention uses a high-resolution network for feature extraction and fusion. In the high-resolution network, the high-resolution representation is maintained by connecting high-resolution to low-resolution convolutions in parallel, and the high-resolution representation is enhanced by repeated cross-parallel multi-scale feature fusion. The feature map finally output by the neural network has information on targets of various sizes, which can not only easily distinguish large-sized targets, but also improve the detection effect of small targets. The present invention utilizes a lightweight attention mechanism. The channel attention mechanism realizes the interaction of adjacent channels through one-dimensional convolution. The parameters introduced by one-dimensional convolution in the model are small, and the importance between channels can be captured. On this basis, the weights of important channel parameters are increased, and the weights of non-important channel parameters are reduced, so that the neural network focuses on important parameters. The present invention has the following beneficial effects:

[0021] 1. The neural network connects high-resolution to low-resolution units in parallel, and can maintain multi-resolution expression during feature map extraction, fully considering the multi-scale characteristics of traffic signs in real scenes, and the predicted heat map is more accurate in space.

[0022] 2. An information exchange path is introduced into the parallel multi-resolution units, so each unit can obtain multi-scale feature information from other units, and each unit has stronger multi-scale feature representation capabilities.

[0023] 3. The basic module in the neural network is the residual module with a lightweight attention mechanism. The lightweight attention mechanism is implemented through one-dimensional convolution, which introduces only a small number of parameters and uses both average pooling and maximum pooling in global pooling to more fully consider the feature information of each channel. In traffic sign detection, the attention mechanism increases the weight of channels that are more effective for detection and reduces the weight of invalid channels, thereby improving detection performance.

[0024] 4. When multi-resolution unit outputs are fused, the output features of each unit are connected in the channel dimension to retain the feature information of each unit, and the weight of the effective unit channel is increased through a lightweight channel attention mechanism to more effectively retain and utilize multi-scale features. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a structural diagram of a traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism of the present invention;

[0026] Figure 2 It is a schematic diagram of the structure of the pooling convolution layer in the present invention;

[0027] Figure 3 It is a schematic diagram of the structure of a 3×3 convolution module in the present invention;

[0028] Figure 4 It is a schematic diagram of the structure of a 1×1 convolution module in the present invention;

[0029] Figure 5 Schematic diagram of the residual block structure of the lightweight attention mechanism in the present invention;

[0030] Figure 6 It is a schematic diagram of the structure of the lightweight attention mechanism in the present invention;

[0031] Figure 7 It is a rendering of the effect of adopting the method of the present invention. DETAILED DESCRIPTION

[0032] The traffic sign detection method based on a high-resolution network and a lightweight attention mechanism of the present invention is described in detail below in conjunction with the embodiments and drawings.

[0033] The traffic sign detection method based on high-resolution network and lightweight attention mechanism of the present invention comprises the following steps:

[0034] Step 1: Construct a data set and perform data preprocessing to form a training set and a test set;

[0035] The data set is a Chinese traffic sign data set TT100K published by Tsinghua University and Tencent, which contains 45 types of traffic signs with a frequency of more than 100, and is used for training and testing neural networks; the data preprocessing is to randomly crop the original image into a 512×512 pixel image according to the area where the traffic sign is located, and the cropped image contains more than one traffic sign, and the annotation of the traffic sign detection frame in the cropped image is obtained according to the original annotation file; the incomplete traffic sign in the cropped image is used to simulate the situation when the traffic sign is blocked, and no additional processing is required. This step of preprocessing makes the network focus more on the learning of foreground features. In addition, the image resolution of the input network is reduced, so the training speed is improved and the requirements for GPU video memory are reduced.

[0036] Step 2: Build a traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism, such as Figure 1 As shown, it includes: an input unit 1, a multi-resolution network unit 2 for extracting image features, a multi-resolution network output fusion unit 3 for fusing multi-scale features, and an output prediction unit 4 connected in series. The present invention uses the deep learning framework PyTorch to build a traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism, wherein:

[0037] (1) The input unit 1 includes: the input original image is subjected to a 7×7 convolution layer for preliminary extraction of shallow features to obtain a feature map, the convolution kernel size of the convolution layer is 7×7, the step size is 2, and the number of output channels is 64; the feature map is then sequentially subjected to a BN layer to prevent gradient disappearance, a RELU activation function layer, and a maximum pooling layer with a step size of 2 and a pooling window of 2×2, and the feature map after the feature map constitutes the input of the multi-resolution network unit 2.

[0038] (2) The multi-resolution network unit 2 comprises:

[0039] After the received feature map is subjected to feature extraction again by the first light attention mechanism residual block, it enters the second light attention mechanism residual block and enters the third light attention mechanism residual block through the first pooling convolution layer respectively. The outputs of the second light attention mechanism residual block and the third light attention mechanism residual block enter the first fusion module and the second fusion module respectively. The output of the first fusion module enters the fourth light attention mechanism residual block, and the output of the second fusion module enters the fifth light attention mechanism residual block. The output of the third light attention mechanism residual block also enters the sixth light attention mechanism residual block through the second pooling convolution layer. The outputs of the fourth light attention mechanism residual block, the fifth light attention mechanism residual block and the sixth light attention mechanism residual block enter the third fusion module, the first fusion module and the second fusion module respectively. The output of the third fusion module enters the seventh light attention mechanism residual block, the output of the fourth fusion module enters the eighth light attention mechanism residual block, the output of the fifth fusion module enters the ninth light attention mechanism residual block, the output of the sixth light attention mechanism residual block also enters the tenth light attention mechanism residual block through the third pooling convolution layer, the outputs of the seventh light attention mechanism residual block, the eighth light attention mechanism residual block, the ninth light attention mechanism residual block and the tenth light attention mechanism residual block enter the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module respectively, and the outputs of the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module enter the multi-resolution network output fusion unit 3. Among them,

[0040] The first light attention mechanism residual block, the second light attention mechanism residual block, the third light attention mechanism residual block, the fourth light attention mechanism residual block, the fifth light attention mechanism residual block, the sixth light attention mechanism residual block, the seventh light attention mechanism residual block, the eighth light attention mechanism residual block, the ninth light attention mechanism residual block and the tenth light attention mechanism residual block described in (2.1) have the same structure, such as Figure 5As shown, they are all composed of four lightweight attention mechanism residual layers connected in series, the residual mapping part of each lightweight attention mechanism residual layer has two 3×3 convolution modules connected in series, the direct mapping part of the first lightweight attention mechanism residual layer has a 1×1 convolution module for processing the received feature map, and the direct mapping parts of the following three lightweight attention mechanism residual layers do not process the received feature maps. The outputs of the residual mapping part and the direct mapping part of each lightweight attention mechanism residual layer are added and enter the lightweight attention mechanism module, and the lightweight attention mechanism module constitutes the output of the lightweight attention mechanism residual layer.

[0041] like Figure 6 As shown, the lightweight attention mechanism module includes: a first path consisting of a global average pooling layer, a first compression layer, a first one-dimensional convolution layer and a first dimensional expansion layer connected in series, and a second path consisting of a global maximum pooling layer, a second compression layer, a second one-dimensional convolution layer and a second dimensional expansion layer connected in series, wherein the global average pooling layer and the global maximum pooling layer receive input feature maps, and the output feature maps of the first path and the second path are added and then multiplied with the input feature map after passing through the Sigmoid layer to obtain the output of the lightweight attention mechanism module.

[0042] (2.2) If Figure 2 As shown, the first pooling convolution layer, the second pooling convolution layer and the third pooling convolution layer have the same structure, and all include an average pooling layer, a 1×1 convolution layer, a BN layer and a RELU layer connected in series.

[0043] The first fusion module, the second fusion module, the third fusion module, the fourth fusion module, the fifth fusion module, the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module described in (2.3) have the same structure, and all of them add corresponding elements of the received multiple feature maps.

[0044] (3) The multi-resolution network output fusion unit 3 for fusing multi-scale features comprises: a first bilinear interpolation, a second bilinear interpolation, a third bilinear interpolation, a channel dimension splicing layer and a lightweight attention mechanism module. The first bilinear interpolation, the second bilinear interpolation and the third bilinear interpolation respectively correspond to the outputs of the seventh fusion module, the eighth fusion module and the ninth fusion module in the multi-resolution network unit 2. The outputs of the first bilinear interpolation, the second bilinear interpolation and the third bilinear interpolation and the output of the sixth fusion module in the multi-resolution network unit 2 enter the lightweight attention mechanism through the channel dimension splicing layer. The output of the lightweight attention mechanism enters the output prediction unit 4.

[0045] The lightweight attention mechanism module includes: a first path consisting of a global average pooling layer, a first compression layer, a first one-dimensional convolution layer and a first dimensional expansion layer connected in series, and a second path consisting of a global maximum pooling layer, a second compression layer, a second one-dimensional convolution layer and a second dimensional expansion layer connected in series, wherein the global average pooling layer and the global maximum pooling layer receive input feature maps, and the output feature maps of the first path and the second path are added and then multiplied with the input feature map after passing through a Sigmoid layer to obtain the output of the lightweight attention mechanism module.

[0046] (4) The output prediction unit 4 includes three branches with the same structure. Each branch is composed of a 3×3 convolution module and a 1×1 convolution module connected in series. The inputs of the three branches are connected to the output of the multi-resolution network output fusion unit 3. The first branch is used to predict the center point position of 45 types of traffic sign detection frames; the second branch is used to predict the width and height of each type of traffic sign; the third branch is used to predict the offset of the center point; the prediction information of these three branches represents the position and type of the traffic sign in the image.

[0047] 3×3 convolutional modules and 1×1 convolutional modules are as follows Figure 3 , Figure 4 shown.

[0048] Step 3: Use the training set obtained in step 1 to train the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism; obtain the category information of the traffic sign and the position information of the detection frame through forward propagation. Calculate the error between the traffic sign category and position information predicted by the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism and the label information in the real traffic sign. The error term is back-propagated from the output layer to the hidden layer layer by layer, and the neural network parameters are updated, and the ADAM optimizer is used for continuous feedback optimization.

[0049] During training, a batch contains 4 images, the number of iterations is set to 120, that is, the entire model needs to be trained for 120 rounds, and the initial learning rate is set to , and at the 60th iteration, it decays to . Save the trained model parameters.

[0050] Step 4: Use the test set obtained in step 1 to test the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism;

[0051] The precision and recall are used to measure the effect of the traffic sign detection method based on high-resolution network and lightweight attention mechanism of the present invention. After inputting 3073 test set images for detection and calculation, the precision is calculated to be 0.91 and the recall is calculated to be 0.93.

Claims

1. A traffic sign detection method based on high-resolution network and lightweight attention mechanism, characterized in that: The steps include: Step 1: Build a data set and perform data preprocessing to form a training set and a test set; Step 2: Build a traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism, including: an input unit (1), a multi-resolution network unit for extracting image features (2), a multi-resolution network output fusion unit for fusing multi-scale features (3), and an output prediction unit (4) connected in series; wherein: The multi-resolution network unit (2) comprises: after the received feature map is subjected to feature extraction again by the first light attention mechanism residual block, the feature map enters the second light attention mechanism residual block and enters the third light attention mechanism residual block through the first pooling convolution layer respectively; the outputs of the second light attention mechanism residual block and the third light attention mechanism residual block enter the first fusion module and the second fusion module respectively; the output of the first fusion module enters the fourth light attention mechanism residual block; the output of the second fusion module enters the fifth light attention mechanism residual block; the output of the third light attention mechanism residual block also enters the sixth light attention mechanism residual block through the second pooling convolution layer; the outputs of the fourth light attention mechanism residual block, the fifth light attention mechanism residual block and the sixth light attention mechanism residual block enter the first fusion module and the second fusion module respectively; a third fusion module, a fourth fusion module and a fifth fusion module, the output of the third fusion module enters the seventh light attention mechanism residual block, the output of the fourth fusion module enters the eighth light attention mechanism residual block, the output of the fifth fusion module enters the ninth light attention mechanism residual block, the output of the sixth light attention mechanism residual block also enters the tenth light attention mechanism residual block through the third pooling convolution layer, the outputs of the seventh light attention mechanism residual block, the eighth light attention mechanism residual block, the ninth light attention mechanism residual block and the tenth light attention mechanism residual block all enter the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module respectively, and the outputs of the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module enter the multi-resolution network output fusion unit (3); The first light attention mechanism residual block, the second light attention mechanism residual block, the third light attention mechanism residual block, the fourth light attention mechanism residual block, the fifth light attention mechanism residual block, the sixth light attention mechanism residual block, the seventh light attention mechanism residual block, the eighth light attention mechanism residual block, the ninth light attention mechanism residual block and the tenth light attention mechanism residual block have the same structure, and are all composed of four light attention mechanism residual layers connected in series in sequence, and the residual mapping part of each light attention mechanism residual layer has two 3×3 convolution modules connected in series, and the direct mapping part of the first light attention mechanism residual layer has a 1×1 convolution module for processing the received feature map, and the direct mapping parts of the following three light attention mechanism residual layers do not process the received feature maps, and the outputs of the residual mapping part and the direct mapping part of each light attention mechanism residual layer are added and enter the light attention mechanism module, and the light attention mechanism module constitutes the output of the light attention mechanism residual layer; The multi-resolution network output fusion unit (3) for fusing multi-scale features comprises: a first bilinear interpolation, a second bilinear interpolation, a third bilinear interpolation, a channel dimension splicing layer and a lightweight attention mechanism, wherein the first bilinear interpolation, the second bilinear interpolation and the third bilinear interpolation respectively correspond to receiving the outputs of the seventh fusion module, the eighth fusion module and the ninth fusion module in the multi-resolution network unit (2), the outputs of the first bilinear interpolation, the second bilinear interpolation and the third bilinear interpolation and the output of the sixth fusion module in the multi-resolution network unit (2) enter the lightweight attention mechanism through the channel dimension splicing layer, and the output of the lightweight attention mechanism enters the output prediction unit (4); The lightweight attention mechanism module includes: a first path consisting of a global average pooling layer, a first compression layer, a first one-dimensional convolution layer and a first dimensional expansion layer connected in series, and a second path consisting of a global maximum pooling layer, a second compression layer, a second one-dimensional convolution layer and a second dimensional expansion layer connected in series, wherein the global average pooling layer and the global maximum pooling layer receive input feature maps, and the output feature maps of the first path and the second path are added and then multiplied with the input feature map after passing through a Sigmoid layer to obtain the output of the lightweight attention mechanism module; Step 3: Use the training set obtained in step 1 to train the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism; Step 4: Use the test set obtained in step 1 to test the traffic sign recognition neural network model based on high-resolution network and lightweight attention mechanism.

2. The traffic sign detection method based on high-resolution network and lightweight attention mechanism according to claim 1 is characterized in that: The data set described in step 1 is a Chinese traffic sign data set TT100K published by Tsinghua University and Tencent, which contains 45 types of traffic signs with an appearance frequency greater than 100 and is used for training and testing the neural network; the data preprocessing is to randomly crop the original image into an image of 512×512 pixels according to the area where the traffic sign is located, and the cropped image contains more than one traffic sign, and the annotation of the traffic sign detection frame in the cropped image is obtained according to the original annotation file; the incomplete traffic sign in the cropped image is used to simulate the situation when the traffic sign is blocked.

3. The traffic sign detection method based on high-resolution network and lightweight attention mechanism according to claim 1 is characterized in that: Step 2 is to build a traffic sign recognition neural network model based on a high-resolution network and a lightweight attention mechanism through a deep learning framework PyTorch. The input unit (1) includes: the input original image is subjected to a 7×7 convolution layer to perform preliminary extraction of shallow features to obtain a feature map, the convolution kernel size of the convolution layer is 7×7, the step size is 2, and the number of output channels is 64; the feature map is then sequentially subjected to a BN layer to prevent gradient disappearance, a RELU activation function layer, and a maximum pooling layer with a step size of 2 and a pooling window of 2×2, and the feature map after the feature map constitutes the input of the multi-resolution network unit (2).

4. The traffic sign detection method based on high-resolution network and lightweight attention mechanism according to claim 1 is characterized in that: The first pooling convolution layer, the second pooling convolution layer and the third pooling convolution layer have the same structure, and all include an average pooling layer, a 1×1 convolution layer, a BN layer and a RELU layer connected in series.

5. The traffic sign detection method based on high-resolution network and lightweight attention mechanism according to claim 1 is characterized in that: The first fusion module, the second fusion module, the third fusion module, the fourth fusion module, the fifth fusion module, the sixth fusion module, the seventh fusion module, the eighth fusion module and the ninth fusion module have the same structure, and all of them add corresponding elements of the received multiple feature maps.

6. The traffic sign detection method based on high-resolution network and lightweight attention mechanism according to claim 1 is characterized in that: The output prediction unit (4) described in step 2 includes three branches with the same structure, each of which is composed of a 3×3 convolution module and a 1×1 convolution module connected in series. The inputs of the three branches are connected to the output of the multi-resolution network output fusion unit (3). The first branch is used to predict the center point position of 45 types of traffic sign detection frames; the second branch is used to predict the width and height of each type of traffic sign; the third branch is used to predict the offset of the center point; the prediction information of these three branches represents the position and type of the traffic sign in the image.

Citation Information

Patent Citations

  • Traffic sign detection method based on regional attention

    CN113033482A

  • Traffic sign detection method based on YOLOv4 algorithm

    CN113408410A

  • Remote-sensing image building change detection method

    CN110705457A

  • Traffic sign recognition method based on dense connection and attention mechanism

    CN111582029A