Path planning method combining small-scale traffic sign recognition and DWA algorithm
By combining small-scale traffic sign recognition and improved DWA algorithm, the challenges of traffic sign recognition and path planning in complex environments of autonomous driving technology are solved, and more efficient and safer autonomous driving path planning is achieved.
Patent Information
- Application Number
- CN202510203051.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-02-24
AI Technical Summary
Autonomous driving technology faces challenges in traffic sign identification and path planning in complex environments, especially in terms of the accuracy and real-timeness of small-scale traffic sign detection and DWA algorithm path planning.
Combining the recognition of small-scale traffic signs and improved DWA algorithm, we collect road surface images through autonomous driving unmanned vehicles, use the improved YOLOv5s network to detect small-scale traffic signs, and use the detection results as inputs to the trigger conditions and evaluation functions of the DWA algorithm to optimize local path planning.
It improves the adaptability and safety of autonomous driving in complex environments, enhances the detection accuracy of small-scale traffic signs, optimizes path planning performance, reduces dependence on expensive hardware, and improves the cost-effectiveness of the system.
Smart Images

Figure CN119693923A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image recognition and navigation technology, and in particular relates to a path planning method combining small-scale traffic sign recognition and a DWA algorithm. Background Art
[0002] The research and application of autonomous driving technology has become an important direction of the modern automobile industry. Autonomous driving technology can not only improve traffic efficiency and reduce traffic accidents, but also reduce the burden on drivers. However, the application of autonomous driving technology in complex environments still faces many challenges, such as accurate recognition of traffic signs, path planning in complex environments, and real-time obstacle avoidance.
[0003] Small-scale traffic signs refer to traffic sign images that can be captured (such as traffic lights, left turn signs, etc.) that are too small. In the existing technology, the YOLOv5s target detection algorithm has certain advantages in traffic sign recognition, but there are still problems of false detection and missed detection in the process of small-scale traffic sign detection. The Dynamic Window Approach (DWA) is a local path planning algorithm for obstacle avoidance. It combines speed and acceleration data to generate possible speed sampling points. The algorithm can generate possible motion trajectories, and then evaluate these trajectories based on factors such as distance and collision risk, and select the best one from the candidate trajectories as the robot's path. However, due to the defects of the evaluation function of the DWA algorithm itself, there are problems such as paths close to obstacles and trajectory oscillation in path planning. In addition, the existing DWA algorithm and the improvement of the DWA algorithm are more simply considering improving the evaluation function of DWA to achieve the real-time and accuracy of the DWA algorithm planning path. For example, the improvement of the DWA algorithm in the invention "A dynamic obstacle avoidance method based on fusion Kalman filter and improved DWA algorithm" with publication number CN 118938924 A uses the improved evaluation function to score the speed pairs in the speed window of the DWA algorithm, and selects the speed pair with the highest score until the target point is found, solving the problem of being easily trapped in the dynamic local optimum. However, in the actual road environment, the DWA algorithm needs to consider the information of traffic signs on the road in addition to combining factors such as obstacles and speed. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a path planning method combining small-scale traffic sign recognition and the DWA algorithm, so as to combine the recognition of traffic signs and the DWA algorithm for local obstacle avoidance, thereby achieving more efficient and safer autonomous driving.
[0005] In order to solve the above technical problems, the present invention provides a path planning method combining small-scale traffic sign recognition and DWA algorithm, including: an autonomous driving unmanned vehicle collects road images, uniformly scales the images, and inputs them into an offline trained small-scale traffic sign detection model to detect the positions, labels and weight information of traffic signs in real time, and then uses the acquired labels and weight information as trigger conditions of an improved DWA algorithm. After the trigger conditions are met, local path planning is performed using the improved DWA algorithm;
[0006] The small-scale traffic sign detection model is improved based on the YOLOv5s network. First, a cross-layer cascade is added to concatenate the feature map extracted by the C3 module in Backbone and the feature map extracted by the two Conv modules in Neck in the channel dimension; secondly, a feature enhancement module is added to each layer of the down-sampling feature pyramid of the YOLOv5s network Neck, and then the ECA-SAM parallel attention mechanism is added between every two layers of the up-sampling feature pyramid, and another small-scale feature detection network is added in Neck; thirdly, a small-scale detection head is added to the YOLOv5s network head;
[0007] The improved DWA algorithm includes adding an algorithm triggering condition based on the detection result of a small-scale traffic sign detection model and improving the evaluation function for evaluating the predicted trajectory.
[0008] As an improvement of the path planning method combining small-scale traffic sign recognition and DWA algorithm of the present invention: The small-scale feature detection network has the same structure as the original feature detection network of the YOLOv5s network and is arranged in parallel. The small-scale detection head has the same structure as the original three detection heads of the YOLOv5s network and is arranged in parallel. The small-scale feature detection network is connected to the small-scale detection head.
[0009] As a further improvement of the path planning method combining small-scale traffic sign recognition and DWA algorithm of the present invention:
[0010] The offline training process of the small-scale traffic sign detection model is as follows:
[0011] The training set, validation set and test set in the Bosch Small Traffic Signs dataset are used for offline training. The size of each sample image in the dataset is uniformly scaled before data augmentation operations, including image translation, image scaling and random rotation. The training parameters are set, and the training set images and labels are input into the small-scale traffic sign detection model. The loss function is calculated and the gradient is back-propagated until the loss function on the training set and validation set no longer decreases. Then the test dataset is input into the trained model to verify the recall and accuracy.
[0012] As a further improvement of the path planning method combining small-scale traffic sign recognition and DWA algorithm of the present invention:
[0013] The algorithm triggering conditions of the improved DWA algorithm are:
[0014] (4)
[0015] in, represents the weight of the traffic sign detected by the small-scale traffic sign detection model, Represents the weight trigger threshold.
[0016] As a further improvement of the path planning method combining small-scale traffic sign recognition and DWA algorithm of the present invention:
[0017] The evaluation function of the improved DWA algorithm for evaluating the prediction trajectory is for:
[0018] (13)
[0019] in, is the weight coefficient, is a fixed constant; is the normalization coefficient; Indicates the angular deviation between the end of the trajectory and the target point; Indicates the minimum distance from the end of the improved trajectory to the obstacle; Indicates speed; is the safety radius.
[0020] As a further improvement of the path planning method combining small-scale traffic sign recognition and DWA algorithm of the present invention: The minimum distance from the end of the improved trajectory to the obstacle is:
[0021] (11)
[0022] The value range is:
[0023] (12).
[0024] The beneficial effects of the present invention are mainly reflected in:
[0025] 1. The DWA path planning algorithm of the present invention is integrated with the small-scale traffic sign detection model, and the recognized traffic sign information is input into the DWA algorithm for local obstacle avoidance, thereby realizing vehicle obstacle avoidance during automatic driving based on traffic signs, avoiding the DWA algorithm from performing obstacle avoidance planning during vehicle driving, and improving the adaptability and safety of the DWA algorithm in complex environments.
[0026] 2. The small-scale traffic sign detection model of the present invention introduces a parallel attention mechanism based on the YOLOv5s network, which significantly improves the detection accuracy of small-scale traffic signs and solves the problem of missed detection in the prior art.
[0027] 3. The present invention optimizes the path planning performance. By improving the evaluation function of the DWA algorithm, the problem of the path being close to obstacles is avoided, and trajectory oscillation is reduced, thereby improving the efficiency and safety of path planning.
[0028] 4. The path planning method combined with small-scale traffic sign recognition of the present invention can reduce costs and improve cost-effectiveness, reduce dependence on expensive hardware, while maintaining high performance and improving the cost-effectiveness of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0030] Figure 1 A schematic diagram of the process of constructing and offline training a small-scale traffic sign detection model of the present invention;
[0031] Figure 2 It is a structural schematic diagram of a small-scale traffic sign detection model of the present invention;
[0032] Figure 3 for Figure 2 Schematic diagram of the structure of the ECA-SAM parallel attention module in;
[0033] Figure 4 A schematic diagram of a newly added small-scale detection head and a cross-layer cascade in the small-scale traffic sign detection model of the present invention;
[0034] Figure 5 A schematic diagram of the detection results of the small-scale traffic sign detection model of the present invention;
[0035] Figure 6 This is the simulation effect diagram of the traditional DWA algorithm path planning;
[0036] Figure 7 This is a simulation effect diagram of the improved DWA algorithm path planning of the present invention;
[0037] Figure 8 Speed curve diagram for traditional DWA algorithm path planning;
[0038] Fig. 9 This is a speed curve diagram of the improved DWA algorithm path planning of the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described below in conjunction with specific embodiments, but the protection scope of the present invention is not limited thereto:
[0040] Embodiment 1: A path planning method combining small-scale traffic sign recognition and DWA algorithm is used for autonomous driving that adapts to complex traffic environments. The autonomous driving unmanned vehicle obtains small-scale traffic sign information in real time through an offline trained small-scale traffic sign detection model, and obtains obstacle information on the driving path through its own radar. Combined with vehicle speed information (maximum linear velocity, maximum angular velocity, acceleration, angular acceleration, linear velocity resolution, angular velocity resolution), a dynamic window method (DWA) with an improved evaluation function is used for local path planning, making driving more real-time.
[0041] Step 1: Small-scale traffic sign detection method based on improved YOLOv5s network
[0042] The present invention first constructs a small-scale traffic sign detection model based on an improved YOLOv5s network, and then uses the Bosch Small Traffic Signs dataset to perform offline training on the small-scale traffic sign detection model, thereby obtaining a small-scale traffic sign detection method that can be used online. The process of constructing the small-scale traffic sign detection model and offline training is as follows: Figure 1 As shown, specifically:
[0043] Step 1.1: Obtain an offline training dataset containing traffic signs in a natural environment, and perform data preprocessing and data enhancement.
[0044] The present invention uses the Bosch Small Traffic Signs dataset as an offline training dataset for the small-scale traffic sign detection model. The number of training samples, test samples, and validation samples in the Bosch Small Traffic Signs dataset are 3500, 1000, and 500, respectively.
[0045] The data preprocessing steps include:
[0046] (1) Image size unification: Since the image size and resolution in the dataset are inconsistent, all images need to be resized to a uniform size for model processing. The image size of the Bosch Small Traffic Signs dataset is adjusted to 640×1280 without changing the aspect ratio of the original image, which reduces the amount of model calculation and speeds up the forward propagation of the model;
[0047] (2) Establishing the relationship between categories and IDs: Establish a unique ID for each category in the dataset to facilitate subsequent model training and evaluation.
[0048] The data augmentation steps include:
[0049] (1) Translation: Traffic signs are randomly translated in the image to simulate traffic signs appearing in different positions.
[0050] (2) Scaling: Randomly scale the image to simulate the size change of traffic signs at different distances.
[0051] (3) Random rotation: Rotate the image at random angles to increase the model’s ability to recognize traffic signs in different directions.
[0052] Convert the format of the label file to the txt format required by YOLOv5s, where each image corresponds to a label file, and each line of the file represents the information of an object, including the corresponding list name, center coordinates, and the length and width of the bounding box.
[0053] Step 1.2: Build a small-scale traffic sign detection model based on improved YOLOv5s;
[0054] Step 1.2.1: In the backbone network (Backbone), the input image is first sliced and spliced through the Focus module, and then passes through a series of convolutional layers (Conv+C3) and spatial pyramid pooling (SPP) layers to extract features. In the neck network (Neck), a feature enhancement module (FEM) is added to each layer of the downsampled feature pyramid. The FEM module can effectively solve the information loss problem caused by the use of a single dilated convolution with a fixed dilation rate by combining multiple dilated convolutions with different dilation rates, thereby optimizing the processing effect.
[0055] Then, the ECA-SAM parallel attention mechanism is added between every two layers of the upsampling feature pyramid. Since the original network model faces many challenges in solving small-scale traffic signs, especially in accurately allocating and processing target area features, the ECA-SAM parallel attention mechanism is introduced into the feature fusion layer of the Neck part of the original YOLOv5s. In terms of the specific process, Figure 2 As shown in the figure, the feature map is first processed by the attention module and then transmitted from bottom to top, thereby enhancing the network's ability to learn and recognize small-scale target features.
[0056] Finally, the multiple target detection heads (Detect) of the head network (Head) are used to predict the bounding box and category of the target. The target detection head is the part used to detect targets on the feature pyramid, which includes convolutional layers, pooling layers, and fully connected layers. In the original YOLOv5s model, the detection head module is mainly responsible for multi-scale target detection on the feature map extracted by the backbone network, including three detection heads: large, medium, and small. The small-scale traffic sign detection model of the present invention adds a small-scale detection head to the top layer to realize small-scale target detection. The entire Head part network realizes the fusion of features at different levels by concatenating feature maps (Concat), thereby improving the accuracy of target detection.
[0057] ECA-SAM parallel attention mechanism Figure 3 As shown in the figure, the ECA-SAM parallel attention mechanism integrates the channel attention (ECA) module and the spatial attention (SAM) module to binary process the input and form two parallel paths. The upper part focuses on channel attention and directly learns the features extracted by the global average pooling layer through the fine processing of the ECA module. The lower part generates the weight value of the spatial attention through the SAM module. The weights of the two outputs are normalized respectively, and then the normalized weights are fused by point multiplication to output the weight of the parallel attention mechanism. The weight of the ECA-SAM parallel attention mechanism is shown in the following formula.
[0058] (1)
[0059] In the formula, Represents the final features output by the ECA-SAM parallel attention mechanism; Represents the sigmoid function; Represents the weight of the channel attention output; represents the element-by-element multiplication operation with the original input features, Represents the weight value of the spatial attention output.
[0060] The small-scale traffic sign detection model of the present invention uses YOLOv5s as the basic network architecture, introduces the ECA-SAM parallel attention mechanism by integrating channel attention and spatial attention, and then further judges and recognizes the images collected by the high-speed camera through weights to eliminate the interference of non-target objects in complex traffic environments.
[0061] Step 1.2.2: Based on the three detection heads of YOLOv5s, a new detection head is added to the head of YOLOv5s as a small-scale detection head, such as Figure 4As shown in the figure, the newly added small-scale detection head (Detect4) is consistent with the original detection heads (Detect1, Detect2 and Detect3) of the three YOLOv5s networks and presents a parallel structure. At the same time, a small-scale feature detection network is added to the neck. The added small-scale feature detection network has the same structure as the original feature detection network of YOLOv5s and is parallel to it. The small-scale feature detection network is connected to the small-scale detection head (Detect4) to form a four-channel detection structure. The newly added detection part is as follows Figure 4 As shown in the green box. This measure helps to detect small-scale targets, thereby further improving the network's ability to recognize medium and long-distance targets. In addition, adding cross-layer cascades in the network ensures that the shallow feature information of the network backbone is effectively transmitted to the feature fusion layer, such as Figure 4 As shown by the red line in the middle, the feature map extracted by the C3 module in Backbone and the feature maps with the same width and height extracted by the two Conv modules in the Neck part are spliced in the channel dimension. This measure aims to strengthen the back propagation mechanism of the gradient and prevent the occurrence of gradient attenuation, thereby significantly reducing the feature information loss that may occur when recognizing small-scale traffic signs.
[0062] Step 1.3: Input the training images and labels into the built detection model and train it until convergence;
[0063] Step 1.3.1: Set the parameters of the small-scale traffic sign detection model: batch size is 32, initial learning rate r is 1e-5, and if the loss curve changes slowly during training, increase the learning rate.
[0064] Step 1.3.2: Input the training set images and labels into the improved YOLOv5s network (small-scale traffic sign detection model), calculate the loss function and back-propagate the gradient until the loss function on the training set and validation set (classification loss function Binary Cross Entropy referred to as BCE, positioning loss function Complete Intersection over Union referred to as CIoU and weight loss function BCE) no longer decreases, and the output evaluation indicators (accuracy and recall) no longer increase. At this time, the model parameters are the trained model parameters. The following are the calculation formulas for the BCE loss function and the CIoU loss function.
[0065] (2)
[0066] in, is a binary label 0 or 1, is the probability that the output belongs to the label, Indicates the number of groups for which the model predicts the object.
[0067] (3)
[0068] in, It's a cross-combination ratio. is the distance between the center point of the predicted box and the real box, is the diagonal distance of the minimum enclosing rectangle, is the weight factor, is the correction factor.
[0069] The test set images are then input into the trained model, and the recall rate of the test data set reaches 88.7% and the accuracy rate reaches 91.6%, thus completing the offline training and obtaining a small-scale traffic sign detection model that can be used online.
[0070] Step 1.4: Use online;
[0071] When the autonomous driving car is driving, it automatically collects images through the high-speed camera on the car body, and then inputs the images into the offline trained small-scale traffic sign detection model. The model detects the location, label and weight information of the traffic sign. For example, Figure 5 As shown, it is used for the next step of path planning.
[0072] Step 2: Improve the dynamic window method (DWA) of the evaluation function for local path planning
[0073] During the driving process of the autonomous driving unmanned vehicle, the local grid map is obtained through the on-board radar to obtain obstacle information, and the map information is provided for the local planning of the DWA algorithm. At the same time, after successfully identifying the traffic sign (including the location, label and weight information of the traffic sign) through step 1.4, the label and weight information of the traffic sign are output, and the obtained label and weight information are used as the input signal for starting the DWA algorithm in the present invention for motion control. Only when those traffic signs are detected and the weights meet the DWA trigger conditions, the DWA algorithm will assist in motion control, avoiding the situation where the DWA algorithm is always doing obstacle avoidance planning when the vehicle is driving straight, thereby improving the adaptability and safety of the DWA algorithm.
[0074] The traditional DWA algorithm obtains multiple groups of speed combinations by sampling the dynamic speed window. The prediction trajectories of different speed combinations within a certain period of time are evaluated through the evaluation function, and the speed combination corresponding to the trajectory with the highest evaluation is selected as the movement speed of the unmanned vehicle. The traditional DWA algorithm can be divided into map establishment, speed window determination, future trajectory prediction, and prediction trajectory evaluation.
[0075] The improved DWA algorithm of the present invention adds an algorithm triggering condition based on the detection results of the small-scale traffic sign detection model and an improvement on the evaluation function for evaluating the predicted trajectory. It can be divided into algorithm triggering, map building, determining the speed window, predicting the future trajectory and using the improved evaluation function to evaluate the predicted trajectory, as follows:
[0076] (1) The algorithm trigger must meet the following requirements:
[0077] (4)
[0078] in, represents the weight corresponding to the traffic sign detected by the small-scale traffic sign detection model, Represents the set weight trigger threshold.
[0079] (2) Map creation:
[0080] Millimeter wave radar scans to obtain obstacle information collection , through obstacle information collection Obtain the map required for DWA route planning The subsequent DWA algorithm needs to be Path planning is performed in
[0081] (3) DWA dynamic speed window is:
[0082] (5)
[0083] in,
[0084]
[0085] (6)
[0086] (7)
[0087] in, , They are the maximum linear speed and maximum angular speed of the unmanned vehicle respectively; , They are the minimum linear speed and minimum angular speed of the unmanned vehicle respectively; , are the current linear velocity and angular velocity of the unmanned vehicle respectively; , is the maximum deceleration of the unmanned vehicle; , is the maximum acceleration of the unmanned vehicle, is the sampling interval, Indicates the minimum distance from the end of the trajectory to the obstacle.
[0088] (4) Predicting DWA trajectories specifically includes:
[0089] Uniform sampling in DWA dynamic speed window, optional speed combination Number of for:
[0090] (8)
[0091] in, is the linear velocity resolution, is the angular velocity resolution.
[0092] Select speed combination The predicted trajectory is:
[0093] (9)
[0094] in is the position of the unmanned vehicle at time k, is the sampling interval.
[0095] (5) Evaluation of prediction trajectories
[0096] Since the DWA algorithm does not take into account the shortcomings of the directionality of the trajectory to be evaluated, the smoothness of the movement, and the speed of reaching the target point, an evaluation function can be added to optimize the DWA algorithm to improve the stability of the robot's movement direction, the smoothness of the movement, and reduce the time it takes for the robot to reach the end point. The role of the evaluation function is to evaluate the pros and cons of multiple sets of predicted trajectories obtained by sampling, determine the optimal trajectory, and select the corresponding speed combination as the robot's movement speed. The evaluation function of the traditional DWA algorithm is shown in the following formula:
[0097] (10)
[0098] in, Indicates the angular deviation between the end of the trajectory and the target point. The smaller the deviation, the higher the evaluation. Indicates the minimum distance from the end of the trajectory to the obstacle. The larger the value, the farther away from the obstacle, and the higher the evaluation; Indicates speed, the faster the speed, the higher the evaluation; is the weight coefficient, is the normalization coefficient.
[0099] In the traditional DWA algorithm Defined as the minimum value of the line connecting the end of all predicted trajectories and the center of the obstacle. Considering the size of the obstacle and the size of the robot, the safety radius is defined as , the new distance evaluation is defined as:
[0100] (11)
[0101] To prevent the vehicle from being blocked by obstacles, The impact is too great, and the value range can be defined as:
[0102] (12)
[0103] To solve the problem of path oscillation when the vehicle enters an area with dense obstacles, the DWA evaluation function is improved: the focus on the target point is reduced, while compensating for the speed. Define the obstacle distance factor , the new evaluation function is:
[0104] (13)
[0105] in, , is a fixed constant.
[0106] Finally, through the new evaluation function Each predicted trajectory of the improved DWA algorithm is evaluated, the evaluation score is output, and the trajectory with the highest evaluation score is selected as the best trajectory.
[0107] experiment:
[0108] 1. Verify the feasibility of improving the DWA algorithm during motion through simulation.
[0109] Table 1 shows the motion parameters of the simulated unmanned vehicle using the improved DWA algorithm of the present invention, and Table 2 shows the DWA algorithm parameters. The simulation operation effect using the improved DWA algorithm of the present invention is shown in FIG. Figure 7 As shown, the speed curve is Fig. 9 shown.
[0110] Table 1 Simulation parameters of unmanned vehicle motion
[0111] Maximum line speed (m / s) Maximum angular velocity (rad / s) <![CDATA[Acceleration (m / s 2 )]]> <![CDATA[Angular acceleration (rad / s 2 )]]> Linear speed resolution (m / s) Angular velocity resolution (rad / s) 3 0.75 0.3 1.745 0.03 0.175
[0112] Table 2 DWA algorithm parameters
[0113]
[0114] The simulation results of the traditional DWA algorithm are as follows: Figure 6 As shown, the speed curve is Figure 8 As shown in Figure 2, the traditional DWA algorithm has trajectory oscillation, speed curve fluctuation, and even vehicle collision with obstacles in an environment with dense obstacles. Figure 7 and Fig. 9 It can be seen that the path planned by the DWA algorithm with the improved evaluation function is smooth and has no oscillation, and the speed curve is overall stable and has no fluctuations, which is more in line with the kinematic requirements of the robot in the actual environment. In addition, the overall planning speed of the improved DWA algorithm is 4.7% higher than that of the traditional DWA algorithm.
[0115] 2. Experiments on small-scale object detection models
[0116] Ablation experiments were performed on the ECA-SAM parallel attention mechanism and the multi-detection head network respectively. In the experiment of the ECA-SAM parallel attention mechanism, not only the original YOLOv5s network was compared, but also the YOLOv5s network using the channel attention mechanism ECANet and the YOLOv5s network using the spatial attention mechanism SAM were compared.
[0117] Then, a comparative experiment was conducted to evaluate the model performance. The divided test samples were input into the small-scale traffic sign detection model, and the precision and recall rate of the output model for traffic sign detection were compared with the evaluation indicators of the original YOLOv5s network to prove the effectiveness of the improved algorithm.
[0118] 2.1 Ablation experiment:
[0119] Comparative experiments were conducted before and after introducing different attention mechanisms and adding detection heads. The experimental results are shown in Tables 3 and 4.
[0120] Table 3 Comparative experiments after introducing different attention mechanisms
[0121] network Recall (%) Precision (%) YOLOv5s 86.4 90.5 YOLOv5s+ECAnet 86.1 90.7 YOLOv5s+SAM 86.6 90.8 YOLOv5s+ECA-SAM 87.5 91.3
[0122] As shown in Table 3, after introducing three different attention mechanisms into the YOLOv5s network, the detection accuracy of the model has been improved. Among them, the model incorporating the ECA-SAM parallel attention mechanism performed the best, with a detection accuracy improvement of 0.8% compared to the original model. For ECANet and SAM, although the improvement in network performance is not significant, only increasing the detection accuracy by 0.2% and 0.3% respectively, this small improvement is still worthy of recognition. These results show that by reasonably introducing the attention mechanism into the YOLOv5s network, its performance in target detection tasks can be greatly improved. In summary, the ECA-SAM parallel attention mechanism has certain advantages over the common attention mechanisms.
[0123] Table 4 Comparative experiment of adding detection head
[0124] network Recall (%) Precision (%) YOLOv5s 86.4 90.5 YOLOv5s+Detect 86.5 90.7
[0125] It can be seen from Table 4 that after adding a small-scale detection head to the YOLOv5s network, the model detection accuracy is improved by 0.2%.
[0126] 2.2 Comparative Experiment
[0127] The comparative experimental results with YOLOv5 are shown in Table 5.
[0128] Table 5 Comparative experiments with YOLOv5s
[0129] network Recall (%) Precision (%) YOLOv5s 86.4 90.5 YOLOv5s+ECA-SAM 87.5 91.3 YOLOv5s+ECA-SAM+Detect(ours) 88.7 91.6
[0130] As shown in Table 5, introducing the ECA-SAM parallel attention mechanism into the YOLOv5s network can improve the performance of the network. Compared with the original YOLOv5s algorithm, the detection accuracy and recall of the traffic sign detection algorithm we proposed are improved by 1.1% and 2.3% respectively. Compared with the YOLOv5s algorithm that only introduces the ECA-SAM attention mechanism, the detection accuracy and recall are improved by 0.3% and 1.2% respectively. This fully demonstrates the advantages of the algorithm in traffic sign detection, especially in small-scale traffic sign detection.
[0131] Finally, it should be noted that the above examples are only some specific embodiments of the present invention. Obviously, the present invention is not limited to the above embodiments, and there are many variations. All variations that can be directly derived or associated with the content disclosed by a person skilled in the art should be considered as the protection scope of the present invention.
Claims
1. A path planning method combining small-scale traffic sign recognition and DWA algorithm, characterized by: The autonomous driving vehicle collects road images, uniformly scales them, and then inputs them into the offline trained small-scale traffic sign detection model to detect the location, label, and weight information of traffic signs in real time. The obtained label and weight information are then used as the trigger conditions of the improved DWA algorithm. After the trigger conditions are met, the improved DWA algorithm is used to perform local path planning. The small-scale traffic sign detection model is improved based on the YOLOv5s network. First, a cross-layer cascade is added to concatenate the feature map extracted by the C3 module in Backbone and the feature map extracted by the two Conv modules in Neck in the channel dimension; secondly, a feature enhancement module is added to each layer of the down-sampling feature pyramid of the YOLOv5s network Neck, and then the ECA-SAM parallel attention mechanism is added between every two layers of the up-sampling feature pyramid, and another small-scale feature detection network is added in Neck; Again, add a small-scale detection head to the YOLOv5s network head; The improved DWA algorithm includes adding an algorithm triggering condition based on the detection result of a small-scale traffic sign detection model and improving the evaluation function for evaluating the predicted trajectory.
2. The path planning method combining small-scale traffic sign recognition and DWA algorithm according to claim 1, characterized in that: The small-scale feature detection network has the same structure as the original feature detection network of the YOLOv5s network and is arranged in parallel. The small-scale detection head has the same structure as the original three detection heads of the YOLOv5s network and is arranged in parallel. The small-scale feature detection network is connected to the small-scale detection head.
3. The path planning method combining small-scale traffic sign recognition and DWA algorithm according to claim 2, characterized in that: The offline training process of the small-scale traffic sign detection model is as follows: The training set, validation set and test set in the Bosch Small Traffic Signs dataset are used for offline training. The size of each sample image in the dataset is uniformly scaled before data augmentation operations, including image translation, image scaling and random rotation. The training parameters are set, and the training set images and labels are input into the small-scale traffic sign detection model. The loss function is calculated and the gradient is back-propagated until the loss function on the training set and validation set no longer decreases. Then the test dataset is input into the trained model to verify the recall and accuracy.
4. The path planning method combining small-scale traffic sign recognition and DWA algorithm according to claim 3, characterized in that: The algorithm triggering conditions of the improved DWA algorithm are: ; in, represents the weight of the traffic sign detected by the small-scale traffic sign detection model, Represents the weight trigger threshold.
5. The path planning method combining small-scale traffic sign recognition and DWA algorithm according to claim 4, characterized in that: The evaluation function of the improved DWA algorithm for evaluating the prediction trajectory is for: ; in, is the weight coefficient, is a fixed constant; is the normalization coefficient; Indicates the angular deviation between the end of the trajectory and the target point; Indicates the minimum distance from the end of the improved trajectory to the obstacle; Indicates speed; is the safety radius.
6. The path planning method combining small-scale traffic sign recognition and DWA algorithm according to claim 5, characterized in that: The minimum distance from the end of the improved trajectory to the obstacle is: ; The value range is: 。
Citation Information
Patent Citations
Dynamic obstacle avoidance method based on fusion Kalman filtering and improved DWA algorithm
CN118938924A
Path planning method and system, computer equipment and readable storage medium
CN112862204A
Traffic sign detection method based on deep learning
CN116977975A
Small target traffic sign real-time detection method based on improved YOLOv5s
CN117333845A
Foggy day traffic sign detection method based on deep learning
CN117765507A