Small target traffic sign detection method based on improved YOLOv8
By improving the YOLOv8 algorithm, multi-scale feature fusion and three-branch structure feature extraction module are used to solve the problem of low traffic sign detection accuracy in complex scenarios, and higher detection accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202411998279.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
AI Technical Summary
The existing traffic sign detection algorithm has low detection accuracy in complex scenarios and is difficult to meet the requirements of real-time detection, especially in autonomous driving applications.
Based on YOLOv8's improved algorithm, multi-scale feature fusion and enhanced receptive field processing are designed by improving the network structure, and a feature extraction module with three-branch structure is introduced to improve the detection accuracy and real-timeness of the model in complex environments.
It significantly improves the accuracy and robustness of traffic sign detection, improves the real-time and generalization capabilities of the model, reduces the amount of parameters, and maintains high detection accuracy.
Smart Images

Figure BDA0005225407150000051 
Figure BDA0005225407150000061 
Figure HDA0005225407200000011
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning and computer vision technology, and specifically relates to a traffic sign detection algorithm based on YOLOv8. Background Art
[0002] With the continuous development of intelligent transportation systems, traffic sign detection, as a key link, is of great significance for improving road safety, promoting smooth traffic and supporting autonomous driving technology. Traffic signs not only provide drivers with road information and indicate the direction of travel, but also play a vital role in maintaining traffic order and preventing traffic accidents. Therefore, accurate and rapid recognition of traffic signs has become a research hotspot in the field of intelligent transportation.
[0003] Traditional traffic sign detection methods usually rely on hand-crafted features and classifiers, such as recognition methods based on color, shape or edge features. However, the performance of these methods is often severely limited when faced with complex and changing traffic environments and lighting conditions. In addition, these methods are usually computationally intensive and difficult to achieve real-time detection requirements, especially in application scenarios that require fast response, such as autonomous driving.
[0004] In recent years, the rapid development of deep learning technology has provided new solutions for traffic sign detection. Among them, the object detection algorithm based on convolutional neural network has achieved remarkable results in traffic sign recognition tasks. In particular, the YOLO series of algorithms occupy an important position in the field of object detection with its excellent real-time performance and accuracy. YOLOv8 inherits the advantages of the previous generation of algorithms and further improves the detection accuracy and speed, making it more suitable for traffic sign detection tasks.
[0005] However, although the YOLOv8 algorithm has achieved excellent performance in the field of target detection, it still faces some challenges in practical applications. First, traffic signs are of various types and shapes, and are often affected by factors such as lighting changes, occlusion, and deformation in actual traffic scenes, which requires the algorithm to have stronger robustness and adaptability. Secondly, real-time requirements are crucial for traffic sign detection algorithms, especially in applications that require fast response, such as autonomous driving. Therefore, how to improve the real-time performance of the algorithm while ensuring detection accuracy is the focus of current research on traffic sign detection algorithms.
[0006] In view of the shortcomings and needs of the current traffic sign detection algorithm, this paper proposes an improved algorithm based on YOLOv8, aiming to improve the accuracy, stability and generalization ability of traffic sign detection. Summary of the invention
[0007] In view of the above problem of low detection accuracy of traffic signs in complex scenes, a traffic sign detection algorithm based on YOLOv8 is proposed. The present invention improves the detection accuracy of the model for traffic signs in complex scenes by improving the original network structure and designing a new module.
[0008] In order to achieve the above purpose, a traffic sign detection algorithm based on YOLOv8 is proposed, which includes the following steps:
[0009] 1. A traffic sign detection algorithm based on YOLOv8, comprising the following steps:
[0010] Step 1: Obtain traffic sign data and create a traffic sign dataset;
[0011] Step 2: Improve the original YOLOv8 network structure to obtain the YOLOv8-U network. The improved YOLOv8-U model can provide better performance in complex environments through multi-scale feature fusion and enhanced receptive field processing;
[0012] Step 3: Design a feature extraction module with a three-branch structure, use multiple branches to process input features, and improve the feature extraction capability by splicing and merging different features;
[0013] Step 4: Introduce the designed feature extraction module into the YOLOv8-U network model to obtain the improved YOLOv8-UF model for traffic sign target detection.
[0014] Furthermore, the step 1 specifically includes:
[0015] First, we sorted out the data of the TT100K traffic sign dataset. TT100K itself contains as many as 221 types of signboards, but the number of each category is unevenly distributed. Among these 221 types of traffic signs, there are many types of traffic sign instances with less than 100 types. After analyzing and identifying the data set, we finally selected 42 types of traffic signs with more than 100 instances as the basic data set for the experiment.
[0016] However, after the dataset is divided into training, validation, and testing, the number of instances of certain types of traffic signs in the training set is significantly lower than 100, which may lead to insufficient generalization ability of the model on these categories and affect the overall performance.
[0017] The data set is enhanced by various methods such as random brightness changes, motion blur, adding noise, adding rainy day effects, adding snowy day effects, etc., and a new data set TT100K+ is obtained.
[0018] The above steps complete the preprocessing of the traffic sign dataset.
[0019] Furthermore, the step 2 specifically includes:
[0020] The head part of the original YOLOv8 model architecture is improved by introducing more Upsample and Concat operations to strengthen the fusion of feature maps of different scales, thereby improving the detection accuracy of small objects. In addition, by adding the C2f module, features from different levels can be efficiently fused. The improved YOLOv8-U model has stronger target detection capabilities, especially in complex scenes. The detection capability of small objects is significantly enhanced.
[0021] Furthermore, the step 3 specifically includes:
[0022] A FEStem module for feature extraction is designed through a multi-branch structure. Different image features are extracted through three branches: Sobel edge detection (sobel_branch), dual convolution operation (dual_conv_branch) and pooling operation (pool_branch). The entire design enhances the expressiveness of the model through multiple operations and feature fusion, and can effectively capture image features from different scales and perspectives.
[0023] Furthermore, the step 4 specifically includes:
[0024] The two convolutions in the first and second layers of the YOLOv8-U model are replaced with the FESTem feature extraction module to obtain the YOLOv8-UF model.
[0025] The improved dataset TT100K+ is used to train the YOLOv8-UF network model and draw conclusions.
[0026] Compared with the prior art, the present invention has the following advantages:
[0027] 1. This network architecture significantly improves the accuracy and robustness of target detection through multi-branch feature extraction, gradually refined convolution operations and multi-scale feature fusion.
[0028] 2. By effectively fusing features at different levels and between different branches, the network can better cope with complex detection tasks.
[0029] 3. The improved YOLOv8-UF model was used to successfully achieve the lightweight of the model, reduce the number of parameters, and improve the accuracy of the model.
[0030] Based on the above reasons, the present invention can be widely promoted in the fields of traffic sign detection and the like. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0032] Figure 1 A type-quantity distribution diagram of the original training set provided for the example of the present invention;
[0033] Figure 2 The improved training set type-quantity distribution diagram provided for the example of the present invention;
[0034] Figure 3 The YOLOv8 network model structure diagram provided for the example of the present invention;
[0035] Figure 4 The YOLOv8-U network model structure diagram provided for the example of the present invention;
[0036] Figure 5 FEStem module structure diagram provided for the example of the present invention;
[0037] Figure 6 The YOLOv8-UF network model structure diagram provided for the example of the present invention;
[0038] Figure 7 The YOLOv8s model training result diagram provided for the example of the present invention;
[0039] Figure 8 The YOLOv8s-U model training result diagram provided for the example of the present invention;
[0040] Fig. 9 The YOLOv8s-UF model training result diagram provided for the example of the present invention; DETAILED DESCRIPTION
[0041] In order to make the technical solutions and advantages of the present invention more clear, the technical solutions of the present invention are further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the inventions. It is also necessary to explain that, for the convenience of description, only the parts related to the relevant inventions are shown in the accompanying drawings.
[0042] The present invention provides a traffic sign detection algorithm based on YOLOv8, comprising the following specific steps:
[0043] 1. A traffic sign detection algorithm based on YOLOv8, comprising the following steps:
[0044] Step 1: Obtain traffic sign data and create a traffic sign dataset;
[0045] The step 1 specifically includes:
[0046] First, we sorted out the TT100K traffic sign dataset. TT100K contains as many as 221 types of signboards, but the number of each category is unevenly distributed. Among these 221 types of traffic signs, there are many types of traffic sign instances with less than 100 types. After analyzing and identifying the data set, we finally selected 42 types of traffic signs with more than 100 instances as the basic data set for the experiment. The training set type-number distribution diagram is shown below: Figure 1 shown.
[0047] However, after the dataset is divided into training, validation, and testing, the number of instances of certain types of traffic signs in the training set is significantly lower than 100, which may lead to insufficient generalization ability of the model on these categories and affect the overall performance.
[0048] The data set is enhanced by random brightness changes, motion blur, noise addition, rainy day effect addition, snowy day effect addition, etc., and a new data set TT100K+ is obtained. The distribution diagram of the types and quantities of the expanded training set is shown in the figure below. Figure 2 shown.
[0049] The above steps complete the preprocessing of the traffic sign dataset.
[0050] Step 2: Improve the original YOLOv8 network structure to obtain the YOLOv8-U network. The improved YOLOv8-U model can provide better performance in complex environments through multi-scale feature fusion and enhanced receptive field processing;
[0051] The step 2 specifically includes:
[0052] The YOLOv8 network structure is as follows Figure 3As shown in the figure, the head part of the original YOLOv8 model architecture is improved. By introducing more Upsample and Concat operations and adding C2f modules, the multi-scale feature fusion and context information extraction are significantly improved, thereby improving the detection accuracy of small targets. Specifically, in the head part, firstly, the Upsample operation is added to the 16th layer to upsample the feature map, and the feature map of the P2 layer is spliced by Concat to enhance the detection ability of small objects. Then, a C2f module is introduced after the 17th layer, which can efficiently fuse features of multiple levels, improve the diversity and accuracy of feature expression, and enhance the network's detection ability for objects of different sizes. Finally, the 25th layer combines the feature maps of the 18th, 21st, and 24th layers, and performs target detection through the Detect module. The fusion of feature maps of multiple scales not only improves the detection ability, but also enhances the detection effect of the model in complex backgrounds. Through this multi-scale feature fusion, the model can make full use of information at different levels and improve the overall detection performance. Through these improvements, the YOLOv8-U model performs effective feature fusion at multiple scales, especially for small targets and complex backgrounds, and the detection accuracy has been greatly improved.
[0053] Step 3: Design a feature extraction module with a three-branch structure, use multiple branches to process input features, and improve the feature extraction capability by splicing and merging different features;
[0054] The step 3 specifically includes:
[0055] FEStem is a feature extraction module with the following structure: Figure 5 As shown in the figure, it extracts multiple features of the input image through a multi-branch structure design. First, the input image is preliminarily processed through a convolutional layer (conv1) to generate a feature map x1. Then, the three parallel branches use Sobel edge detection (sobel_branch), dual convolution operation (dual_conv_branch) and pooling operation (pool_branch) to extract different image features. Next, the outputs of the three branches are spliced along the channel dimension to generate a richer feature map x2, which is then spliced with x1 to form a more complete feature representation. Finally, the spliced feature map is further processed through two convolutional layers (conv2 and conv3) to obtain the final output. The entire design enhances the expressiveness of the model through multiple operations and feature fusion, and can effectively capture image features from different scales and perspectives.
[0056] Step 4: Introduce the designed feature extraction module into the YOLOv8-U network model to obtain the improved YOLOv8-UF model for traffic sign target detection.
[0057] The step 4 specifically includes:
[0058] Introduce the FESTem module into the YOLOv8-U model. Since the FESTem module is used for feature extraction, it is placed in the first layer. Replace the two convolutional layers of the first and second layers in the YOLOv8-U model with the FESTem module to obtain the YOLOv8-UF model, as shown in Figure 6 shown.
[0059] In order to verify the effectiveness of the method of the present invention, the YOLOv8-UF network model is trained using the improved dataset TT100K+ and conclusions are drawn.
[0060] Table 1 Experimental environment
[0061]
[0062] In addition to the experimental environment in Table 1, there are other network model training parameter settings, among which the image input resolution is 640×640, the training rounds are 150, the batch is 16, the weight decay parameter is 0.0005, the initial learning rate is 0.01, and the Momentum is 0.937.
[0063] The improved dataset is trained on the YOLOv8 model to obtain the following results: Figure 7 As shown, the improved dataset is trained on the YOLOv8-U model to obtain the following results Figure 8 As shown, the improved dataset is trained on the YOLOv8-UF model to obtain the following results Fig. 9 As shown in Table 2, the training results of the three models are summarized.
[0064] Table 2 Comparison of results of different models
[0065]
[0066] As can be seen from the above table, compared with the original YOLOv8 model, the improved YOLOv8s-U model not only reduces the number of parameters, but also greatly improves the average accuracy. After the introduction of the FEStem module, the detection accuracy of the model is further improved while keeping the number of parameters unchanged. Therefore, it can be seen that the effectiveness of the present invention can greatly improve the average detection accuracy while reducing the number of parameters.
[0067] Finally, it should be noted that: as described above, the above embodiments are only used to illustrate the technical solution of the present invention, and are not intended to limit the present invention in any form. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is not intended to limit the present invention. Any technician familiar with the profession can make some changes or modify the technical contents disclosed above into equivalent embodiments of equivalent changes without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A traffic sign detection algorithm based on YOLOv8, comprising the following steps: Step 1: Obtain traffic sign data and create a traffic sign dataset; Step 2: Improve the original YOLOv8 network structure to obtain the YOLOv8-U network. The improved YOLOv8-U model can provide better performance in complex environments through multi-scale feature fusion and enhanced receptive field processing; Step 3: Design a feature extraction module with a three-branch structure, use multiple branches to process input features, and improve the feature extraction capability by splicing and merging different features; Step 4: Introduce the designed feature extraction module into the YOLOv8-U network model to obtain the improved YOLOv8-UF model for traffic sign target detection. Furthermore, the step 1 specifically includes: First, we sorted out the data of the TT100K traffic sign dataset. TT100K itself contains as many as 221 types of signboards, but the number of each category is unevenly distributed. Among these 221 types of traffic signs, there are many types of traffic sign instances with less than 100 types. After analyzing and identifying the data set, we finally selected 42 types of traffic signs with more than 100 instances as the basic data set for the experiment. However, after the dataset is divided into training, validation, and testing, the number of instances of certain types of traffic signs in the training set is significantly lower than 100, which may lead to insufficient generalization ability of the model on these categories and affect the overall performance. The data set is enhanced by various methods such as random brightness changes, motion blur, adding noise, adding rainy day effects, adding snowy day effects, etc., and a new data set TT100K+ is obtained. The above steps complete the preprocessing of the traffic sign dataset. Furthermore, the step 2 specifically includes: The head part of the original YOLOv8 model architecture is improved by introducing more Upsample and Concat operations to strengthen the fusion of feature maps of different scales, thereby improving the detection accuracy of small objects. In addition, by adding the C2f module, features from different levels can be efficiently fused. The improved YOLOv8-U model has stronger target detection capabilities, especially in complex scenes. The detection capability of small objects is significantly enhanced. Furthermore, the step 3 specifically includes: A FEStem module for feature extraction is designed through a multi-branch structure. Different image features are extracted through three branches: Sobel edge detection (sobel_branch), dual convolution operation (dual_conv_branch) and pooling operation (pool_branch). The entire design enhances the expressiveness of the model through multiple operations and feature fusion, and can effectively capture image features from different scales and perspectives. Furthermore, the step 4 specifically includes: The two convolutions in the first and second layers of the YOLOv8-U model are replaced with the FESTem feature extraction module to obtain the YOLOv8-UF model. The improved dataset TT100K+ is used to train the YOLOv8-UF network model and draw conclusions.