Temporary traffic sign detection method for auxiliary driving

By introducing multi-scale hybrid convolution and task dynamic alignment detection heads into the YOLOv8n network, and modifying the CIoU loss function, the accuracy problem of temporary traffic sign detection in complex environments is solved, efficient temporary traffic sign detection is achieved, and assisted driving is improved. System perception capabilities.

CN118537839APending Publication Date: 2024-08-23TIANJIN UNIV OF SCI & TECH

Patent Information

Application Number
CN202410688981.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing technology is difficult to quickly and accurately obtain temporary traffic sign information in complex environments, which affects the perception ability of the assisted driving system.

Method used

By making a self-made temporary traffic sign data set, multi-scale hybrid convolution and task dynamic alignment detection heads are introduced, the CIoU loss function is modified, the perceptual field of view and interactivity of the YOLOv8n network are enhanced, and temporary traffic signs are detected in real-time in vehicle cameras.

Benefits of technology

The accuracy and robustness of temporary traffic sign detection are improved. The mAP50 value of the improved algorithm reaches 89.9%, and the number of parameters is reduced by 27.1%, making it suitable for embedded terminal deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537839A
    Figure CN118537839A
Patent Text Reader

Abstract

The invention belongs to the technical field of visual inspection, and particularly relates to a temporary traffic sign detection method for assisting driving, which comprises the following steps of: self-making a temporary traffic sign data set; performing label labeling on the acquired image by using data labeling software; multi-scale hybrid convolution is introduced into the YOLOv8n network; on the basis of the YOLOv8n network, a task dynamic alignment detection head is adopted to replace an original model detection head; modifying a CIoU loss function in an original YOLOv8n network model, and adding a scaling factor and a dynamic non-monotonic regulation mechanism to help the model to be better trained; configuring an environment required by a training model, and training the temporary traffic sign data set to obtain a trained weight; and the trained improved algorithm is arranged in an auxiliary driving system, and temporary traffic sign real-time detection is carried out. By means of the method, the safety and reliability of urban road vehicle driving can be improved, traffic accidents are reduced, and sustainable development of urban traffic is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of visual detection, and in particular relates to a temporary traffic sign detection method for assisted driving. Background Art

[0002] With the development of science and technology, intelligent and convenient facilities are applied to various fields of people's lives, bringing a lot of convenience to people's lives. Now the automotive field is also developing more and more towards intelligence. The development of intelligent driving has also greatly guaranteed the safety of passengers and relieved the pressure of traffic management and transportation. As an important part of the transportation field, traffic signs can provide drivers with rich driving environment information, play a role in regulating traffic flow and reducing traffic accidents. Although the development of navigation allows drivers to grasp road conditions, traffic congestion, accident information, etc. to a certain extent, which greatly facilitates the driver's driving experience, it may also affect the driver's safe driving due to wrong information given to the driver due to update delays, restrictions or road closures, misleading or outdated information. Therefore, how to quickly and accurately obtain the information of temporary traffic signs in a complex and changing environment is of great significance to the development of perception technology of assisted driving systems. Summary of the invention

[0003] The purpose of the present invention is to provide a temporary traffic sign detection method for assisted driving to solve the problems existing in the prior art.

[0004] To achieve the above object, the present invention provides the following technical solution: a temporary traffic sign detection method for assisted driving, comprising the following steps:

[0005] S01, self-made temporary traffic sign dataset;

[0006] S02. Label the collected images using data labeling software, and process the labeled label files and images;

[0007] S03. Introduce multi-scale mixed convolution in the YOLOv8n network to enhance the network perception field of view;

[0008] S04. Based on the YOLOv8n network, the task dynamic alignment detection head is used to replace the original model detection head to enhance the interactivity between the two tasks of classification and positioning;

[0009] S05. Modify the CIoU loss function in the original YOLOv8n network model, add a scaling factor and a dynamic non-monotonic adjustment mechanism to help the model train better;

[0010] S06. Configure the environment required for the training network, set parameters, train the temporary traffic sign data set, and obtain the trained weights;

[0011] S07. Deploy the trained improved algorithm into the assisted driving system to perform real-time detection of temporary traffic signs.

[0012] Preferably, in S1, offline data enhancement is used to enable the data set to include complex environments such as different light intensities, daytime, nighttime, rain and snow.

[0013] Preferably, in S2, the training set, the validation set and the test set are divided into a ratio of 8:1:1.

[0014] Preferably, in S3, features of different scales in the image are captured while reducing the amount of network parameters, thereby expanding the perceptual field of view of the network.

[0015] Preferably, in S4, the task dynamic alignment detection head first learns the task interaction features from multiple convolution layers through a feature extractor composed of two normalized convolutions, and then integrates the interaction features to obtain joint features, and then passes through a task decomposer TD for task splitting. After the task decomposer, the detection task is split into a positioning branch and a classification branch. The deformable convolution DCNv2 is introduced into the positioning branch to learn the interaction features and obtain the offset of the deformable convolution to guide the positioning branch to perform precise positioning. The classification branch uses a feature selection structure to dynamically select the interaction features, and learns the target salient features for efficient classification. Finally, the results of the two branches are output to obtain the final detection result.

[0016] Preferably, in S4, shared convolution is used, and each of the three feature layers performs only one set of task dynamic alignment detection operations; a scale factor is added to scale the features.

[0017] Preferably, in S5, Wise-Inner-CIoU replaces CIoU as the bounding box loss function.

[0018] First, the bounding box ratio coefficient is introduced to obtain the Inner-CIoU loss function, which is calculated as follows:

[0019] L Inner-CIoU =L CIoU +IoU-IoU Inner

[0020]

[0021] (x c ,y c ) represents the center point of the prediction box and the internal prediction box, represents the center point of the ground truth box and the inner ground truth box, w and h represent the width and height of the predicted box, w gt and h gtrepresents the width and height of the ground truth box, and ratio represents the scaling factor used to generate the auxiliary bounding box, denote the left, right, top, and bottom boundaries of the ground truth box calculated from the center point of the ground truth box and the scale factor ratio, respectively, and b l ,b r ,b t ,b b denote the left, right, top, and bottom boundaries of the anchor point calculated from the center point of the prediction box and the scale factor ratio, respectively.

[0022] Then, based on Inner-CIoU, a dynamic non-monotonic adjustment mechanism is introduced as the Wise-Inner-CIoU loss function, and its calculation formula is as follows:

[0023]

[0024] in represents the monotonic focusing coefficient, is the moving average with momentum m, and it is dynamic, so the quality division standard of the anchor box is also dynamic, which makes The gradient gain allocation strategy that best suits the current situation can be made at every moment.

[0025] 8. A temporary traffic sign detection method for assisted driving according to claim 1, characterized in that: in S6, the hardware environment processor is 12vCPU Intel(R)Xeon(R)Platinum8352VCPU, and the GPU is NVIDIAGeForce RTX4090; the software environment is Ubuntu20.04 operating system, the programming language is Python3.8, the deep learning framework is Pytorch2.0.0, and the Cuda version is 11.8.

[0026] The beneficial effect of the present invention is that the algorithm proposed in the present invention uses a vehicle-mounted camera to take real-time photos of the road, and transmits the collected road pictures and video information to the algorithm processing center for real-time detection of temporary traffic signs. The mAP50 value of the improved algorithm of this method finally detected reached 89.9%, which is 4.4% higher than the original YOLOv8n algorithm. At the same time, the number of parameters of the algorithm is reduced to make it more suitable for embedded deployment. The number of parameters of the improved algorithm is reduced by 27.1% compared with the original algorithm. Moreover, this improved algorithm has strong robustness and is also very effective for temporary traffic sign detection in complex road environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a flow chart of the present invention;

[0028] Figure 2 This is a structural diagram of the multi-scale hybrid convolution module in the present invention;

[0029] Figure 3 This is a structural diagram of the task dynamic alignment detection head in the present invention;

[0030] Figure 4 It is a structural diagram of the improved MTWI algorithm in the present invention;

[0031] Figure 5 Schematic diagram of intersection-and-parallel ratio calculation in the present invention

[0032] Figure 6 This is a diagram of the detection results of the MTWI algorithm in the present invention. DETAILED DESCRIPTION

[0033] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0034] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0035] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fixed connection" and "fixed connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.

[0036] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings and preferred embodiments.

[0037] like Figure 1As shown, a temporary traffic sign detection method for assisted driving includes the following steps:

[0038] S01. Self-made temporary traffic sign dataset, and through offline data enhancement, the dataset can cover complex environments such as different light intensities, daytime, nighttime, rain and snow.

[0039] During actual driving, the on-board camera is used to collect temporary traffic signs on the road ahead, and then the image frames containing the target are captured from the collected video. After removing the images with poor quality, offline data enhancement is performed, including brightness changes and adding noise, to enhance the generalization ability of the model.

[0040] S02. Label the collected images using data labeling software, process the labeled label files and images, and divide them into training set, validation set and test set in a ratio of 8:1:1.

[0041] The data-enhanced images are labeled using the labelimg tool to obtain label files in YOLO format, i.e., txt files. These files contain the type and location information of the target in the image, which can guide the network training. Finally, the image files and label files are randomly divided into training sets, validation sets, and test sets in a ratio of 8:1:1, and it is ensured that the images and labels can correspond one to one.

[0042] S03. Introduce multi-scale mixed convolution in the YOLOv8n network. While reducing the number of network parameters, it captures features of different scales in the image and expands the network's perception field of view.

[0043] Traditional convolution uses only one scale of convolution kernel, so it is not enough to distinguish the features of objects or scenes of different scales. Multi-scale convolution can better capture features of different scales and extract richer feature information because it uses multi-scale convolution kernels. Therefore, the present invention designs a multi-scale hybrid convolution module MSMC, and integrates the multi-scale hybrid convolution module into C2f in YOLOv8 as a C2f-MSMC structure. The structure diagram is shown in Figure 2 .

[0044] The MSMC module divides the input from the previous convolution into two groups, one of which directly outputs the input from the previous layer intact without any operation. The other group of unprocessed features is further divided into two parts, one part undergoes a 3×3 convolution operation, and the other part undergoes a 5×5 convolution operation. Finally, the results of the two convolution operations are fused with the first group of features from the previous layer. The multi-scale mixed convolution module can capture features of different scales within the image, thereby expanding the network's perceptual field of view, which enables the network to simultaneously obtain detail information and overall context information from the input image while reducing the network's computational overhead. Since the features are obtained from an isolated feature channel and the features of each channel remain autonomous, point-by-point convolution, although it has no receptive field in the spatial dimension and only processes the number of channels, it can modify the number of channels in the input tensor, thereby allowing the control of the model's parameters and computational complexity. Therefore, the features of each channel are merged through point-by-point convolution to achieve channel information fusion. Compared with traditional convolution, this structure can not only reduce the number of parameters, but also retain multi-scale feature information.

[0045] S04. Based on the YOLOv8n network, a task dynamic alignment detection head is used to replace the original model detection head to enhance the interactivity between the two tasks of classification and positioning, so that the two tasks can work more collaboratively and adjust their predictions more accurately.

[0046] The original YOLOv8 model detection head uses two independent branches to perform object classification and localization in parallel, which may lead to a lack of interaction between the two tasks, thus affecting the final detection result. Therefore, the present invention designs a task dynamic alignment detection head TDADH, which can well balance the learning between the two tasks and enhance the interaction between the two tasks. Its structure is shown in Figure 3 .

[0047] TDADH first learns task interaction features from multiple convolution layers through a feature extractor composed of two normalized convolutions, then integrates the interaction features to obtain joint features, and then splits the tasks through a task disassembler TD. After the task disassembler, the detection task is split into a positioning branch and a classification branch. In the positioning branch, deformable convolution DCNv2 is introduced to learn the interaction features and obtain the offset of the deformable convolution to guide the positioning branch to perform precise positioning. The classification branch uses a feature selection structure to dynamically select interactive features and learn target salient features for efficient classification. Finally, the results of the two branches are output to obtain the final detection result. In the original YOLOv8 network, the number of parameters of the detection head is very large, accounting for about 28% of the total network parameter amount. By using shared convolution, the three feature layers only perform a set of task dynamic alignment detection operations, which can greatly reduce the number of parameters, making the model more lightweight, especially convenient to use on resource-constrained devices. In order to cope with the problem of inconsistent scales of the targets detected by each detection head after the convolution parameters are shared, a scale coefficient is added to scale the features.

[0048] The final MTWI network structure diagram is as follows: Figure 4 shown.

[0049] S05. Modify the CIoU loss function in the original YOLOv8n network model, add a scaling factor and a dynamic non-monotonic adjustment mechanism to help the model train better.

[0050] In the field of object detection, an indicator IoU, or intersection over union, is often used. IoU can well describe the quality of an object detection model. IoU is calculated by dividing the intersection of the predicted box (A) and the ground truth box (B) by the union of the two, such as Figure 5 As shown, the formula is:

[0051]

[0052] In the YOLOv8 algorithm, Loss calculation includes two branches: classification branch and regression branch. The classification branch uses BCE Loss, and the regression branch uses Distribution Focal Loss + CIoU Loss. The CIoU loss function, as a bounding box loss function, plays a very important role in model training. The calculation formula of the CIoU loss function is:

[0053]

[0054] In the above formula, b and b gt denote the center points of the predicted box and the ground truth box, respectively, and w gt and h gtRespectively represent the width and height of the ground truth box, and w and h represent the width and height of the predicted box.

[0055] Although CIoU considers the overlapping area between the predicted box and the ground truth box, the distance between the center points of the predicted box and the ground truth box, and the aspect ratio of the width and height of the predicted box and the ground truth box, it also has certain shortcomings. First, it does not consider the balance between different samples. It optimizes samples of different qualities with equal weights, which is unfair to more important high-quality samples. If the weight of low-quality samples with low IoU is too large, it will interfere with the regression of high-quality samples with high IoU, resulting in a decrease in regression accuracy. Second, although the CIoU loss function introduces the aspect ratio as a penalty factor, if the real and predicted boxes share the same aspect ratio but different width and height values, the penalty term cannot be precisely different between the two boxes. In order to solve these defects of CIoU, WIoUv3, as a bounding box regression loss, contains a dynamic non-monotonic mechanism and designs a reasonable gradient gain distribution. This strategy reduces the large gradients or harmful gradients that appear in extreme samples. The loss method calculation pays more attention to samples of normal quality, thereby improving the generalization ability and overall performance of the network model. Inner-IoU introduces auxiliary bounding boxes to calculate IoU loss. It introduces a scaling factor (ratio) to control the size of the auxiliary bounding box. By distinguishing different regression samples and using auxiliary bounding boxes of different scales to calculate the loss, the regression process of the bounding box is accelerated. In traffic sign detection, since the car is in a moving state, the traffic sign targets often have different scales. In addition, the actual road conditions are complicated, so the quality of target samples varies, and some samples are even of very low quality. Therefore, in order to ensure the quality of the detection results, this paper experiments Wise-Inner-CIoU instead of CIoU as the bounding box loss function.

[0056] First, we introduce the bounding box ratio coefficient to obtain the Inner-CIoU loss function. The calculation formula is as follows:

[0057] L Inner-CIo =L CIoU +IoU-IoU Inner

[0058]

[0059] (x c ,y c ) represents the center point of the prediction box and the internal prediction box, represents the center point of the ground truth box and the inner ground truth box, w and okh represent the width and height of the predicted box, w gt and h gt represents the width and height of the ground truth box, and ratio represents the scaling factor used to generate the auxiliary bounding box. denote the left, right, top, and bottom boundaries of the ground truth box calculated from the center point of the ground truth box and the scale factor ratio, respectively. b l ,b r ,b t ,b b denote the left, right, top, and bottom boundaries of the anchor point calculated from the center point of the predicted box and the scale factor ratio, respectively.

[0060] Then, based on Inner-CIoU, a dynamic non-monotonic adjustment mechanism is introduced as the Wise-Inner-CIoU loss function, and its calculation formula is as follows:

[0061]

[0062] in represents the monotonic focusing coefficient, is the moving average with momentum m, and it is dynamic, so the quality division standard of the anchor box is also dynamic, which makes The gradient gain allocation strategy that best suits the current situation can be made at every moment.

[0063] S06. Configure the environment required for the training network, set parameters, train the temporary traffic sign data set, and obtain the trained weights.

[0064] The hardware environment processor for network training of the present invention is 12vCPU Intel(R)Xeon(R)Platinum8352VCPU, and the GPU is NVIDIA GeForce RTX4090; the software environment is Ubuntu20.04 operating system, the programming language is Python3.8, the deep learning framework is Pytorch2.0.0, and the Cuda version is 11.8.

[0065] During the training process of the MTWI algorithm, the SGD optimizer is used, the basic learning rate is 0.01, the learning rate momentum is 0.937, and the weight decay coefficient is 0.0005. The algorithm training batch is set to 32, the thread is 8, and the algorithm training round is set to 100. During the algorithm training process, Mosaic data enhancement is used and turned off in the last 10 rounds.

[0066] S07. Deploy the trained improved algorithm into the assisted driving system to perform real-time detection of temporary traffic signs.

[0067] Get the trained MTWI-YOLO algorithm and test the model. The test results are as follows: Figure 6 shown.

[0068] It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A temporary traffic sign detection method for assisted driving, Features: The steps include: S01, self-made temporary traffic sign dataset; S02. Label the collected images using data labeling software, and process the labeled label files and images; S03. Introduce multi-scale mixed convolution in the YOLOv8n network to enhance the network perception field of view; S04. Based on the YOLOv8n network, the task dynamic alignment detection head is used to replace the original model detection head to enhance the interactivity between the two tasks of classification and positioning; S05. Modify the CIoU loss function in the original YOLOv8n network model, add a scaling factor and a dynamic non-monotonic adjustment mechanism to help the model train better; S06. Configure the environment required for the training network, set parameters, train the temporary traffic sign data set, and obtain the trained weights; S07. Deploy the trained improved algorithm into the assisted driving system to perform real-time detection of temporary traffic signs.

2. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S1, offline data enhancement is used to enable the dataset to cover complex environments such as different light intensities, day, night, rain and snow.

3. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S2, the training set, validation set, and test set are divided into 8:1:1 ratios.

4. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S3, the features of different scales within the image are captured while reducing the number of network parameters, thus expanding the network's perceptual field of view.

5. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S4, the task dynamic alignment detection head first passes through a feature extractor composed of two normalized convolutions to learn task interaction features from multiple convolution layers, then integrates the interaction features to obtain joint features, and then passes through a task decomposer TD to split the task. After the task decomposer, the detection task is split into a positioning branch and a classification branch. The deformable convolution DCNv2 is introduced into the positioning branch to learn the interaction features and obtain the offset of the deformable convolution to guide the positioning branch to perform precise positioning. The classification branch uses a feature selection structure to dynamically select interactive features, learns target salient features for efficient classification, and finally outputs the results of the two branches to obtain the final detection result.

6. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S4, shared convolution is used, and each of the three feature layers performs only one set of task dynamic alignment detection operations; a scale factor is added to scale the features.

7. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S5, Wise-Inner-CIoU replaces CIoU as the bounding box loss function. First, the bounding box ratio coefficient is introduced to obtain the Inner-CIoU loss function, which is calculated as follows: L Inner-CIoU =L CIoU +IoU-IoU Inne (x c ,y c ) represents the center point of the prediction box and the internal prediction box, represents the center point of the ground truth box and the inner ground truth box, w and h represent the width and height of the predicted box, w gt and h gt represents the width and height of the ground truth box, and ratio represents the scaling factor used to generate the auxiliary bounding box, denote the left, right, top, and bottom boundaries of the ground truth box calculated from the center point of the ground truth box and the scale factor ratio, respectively, and b l ,b r ,b t ,b b denote the left, right, top, and bottom boundaries of the anchor point calculated from the center point of the prediction box and the scale factor ratio, respectively. Then, based on Inner-CIoU, a dynamic non-monotonic adjustment mechanism is introduced as the Wise-Inner-CIoU loss function, and its calculation formula is as follows: in represents the monotonic focusing coefficient, is the moving average with momentum m, and it is dynamic, so the quality division standard of the anchor box is also dynamic, which makes The gradient gain allocation strategy that best suits the current situation can be made at every moment.

8. A temporary traffic sign detection method for assisted driving according to claim 1, Features: In S6, the hardware environment processor is 12vCPU Intel(R)Xeon(R)Platinum 8352V CPU, and the GPU is NVIDIAGeForce RTX4090; the software environment is Ubuntu20.04 operating system, the programming language is Python3.8, the deep learning framework is Pytorch2.0.0, and the Cuda version is 11.8.

Citation Information

Patent Citations

  • Robustness test method and system for aerial remote sensing image target detection model

    CN117746194A

  • Target cross-domain detection and understanding method, system and equipment and storage medium

    US20210383231A1

  • Method for object detection and recognition based on neural network

    US20220292311A1

Cited By

  • Traffic sign recognition model training method, traffic sign recognition method and equipment

    CN119540915A

  • Chain monitoring method of scraper conveyor, medium and equipment

    CN121626646A