Deep learning ranging method and ranging device based on discrete probability distribution

By discretizing the distance measurement truth value and combining the probability distribution constraint loss and SmoothL1 loss, the accuracy problem of the deep learning distance measurement algorithm when facing the fluctuation of the distance true value is solved, and higher distance measurement accuracy and stability are achieved.

CN120259997APending Publication Date: 2025-07-04WU HAN XUAN YUAN ZHI JIA KE JI YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510312510.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing distance measurement algorithm based on deep learning has low prediction accuracy when facing the fluctuation of the real distance value and cannot effectively deal with error amplification caused by labeling errors.

Method used

The distance measurement truth value in the continuous range is discrete into discrete values, and a neural network model is constructed to output the predicted probability of the distance measurement scattered value. The total loss is calculated by combining the probability distribution constraint loss and SmoothL1 loss, and the neural network is adjusted to minimize the total loss.

Benefits of technology

Through the integration of discretization processing and multi-loss function, the robustness and prediction accuracy of the ranging model are improved, adapted to complex ranging scenarios, and improved the accuracy and stability of ranging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259997A_ABST
    Figure CN120259997A_ABST
Patent Text Reader

Abstract

The invention relates to a deep learning distance measurement method based on discrete probability distribution, and the method comprises the steps: carrying out the discretization of a distance measurement true value in a continuous range, obtaining a corresponding distance measurement discrete value, building a neural network model, inputting the distance measurement discrete value into the neural network model, and outputting a prediction probability corresponding to the distance measurement discrete value. Calculating probability distribution constraint loss by using the prediction probability in the preset interval; calculating a distance measurement predicted value by using the distance measurement discrete value and the prediction probability corresponding to the distance measurement discrete value, and outputting the distance measurement predicted value; constructing a loss function to restrain the distance measurement predicted value so as to calculate distance measurement loss; and calculating a total loss by using the probability distribution constraint loss and the distance measurement loss, and adjusting a neural network model to minimize the total loss. Discretization processing and probability distribution are combined, and distance prediction precision is improved through multi-loss function fusion optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distance measurement, and particularly relates to a deep learning ranging method and a ranging device based on discrete probability distribution. Background Art

[0002] With the development of current technology, distance measurement has crucial applications in many fields. For example, in the field of autonomous driving, accurate ranging can help vehicles perceive the surrounding environment in real time, accurately judge the distances from obstacles and other vehicles, and thus make safe and reasonable decisions, such as automatic braking and lane changing. In an intelligent logistics warehousing system, ranging technology can be used for robot navigation, enabling it to accurately move and locate goods in the warehouse, improving the efficiency and accuracy of warehousing management.

[0003] The AI ranging algorithm is a method that uses artificial intelligence technology to measure the distance of an object. The common AI ranging algorithms are mainly divided into the following three categories: ranging algorithms based on computer vision, ranging algorithms based on deep learning, and ranging algorithms based on sensor fusion. Among them, the ranging algorithms based on deep learning include direct ranging algorithms based on deep neural networks and ranging algorithms based on point cloud data. The present invention mainly studies the direct ranging algorithm based on deep neural networks, and the main process of this algorithm is as follows: First, a large amount of image data with distance annotations is collected, and the collected images are standardized and normalized. Since the real distance is often between 10 and 100 meters, during the normalization operation, generally, the reciprocal of the real distance is taken to ensure that its value range is between (0, 1), which is more conducive to the convergence of the neural network. Then, feature extraction and full connection layer regression are performed. Through multiple convolutional and pooling operations, the extracted feature map is flattened into a one-dimensional vector, and the flattened vector is input into the full connection layer and outputs a scalar value, that is, the predicted distance. An activation function, such as the sigmoid function, is usually added between the full connection layers to introduce non-linearity and enhance the expression ability of the model. Finally, a suitable loss function is selected for model training, and the commonly used loss function is defined as follows: where x is the difference between the predicted distance and the real distance.

[0004] In the above solution, only the direct error between the predicted value and the real value is concerned, and a fixed value is used for the real value of the distance. However, the actual situation is not like this. Due to the existence of annotation errors, even if the target remains stationary, its real distance will fluctuate. That is, the real value of the distance is not a fixed value, but often a distribution. Even a very small annotation error may be amplified during the training process, resulting in a low accuracy of the predicted distance value. Summary of the Invention

[0005] The present invention provides a deep learning ranging method and system based on discrete probability distribution, aiming to solve the problem of low prediction accuracy of distance in the prior art.

[0006] First aspect: The present invention provides a deep learning ranging method based on discrete probability distribution, and the method includes the following steps:

[0007] Step S1: Discretize the true ranging value within a continuous range to obtain corresponding discrete ranging values;

[0008] Step S2: Construct a neural network model, input the discrete ranging values into the neural network model, output the prediction probabilities corresponding to the discrete ranging values, and calculate the probability distribution constraint loss using the prediction probabilities within a preset interval;

[0009] Step S3: Calculate the ranging prediction value using the discrete ranging values and the prediction probabilities corresponding to the discrete ranging values, and output the ranging prediction value; construct a loss function to constrain the ranging prediction value to calculate the ranging loss;

[0010] Step S4: Calculate the total loss using the probability distribution constraint loss and the ranging loss, and adjust the neural network model to minimize the total loss.

[0011] Further, the specific content of step S1 is as follows:

[0012] S10: Determine the true ranging value range: Determine the minimum distance value and the maximum distance value of the actual ranging through a measuring device or prior knowledge;

[0013] S11: Perform a discretization operation through a discretization method, divide the true ranging value range, and obtain multiple discrete intervals;

[0014] S12: Map the distance data: Map the continuous distance values obtained from actual measurement to the corresponding discrete values according to the divided discrete intervals.

[0015] Further, the discretization methods include: equal-distance division method, equal-frequency division method, threshold-based division method, clustering algorithm division method.

[0016] Further, the determination method of the preset interval in step S2 is: Taking the discrete ranging value x as the center, select the interval [x - σx, x + σx] as the preset interval, where σ is the preset prediction error.

[0017] Further, the specific content of calculating the probability distribution constraint loss using the prediction probabilities within the preset interval is as follows:

[0018]

[0019] Where p iis the predicted probability of the i-th discrete ranging value.

[0020] Further, calculating the ranging prediction value by using the discrete ranging value and the predicted probability corresponding to the discrete ranging value is specifically as follows: Using the weighted average method, multiply the discrete ranging value by the corresponding predicted probability and then sum to output the ranging prediction value.

[0021] Further, the specific calculation formula of the ranging prediction value is:

[0022]

[0023] where d i is the i-th discrete ranging value, p i is the predicted probability of the i-th discrete ranging value, d min is the minimum distance value of the actual ranging, d max is the maximum distance value of the actual ranging.

[0024] Further, the specific formula for constructing a loss function to constrain the ranging prediction value to calculate the ranging loss is:

[0025] DistanceLoss = SmoothL1(Pred dis - x)

[0026] where Pred dis is the ranging prediction value, and x is the discrete ranging value.

[0027] Further, calculating the total loss by using the probability distribution constraint loss and the ranging loss is specifically as follows:

[0028] TotalLoss = λ1 * DisstributeLoss + λ2 * DistanceLoss

[0029] where λ1 and λ2 are preset coefficients.

[0030] Second aspect: The present invention provides a deep learning ranging device for discrete probability distribution, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned deep learning ranging method based on discrete probability distribution are implemented.

[0031] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) The combination of discretization processing and probability distribution: This method discretizes the continuous true ranging value, and then calculates the loss based on the prediction probability of the discrete value. This way fully considers the probability distribution characteristics of the ranging value. Traditional ranging methods may only focus on the direct error between the predicted value and the true value, while this method constrains the loss through the probability distribution, enabling the model to not only predict accurate values but also ensure the rationality of the prediction probability within a certain range, improving the robustness and prediction accuracy of the model. (2) The fusion and optimization of multiple loss functions: The total loss is calculated by comprehensively using the probability distribution constraint loss and the ranging loss based on SmoothL1 to adjust the neural network model. This strategy of fusing multiple losses can balance the performance of the model in terms of the rationality of the probability distribution and the accuracy of the predicted value. Compared with the model optimized by a single loss function, it can better adapt to complex ranging scenarios and improve the accuracy and stability of ranging. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0033] Figure 1 It is a flowchart of the deep learning ranging method based on discrete probability distribution of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0034] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following will further elaborate on the present invention in detail with reference to the drawings and embodiments. Obviously, the specific embodiments described here are only used to explain the present invention and are part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

[0035] Embodiment 1

[0036] The present invention provides a deep learning ranging method based on discrete probability distribution, aiming to solve the problem of low accuracy of the predicted value of the distance in the prior art.

[0037] First aspect: The present invention provides a deep learning ranging method based on discrete probability distribution, and this method includes the following steps:

[0038] Step S1: Discretize the true ranging value within a continuous range to obtain the corresponding discrete ranging value;

[0039] Specifically, this step includes: S10: Determine the true range of distance measurement: Through a measuring device or prior knowledge, clarify the minimum distance value and the maximum distance value of the actual distance measurement. For example, if the measuring device shows that the minimum distance value is 10 meters and the maximum distance value is 80 meters, then the true range of distance measurement is [10, 80]. S11: Perform a discretization operation through a discretization method to divide the true range of distance measurement, obtain multiple discrete intervals, and assign a corresponding discrete value to each interval; the discretization method includes: equal-distance partitioning method, equal-frequency partitioning method, threshold-based partitioning method, clustering algorithm partitioning method. Among them, the equal-distance partitioning method divides the continuous data range into several intervals at a fixed interval, and the length of each interval is equal, which is applicable to scenarios with uniform data distribution, scenarios with consistent requirements for interval accuracy, etc. The equal-frequency partitioning method divides the data into several intervals so that the number of data in each interval is roughly equal, which is applicable to scenarios with uneven data distribution, scenarios that focus on data distribution characteristics, etc. The threshold-based partitioning method divides the data into different intervals according to preset thresholds, and these thresholds are usually determined based on domain knowledge, business requirements or experience, and are applicable to scenarios with clear business rules, safety and risk assessment scenarios, decision support scenarios, etc. The clustering algorithm partitioning method divides the data into several clusters through a clustering algorithm, and each cluster represents a discrete interval, which is applicable to scenarios with obvious clustering structures in the data, complex data pattern recognition scenarios, personalized recommendation scenarios, etc. The present invention can select the optimal discretization method according to the actual scenario. In this embodiment, taking the equal-distance partitioning method as an example, the true range of distance measurement [10, 80] is divided into segments of 1 meter each, and the discrete intervals [10, 11], [11, 12], [12, 13]... [79, 80], [80, 81] are obtained. S12: Map the distance data: Map the continuously measured actual distance values to the corresponding discrete values according to the divided discrete intervals. For example, the discrete value of the interval [10, 11] is 10, the discrete value of the interval [11, 12] is 11, and so on, to obtain 71 discrete values of [10, 11, 12…80].

[0040] Step S2: Construct a neural network model, input the discrete distance values into the neural network model, output the prediction probability corresponding to the discrete distance values, and calculate the probability distribution constraint loss using the prediction probabilities within a preset interval;

[0041] Specifically, when constructing a neural network model, an appropriate structure can be selected according to specific requirements. For example, for a simple ranging prediction task, a multi-layer perceptron (MLP) can be used. An MLP consists of an input layer, multiple hidden layers, and an output layer, and the layers are connected by weights. The input layer receives discrete ranging values, the hidden layers perform non-linear transformations on the inputs to extract complex features in the data, and the output layer outputs the prediction probabilities corresponding to each discrete ranging value. Suppose an MLP with two hidden layers is constructed. The number of neurons in the input layer is the same as the number of discrete ranging values (71 in the above example). The first hidden layer can be set to 128 neurons, the second hidden layer to 64 neurons, and the number of neurons in the output layer is also 71, corresponding to the prediction probabilities of each discrete ranging value respectively.

[0042] To improve the robustness and prediction accuracy of the model, it is necessary to constrain the prediction probabilities within a reasonable preset interval near the true value. For example, with the discrete ranging value x as the center, the interval [x - σx, x + σx] is selected as the preset interval, where σ is the preset prediction error. Among them, the preset prediction error can be dynamically adjusted according to different distance ranges or data characteristics to adaptively change the size of the preset interval, so that the model can better constrain the prediction probabilities in different scenarios. For example, if the preset prediction error is 5%, when the target is relatively close, such as at the 10-meter position, the probability distribution is concentrated in the interval [9.95, 10.05], so the probability region that can be selected is only the position where i = 10. When the target is at 60 meters, the selected interval changes to [57, 63], so the prediction probabilities when i = 57, 58, 59, 60, 61, 62, 63 will all be included in the loss calculation. This makes it easier for the prediction probabilities to converge to an acceptable ranging region during long-distance prediction.

[0043] The specific calculation formula for calculating the probability distribution constraint loss using the prediction probabilities within the preset interval is: DisstributeLoss = 1 - Σ i∈[x-σx,x+σx] p i , where p i is the prediction probability of the i-th discrete ranging value.

[0044] Step S3: Calculate the ranging prediction value using the discrete ranging value and the corresponding prediction probability, and output the ranging prediction value; construct a loss function to constrain the ranging prediction value to calculate the ranging loss;

[0045] Since the prediction probabilities reflect the weights of each discrete ranging value in the final prediction result, by weighted summation, all discrete values and their probabilities can be comprehensively considered to obtain a more representative prediction value. The specific calculation formula for the ranging prediction value is:

[0046]

[0047] where d i is the i-th measured distance discrete value, and p i is the predicted probability of the i-th measured distance discrete value, d min is the minimum distance value of the actual distance measurement, and d max is the maximum distance value of the actual distance measurement. As described above: d min = 10, and d max = 80.

[0048] The SmoothL1 loss is used to constrain the distance measurement prediction value to calculate the distance measurement loss. The specific calculation formula is:

[0049] DistanceLoss = SmoothL1(Pred dis - x)

[0050] where Pred dis is the distance measurement prediction value, and x is the measured distance discrete value.

[0051] The SmoothL1 loss function uses the L2 loss when the error is less than the threshold 1, making the gradient change smoother and helping the model to converge stably; when the error is greater than or equal to the threshold 1, the L1 loss is used to reduce the influence of outliers on the loss and improve the robustness of the model. To further improve the prediction accuracy, the present invention can improve the SmoothL1 loss function. For example, the threshold can be dynamically adjusted according to the data distribution and the training stage of the model, so that the model can more flexibly adjust the gradient within different error ranges, improving the convergence speed and prediction accuracy.

[0052] Step S4: Calculate the total loss by using the probability distribution constraint loss and the distance measurement loss, and adjust the neural network model to minimize the total loss.

[0053] Since the probability distribution constraint loss mainly focuses on the rationality of the predicted probability within a preset interval centered on each measured discrete value, it ensures that the probability distribution predicted by the model is as close as possible to the probability distribution of the actual situation. The ranging loss, on the other hand, focuses on the error between the predicted value and the true value, and constrains the predicted value through the SmoothL1 loss function to make the predicted value more accurately approach the true distance value. The total loss of the present invention is constructed by weighted summing of these two loss functions, that is, TotalLoss = λ1 * DisstributeLoss + λ2 * DistanceLoss. Wherein, λ1 and λ2 are preset coefficients, which play a role in weighing the relative importance of the two loss functions. If λ1 is larger, it means that the model will pay more attention to the rationality of the probability distribution during the training process; conversely, if λ2 is larger, the model will pay more attention to the direct error between the predicted value and the true value. By reasonably adjusting the values of λ1 and λ2, the model can achieve a balance between the two optimization objectives, thereby improving the overall performance.

[0054] In summary, the beneficial effects of the distance prediction method are as follows: (1) Discretization processing: converting the continuous ranging problem into a discrete probability distribution regression problem simplifies the learning task of the model. (2) Probability distribution constraint: By constraining the predicted probability to be concentrated within a reasonable interval near the true value, the robustness and prediction accuracy of the model are improved. (3) SmoothL1 loss: Combining the advantages of L1 and L2 losses, it is insensitive to outliers and has a smooth gradient when approaching the true value, which helps the model to converge. (4) Flexibility: The discretization interval, probability distribution interval, and loss weights can be adjusted according to actual needs, making it applicable to different ranging scenarios.

[0055] Embodiment 2

[0056] The present invention provides a deep learning ranging device for discrete probability distribution, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned deep learning ranging method based on discrete probability distribution are implemented.

[0057] The beneficial effects of the present invention are as follows: combination of discretization processing and probability distribution: this method discretizes the continuous true ranging value, and then calculates the loss based on the prediction probability of the discrete value. This way fully considers the probability distribution characteristics of the ranging value. Traditional ranging methods may only focus on the direct error between the predicted value and the true value, while this method constrains the loss through probability distribution, enabling the model to not only predict the accurate value but also ensure the rationality of the prediction probability within a certain range, improving the robustness and prediction accuracy of the model. (2) Fusion optimization of multiple loss functions: comprehensively use the probability distribution constraint loss and the ranging loss based on SmoothL1 to calculate the total loss, thereby adjusting the neural network model. This strategy of fusing multiple losses can balance the performance of the model in terms of the rationality of probability distribution and the accuracy of predicted values. Compared with the model optimized by a single loss function, it can better adapt to complex ranging scenarios and improve the accuracy and stability of ranging.

[0058] The above embodiments only express the preferred implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the appended claims.

Claims

1. A deep learning ranging method based on discrete probability distribution, characterized in that Including the following steps: Step S1: Discretize the true ranging values within a continuous range to obtain corresponding discrete ranging values; Step S2: Construct a neural network model, input the discrete ranging values into the neural network model, output the prediction probabilities corresponding to the discrete ranging values, and calculate the probability distribution constraint loss using the prediction probabilities within a preset interval; Step S3: Calculate the ranging prediction value using the discrete ranging values and the prediction probabilities corresponding to the discrete ranging values, and output the ranging prediction value; Construct a loss function to constrain the ranging prediction value to calculate the ranging loss; Step S4: Calculate the total loss using the probability distribution constraint loss and the ranging loss, and adjust the neural network model to minimize the total loss.

2. The deep learning ranging method based on discrete probability distribution according to claim 1, wherein The specific content of step S1 is as follows: S10: Determine the true ranging value range: Determine the minimum distance value and the maximum distance value of the actual ranging through a measuring device or prior knowledge; S11: Perform discretization operations through a discretization method, divide the true ranging value range, and obtain multiple discrete intervals; S12: Map the distance data: Map the continuously measured distance values to the corresponding discrete values according to the divided discrete intervals.

3. The deep learning ranging method based on discrete probability distribution according to claim 2, wherein The discretization methods include: equal-distance division method, equal-frequency division method, threshold-based division method, clustering algorithm division method.

4. The deep learning ranging method based on discrete probability distribution according to claim 1, wherein The determination method of the preset interval in step S2 is: Taking the discrete ranging value x as the center, select the interval [x - σx, x + σx] as the preset interval, where σ is the preset prediction error.

5. The deep learning ranging method based on discrete probability distribution according to claim 4, wherein The specific content of calculating the probability distribution constraint loss using the prediction probabilities within the preset interval is as follows: where p i is the predicted probability of the i-th distance measurement discrete value.

6. The deep learning ranging method based on discrete probability distribution according to claim 5, wherein The specific content of calculating the ranging prediction value using the discrete ranging values and the prediction probabilities corresponding to the discrete ranging values is: Use the weighted average method, multiply the discrete ranging values by the corresponding prediction probabilities and then sum to output the ranging prediction value.

7. The deep learning ranging method based on discrete probability distribution according to claim 6, wherein The specific calculation formula of the ranging prediction value is: where d i is the i-th measured discrete distance value, p i is the predicted probability of the i-th measured discrete distance value, d min is the minimum distance value of the actual distance measurement, d max is the maximum distance value of the actual distance measurement.

8. The deep learning ranging method based on discrete probability distribution according to claim 7, characterized in that The specific formula of constructing a loss function to constrain the ranging prediction value to calculate the ranging loss is: DistanceLoss = SmoothL1(Pred dis - x) Among them, Pred dis is the ranging prediction value, and x is the ranging discrete value.

9. The deep learning ranging method based on discrete probability distribution according to claim 8, characterized in that The specific content of calculating the total loss using the probability distribution constraint loss and the ranging loss is as follows: TotalLoss = λ1 * DisstributeLoss + λ2 * DistanceLoss Where λ1 and λ2 are preset coefficients.

10. A deep learning ranging device based on discrete probability distribution, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the deep learning ranging method based on discrete probability distribution described in any one of claims 1-9.