Improved lightweight SCB-YOLOv5 traffic sign detection method and system based on ShuffleNet
By using ShuffleNet v2 and CA attention mechanism in the traffic sign detection algorithm and combining BCS-FPN for cross-scale feature fusion, the problems of complexity and equipment limitation of traffic sign detection algorithm in the existing technology are solved, real-time accurate detection and high efficiency are achieved traffic sign identification.
Patent Information
- Application Number
- CN202411163276.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing traffic sign detection algorithm has complex network frameworks and complex calculations, and the model deployment is limited by equipment, and it is difficult to extract target features in complex road environments, especially for traffic sign detection with large scale differences.
ShuffleNet v2 is used to replace YOLOv5's backbone network, add a CA attention mechanism, and design BCS-FPN for cross-scale feature fusion, simplify network structure, reduce parameters and calculation amount, and improve the significance of object detection and multi-scale feature representation ability.
Real-time accurate detection of road traffic signs is realized, the calculation and storage requirements of model deployment are reduced, detection efficiency and accuracy are improved, and it is suitable for the operation of automotive processors.
Smart Images

Figure CN118918567A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent driving perception systems, and in particular relates to an improved lightweight SCB-YOLOv5 traffic sign detection method and system based on ShuffleNet. Background Art
[0002] With the rapid development of autonomous driving technology, the intelligent perception technology of smart cars is also constantly updated and iterated. Among them, road traffic sign detection is a key task of the intelligent driving perception system. The effective recognition of road traffic signs is the basis of intelligent transportation systems and unmanned driving technology, and also provides convenient conditions for the accuracy of subsequent unmanned intelligent decision-making.
[0003] In recent years, more and more traffic sign detection frameworks use CNN, and CNN-based object detection algorithms have also achieved many results. Object detection has always been the most basic and challenging branch of computer vision. CNN-based object detection frameworks are mainly divided into two categories. One is a two-stage object detection algorithm that pursues accuracy, and the other is a single-stage object detection algorithm that pursues speed. The difference between the two algorithms depends on whether the proposed area is further divided. Among them, the two-stage object detection algorithm will filter the proposed area and then match the predicted box. The two-stage object detection algorithms mainly include the R-CNN series, Mask-RCNN, and Cascade-RCNN. The single-stage object detection algorithms mainly include the YOLO series and SSD.
[0004] The network framework of the existing algorithm is complex, the calculation is complex, and the model occupies a large amount of running memory when deployed, which requires the device to have strong computing power support. Generally speaking, the computing power of the processor on the car is often poor, and the running memory is relatively small, so the above algorithm is not suitable for direct application in road traffic detection. In addition, in a complex road environment, the above algorithm cannot effectively extract target features, and the detection effect of traffic signs with large scale differences is not good, and the detection accuracy is not very high. Therefore, it is necessary to develop a lightweight and efficient road traffic sign detection method. Summary of the invention
[0005] In view of the large differences in the scales of traffic sign targets in complex road environments, the complexity of detection models and the large amount of calculation, and the equipment limitations on model deployment, the present invention proposes an improved lightweight SCB-YOLOv5 traffic sign detection method and system based on ShuffleNet. First, the backbone network of YOLOv5 is replaced with ShuffleNet v2, which simplifies the computational complexity and reduces the parameters of the backbone network. Secondly, in view of the problem that the features of traffic signs in complex road environments are not obvious, the CA attention mechanism is used to improve the significance of the target. Finally, in view of the large differences in the scales of traffic sign targets and the large proportion of small-scale targets, BCS-FPN is designed to fuse multi-scale features and improve the representation ability of small-scale objects. The present invention improves the efficiency and accuracy of traffic sign detection.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is:
[0007] An improved lightweight YOLOv5 traffic sign detection method based on ShuffleNet includes the following steps:
[0008] Step 1: Install a camera based on the vehicle's viewing angle to collect road traffic sign images;
[0009] Step 2: After collecting the traffic sign images, various traffic sign targets are labeled to create a traffic sign detection dataset;
[0010] Step 3, build a traffic sign detection model based on the improved lightweight YOLOv5 of ShuffleNet, and use the traffic sign detection dataset to train the detection model;
[0011] Step 4: Use the improved lightweight SCB-YOLOv5 detection model to detect road traffic signs on the vehicle processor, obtain the type of road traffic signs ahead, and output the traffic sign type to subsequent functional modules.
[0012] Preferably, in step 1, a camera is installed according to the structure and viewing angle of the interior of the vehicle cab. The installation of the camera should not affect the driver's field of view and should completely capture the view of the road ahead. The vehicle is then driven to collect road traffic sign images at different time periods and road conditions.
[0013] Preferably, in step 3, the structural improvement method of the improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet includes: using the ShuffleNet v2 network to replace the YOLOv5 backbone network, adding a CA attention mechanism after the ShuffleNet v2 network, replacing the SPP structure with SimSPPF, and designing a lightweight cross-scale feature fusion mechanism BCS-FPN.
[0014] Preferably, the implementation method of BCS-FPN includes: connecting the feature map output by the C1 layer to the prediction end of the F1 layer, and connecting the feature map output by the C2 layer to the prediction end of the F2 layer; using the SCCBL module as the basic convolution unit module; designing a C2f-SCConv structure, wherein the SCConv consists of a spatial reconstruction unit SRU and a channel reconstruction unit CRU, the SRU adopts a separation-reconstruction method to suppress spatial redundancy, and the CRU adopts a split transform-fusion strategy to reduce channel redundancy.
[0015] The present invention also provides an improved lightweight YOLOv5 traffic sign detection system based on ShuffleNet, comprising: an acquisition module, a labeling module, a construction module and a detection module;
[0016] The acquisition module is used to install a camera in combination with the vehicle's viewing angle to acquire road traffic sign images;
[0017] The labeling module is used to label various traffic sign targets after collecting traffic sign images and to produce a traffic sign detection data set;
[0018] The building module is used to build a traffic sign detection model based on the improved lightweight YOLOv5 of ShuffleNet, and train the detection model using the traffic sign detection dataset;
[0019] The detection module is used to detect road traffic signs on a vehicle-mounted processor using an improved lightweight SCB-YOLOv5 detection model, obtain the type of road traffic signs ahead, and output the traffic sign type to subsequent functional modules.
[0020] Preferably, in the acquisition module, a camera is installed according to the structure and viewing angle inside the vehicle cab. The installation of the camera should not affect the driver's field of view and should completely capture the view of the road ahead. The vehicle is then driven to collect road traffic sign images at different time periods and road conditions.
[0021] Preferably, in the building module, the structural improvement process of the improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet includes: using the ShuffleNet v2 network to replace the YOLOv5 backbone network, adding a CA attention mechanism after the ShuffleNet v2 network, replacing the SPP structure with SimSPPF, and designing a lightweight cross-scale feature fusion mechanism BCS-FPN.
[0022] Preferably, the implementation process of BCS-FPN includes: connecting the feature map output by the C1 layer to the prediction end of the F1 layer, and connecting the feature map output by the C2 layer to the prediction end of the F2 layer; using the SCCBL module as the basic convolution unit module; designing the C2f-SCConv structure, wherein the SCConv consists of a spatial reconstruction unit SRU and a channel reconstruction unit CRU, the SRU adopts a separation-reconstruction method to suppress spatial redundancy, and the CRU adopts a split transform-fusion strategy to reduce channel redundancy.
[0023] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:
[0024] 1. In order to solve the problems of complex models, large number of parameters and device limitations of model deployment, ShuffleNetv2 is used to replace the YOLOv5 backbone network to extract features, and SimSPPF is used to replace the SPPF structure, which greatly reduces the number of network parameters and calculations.
[0025] 2. In order to solve the problem of difficulty in effectively extracting target features in complex road environments, a lightweight CA attention module is added to the backbone network to increase the saliency of target detection with a smaller computational cost.
[0026] 3. To address the problem of large differences in target scales, BCS-FPN is designed to replace the FPN+PAN structure of YOLOv5, which improves the feature fusion capability of multi-scale targets and further reduces the number of network parameters while ensuring accuracy.
[0027] 4. The present invention can realize real-time and accurate detection of traffic signs ahead on the road, and input the detection results into subsequent functional modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 It is a general flow chart of the improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0030] Figure 2 This is a diagram of the installation positions of the camera and the vehicle-mounted processor of the improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0031] Figure 3It is a SCB-YOLOv5 algorithm structure diagram of an improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0032] Figure 4 The ShuffleNet v2 network structure diagram of the improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0033] Figure 5 It is a CA attention mechanism structure diagram of the improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0034] Figure 6 It is a SimSPPF structure diagram of an improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0035] Figure 7 It is a BCS-FPN structure diagram of the improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0036] Figure 8 SCConv structure diagram of the improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet in an embodiment of the present invention;
[0037] Fig. 9 A zoomed statistical diagram of the TT-100K data set according to an embodiment of the present invention;
[0038] Fig.10 Schematic diagram of mAP50 curves of SCB-YOLOv5 and YOLOv5s with epoch according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] The traffic sign detection method is a system formed by running a traffic sign detection algorithm on a vehicle-mounted processor, which can realize real-time traffic sign detection on a front road image input by a camera.
[0042] Embodiment 1
[0043] like Figure 1 As shown, an improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet includes the following steps:
[0044] Step 1: Install a camera based on the vehicle's viewing angle to collect road traffic sign images;
[0045] Specifically: In step 1, a camera is installed according to the structure and viewing angle of the interior of the vehicle cab. The installation of the camera should not affect the driver's field of view and can completely capture the view of the road ahead. Then the vehicle is driven to collect road traffic sign images at different time periods and road conditions.
[0046] Step 2: After collecting the traffic sign images, various traffic sign targets are labeled to create a traffic sign detection dataset;
[0047] Specifically: In step 2, after the traffic sign images are collected, various types of traffic sign targets are labeled to create a traffic sign detection dataset.
[0048] Step 3, build a traffic sign detection model based on the improved lightweight SCB-YOLOv5 of ShuffleNet, and use the traffic sign detection dataset to train the detection model;
[0049] Specifically: In step 3, the structural improvement method of the improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet includes: using the ShuffleNet v2 network to replace the YOLOv5 backbone network, adding a CA attention mechanism after the ShuffleNet v2 network, replacing the SPP structure with SimSPPF, and designing a lightweight cross-scale feature fusion mechanism BCS-FPN.
[0050] Furthermore, the implementation method of BCS-FPN includes: connecting the feature map output by the C1 layer to the prediction end of the F1 layer, and connecting the feature map output by the C2 layer to the prediction end of the F2 layer; using the SCCBL module as the basic convolution unit module; designing the C2f-SCConv structure, wherein the SCConv consists of a spatial reconstruction unit SRU and a channel reconstruction unit CRU, the SRU adopts a separation-reconstruction method to suppress spatial redundancy, and the CRU adopts a split transform-fusion strategy to reduce channel redundancy.
[0051] Step 4: Use the improved lightweight SCB-YOLOv5 detection model to detect road traffic signs on the vehicle processor, obtain the type of road traffic signs ahead, and output the traffic sign type to subsequent functional modules.
[0052] Specifically: In step 4, the road traffic sign is detected on the vehicle processor using the improved lightweight SCB-YOLOv5 detection model to obtain the type of the road traffic sign ahead, and the traffic sign type is output to the subsequent functional module.
[0053] Furthermore, the traffic sign detection method is a system composed of a traffic sign detection algorithm running on a vehicle-mounted processor, which can realize real-time traffic sign detection on the front road image input by the camera.
[0054] In this embodiment, a camera and an on-board processor are installed inside the vehicle cab, and the specific location is as follows: Figure 2 As shown. The installation of the camera should not affect the driver's field of vision, and it should be able to fully capture the field of vision of the road ahead. Then, the vehicle is driven to collect road traffic sign images at different times and road conditions. Frames are extracted from the collected video, and a total of about 3,000 images are selected as the data set. Use the labeling software LabelImg for image labeling. When labeling, try to make the labeling box just frame the target. After labeling a picture, the LabelImg software will generate an ".xml" file, which contains the labeled category, the size and coordinates of the labeling box, and other information. Since the training set of the SCB-YOLOV5 algorithm needs to use the format of the VOC data set, the data set also needs to be converted.
[0055] The network of the SCB-YOLOV5 algorithm needs to generate anchor boxes of different sizes to infer the size of the target box. The K-means clustering algorithm is used in the present invention.
[0056] The structure diagram of the SCB-YOLOV5 algorithm is as follows Figure 3 As shown, the process is:
[0057] (1) First, the input image is adaptively scaled to 640*640 size after Mosaic data enhancement, and then used as the input of the convolutional network according to the set minibatch;
[0058] (2) Feature extraction is performed through the backbone network, feature fusion is performed through the multi-scale feature fusion network, and classification prediction is performed at the output layer to obtain the position, size, and category of the target prediction box;
[0059] (3) Use the loss function to calculate the error between the predicted box and the labeled true value;
[0060] (4) The weight matrix and bias parameters in the network are iteratively updated through the gradient descent algorithm to reduce the error between the predicted box and the actual box;
[0061] (5) Obtain the weight matrix and bias parameters that minimize the loss function under a preset number of iterations;
[0062] (6) The obtained weight matrix and bias parameters are used as network parameters in the detection stage to obtain the prediction information of the image to be detected.
[0063] The input of the SCB-YOLOV5 algorithm uses Mosaic data enhancement, adaptive anchor box calculation, and adaptive image scaling methods.
[0064] The backbone network of the SCB-YOLOV5 algorithm uses ShuffleNet v2 for feature extraction. The network structure of ShuffleNetv2 is as follows: Figure 4 As shown. Figure 4 The basic unit of the ShuffleNet v2 network shown in (a), whose channels of the feature input matrix are divided into two branches. First, in order to simplify the complexity of the network, the degree of fragmentation is reduced in the design of the subsequent network. The left branch does not add operations, and the number of channels of the three Conv inputs and outputs in the right branch is the same, which also complies with the principle of equal number of input and output channels. After Conv, the two branches are connected using Concat, which also makes the number of front and back channels of the entire unit consistent. Then the channels are reorganized at the end of the unit. The addition operation is no longer performed in the entire basic unit, and the ReLU activation function and DW Conv only exist in one branch, which minimizes element-level operations. For Figure 4 The ShuffleNet v2 downsampling unit shown in (b) cancels the channel splitting operation and finally doubles the channels of the output feature matrix after Concat. The 3×3 average pooling of one branch becomes a 3×3DWConv, which can be seen as a DW Conv with a weight of one-ninth, which can increase more possibilities and finally add a 1×1 convolution. In particular, in the two units of ShuffleNet v2, there is only a BN layer after the DW Conv, which offsets the ReLU layer.
[0065] After extracting features from the backbone network, the SCB-YOLOV5 algorithm adds a CA attention mechanism to the back of the backbone network in order to enhance the saliency of feature expression. The CA attention mechanism is a lightweight attention mechanism that can effectively improve the expressiveness of network learning features. The implementation process is as follows: Figure 5As shown. The CA attention mechanism transfers the position information to the channel attention and encodes the channel relationship and long-term dependency through precise position information. In order to capture attention and encode the position information in the width and height of the image, the input feature map is first divided into two directions, width and height, and global average pooling is performed respectively to obtain the feature maps in the width and height directions, as shown in the following formula:
[0066]
[0067] in, is the output of the c-th channel with height h, is the output of the c-th channel with width w. These two transformations aggregate features along two spatial directions respectively, resulting in a pair of direction-aware feature maps C / r. The two feature maps are then concatenated and fed into a shared convolutional module to reduce them to their original dimensions, as shown in the following equation:
[0068] f=δ(F1([z h ,z w ]))
[0069] Among them, [·,·] is the Concat operation along the spatial dimension, δ is a nonlinear activation function, and f is the intermediate feature map encoding spatial information horizontally and vertically. Then f is decomposed into two independent tensors f along the spatial dimension. h ∈R C / r×H 、f w ∈R C / r×W . Then two more convolutions 1×1 are used to transform it into the same tensor f h 、f w ,get:
[0070] g h =σ(F h (f h )),
[0071] g w =σ(F w (f w ))
[0072] where σ is the sigmoid activation function. Finally, the height weight g of the input feature map is obtained h and the weight g in the width direction w The original feature map is weighted together to obtain a feature map with weights in the height direction and the width direction, as shown in the following formula:
[0073]
[0074] The SCB-YOLOV5 algorithm uses the SimSPPF structure to extract features by using pooling kernels of different sizes at different scales, thereby improving the performance of the detector. The specific structure of SimSPPF is as follows Figure 6 shown.
[0075] A lightweight cross-scale feature fusion mechanism BCS-FPN is designed in the SCB-YOLOv5 algorithm. Figure 7 As shown. Figure 7 In the paper, C2f-SCConv is a lightweight module designed, in which the SCCBL module is an effective convolution module, and SCConv is used as the basic unit of convolution. SCConv uses the features between spatial and channel redundancy to compress CNN, reduces the representative features of redundant calculations, and is easy to learn. The implementation process of BCS-FPN is as follows: First, the feature map output by the C1 layer is connected to the prediction end of the F1 layer, and the feature map output by the C2 layer is connected to the prediction end of the F2 layer. The edge from the original input node to the output node is added, and as many target features as possible can be fused under the premise of increasing a small amount of calculation. Secondly, the convolution module is replaced by the SCCBL module to further reduce the amount of calculation while ensuring accuracy. Finally, the C2f-SCConv structure is designed for the feature fusion network to further reduce the number of parameters and improve the detection speed.
[0076] The SCConv structure in the SCB-YOLOv5 algorithm is as follows Figure 8 As shown in Figure 2, SCConv consists of a spatial reconstruction unit (SRU) and a channel reconstruction unit (CRU). SRU uses a separation-reconstruction method to suppress spatial redundancy, while CRU uses a split transform-fusion strategy to reduce channel redundancy. Specifically, for the intermediate input features in the bottleneck residual block, the spatial refinement feature X is first obtained through the SRU operation, and then the channel refinement feature X is obtained through the CRU operation. w . By utilizing the spatial and channel redundancy between features in the SCConv module, it can be seamlessly integrated into any CNN architecture to reduce the redundancy between intermediate feature maps and improve the feature representation Y of CNN. The role of SRU is to utilize the redundant features of space, such as Figure 8 The SRU structure in Figure 1 is shown, and the separation and reconstruction operation is performed. The purpose of the separation operation is to enrich the information content and separate the feature graph and space. Then the scale factor in the normalization layer is used to evaluate the information content of different feature maps. The role of CRU is to use redundant channel features, such as Figure 8 The CRU structure shown in the figure, split-transform-fusion strategy, further reduces the redundant spatial refinement feature maps along the channel dimension. In addition, CRU can extract rich representative features X w ,Redundant features can be handled by low-cost operations and lightweight convolution operations.
[0077] Embodiment 2
[0078] The lightweight traffic sign detection framework based on YOLOv5 SCB-YOLOv5 is an improved lightweight YOLOv5 traffic sign detection model based on ShuffleNet
[0079] The process of detecting the framework in this embodiment is as follows:
[0080] (1) The TT-100K dataset is analyzed and divided into training set, validation set and test set.
[0081] (2) The network was trained using the split training set and validation set, and the optimal weights of the model were obtained.
[0082] (3) Use the obtained model training weights to perform verification tests on the test set.
[0083] In the experiment of the present invention, the SCB-YOLOv5 model was comprehensively analyzed using the TT-100K data set. The experiment was conducted under the Pytourch framework. The server's operating system is Linux Ubuntu 18.04, the CPU model is Intel (R) Xeon (R) Gold 6248R, the CPU frequency is 3.00 GH, and the server memory is 128GB DDR4. The GPU is RTX A6000, and the memory is 48GB.
[0084] In this section, the present invention first analyzes the TT-100K dataset. The TT-100K dataset is a commonly used traffic sign dataset jointly produced by Tsinghua University and Tencent. The training set contains 6105 images, the test set contains 3071 images, and the dataset contains a total of 232 types of traffic signs. The present invention first calculates the number and scale of objects in the TT-100K dataset. The statistical results are as follows: Fig. 9 As shown. Then, the present invention classifies these objects into three categories according to their pixel size. Small-scale objects, whose pixel size is less than 32×32. Medium-scale objects, whose pixel size is between 32×32 and 96×96. Pixel size is greater than 96×96.
[0085] Since there are fewer data sets of certain quantity categories, it is easy to cause underfitting in the training network. Therefore, in order to ensure the effectiveness of the model, the present invention only selects a target quantity of more than 100 categories to continue training. Finally, the categories and numbers of the filtered data sets are shown in Table 1. Objects and quantities after TT-100-K data set screening.
[0086] Table 1
[0087]
[0088] Before training the model, the ratio of training set to validation set was split into 7:3. The images were input to the model, preprocessed, and resized to 640 x 640. The training method used SGD with a momentum parameter size of 0.937, an initial learning rate of 0.01, and 16 images per batch. Based on these parameters, all models were trained for 300 cycles.
[0089] In order to objectively evaluate the advantages of the SCB-YOLOv5 algorithm proposed in the present invention, the present invention selects accuracy, recall rate, average precision mAP@50 and average inference time as evaluation indicators, and the calculation formula is as follows.
[0090]
[0091] Where TP is the number of correct detections, FP is the number of false detections, FN is the number of missed detections, and A P is the integral of the precision-recall curve, m is the number of detection categories, and the average inference time of the present invention is the average time calculated after 500 image selection tests.
[0092] The SCB-YOLOv5 traffic signal detection algorithm proposed in the present invention is compared with TT-1OLOv3, FCOS, YOLOv3, YOLOv3, YOLOv5-GhostNet, YOLOv5-MobileNet and YOLOv5s, and the experimental results are shown in Table 2. As can be seen from Table 2, the proposed SCB-YOLOv5 algorithm is not much different from the YOLOv5 algorithm in terms of accuracy and recall. However, the mAP@50 of SCB-YOLOv5 is 0.2% lower than that of YOLOv5, and the inference speed is 20.8% faster than that of YOLOv5. Compared with other algorithms, SCB-YOLOv5 has obvious advantages in speed and accuracy.
[0093] Table 3 shows the comparison between SCB-YOLOv5 and other algorithms in terms of parameter number, computational effort, and model size. Among them, SCB-YOLOv5 has the smallest model size, the least number of parameters, and the least computational effort. Compared with YOLOv5s, SCB-YOLOv5 has a 50.8% reduction in parameter number, a 59.8% reduction in computational effort, and a 48.8% reduction in model size.
[0094] Table 2
[0095]
[0096] As can be seen from Tables 2 and 3, SCB-YOLOv5 has obvious advantages over other mainstream detection algorithms in terms of the number of model parameters, calculation accuracy, precision and speed indicators.
[0097] During the training process, the mAP50 curves of SCB-YOLOv5 and YOLOv5s with epoch are as follows Fig.10 As shown. Fig.10 It can be seen that the training convergence speed of SCB-YOLOv5 is faster.
[0098] Table 3
[0099]
[0100] Finally, in order to more intuitively observe the comparison of the detection effects of SCB-YOLOv5 and YOLOv5, Fig.10 The comparison of detection effects between SCB-YOLOv5 and YOLOv5 is shown.
[0101] The present invention proposes an improved lightweight traffic sign detection framework based on YOLOv5. First, the backbone network of YOLOv5 is replaced by ShuffleNet v2, which simplifies the computational complexity and reduces the parameters of the backbone network. Secondly, in view of the problem that the features of traffic signs are not obvious in complex road environments, the present invention adopts the CA attention mechanism to improve the saliency of the target. Finally, in view of the problem that the scale difference of traffic sign targets is large and the proportion of small-scale targets is large, the present invention designs BCS-FPN to fuse multi-scale features and improve the representation ability of small-scale objects. The TT-100K data set is analyzed and the data set is sorted. The present invention tests the improved YOLOv5 on the TT-100K data set sorted in the present invention. The results show that compared with YOLOv5s, the mAP of the algorithm of the present invention is comparable to that of YOLOv5s, and the speed is increased by 20.8%. The present invention also conducts experiments on embedded devices, and the experimental results show that the algorithm of the present invention has better effects on embedded devices with poor computing power.
[0102] Embodiment 3
[0103] The present invention also provides an improved lightweight YOLOv5 traffic sign detection system based on ShuffleNet, comprising: an acquisition module, a labeling module, a construction module and a detection module;
[0104] The acquisition module is used to install a camera in combination with the vehicle's viewing angle to collect road traffic sign images;
[0105] The annotation module is used to annotate various traffic sign targets after collecting traffic sign images and to create a traffic sign detection dataset;
[0106] The construction module is used to build a traffic sign detection model based on the improved lightweight YOLOv5 of ShuffleNet, and train the detection model using the traffic sign detection dataset;
[0107] The detection module is used to detect road traffic signs on the vehicle processor using an improved lightweight SCB-YOLOv5 detection model, obtain the type of road traffic signs ahead, and output the traffic sign type to subsequent functional modules.
[0108] In this embodiment, in the acquisition module, a camera is installed according to the structure and viewing angle inside the vehicle cab. The installation of the camera should not affect the driver's field of view and should completely capture the view of the road ahead. Then, the vehicle is driven to collect road traffic sign images at different time periods and road conditions.
[0109] In this embodiment, in the building module, the structural improvement process of the improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet includes: using the ShuffleNet v2 network to replace the YOLOv5 backbone network, adding a CA attention mechanism after the ShuffleNet v2 network, replacing the SPP structure with SimSPPF, and designing a lightweight cross-scale feature fusion mechanism BCS-FPN.
[0110] In this embodiment, the implementation process of BCS-FPN includes: connecting the feature map output by the C1 layer to the prediction end of the F1 layer, and connecting the feature map output by the C2 layer to the prediction end of the F2 layer; using the SCCBL module as the basic convolution unit module; designing the C2f-SCConv structure, wherein the SCConv consists of a spatial reconstruction unit SRU and a channel reconstruction unit CRU, the SRU adopts a separation-reconstruction method to suppress spatial redundancy, and the CRU adopts a split transform-fusion strategy to reduce channel redundancy.
[0111] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. An improved lightweight YOLOv5 traffic sign detection method based on ShuffleNet, characterized in that: The following steps are involved: Step 1: Install a camera based on the vehicle's viewing angle to collect road traffic sign images; Step 2: After collecting the traffic sign images, various traffic sign targets are labeled to create a traffic sign detection dataset; Step 3, build a traffic sign detection model based on the improved lightweight YOLOv5 of ShuffleNet, and use the traffic sign detection dataset to train the detection model; Step 4: Use the improved lightweight SCB-YOLOv5 detection model to detect road traffic signs on the vehicle processor, obtain the type of road traffic signs ahead, and output the traffic sign type to subsequent functional modules.
2. The improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet according to claim 1, characterized in that: In step 1, the camera is installed according to the structure and viewing angle of the interior of the vehicle cab. The camera should not affect the driver's field of view and should completely capture the road ahead. Then the vehicle is driven to collect road traffic sign images at different time periods and road conditions.
3. The improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet according to claim 1, characterized in that: In step 3, the structural improvement method of the improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet includes: using the ShuffleNet v2 network to replace the YOLOv5 backbone network, adding a CA attention mechanism after the ShuffleNet v2 network, replacing the SPP structure with SimSPPF, and designing a lightweight cross-scale feature fusion mechanism BCS-FPN.
4. The improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet according to claim 3, characterized in that: The implementation method of BCS-FPN includes: connecting the feature map output by the C1 layer to the prediction end of the F1 layer, and connecting the feature map output by the C2 layer to the prediction end of the F2 layer; using the SCCBL module as the basic convolution unit module; designing the C2f-SCConv structure, in which SCConv consists of a spatial reconstruction unit SRU and a channel reconstruction unit CRU. SRU adopts a separation-reconstruction method to suppress spatial redundancy, and CRU adopts a split transform-fusion strategy to reduce channel redundancy.
5. An improved lightweight YOLOv5 traffic sign detection system based on ShuffleNet, characterized in that: include: Acquisition module, annotation module, construction module and detection module; The acquisition module is used to install a camera in combination with the vehicle's viewing angle to acquire road traffic sign images; The labeling module is used to label various traffic sign targets after collecting traffic sign images and to produce a traffic sign detection data set; The building module is used to build a traffic sign detection model based on the improved lightweight YOLOv5 of ShuffleNet, and train the detection model using the traffic sign detection dataset; The detection module is used to detect road traffic signs on a vehicle-mounted processor using an improved lightweight SCB-YOLOv5 detection model, obtain the type of road traffic signs ahead, and output the traffic sign type to subsequent functional modules.
6. The improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet according to claim 5, characterized in that: In the acquisition module, the camera is installed according to the structure and viewing angle of the vehicle's cab. The installation of the camera should not affect the driver's field of view and should completely capture the road ahead. Then the vehicle is driven to collect road traffic sign images at different time periods and road conditions.
7. The improved lightweight SCB-YOLOv5 traffic sign detection method based on ShuffleNet according to claim 5, characterized in that: In the building module, the structural improvement process of the improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet includes: using the ShuffleNet v2 network to replace the YOLOv5 backbone network, adding a CA attention mechanism after the ShuffleNet v2 network, replacing the SPP structure with SimSPPF, and designing a lightweight cross-scale feature fusion mechanism BCS-FPN.
8. The improved lightweight SCB-YOLOv5 traffic sign detection model based on ShuffleNet according to claim 7, characterized in that: The implementation process of BCS-FPN includes: connecting the feature map output by the C1 layer to the prediction end of the F1 layer, and connecting the feature map output by the C2 layer to the prediction end of the F2 layer; using the SCCBL module as the basic convolution unit module; designing the C2f-SCConv structure, in which SCConv consists of a spatial reconstruction unit SRU and a channel reconstruction unit CRU. SRU uses a separation-reconstruction method to suppress spatial redundancy, and CRU uses a split transform-fusion strategy to reduce channel redundancy.
Citation Information
Patent Citations
Lightweight multi-target detection method based on improved YOLOv4
CN117409355A
Power transmission line tower bird nest lightweight detection method fusing ShuffleNet and CBAM
CN117611970A
Traffic sign detection method based on improved YOLOv8
CN118314551A
Lightweight network-based traffic sign recognition method
WO2022205685A1
Light-weighted target detection method and device, and storage medium
WO2022213395A1
