A monocular vision depth estimation method, apparatus, device, medium, and product

By constructing a loss function based on scene structure constraints and training a deep learning model, and incorporating prior information about scene structure, the problem of depth estimation drift in monocular vision depth estimation models is solved, thereby improving the accuracy of depth estimation.

CN121458771BActive Publication Date: 2026-04-03CHINA AGRI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-05
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing deep learning-based monocular vision depth estimation models suffer from depth estimation drift and bias in different regions of the image, resulting in depth estimation results that do not match the scene structure and reduce accuracy.

Method used

We construct a loss function based on scene structure constraints, including contour line structure loss, contour line variance loss, and contour line sequence loss. By training a deep learning model, we incorporate prior information about scene structure to suppress the drift of depth estimation results.

Benefits of technology

It improves the accuracy of monocular vision depth estimation, suppresses the drift problem of depth estimation results, and enhances the accuracy of depth estimation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121458771B_ABST
    Figure CN121458771B_ABST
Patent Text Reader

Abstract

This application discloses a monocular vision depth estimation method, apparatus, device, medium, and product, relating to the field of computer vision technology. This application first acquires multiple RGB images from a monocular camera and the corresponding ground truth depth map for each RGB image to construct a training set; then, it constructs a loss function based on scene structure constraints (including contour line structure loss, contour line variance loss, and contour line sequence loss); subsequently, it trains a deep learning model to obtain the trained deep learning model as a monocular vision depth estimation model; and then uses the monocular vision depth estimation model to perform monocular vision depth estimation. This application, by constructing a loss function based on scene structure constraints, suppresses the drift problem of depth estimation results and improves the accuracy of monocular depth estimation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision technology, and in particular to a monocular vision depth estimation method, apparatus, device, medium, and product. Background Technology

[0002] Monocular vision depth estimation plays a crucial role in computer vision, enhancing computers' ability to perceive and understand realistic 3D scenes. It is widely applied in areas such as robot navigation, autonomous driving, and virtual reality. Existing deep learning-based monocular vision depth estimation models generally focus on utilizing image pixel values ​​and local neighborhood information. Their outputs often exhibit varying degrees of depth estimation drift and bias in different regions of the image. However, many depth estimation scenarios possess regular geometric structures (such as rooms and carriages), causing the depth estimation results to contradict the scene structure and reducing the accuracy of the depth estimation. Summary of the Invention

[0003] The purpose of this application is to provide a monocular vision depth estimation method, apparatus, device, medium, and product to improve the accuracy of depth estimation results.

[0004] To achieve the above objectives, this application provides the following solution.

[0005] In a first aspect, this application provides a monocular vision depth estimation method, including:

[0006] Acquire multiple RGB (Red Green Blue) images from a monocular camera and the corresponding ground truth depth map for each RGB image to construct a training set;

[0007] Construct a loss function based on scene structure constraints; the loss function includes contour line structure loss, contour line variance loss, and contour line sequence loss;

[0008] The training set and the loss function are used to train a deep learning model, and the trained deep learning model is used as a monocular vision depth estimation model.

[0009] Monocular visual depth estimation is performed using the aforementioned monocular visual depth estimation model.

[0010] Optionally, multiple RGB images from a monocular camera and the corresponding ground truth depth map for each RGB image are acquired to construct a training set, specifically including:

[0011] Acquire multiple RGB images from a monocular camera and the corresponding true depth map for each RGB image;

[0012] Contour mapping is performed on each of the stated true depth maps to obtain a contour representation of each true depth map; the contour representation is as follows: An array, wherein each element in the array represents the contour line number to which the pixel at the corresponding position belongs; the depth value of the contour line is the average depth value of all pixels within the interval corresponding to the contour line; wherein... and These are the height and width of the actual depth map, respectively;

[0013] The training set is constructed by taking RGB images as input and using the contour lines of the corresponding real depth maps as labels.

[0014] Optionally, the contour line structure loss is:

[0015] ;

[0016] in, This is due to the loss of contour lines. This represents the number of contour lines in a depth map. and The numbers in the predicted depth map and the true depth map are respectively the first two. The depth values ​​of the contour lines; the predicted depth map is the depth map output by the deep learning model during training.

[0017] Optionally, the variance loss of the contour lines is:

[0018] ;

[0019] in, For the variance loss of contour lines, The number of contour lines in a depth map , To be located in the predicted depth map at the th The number of pixels in the area corresponding to each contour line. To be located in the predicted depth map at the th The area corresponding to the contour lines is the first The depth value of each pixel. To predict the depth map for the first The depth values ​​of the contour lines; the predicted depth map is the depth map output by the deep learning model during training.

[0020] Optionally, the loss of the contour line sequence is:

[0021] ;

[0022] in, For contour line sequence loss, This represents the number of contour lines in a depth map. and In the predicted depth map, respectively Article and Section Depth values ​​of the contour lines, To participate in the The sequence loss calculation of the contour lines and the contour lines of the first contour line. The difference in the numbering of the contour lines, To participate in the The number of contour lines calculated using the sequence loss of contour lines. , The ideal interval between two adjacent isobaths. , and These are the maximum and minimum depth values ​​in the true depth map, respectively; the predicted depth map is the depth map output by the deep learning model during training.

[0023] Optionally, monocular visual depth estimation is performed using the monocular visual depth estimation model, and then the process further includes:

[0024] Post-processing is performed on the target depth map; the target depth map is the depth map output by the monocular vision depth estimation model during the monocular vision depth estimation process, and the post-processing includes filtering and / or visualization processing.

[0025] Secondly, this application provides a monocular vision depth estimation device, which applies the above-mentioned monocular vision depth estimation method, and the monocular vision depth estimation device includes:

[0026] The training set construction module is used to acquire multiple RGB images from a monocular camera and the corresponding ground truth depth map for each RGB image to construct the training set.

[0027] The loss function construction module is used to construct a loss function based on scene structure constraints; the loss function includes contour line structure loss, contour line variance loss, and contour line sequence loss.

[0028] The model training module is used to train a deep learning model using the training set and the loss function, and obtain the trained deep learning model as a monocular vision depth estimation model.

[0029] The monocular vision depth estimation module is used to perform monocular vision depth estimation using the monocular vision depth estimation model.

[0030] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described monocular vision depth estimation method.

[0031] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described monocular vision depth estimation method.

[0032] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described monocular vision depth estimation method.

[0033] According to the specific embodiments provided in this application, this application has the following technical effects.

[0034] This application provides a monocular visual depth estimation method, apparatus, device, medium, and product. First, it acquires multiple RGB images from a monocular camera and the corresponding true depth map for each RGB image to construct a training set. Then, it constructs a loss function based on scene structure constraints (including contour line structure loss, contour line variance loss, and contour line sequence loss). Next, it trains a deep learning model to obtain the trained deep learning model as a monocular visual depth estimation model. Finally, it uses this monocular visual depth estimation model to perform monocular visual depth estimation. This application, by constructing a loss function based on scene structure constraints, suppresses the drift problem in depth estimation results and improves the accuracy of monocular depth estimation. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a flowchart illustrating a monocular visual depth estimation method provided in an embodiment of this application.

[0037] Figure 2 This is a schematic diagram of a monocular visual depth estimation method provided in an embodiment of this application.

[0038] Figure 3 This is a schematic diagram illustrating the principle of training a deep learning model according to an embodiment of this application.

[0039] Figure 4 This is a schematic diagram of the structure of a monocular visual depth estimation device provided in an embodiment of this application.

[0040] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0042] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] This application proposes a monocular vision depth estimation method, device, equipment, medium, and product. By selecting a depth estimation model, drawing contour lines, constructing a loss function based on scene structure constraints, and iteratively optimizing parameters, prior information about scene structure is incorporated into the depth estimation model training process, which suppresses the drift problem of depth estimation results and improves the accuracy of monocular depth estimation results.

[0044] In one exemplary embodiment, a monocular vision depth estimation method is provided, such as... Figure 1 and Figure 2 As shown, it includes the following steps 101-104.

[0045] Step 101: Obtain multiple RGB images from a monocular camera and the corresponding true depth map for each RGB image to construct a training set.

[0046] Step 102: Construct a loss function based on scene structure constraints; the loss function includes contour line structure loss, contour line variance loss, and contour line sequence loss.

[0047] Step 103: Use the training set and the loss function to train a deep learning model and obtain the trained deep learning model as a monocular vision depth estimation model.

[0048] Step 104: Perform monocular visual depth estimation using the monocular visual depth estimation model.

[0049] Implementing steps 101-104 effectively integrates scene structure constraint information into the deep learning model training process. Specifically, this includes: constructing a loss function based on scene structure constraints; training the deep learning model using the constructed loss function and the training set; constructing a monocular visual depth estimation model; and using this monocular visual depth estimation model to perform monocular depth inference prediction on subsequently acquired images to obtain scene depth information corresponding to the image content. This suppresses the drift problem of depth estimation results and improves the accuracy of monocular depth estimation results.

[0050] In another exemplary embodiment, such as Figure 3 As shown, this application first generates the corresponding contour line representation based on the real depth map, enabling it to effectively calculate the loss function, integrates scene structure constraint information into the deep learning model training process, and then trains the deep learning model using the training set.

[0051] Step 101 above can be replaced by steps 201-203 as follows.

[0052] Step 201: Obtain multiple RGB images from a monocular camera and the corresponding true depth map for each RGB image.

[0053] Step 202: Perform contour encoding on each of the real depth maps to obtain the contour representation of each real depth map; the contour representation is as follows: An array, wherein each element in the array represents the contour line number to which the pixel at the corresponding position belongs; the depth value of the contour line is the average depth value of all pixels within the interval corresponding to the contour line; wherein... and These are the height and width of the actual depth map, respectively.

[0054] Step 203: Use the RGB image as input and the contour lines of the real depth map corresponding to the RGB image as labels to construct a training set.

[0055] In another exemplary embodiment, in step 201 above, a specified number of RGB images and their corresponding ground truth depth maps are acquired as a training set. This can be done using publicly available datasets such as KITTI (Karlsruhe Institute of Technology and Toyota Technological Institute at Chicago) or NYUv2 (New York University Depth Dataset Version 2), or by collecting a dataset specific to the application scenario. The dataset should contain at least RGB images and their corresponding ground truth depth maps. The depth map is represented by an H×W two-dimensional array, called the depth map array. and These represent the height and width of the true depth map, which are consistent with the height and width of the RGB image. Each element in the depth map array represents the depth value of the corresponding pixel in the RGB image, that is, the distance (z-axis coordinate value) of that pixel relative to the imaging plane in the camera coordinate system.

[0056] In another exemplary embodiment, in step 202 above, for the true depth map corresponding to an RGB image, the number of contour lines is set to 1. , The determination of the depth value must consider computational cost and the required level of detail in the output results, which will not be elaborated upon here. Assume the maximum depth value in the depth map is... The minimum depth value is ,exist and Evenly divided between Each pixel is assigned a depth value interval, and each interval represents a contour line. Pixels belonging to the same interval are considered to be located on the same contour line, and the depth value of the contour line is the average depth of the pixels within that interval. Therefore, each pixel is assigned a unique number. , This represents the sequence number of the interval to which it belongs, and is also the number of the isobath. These isobaths are represented in the form of an isobath map, which is a... Contour lines are represented in array form, where, and These represent the height and width of the actual depth map, respectively, and the elements in the array are... arrive Integers between 0 and 1 represent the contour lines to which the corresponding pixel in the image belongs.

[0057] In another exemplary embodiment, the deep learning model in step 103 above can be selected according to the application environment of the task.

[0058] If performing depth estimation tasks in an environment with limited computing resources, a lightweight, fast image depth estimation model can be used, such as DepthAnything (depth estimation model) with ViT-S (Vision Transformer-Small) as the encoder. If performing depth estimation tasks on systems with high accuracy requirements, a heavyweight, high-accuracy depth estimation model can be used, such as Depth Pro (professional-grade depth perception model). The method provided in this application provides a generalized supervision strategy for training or fine-tuning the selected deep learning models, enabling plug-and-play application of different models without special requirements on the deep learning models themselves.

[0059] In another exemplary embodiment, the loss function of step 102 above, based on scene structure constraints, incorporates the contour line properties from the geographical field, and mainly includes the following parts:

[0060] (1) Structure loss of contour lines This loss term requires the predicted depth map to maintain the correctness of the contour line structure, meaning that the depth values ​​of the corresponding contour lines in the true depth map and the predicted depth map should be the same. The loss function is defined as follows:

[0061]

[0062] in, This is due to the loss of contour lines. This represents the number of contour lines in a depth map (which can be a preset depth map or a true depth map). and The numbers in the predicted depth map and the true depth map are respectively the first two. The depth values ​​of the contour lines; the predicted depth map is the depth map output by the deep learning model during training.

[0063] As described in step 202, the depth value of the contour line is the average depth value of the pixels within its corresponding interval:

[0064]

[0065] in, This represents the set of pixels along a contour line. This represents the total number of pixels along the contour line. Represents the pixels in the predicted depth map The depth value, Represents pixels in the true depth map The depth value.

[0066] (2) Variance loss of contour lines According to the definition of contour lines, pixels located on the same contour line should have the same depth value. In this embodiment, the variance of the depth values ​​of pixels located on the same contour line is used as a constraint. This loss term requires that the fluctuation of the depth values ​​of pixels located on the same contour line be as small as possible. The loss function is defined as follows:

[0067]

[0068] in, For the variance loss of contour lines, This represents the number of contour lines in a depth map. To be located in the predicted depth map at the th The number of pixels in the area corresponding to each contour line. To be located in the predicted depth map at the th The area corresponding to the contour lines is the first The depth value of each pixel. To predict the depth map for the first The depth values ​​of the contour lines; the predicted depth map is the depth map output by the deep learning model during training.

[0069] (3) Isobath sequence loss According to the definition of isobaths, there should be a fixed depth interval between adjacent isobaths. Based on the above method of drawing isobaths, since the depth value is... and The space between them is evenly divided into There are several intervals, therefore the numbering differs by 1 / 2. The ideal depth interval for the contour lines should be... Therefore, the loss function for contour lines is defined as follows:

[0070]

[0071] in, For contour line sequence loss, This represents the number of contour lines in a depth map. and In the predicted depth map, respectively Article and Section Depth values ​​of the contour lines, To participate in the The sequence loss calculation of the contour lines and the contour lines of the first contour line. The difference in the numbering of the contour lines, To participate in the The number of contour lines calculated using the sequence loss of contour lines. , The ideal interval between two adjacent isobaths. , and These are the maximum and minimum depth values ​​in the true depth map, respectively; the predicted depth map is the depth map output by the deep learning model during training.

[0072] For example, in this embodiment of the application, K is 4.

[0073] In step 103, the loss function based on scene structure constraints is set for the last layer of the deep learning model selected, and the model is trained to form a monocular vision depth estimation model based on scene structure constraints. This loss function does not conflict with traditional monocular vision depth estimation loss functions, such as Mean Absolute Error Loss (MAE), Root Mean Squared Error Loss (RMSE), and Scale-Invariant Logarithmic Loss (SiLog), and other types of loss functions can be considered simultaneously when constructing a monocular vision depth estimation model.

[0074] In another exemplary embodiment, in step 103 above, RGB images from the training set are input into the deep learning model. A model optimization solver, such as Adaptive Moment Estimation (Adam), Adaptive Moment Estimation with Weight Decay (AdamW), Stochastic Gradient Descent (SGD), or Stochastic Gradient Descent with Momentum (SGDM), is used to iteratively adjust the parameters of the deep learning model by minimizing the loss function. After the training process converges, the optimal monocular vision depth estimation model based on scene structure constraints can be obtained and can be used for depth estimation inference on other images.

[0075] Compared to existing depth estimation methods, the method provided in this application has the following advantages:

[0076] Existing monocular image depth estimation models are usually built based on deep learning methods. They often suffer from varying degrees of depth drift in their depth estimation results. This manifests as different depth values ​​predicted by the model for pixels located on the same depth plane, causing the estimation results to contradict the scene structure and making it difficult to apply directly to visual measurement systems.

[0077] The monocular vision depth estimation method proposed in this application integrates prior information about scene structure into the deep learning model training process by selecting a deep learning model, drawing contour lines, constructing a loss function based on scene structure constraints, and iteratively optimizing parameters. This suppresses the drift problem of depth estimation results and improves the accuracy of monocular depth estimation results.

[0078] Based on the same inventive concept, this application also provides a monocular visual depth estimation device for implementing the monocular visual depth estimation method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the monocular visual depth estimation device provided below can be found in the limitations of the monocular visual depth estimation method described above, and will not be repeated here.

[0079] In another exemplary embodiment, a monocular vision depth estimation device is provided, comprising:

[0080] The training set construction module is used to acquire multiple RGB images from a monocular camera and the corresponding true depth map for each RGB image to construct the training set.

[0081] The loss function construction module is used to construct a loss function based on scene structure constraints; the loss function includes contour line structure loss, contour line variance loss, and contour line sequence loss.

[0082] The model training module is used to train a deep learning model using the training set and the loss function, and obtain the trained deep learning model as a monocular vision depth estimation model.

[0083] The monocular vision depth estimation module is used to perform monocular vision depth estimation using the monocular vision depth estimation model.

[0084] In another exemplary embodiment, such as Figure 4 As shown, the above-mentioned monocular vision depth estimation device includes a data acquisition device and a computing platform.

[0085] Based on the characteristics of the acquisition environment, a suitable monocular camera is selected as the data acquisition device, and a computing platform with sufficient computing power is chosen (such as NVIDIA Jetson, an industrial computer, desktop computer / laptop, or other embedded AI devices). Necessary software dependencies are installed on the computing platform, including the monocular camera driver, OpenCV library (Open Source Computer Vision Library), the inference engine required for the deep learning model, and the relevant runtime environment, ensuring that the system can stably perform image acquisition and deep learning model training / inference. The aforementioned data acquisition device and computing platform can constitute an integrated monocular vision depth estimation device, which specifically includes: a processor, a memory, a communication interface, and a monocular camera electrically connected to the processor. The memory stores executable code, which, when executed by the processor, enables the processor to perform the steps described in this application, including image acquisition, data preprocessing, model training / inference, and depth result output. The communication interface is used for data transmission and control command interaction with external devices or a host computer to achieve real-time transmission of depth estimation results and system control.

[0086] The above embodiments construct a data acquisition device and a computing platform. The data acquisition device is used to acquire the original image (RGB) of the monocular camera and its corresponding depth map. A monocular vision depth estimation model based on deep learning is selected according to the task application environment. The corresponding contour map is generated according to the real depth map. A loss function based on scene structure constraints is constructed. The selected model is trained using the constructed loss function and the contour map.

[0087] A trained monocular vision depth estimation model is deployed on a computing platform. This model is then used to perform monocular depth inference prediction on subsequently acquired images, obtaining scene depth information corresponding to the RGB image content. Specifically, the trained and validated monocular vision depth estimation model is exported to an inference format supported by the computing platform (such as Open Neural Network Exchange (ONNX), NVIDIA TensorRT, or Open Visual Inference & Neural Network Optimization (OpenVINO)). The model is then optimized and quantized based on the computing platform's resources to improve inference efficiency. A real-time image acquisition and processing pipeline is built on the computing platform. Images acquired by the camera are input into the model for depth estimation, and the corresponding depth map results are output. Necessary post-processing (such as filtering or visualization) is performed on the depth map, and interface integration with upper-layer application systems is completed to ensure the model can run stably and efficiently in real-world scenarios.

[0088] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a monocular vision depth estimation method.

[0089] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0090] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0091] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0092] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0093] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0094] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0095] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0096] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0097] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A monocular visual depth estimation method, characterized in that, include: Acquire multiple RGB images from a monocular camera and the corresponding ground truth depth map for each RGB image to construct a training set; Construct a loss function based on scene structure constraints; the loss function includes contour line structure loss, contour line variance loss, and contour line sequence loss; The training set and the loss function are used to train a deep learning model, and the trained deep learning model is used as a monocular vision depth estimation model. Monocular visual depth estimation is performed using the aforementioned monocular visual depth estimation model; The contour line structure loss is: ; in, This is due to the loss of contour lines. This represents the number of contour lines in a depth map. and The numbers in the predicted depth map and the true depth map are respectively the first two. The depth values ​​of the contour lines; the predicted depth map is the depth map output by the deep learning model during training; The variance loss of the contour lines is: ; in, For the variance loss of contour lines, This represents the number of contour lines in a depth map. To be located in the predicted depth map at the th The number of pixels in the area corresponding to each contour line. To be located in the predicted depth map at the th The area corresponding to the contour lines is the first The depth value of each pixel. To predict the depth map for the first The depth values ​​of the contour lines; the predicted depth map is the depth map output by the deep learning model during training; The loss of the contour line sequence is: ; in, For contour line sequence loss, This represents the number of contour lines in a depth map. and In the predicted depth map, the first... Article and Section Depth values ​​of the contour lines, To participate in the The sequence loss calculation of the contour lines and the contour lines of the first contour line. The difference in the numbering of the contour lines, To participate in the The number of contour lines calculated using the sequence loss of contour lines. , The ideal interval between two adjacent isobaths. , and These are the maximum and minimum depth values ​​in the true depth map, respectively; the predicted depth map is the depth map output by the deep learning model during training.

2. The monocular vision depth estimation method according to claim 1, characterized in that, Obtain multiple RGB images from a monocular camera and the corresponding ground truth depth map for each RGB image to construct a training set, specifically including: Acquire multiple RGB images from a monocular camera and the corresponding true depth map for each RGB image; Contour mapping is performed on each of the stated true depth maps to obtain a contour representation of each true depth map; the contour representation is as follows: An array, wherein each element in the array represents the contour line number to which the pixel at the corresponding position belongs; the depth value of the contour line is the average depth value of all pixels within the interval corresponding to the contour line; wherein... and These are the height and width of the actual depth map, respectively; The training set is constructed by taking RGB images as input and using the contour lines of the corresponding real depth maps as labels.

3. The monocular vision depth estimation method according to claim 1, characterized in that, Monocular visual depth estimation is performed using the aforementioned monocular visual depth estimation model, and then the process further includes: Post-processing is performed on the target depth map; the target depth map is the depth map output by the monocular vision depth estimation model during the monocular vision depth estimation process, and the post-processing includes filtering and / or visualization processing.

4. A monocular visual depth estimation device, characterized in that, The monocular vision depth estimation device applies the monocular vision depth estimation method according to any one of claims 1-3, and the monocular vision depth estimation device comprises: The training set construction module is used to acquire multiple RGB images from a monocular camera and the corresponding ground truth depth map for each RGB image to construct the training set. The loss function construction module is used to construct a loss function based on scene structure constraints; the loss function includes contour line structure loss, contour line variance loss, and contour line sequence loss. The model training module is used to train a deep learning model using the training set and the loss function, and obtain the trained deep learning model as a monocular vision depth estimation model. The monocular vision depth estimation module is used to perform monocular vision depth estimation using the monocular vision depth estimation model.

5. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the monocular visual depth estimation method according to any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the monocular visual depth estimation method according to any one of claims 1-3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the monocular visual depth estimation method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Monocular image depth estimation method and device

    CN110610486A

  • Self-supervised monocular depth estimation method based on collaborative alignment

    CN121053182A