Unsupervised monocular depth estimation construction method and system
By constructing a self-supervised monocular depth estimation model and utilizing internet image datasets and depth consistency constraints, the generalization problem of unsupervised monocular depth estimation in complex environments is solved, achieving higher depth estimation accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2022-10-13
- Publication Date
- 2026-04-28
AI Technical Summary
Existing unsupervised monocular depth estimation methods lack generalization ability in complex environments and have low depth estimation accuracy.
By collecting multiple images with overlapping perspectives from the Internet, using SFM technology to select stereo image pairs that meet the criteria, and combining a depth estimation module and a loss function, we introduce depth consistency constraints for left and right perspectives and a masking module, perform gradient backpropagation training, and construct a self-supervised monocular depth estimation model.
This improves the model's accuracy in image depth estimation and its robustness in complex and variable environments, and enhances the model's generalization ability.
Smart Images

Figure CN115511940B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision scene perception, and in particular to a method and system for constructing unsupervised monocular depth estimation. Background Technology
[0002] Monocular depth estimation aims to enable computers to extract the distance information from each pixel in a single image to the camera. However, projecting the 3D real world onto a 2D image results in the loss of the original depth information. Recovering depth information from an image is not simple; there are two main methods: active depth acquisition and passive ranging. Active depth acquisition relies on devices (LiDAR, depth cameras, etc.) to capture scene depth information. This device-dependent active approach requires expensive equipment. Passive ranging involves depth estimation from a single image. Because ordinary cameras are portable and inexpensive, this method is more feasible and has broad application prospects.
[0003] Significant progress has been made in monocular depth estimation, which can be categorized into supervised and unsupervised methods based on whether it relies on ground truth depth data. Unsupervised methods can achieve good depth estimation results without ground truth depth data. However, current unsupervised depth estimation methods are limited to single environments due to training set constraints, which prevents them from generalizing to more complex and diverse environments. Complex environments still pose a significant challenge to visual perception, and learning-based methods cannot perfectly generalize to different environments. Summary of the Invention
[0004] This invention provides an unsupervised monocular depth estimation construction method to address the problems of insufficient generalization and low accuracy of existing self-supervised monocular depth estimation.
[0005] This invention provides a method for constructing an unsupervised monocular depth estimation system, comprising the following steps:
[0006] Step S1: Collect multiple images with overlapping perspectives from the Internet to form a training set.
[0007] Step S2: Input the stereo image into the depth estimation module M2 to obtain the estimated depth.
[0008] Step S3: Reconstruct images with different parameters using depth maps of the reference image and the target image.
[0009] Step S4: Construct a mask using the depth consistency constraints of the left and right perspectives.
[0010] Step S5: Perform gradient backpropagation on the depth estimation network based on the loss function to learn the accurate depth.
[0011] As a further improvement of the present invention, step S1 specifically includes:
[0012] Step S10: Collect images with overlapping perspectives from the Internet, and scale and crop the collected images to a set size and resolution.
[0013] Step S11: Estimate the camera intrinsic and extrinsic parameters between the individual images.
[0014] Step S12: Select stereo image pairs that meet the criteria to form a training set.
[0015] As a further improvement of the present invention, in step S11, the camera intrinsic parameters are first obtained using SFM technology. and camera external parameters Then, based on the camera's external parameters Stereo image pairs with overlapping viewpoints are filtered according to the following conditions: the rotation angle between the images is limited to within 3°, and the translation distance of each stereo image pair is limited to within 0.3. The stereo image pairs that meet the conditions are then added to the training set to obtain the filtered stereo images.
[0016] As a further improvement of the present invention, in step S2, the Encode network in the depth estimation module M2 is used to extract image features, and the Decode network in the depth estimation module M2 is used to fuse multi-scale image features. The left and right views are input respectively, and the multi-scale depth features of each image are extracted by the Encode network. The multi-scale image features are fused by the Decode network to output the depth maps of the left and right views.
[0017] As a further improvement of the present invention, in step S3, the target image is synthesized from the obtained depth map and the reference image, and the corresponding points of the two images from different viewpoints have the following relationship:
[0018] (1),
[0019] in, These are the corresponding points in the left and right images, respectively. , is an infinite homography, It is the epipolar point of another image. The true depth of the object in three-dimensional space;
[0020] From equation (1), the synthesized image is reconstructed. :
[0021] (2).
[0022] As a further improvement of the present invention, step S4 specifically includes:
[0023] Step S40: Reconstruct the synthetic depth map from the target's perspective based on the depth map estimated from the reference viewpoint. The mathematical formula is as follows:
[0024] (3),
[0025] in, For the first The camera parameters on the left The matrix, for The third row of the matrix, For the first Camera parameters The fourth row of the pseudo-inverse matrix.
[0026] Step S41: Compare the differences between the synthetic depth map from the target viewpoint and the target depth map from the depth estimation model, filter out pixels with smaller differences, and remove pixels that exceed the projection or the image boundary. Specifically:
[0027] (4),
[0028] in, It is a threshold for measuring whether occlusion exists, D1 is Figure 1 Depth map, It is Figure 2 The depth map is input to the depth consistency module, which estimates the depth map. Figure 1 Depth map from a specific perspective.
[0029] As a further improvement of the present invention, step S5 specifically includes:
[0030] Step S50: Calculate the photometric loss of the target image and the reconstructed target image, using the following formula:
[0031] (5),
[0032] in, As a measure of image structural similarity, To measure the inter-image and The weights between norms, I1 is the image 1, It is Figure 2 Reconstructed Figure 1 Composite image from a different perspective.
[0033] Step S51, calculate the smoothing loss for the target image and the estimated depth map, using the following formula:
[0034] (6),
[0035] in, , Depth map Gradients along the x-axis and y-axis , Depth map Gradients along the x-axis and y-axis;
[0036] Step S52: Calculate the consistency loss of the estimated depth maps under the left and right viewpoints, using the following formula:
[0037] (7),
[0038] in, D 1 is Figure 1 Depth map, It is Figure 2 The input depth consistency module estimates the depth at which the input is consistent. Figure 1 Depth map from a specific perspective;
[0039] Ultimately, the total training loss of the self-supervised algorithm is:
[0040] (8),
[0041] in, For Hadama accumulation.
[0042] This invention also discloses an unsupervised monocular depth estimation construction system, comprising:
[0043] Data processing module M1: Used to collect multiple images with overlapping perspectives from the Internet and combine them into a training set.
[0044] Depth estimation module M2: Used to input stereo image data into the depth estimation module to obtain the estimated depth.
[0045] Image Reconstruction Module M3: Used to reconstruct images with different parameters using depth map pairs of reference and target images.
[0046] Left and right depth consistency module M4: Used to construct a mask by utilizing the depth consistency constraints of the left and right viewpoints.
[0047] Masking module M5: Used for gradient backpropagation of the depth estimation network based on the loss function to learn accurate depth.
[0048] As a further improvement of the present invention, the data processing module M1 further includes:
[0049] Image collection and processing unit: used to collect images with overlapping perspectives from the Internet and to scale and crop the collected images to a set size and resolution.
[0050] Parameter unit: Used to estimate camera intrinsic and extrinsic parameters between individual images.
[0051] Filtering unit: Used to filter stereo image pairs that meet the criteria to form a training set.
[0052] In the depth estimation module M2, the Encode network in the depth estimation module M2 is used to extract image features, and the Decode network in the depth estimation module M2 is used to fuse multi-scale image features. The left and right views are input respectively, and the multi-scale depth features of each image are extracted by the Encode network. The multi-scale image features are fused by the Decode network to output the depth maps of the left and right views.
[0053] In the image reconstruction module M3, the target image is synthesized from the obtained depth map and the reference image. The corresponding points of the two images from different viewpoints have the following relationship:
[0054] (1),
[0055] in, These are the corresponding points in the left and right images, respectively; , is an infinite homology; It is the epipolar point of another image. The true depth of the object in three-dimensional space;
[0056] From equation (1), the synthesized image is reconstructed. :
[0057] (2).
[0058] In the left-right consistent depth module M4, a synthetic depth map of the target view is reconstructed based on the depth map estimated from the reference view. The mathematical formula is as follows:
[0059] (3),
[0060] in, For the first The camera parameters on the left The matrix, for The third row of the matrix, For the first Camera parameters The fourth row of the pseudo-inverse matrix;
[0061] Compare the synthetic depth map from the target's perspective with the target depth map from the depth estimation model, filter out pixels with small differences, and remove pixels that exceed the projection or the image boundary. Specifically:
[0062] (4),
[0063] in, It is a threshold for measuring whether occlusion exists. D 1 is Figure 1 Depth map, It is Figure 2 The input depth consistency module estimates the depth at which the input is consistent. Figure 1 Depth map from a specific perspective;
[0064] The mask module M5 specifically also includes:
[0065] Photometric loss unit: Used to calculate the photometric loss between the target image and the reconstructed target image, its formula is as follows:
[0066] (5),
[0067] in, As a measure of image structural similarity, To measure the inter-image and Weights between norms It is image 1. It is Figure 2 The reconstructed image is a composite image from viewpoint 1;
[0068] Smoothing Loss Unit: Used to calculate the smoothing loss of the target image and the estimated depth map, and its formula is as follows:
[0069] (6),
[0070] in, , Depth map Gradients along the x-axis and y-axis , Depth map Gradients along the x-axis and y-axis;
[0071] Consistency Loss Unit: Used to calculate the consistency loss of the estimated depth map from the left and right viewpoints. The formula is as follows:
[0072] (7),
[0073] Ultimately, the total training loss of the self-supervised algorithm is:
[0074] (8),
[0075] in, For Hadama accumulation.
[0076] As a further improvement of the present invention, in the parameter unit, the camera intrinsic parameters are first obtained using SFM technology. and camera external parameters Then, based on the camera's external parameters Stereo image pairs with overlapping viewpoints are filtered according to the following conditions: the rotation angle between the images is limited to within 3°, and the translation distance of each stereo image pair is limited to within 0.3. The stereo image pairs that meet the conditions are then added to the training set to obtain the filtered stereo images.
[0077] The beneficial effects of this invention are: the monocular depth estimation construction method of this invention can expand the dataset with massive Internet images and strengthen the inherent geometric consistency constraints, thereby effectively improving the accuracy of the model for image depth estimation and its robustness in dealing with complex and changing environments. Attached Figure Description
[0078] Figure 1 This is a flowchart of the monocular depth estimation construction method of the present invention;
[0079] Figure 2 This is a schematic diagram illustrating the composition of the loss function in the monocular depth estimation construction method of the present invention;
[0080] Figure 3 This is a block diagram illustrating the principle of the monocular depth estimation construction system of this invention;
[0081] Figure 4 This is a diagram of the monocular depth estimation training framework of the present invention. Detailed Implementation
[0082] Definitions:
[0083] SFM: an abbreviation for Structure from Motion, is a 3D reconstruction technique that uses multiple images to estimate the 3D structure and simultaneously estimate the camera's intrinsic and extrinsic parameters.
[0084] This invention discloses an unsupervised monocular depth estimation method. The method collects multiple images with overlapping viewpoints from the internet, filters and crops the collected images, and then uses SFM (Stereoscopic Visualization) technology to calibrate the images, obtaining their intrinsic and extrinsic parameters. The obtained images and calibrated intrinsic and extrinsic parameters are used to recombine the image dataset pairwise, selecting stereo image pairs that meet preset conditions. Stereo image pairs formed from left and right viewpoints are added to the training: ResNet18 is used as the Encoder network to extract image features, and a Decoder network is used to fuse multi-scale image features and estimate the depth image. The depth value of the left viewpoint is estimated using the depth value of the right viewpoint. The inherent consistency is enhanced by a left-right consistency loss function. The left and right depth maps are input into a mask module to obtain valid image points. The network is trained and supervised based on photometric loss and smoothing term loss calculated from the reconstructed image to obtain accurate depth values. Compared with existing technologies, this monocular depth estimation method can utilize massive amounts of internet images to expand the dataset and strengthen inherent geometric consistency constraints, thereby effectively improving the model's accuracy in image depth estimation and its robustness in complex and changing environments.
[0085] This invention discloses an unsupervised monocular depth estimation construction method that represents the RGB domain as... H and W represent the image height and width, respectively, and the depth domain is represented as... The present invention aims to learn nonlinear mappings. .
[0086] like Figure 1 As shown, the present invention discloses a method for constructing a monocular depth estimation system based on unsupervised methods, comprising the following steps:
[0087] Step S1: Collect multiple images with overlapping perspectives from the Internet to form a training set.
[0088] Specifically, a series of images with overlapping perspectives are collected from the internet, and the collected images are scaled and cropped to a resolution of 560×720. Camera intrinsic parameters are then obtained using SFM technology. and camera external parameters And based on camera external parameters Stereo image pairs with overlapping viewpoints were selected based on the following criteria: the rotation angle between the images was limited to within 3°, and the translation distance of each stereo image pair was limited to within 0.3. These selected stereo image pairs were added to the training set, resulting in 87,344 stereo image pairs. During training, the image input resolution was scaled to 192×640, and the intrinsic parameter matrix K was divided by the corresponding scaling factor.
[0089] Step S2: Input the stereo image into the depth estimation module to obtain the estimated depth.
[0090] The neural network is divided into two parts: the first part, the Encode layer, is composed of multiple neural networks and is used to extract image features; the second part, the Decode layer, is composed of multiple neural networks and fuses the image information extracted by the Encode layer to output a depth map. Specifically, the Encode network in the depth estimation module extracts image features, and the Decode network in the depth estimation module fuses multi-scale image features. Left and right views are input separately, and the Encode network extracts multi-scale depth features for each image; the Decode network then fuses the multi-scale image features to output the depth maps for the left and right views.
[0091] Step S3: Reconstruct images with different parameters using depth maps of the reference image and the target image;
[0092] Specifically, the target image is synthesized from the obtained depth map and the reference image. The corresponding points of the two images from different viewpoints have the following relationship:
[0093] (1),
[0094] in, These are the corresponding points in the left and right images, respectively; , is an infinite homology; It is the epipolar point of another image. This represents the object's true depth in three-dimensional space.
[0095] From equation (1), the synthesized image is reconstructed. :
[0096] (2).
[0097] Step S4: Construct a mask using the depth consistency constraints of the left and right perspectives;
[0098] Specifically, the synthetic depth map from the target's perspective is reconstructed based on the depth map estimated from the reference perspective. The mathematical formula is as follows:
[0099] (3),
[0100] in, For the first The camera parameters on the left The matrix, for The third row of the matrix, For the first Camera parameters The fourth row of the pseudo-inverse matrix, Representing 1 or 2 indicates the corresponding parameters for the first and second cameras.
[0101] like Figure 4 As shown, the difference between the synthetic depth map from the target's perspective and the target depth map from the depth estimation model is compared. Pixels with smaller differences are selected, while pixels that exceed the projection or image boundaries are removed. The specific form is as follows:
[0102] (4),
[0103] in, It is a threshold for measuring whether occlusion exists, D1 is Figure 1 Depth map, It is Figure 2 The depth map is input to the depth consistency module, which estimates the depth map. Figure 1 Depth map from a specific perspective.
[0104] Step S5: Perform gradient backpropagation on the depth estimation network based on the loss function to learn the accurate depth.
[0105] like Figure 2 As shown, step S5 specifically includes:
[0106] Step S50: Calculate the photometric loss of the target image and the reconstructed target image, using the following formula:
[0107] (5),
[0108] in, As a measure of image structural similarity, To measure the inter-image and Weights between norms It is image 1. It is Figure 2 The reconstructed image is a composite image from viewpoint 1;
[0109] Step S51, calculate the smoothing loss for the target image and the estimated depth map, using the following formula:
[0110] (6),
[0111] in, , Depth map Gradients along the x-axis and y-axis , Depth map Gradients along the x-axis and y-axis;
[0112] Step S52: Calculate the consistency loss of the estimated depth maps under the left and right viewpoints, using the following formula:
[0113] (7),
[0114] Ultimately, the total training loss of the self-supervised algorithm is:
[0115] (8),
[0116] in, For Hadama accumulation.
[0117] The present invention provides an unsupervised monocular depth estimation construction method that improves the generalization of the model by incorporating as much data as possible into the model training. By introducing a mask, the adverse effects of occlusion or exceeding the boundary in the training set can be reduced during the training process, further improving the accuracy of depth estimation. On this basis, a left-right depth consistency loss is further introduced to deeply mine the depth constraints under the left and right viewpoints. Compared with other traditional schemes, this constraint helps to estimate a more reasonable depth, thereby obtaining a more accurate depth map.
[0118] like Figure 3 As shown, this invention also discloses an unsupervised monocular depth estimation construction system, including a data processing module M1, a depth estimation module M2, an image reconstruction module M3, a left-right depth consistency module M4, and a masking module M5, wherein...
[0119] Data processing module M1: Used to collect multiple images with overlapping perspectives from the Internet and combine them into a training set.
[0120] The data processing module M1 also includes:
[0121] Image collection and processing unit: used to collect images with overlapping perspectives from the Internet and to scale and crop the collected images to a set size and resolution.
[0122] Parameter unit: Used to estimate camera intrinsic and extrinsic parameters between individual images.
[0123] In the parameter unit, the camera intrinsic parameters are first obtained using SFM technology. and camera external parameters Then, based on the camera's external parameters Stereo image pairs with overlapping viewpoints were filtered according to the following conditions: the rotation angle between the images was limited to within 3°, and the translation distance of each stereo image pair was limited to within 0.3. The stereo image pairs that met the conditions were then added to the training set, resulting in 87,344 stereo image pairs.
[0124] Filtering unit: Used to filter stereo image pairs that meet the criteria to form a training set.
[0125] Depth estimation module M2: Used to input stereo image data into the depth estimation module to obtain the estimated depth.
[0126] In the depth estimation module M2, the Encode network in the depth estimation module M2 is used to extract image features, and the Decode network in the depth estimation module M2 is used to fuse multi-scale image features. The left and right views are input respectively, and the multi-scale depth features of each image are extracted by the Encode network. The multi-scale image features are fused by the Decode network to output the depth maps of the left and right views.
[0127] Image Reconstruction Module M3: Used to reconstruct images with different parameters using depth map pairs of reference and target images.
[0128] In the image reconstruction module M3, the target image is synthesized from the obtained depth map and the reference image. The corresponding points of the two images from different viewpoints have the following relationship:
[0129] (1),
[0130] in, These are the corresponding points in the left and right images, respectively; , is an infinite homology; It is the epipolar point of another image. The true depth of the object in three-dimensional space;
[0131] From equation (1), the synthesized image is reconstructed. :
[0132] (2).
[0133] Left and right depth consistency module M4: Used to construct a mask by utilizing the depth consistency constraints of the left and right viewpoints.
[0134] In the left-right consistent depth module M4, a synthetic depth map of the target view is reconstructed based on the depth map estimated from the reference view. The mathematical formula is as follows:
[0135] (3),
[0136] in, For the first The camera parameters on the left The matrix, for The third row of the matrix, For the first Camera parameters The fourth row of the pseudo-inverse matrix.
[0137] Compare the synthetic depth map from the target's perspective with the target depth map from the depth estimation model, filter out pixels with small differences, and remove pixels that exceed the projection or the image boundary. Specifically:
[0138] (4),
[0139] in, It is a threshold for measuring whether occlusion exists, D1 is Figure 1 Depth map, It is Figure 2 The depth map is input to the depth consistency module, which estimates the depth map. Figure 1 Depth map from a specific perspective.
[0140] Masking module M5: Used for gradient backpropagation of the depth estimation network based on the loss function to learn accurate depth.
[0141] The mask module M5 specifically also includes:
[0142] Photometric loss unit: Used to calculate the photometric loss between the target image and the reconstructed target image, its formula is as follows:
[0143] (5),
[0144] in, As a measure of image structural similarity, To measure the inter-image and Weights between norms It is image 1. It is Figure 2 The reconstructed image is a composite image from viewpoint 1;
[0145] Smoothing Loss Unit: Used to calculate the smoothing loss of the target image and the estimated depth map, and its formula is as follows:
[0146] (6),
[0147] in, , Depth map Gradients along the x-axis and y-axis , Depth map Gradients along the x-axis and y-axis;
[0148] Consistency Loss Unit: Used to calculate the consistency loss of the estimated depth map from the left and right viewpoints. The formula is as follows:
[0149] (7),
[0150] Ultimately, the total training loss of the self-supervised algorithm is:
[0151] (8),
[0152] in, For Hadama accumulation.
[0153] The beneficial effects of this invention are: the monocular depth estimation construction method of this invention can expand the dataset by utilizing massive Internet images and strengthen the inherent geometric consistency constraints, thereby effectively improving the accuracy of the model for image depth estimation and its robustness in dealing with complex and changing environments.
[0154] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for constructing a monocular depth estimation system based on unsupervised learning, characterized in that, Includes the following steps: Step S1: Collect multiple images with overlapping perspectives from the Internet to form a training set; Step S2: Input the stereo image into the depth estimation module M2 to obtain the estimated depth; Step S3: Reconstruct the image using different parameters using depth maps of the reference image and the target image; Step S4: Construct a mask using the depth consistency constraints of the left and right perspectives; Step S5: Perform gradient backpropagation on the depth estimation network based on the loss function to learn the accurate depth; Step S1 specifically includes: Step S10: Collect images with overlapping perspectives from the Internet, and scale and crop the collected images to a set size and resolution; Step S11: Estimate the camera intrinsic and extrinsic parameters between the images; Step S12: Select stereo image pairs that meet the criteria to form a training set; In step S11, the camera intrinsic parameters are first obtained using SFM technology. and camera external parameters Then, based on the camera's external parameters Stereo image pairs with overlapping viewpoints are filtered according to the following conditions: the rotation angle between the images is limited to within 3°, and the translation distance of each stereo image pair is limited to within 0.
3. The stereo image pairs that meet the conditions are then added to the training set to obtain the filtered stereo images. In step S3, the target image is synthesized from the obtained depth map and the reference image. The corresponding points of the two images from different viewpoints have the following relationship: (1) in, These are the corresponding points in the left and right images, respectively. , is an infinite homography, It is the epipolar point of another image. The true depth of the object in three-dimensional space; From equation (1), the synthesized image is reconstructed. : (2)。 2. The monocular depth estimation construction method according to claim 1, characterized in that, In step S2, image features are extracted using the Encode network in the depth estimation module M2, and multi-scale image features are fused using the Decode network in the depth estimation module M2. The left and right views are input respectively, and multi-scale depth features of each image are extracted using the Encode network. The multi-scale image features are fused using the Decode network to output the depth maps of the left and right views.
3. The monocular depth estimation construction method according to claim 1, characterized in that, Step S4 specifically includes: Step S40: Reconstruct the synthetic depth map from the target's perspective based on the depth map estimated from the reference viewpoint. The mathematical formula is as follows: (3), in, For the first The camera parameters on the left The matrix, for The third row of the matrix, For the first Camera parameters The fourth row of the pseudo-inverse matrix; Step S41: Compare the differences between the synthetic depth map from the target viewpoint and the target depth map from the depth estimation model, filter out pixels with smaller differences, and remove pixels that exceed the projection or the image boundary. Specifically: (4), in, It is a threshold for measuring whether occlusion exists. D Figure 1 shows the depth map. The depth map in Figure 1 is estimated using the input depth consistency module in Figure 2.
4. The monocular depth estimation construction method according to claim 1, characterized in that, Step S5 specifically includes: Step S50: Calculate the photometric loss of the target image and the reconstructed target image, using the following formula: (5), in, As a measure of image structural similarity, To measure the inter-image and Weights between norms I 1 is image 1, It is a composite image from the perspective of image 1, reconstructed using Figure 2; Step S51, calculate the smoothing loss for the target image and the estimated depth map, using the following formula: (6), in, , Depth map Gradients along the x-axis and y-axis , Depth map Gradients along the x-axis and y-axis; Step S52: Calculate the consistency loss of the estimated depth maps under the left and right viewpoints, using the following formula: (7), in, D 1 is the depth map in Figure 1. The depth map in Figure 1 is estimated using the input depth consistency module in Figure 2. Ultimately, the total training loss of the self-supervised algorithm is: (8), in, For Hadama accumulation.
5. A monocular depth estimation construction system based on unsupervised learning, characterized in that, include: Data processing module M1: Used to collect multiple images with overlapping perspectives from the Internet and combine them into a training set; Depth estimation module M2: Used to input the stereo image into the depth estimation module to obtain the estimated depth; Image Reconstruction Module M3: Used to reconstruct images with different parameters using depth map pairs of reference and target images; Left and right depth consistency module M4: Used to construct a mask by utilizing the depth consistency constraints of the left and right viewpoints; Masking module M5: Used for gradient backpropagation of the depth estimation network based on the loss function to learn accurate depth; The data processing module M1 also includes: Image collection and processing unit: used to collect images with overlapping perspectives from the Internet, and to scale and crop the collected images to a set size and resolution; Parameter unit: Used to estimate camera intrinsic and extrinsic parameters between individual images; Filtering unit: Used to filter stereo image pairs that meet the criteria to form the training set; In the parameter unit, the camera intrinsic parameters are first obtained using SFM technology. and camera external parameters Then, based on the camera's external parameters Stereo image pairs with overlapping viewpoints are filtered according to the following conditions: the rotation angle between the images is limited to within 3°, and the translation distance of each stereo image pair is limited to within 0.
3. The stereo image pairs that meet the conditions are then added to the training set to obtain the filtered stereo images. In the image reconstruction module M3, the target image is synthesized from the obtained depth map and the reference image. The corresponding points of the two images from different viewpoints have the following relationship: (1), in, These are the corresponding points in the left and right images, respectively; , is an infinite homology; It is the epipolar point of another image. The true depth of the object in three-dimensional space; From equation (1), the synthesized image is reconstructed. : (2)。 6. The monocular depth estimation construction system according to claim 5, characterized in that, In the depth estimation module M2, the Encode network in the depth estimation module M2 is used to extract image features, and the Decode network in the depth estimation module M2 is used to fuse multi-scale image features. The left and right views are input respectively, and the multi-scale depth features of each image are extracted by the Encode network. The multi-scale image features are fused by the Decode network to output the depth maps of the left and right views. In the left-right consistent depth module M4, a synthetic depth map of the target view is reconstructed based on the depth map estimated from the reference view. The mathematical formula is as follows: (3), in, For the first The camera parameters on the left The matrix, for The third row of the matrix, For the first Camera parameters The fourth row of the pseudo-inverse matrix; Compare the synthetic depth map from the target's perspective with the target depth map from the depth estimation model, filter out pixels with small differences, and remove pixels that exceed the projection or the image boundary. Specifically: (4), in, It is a threshold for measuring whether occlusion exists. D 1 is the depth map in Figure 1. The depth map in Figure 1 is estimated using the input depth consistency module in Figure 2. The mask module M5 specifically also includes: Photometric loss unit: Used to calculate the photometric loss between the target image and the reconstructed target image, its formula is as follows: (5), in, As a measure of image structural similarity, To measure the inter-image and Weights between norms I 1 is image 1, It is a composite image from the perspective of image 1, reconstructed using Figure 2; Smoothing Loss Unit: Used to calculate the smoothing loss of the target image and the estimated depth map, and its formula is as follows: (6), in, , Depth map Gradients along the x-axis and y-axis , Depth map Gradients along the x-axis and y-axis; Consistency Loss Unit: Used to calculate the consistency loss of the estimated depth map from the left and right viewpoints. The formula is as follows: (7), in, D 1 is the depth map in Figure 1. The depth map in Figure 1 is estimated using the input depth consistency module in Figure 2. Ultimately, the total training loss of the self-supervised algorithm is: (8), in, For Hadama accumulation.
Citation Information
Patent Citations
Self-supervision monocular depth estimation method based on self-attention guiding feature fusion
CN115035171A