Lightweight all-time self-supervised monocular depth estimation method based on generative adversarial network
By transforming daytime scenes into nighttime scenes using CoMoGAN and the lightweight MobileViT backbone network, and combining it with the self-supervised MonoViT teacher network, the problem of poor performance of self-supervised monocular depth estimation networks at night during all-day conditions is solved. This achieves low-cost and efficient depth estimation, improving the model's performance and clarity in complex environments.
Patent Information
- Application Number
- CN202411105187.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-08-13
AI Technical Summary
Existing all-day self-supervised monocular depth estimation networks perform poorly in nighttime scenes and require additional collection and labeling of large amounts of nighttime data, resulting in high costs for data preparation and model training, making it difficult to achieve a balance between model complexity and performance.
The CoMoGAN adversarial generative network is used to transform daytime scene images into nighttime scene images. Combined with the lightweight MobileViT backbone network and the self-supervised MonoViT teacher network, the depth estimation of the student network is optimized through low-scale consistency loss and nighttime noise resistance loss, thereby reducing data preparation costs and improving the model's performance in various environments.
No additional nighttime data collection is required, reducing data preparation and model training costs, improving the model's usability in various complex environments, maintaining a balance between model complexity and performance, improving the quality of the output depth map, and reducing blur and artifact issues.
Smart Images

Figure CN118967768B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of self-supervised monocular depth estimation, noise reduction methods in the dark, and deep learning techniques, specifically to a lightweight, all-day self-supervised monocular depth estimation method based on generative adversarial networks. Background Technology
[0002] Self-supervised monocular depth estimation methods do not require training the model with ground truth values during the training process. They rely solely on RGB images for learning and use the similarity loss between the reconstructed image and the original image as a supervision signal. This significantly reduces the cost of depth estimation tasks and achieves performance comparable to supervised learning methods. Based on the input image, they are mainly divided into methods based on stereo image pairs and methods based on monocular image sequences.
[0003] Garg et al. were the first to train deep neural networks using stereo image pairs. They constrained the network to generate correct disparity maps based on image reconstruction, and then calculated depth information using known camera focal length and baseline distance, thus eliminating reliance on true depth labels. Godard et al. found that using only image reconstruction loss results in discontinuous depth values and artifacts. To overcome this problem, they constructed a left-right consistency loss, inputting the left view into the deep neural network while simultaneously predicting the left and right disparity maps. This ensured that the left and right disparity maps generated by the deep neural network were as consistent as possible, enhancing depth continuity and eliminating artifacts to some extent. Ultimately, this yielded results superior to the supervised methods using true depth values at the time.
[0004] Besides stereo image pairs, continuous monocular image sequences can also provide effective supervision signals for depth estimation models. Zhou et al. proposed a depth estimation framework based on monocular video streams, which uses the current frame I as input. t A predicted depth map D is obtained from the deep neural network. t At the same time, by splicing the current frame I t With adjacent frame I s s∈{t+1,t-1}, input to the pose network to obtain a predicted relative pose T t→s With depth information and the relative pose between adjacent frames, the coordinates of pixels in the current frame can be obtained through image sampling, thus yielding the reconstructed image I. s→t Ideally, the reconstructed image should generate consistent photometric information with the original image. Therefore, the photometric consistency loss can be established by utilizing the photometric difference between the two, which can be used to train depth estimation networks and pose networks. Furthermore, in the prediction stage, only the depth network is needed to generate the depth information of the image.
[0005] Following the introduction of the aforementioned methods for depth estimation based on monocular image sequences, they have received widespread attention from numerous scholars both domestically and internationally. Subsequent works have primarily focused on extending and optimizing these methods. Godard et al.'s Monodepth2, building upon this foundation, introduced automatic masking to address the impact of stationary pixel regions relative to the camera and some moving objects on network performance. They also designed a method to minimize reprojection loss to address the potential occlusion of the same object between consecutive frames, and employed full-resolution multi-scale sampling to reduce artifacts. Johnston et al. restricted the depth values estimated by the depth network to a few discrete values, reducing the difficulty of depth estimation and resulting in clearer boundaries in the depth map, leading to better performance metrics. Zhang et al. achieved good results with relatively low depth estimation model complexity by combining CNNs and Transformers. Wang et al. improved the accuracy of monocular depth estimation in nighttime conditions using generative adversarial networks.
[0006] However, many existing all-day self-supervised monocular depth estimation networks require direct training on nighttime image datasets, necessitating the additional collection and annotation of large amounts of nighttime image data, significantly increasing the cost of data preparation and model training. Furthermore, current all-day self-supervised monocular depth estimation networks often struggle to achieve a balance between model complexity and performance, incurring substantial computational overhead. In addition, current lightweight self-supervised monocular depth estimation networks perform well in daytime scenes but poorly in nighttime scenes, exhibiting poor generalization.
[0007] For example, patent 2024105575418 discloses a self-supervised depth estimation method and system for all-day scenes based on cross-domain interaction. The method inputs the all-day image to be estimated into the depth estimation model, processes it using a cross-domain interaction module and a cross-domain coupled projection module, and uses scene loss supervised training to obtain the depth estimation result. This scheme requires training with night scene images corresponding to daytime scenes, which increases the cost of nighttime data preparation.
[0008] For example, patent 2023112780963 discloses a self-supervised monocular depth estimation method and device for all-weather scenarios, which solves the problem of effectively extracting depth features from nighttime images, but it is difficult to achieve a balance between model complexity and performance, and has a large computational overhead.
[0009] For example, patent 2024102303106 discloses a lightweight self-supervised monocular depth estimation method based on graph convolutional networks. It uses dilated convolution to help capture global features, employs a self-attention mechanism to learn long-distance feature dependencies, and uses graph convolutional neural network technology to segment the target object. Although this scheme reduces the number of model parameters required, it performs poorly in other scenarios, such as nighttime scenes, and therefore has poor generalization. Summary of the Invention
[0010] Objective: This invention aims to address the problem of not requiring the additional collection and labeling of large amounts of nighttime data, by providing a lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks (GANs). This invention utilizes low-scale consistency loss to further learn high-resolution features from the teacher network at the low-resolution stage, improving the clarity of the final depth map output by the student network while maintaining a balance between the complexity and performance of the student network model. Furthermore, this invention uses the CoMoGAN GAN to transform daytime scene images into nighttime scene images, eliminating the need for additional datasets, reducing the cost of data preparation and model training, and improving the model's practicality in various complex environments.
[0011] Technical Solution: The present invention provides a lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks, comprising the following steps:
[0012] Step 1: Expand the daytime scene images in the KITTI dataset using a generative adversarial network (GAN) to transform them into corresponding nighttime scene images. The GAN uses a pre-trained CoMoGAN network to represent the angle of sunlight. Set it to π (which corresponds to a solar altitude angle of -5°) to obtain a nighttime style image;
[0013] Step 2: Input the night scene image generated in Step 1 and the original daytime scene image into the student network for joint training to obtain the inverse depth map D of the night scene. night Inverse depth map D of daytime scene day The student network is based on the lightweight MobileViT backbone network, combining the advantages of convolution and self-attention mechanisms.
[0014] Simultaneously, daytime scene images are input into the teacher network for training to generate corresponding inverse depth maps D. teach The self-supervised MonoViT backbone network was used as the teacher model to construct a knowledge distillation loss and optimize the student model.
[0015] The above inverse depth maps all have four different scales: 1 / 8, 1 / 4, 1 / 2, and 1 / 1.
[0016] Step 3: Simultaneously, given consecutive adjacent RGB frames, i.e., the target frame (current frame) I... t and source frame (adjacent frame) I s By splicing I t and I s And input it into the pose network to obtain the target frame I t and source frame I s The relative pose T between t→s ; Target frame I here t The image represents the daytime scene input into the student or teacher network in step 2, where s∈{t+1,t-1}; s represents the previous or next time point of an adjacent frame; t refers to the time point of the target frame, t+1 represents the next time point of the target frame, and t-1 represents the previous time point of the target frame; adjacent frames I s This indicates that it is target frame I. t The previous frame or the next frame;
[0017] Step 4: Combine the inverse depth map D of the daytime scene obtained in Step 2. day and the relative pose T obtained in step 3 t→s , will the current frame I t The pixel coordinates in the image are projected onto the adjacent frame I. s The corresponding pixel coordinates from the viewpoint are used to generate the distorted image I. s→t ;
[0018] Step 5: Extract the inverse depth map D of the night scene obtained from the student network in Step 2. night Inverse depth map D of daytime scene day , respectively with the inverse depth map D output by the teacher network teach Calculate the noise reduction loss L at night an and low-scale consistency loss L low ;
[0019] Simultaneously calculate the distorted image I s→t With current frame I t Image reprojection loss L between the two ph ;
[0020] The final total loss L is obtained. total .
[0021] Furthermore, in step 1, during the process of converting daytime scene images into nighttime scene images using the CoMoGAN adversarial generative network, it is necessary to maintain the scene and scene depth unchanged to ensure visual consistency under different lighting conditions; this is achieved by adjusting the angle of sunlight. Images were obtained at different time periods.
[0022] Furthermore, the lightweight MobileViT backbone network in step 2 includes five stages. Each stage uses convolution operations to extract features through downsampling to reduce computational overhead, and the size of the feature map output by each stage is half the size of the feature map of the previous stage. In the last three stages, a Transformer module is introduced to perceive remote global information while still maintaining small parameters and computational load.
[0023] Further, step 4 generates the distorted image I. s→t The specific calculation process is as follows:
[0024] I s→t =I s <KT t→s D pred K -1 p t >
[0025] In the above formula, K represents the camera's intrinsic parameter matrix (preset and fixed); D pred It is the depth map of the current frame, defined by D. day Perform the conversion; p t isI t The homogeneous pixel coordinates, where <·> represents the sampling symbol.
[0026] Furthermore, the specific loss calculation process in step 5 is as follows:
[0027] For noise reduction loss in the dark L an and low-scale consistency loss L low The structural similarity (SSIM) method is used to calculate the difference between two images. Specifically, the low-resolution inverse depth map is upsampled to an inverse depth map with the same resolution as the input image through bilinear interpolation, and then the loss is calculated by comparing it with the final inverse depth map output by the teacher network.
[0028] This leads to the noise reduction loss L at night. an as follows:
[0029]
[0030] In the above formula, S represents the inverse depth map generated by the depth decoder at different scales. For example, if S is 4, it represents the inverse depth map at full resolution, 1 / 2, 1 / 4, and 1 / 8. i represents the scaling ratio of the inverse depth map. For example, 1 represents full resolution, and 2 represents scaling to 1 / 2 of the full resolution size.
[0031] This leads to the low-scale consistency loss L. low as follows:
[0032]
[0033] Then, the photometric reprojection loss and smoothing loss are combined to form L. baseline The calculation formula is as follows:
[0034]
[0035] In the above formula, μ is the automatic mask, and L ph It is the photometric reprojection loss, L smoo It is a smoothing loss. It is the photometric reprojection loss at different scales i; λ represents the smoothing loss at different scales i, where λ is a hyperparameter.
[0036] L ph μ and L smoo The loss function is as follows:
[0037] L ph =pe(I t ,I s→t )
[0038]
[0039] Here, α is a hyperparameter, set to 0.85;
[0040] The photometric loss pe(·) consists of two parts: structural similarity (SSIM) and L1 norm;
[0041]
[0042] In the above formula, [·] represents Iverson brackets, which are set to 1 if the condition is met and 0 if the condition is not met;
[0043]
[0044] in, This represents the inverse depth map with mean normalization, used to prevent the estimated depth map from being reduced.
[0045] Finally, the overall loss function of the model is calculated, including two cases:
[0046] If we calculate the reprojection loss, then the overall loss function of the model is as follows:
[0047] L total =L baseline +L low +L an
[0048] If we do not calculate the reprojection loss, then the overall loss function of the model is as follows:
[0049] L total =Lsmooth +L low +L an
[0050] ADDepth represents the training method with reprojection loss. * This indicates the training method without reprojection loss. Since reprojection loss needs to be calculated using both depth and pose, a pose estimation network is required if reprojection loss is calculated, and vice versa.
[0051] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0052] 1. This invention proposes a low-scale consistency loss, which enables the student network to learn high-resolution features at a low-resolution stage, optimizes the feature extraction process, maintains computational efficiency, improves the quality of the depth map, and reduces blurring and artifacts caused by the reduction of the decoder convolution kernel.
[0053] 2. This invention uses the CoMoGAN adversarial generative network to expand the KITTI dataset, transforming the KITTI data into images of nighttime scenes. Then, it combines the original daytime scene images with the images transformed into nighttime scene images for joint training, reducing the cost of data preparation and model training.
[0054] 3. The ADDepth model proposed in this invention employs two different deep estimation network training methods, achieving a balance between model complexity and performance. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the overall network structure of the present invention;
[0056] Figure 2 This is a schematic diagram of the MobileViT backbone network in this invention;
[0057] Figure 3 This is a diagram illustrating the calculation process of low-scale consistency loss in this invention.
[0058] Figure 4 This is a comparison of the depth maps output by the technical solution of this invention and existing lightweight monocular depth estimation methods.
[0059] Figure 5 This is a depth map output by the technical solution of the present invention in a real night scene. Detailed Implementation
[0060] The technical solution of the present invention will be described in detail below, but the scope of protection of the present invention is not limited to the embodiments described.
[0061] This invention presents a lightweight, all-day, self-supervised monocular depth estimation method based on adversarial generative networks. It employs the CoMoGAN adversarial generative network to expand the KITTI dataset, transforming it into images for nighttime scenes. A self-supervised MonoViT model is used as the teacher model to construct a knowledge distillation loss, optimizing the student model. A low-scale consistency loss is used to improve the clarity of the final depth map output by the student network. A nighttime noise-resistant loss is designed to enable the student network to learn nighttime noise resistance capabilities from the teacher network.
[0062] In summary, this invention eliminates the need for additional collection and annotation of large amounts of nighttime image data, significantly reducing the cost of data preparation and model training, while maintaining a balance between model complexity and performance.
[0063] like Figure 1 As shown, the lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks in this embodiment includes the following steps:
[0064] Step 1: I... t The image, measuring 3*H*W, was converted into a nighttime scene image using the CoMoGAN adversarial generative network. tn This allows for dataset expansion;
[0065] Step 2: Input the night scene image generated in Step 1 and the original day scene image into the student network for joint training to obtain the inverse depth maps D of the night scene and the day scene. night and D day ;
[0066] Simultaneously, daytime scene images are input into the teacher network for training to generate corresponding inverse depth maps D. tea The student network is based on the lightweight MobileViT backbone network, combining the advantages of convolution and self-attention mechanisms; the self-supervised MonoViT is used as the teacher model to construct the knowledge distillation loss and optimize the student model; the inverse depth graph has four different scales: 1 / 8, 1 / 4, 1 / 2, and 1 / 1.
[0067] In this embodiment, D night The method for obtaining the image is as follows: first, the daytime scene image is converted into a nighttime scene image using CoMoGAN, and then the nighttime image is input into the student deep network to obtain the image; D day The method for obtaining this is as follows: the target frame from the daytime is input into the student deep network. teach The method for obtaining the target frame during the day is as follows: the target frame is obtained through the teacher network, and the error between the prediction value of the teacher model and the prediction value of the student model is used to train the student model.
[0068] Step 3: Simultaneously, given consecutive adjacent RGB frames, i.e., the target frame (current frame) I... t and source frame (adjacent frame) I s Where s∈{t+1,t-1}, by concatenating I t and I s The relative pose T between the target frame and the source frame is obtained by inputting it into the pose network. t→s Among them, target frame I t The daytime scene image is input into the student or teacher network in step 2; the pose network in this embodiment uses ResNet18 as the pose encoder and receives three frame sequences as input to obtain the 6-DoF relative pose between adjacent frames.
[0069] Step 4: Combine the daytime scene depth map output by the student network in Step 2 with the relative pose T between the current frame and adjacent frames in Step 3. t→s , will I t The pixel coordinates in the image are projected onto I. s The corresponding pixel coordinates from the viewpoint are used to generate the distorted image I. s→t ;
[0070] Step 5: Convert the inverse depth map D of the night scene output by the student network in Step 2. night Inverse depth map D of daytime scene day , respectively with the inverse depth map D output by the teacher network teach Night noise reduction loss L an and low-scale consistency loss L low Calculation;
[0071] Simultaneously, calculate the distorted image I in step 4. s→t With current frame I t Image reprojection loss;
[0072] The final total loss I is obtained. total .
[0073] In this embodiment, the CoMoGAN adversarial generative network introduces a functional instance normalization layer and a residual mechanism, both of which decouple image content from its location on the target manifold. The CoMoGAN adversarial generative network relies on a naive, physically inspired model to guide training, while allowing a private model to transform features.
[0074] In step 2 of this embodiment, when the teacher network assists in training the student network, since the targets and content in the generated night scene image and the original daytime scene image are the same, the values in the resulting depth map must also be the same. Because the depth map output by the teacher network is theoretically optimal, the D values output by the student network after inputting the night scene image can be considered optimal.night And the inverse depth map D, which is input from the original daytime scene image and output from the teacher network. teach Loss calculations are performed to allow the learned depth map to gradually converge to the optimal value, thereby enabling the student network to learn nighttime noise resistance through the teacher network.
[0075] This embodiment utilizes self-supervised MonoViT as the teacher model to construct the knowledge distillation loss and optimize the lightweight MobileViT student model. The MobileViT student model not only has fewer parameters than ResNets, but also combines the advantages of convolution and self-attention mechanisms, achieving a maximum balance between model complexity and performance. Therefore, the final trained model is also lightweight.
[0076] In step 4 of this embodiment, if a series of adjacent RGB frames are given, i.e., the target frame (current frame) I t and source frame (adjacent frame) I s By splicing I t and I s The relative pose T between the target frame and the source frame is obtained by inputting it into the pose network. t→s Simultaneously, the target frame is input into the depth estimation network to obtain the predicted dense depth map D. pred When the depth map of the current frame and the relative pose between the current frame and adjacent frames are obtained, I can be... t The pixel coordinates in the image are projected onto I. s The corresponding pixel coordinates from the viewpoint will ultimately produce a distorted image I. s→t .
[0077] like Figure 2 As shown, the lightweight MobileViT backbone network structure in step 2 consists of 5 stages, with the output feature map size of each stage being half that of the previous stage (for example, if the original input image size is H×W, the output feature map sizes of the five stages are respectively...). Because the input feature maps have relatively high resolution in the early stages, the MobileViT backbone network specifically uses convolutional operations to downsample them to extract features and reduce computational overhead. When the feature map size is reduced to a certain extent, in the final three stages, MobileViT introduces a Transformer module to perceive long-range global information while maintaining small parameters and computational load. The MobileNetv2 (MV2) module uses depthwise separable convolutions, which have lower computational and parameter costs compared to the traditional convolutional operations in the BottleNeck module of residual networks. The MobileViTblock module employs a strategy of first extracting local features, then perceiving long-range dependencies, and finally fusing local and global features to generate a feature map.
[0078] The Transformer module in this embodiment includes an encoder and a decoder. The encoder and decoder have 6 layers. The number of attention heads is set to 8. Introducing the Transformer module into the MobileViT backbone network also enables the following: processing sequence inputs and generating sequence outputs using sequence-to-sequence modeling, which is well-suited for tasks such as translation and summarization; directly capturing long-range dependencies in the input sequence using a self-attention mechanism, avoiding the long-range dependency problem of traditional RNNs; and significantly improving training and inference speed using parallel computation.
[0079] like Figure 3 As shown, step 5 calculates the inverse depth map D of the daytime scene. day Inverse depth graph D output by the teacher network teach Perform low-scale consistency loss L low The specific method is as follows:
[0080] The low-resolution inverse depth map is upsampled to an inverse depth map with the same resolution as the input image using bilinear interpolation, and then the loss is calculated by comparing it with the final inverse depth map output by the teacher network.
[0081] Therefore, the specific calculation process for low-scale consistency loss is shown in the following formula:
[0082]
[0083] Where S represents the number of different scale outputs generated by the depth decoder, which is set to 4 here. SSIM(·,·) indicates that structural similarity is used to calculate the difference between two images instead of using logarithmic calculation.
[0084] Example
[0085] To verify the performance of this invention, this embodiment applies the technical solution of this invention to specific datasets for verification. The datasets used include: KITTI dataset, Make3D dataset, RobotCar dataset, and nuScenes dataset.
[0086] The KITTI dataset is primarily used to train a self-supervised monocular depth estimation framework. During training, 39,810 sets of images (each set containing three temporally adjacent images) split by Zhou et al. were used, with 4,424 images serving as the cross-validation set. For testing, 697 images extracted by Eigen et al. and their corresponding ground truth values were used.
[0087] Make3D dataset: This dataset contains 134 outdoor scene images and is a commonly used dataset for evaluating the generalization of monocular depth estimation methods in different daytime scenes.
[0088] The RobotCar dataset contains images of nighttime scenes, making it a common training set for self-supervised monocular depth estimation in general nighttime scenes. Since this invention uses only the KITTI dataset for training and not any other datasets, this dataset is used solely as a test set to evaluate the generalization ability of the proposed monocular depth estimation ADDepth model in nighttime scenes. Similar to other methods using the RobotCar dataset for nighttime scene testing, RobotCar-Night is used for nighttime scene testing. This test data contains 411 nighttime scene images and their corresponding ground truth depth data captured by the LMS-151 depth sensor.
[0089] nuScenes dataset: This dataset also includes images of nighttime scenes, and is used as a test set for nighttime scenes. The test set contains 500 images of nighttime scenes, along with ground truth values obtained via LiDAR.
[0090] The self-supervised monocular depth estimation network of this invention runs on the PyTorch deep learning framework, using a single Nvidia GeForce RTX 3090 GPU with 128GB of RAM, and running Windows 10. The entire model is trained for 30 epochs using the Adam optimizer, with initial parameters set to β1 = 0.9 and β2 = 0.999. The learning rate is set to 1 in the first 15 epochs. r =1e -4 In the last 15 rounds, the learning rate decreased to l. r =1e-5 The initial weights of the MobileViT backbone network in the depth estimation network have been pre-trained on the ImageNet dataset, and the initial weights of the ResNet18 in the pose network are provided by PyTorch. Furthermore, the network models proposed in this invention include two types: the ADDepth model and the ADDepth... * Model; ADDepth represents the training method with reprojection loss, ADDepth * This indicates a training method without reprojection loss.
[0091] The performance comparison results between the technical solution of this invention and the most recent self-supervised monocular depth estimation method are shown in Table 1.
[0092] Table 1
[0093]
[0094]
[0095] As can be seen from Table 1, ADDepth is used to verify the effect of low-scale consistency loss without adding adversarial generative network and nighttime noise resistance loss. ADDepth-s and ADDepth-tiny represent smaller-scale models. * in the table indicates training without reprojection loss.
[0096] The evaluation metrics are divided into seven sub-items, including the first four depth errors and the last three accuracy rates. As can be seen from Table 1, ADDepth achieved better results with the same number of parameters as MViTDepth.
[0097] like Figure 4 As shown, the ADDepth model proposed in this invention, when trained on the KITTI dataset like other lightweight self-supervised monocular depth estimation models, outputs a clearer depth map containing more information. For example, Figure 4 In the first line, showing a "cyclist," the depth map output by the ADDepth model is more prominent, while the other two models estimate more blurry depth maps. In the third line, at the location within the green box, the sign in the ADDepth model of this invention is more rounded. In the last line, the sky theoretically has a large depth distance, so it should be darker. It can be seen that the ADDepth model of this invention has fewer artifacts in the sky and is closer to the real situation.
[0098] The performance comparison results of the technical solution of the present invention on Make3D are shown in Table 2.
[0099] Table 2
[0100]
[0101] As can be seen from the error results in Table 2, the ADDepth model of this invention performs better than MViTDepth on the Make3D dataset, which also reflects the stronger generalization ability of the proposed method.
[0102] The performance evaluation results of the technical solution of the present invention on the RobotCar and nuScenes night test sets are shown in Tables 3 and 4.
[0103] Table 3
[0104]
[0105] Table 4
[0106]
[0107]
[0108] As shown in Tables 3 and 4, the overall performance of the ADDepth model and its nighttime noise-resistant loss on the real nighttime test set is inferior to that of self-supervised monocular depth estimation models trained directly on nighttime datasets in the past two years, including DeFeat-Net, ADFA, ADDS, RNW, STEPS, and Robust-Depth. However, compared with Monodepth2 and MViTDepth, the ADDepth model with added nighttime noise-resistant loss performs better, even surpassing some self-supervised monocular depth estimation models trained directly on nighttime datasets in some depth error metrics. Table 3 shows that the ADDepth model outperforms DeFeat-Net, ADFA, and ADDS in depth error Sq Rel, is only slightly worse than STEPS in depth error RMSE, and is also only lower than STEPS in accuracy δ3. As shown in Table 4, the ADDepth model outperforms both the ADDS and Robust-Depth methods in terms of depth error Sq Rel and RMSE, and also surpasses the ADDS method in terms of accuracy δ2 and δ3.
[0109] like Figure 5 As shown, the first row is the original RGB image input, and the second and third rows are the ADDepth model and the ADDepth* model, respectively. This invention's ADDepth model uses reprojection loss and does not use reprojection loss, with the input being a real nighttime image and the corresponding output depth map when using nighttime noise reduction loss.
Claims
1. A lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks, characterized in that, Includes the following steps: Step 1: Expand the daytime scene images in the dataset using an adversarial generative network (GAN) to transform them into corresponding nighttime scene images. The GAN is a pre-trained CoMoGAN network, which adjusts the angle of sunlight during the transformation process. Set as This yields an image of a nighttime scene. Step 2: Input the night scene image generated in Step 1 and the original daytime scene image into the student network for joint training to obtain the inverse depth map of the night scene. Inverse depth map of daytime scene The student network is based on the lightweight MobileViT backbone network, combining the advantages of convolution and self-attention mechanisms. Simultaneously, daytime scene images are input into the teacher network for training to generate corresponding inverse depth maps. The self-supervised MonoViT backbone network is used as the teacher model to construct a knowledge distillation loss to optimize the student model. Step 3: Given consecutive adjacent RGB frames, i.e., the target frame and source frame By splicing and The target frame is obtained by inputting it into the pose network. and source frame Relative pose between ; Target frame here This refers to the daytime scene image in step 2. ; s represents the previous or next time point of an adjacent frame; t refers to the time point of the target frame, t + 1 represents the next time point of the target frame, and t - 1 represents the previous time point of the target frame; Step 4: Combine the inverse depth map of the daytime scene obtained in Step 2. and the relative pose obtained in step 3 , will the current frame The pixel coordinates in the image are projected onto adjacent frames. The corresponding pixel coordinates from the viewpoint are used to generate the distorted image. ; Step 5: Obtain the inverse depth map of the night scene from the student network in Step 2. Inverse depth map of daytime scene , respectively with the inverse depth map output by the teacher network Calculate noise reduction loss at night and low-scale consistency loss ; Simultaneously calculate the distorted image With the current frame Image reprojection loss between the two ; Ultimately, the total loss was obtained. .
2. The lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks as described in claim 1, characterized in that, In step 1, during the process of transforming daytime scene images into nighttime scene images using the CoMoGAN adversarial generative network, it is necessary to maintain the scene and scene depth unchanged to ensure visual consistency under different lighting conditions; this is achieved by adjusting the angle of sunlight. Images were obtained at different time periods.
3. The lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks as described in claim 1, characterized in that, The lightweight MobileViT backbone network in step 2 consists of five stages. Each stage uses convolution operations to extract features through downsampling, and the size of the feature map output by each stage is half the size of the feature map of the previous stage. In the last three stages, a Transformer module is introduced to perceive remote global information.
4. The lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks as described in claim 1, characterized in that, Step 4 generates the distorted image. The specific calculation process is as follows: ; In the above formula This represents the intrinsic parameter matrix of the camera. It is the depth map of the current frame, composed of... Perform the conversion; yes homogeneous pixel coordinates, Indicates the sampler.
5. The lightweight, all-day, self-supervised monocular depth estimation method based on generative adversarial networks according to claim 1, characterized in that, The method for calculating the three losses in step 5 is as follows: Loss of noise reduction at night and low-scale consistency loss The structural similarity (SSIM) method is used to calculate the difference between two images. Specifically, the low-resolution inverse depth map is upsampled to an inverse depth map with the same resolution as the input image through bilinear interpolation, and then the loss is calculated by comparing it with the final inverse depth map output by the teacher network. This leads to the noise reduction loss at night. as follows: ; In the above formula, S represents the inverse depth map at different scales generated by the depth decoder, and i represents the scaling ratio of the inverse depth map; This leads to low-scale consistency loss. as follows: ; Then, the photometric reprojection loss and smoothing loss are combined to form... The calculation formula is as follows: ; In the above formula, It's an automatic mask. It is photometric reprojection loss. It is a smoothing loss. It is the photometric reprojection loss at different scales i; These are the smoothing losses at different scales i. For hyperparameters; , and The loss function is as follows: ; ; in, It is a hyperparameter; photometric loss Based on structural similarity It consists of two parts: the L1 norm and the L2 norm. ; In the above formula The parentheses represent Iverson; if the condition is met, the value is set to 1, and if the condition is not met, the value is set to 0. ; in, This represents the inverse depth map with mean normalization, used to prevent the estimated depth map from being reduced. Finally, the overall loss function of the model is calculated, including the following two cases: If we calculate the reprojection loss, then the overall loss function of the model is as follows: ; If the reprojection loss is not calculated, the overall loss function of the model is as follows: ; ADDepth represents the training method with reprojection loss. * This indicates a training method without reprojection loss.
Citation Information
Patent Citations
Foresight scene depth estimation method based on self-supervised learning
CN113313732A
Self-supervised monocular depth estimation method for lightweight hybrid network
CN118115555A
