Monocular vision depth estimation system, method, computer device and computer readable storage medium
By combining the spatial attention mechanism and overlapping domain loss constraints, the problem of depth map boundary blur in monocular visual depth estimation is solved. The generated depth map more accurately matches the object boundary, improving the accuracy of depth estimation and the network convergence speed.
Patent Information
- Application Number
- CN202111516581.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-13
AI Technical Summary
Depth maps generated by existing monocular visual depth estimation methods have boundary blurring or expansion problems, making it difficult to accurately match the boundary structure of real objects and depth changes in gaps.
A depth estimation system based on the spatial attention mechanism and overlapping domain loss constraints is used. The spatial attention channel is combined with the residual network to generate a disparity map and perform post-processing to obtain the depth map. Different receptive field convolution kernels and bilinear Interpolation method to improve estimation accuracy.
The generated depth map better matches the object boundary structure, reduces boundary blur, improves the accuracy of depth estimation at image gradients, and accelerates the convergence of the depth estimation network.
Smart Images

Figure CN114820745B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of image data processing and photogrammetry, and in particular to a monocular vision depth estimation system, method, computer equipment and computer-readable storage medium. Background Art
[0002] Recently, there have been many studies on monocular depth estimation based on unsupervised or semi-supervised learning. In the training process, related images are introduced and the depth model is used to learn the depth or disparity map through the idea of synthesis. The depth map can be obtained by inputting the monocular image during the test. These methods mainly establish reconstruction losses between the synthetic image and the target image, which is also called semi-supervised deep learning for monocular depth estimation. The image in the motion sequence is regarded as a synthesis of the reference image, motion matrix and depth map, and an end-to-end deep learning network is proposed to jointly learn the depth map and camera pose estimation. In addition, many studies use time-calibrated left and right side view images to train the depth estimation network. These deep models learn the disparity or depth map in the residual network to reconstruct the image of the one-side view from the other side view.
[0003] In order to fully utilize the correlation between left and right image pairs to build a depth estimation model, the deep model uses two synthesis channels to work together during training and share weights. One channel reconstructs the right view image based on the input left view image and the learned disparity map, and the other channel reconstructs in the opposite direction.
[0004] The basic idea of the attention mechanism in computer vision is to let the deep learning network ignore irrelevant information and focus on key information during training. SENet has achieved good scores in the competition. The core of its attention mechanism is to model the interdependence coefficients between feature channels. SENet uses global information to selectively enhance useful feature channels and suppress useless feature channels, thereby achieving adaptive calibration of feature channels. Convolutional Block Attention Module (CBAM) is a simple and effective attention module for feedforward convolutional neural networks. Given an intermediate feature map, CBAM infers the attention confidence map along two independent dimensions, channel and space, and then multiplies the attention confidence map with the input feature map to achieve adaptive adjustment of features in the spatial domain. In addition, there are many studies that combine convolutional residual layers and attention mechanisms to handle complex visual tasks.
[0005] Existing methods train a multi-layer residual network and generate a disparity map by minimizing the reconstruction loss between the left and right view images. Although most of them improve the disparity map smoothness constraint in the loss value, allowing the disparity map to have depth discontinuities at the image gradient, the depth maps generated by these methods still have the problem of blurred or dilated boundaries. Summary of the invention
[0006] Purpose of the invention: To provide a monocular vision depth estimation system, method, computer device and computer-readable storage medium based on spatial attention mechanism and overlapping domain loss constraint, so as to solve the problem of blurred or expanded boundaries of depth maps generated by existing monocular vision depth estimation methods.
[0007] Technical solution: A monocular visual depth estimation system, including: a deep model building module, used to build a deep network model for bidirectional reconstruction of left and right view images, the deep network model includes a spatial attention channel, and generates a disparity map through the confidence value of the spatial attention and the basic product operation result output by the intermediate layer of the residual network; a training module, used to train the deep network model, by inputting multiple batches of bilateral image pairs, to calculate the overlap domain constraint loss value C after bidirectional reconstruction s , and dynamically adjust the network parameters of the deep network model through the back propagation of the deep network model until the optimal deep network model parameters are obtained; the overlapping domain is the part that can be covered by the camera perspective in the bilateral perspective pictures, and the overlapping domain loss constraint weight is obtained by obtaining the left perspective Reconstruct the left view based on the right view The pixel-level appearance loss value The left-right consistency loss value of the right disparity map converted to the left disparity map Revise and constrain the weights by obtaining the overlapping domain loss of the right view Reconstruct the right view based on the left view The pixel-level appearance loss value The left-right consistency loss value of the disparity map on the left is converted to the right-side disparity map where i and j are the horizontal and vertical coordinates of the image pixel location, l is the variable identifier on the left, r is the variable identifier on the right, ap is the pixel-level appearance loss variable identifier, and the loss value considering the smoothness constraint of the left perspective disparity map The loss value of the smoothness constraint of the right perspective disparity map To calculate C s , The testing module is used to test based on the optimal deep network model. By inputting a monocular image, the basic product of the unidirectional convolution residual and the spatial attention confidence map is calculated as the disparity map; the post-processing module is used for disparity map post-processing and depth distance mapping to obtain the depth map.
[0008] Furthermore, when the deep model building module generates a disparity map through the basic product operation result of the spatial attention confidence map and the output of the intermediate layer of the residual network, three convolution kernels with different receptive fields are used as convolution layers to connect the convolution layers in the spatial attention channel. The sizes of the three convolution kernels with different receptive fields are 1*1, 3*3 and 5*5 respectively; the feature fusion of the convolution layer with a convolution kernel size of 1*1 and the nonlinear function normalization processing are performed to obtain the spatial attention confidence map of the original input image.
[0009] Furthermore, in the training module, the obtained They are:
[0010]
[0011]
[0012] Set to the coefficient of the non-overlapping domain part in the single-side view occupying the image width, W represents the input image width, and R is the width reference value;
[0013] The revised values are:
[0014]
[0015]
[0016] The image reconstruction loss is calculated using a combination of l1 norm and scale structure similarity metric, SSIM is the scale structure similarity, α is the metric coefficient, and N is the number of pixels;
[0017] The revised values are:
[0018]
[0019]
[0020] is the disparity map generated by the left view, It is the result of projecting the disparity map generated by the right view onto the left side. It is the result of projecting the disparity map generated by the left view onto the right view;
[0021] The calculation method of is consistent with the monocular vision depth estimation method based on left-right consistency.
[0022] Furthermore, in the testing module, the deep network model uses bilinear interpolation based on the single-side view image and the generated disparity map to reconstruct the other-side view image.
[0023] The present invention also provides a monocular vision depth estimation method, comprising the following steps:
[0024] (1) Establishing a deep network model for bidirectional reconstruction of left and right view images, the deep network model includes a spatial attention channel, and generates a disparity map through the confidence value of the spatial attention and the basic product operation result output by the intermediate layer of the residual network;
[0025] (2) Train the deep network model, input multiple batches of bilateral image pairs, calculate the overlap domain constraint loss value after bidirectional reconstruction, and dynamically adjust the network parameters of the deep network model through back propagation of the deep network model until the optimal deep network model parameters are obtained; the overlap domain is the part of the bilateral view image that can be covered by the camera view, and the overlap domain loss constraint weight of the left view is obtained. And reconstruct the left view based on the right view The pixel-level appearance loss value The left-right consistency loss value of the right disparity map converted to the left disparity map Revise to obtain the overlapping domain loss constraint weight of the right perspective And reconstruct the right view based on the left view The pixel-level appearance loss value The left-right consistency loss value of the disparity map on the left is converted to the right-side disparity map where i and j are the horizontal and vertical coordinates of the image pixel location, l is the variable identifier on the left, r is the variable identifier on the right, ap is the pixel-level appearance loss variable identifier, and the loss value considering the smoothness constraint of the left perspective disparity map The loss value of the smoothness constraint of the right perspective disparity map To calculate C s ,
[0026]
[0027] (3) Testing based on the optimal deep network model, by inputting a monocular image to calculate the basic product of the unidirectional convolution residual and the spatial attention confidence map as the disparity map;
[0028] (4) Post-processing of the disparity map and depth distance mapping to obtain the depth map.
[0029] Furthermore, in step (1), calculate They are:
[0030]
[0031]
[0032] Set to the coefficient of the non-overlapping domain part in the single-side view occupying the image width, W represents the input image width, and R is the width reference value;
[0033] calculate They are:
[0034]
[0035]
[0036] The image reconstruction loss is calculated using a combination of l1 norm and scale structure similarity metric, SSIM is the scale structure similarity, α is the metric coefficient, and N is the number of pixels;
[0037] calculate They are:
[0038]
[0039]
[0040] is the disparity map generated by the left view, It is the result of projecting the disparity map generated by the right view onto the left side. It is the result of projecting the disparity map generated by the left view onto the right view;
[0041] The calculation method of is consistent with the monocular vision depth estimation method based on left-right consistency.
[0042] Furthermore, generating a disparity map through the basic product operation result of the confidence value of the spatial attention and the output of the intermediate layer of the residual network also includes the following steps: using three convolution kernels with different receptive fields as convolution layers in the spatial attention channel to connect the convolution layers, and the sizes of the three convolution kernels with different receptive fields are 1*1, 3*3 and 5*5 respectively; feature fusion and nonlinear function normalization processing of the convolution layer with a convolution kernel size of 1*1 to obtain the spatial attention confidence map.
[0043] Furthermore, in the step of training the deep network model, a bilinear interpolation method is used based on the single-side view image and the generated disparity map to reconstruct the other-side view image.
[0044] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0045] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0046] Beneficial effects: The depth map generated by using the method based on the spatial attention channel can better match the boundary structure of real objects, more clearly show the depth changes at the boundaries and gaps, allow more discontinuities at the image gradient, that is, allow depth differences to exist, and effectively suppress boundary blur to enhance the perspective effect, improve the accuracy of depth estimation in real scenes, and use the spatial attention channel to accelerate the convergence of the depth estimation network; compared with the monocular vision depth estimation method based on left-right consistency, the disparity map originally generated by the residual network can be adjusted to better understand the depth change law at the image gradient. The overlapping domain constraint loss can further improve the depth prediction accuracy by suppressing the reconstruction interference of the non-overlapping domain, so that the improved monocular vision depth estimation method can learn more accurate depth information at the object boundary of the input image. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of the monocular vision depth estimation method of the present invention;
[0048] Figure 2 It is a schematic diagram of the structure of the spatial attention channel;
[0049] Figure 3 This is a comparison chart of the monocular visual depth estimation method without and with the spatial attention channel;
[0050] Figure 4 This is a comparison diagram of the effects of the monocular vision depth estimation method of the present invention and the monocular vision depth estimation method based on left-right consistency. DETAILED DESCRIPTION
[0051] The technical solution provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0052] like Figure 1 As shown, the monocular vision depth estimation system described in the present invention includes: a depth model building module, a training module, a testing module and a post-processing module.
[0053] The deep model building module is used to build a deep network model for bidirectional reconstruction of left and right view images. The deep network model includes a spatial attention channel and a convolutional residual network. The disparity map is generated by the basic product operation result of the confidence value of the spatial attention and the output of the intermediate layer of the residual network.
[0054] In the deep model building module, when the result of calculating the basic product of the spatial attention confidence map and the residual map of the convolutional network is used as the disparity map, three convolution kernels with different receptive fields are used as convolution layers to connect the convolution layers in the spatial attention channel. The sizes of the three convolution kernels with different receptive fields are 1*1, 3*3 and 5*5 respectively; the feature fusion and nonlinear function normalization processing of the convolution layer with a convolution kernel size of 1*1 are performed to obtain the spatial attention confidence map of the original input image.
[0055] This training module is used to train the deep network model by inputting multiple batches of bilateral image pairs to calculate the overlap domain constraint loss value C after bidirectional reconstruction. s , and dynamically adjust the network parameters of the deep network model through back propagation of the deep network model until the optimal deep network model is obtained.
[0056] In this training module, the overlapping domain is the part of the bilateral view images that can be covered by the camera view. The training module obtains the overlapping domain loss constraint weight of the left view. To reconstruct the left view based on the right view The loss value The loss value of converting the disparity map on the right to the disparity map on the left The training module constrains the weights by obtaining the overlapping domain loss of the right view To reconstruct the right view based on the left view The loss value The loss value of converting the left disparity map to the right disparity map The training module is revised to take into account the loss value of the smoothness constraint of the left view disparity map And the loss value considering the smoothness constraint of the right perspective disparity map To calculate C s ,
[0057]
[0058] Among them, C ap is the pixel-level appearance loss value of the overlap domain constraint, including reconstructing the left view based on the right view The pixel-level appearance loss value Reconstruct the right view based on the left view The pixel-level appearance loss value C lr It is the left-right consistency loss value of the overlapping domain constraint, including the left-right consistency loss value of the right disparity map converted to the left disparity map The left-right consistency loss value of the disparity map on the left is converted to the right-side disparity map C dsis the parallax smoothing constraint loss value, which is the loss value of the smoothing constraint of the left perspective parallax map The loss value of the smoothness constraint of the right perspective disparity map
[0059] In the above, l is the variable identifier on the left, r is the variable identifier on the right; ap is the abbreviation of apperance, ap is the pixel-level appearance variable identifier, C ap Represents the pixel-level appearance loss value, lr refers to the left-right disparity loss error, represents the left-right consistency loss value, ds refers to disparity smothness loss, C ds Represents the smoothness constraint loss value;
[0060] Obtained overlapping domain loss constraint weight for the left view for:
[0061]
[0062] Obtained overlap domain loss constraint weight for the right view for:
[0063]
[0064] in, is the coefficient of the non-overlapping domain in the single-side view occupying the image width, W represents the input image width, and R is the width reference value; where i and j are the horizontal and vertical coordinate values of the image pixel location respectively;
[0065] The weights are constrained according to the overlap loss from the left view. Overlap domain loss constraint weights from the right view Obtained The revised values are:
[0066]
[0067]
[0068] in, The image reconstruction loss is calculated using a combination of l1 norm and scale structure similarity metric, SSIM is the scale structure similarity, α is the metric coefficient, and N is the number of pixels;
[0069] The weights are constrained according to the overlap loss from the left view. Overlap domain loss constraint weights from the right view Obtained The revised values are:
[0070]
[0071]
[0072] in, is the disparity map generated by the left view, It is the result of projecting the disparity map generated by the right view onto the left side. It is the result of projecting the disparity map generated by the left view onto the right view;
[0073] In this embodiment, The calculation method of is consistent with that in the monocular vision depth estimation method based on left-right consistency.
[0074] The testing module is used to perform testing based on the obtained optimal deep network model, by inputting a monocular image to calculate the basic product of a unidirectional convolution residual and a spatial attention confidence map as a disparity map.
[0075] The post-processing module is used for disparity map post-processing and depth distance mapping to obtain a depth map. In this embodiment, bilinear interpolation is used to perform disparity map post-processing and depth distance mapping to achieve the purpose of obtaining a depth map.
[0076] The monocular vision depth estimation system based on spatial attention mechanism and overlapping domain loss constraint provided by the present invention improves the unsupervised monocular vision estimation method based on left-right consistency from two aspects of residual network structure and loss function. The monocular vision depth estimation system of the present invention can learn more accurate depth information at the object boundary of the input image.
[0077] The following combination Figure 1 The present invention provides a monocular visual depth estimation method, specifically a monocular visual depth estimation method based on a spatial attention mechanism and an overlapping domain loss constraint, the method comprising the following steps:
[0078] (1) Establishing a deep network model for bidirectional reconstruction of left and right view images, the deep network model includes a spatial attention channel and a convolutional residual network, and generating a disparity map through the basic product operation result of the confidence value of the spatial attention and the output of the intermediate layer of the residual network;
[0079] In this step (1), the step of generating a disparity map by using the confidence value of the spatial attention and the basic product operation result output by the intermediate layer of the residual network also includes: using three different receptive field convolution kernels as convolution layers in the spatial attention channel to connect the convolution layers, and the sizes of the three different receptive field convolution kernels are 1*1, 3*3 and 5*5 respectively; feature fusion and nonlinear function normalization processing of the convolution layer with a convolution kernel size of 1*1 to obtain the spatial attention confidence map.
[0080] (2) Train the deep network model, input multiple batches of bilateral image pairs, calculate the overlap domain constraint loss value after bidirectional reconstruction, and dynamically adjust the network parameters of the deep network model through back propagation of the deep network model until the optimal deep network model parameters are obtained; the overlap domain is the part of the bilateral view image that can be covered by the camera view, and the overlap domain loss constraint weight of the left view is obtained. And reconstruct the left view based on the right view The loss value The loss value of converting the disparity map on the right to the disparity map on the left Revise to obtain the overlapping domain loss constraint weight of the right perspective And reconstruct the right view based on the left view The loss value The loss value of converting the left disparity map to the right disparity map Revised and loss value considering the smoothness constraint of the left view disparity map The loss value of the smoothness constraint of the right perspective disparity map To calculate C s ,
[0081]
[0082] In this step (2), according to the imaging mechanism, the image content in the central area of the cameras of the left and right viewing angles is repeated, but the boundary area is unique to each camera. For example, the left boundary area of the left camera cannot be reconstructed from the image of the right camera, and vice versa. In order to reduce the interference of the viewing angle boundary area on the reconstruction loss, the present invention uses the overlapping domain loss constraint weight to adjust the pixel-level loss value, calculates the relative distance between the pixel point and the boundary of the overlapping and non-overlapping areas, and then obtains the weight of the overlapping domain loss constraint after nonlinear transformation to calculate. They are:
[0083]
[0084]
[0085] Set to the coefficient of the non-overlapping domain part in the single-side view occupying the image width, W represents the input image width, and R is the width reference value;
[0086] calculate They are:
[0087]
[0088]
[0089] The image reconstruction loss is calculated using a combination of l1 norm and scale structure similarity metrics, α is the metric coefficient, and N is the number of pixels;
[0090] calculate They are:
[0091]
[0092]
[0093] is the disparity map generated by the left view, It is the result of projecting the disparity map generated by the right view onto the left side. It is the result of projecting the disparity map generated by the left view onto the right view;
[0094] In this embodiment, The calculation method of is consistent with that in the monocular vision depth estimation method based on left-right consistency.
[0095] In this step (2), the other side view image can be reconstructed by using a bilinear interpolation method based on the single side view image and the generated disparity map.
[0096] (3) Test based on the optimal deep network model, input a monocular image, calculate the basic product of the unidirectional convolution residual and the spatial attention confidence map and use it as the disparity map;
[0097] (4) Post-processing of the disparity map and depth distance mapping to obtain the depth map.
[0098] In this step (4), the disparity map post-processing and depth distance mapping are processed using bilinear interpolation to obtain a depth map.
[0099] Regarding the spatial attention channel of the deep network model, depth value discontinuities usually occur at the image gradient. Some scholars allow depth discontinuities at the image gradient by improving the smoothness constraint term of the loss function. In order to better understand the depth changes at the image gradient, the present invention uses the spatial attention channel containing the Inception layer to adaptively adjust the disparity map generated by the convolutional residual network.
[0100] Instead of directly applying the spatial attention channel to each residual block layer, the present invention proposes a global spatial attention channel to directly learn the correlation between the depth map and the input monocular image. The data flow of the spatial attention channel is as follows: Figure 2 shown.
[0101] Different from directly taking the convolution layer residual as the disparity map, the present invention calculates the dot product result of the confidence map of the spatial attention and the residual map of the convolution network as the final disparity map. In the present invention, the convolution residual network structure is consistent with the monocular vision estimation method based on left-right consistency, both of which are based on the VGG network structure, and the attention channels of the two directions of perspective reconstruction share weights.
[0102] In a specific embodiment of the present invention, a KITTI dataset is used. The KITTI dataset sets a color camera on each side of the car to capture a color image sequence, and matches the image sequences of the two sides of the perspective for temporal consistency. In the embodiment, 697 test pictures divided by eigen are used to evaluate the effect of this method, and the difference between the generated depth map and the radar point cloud data is calculated to measure the effect. This embodiment runs on a computer with a 16GB NVIDIA Tesla GPU and uses the tensorflow deep learning framework. The scales of the input monocular image and the output disparity map are both 512*216 pixels. The deep network contains about 31.6 million trainable parameters, and the training process is iterated a total of 120,000 times. The number of training samples input for each iteration is 4, and it takes about 16 hours to complete the training.
[0103] In the training network structure of this embodiment, the spatial attention channel and the dot multiplication operation of the residual and the spatial attention map are the work content of the spatial attention mechanism improvement of the present invention. Where k is the size of the convolution kernel, s is the convolution step size, and the scale corresponding value is the scaling multiple of the feature layer after the operation with reference to the input feature size. In the test phase, only the first layer feature of the residual layer Disp1 generated by the left-view image needs to be multiplied by its global spatial attention map SpL_Map to obtain the disparity map.
[0104] like Figure 3 As shown, Figure 3 This is a comparison chart of the monocular visual depth estimation method without and with the spatial attention channel; Figure 3The detailed differences in the predicted depth map can be seen in . In the first rectangle 1, compared with the depth map screenshot 31 generated by the method without the spatial attention channel, the depth map screenshot 32 generated by the method using the spatial attention channel can better match the boundary structure of the car in reality. In the second rectangle 2 and the third rectangle 3, the depth map screenshot 32 generated by the method using the spatial attention channel more clearly shows the depth changes at the boundaries and gaps of leaves and bicycle wheels. The depth map screenshot 32 generated by the spatial attention channel allows more discontinuities in the image gradient and enhances the perspective effect, improving the accuracy of depth estimation in real scenes. In addition, the use of the spatial attention channel will accelerate the convergence of the depth estimation network. In this implementation, the batch size is set to 4 and the number of iterations is set to 120,000 times, while the batch size is set to 8 and the iteration is set to 180,000 times for the depth estimation method based on left-right consistency. After the iteration is completed, the loss values of the two are at the same level.
[0105] In the embodiment of the present invention, the effectiveness of the overlap domain constraint loss is evaluated. Different overlap domain boundary coefficients are tested in the implementation. The impact on test results, The values are set to 0.04, 0.1 and 0.2 respectively. The loss value of the overlap domain constraint is calculated according to the above formulas (2) and (3). The results show that The best performance was obtained with a setting of 0.1. Overlap regularization loss can improve performance by %2 to %4 under ideal conditions.
[0106] The comparison effect of the embodiment of the present invention and the depth estimation method based on left-right consistency in the test example is shown in FIG4 , where 4 represents a color image, and 5 represents the color image obtained by the existing method and the color image in 4 Figure 1 A corresponding effect diagram, 6 shows the color obtained by using this embodiment and 4 Figure 1 A corresponding effect diagram: In the first rectangular area 1, the present invention achieves better results than the method based on left-right consistency. Figure 4 In the left scene, when the color gradient appears on the same plane, the depth prediction result is relatively smooth. Figure 4 In the middle scene and the right scene of FIG. 1 , this embodiment allows the depth difference at the image gradient to exist and effectively suppresses boundary blur, such as the boundary area of the car and the perspective area behind the leaves.
[0107] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0108] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0109] By using the depth map generated by the method based on the spatial attention channel, it is possible to better match the boundary structure of real objects, more clearly show the depth changes at the boundaries and gaps, allow more discontinuities at the image gradient, that is, allow depth differences to exist, and effectively suppress boundary blur to enhance the perspective effect, improve the accuracy of depth estimation in real scenes, and use the spatial attention channel to accelerate the convergence of the depth estimation network; compared with the monocular vision depth estimation method based on left-right consistency, the present invention can adjust the disparity map originally generated by the residual network, better understand the depth change law at the image gradient, and the overlapping domain constraint loss can further improve the depth prediction accuracy by suppressing the reconstruction interference of the non-overlapping domain.
Claims
1. A monocular vision depth estimation system, It is characterized in that include: A deep model building module is used to build a deep network model for bidirectional reconstruction of left and right view images. The deep network model includes a spatial attention channel and a convolutional residual network. The disparity map is generated by the basic product operation result of the confidence value of the spatial attention and the output of the intermediate layer of the convolutional residual network. The training module is used to train the deep network model by inputting multiple batches of bilateral image pairs to calculate the overlap domain constraint loss value C after bidirectional reconstruction. s , and dynamically adjust the network parameters of the deep network model through the back propagation of the deep network model until the optimal deep network model parameters are obtained; the overlapping domain is the part that can be covered by the camera perspective in the bilateral perspective pictures, and the overlapping domain loss constraint weight is obtained by obtaining the left perspective Reconstruct the left view based on the right view The pixel-level appearance loss value The left-right consistency loss value of the right disparity map converted to the left disparity map Revise and constrain the weights by obtaining the overlapping domain loss of the right view To reconstruct the right view based on the left view The pixel-level appearance loss value The left-right consistency loss value of the disparity map on the left is converted to the right-side disparity map where i and j are the horizontal and vertical coordinates of the image pixel location, l is the variable identifier on the left, r is the variable identifier on the right, ap is the pixel-level appearance loss variable identifier, and the loss value considering the smoothness constraint of the left perspective disparity map The loss value of the smoothness constraint of the right perspective disparity map To calculate C s , Obtained They are: Set to the coefficient of the non-overlapping domain part in the single-side view occupying the image width, W represents the input image width, and R is the width reference value; The revised values are: The image reconstruction loss is calculated using a combination of l1 norm and scale structure similarity metric, SSIM is the scale structure similarity, α is the metric coefficient, and N is the number of pixels; The revised values are: is the disparity map generated by the left view, It is the result of projecting the disparity map generated by the right view onto the left side. It is the result of projecting the disparity map generated by the left view onto the right view; The calculation method of is consistent with the monocular vision depth estimation method based on left-right consistency; The testing module is used to test based on the optimal deep network model. By inputting a monocular image, the basic product of the unidirectional convolution residual and the confidence value of the spatial attention is calculated as a disparity map; The post-processing module is used for disparity map post-processing and depth distance mapping to obtain a depth map.
2. The monocular vision depth estimation system according to claim 1, It is characterized in that In the deep model building module, the result of the basic product of the spatial attention confidence map and the residual map of the convolutional network is calculated as the disparity map; wherein, in the spatial attention channel, three convolution kernels with different receptive fields are used as convolution layers to connect the convolution layers, and the sizes of the three convolution kernels with different receptive fields are 1*1, 3*3 and 5*5 respectively; the confidence value of the spatial attention of the original input image is obtained by the feature fusion of the convolution layer with a convolution kernel size of 1*1 and the normalization processing of the nonlinear function.
3. The monocular vision depth estimation system according to claim 1, It is characterized in that In the training module, the deep network model uses bilinear interpolation based on the single-side view image and the generated disparity map to reconstruct the other side view image.
4. A monocular vision depth estimation method, It is characterized in that The following steps are involved: (1) Establishing a deep network model for bidirectional reconstruction of left and right view images, the deep network model includes a spatial attention channel, and generates a disparity map through the basic product operation result of the confidence value of the spatial attention and the output of the residual network intermediate layer of the deep network model; (2) Train the deep network model, input multiple batches of bilateral image pairs, calculate the overlap domain constraint loss value after bidirectional reconstruction, and dynamically adjust the network parameters of the deep network model through back propagation of the deep network model until the optimal deep network model parameters are obtained; the overlap domain is the part of the bilateral view image that can be covered by the camera view, and the overlap domain loss constraint weight of the left view is obtained. And reconstruct the left view based on the right view The pixel-level appearance loss value The left-right consistency loss value of the right disparity map converted to the left disparity map Revise to obtain the overlapping domain loss constraint weight of the right perspective And reconstruct the right view based on the left view The pixel-level appearance loss value The left-right consistency loss value of the disparity map on the left is converted to the right-side disparity map where i and j are the horizontal and vertical coordinates of the image pixel location, l is the variable identifier on the left, r is the variable identifier on the right, ap is the pixel-level appearance loss variable identifier, and the loss value considering the smoothness constraint of the left perspective disparity map The loss value of the smoothness constraint of the right perspective disparity map To calculate C s , calculate They are: Set to the coefficient of the non-overlapping domain part in the single-side view occupying the image width, W represents the input image width, and R is the width reference value; calculate They are: The image reconstruction loss is calculated using a combination of l1 norm and scale structure similarity metric, SSIM is the scale structure similarity, α is the metric coefficient, and N is the number of pixels; calculate They are: is the disparity map generated by the left view, It is the result of projecting the disparity map generated by the right view onto the left side. It is the result of projecting the disparity map generated by the left view onto the right view; The calculation method of is consistent with the monocular vision depth estimation method based on left-right consistency; (3) Test based on the optimal deep network model, input a monocular image, calculate the basic product of the unidirectional convolution residual and the spatial attention confidence map and use it as the disparity map; (4) Post-processing of the disparity map and depth distance mapping to obtain the depth map.
5. The monocular vision depth estimation method according to claim 4, It is characterized in that The disparity map is generated by the basic product operation result of the spatial attention confidence value and the residual network intermediate layer output of the deep network model. The following steps are involved: In the spatial attention channel, three convolutional kernels with different receptive fields are used as convolutional layers to connect the convolutional layers. The sizes of the three convolutional kernels with different receptive fields are 1*1, 3*3, and 5*5 respectively. The feature fusion and nonlinear function normalization of the convolution layer with a convolution kernel size of 1*1 are performed to obtain the spatial attention confidence map of the original input image.
6. The monocular vision depth estimation method according to claim 4, It is characterized in that In the step of training the deep network model, a bilinear interpolation method is used based on a single-side view image and a generated disparity map to reconstruct the other-side view image.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 4 to 6 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 4 to 6 are implemented.
