A pile number depth ranging method, device and equipment based on an adaptive deep calculation model and a medium

By using an adaptive depth calculation model and image preprocessing technology, the problem of balancing accuracy and efficiency in station depth measurement was solved, enabling high-precision and real-time depth measurement in complex road scenarios.

CN121482569BActive Publication Date: 2026-04-28CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2026-01-07
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies struggle to dynamically adapt to scale changes in complex road scenarios during station depth measurement, resulting in insufficient depth measurement accuracy and low computational efficiency, failing to meet the real-time response requirements of vehicle-mounted mobile platforms.

Method used

An adaptive depth calculation model-based approach is adopted, including an improved YOLOv5 target detection algorithm, a multi-scale adaptive depth calculation model, and Kalman filtering. Through image preprocessing such as adaptive histogram equalization, noise suppression, and stereo correction, combined with a multi-scale adaptive algorithm and a cascaded network structure, the depth calculation strategy is dynamically adjusted to adapt to changes in station scale.

Benefits of technology

It achieves synergistic optimization of real-time performance and accuracy in station depth measurement under complex road environments, improves measurement accuracy and computational efficiency, and meets the high precision and real-time requirements of vehicle-mounted mobile platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121482569B_ABST
    Figure CN121482569B_ABST
Patent Text Reader

Abstract

The application provides a pile number depth ranging method and device based on an adaptive deep calculation model, equipment and a medium, and relates to the technical field of computer vision and deep learning. Through a multi-scale adaptive deep calculation model and a dynamic matching mechanism of pile number size characteristics, the problem of insufficient depth measurement accuracy and low calculation efficiency caused by pile number scale changes in a road scene is effectively solved, and the method has the advantages of being able to dynamically adapt to pile number scale changes, improving depth measurement accuracy and calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer vision and deep learning technology, and in particular to a station depth ranging method, device, equipment and medium based on an adaptive depth calculation model. Background Technology

[0002] In real-world road environments, the location and 3D ranging of traffic signs such as mileage markers and 100-meter markers face multiple challenges: on the one hand, traditional manual measurement methods are inefficient and pose safety risks; on the other hand, while monocular vision detection technology can recognize marker characters, it cannot directly obtain depth information, making it difficult to support the high-precision digital archiving requirements. While stereo vision technology combined with binocular cameras provides a new approach to depth measurement, existing methods have revealed significant shortcomings in application. These solutions generally employ a globally uniform processing strategy, failing to optimize for the scale variations of markers in complex road scenarios. When markers are at a distance, they appear as small-scale targets in images with sparse feature information, making them highly susceptible to noise interference during depth calculations. This results in a reduced signal-to-noise ratio and blurred details in the depth map, severely limiting measurement accuracy. Forcing high-resolution global calculations to improve accuracy places an excessive computational burden, failing to meet the stringent real-time response requirements of vehicle-mounted mobile platforms. Furthermore, factors such as lighting fluctuations, weather changes, and background interference in the road environment further amplify these problems, making it difficult for existing technologies to achieve an effective balance between accuracy and efficiency. Therefore, developing a depth ranging mechanism that can dynamically adapt to changes in station scale and balance measurement accuracy with real-time calculation has become an urgent need for current technological development.

[0003] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0004] This application provides a station depth measurement method, device, equipment, and medium based on an adaptive depth calculation model, which has the advantages of dynamically adapting to changes in station scale and improving depth measurement accuracy and calculation efficiency.

[0005] Firstly, the station depth ranging method based on an adaptive depth calculation model provided in this application adopts the following technical solution:

[0006] A station depth ranging method based on an adaptive depth calculation model includes:

[0007] Obtain the station image dataset from the stereo camera, including the left and right views, and preprocess the image dataset;

[0008] The station number target is detected in the left view based on the improved YOLOv5 target detection algorithm to obtain the station number and its bounding box position information;

[0009] A multi-scale adaptive deep computing model is constructed, which includes a feature extraction network, a cost calculation module, and a disparity optimization module.

[0010] Based on the size characteristics of the rectangular frame, a high-precision disparity map is generated using a multi-scale adaptive algorithm;

[0011] Based on the location information of the station number and the disparity map, the depth value of the station number is calculated, and the final depth measurement result is output after filtering out outliers.

[0012] Kalman filtering is used to perform temporal smoothing on the depth measurement results of consecutive frames.

[0013] Optionally, image preprocessing includes:

[0014] Adaptive histogram equalization is used to enhance image contrast;

[0015] Noise suppression is achieved through Gaussian filtering, with the filter kernel size dynamically adjusted based on the image resolution.

[0016] Perform stereoscopic correction on the left and right views to eliminate the effects of lens distortion.

[0017] Optionally, the improved YOLOv5 algorithm includes the following optimizations:

[0018] Based on the bounding box size of the stationing data, K-means clustering is used to generate exclusive anchor boxes that are adapted to the elongated characteristics of the stationing, replacing the default anchor boxes of general YOLO and reducing the bounding box prediction offset.

[0019] An attention mechanism is introduced into the backbone network to enhance feature extraction of the station number region;

[0020] Focal Loss is used to solve the problem of imbalance between positive and negative samples.

[0021] Optionally, a scale-adaptive detection strategy is also included:

[0022] Based on the pixel area of ​​the detection bounding box of the station number, it is divided into three scales: small scale corresponding to distant station numbers, medium scale corresponding to mid-range station numbers, and large scale corresponding to near-range station numbers.

[0023] Differentiated confidence thresholds were assigned to station numbers at different scales.

[0024] The detection modules for different scales of station numbers are dynamically adapted, including: adaptive adjustment of anchor frames. For different scales, dedicated anchor frames from pre-clustering are called, and the anchor frame size is dynamically fine-tuned according to the following formula:

[0025] Anchor frame width = Anchor frame height =

[0026] in, , This serves as the reference anchor frame for this scale; As the benchmark scale; The average scale of the station numbers in the current image;

[0027] The detection head weight allocation assigns dynamic detection weights to feature maps of different scales, enhancing the detection capability of small-scale features. The formula is as follows:

[0028] Detection weight = ,in, For scale confidence level, To match confidence levels;

[0029] By combining the weights with the feature extraction layer of the detection head, the station number can obtain more sufficient feature learning resources.

[0030] Optionally, the multi-scale adaptive depth computing model adopts a cascaded network structure, including:

[0031] The feature extraction network uses ResNet-34 as the backbone network and outputs multi-scale feature maps;

[0032] The cost calculation module constructs a 4D correlation volume and performs cost aggregation through 3D convolution.

[0033] The parallax optimization module uses the GRU iterative optimizer to refine the parallax.

[0034] Optionally, the feature extraction network includes three parallel branches:

[0035] Small-scale branches use 5×5 convolutional kernels to extract detailed features;

[0036] Mesoscale branching uses dilated convolution to expand the receptive field;

[0037] Large-scale branches are introduced, and the CBAM attention mechanism is used to focus on the station area.

[0038] Optionally, robust statistical methods are employed for depth computing:

[0039] Obtain the depth values ​​of multiple sampling points within the station area;

[0040] Outlier detection is performed using the absolute deviation of the median, and outliers that deviate from the median by more than a preset condition are removed.

[0041] The weighted average of the remaining effective depth values ​​is taken as the final result.

[0042] Secondly, this application provides a station depth ranging device based on an adaptive depth calculation model, comprising:

[0043] The data acquisition module is used to acquire the station image dataset from the binocular camera, including the left and right views, and to preprocess the image dataset.

[0044] The target detection module is used to perform station number target detection on the left view based on the improved YOLOv5 target detection algorithm, and obtain the station number and its rectangular frame position information;

[0045] The model building module is used to build a multi-scale adaptive deep computing model, which includes a feature extraction network, a cost calculation module, and a disparity optimization module.

[0046] The disparity map module is used to generate a high-precision disparity map based on the size characteristics of the rectangular frame using a multi-scale adaptive algorithm.

[0047] The result measurement module is used to calculate the depth value of the station based on the location information of the station and the disparity map, and output the final depth measurement result by filtering out outliers;

[0048] The smoothing module is used to perform temporal smoothing on the depth measurement results of consecutive frames using Kalman filtering.

[0049] Thirdly, this application provides a computer device, the device comprising: a memory and a processor, wherein the processor, when executing computer instructions stored in the memory, performs the method described above.

[0050] Fourthly, this application provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the method described above.

[0051] In summary, this application effectively solves the problems of insufficient depth measurement accuracy and low computational efficiency caused by changes in station size in road scenarios through a multi-scale adaptive depth calculation model and a dynamic matching mechanism with station size features. It has the advantages of being able to dynamically adapt to changes in station size and improve depth measurement accuracy and computational efficiency. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiments of this application;

[0053] Figure 2 This is a flowchart illustrating the first embodiment of the station depth ranging method based on the adaptive depth calculation model of this application;

[0054] Figure 3 This is a structural block diagram of the first embodiment of the station depth ranging device based on the adaptive depth calculation model of this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0056] Reference Figure 1 , Figure 1 This is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiments of this application.

[0057] like Figure 1 As shown, the computer device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0058] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0059] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a station depth ranging program based on an adaptive depth calculation model.

[0060] exist Figure 1In the computer device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in this application can be set in the computer device. The computer device calls the station depth ranging program based on the adaptive depth calculation model stored in the memory 1005 through the processor 1001, and executes the station depth ranging method based on the adaptive depth calculation model provided in the embodiment of this application.

[0061] This application provides a station depth ranging method based on an adaptive depth calculation model, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the station depth ranging method based on the adaptive depth calculation model of this application.

[0062] In this embodiment, the station depth ranging method based on the adaptive depth calculation model includes the following steps:

[0063] Step S10: Obtain the station image dataset from the binocular camera, including the left and right views, and preprocess the image dataset.

[0064] It should be noted that in binocular vision-based station depth measurement applications, due to the complexity of road scenes and the dynamic changes in station scale, distant station numbers appear as small-scale features in images, resulting in low signal-to-noise ratios and blurred details in their depth maps, leading to insufficient measurement accuracy. Furthermore, uniformly applying high-resolution depth calculations to all areas significantly increases computational complexity, making it difficult to meet the real-time requirements of vehicle-mounted mobile platforms. The trade-off between accuracy and efficiency becomes a key factor restricting system performance. Specifically, depth measurement results are susceptible to noise interference in long-distance scenarios, while processing delays increase in short-distance scenarios, affecting the reliability of 3D station positioning and system response speed. For example, during highway maintenance and inspection, vehicle-mounted binocular cameras continuously collect data on roadside station numbers while in motion. When station numbers are observed at long distances, their small size amplifies noise in the depth map, causing significant fluctuations in measurement results. Conversely, when station numbers are observed at close distances, the need for high-precision measurement conflicts with computational resource limitations; global high-resolution processing leads to prolonged inter-frame processing time, making it impossible to maintain stable output. Furthermore, in this scenario, the system's inability to dynamically adapt to processing strategies for different scales of station numbers leads to frequent anomalies in depth measurement results, affecting the continuity and accuracy of station location information.

[0065] If the aforementioned issues are not addressed, the instability of depth measurement results will lead to inaccurate reconstruction of the three-dimensional coordinates of the stationings, thereby affecting the integrity of digital management of highway assets. In a vast road network, accumulated measurement errors may cause deviations in maintenance decisions, increase uncertainty in the maintenance process, and weaken the overall operational efficiency of intelligent transportation systems. Therefore, there is an urgent need for a method that can adaptively adjust processing strategies based on stationing scale characteristics to achieve synergistic optimization of accuracy and efficiency.

[0066] In practical implementation, station depth measurement faces the technical challenge of balancing accuracy and efficiency in complex road scenarios. Traditional methods suffer from low signal-to-noise ratios and insufficient accuracy due to globally unified processing strategies, while high-resolution computation across the board leads to real-time limitations. This application achieves dynamic balance through a size feature-driven adaptive mechanism. Acquiring the station image dataset from a binocular camera refers to the process of acquiring raw data from the left and right views from a stereo vision system. Specifically, the image dataset can be captured in real-time by an onboard binocular camera or loaded from a pre-stored database, thereby ensuring the spatiotemporal continuity of the input data. Furthermore, station target detection is performed on the left view based on an improved YOLOv5 target detection algorithm. This algorithm enhances multi-scale target recognition capabilities by adjusting the feature pyramid fusion method, such as using a cross-stage local connectivity structure to replace the standard feature fusion path, or introducing a deformable convolution module to adapt to the geometric deformation of elongated station numbers. The main purpose is to achieve accurate localization of the station area and extraction of the rectangular bounding box coordinates. The multi-scale adaptive depth calculation model refers to a cascaded system that includes feature extraction, cost aggregation, and disparity optimization. Specifically, the feature extraction network can use a lightweight convolutional architecture such as ShuffleNet to extract hierarchical features. The cost calculation module performs stereo matching by constructing a 3D correlation tensor. The disparity optimization module uses a conditional random field model to post-process the initial disparity, primarily to support the depth estimation foundation for station numbers at different scales. In practical applications, the multi-scale adaptive algorithm generates a high-precision disparity map based on the size features of the rectangular bounding box. A hierarchical matching strategy based on image pyramids can be adopted. For example, for small-sized station numbers, a local area can be limited for fine matching at the original resolution, while for large-sized station numbers, a global search can be performed at the downsampling level to improve speed. The window size can be linearly scaled according to the area ratio, thereby avoiding global computational redundancy and preserving key details. Furthermore, when calculating depth values ​​based on station location information and the disparity map, outlier filtering can be achieved by setting a dynamic threshold by calculating the standard deviation of the depth distribution to remove outliers exceeding the mean ± 2 standard deviations, or by using a voting mechanism based on spatial neighborhood consistency to filter noise, primarily to improve the robustness of the measurement results. As a preferred implementation, Kalman filtering performs temporal smoothing on the depth measurement results of consecutive frames. This can be achieved by employing an adaptive process noise covariance adjustment strategy or by combining it with a sliding window optimization method to suppress random jitter, thereby outputting a stable and reliable depth sequence. The core innovation of this application lies in using station size characteristics as an adaptive decision-making basis to dynamically coordinate the accuracy and efficiency levels of depth calculation. This prioritizes processing speed in distant scenes and focuses on measurement accuracy in near scenes, ultimately achieving coordinated optimization of real-time performance and accuracy in station depth ranging under complex road environments.

[0067] In specific implementation, this embodiment proposes image preprocessing to enhance image quality. However, in its implementation, the general preprocessing method fails to dynamically optimize the special characteristics of station images in complex road scenes (such as low contrast caused by uneven lighting, environmental noise interference, and lens distortion of binocular cameras), resulting in blurred features in the station area, residual noise, and inaccurate stereo matching, which in turn affects the accuracy of subsequent station detection and the reliability of depth measurement.

[0068] To address this, this embodiment further proposes image preprocessing including: using adaptive histogram equalization to enhance image contrast; using Gaussian filtering to suppress noise, with the filter kernel size dynamically adjusted according to the image resolution; and performing stereo correction on the left and right views to eliminate the effects of lens distortion.

[0069] Among them, adaptive histogram equalization refers to a technique that dynamically adjusts the pixel intensity distribution through local brightness distribution to enhance image contrast. It can be implemented using a contrast-limited adaptive histogram equalization algorithm, which divides the image into multiple non-overlapping blocks and limits the contrast gain, thereby avoiding the loss of details in overexposed areas caused by global processing. Gaussian filtering can be understood as a linear smoothing filter based on a Gaussian function. Its filter kernel size can be dynamically adjusted according to the image resolution. For example, a smaller kernel size is used in high-resolution images to preserve the details of the station edges, while a larger kernel size is used in low-resolution images to effectively suppress shot noise. Stereo correction specifically refers to the process of performing geometric transformations on binocular images based on camera calibration parameters to eliminate lens distortion. It can be implemented based on the epipolar correction algorithm to accurately calibrate the pixel correspondence between the left and right views.

[0070] Specifically, the image preprocessing scheme of this application forms a complete processing chain through the orderly execution of adaptive histogram equalization, Gaussian filtering, and stereo correction. Adaptive histogram equalization first optimizes the brightness distribution in local areas of the image, highlighting the detailed features of the station number characters under low light or strong reflective conditions; then, Gaussian filtering dynamically adapts the kernel size according to the image resolution, suppressing environmental noise while avoiding weakening the edge structure of the station number; finally, stereo correction performs geometric correction based on calibration parameters to eliminate the influence of lens distortion on the binocular view matching relationship. The three processes work in sequence to ensure that the preprocessed image retains the key features of the station number area and has geometric consistency, providing reliable input for subsequent station number detection and depth calculation.

[0071] As a specific implementation method, after the vehicle-mounted mobile platform acquires road images, it first applies adaptive histogram equalization to the images, dividing them into multiple local regions and adjusting the intensity with limited contrast. Then, it performs Gaussian filtering, dynamically selecting the filter kernel size according to the current image resolution. A smaller kernel size is used for high-resolution images to maintain the clarity of the station edges, while a larger kernel size is used for low-resolution images to enhance noise suppression. Finally, based on pre-calibrated camera intrinsic and extrinsic parameters, stereo correction is performed on the left and right views to correct lens distortion and ensure accurate alignment of pixel-level correspondences.

[0072] Through the above solution, this embodiment effectively solves the problems of low contrast, noise interference and lens distortion of station images in complex road scenes, significantly improves the clarity of station area features and the accuracy of stereo matching, thereby ensuring the reliability of subsequent station detection and depth measurement.

[0073] Step S20: Perform station target detection on the left view based on the improved YOLOv5 target detection algorithm to obtain the station number and its bounding box position information.

[0074] It should be noted that the improved YOLOv5 algorithm includes the following optimizations:

[0075] Based on the bounding box size of the station number annotation data, K-means clustering is used to generate exclusive anchor boxes that are adapted to the elongated characteristics of the station numbers, replacing the default anchor boxes of the general YOLO and reducing the bounding box prediction offset; an attention mechanism is introduced into the backbone network to enhance the feature extraction of the station number region; and Focal Loss is used to solve the problem of positive and negative sample imbalance.

[0076] Understandably, the dedicated anchor box refers to the prior size of the bounding box customized according to the actual size distribution pattern of the target station. It can be extracted from the labeled data by the K-means clustering algorithm or implemented using a predefined size set based on aspect ratio statistics. Its purpose is to make the bounding box prediction more in line with the slender geometric features of the station and reduce prediction bias. The attention mechanism can be understood as an adaptive feature weight allocation mechanism, which can be implemented using a channel attention module or a spatial attention module. Its purpose is to enhance the feature response of the station region and suppress background noise. In practical applications, Focal Loss is specifically an improved loss function, which can be implemented by adjusting the cross-entropy loss of the focusing parameters. Its purpose is to reduce the weight of easily classified samples and make the model pay more attention to the difficult-to-classify station samples.

[0077] In practical implementation, considering the significant multi-scale characteristics of road station numbers in images (large scale in the foreground, small scale in the background), the general YOLO model exhibits large differences in detection accuracy for station numbers at different scales (small-scale station numbers are prone to missed detection due to insufficient features, while large-scale station numbers are prone to false detection due to background interference). Therefore, a "scale-confidence" two-factor dynamic adaptation strategy is designed to specifically optimize the detection process for station numbers at different scales. Specific innovations are as follows:

[0078] Scale division: Detect the pixel area of ​​the bounding box based on the station number ( They are divided into three scales.

[0079] (1) Small scale: (like =200 pixels², corresponding to the distant station number);

[0080] (2) Mesoscale: (like =1000 pixels², corresponding to the mid-range station number);

[0081] (3) Large scale: (Corresponding to the nearby station number).

[0082] Confidence calculation: Assign a scale confidence score to the stationing detection results for each scale. ) and matching confidence ( ):

[0083] (1) Scale confidence : Historical detection error statistics based on station number samples at this scale (the smaller the error, the better). Larger scales, such as small scales =0.3, mesoscale =0.5, large scale =0.7;

[0084] (2) Matching confidence : Calculated from the disparity map reliability index (such as disparity consistency cost) output by the stereo matching model, ranging from [0, 1]. The higher the value, the more reliable the matching.

[0085] Dynamic anchor frame and detection head adaptation strategy: Based on the "scale-confidence" dual factor, the detection modules of different scale stations are dynamically adapted.

[0086] (1) Anchor frame adaptive adjustment

[0087] For different scales, dedicated anchor boxes from the pre-clustering are invoked (small-scale anchor boxes focus on "small target coverage", while large-scale anchor boxes focus on "accuracy matching"), and the anchor box size is dynamically fine-tuned according to the following formula:

[0088] Anchor frame width = Anchor frame height = ;

[0089] in, , This serves as the reference anchor frame for this scale; As the benchmark scale; This represents the average scale of the station numbers in the current image.

[0090] (2) Detection head weight allocation

[0091] Dynamic detection weights are assigned to feature maps of different scales to enhance the detection capability of small-scale features. The formula is as follows:

[0092] Detection weight = ,in, For scale confidence level, To match confidence levels;

[0093] By combining weights with the feature extraction layer of the detection head, the station numbers with high reliability and low error scale can obtain more sufficient feature learning resources. Only when both factors are "simultaneously reliable" are they assigned high weights, thus suppressing background interference and missed detection of small targets.

[0094] It should be noted that this embodiment effectively improves the detection accuracy of distant small-scale station numbers through the above method, reduces the recognition error caused by small pixel area and low signal-to-noise ratio, thereby reducing the positioning deviation in the depth measurement process and meeting the actual needs of high-precision station distance measurement in complex road scenarios.

[0095] Step S30: Construct a multi-scale adaptive deep computing model, which includes a feature extraction network, a cost calculation module, and a disparity optimization module.

[0096] It is understood that the multi-scale adaptive depth calculation model in this embodiment is as follows:

[0097] Objective function: (1)

[0098] Constraints: (2)

[0099] (3)

[0100] (4)

[0101] (5)

[0102] , (6)

[0103] In this equation (1), the objective is to minimize the weighted sum of the total error and the computation time. This indicates the number of station numbers detected. The depth calculation strategy for representing station number, Indicates the use of strategy Calculate the first The estimated depth error at each station number, This indicates the estimated calculation time. and Equations (2) and (3) indicate that all stations must be assigned to only one calculation strategy; Equation (4) indicates that the measurement error of each station must be less than its allowable error threshold; Equation (5) indicates that the total calculation time for all stations must be less than the maximum time threshold allowed by the system. Equation (6) defines the strategy set and decision variables. According to the station number dimensions Take a value from it. and This refers to the size threshold for the station number. A strategy is selected based on the station number size. , , ,in This indicates the use of a high-resolution local strategy; This indicates the adoption of a fusion strategy; This indicates that a low-resolution global strategy is being used.

[0104] It should be noted that the multi-scale adaptive deep computing model adopts a cascaded network structure, including: a feature extraction network using ResNet-34 as the backbone network to output multi-scale feature maps; a cost calculation module to construct a 4D correlation volume and perform cost aggregation through 3D convolution; and a disparity optimization module using a GRU iterative optimizer to refine the disparity.

[0105] Understandably, a multi-scale adaptive depth computation model refers to a staged depth estimation framework, which can be implemented using a cascaded neural network architecture. By decomposing the depth computation process into three ordered stages—feature extraction, cost aggregation, and disparity optimization—its aim is to dynamically adjust the computation strategy based on the actual size of the station in the image, achieving an adaptive balance between accuracy and efficiency. The feature extraction network is the component used to extract hierarchical feature representations from binocular images. It can be implemented using ResNet-34 or other deep convolutional neural networks such as ResNet-50 or EfficientNet as the backbone network, with the goal of outputting features at different resolutions. The feature map is layered to adapt to the feature requirements of station numbers from small scale in the distant view to large scale in the near view; the cost calculation module is a component that quantifies the matching degree of pixels in the left and right views. It can construct a 4D correlation volume containing spatial coordinates and disparity dimensions, and achieve multi-dimensional feature aggregation through 3D convolution kernels. Its purpose is to integrate contextual information to suppress matching noise and improve the matching robustness of small-scale station number areas; the disparity optimization module is a component that refines the initial disparity estimate. It can be implemented using a gated recurrent unit (GRU) as an iterative optimizer. Its purpose is to gradually correct the disparity results through a recurrent mechanism, especially to perform progressive optimization for blurred areas at the station number edges to avoid loss of details.

[0106] It should be noted that the feature extraction network contains three parallel branches: a small-scale branch, which uses 5×5 convolutional kernels to extract detailed features; a medium-scale branch, which uses dilated convolutions to expand the receptive field; and a large-scale branch, which introduces the CBAM attention mechanism to focus on the station area.

[0107] In practice, the features extracted from the above three branches are fused:

[0108] Feature scale alignment: Transposed convolution (small scale → medium scale) and stride convolution (large scale → medium scale) are used to unify the feature maps of the three branches to the same resolution (1 / 8 of the input resolution).

[0109] Dynamic weighted fusion: An adaptive fusion module is designed, which learns the weight coefficients (with a weight sum of 1) of features at each scale through a two-layer fully connected network (128 hidden neurons). Let the small-scale feature be... Mesoscale is Large scale The weighting coefficients are respectively , , The fused main feature map The weight coefficients are dynamically adjusted through backpropagation of the loss function to ensure that optimal feature representations are obtained in different scenarios (such as occlusion and openness).

[0110] In practice, features at different scales are extracted separately:

[0111] Low-feature global branch: Through 5 layers of convolution (3×3 kernel size, stride 1) and 2 layers of max pooling (2×2 pooling kernel), the pixel-level texture features of the station number are extracted in a key manner, and the output feature map has 256 channels;

[0112] Mid-scale bridging branch: Two layers of dilated convolution (with dilation rates of 2 and 4) are added on the basis of the small-scale branch to expand the receptive field to capture the spatial relationship between the station number and the surrounding curbstone and markings, and the output feature map has 512 channels.

[0113] High-feature local branch: An attention mechanism (CBAM attention module) is introduced to perform dual channel and spatial weight allocation on the mesoscale feature map, which enhances the features of the station area and suppresses background interference, and outputs a feature map with 1024 channels.

[0114] Policy-driven feature scheduling and fusion, based on allocation-based computational strategies. Using the features from the above branches, three different feature representations are formed:

[0115] like A high-resolution local strategy is adopted, which uses only the feature maps output by the high-feature local branches and uses these feature maps as the main feature maps of the left and right eye images.

[0116] like A fusion strategy is adopted, which utilizes the feature maps output by both the low-feature global branch and the high-feature local branch. The specific implementation method is as follows:

[0117] Feature scale alignment: Transposed convolution (low features → medium scale) and stride convolution (high features → medium scale) are used to unify the feature maps of the three branches to the same resolution (1 / 8 of the input resolution).

[0118] Dynamic weighted fusion: An adaptive fusion module is designed, which learns the weight coefficients (with a weight sum of 1) of features at each scale through a two-layer fully connected network (128 hidden neurons). Let the small-scale feature be... Mesoscale is Large scale The weighting coefficients are respectively , , The fused main feature map The weight coefficients are dynamically adjusted through backpropagation of the loss function to ensure that optimal feature representations are obtained in different scenarios (such as occlusion and openness).

[0119] like A low-resolution global strategy is adopted, using only the feature maps output by the low-feature global branch, and using these feature maps as the main feature maps of the left and right eyes images.

[0120] It should be noted that this embodiment achieves a significant improvement in the signal-to-noise ratio and detail clarity of the depth map in long-distance, small-scale stationing scenarios through the above technical solution, avoiding measurement deviations caused by feature dilution. At the same time, through the staged processing strategy of the cascaded structure, high-resolution computing is only used in key links, effectively reducing the computing resource consumption of the vehicle-mounted mobile platform and meeting the stringent real-time requirements.

[0121] Step S40: Based on the size characteristics of the rectangular frame, a high-precision disparity map is generated using a multi-scale adaptive algorithm.

[0122] It should be noted that in this embodiment, a multi-scale adaptive algorithm is proposed to generate a high-precision disparity map based on the station size. However, in its implementation, there is a lack of dynamic calculation strategies and window adjustment mechanisms for station sizes of different scales. This results in the loss of detailed features due to fixed low-resolution processing for small-scale station sizes, which affects the depth accuracy. For large-scale station sizes, the accuracy decreases due to noise introduced by global high-resolution calculation in low signal-to-noise ratio scenarios. At the same time, the global unified calculation strategy is difficult to balance real-time performance and accuracy requirements, resulting in an imbalance between the efficiency and reliability of depth measurement in complex road scenarios.

[0123] Therefore, this embodiment also proposes a multi-scale adaptive algorithm, which takes the extracted main feature maps of the left and right eyes as input and calculates the initial matching cost by constructing a 4D correlation volume.

[0124] The initial 4D correlation volume is processed by multi-scale scaling, and a correlation pyramid from coarse to fine is constructed through pooling operations.

[0125] Cost aggregation and disparity optimization: Start an iterative optimizer based on gated recurrent unit (GRU) and take the obtained correlation pyramid, the extracted context features and a disparity field initialized to zero as input;

[0126] In each GRU iteration, the sampled cost features, the current disparity estimate, the context features, and the hidden state of the GRU are concatenated and fused together, and then input into the GRU update module to decode a fine disparity update.

[0127] The disparity update calculated by the GRU unit is superimposed with the current disparity estimate to obtain a new disparity map after one iteration of optimization; this process is repeated, and through multiple iterations, the disparity estimate gradually converges.

[0128] In practical implementation, the method proposed in this embodiment improves the depth measurement accuracy of small-scale stations in low signal-to-noise ratio scenarios and avoids errors caused by noise accumulation; at the same time, it improves the depth accuracy of large-scale stations and effectively preserves detailed features; in addition, computing resources are efficiently allocated, ensuring the reliability of depth measurement while meeting the stringent real-time requirements of the vehicle-mounted mobile platform.

[0129] Step S50: Based on the location information of the station number and the disparity map, calculate the depth value of the station number, and output the final depth measurement result through outlier filtering.

[0130] It should be noted that the depth calculation adopts a robust statistical method: the depth values ​​of multiple sampling points within the station area are obtained; outlier detection is performed using the absolute deviation of the median, and outliers that deviate from the median by more than a preset condition are removed; the weighted average of the remaining valid depth values ​​is taken as the final result.

[0131] In practice, the disparity map of the final iterative output is upsampled to restore it to the resolution of the input image;

[0132] Depth regression optimization is implemented by constructing a depth regression optimization module to further optimize the disparity map and improve the depth estimation accuracy of the station area. The full-resolution disparity map (which can be considered the initial depth representation) is subjected to three convolutional layers (3×3 kernel, 1 output channel) and one Sigma-oid activation layer to obtain the optimized depth map. The Adam optimizer is then used to minimize the total loss, thereby improving the overall accuracy and edge continuity of the station depth measurement.

[0133] The optimized depth map is post-processed by filling occluded areas through left-right consistency checks and smoothing noise using weighted median filtering, ultimately outputting a high-quality dense depth map.

[0134] The mid-depth value is obtained based on the location information of the target detection box and the depth map. And the depth values ​​are obtained at the four corners of the station (numbered 1, 2, 3, and 4). ;

[0135]

[0136] calculate The median Med and mean absolute difference (MAD) of the five points are calculated according to the following rules: (in (For parameters) Filter outliers and calculate the arithmetic mean of the depth values ​​excluding outliers as the measured depth value. .

[0137] It should be noted that this embodiment first acquires depth values ​​from multiple sampling points within the station area, providing a sufficient data foundation for statistical analysis and avoiding the randomness of single-point measurements. Then, outlier detection is performed using the median absolute deviation. The absolute deviation is calculated based on the median depth values ​​to identify outliers that significantly deviate from the normal range. This mechanism has a natural resistance to extreme values. After removing outliers that deviate from the median by more than a preset condition, the remaining valid depth values ​​are weighted and averaged according to confidence level or spatial location. This adaptively filters noise and optimizes the final result when there is local unevenness in the depth values ​​within the station area. This process ensures that the outlier screening process adapts to the depth fluctuation characteristics under different lighting and distance conditions, while preventing excessive removal of valid data.

[0138] The specific implementation of the scheme in this embodiment is as follows: The system selects multiple sampling points within the station area, such as several points evenly distributed, to collect depth data; when detecting outliers, a dynamic threshold can be set based on the absolute deviation of the median to remove outliers that significantly deviate from the median; when weighting the average, weights can be assigned according to the spatial relationship between the sampling points and the station center, with points that are closer to each other having higher weights, thereby fusing reliable data to output the final depth value.

[0139] Through the above-mentioned scheme, this application can effectively suppress the fluctuation of depth values ​​in complex road scenarios, significantly improve the stability and reliability of measurement results under the conditions of uneven distribution of depth values ​​in the station area and low signal-to-noise ratio, output more accurate depth measurement values, and meet the technical requirements of high-precision digital archiving.

[0140] Step S60: Perform temporal smoothing on the depth measurement results of consecutive frames using Kalman filtering.

[0141] In practice, Kalman filtering performs temporal smoothing on the depth measurement results of consecutive frames. It can adopt an adaptive process noise covariance adjustment strategy or combine a sliding window optimization method to suppress random jitter, thereby outputting a stable and reliable depth sequence.

[0142] This embodiment effectively solves the problems of insufficient depth measurement accuracy and low calculation efficiency caused by changes in station size in road scenarios by using a multi-scale adaptive depth calculation model and a dynamic matching mechanism with station size features. It has the advantages of being able to dynamically adapt to changes in station size and improve depth measurement accuracy and calculation efficiency.

[0143] Furthermore, embodiments of this application also propose a computer-readable storage medium storing a program for stationing depth measurement based on an adaptive depth calculation model. When the program for stationing depth measurement based on an adaptive depth calculation model is executed by a processor, it implements the steps of the method for stationing depth measurement based on an adaptive depth calculation model as described above.

[0144] Reference Figure 3 , Figure 3 This is a structural block diagram of the first embodiment of the station depth ranging device based on the adaptive depth calculation model of this application.

[0145] like Figure 3 As shown, the station depth ranging device based on an adaptive depth calculation model proposed in this application includes:

[0146] The data acquisition module 10 is used to acquire the station image dataset from the binocular camera, including the left and right views, and to preprocess the image dataset.

[0147] The target detection module 20 is used to perform station number target detection on the left view based on the improved YOLOv5 target detection algorithm, and obtain the station number and its rectangular frame position information;

[0148] The model building module 30 is used to build a multi-scale adaptive deep computing model, which includes a feature extraction network, a cost calculation module, and a disparity optimization module.

[0149] The disparity map module 40 is used to generate a high-precision disparity map based on the size characteristics of the rectangular frame using a multi-scale adaptive algorithm.

[0150] The result measurement module 50 is used to calculate the depth value of the station based on the location information of the station and the disparity map, and output the final depth measurement result by filtering out outliers.

[0151] The smoothing module 60 is used to perform temporal smoothing on the depth measurement results of consecutive frames using Kalman filtering.

[0152] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solution of this application. In specific applications, those skilled in the art can make settings as needed, and this application does not impose any restrictions on this.

[0153] This embodiment effectively solves the problems of insufficient depth measurement accuracy and low calculation efficiency caused by changes in station size in road scenarios by using a multi-scale adaptive depth calculation model and a dynamic matching mechanism with station size features. It has the advantages of being able to dynamically adapt to changes in station size and improve depth measurement accuracy and calculation efficiency.

[0154] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this application. In practical applications, those skilled in the art can select some or all of it to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0155] In addition, for technical details not described in detail in this embodiment, please refer to the method of station depth ranging based on adaptive depth calculation model provided in any embodiment of this application, which will not be repeated here.

[0156] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0157] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application. The above are only preferred embodiments of this application and do not limit the patent scope of this application. All equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A station depth ranging method based on an adaptive depth calculation model, characterized in that, include: Obtain the station image dataset from the stereo camera, including the left and right views, and preprocess the image dataset; The left view is used to detect station numbers based on an improved YOLOv5 object detection algorithm, obtaining the station number and its bounding box position information. This also includes a scale-adaptive detection strategy. Based on the pixel area of ​​the detection bounding box of the station number, it is divided into three scales: small scale corresponding to distant station numbers, medium scale corresponding to mid-range station numbers, and large scale corresponding to near-range station numbers. Differentiated confidence thresholds were assigned to station numbers at different scales. The detection modules for different scales of station numbers are dynamically adapted, including: adaptive adjustment of anchor frames. For different scales, dedicated anchor frames from pre-clustering are called, and the anchor frame size is dynamically fine-tuned according to the following formula: Anchor frame width = Anchor frame height = in, , This serves as the reference anchor frame for this scale; As the benchmark scale; The average scale of the station numbers in the current image; The detection head weight allocation assigns dynamic detection weights to feature maps of different scales, enhancing the detection capability of small-scale features. The formula is as follows: Detection weight = ,in, For scale confidence level, To match confidence levels; By combining the weights with the feature extraction layer of the detection head, the station number can obtain more sufficient feature learning resources. A multi-scale adaptive deep computing model is constructed, which includes a feature extraction network, a cost calculation module, and a disparity optimization module. The feature extraction network selects a feature calculation strategy based on the station size to output a multi-scale feature map. Based on the size characteristics of the rectangular frame, a high-precision disparity map is generated using a multi-scale adaptive algorithm; Based on the location information of the station number and the disparity map, the depth value of the station number is calculated, and the final depth measurement result is output after filtering out outliers. Kalman filtering is used to perform temporal smoothing on the depth measurement results of consecutive frames.

2. The station depth ranging method based on an adaptive depth calculation model according to claim 1, characterized in that, Image preprocessing includes: Adaptive histogram equalization is used to enhance image contrast; Noise suppression is achieved through Gaussian filtering, with the filter kernel size dynamically adjusted based on the image resolution. Perform stereoscopic correction on the left and right views to eliminate the effects of lens distortion.

3. The station depth ranging method based on an adaptive depth calculation model according to claim 1, characterized in that, The improved YOLOv5 algorithm includes the following optimizations: Based on the bounding box size of the stationing data, K-means clustering is used to generate exclusive anchor boxes that are adapted to the elongated characteristics of the stationing, replacing the default anchor boxes of general YOLO and reducing the bounding box prediction offset. An attention mechanism is introduced into the backbone network to enhance feature extraction of the station number region; Focal Loss is used to solve the problem of imbalance between positive and negative samples.

4. The station depth ranging method based on an adaptive depth calculation model according to claim 1, characterized in that, The multi-scale adaptive depth computing model adopts a cascaded network structure, including: The feature extraction network uses ResNet-34 as the backbone network and outputs multi-scale feature maps; The cost calculation module constructs a 4D correlation volume and performs cost aggregation through 3D convolution. The parallax optimization module uses the GRU iterative optimizer to refine the parallax.

5. The station depth ranging method based on an adaptive depth calculation model according to claim 4, characterized in that, The feature extraction network contains three parallel branches: Small-scale branches use 5×5 convolutional kernels to extract detailed features; Mesoscale branching uses dilated convolution to expand the receptive field; Large-scale branches are introduced, and the CBAM attention mechanism is used to focus on the station area.

6. The station depth ranging method based on an adaptive depth calculation model according to claim 1, characterized in that, Deep computing employs robust statistical methods: Obtain the depth values ​​of multiple sampling points within the station area; Outlier detection is performed using the absolute deviation of the median, and outliers that deviate from the median by more than a preset condition are removed. The weighted average of the remaining effective depth values ​​is taken as the final result.

7. A station depth ranging device based on an adaptive depth calculation model, characterized in that, Performing the method as described in claim 1 includes: The data acquisition module is used to acquire the station image dataset from the binocular camera, including the left and right views, and to preprocess the image dataset. The target detection module is used to perform station number target detection on the left view based on the improved YOLOv5 target detection algorithm, and obtain the station number and its rectangular frame position information; The model building module is used to build a multi-scale adaptive deep computing model, which includes a feature extraction network, a cost calculation module, and a disparity optimization module. The disparity map module is used to generate a high-precision disparity map based on the size characteristics of the rectangular frame using a multi-scale adaptive algorithm. The result measurement module is used to calculate the depth value of the station based on the location information of the station and the disparity map, and output the final depth measurement result by filtering out outliers; The smoothing module is used to perform temporal smoothing on the depth measurement results of consecutive frames using Kalman filtering.

8. A computer device, characterized in that, The device includes a memory and a processor. When the processor executes computer instructions stored in the memory, it performs the station depth ranging method based on the adaptive depth calculation model as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the station depth ranging method based on an adaptive depth calculation model as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Highway tunnel asset positioning method and electronic equipment

    CN120892506A

  • Traffic image labeling method and device based on D-S evidence theory and medium

    CN121170796A