Lightweight all-time self-supervision monocular depth estimation method based on generative adversarial network

Through the adversarial generation network, the daytime scene image is converted into night scene images, and combined with low-scale consistency loss and night noise resistance, the student network is optimized, which solves the problem of poor depth estimation performance in night scenes in the existing technology, and realizes the model Balance of complexity and performance and reduction of data preparation costs.

CN118967768APending Publication Date: 2024-11-15JIANGSU UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411105187.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing full-day self-supervised monocular depth estimation network performs poorly in night scenes, making it difficult to achieve the balance between model complexity and performance, and requires additional acquisition and labeling of large amounts of night data, which increases data preparation and model training. cost.

Method used

Using a lightweight all-day self-supervised monocular depth estimation method based on an adversarial generation network, the daytime scene image is converted into night scene images through a CoMoGAN adversarial generation network, and low-scale consistency loss and night noise resistance are used, combining light The backbone network of the order of magnitude MobileViT and self-attention mechanism optimize the student network to improve the clarity of the depth map and the generalization ability of the model.

Benefits of technology

No additional acquisition and labeling of night data significantly reduces the cost of data preparation and model training, improves the practicality of the model in various complex environments, maintains the balance between model complexity and performance, and improves the depth map Quality and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967768A_ABST
    Figure CN118967768A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network, and the method comprises the steps: combining the generative adversarial network with self-supervised monocular depth estimation, and constructing a knowledge distillation loss optimization student model through employing a self-supervised MonoViT network as a teacher model; by using low-scale consistency loss, high-resolution features are further learned in a low-resolution stage, so that the definition of a depth map finally output by the student network is improved; night noise is fused into a depth estimation network, expansion is carried out under the condition that a data set is not changed, and a daytime data set is converted into an image in a night style through a CoMoGAN adversarial generative network; and carrying out model training in combination with the original daytime scene image and the night scene image. According to the method, under the condition that other additional data sets are not used, the cost of data preparation and model training is reduced, and the practicability of the model in various complex environments is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of self-supervised monocular depth estimation, night noise reduction methods and deep learning technology, and in particular to a lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network. Background Art

[0002] The self-supervised monocular depth estimation method does not need to train the model with real values ​​during the training process, but only relies on RGB image learning. By using the similarity loss between the reconstructed image and the original image as a supervisory signal, the cost of the depth estimation task is greatly reduced, and performance comparable to that of the supervised learning method is obtained. According to the input image, it is mainly divided into methods based on stereo image pairs and methods based on monocular image sequences.

[0003] Garg et al. first used a method based on stereo image pairs to train deep neural networks, using image reconstruction as the basic idea to constrain the network to generate correct disparity maps, and then calculate the depth information based on the known camera focal length and baseline distance, thus getting rid of the dependence on real depth labels. Godard et al. found that using only image reconstruction loss results will lead to discontinuous depth values ​​and artifacts. In order to overcome this problem, they constructed a left-right consistency loss, input the left view into the deep neural network, and predicted the left and right disparity maps at the same time, so that the left and right disparity maps generated by the deep neural network are as consistent as possible, enhancing depth continuity and eliminating artifacts to a certain extent, and ultimately producing results that are better than the supervised method that used the true depth value at the time.

[0004] In addition to 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. This scheme uses the current frame I as input t To the deep neural network to get a predicted depth map D 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 the depth information and the relative pose between adjacent frames, the coordinates of the pixels in the adjacent frames in the current frame can be obtained by image sampling, so that the reconstructed image I can be obtained. s→t Ideally, the reconstructed image and the original image should generate consistent photometric information. Therefore, the photometric difference between the two can be used to establish a photometric consistency loss, which can be used to train the depth estimation network and the pose network. In the prediction stage, only the depth network needs to be used to generate the depth information of the image.

[0005] After the above-mentioned method of depth estimation based on monocular image sequences was proposed, it has attracted widespread attention from many scholars at home and abroad. Some subsequent work mainly expanded and optimized it on this basis. Monodepth2 proposed by Godard et al. introduced automatic masks on this basis, solved the impact of pixel areas that are stationary relative to the camera and some moving objects on network performance, and designed a minimized reprojection loss to solve the problem of possible occlusion of the same object in the previous and next frames, as well as full-resolution multi-scale sampling to reduce artifacts. Johnston et al. limited the depth value estimated by the deep network to several discrete values, reducing the difficulty of depth estimation, making the result boundary of the depth map clearer, and the performance of the obtained indicators better. Zhang et al. combined CNN and Transformers to achieve good results with low complexity of the depth estimation model. Wang et al. used adversarial generative networks to improve the accuracy of monocular depth estimation at night.

[0006] However, many existing all-day self-supervised monocular depth estimation networks need to be trained directly on night image datasets, so a large amount of night image data needs to be collected and annotated, which greatly increases the cost of data preparation and model training; and the current all-day self-supervised monocular depth estimation networks often find it difficult to strike a balance between model complexity and performance, and have a large computational overhead. In addition, the current lightweight self-supervised monocular depth estimation network performs well in daytime scenes, but performs poorly in nighttime scenes and has 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 all-day image to be estimated is input into the depth estimation model, processed using a cross-domain interaction module and a cross-domain coupled projection module, and trained using scene loss supervision to obtain the depth estimation result. This solution requires the use of night scene images corresponding to daytime scenes for training, which increases the cost of night data preparation.

[0008] For example, patent 2023112780963 discloses a self-supervised monocular depth estimation method and device for all-weather scenes, which solves the problem of difficulty in effectively extracting depth features from night 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 convolutions to assist in capturing global features, uses a self-attention mechanism to learn long-distance feature dependencies, and uses graph convolutional neural network technology to segment target objects. Although this solution reduces the required amount of model parameters, it performs poorly in other scenarios, such as night scenes, and therefore has poor generalization. Summary of the invention

[0010] Purpose of the invention: The purpose of the present invention is to solve the problem of not needing to additionally collect and label a large amount of nighttime data, and to provide a lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network. The present invention utilizes low-scale consistency loss to further learn the high-resolution features of the teacher network at a low-resolution stage, thereby improving the clarity of the final output depth map of the student network, while maintaining a balance between the complexity and performance of the student network model. In addition, the present invention uses the CoMoGAN generative adversarial network to convert images of daytime scenes into images of nighttime scenes, without the need for additional data sets, thereby reducing the cost of data preparation and model training, and improving the practicality of the model in various complex environments.

[0011] Technical solution: A lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network of the present invention comprises the following steps:

[0012] Step 1: The daytime scene images in the KITTI dataset are expanded through a generative adversarial network to convert them into corresponding nighttime scene images; the generative adversarial network uses the trained CoMoGAN generative adversarial network to convert the angle of sunlight into the corresponding nighttime scene images. Set it to π (the corresponding solar altitude angle is -5°) to get a night-style image;

[0013] 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 map D of the night scene. night And the inverse depth map D of the daytime scene day ; The student network is based on the lightweight MobileViT backbone network, combining the advantages of convolution and self-attention mechanisms;

[0014] At the same time, the daytime scene image is input into the teacher network for training to generate the corresponding inverse depth map D teach ; Use the self-supervised MonoViT backbone network as the teacher model to build the 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: At the same time, given the continuous adjacent RGB frames, that is, the target frame (current frame) I t and source frame (adjacent frame) I s , by splicing I t and I s And input into the pose network to obtain the target frame I t and source frame I s The relative position between t→s ; Here the target frame I t is the daytime scene image input to the student network or teacher network in step 2, s∈{t+1,t-1}; s represents the previous time point or the next time point of the 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; the adjacent frame I s Indicates the target frame I t Previous frame or 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 , the current frame I t The pixel coordinate position in the image is projected to the adjacent frame I s The corresponding pixel coordinate position under the viewing angle finally generates the distorted image I s→t ;

[0018] Step 5: The inverse depth map D of the night scene obtained by the student network in step 2 night And the inverse depth map D of the daytime scene day , respectively, with the inverse depth map D output by the teacher network teach Calculate the noise immunity loss L at night an and low-scale consistency loss L low ;

[0019] At the same time, the distorted image I is calculated s→t With the current frame I t The image reprojection loss L between the two ph ;

[0020] Finally, the total loss L total .

[0021] Furthermore, in the process of converting the daytime scene image into the nighttime scene image using the CoMoGAN adversarial generative network in step 1, the scene and scene depth must be kept unchanged to ensure visual consistency under different lighting conditions; by adjusting the angle of sunlight Get images at different time periods.

[0022] Furthermore, the lightweight MobileViT backbone network in step 2 includes five stages, each of which 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; the Transformer module is introduced in the last three stages to perceive long-range global information while still maintaining small parameters and computational load.

[0023] Furthermore, the 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 (pre-set and fixed); D pred is the depth map of the current frame, represented by D day Convert; p t isI t Homogeneous pixel coordinates of , <·> represents the sampling symbol.

[0026] Furthermore, the specific loss calculation process of step 5 is as follows:

[0027] For the night noise loss L an and low-scale consistency loss L low , the structural similarity SSIM is used to calculate the difference between the two images, that is, the low-resolution inverse depth map is upsampled to the inverse depth map with the same resolution as the input image through bilinear interpolation, and then the loss is calculated with the final inverse depth map output by the teacher network;

[0028] Then we can get the night noise reduction loss L an as follows:

[0029]

[0030] In the above formula, S represents the inverse depth map of different scales generated by the depth decoder. For example, if S is 4, it represents the inverse depth map of full resolution, 1 / 2, 1 / 4 and 1 / 8; i represents the scaling ratio of the inverse depth map, such as 1 represents full resolution, and 2 represents scaling to 1 / 2 of the full resolution;

[0031] Then we get the low-scale consistency loss L low as follows:

[0032]

[0033] Then, the photometric reprojection loss and the smoothness loss form L baseline , the calculation formula is as follows:

[0034]

[0035] In the above formula, μ is the automatic mask, L ph is the photometric reprojection loss, L smoo is the smoothing loss, is the photometric reprojection loss at different scales i; is the smoothing loss at different scales i, and λ 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] Among them, α 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, represents the mean-normalized inverse depth map, used to prevent the estimated depth map from shrinking;

[0045] Finally, the overall loss function of the model is calculated, including two cases:

[0046] If the reprojection loss is calculated, the loss function of the entire model is as follows:

[0047] L total =L baseline +L low +L an

[0048] If the reprojection loss is not calculated, 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. * Indicates the training method without reprojection loss. Since the reprojection loss needs to be calculated through depth and pose, if the reprojection loss is calculated, a pose estimation network is required, otherwise a pose network is not required.

[0051] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0052] 1. The present invention proposes a low-scale consistency loss, which enables the student network to learn high-resolution features in the low-resolution stage, optimizes the feature extraction process, maintains computational efficiency, improves the quality of the depth map, and reduces the blur and artifact problems caused by the reduction of the decoder convolution kernel.

[0053] 2. The present invention uses CoMoGAN to expand the KITTI dataset, converts the KITTI data into images of night scenes, and then jointly trains the original daytime scene images and the images converted into night scenes, thereby reducing the cost of data preparation and model training.

[0054] 3. The ADDepth model proposed in the present invention adopts two different depth estimation network training methods to achieve a balance between model complexity and performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is a schematic diagram of the overall network structure of the present invention;

[0056] Figure 2 A schematic diagram of the MobileViT backbone network in the present invention;

[0057] Figure 3 It is a diagram of the calculation process of low-scale consistency loss in the present invention;

[0058] Figure 4 This is a comparison result diagram of the depth map output by the technical solution of the present invention and the existing lightweight monocular depth estimation method;

[0059] Figure 5 This is the depth map output by the technical solution of the present invention in a real night scene. DETAILED DESCRIPTION

[0060] The technical solution of the present invention is described in detail below, but the protection scope of the present invention is not limited to the embodiments.

[0061] The lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network of the present invention adopts the CoMoGAN generative adversarial network to expand the KITTI dataset and convert the KITTI data into images in night scenes; uses the self-supervised MonoViT as the teacher model to construct the knowledge distillation loss and optimize the student model; uses the low-scale consistency loss to improve the clarity of the depth map finally output by the student network; and designs the night anti-noise loss so that the student network can learn the night anti-noise function through the teacher network.

[0062] In general, the present invention does not require the additional collection and annotation of a large amount of night 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 the adversarial generative network of this embodiment includes the following steps:

[0064] Step 1: Convert the target frame (the current frame, i.e., the original daytime scene image) t , with a size of 3*H*W, is converted into a night scene image I through the CoMoGAN adversarial generation network tn , thereby achieving data set 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, so as to obtain the inverse depth map D of the night scene and the day scene. night and D day ;

[0066] At the same time, the daytime scene image is input into the teacher network for training to generate the corresponding inverse depth map 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 map has four different scales of 1 / 8, 1 / 4, 1 / 2, and 1 / 1;

[0067] In this embodiment, D night The method of obtaining D is as follows: first, the daytime scene image is converted into a nighttime scene image through CoMoGAN, and then the nighttime image is input into the student deep network to obtain D. day The method of obtaining D is to input the daytime target frame into the student deep network. teach The method for obtaining is: the target frame during the day is obtained through the teacher network, and the error between the predicted value of the teacher model and the predicted value of the student model is used to train the student model;

[0068] Step 3: At the same time, given the continuous adjacent RGB frames, that is, the target frame (current frame) I t and source frame (adjacent frame) I s , where s∈{t+1,t-1}, by splicing I t and I s And input into the pose network to obtain the relative pose T between the target frame and the source frame t→s ; Wherein, the target frame I t is the daytime scene image input to the student or teacher network in step 2; the pose network of this embodiment uses ResNet18 as the pose encoder and receives a three-frame sequence 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 and the relative pose T between the current frame and the adjacent frame in step 3 t→s , will I t The pixel coordinate position in I is projected to s The corresponding pixel coordinate position under the viewing angle finally generates the distorted image I s→t ;

[0070] Step 5: Inverse the depth map D of the night scene output by the student network in step 2 night And the inverse depth map D of the daytime scene day , respectively, with the inverse depth map D output by the teacher network teach Night noise loss L an and low-scale consistency loss L low Calculation of

[0071] At the same time, the distorted image I in step 4 is calculated s→t With the current frame I t Image reprojection loss;

[0072] Finally, the total loss I total .

[0073] The CoMoGAN adversarial generative network in this embodiment introduces a feature instance normalization layer and a residual mechanism, which together decouple the image content from the position on the target manifold. The CoMoGAN adversarial generative network relies on a naive physics-inspired model to guide training while allowing private models to transform features.

[0074] In step 2 of this embodiment, when the teacher network assists in training the student network, since the generated night scene image and the original day scene image have the same target and content, the values ​​in the obtained depth map must also be the same; because the depth map output by the teacher network is theoretically optimal, the depth map output by the night scene image after being input into the student network can be used as the depth map output by the teacher network.night and the inverse depth map D output by the original daytime scene image input to the teacher network teach The loss calculation is performed to allow the learned depth map to gradually converge to the optimal state, so that the student network can learn the nighttime anti-noise function through the teacher network.

[0075] This example uses the 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 to achieve the balance between model complexity and performance to the greatest extent. Therefore, the final trained model is also lightweight.

[0076] In step 4 of this embodiment, if continuous 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 into the pose network to obtain the relative pose T between the target frame and the source frame t→s At the same time, 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 the adjacent frame are obtained, I t The pixel coordinate position in I is projected to s The corresponding pixel coordinate position under the viewing angle can eventually produce a distorted image I s→t .

[0077] like Figure 2 As shown in Figure 2, the lightweight MobileViT backbone network structure in step 2 is divided into 5 stages, and the output feature map size of each stage is half of the previous stage (for example, the input original image size is H×W, and the feature map sizes of the five stages are respectively ). Since the input feature map has a relatively high resolution in the early stages, the MobileViT backbone network specifically uses convolution operations to downsample it to extract features and reduce computational overhead. When the feature map size is reduced to a certain extent, in the last three stages, MobileViT introduces the Transformer module, which perceives long-distance global information while maintaining small parameters and computational load. Among them, the MobileNetv2 (MV2) module uses depthwise separable convolution, which has lower computational and parameter costs than the traditional convolution operation in the BottleNeck module in the residual network. The MobileViTblock module adopts a strategy that first extracts local features, then perceives long-distance dependencies, and finally fuses local and global features to generate feature maps.

[0078] The Transformer module of this embodiment includes an encoder and a decoder. The number of layers of the encoder and decoder is set to 6. The number of attention heads is set to 8. The introduction of the Transformer module in the MobileViT backbone network can also achieve the following functions: using sequence-to-sequence modeling to process sequence input and generate sequence output, which is very suitable for tasks such as translation and summary generation; using the self-attention mechanism to directly capture the long-range dependency relationship in the input sequence, avoiding the long-distance dependency problem of traditional RNN; using parallel computing to significantly improve the training and reasoning speed.

[0079] like Figure 3 As shown, step 5 calculates the inverse depth map D of the daytime scene day The inverse depth map D output by the teacher network teach Perform a low-scale consistency loss L low The specific method is:

[0080] 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 with the final inverse depth map output by the teacher network.

[0081] Therefore, the specific calculation process of low-scale consistency loss is shown in the following formula:

[0082]

[0083] Here, S represents the number of different scale outputs generated by the deep decoder, which is set to 4 here. SSIM(·,·) means that the structural similarity is used to calculate the difference between two images instead of using a logarithmic method.

[0084] Example

[0085] In order to verify the performance of the present invention, this embodiment applies the technical solution of the present invention to specific data sets for verification. The data sets used include: KITTI data set, Make3D data set, RobotCar data set and nuScenes data set.

[0086] KITTI dataset: This dataset is mainly used to train the self-supervised monocular depth estimation framework. During the training process, 39,810 groups of images (one group contains three temporally adjacent images) split by Zhou et al. are used for training, and 4,424 images are used as cross-validation sets. In the test, 697 images extracted by Eigen et al. and their corresponding true values ​​are used for testing.

[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] RobotCar dataset: This dataset contains images of night scenes, so it is often used as a training set in general self-supervised monocular depth estimation of night scenes. Because the present invention only uses the KITTI dataset for training and no other additional datasets, this dataset is only used as a test set to evaluate the generalization ability of the proposed monocular depth estimation ADDepth model in night scenes. Like other methods that use the RobotCar dataset for night scene testing, RobotCar-Night is used for testing in night scenes. The test data contains 411 night scene images and their corresponding true values ​​of depth data captured by the LMS-151 depth sensor.

[0089] nuScenes dataset: This dataset also contains images of night scenes and is also used as a test set for night scenes. This test set contains 500 images of night scenes and the true values ​​obtained by LiDAR.

[0090] The self-supervised monocular depth estimation network of the present invention runs under the PyTorch deep learning framework. The hardware used is a single Nvidia GeForce RTX 3090 GPU with 128G running memory and the operating system is Windows 10. The entire model is trained for 30 epochs using the Adam optimizer with the initial optimizer parameters set to β1=0.9 and β2=0.999. The learning rate is set to I in the first 15 epochs. r =1e -4 , in the last 15 rounds, the learning rate is reduced to l r =1e-5 The initialization weights of the backbone network MobileViT in the depth estimation network have been pre-trained on the ImageNet dataset, and the initialization weights of ResNet18 in the pose network are officially provided by Pytorch. In addition, the network models proposed in the present invention include two types: ADDepth model and ADDepth * Model; ADDepth represents the training method with reprojection loss, ADDepth * Indicates the training method without reprojection loss.

[0091] The performance comparison results between the technical solution of the present 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, at this time ADDepth is used to verify the effect of low-scale consistency loss without adding the adversarial generation network and night anti-noise loss. ADDepth-s and ADDepth-tiny represent smaller-scale models. The * in the table indicates the training method without reprojection loss.

[0096] The evaluation index is divided into 7 sub-items, including the first 4 depth errors and the last 3 accuracy rates. As can be seen from Table 1, ADDepth achieves better results with the same number of parameters as MViTDepth.

[0097] like Figure 4 As shown in the figure, the ADDepth model proposed in the present invention outputs a clearer depth map and contains more information when trained with the KITTI dataset like other lightweight self-supervised monocular depth estimation models. Figure 4 In the first row, the depth map of the "cyclist" output by the ADDepth model is more prominent, while the depth maps estimated by the other two models are more blurred. In the third row, the sign of the green frame is more rounded. In the last row, the sky part is theoretically very deep, so it should be darker. It can be seen that the ADDepth model of the present invention has fewer artifacts in the sky and is closer to the actual 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] From the error results in Table 2, it can be seen that the performance of the ADDepth model of the present invention on the Make3D dataset is better than that of MViTDepth, which also reflects that the proposed method has stronger generalization ability.

[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] From the evaluation index results shown in Tables 3 and 4, it can be seen that the overall performance of the ADDepth model and the night anti-noise loss of the present invention on the real night test set is not as good as the self-supervised monocular depth estimation model methods directly trained on the night data set in the past two years, including: DeFeat-Net, ADFA, ADDS, RNW, STEPS, Robust-Depth methods, but compared with the Monodepth2 and MViTDepth methods, the ADDepth model with the addition of the night anti-noise loss has better performance, and even exceeds some self-supervised monocular depth estimation model methods directly trained on the night data set in some depth error indicators. As can be seen from Table 3, the ADDepth model exceeds the DeFeat-Net method, the ADFA method, and the ADDS method in the depth error Sq Rel indicator, is only slightly worse than the STEPS method in the depth error RMSE indicator, and is only lower than the STEPS method in the accuracy δ3 indicator. It can be seen from Table 4 that the ADDepth model is better than the ADDS method and the Robust-Depth method in terms of the depth error Sq Rel index and the RMSE index, and is higher than the ADDS method in terms of the accuracy δ2 and δ3 indicators.

[0109] like Figure 5 As shown, the first row is the input original RGB image, the second row is the ADDepth model and the third row is the ADDepth* model. The ADDepth model of the present invention uses the reprojection loss and does not use the reprojection loss model. When using the night anti-noise loss, the input real night image and the corresponding output depth map.

Claims

1. A lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network, characterized in that: The following steps are involved: Step 1: The daytime scene images in the data set are expanded through a generative adversarial network and converted into corresponding nighttime scene images; the generative adversarial network uses the trained CoMoGAN generative adversarial network to convert the angle of sunlight into the corresponding nighttime scene images. Set it to π, and get the night scene image; 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 map D of the night scene. night And the inverse depth map D of the daytime scene day ; The student network is based on the lightweight MobileViT backbone network, combining the advantages of convolution and self-attention mechanisms; At the same time, the daytime scene image is input into the teacher network for training to generate the corresponding inverse depth map D teach ; Use the self-supervised MonoViT backbone network as the teacher model to build knowledge distillation loss to optimize the student model; Step 3: Given continuous adjacent RGB frames, i.e., target frame I t and source frame I s , by splicing I t and I s And input into the pose network to obtain the target frame I t and source frame I s The relative position between t→s ; Here the target frame I t refers to the daytime scene image in step 2, s∈{t+1,t-1}; s represents the previous time point or the next time point of the 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 D of the daytime scene obtained in step 2 day And the relative pose T obtained in step 3 t→s , the current frame I t The pixel coordinate position in the image is projected to the adjacent frame I s The corresponding pixel coordinate position under the viewing angle finally generates the distorted image I s→t ; Step 5: The inverse depth map D of the night scene obtained by the student network in step 2 night And the inverse depth map D of the daytime scene day , respectively, with the inverse depth map D output by the teacher network teac Calculate the noise immunity loss L at night an and low-scale consistency loss L low ; At the same time, the distorted image I is calculated s→t With the current frame I t The image reprojection loss L between the two ph ; Finally, the total loss L total .

2. The lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network according to claim 1 is characterized in that: In the process of converting the daytime scene image into the nighttime scene image using the CoMoGAN adversarial generative network in step 1, the scene and scene depth must be kept unchanged to ensure visual consistency under different lighting conditions; by adjusting the angle of sunlight Get images at different time periods.

3. The lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network according to claim 1, characterized in that: The lightweight MobileViT backbone network in step 2 includes five stages, each of which 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; the Transformer module is introduced in the last three stages, and the Transformer module is used to perceive long-range global information.

4. The lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network according to claim 1, characterized in that: The distorted image I is generated in step 4 s→t The specific calculation process is as follows: I s→t =I s <KT t→s D pred K -1 p t > In the above formula, K represents the intrinsic parameter matrix of the camera, and D pred is the depth map of the current frame, represented by D day Convert; p t isI t Homogeneous pixel coordinates of , <·> represents the sampling symbol.

5. The lightweight all-day self-supervised monocular depth estimation method based on a generative adversarial network according to claim 1, characterized in that: The method for calculating the three losses in step 5 is as follows: For the night noise loss L an and low-scale consistency loss L low , the structural similarity SSIM is used to calculate the difference between the two images, that is, the low-resolution inverse depth map is upsampled to the inverse depth map with the same resolution as the input image through bilinear interpolation, and then the loss is calculated with the final inverse depth map output by the teacher network; Then we can get the night noise reduction loss L an as follows: In the above formula, S represents the inverse depth map of different scales generated by the depth decoder, and i represents the scaling ratio of the inverse depth map; Then we get the low-scale consistency loss L low as follows: Then, the photometric reprojection loss and the smoothness loss form L baseline , the calculation formula is as follows: In the above formula, μ is the automatic mask, L ph is the photometric reprojection loss, L smooth is the smoothing loss, is the photometric reprojection loss at different scales i; is the smoothing loss at different scales i, and λ is a hyperparameter; L ph , μ and L smo The loss function is as follows: L ph =pe(I t ,I s→t ) Among them, α is a hyperparameter; the photometric loss pe(·) consists of two parts: structural similarity SSIM and L1 norm; 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; in, represents the mean-normalized inverse depth map, used to prevent the estimated depth map from shrinking; Finally, the overall loss function of the model is calculated, including the following two cases: If the reprojection loss is calculated, the overall loss function of the model is as follows: L total =L baseline +L low +L an If the reprojection loss is not calculated, the overall loss function of the model is as follows: L total =L smoo +L low +L an ADDepth represents the training method with reprojection loss. * Indicates the training method without reprojection loss.

Citation Information

Cited By

  • Image depth estimation method, system and equipment based on knowledge mutual distillation and medium

    CN120259397A