An automatic driving probability target detection method considering uncertainty
By combining the YOLOv5 model with the MC-Drop method, introducing a caching mechanism and PDQ metric, and optimizing the number and location of dropout layers, the problem of excessively high prediction confidence in complex environments was solved, achieving highly accurate and real-time target detection for autonomous driving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2022-09-19
- Publication Date
- 2026-05-01
AI Technical Summary
Existing target detection models have excessively high prediction confidence in complex environments, leading to an increased risk of traffic accidents. Furthermore, they lack a unified uncertainty assessment metric and efficient memory and time consumption. The MC-Drop method lacks references for selecting the number and location of dropout layers.
By combining the YOLOv5 model with the MC-Drop method, a caching mechanism is introduced, and the uncertainty is evaluated through the PDQ metric. The number and position of dropout layers are optimized, and an M-YOLOv5 model is constructed to evaluate the uncertainty of predicted labels and positions.
It improves the safety and real-time performance of autonomous driving, provides uncertainty assessment for labels and bounding boxes, and reduces the model's memory and time consumption.
Smart Images

Figure CN115546606B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, specifically to an autonomous driving probabilistic target detection method that takes uncertainty into account. Background Technology
[0002] Acquiring the uncertainty of perception model detection results is a necessary condition for achieving safe autonomous driving. Although perception technology has made significant progress in recent years, in some complex and unstructured driving environments, such as driving at night or in extreme weather conditions like heavy snow, rain, or fog, the quality of RGB images will deteriorate significantly. Object detection is particularly difficult at complex intersections with mixed pedestrian and vehicle traffic, and perception modules still have a high probability of making incorrect predictions. Acquiring perception uncertainty reflects the prediction confidence of the perception model or sensor noise, providing relevant information to the decision-making layer and helping autonomous vehicles take timely responses. This reduces the probability of traffic accidents caused by overly high prediction confidence in object detection algorithms. Simultaneously, perceiving uncertainty information helps humans better interpret the intentions of autonomous vehicles and enhances trust in autonomous driving technology. Overly high prediction confidence in object detection algorithms is a significant cause of accidents. With the increasingly widespread application of machine learning methods to solve safety-critical computer vision problems, research on improving the self-evaluation ability, reliability, and interpretability of networks through uncertainty estimation has attracted attention from academia and industry.
[0003] With the rapid development of deep learning, many high-performance object detection models have emerged. Classic object detection models mainly include SSD, the YOLO series, and fastR-CNN. Among the YOLO series, YOLOv3, YOLOv4, and YOLOv5 are currently widely used, and YOLOv5 stands out in terms of performance. However, there is currently no research evaluating the uncertainty of the YOLOv5 model. This invention discloses an autonomous driving probabilistic object detection (M-YOLOv5) method that considers uncertainty. Based on the widely used object detection network structure YOLOv5, it introduces randomness by adopting MC-Drop sampling with a caching mechanism to estimate the degree of uncertainty of object detection results, including label uncertainty and position uncertainty. It also introduces probability-based detection quality (PDQ) to simultaneously measure the quality of label uncertainty and bounding box uncertainty, thereby reducing the probability of the algorithm transmitting overly confident perception results to the decision layer when encountering corner cases or extreme weather conditions, greatly increasing the safety of autonomous driving. At the same time, the optimal position for adding Dropout can provide a reference for adding Dropout layers to other detectors.
[0004] Currently, methods for estimating uncertainty in object detection results mainly include MC-Drop, Ensemble, error propagation, and direct modeling. 1) MC-Dropout connects dropout-based neural network training with V-fractal inference (VI) in Bayesian neural networks (BNNs), generating samples from an approximate posterior distribution by performing inference multiple times with dropout enabled. 2) Direct modeling directly utilizes the network output layer to predict the prediction confidence of the object detection network. This method uses the output keypoints of the deep learning network to predict the probability distribution of the output results. 3) Error propagation propagates the uncertainty of each activation layer down to the output layer, typically in the form of variance. 4) Ensemble methods use an ensemble of networks to estimate prediction confidence, where the output of each network is treated as an independent sample in the ensemble model.
[0005] There is no unified metric for the quality of uncertainty estimation in probabilistic object detection methods. Most current research uses Average Precision (AP) as the sole measure to quantitatively evaluate proposed methods. mAP is defined as the area under the continuous precision-recall (PR) curve, approximated by numerical integration over a finite number of samples. While mAP is a standard evaluation metric for object detection, it does not account for prediction uncertainty. Two probabilistic object detectors predicting bounding boxes with the same mean but significantly different covariance matrices will have the same mAP performance. Therefore, a more consistent metric is needed to quantify the quality of uncertainty estimation produced by probabilistic object detection methods.
[0006] The existing technology has three main drawbacks: most object detection models cannot provide the uncertainty of the predicted bounding box position; combining the object detection model with uncertainty estimation methods to increase the uncertainty of the predicted bounding box position greatly increases the memory occupied by the model and the detection time required; currently, there is no unified performance evaluation index for probabilistic object detection models; and when introducing randomness into the model using the MC-Drop method, there are no reference cases for selecting the number of dropout layers, the added positions, and the dropout probability.
[0007] Based on the above, we propose a probabilistic target detection method for autonomous driving that considers uncertainty to solve the above problems. Summary of the Invention
[0008] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0009] In view of the problems existing in the prior art, the present invention is proposed.
[0010] Therefore, the purpose of this invention is to provide a probabilistic target detection method for autonomous driving that considers uncertainty. By combining the YOLOv5 model Monte Carlo Dropout (MC-Drop) method with an ensemble method, uncertainty is introduced in the output label and the bounding box position during prediction. The uncertainty quality is evaluated by introducing a probability-based detection quality (PDQ) evaluation metric. By introducing a caching mechanism into the MC-Drop method, the time and memory space required by the MC-Drop method are significantly reduced.
[0011] To address the aforementioned technical problems, according to one aspect of the present invention, the present invention provides the following technical solution:
[0012] An autonomous driving probabilistic target detection method considering uncertainty includes the following steps:
[0013] Step 1: Construct a probabilistic object detection model based on MC-Drop. Combine the MC-Drop method with the YOLOv5 model and introduce a caching mechanism for the MC-Drop method. The improved probabilistic object detection model is divided into two parts: the first part is the network cache before the first Dropout layer, and the second part is the network Last layer after the first Dropout layer. After the image is input into the M-YOLOv5 model, the model runs the cache network once and the Last network ten times for sampling. The average value is calculated to obtain the visualized detection result. The covariance matrix of the predicted box coordinates is calculated using the ten sampling results to represent the uncertainty of the predicted box position.
[0014] Step 2: Quality assessment of the probabilistic target detection model based on PDQ. The label uncertainty quality is calculated by using the class scores output by the detector, and the uncertainty quality of the predicted box position is calculated by using the covariance matrix output in Step 1. The PDQ score can be calculated by combining the two.
[0015] Step 3: Sensitivity analysis of the probabilistic target detection model, performing sensitivity analysis on the number of Dropout layers, their addition locations, and Dropout probability; first, keeping the Dropout probability constant, perform sensitivity analysis on the number of Dropout layers and their addition locations; second, keeping the Dropout layer addition locations constant, perform sensitivity analysis on the number of Dropout layers and the Dropout rate.
[0016] As a preferred embodiment of the autonomous driving probabilistic target detection method considering uncertainty described in this invention, in step 1, a Dropout layer is added to the YOLOv5-6.0 model to introduce randomness; the YOLOv5 model has three levels of detection heads corresponding to three different resolutions, and the publicly available M-YOLOv5 algorithm adds a Dropout layer with a Dropout rate of 10% after the C3 module of each level of the YOLOv5 detection head; adding a Dropout layer at the end of each level of the detection head, compared with adding Dropout in the backbone network or the middle module of the detection head, can ensure that the model has a complete sampling process, thereby ensuring the accuracy of the model prediction; at the same time, it reduces D The network structure following the dropout layer reduces the sampling time and ensures the model's real-time performance. Adding a dropout layer after each detector level, rather than after a single detector level, ensures that the sampling results from all three detectors exhibit the randomness introduced by the dropout layer, preventing detectors from being less affected due to their distance from the dropout layer. Multiple YOLOv5 models share the same overall structure but differ in network depth. By modifying the parameters within the model to change the number of modules, the network depth is altered. Adding a dropout layer after each module, rather than within the module itself, makes the improved model adaptable to each YOLOv5 model.
[0017] As a preferred embodiment of the autonomous driving probabilistic object detection method considering uncertainty described in this invention, in step 2, the covariance matrix of the predicted bounding box coordinates and the average score of each class are obtained by sampling the probabilistic object detection model constructed in step 1 ten times and setting its parameters; the spatial quality of the probabilistic object detection model can be obtained by the covariance matrix of the predicted bounding box, the ground truth bounding box and the object's true segmentation mask; the label quality can be obtained by the average score of each class and the object's true class label; the pPDQ can be obtained by combining the spatial quality and the label quality; finally, the PDQ score is obtained by combining the pPDQ with the number of true positives, false negatives and false positives detected by the detector at that frame number; the higher the score, the higher the probabilistic quality of the probabilistic object detector.
[0018] As a preferred embodiment of the autonomous driving probabilistic target detection method considering uncertainty described in this invention, step 3 specifically includes:
[0019] (1) Sensitivity analysis of Dropout layer location: In order not to disrupt the effective sampling process of YOLOv5, this sub-step only performs sensitivity analysis at the location after different modules in the detection head; In order to explore the impact of Dropout layer location on various indicators, this sub-step fixes the number of Dropout layers and Dropout probability, adds a Dropout layer to the original model, and conducts experiments on three Dropout rates.
[0020] (2) Dropout Layer Number and Probability Sensitivity Analysis: This sub-step tested different numbers of Dropout layers (one, two, and three layers) under different Dropout probabilities. When testing one-layer Dropout, a Dropout layer was added after the C3 module of the first detector head; when testing two-layer Dropout, a Dropout layer was added after the C3 modules of the first and second detector heads; when testing three-layer Dropout, a Dropout layer was added after the C3 modules of the first, second, and third detector heads.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1) By combining the MC-Drop uncertainty estimation method with a caching mechanism with the YOLOv5 model, a new probabilistic target detection algorithm, M-YOLOv5, is proposed to evaluate the uncertainty of predicted labels and locations, and has high accuracy and real-time performance.
[0023] 2) The robustness of the M-YOLOv5 model is evaluated using the probability-based index PDQ, which includes both label uncertainty quality and bounding box uncertainty quality.
[0024] 3) By conducting sensitivity analysis on MC-Drop probability, number of Dropout layers and layer positions, the optimal scheme for adding Dropout layers to the target detection model is derived. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0026] Figure 1This is an illustrative diagram of the key building blocks of the YOLOv5 and M-YOLov5 models in this invention (including prediction, format conversion, and evaluation); D o D represents the number of prediction boxes initially generated. F This represents the number of predicted boxes to be evaluated; the output detection of the 2D image is visualized as the bounding box mean (straight line) and the bounding box extent at 90% confidence (dashed line).
[0027] Figure 2 The diagram shows the structure and prediction process of the M-YOLOv5 in this invention ((a) M-YOLOv5 structure diagram, where the numbers represent the order of the modules, and the module name is marked after the numbers, bs is the batch_size of each input image; (b) is the prediction process of M-YOLOv5).
[0028] Figure 3 The sensitivity analysis diagrams for the Dropout layer positions of this invention are as follows: (a) mAP score variation trend of different Dropout layer positions under three Dropout rates, (b) label quality score variation trend of different Dropout layer positions under three Dropout rates, (c) spatial quality score variation trend of different Dropout layer positions under three Dropout rates, and (d) PDQ score variation trend of different Dropout layer positions under three Dropout rates.
[0029] Figure 4 The Dropout layer number and probability sensitivity analysis diagram of this invention are shown in ((a) the changing trend of PDQ score, (b) the changing trend of tag quality, (c) the changing trend of spatial quality, and (d) the changing trend of PDQ score).
[0030] Figure 5 The following is a visualization of the experimental results of the present invention ((a) Experimental results under heavy snow and heavy rain scenarios, (b) Experimental results under heavy fog and sandstorm scenarios, (c) Experimental results under strong light and weak light scenarios, (d) Experimental results under abnormal traffic scenarios. The upper right or lower right corner of the image shows the specific experimental scenario corresponding to the result).
[0031] Figure 6 This is a comparison chart of the running time of the model of this invention;
[0032] Figure 7 This invention provides a performance comparison between M-YOLOv5 and fastRCNN. Detailed Implementation
[0033] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0034] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0035] Secondly, the present invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not according to the usual scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In addition, actual fabrication should include three-dimensional spatial dimensions of length, width, and depth.
[0036] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0037] This invention provides the following technical solution: an autonomous driving probabilistic target detection method considering uncertainty. During use, it combines the YOLOv5 model Monte Carlo Dropout (MC-Drop) method with an ensemble method to introduce uncertainty regarding the output label and the bounding box position during prediction. It evaluates the quality of uncertainty by introducing a probability-based detection quality (PDQ) metric. Furthermore, by introducing a caching mechanism into the MC-Drop method, it significantly reduces the time and memory requirements of the MC-Drop method.
[0038] Example 1
[0039] 1. Construction of a probabilistic object detection model based on MC-Drop
[0040] This step combines the MC-Drop method with the YOLOv5 model and introduces a caching mechanism for the MC-Drop method. The M-YOLOv5 algorithm adds a Dropout layer with a 10% Dropout rate after the C3 module of each stage of the YOLOv5 detector head. The overall structure of M-YOLOv5 is as follows: Figure 2 As shown in (a), the prediction process of the model is as follows: Figure 2As shown in (b), the Dropout layer is enabled during prediction. The model samples ten times. The network structure before the first Dropout layer is run only once, and then the network structure after the first Dropout layer is run ten times. The caching mechanism can greatly reduce the running time of the MC-Drop method, giving it a real-time advantage compared to other uncertainty estimation methods. The YOLOv5 model strikes a good balance between detection accuracy and detection speed. Combining YOLOv5 with the MC-Drop method that incorporates a caching mechanism can simultaneously guarantee accuracy and real-time performance.
[0041] YOLOv5 is a single-stage detector that generates a large number of overlapping bounding boxes during detection. Non-maximum suppression (NMS) is required to obtain the highest-scoring predicted bounding box. The original YOLOv5 used a standard NMS technique, which removes predicted bounding boxes with high inter-overlap (IOU). This invention replaces this with a new NMS technique, whose main functions include: removing predicted bounding boxes below a certain confidence threshold α; removing predicted bounding boxes with at least one coordinate located outside the image edge; and retaining the bounding box containing the higher classification score and removing the other bounding box when the IOU intersection of two predicted bounding boxes is greater than 0.6.
[0042] The data processing procedure for the M-YOLOv5 model after sampling is as follows. The output format of each prediction box predicted by the original YOLOv5-6.0 network after non-maximum suppression is as follows:
[0043] r={x,y,w,h,obj,p0,...,p c} (1)
[0044] Where x and y represent the x and y coordinates of the center point of the prediction box, w represents the width of the prediction box, h represents the height of the prediction box, obj represents the class with the highest score, p0, ..., p c This represents the score for each category. The output format of the M-YOLOv5 model after each sampling without nonmaximum suppression is as follows:
[0045] r i ={x i y i w i h i obj, p 0i , ..., p ci} (2)
[0046] Where i represents the number of samples, and then the result is transformed by calculating the mean of each item.
[0047]
[0048] The form is used. The covariance matrix ∑i of the upper-left and lower-right coordinates of the bounding box is calculated from the output results of ten samplings, in r... i After nonmaximum suppression, the first four terms, namely the center coordinates and width and height of the prediction box, are taken and transformed into the coordinate values of the two diagonal points of the prediction box:
[0049] b i ={x 1i y 1i x 2i y 2i} (4)
[0050] Calculate the covariance matrix of the two coordinate values respectively.
[0051]
[0052] Where j represents the nth coordinate. Since b j The two coordinates representing the diagonal of the prediction box are used to calculate two covariance matrices, ∑1 and ∑2, for PDQ calculation. The mean is transformed after nonmaximum suppression.
[0053] r={x,y,w,h,obj,p0,...,p c} (6)
[0054] Here, r is the same as the output format of the original YOLOv5 after nonmaximum suppression. It is combined with the covariance matrix calculated by equation (5) to finally transform the result into
[0055] R={x,y,w,h,obj,p0,...,p c ,∑1,∑2} (7)
[0056] In R, x, y, w, and h represent the center coordinates and width and height of the final predicted bounding box. The model uses max{p0, ..., p...} c} Obtain the type of object corresponding to the prediction box, and calculate the probability distribution of the upper left and lower right coordinate values of the prediction box using {∑1, ∑2}.
[0057] The YOLOv5 model does not include the probability distribution of bounding boxes in its results, and its confidence level for the output is set to 1 by default. The M-YOLOv5 model can calculate the prediction confidence level for various scenarios, which is extremely important for ensuring the safety of autonomous driving.
[0058] 2. Quality Assessment of PDQ-Based Probabilistic Target Detection Model
[0059] PDQ aims to jointly evaluate label uncertainty and spatial uncertainty in image-based object detection. Label uncertainty is evaluated by matching the predicted classification score against the ground truth label for each object instance in the image. Spatial uncertainty is calculated using the covariance matrix, assuming a Gaussian distribution for the top-right or bottom-left corner of the bounding box. Optimal PDQ is achieved when a prediction probability is correlated with the prediction error, for example, when a large spatial uncertainty is correlated with an inaccurate bounding box prediction. PDQ uses the Hungarian algorithm to assign an optimal corresponding detection for each ground truth, eliminating the dependency on the IOU threshold required for mAP. Furthermore, PDQ measures the probabilistic quality of the detector's assignment to true positive detections and evaluates it on a single classification score threshold, requiring the object detection algorithm to filter low-scoring outputs before evaluation. The specific calculation method for PDQ is as follows:
[0060]
[0061] Where f represents the number of image frames. These represent the number of true positives, false negatives, and false positives detected by the detector at that frame number, respectively. This represents the set of non-zero pPDQ values for that frame number.
[0062] The value of pPDQ is determined by two parts: tag quality and spatial quality, calculated using the following formula:
[0063]
[0064] in This represents the set of the i-th base truth objects in the f-th frame, which includes the ground truth bounding box, class label, and segmentation mask of the object itself. Let Q be the set of detected objects for the i-th frame f, which includes a probability function, a detection segmentation mask (with non-zero pixels), and scores for all possible class labels. s Represents spatial quality:
[0065]
[0066] Where L FG Foreground loss is the average negative logarithmic probability that the detector assigns to pixels in the ground truth portion. L BG As a background loss, it penalizes any probability quality that the detector incorrectly assigns to pixels outside the ground truth bounding box. Q is calculated when the detector assigns a probability of 1 to all ground truth pixels. s Take the maximum value of 1. These two items can be calculated by combining the detector output with the covariance matrix calculated additionally by equation (5).
[0067] QL The formula for calculating label quality is as follows:
[0068]
[0069] Spatial quality describes the quality of an object's position in an image; label quality Q L Describe the effectiveness of detecting and identifying what the object is. Q L This is the probability estimated by the detector for the underlying ground truth class of an object, regardless of whether that class ranks highest in the detector's probability distribution. Unlike mAP, this value explicitly evaluates detection quality, rather than simply ranking the detector's predicted label probabilities without considering the actual label probabilities. The PDQ score can evaluate the detector's overall performance in terms of both label uncertainty and spatial uncertainty.
[0070] 3. Sensitivity Analysis of Probabilistic Target Detection Model
[0071] (1) Sensitivity analysis of Dropout layer location: To investigate the impact of Dropout layer location on various indicators, this step fixed the number and probability of Dropout layers, added a Dropout layer to the original model, and experimented with three Dropout probabilities. The results are as follows: Figure 3 As shown. Figure 3 The vertical axis represents the evaluation metric, and the horizontal axis represents the order of the Dropout layer in the overall network structure after adding a Dropout layer. The three curves represent three different Dropout probabilities. Through analysis... Figure 3The data leads to the following conclusions: 1) Under different Dropout probabilities, the influence of the Dropout layer position on these four evaluation metrics follows the same trend, meaning that the Dropout probability does not affect the position of the best-performing Dropout layer; 2) When the evaluation metric is PDQ, better scores appear at positions with 17, 18, and 21 modules, while the scores at positions 16, 19, 22, and 24 drop significantly. Positions 17, 18, and 21 are characterized by being located in the middle layer of the detector head and after the Concat or C3 modules, while positions 16, 19, 22, and 24 are characterized by being located in the convolutional module or downsampling module. The end of the block or detector head. Therefore, in other detectors, it is advisable to try adding a Dropout layer after the fusion module in the middle of the detector head and avoid performing Dropout directly after convolution as much as possible to produce a better PDQ score; 3) Label quality and mAP score have the same trend of change, and spatial quality and PDQ score have the same trend of change; 4) mAP and PDQ have a negative correlation feature, but higher precision detectors can obtain higher mAP and higher PDQ scores at the same time. Therefore, it is speculated that the decrease in mAP is caused by the randomness introduced by Dropout, but the introduction of randomness can obtain a higher PDQ score.
[0072] (2) Dropout Layer Number and Probability Sensitivity Analysis: This invention tested different numbers of Dropout layers (one, two, and three layers) under different Dropout probabilities. The Dropout layer was added after the C3 module of the first detector head for one layer, after the C3 modules of the first and second detector heads for two layers, and after the C3 modules of the first, second, and third detector heads for three layers. The experimental results are analyzed as follows: Figure 5 As shown. Through analysis Figure 5 The data leads to the following conclusions: 1) As the Dropout probability increases, the PDQ score always shows a characteristic of first increasing and then decreasing, and the peak value gradually shifts towards the direction of lower Dropout probability as the number of Dropout layers increases; 2) mAP and label quality decrease as the Dropout probability increases, and the more Dropout layers there are, the faster mAP and label quality decrease; 3) When the number of Dropout layers is small, spatial quality shows a trend of increasing with the Dropout probability, but when the number of Dropout layers is large, spatial quality will have a peak value.
[0073] This invention is based on a YOLOv5-6.0 implementation. As mentioned earlier, it combines the MC-Drop method with a caching mechanism with YOLOv5, implemented using a PyTorch environment. The MSCOCO2017 dataset was chosen as the training and validation dataset, comprising 118,287 and 5,000 images respectively. A P100 16G graphics card was selected as the training and testing device. Training the YOLOv5m model weights requires 50 minutes per epoch, and the pre-trained weights provided by the YOLOv5 authors were used for testing.
[0074] This invention uses an improved model to test some autonomous driving corner cases and traffic scenarios under extreme weather conditions. It finds that compared to normal conditions, the improved model can provide higher spatial uncertainty for the detected target in these scenarios. During detection, a YOLOv5m network structure with a Dropout layer added at the (18,22,26) module position is used. Ten samplings are performed, with a label confidence threshold of 0.5 and an IOU confidence threshold of 0.6. This invention selects four unusual traffic participant scenarios—elderly people crossing the road, emergency personnel, traffic accidents, and animals on the road—as corner cases. Extreme weather conditions include heavy rain, heavy snow, heavy fog, sandstorms, strong light, and low light. Detection results are as follows: Figure 5 As shown.
[0075] This invention compares the performance of the modified model with that obtained from fastRCNN. During the testing process, a label confidence threshold of 0.5 and an IOU threshold of 0.6 were selected, with 10 samples taken for each detection. The comparison results are as follows: Figure 7 As shown. In addition, this invention uses YOLOv5m as an example to compare the time required by the improved MC-Drop and Ensemble methods, and the comparison results are as follows. Figure 6 As shown. The device used in this invention is a P100 16G graphics card, where Yolov5m represents the original Yolov5m model, M-YOLO represents the MC-drop method with a caching mechanism and sampling ten times, Ensemble-5 represents integrating five weights, and Ensemble-10 represents integrating ten weights. Figure 6 As shown, the time required for the MC-Drop method to sample ten times is much shorter than the time required to integrate ten models, which also demonstrates that the improved model of this invention has better overall performance.
[0076] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A probabilistic target detection method for autonomous driving considering uncertainty, characterized in that: Includes the following steps: Step 1: Construct a probabilistic object detection model based on MC-Drop, combining the MC-Drop method with the YOLOv5 model, and introducing a caching mechanism for the MC-Drop method; The improved probabilistic object detection model consists of two parts: the first part is the network cache before the first Dropout layer, and the second part is the network last, which includes the first Dropout layer and all subsequent layers. After an image is input into the M-YOLOv5 model, the model runs the cache network once and the last network ten times for sampling. The average value is calculated to obtain the visualized detection result. The covariance matrix of the predicted bounding box coordinates is calculated using the ten sampling results to represent the uncertainty of the predicted bounding box position. Based on the YOLOv5-6.0 model, a Dropout layer is added to introduce randomness. The YOLOv5 model has three detection heads corresponding to three different resolutions. The M-YOLOv5 algorithm adds a Dropout layer with a 10% Dropout rate after the C3 module of each detection head in the YOLOv5 model. The method of adding the Dropout layer at the end of each detection head is similar to... Compared to adding Dropout to the backbone network or intermediate modules of the detector heads, this approach ensures a complete sampling process, thereby guaranteeing the accuracy of model predictions. Simultaneously, reducing the network structure after the Dropout layer decreases the sampling time, ensuring real-time performance. Adding a Dropout layer after each detector head level, rather than only after a single level, ensures that the sampling results from all three detector heads exhibit the randomness introduced by the Dropout layer, preventing detector heads from being less affected due to their distance from the Dropout layer. Multiple YOLOv5 models share the same overall structure but differ in network depth. By modifying the parameters within the model to change the number of modules and thus the network depth, and by adding a Dropout layer after each module rather than within the module itself, the improved model becomes adaptable to each YOLOv5 model. Step 2: Quality assessment of the probabilistic object detection model based on PDQ. The label uncertainty quality is calculated using the class scores output by the detector, and the predicted bounding box position uncertainty quality is calculated using the covariance matrix output in Step 1. Combining these two factors yields the PDQ score. The probabilistic object detection model constructed in Step 1 is sampled ten times using set parameters to obtain the covariance matrix of the predicted bounding box coordinates and the average score of each class. The spatial quality of the probabilistic object detection model is obtained using the covariance matrix of the predicted bounding box, the ground truth bounding box, and the object's true segmentation mask. The label quality is obtained using the average score of each class and the object's true class label. Combining the spatial quality and label quality yields the pPDQ. Finally, the PDQ score is obtained by using the pPDQ and the number of true positives, false negatives, and false positives detected by the detector. A higher score indicates a higher probabilistic quality of the probabilistic target detector; Step 3: Sensitivity analysis of the probabilistic target detection model, performing sensitivity analysis on the number of Dropout layers, their addition locations, and Dropout probability; first, keeping the Dropout probability constant, perform sensitivity analysis on the number of Dropout layers and their addition locations; second, keeping the Dropout layer addition locations constant, perform sensitivity analysis on the number of Dropout layers and the Dropout rate.
2. The autonomous driving probabilistic target detection method considering uncertainty according to claim 1, characterized in that: Step 3 specifically includes: (1) Sensitivity analysis of Dropout layer location: In order not to disrupt the effective sampling process of YOLOv5, this sub-step only performs sensitivity analysis at the location after different modules in the detection head; In order to explore the impact of Dropout layer location on various indicators, this sub-step fixes the number of Dropout layers and Dropout probability, adds a Dropout layer to the original model, and conducts experiments on three Dropout rates. (2) Dropout layer number and probability sensitivity analysis: This sub-step tested different numbers of Dropout layers under different Dropout probabilities. When testing one-layer Dropout, the Dropout layer was added after the C3 module of the first detection head; when testing two-layer Dropout, the Dropout layer was added after the C3 module of the first and second detection heads; when testing three-layer Dropout, the Dropout layer was added after the C3 module of the first, second and third detection heads.