Self-supervised monocular depth estimation method and system for unmanned driving of coal mine monorail crane
By using the adaptive feature aggregation algorithm and the rotation amount optimization algorithm in the coal mine monorail crane unmanned driving scene, combined with the image edge similarity loss function, the problem of low depth inference accuracy of the self-supervised monocular depth estimation method in the coal mine scene is solved. It achieves more accurate depth estimation and posture prediction, improving the safety and transportation efficiency of coal mine monorail cranes.
Patent Information
- Application Number
- CN202410481590.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-04-22
AI Technical Summary
Existing self-supervised monocular depth estimation methods are difficult to effectively aggregate contextual information in unmanned driving scenarios with monorail cranes in coal mines, resulting in the lack of key depth clues during depth inference, and large errors in the prediction of the rotation component of the pose network, resulting in poor depth image accuracy. high.
A depth estimation network embedded with an adaptive feature aggregation algorithm is proposed to aggregate high and low-scale features while maintaining context consistency; a pose estimation network embedded with a rotation optimization algorithm is proposed to weight the first 3 dimensions of the original main path and other paths. Vector refines the rotation component; and introduces the image edge similarity loss function to provide shape prior and semantic guidance for depth estimation and constrain the network.
It effectively improves the accuracy of predicted depth, enables the coal mine monorail crane to more accurately estimate the distance between workers and obstacles, enhances the ability to accurately judge and prevent collisions, and improves the safe passage of unmanned coal mine monorail cranes.
Smart Images

Figure CN118397063B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image depth estimation, and in particular to a method and system for self-supervised monocular depth estimation in unmanned driving of a coal mine monorail crane. Background Art
[0002] The National Energy Administration issued the "Management Measures for Acceptance of Intelligent Demonstration Coal Mines (Trial)", which further clarified and refined the technical solutions and implementation details of the intelligent construction of coal mines. Among them, "unmanned driving auxiliary transportation vehicles" have become an important part of the intelligent construction of coal mines and an important standard for the acceptance of intelligent coal mines. It can be seen that with the continuous advancement of the intelligent construction of mines in my country, the development of mine transportation systems towards intelligence and even unmanned is an inevitable trend. However, the overall level of intelligent construction of mines in my country is still in its early stages. The existing research results are mainly concentrated in the intelligentization of mining equipment and digital mine construction. The mine transportation system, especially the auxiliary transportation system, is still in a backward state of semi-mechanized, semi-automated, and even heavily dependent on manual operation. Its transportation efficiency, work reliability and safety have greatly restricted the safe and efficient production of mines. Therefore, it is necessary to accelerate the research on unmanned driving technology of monorail cranes. The realization of unmanned driving of monorail cranes can reduce property losses, casualties, and improve mining work efficiency. The monorail crane transportation system has the advantages of flexibility and unlimited transportation distance. It can realize one-stop direct transportation without reprinting. It is currently the most widely used monorail transportation equipment in coal mines. However, during the driving process of the monorail crane, obstacles such as large pieces of fallen coal, boulders, steel building materials piled in the tunnel, and operators will affect the passability of the monorail crane. Therefore, the unmanned driving of the monorail crane needs to accurately judge and prevent collisions with obstacles and operators, improve the safe passability of the unmanned driving of the coal mine monorail crane, and achieve the purpose of reducing costs, increasing efficiency, and ensuring safe production. Monocular depth estimation has a simple structure, is easy to implement, and has low overhead. It has been a hot research topic in the field of computer vision in recent years. It plays an indispensable role in various three-dimensional perception tasks such as virtual reality, unmanned driving systems, and robot navigation. This technology aims to use a single image to infer the distance from each scene target to the imaging center of the camera pixel by pixel, that is, the depth, and then generate a depth image, which can well assist in perceiving the spatial information of the stereoscopic three-dimensional scene. At present, monocular depth estimation can be divided into supervised and self-supervised methods according to whether the depth truth label is required during training. The supervised method takes the RGB image and its depth truth label as input. After network training, the feature mapping relationship between the RGB image and the depth image is learned, and then a new depth image is predicted. The principle of the self-supervised method is image reconstruction. By constructing the loss between the reconstructed image and the input image to supervise the network, the network can obtain the scene 3D information in the latent space without using the true depth label. Since the real depth label of the mine tunnel is difficult to obtain, the equipment requirements are high and the cost is expensive, in practical applications, especially for the safe identification and obstacle avoidance of unmanned driving of coal mine monorail cranes, the use of self-supervised monocular depth estimation method is undoubtedly the best depth estimation method.
[0003] In order to understand the development status of the prior art, the present invention searches, compares and analyzes the existing patents and papers:
[0004] Patent document CN 113034563 A "Self-supervised monocular depth estimation method based on feature sharing" integrates the posture estimation unit into the depth estimation unit, realizes the fusion of the two operations of depth estimation and posture estimation in a single network, and obtains a new monocular single-source depth estimation network based on feature sharing for depth estimation. Although this method simplifies the network and improves the reasoning speed, it is only for unmanned driving in outdoor scenes. For complex indoor scenes, the network cannot make good use of the extracted features, and the predicted depth accuracy is poor. It is not applicable to indoor scenes in mines such as coal mine monorail cranes.
[0005] Patent document CN 110599533 A "Fast monocular depth estimation method suitable for embedded platforms" deploys a lightweight depth estimation network on an embedded platform, configures a model training framework on an edge server, and interacts with each other through the network: the embedded platform provides data and labels to the edge server, and the edge server trains after receiving the data and updates the server on the embedded platform. This method provides a method for deploying a depth estimation network on an embedded platform, but the method uses an RGB-D camera to collect monocular images and depth maps. Due to the limitations of the RGB-D camera itself, the depth map has a limited perception range and small depth changes. It is generally used in indoor scenes with small posture rotations. It is generally used in simple indoor robot movement occasions, and has little effect on large and complex indoor scenes such as coal mine monorail cranes.
[0006] It can be seen that the existing self-supervised depth estimation method has a significantly low accuracy and a significantly reduced quality when predicting the depth of the unmanned coal mine monorail crane scene image. The main reason is that when the coal mine monorail crane is unmanned, the scene structure captured by the camera changes in real time, objects overlap more, the depth changes more, and the video sequence has a large rotation component.
[0007] In summary, the problems existing in the prior art are:
[0008] (1) The monocular video sequences collected when the coal mine monorail crane is unmanned have many overlapping objects and large depth variations. The existing self-supervised model is difficult to effectively aggregate contextual information, resulting in the lack of some key depth clues in monocular depth estimation when performing depth reasoning.
[0009] (2) The monocular video sequence collected when the coal mine monorail crane is unmanned has a larger rotation component than other simple sequences, which leads to a large error in the prediction of the rotation component by the pose network. Summary of the invention
[0010] The technical problem to be solved by the present invention is to provide a self-supervised monocular depth estimation method and system for unmanned driving of a coal mine monorail crane in view of the deficiencies of the above-mentioned prior art.
[0011] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0012] A self-supervised monocular depth estimation method for unmanned driving of coal mine monorail cranes. Specifically, a depth estimation network embedded with an adaptive feature aggregation algorithm is first proposed, which is used to aggregate high- and low-scale features in depth estimation while adaptively maintaining their contextual consistency and narrowing the semantic gap; then a pose estimation network embedded with a rotation optimization algorithm is proposed, which is used to weightedly fuse the first 3-dimensional vectors of the original main path and other paths in the pose network to refine the rotation component and improve the accuracy of the predicted pose; finally, an image edge similarity loss function is proposed to provide shape prior and semantic guidance for depth estimation, which serves as an additional self-supervisory signal to constrain the network. The present invention is based on the StructDepth network framework, which can effectively improve the accuracy of predicted depth, so that the coal mine monorail crane can more accurately estimate the distance between the position of the operator and the obstacle, enhance its ability to accurately judge and prevent collisions with obstacles and operators, and improve the safe passability of unmanned driving of the coal mine monorail crane.
[0013] The method comprises the following steps:
[0014] The first step is to build a depth estimation network based on the adaptive feature aggregation algorithm, and use the network to estimate the depth image of the input RGB image.
[0015] In the second step, a pose estimation network based on the rotation optimization algorithm is constructed. The network is used to predict the relative pose relationship of the camera and reconstruct the image with the depth image obtained in the first step.
[0016] The third step is to construct a loss optimization module containing the image edge similarity loss function, use this module to calculate the loss error between the reconstructed image and the input image, calculate the loss error value through forward propagation, and then update all weight parameters in the network through back propagation until the calculated loss reaches the minimum value and converges.
[0017] Furthermore, the first step is to construct a depth estimation network based on an adaptive feature aggregation algorithm, including:
[0018] (1) The ResNet50 network is used as the depth estimation network encoder, and the target image is taken as input. The Bottleneck convolution module of ResNet50 is used to perform 5-layer convolution and downsampling operations on the input image to reduce the feature resolution and extract features of different scales, namely, feature images of each level, and finally obtain the extracted output feature image.
[0019] (2) By embedding the decoder network of the adaptive feature aggregation algorithm, the feature image obtained by the decoder layer through standard bilinear interpolation upsampling and deconvolution operation is spliced with the output of the encoder of the previous layer obtained by skip connection according to the channel, and then the offset map is predicted by two learning feature offset mapping branches, which are used to refine the feature image and feature image respectively. The refinement function is refined by bilinear interpolation, that is, the offset is used to generate refined features through the following formula:
[0020]
[0021] Two refinement features It can be expressed as:
[0022]
[0023]
[0024] Finally, the two refined features are aggregated to obtain F″ i+1 , the formula is:
[0025]
[0026] The aggregate feature F″ will be obtained i+1 As the input of the previous level of the decoder, the above four aggregation processes are repeated in sequence. Finally, the feature image output by the first level of the decoder is mapped using the Sigmoid function to obtain the predicted depth image.
[0027] Furthermore, in the second step, a pose estimation network based on a rotation optimization algorithm is constructed, including:
[0028] (1) The pose estimation network also uses the U-Net structure. The pose estimation network encoder uses the ResNet18 network, and the pre-trained weight model is used in the pose encoder. The dimension of the first convolution kernel in the pre-trained model is expanded so that the network can receive six channels as input. The weights in the expanded convolution kernel are divided by 2 to ensure that the value range after the convolution operation is the same as that of a single image entering the residual network. The encoder network finally outputs image features with a channel dimension of 512.
[0029] (2) The image features extracted from the encoder are integrated through a decoder network embedded with a rotation optimization algorithm. The traditional pose estimation network first uses Squeeze to reduce the dimension of the image features, then arranges the image features in rows, and then performs multiple convolution operations to scale the matrix by 0.01. Finally, a 6-dimensional feature vector is obtained, which is the 6-DOF pose transformation of the image between adjacent frames, where the 3-dimensional features in the form of Euler angles represent rotations, and the 3-dimensional features in the back represent translations. The present invention embeds a rotation optimization algorithm in the traditional pose network decoder network, and adopts a multi-path fusion refinement method to predict the 6-dimensional vector. In the fourth layer of the pose decoder, the original single-layer convolution layer is changed to a multi-layer convolution layer. The original main path convolution layer still predicts a 6-dimensional vector, and the other path convolution layers predict 5-dimensional vectors, 4-dimensional vectors, etc. Finally, all the first 3-dimensional vectors are weighted fused and refined to obtain the output. The calculation formula is:
[0030] r=λ3r3+λ4r4+λ5r5+r6+λ7r7...
[0031] Finally, the hyperparameter is set to 0.4. The reprojected image is constructed based on the output results of the depth estimation network and the pose estimation network, and then the reprojection error is introduced into the loss function.
[0032] Furthermore, in the third step, a loss optimization module containing an image edge similarity loss function is constructed, including:
[0033] (1) Construction of conventional loss optimization function. From the above, we can see that given the target image I t and another perspective source image I s , using the predicted depth map as a bridge variable to train and constrain the image synthesis process. The training network needs to predict the depth image D of the target image. t , it is also necessary to estimate the relative pose T between a pair of target images and source images t→s . Therefore, the photometric reprojection loss can be constructed as follows:
[0034]
[0035] I s→t =I s <proj(D t ,T t→s ,K)>
[0036] Where ρ is the photometric reconstruction error, which is a weighted combination of the L1 loss and the image structured similarity (SSIM) loss, defined as:
[0037]
[0038] proj() is the target image pixel coordinate p t Mapped to the source image pixel coordinate p s The transformation function is calculated as follows:
[0039] p s ~KT t→s D t (p t )K -1 p t
[0040] Assuming that the camera intrinsic parameter matrix K is the same for all images, when low-texture areas appear in the mine indoor images, the pixel-by-pixel smoothing loss function can constrain the depth value when the photometric reprojection loss is weakened. Specifically,
[0041]
[0042] In addition, this method still uses the normal vector loss function L in StructDepth nrom and the coplanar loss constraint L plane , so these loss functions can be expressed as:
[0043] L=L pe +λ1L smooth +λ2L nrom +λ3L plane
[0044] (2) Construction of image edge similarity loss optimization function. Use the Canny operator to detect the edge of the indoor image. Use the Canny operator to detect the edge feature information images of the target image and the predicted depth image respectively; transform and stretch the two-dimensional edge information image into a one-dimensional feature vector block; calculate the cosine similarity of the two feature vector blocks. Therefore, the image edge similarity loss function calculation formula is:
[0045] L edge =1-cos(f(F edge ),f(D edge ))
[0046] Therefore, the total loss function of this patent is:
[0047] L all =L pe +λ1L smooth +λ2L nrom +λ3L plane +λ4L edge
[0048] The reprojection errors obtained by the two groups of networks are introduced into the loss function, and combined with other self-supervised loss functions to backpropagate and update network parameters, thereby iteratively optimizing the training network output.
[0049] A self-supervised monocular depth estimation system for unmanned driving of a coal mine monorail crane includes a depth estimation network based on an adaptive feature aggregation algorithm, a pose estimation network based on a rotation optimization algorithm, and a loss optimization module containing an image edge similarity loss function; and the encoder of the depth estimation network is a ResNet50 network structure, and the pose estimation network encoder uses a ResNet18 network structure.
[0050] The present invention has the following beneficial effects:
[0051] An algorithm and system for self-supervised monocular depth estimation in unmanned driving of coal mine monorail cranes are proposed. Specifically, an adaptive feature aggregation algorithm is first proposed to aggregate high- and low-scale features in depth estimation while adaptively maintaining their contextual consistency; then a rotation optimization algorithm is proposed to refine the rotation component by weighted fusion of the original main path and the first 3-dimensional vectors of other paths in the pose network; finally, an image edge similarity loss algorithm is proposed to provide shape priors for depth estimation as an additional self-supervisory signal to constrain the network. The present invention can effectively improve the accuracy of predicted depth, so that the coal mine monorail crane can more accurately estimate the distance between the position of operators and obstacles, enhance its ability to accurately judge and prevent collisions with obstacles and operators, and has good generalization performance, improving the safe passability of unmanned driving of coal mine monorail cranes. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is the overall framework diagram of the present invention;
[0053] Figure 2 It is a diagram of the depth estimation network structure;
[0054] Figure 3 is the adaptive feature aggregation module diagram;
[0055] Figure 4 It is a comparison between the traditional pose network and the improved pose network architecture;
[0056] Figure 5 It is a graph of image edge similarity calculation steps;
[0057] Figure 6 It is a comparison of the estimated depth map of the present invention and the advanced network on the NYU Depth V2 dataset;
[0058] Figure 7 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0059] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific preferred embodiments.
[0060] In the description of the present invention, it should be understood that the terms "left side", "right side", "upper part", "lower part" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. "First", "second" and the like do not indicate the importance of the components, and therefore cannot be understood as limiting the present invention. The specific dimensions used in this embodiment are only for illustrating the technical solution, and do not limit the scope of protection of the present invention.
[0061] like Figure 1-7 As shown, the self-supervised monocular depth estimation method in unmanned driving of a coal mine monorail crane provided by an embodiment of the present invention comprises the following steps:
[0062] 1. Build a depth estimation network based on the adaptive feature aggregation algorithm and use it to estimate the depth image of the input RGB image.
[0063] 2. Construct a pose estimation network based on the rotation optimization algorithm, use the network to predict the relative pose relationship of the camera, and reconstruct the image with the depth image obtained in the first step.
[0064] 3. Construct a loss optimization module containing an image edge similarity loss function, use this module to calculate the loss error between the reconstructed image and the input image, calculate the loss error value through forward propagation, and then update all weight parameters in the network through back propagation until the calculated loss reaches the minimum value and converges.
[0065] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0066] The present invention aims at the problem that the structural depth of the unmanned driving scene of the coal mine monorail crane varies greatly, the edges of objects beside the track are seriously staggered and overlapped, the existing network cannot effectively aggregate contextual information when performing target detection and depth estimation, lacks some key depth clues during detection and depth reasoning, and the continuous image sequence of the scene has a larger rotation component than the sequence of the driving scene of the rail crane outside the well. The rotation component predicted by the pose network has a large error, resulting in blurred edges of the predicted depth image, serious loss of details, and low accuracy. An algorithm for self-supervised monocular depth estimation in the unmanned driving of the coal mine monorail crane is proposed. Specifically, an adaptive feature aggregation algorithm is first proposed to aggregate high- and low-scale features in depth estimation while adaptively maintaining their contextual consistency; then a rotation optimization algorithm is proposed to refine the rotation component by weighted fusion of the original main path and the first 3-dimensional vectors of other paths in the pose network; finally, an image edge similarity loss algorithm is proposed to provide shape priors for depth estimation as an additional self-supervisory signal to constrain the network. The present invention can effectively improve the accuracy of predicted depth, so that the coal mine monorail crane can more accurately estimate the distance between the operator and the obstacle, enhance its ability to accurately judge and prevent collision with obstacles and operators, and has good generalization performance. The overall module framework of the invention is as follows Figure 1 shown.
[0067] The present invention also includes a self-supervised monocular depth estimation system for unmanned driving of a coal mine monorail crane, comprising a depth estimation network based on an adaptive feature aggregation algorithm, a posture estimation network based on a rotation optimization algorithm, and a loss optimization module containing an image edge similarity loss function; and the encoder of the depth estimation network is a ResNet50 network structure, and the posture estimation network encoder uses a ResNet18 network structure.
[0068] (1) Constructing a depth estimation network based on an adaptive feature aggregation algorithm
[0069] like Figure 2 As shown in the figure, Layer1-Layer5 represents the corresponding layers of the encoder and decoder, F1-F5, F1′-F5′ represent the output feature images of each layer of the encoder and decoder respectively, C1-C4 represent the output feature images of each layer of the encoder obtained by skip connection, as one of the inputs of the adaptive feature aggregation module, and the dotted line in the figure represents the skip connection between the encoder and the decoder. The ResNet50 network is used as the depth estimation network encoder, and the target image is used as input. The Bottleneck convolution module of ResNet50 is used to perform 5 layers of convolution and downsampling operations on the input image to reduce the feature resolution, extract different scale features, namely, feature images F1-F5 of each level, and finally obtain the extracted output feature image. During the downsampling process, the number of channels of the feature images of each level changes from low to high to 64, 256, 512, 1024, and 2056 respectively.
[0070] By embedding the decoder network of the adaptive feature aggregation algorithm, the feature image obtained by the decoder layer through standard bilinear interpolation upsampling and deconvolution operation is concatenated with the output of the encoder of the previous layer obtained by skip connection according to the channel, and then the offset map ΔC is predicted through two learning feature offset mapping branches. i , ΔF′ i+1 , respectively used to refine the feature image F′ i+1 and feature image C i , the refinement function R is refined by bilinear interpolation, that is, by the offset map Δ(p) in where p=[x,y] T Generating refinement features at locations The calculation formula is:
[0071]
[0072] Where p represents a pixel in the feature map, and <·> represents a bilinear interpolation operation. Figure 5 Two refinement features The formula is:
[0073]
[0074]
[0075] Finally, the two refined features are aggregated to obtain F″ i+1 , the formula is:
[0076]
[0077] in, Indicates direct pixel superposition, which will result in the aggregated feature F″ i+1 As the input of the previous level of the decoder, the above four aggregation processes are repeated in sequence, and finally the first level output feature image of the decoder is mapped with the Sigmoid function to obtain the predicted depth image D t The decoder network adaptively aggregates high- and low-scale feature images while decoding and restoring the feature images, effectively maintaining the contextual consistency between feature images, narrowing the semantic gap of contextual features, and enabling the network to predict depth information with clearer and smoother edges.
[0078] (2) Constructing a pose estimation network based on the rotation optimization algorithm
[0079] The pose estimation network is used to predict the relative pose of the target image and the source image. The accuracy of the relative pose affects whether the photometric reprojection loss function is effective in the network supervision, because inaccurate pose may cause the correspondence error between the target image and the source image pixels, resulting in depth prediction errors. Therefore, its performance will greatly affect the prediction effect of the self-supervised network model. The pose estimation network also uses the U-Net structure. The pose estimation network encoder uses the ResNet18 structure, and a pre-trained weight model is used in the pose encoder. The pre-trained weight model is a model obtained by training on a larger data set and can be directly used to solve similar problems. Here, the trained residual network model is introduced, and the pre-trained model is added to initialize the model parameters, which can save training time and reduce the risk of underfitting and overfitting during training. The dimension of the first convolution kernel in the pre-trained model is expanded so that the network can receive 6 channels as input. The weight in the expanded convolution kernel is divided by 2 to ensure that the value range after the convolution operation is the same as that of a single image entering the residual network. The encoder network finally outputs image features with a channel dimension of 512.
[0080] The image features extracted by the encoder are integrated through the decoder network embedded with the rotation optimization algorithm. Figure 5 Sub-image (a) The traditional pose estimation network first uses Squeeze to reduce the dimension of the image features, then arranges the image features in rows, and then performs multiple convolution operations to scale the matrix by 0.01. Finally, a 6-dimensional feature vector is obtained, which is the 6-DOF pose transformation of the image between adjacent frames. The first 3-dimensional feature in the form of Euler angles represents rotation, and the latter 3-dimensional feature represents translation. In specific applications, this vector needs to be converted into a pose matrix, which is shown in the following formula:
[0081]
[0082]
[0083]
[0084] Among them, r0, r1, r2 in the matrix represent the three Euler angles of the rotation component, that is:
[0085] r=[r0,r1,r2] T
[0086] The present invention embeds the pose rotation optimization algorithm in the traditional pose network decoder network and adopts a multi-path fusion refinement method to predict the 6-dimensional vector, such as Figure 5As shown in sub-figure (b), the rotation optimization module in area ② of the improved pose network is used. In the fourth layer of the pose decoder, the original single-layer convolution layer is changed to a multi-layer convolution layer. The original main path convolution layer still predicts a 6-dimensional vector, and the other path convolution layers predict 5-dimensional vectors, 4-dimensional vectors, etc. Finally, all the first 3-dimensional vectors are weighted fused and refined to obtain the output. The calculation formula is:
[0087] r=λ3R3+λ4R4+λ5R5+λ6R6+λ7R7+λ8R8..
[0088] Among them, the hyperparameter λ n Represents the weight coefficient, R n Represents the first 3-dimensional vector of the predicted multi-dimensional vector, and the number below represents the vector dimension of the current path output. Considering that if the rotation component of the original main path is directly added to the first 3-dimensional vectors of other paths, the components of other paths will interfere with the predicted rotation component, this patent uses smaller hyperparameters to less weaken the rotation component of the original main path, thereby improving the accuracy of the rotation component while reducing the impact on the main path data. Finally, the hyperparameter is set to 0.4, which greatly improves the prediction effect of the pose network. The reprojected image is jointly constructed based on the output results of the depth estimation network and the pose estimation network, and then the reprojection error is introduced into the loss function.
[0089] (3) Construct a loss optimization module containing image edge similarity loss function
[0090] Construction of conventional loss optimization function. From the above, we can see that in the first and second steps, given the target image I t and another perspective source image I s , using the predicted depth map as a bridge variable to train and constrain the image synthesis process. The training network needs to predict the depth image D of the target image. t , it is also necessary to estimate the relative pose T between a pair of target images and source images t→s [2] , so the photometric reprojection loss can be constructed as follows:
[0091]
[0092] I s→t =I s <proj(D t ,T t→s ,K)>
[0093] Where ρ is the photometric reconstruction error, which is a weighted combination of the L1 loss and the image structured similarity (SSIM) loss, defined as:
[0094]
[0095] Is→t The source image is warped to the target image coordinate frame according to the depth of the target image. This patent sets α to 0.85. proj() is the pixel coordinate p of the target image. t Mapped to the source image pixel coordinate p s The transformation function is calculated as follows:
[0096] p s ~KT t→s D t (p t )K -1 p t
[0097] <·> represents a locally subdifferentiable bilinear sampling operator in . Assuming that the camera intrinsic parameter matrix K of all images is the same, when low-texture areas appear in indoor images, the pixel-by-pixel smoothing loss function can constrain the depth value under the condition of weakening the photometric reprojection loss, specifically:
[0098]
[0099] in Indicates the average normalized inverse depth. During the training process, the present invention uses automatic masking to process static pixels. In addition, this method still uses StructDepth [1] The normal vector loss function L in nrom and the coplanar loss constraint L plane , so these loss functions can be expressed as:
[0100] L=L pe +λ1L smooth +λ2L nrom +λ3L plane
[0101] According to the experimental results, the hyperparameters λ1, λ2, and λ3 are weight parameters, which are set to 0.001, 0.05, and 0.1, respectively.
[0102] The image edge similarity loss optimization function is constructed. The Canny operator is used to detect the edge of the indoor image. Figure 5 As shown in the figure, the image edge similarity loss calculation steps are as follows: (1) Use the Canny operator to detect the edge feature information image F of the target image and the predicted depth image respectively. edge , D edge ; (2) Transform the two-dimensional edge information image into a one-dimensional feature vector block f(F edge )、f(D edge ); (3) Calculate the cosine similarity of the two feature vector blocks. Therefore, the image edge similarity loss function calculation formula is:
[0103] L edge =1-cos(f(F edge ),f(D edge ))
[0104] Where f() is the operation of converting a multi-dimensional feature vector into a one-dimensional feature vector, and is the operation of calculating the cosine similarity. Therefore, the total loss function of this patent is:
[0105] L all =L pe +λ1L smooth +λ2L nrom +λ3L plane +λ4L edge
[0106] According to the experimental results, the hyperparameter λ4 is set to 0.04. The reprojection errors obtained by the two groups of networks are introduced into the loss function, and other self-supervised loss functions are combined to back-propagate and update the network parameters, so as to iteratively optimize the training network output. The experimental indicators of the present invention and the advanced network on the NYU Depth V2 dataset are shown in Table 1. The baseline model is StructDepth_50. The baseline model is based on the StructDepth framework, and the depth estimation network encoder ResNet18 is replaced by ResNet50. It can be seen that the present invention improves the prediction depth accuracy of the baseline model by 0.6%. The visualization experimental effect of the present invention is shown in Figure 6 The present invention effectively improves the accuracy of the predicted depth, so that the coal mine monorail crane can more accurately estimate the distance between the operator and the obstacle, enhances its ability to accurately judge and prevent collisions with obstacles and operators, improves the unmanned driving safety of the coal mine monorail crane, and has good generalization performance.
[0107]
[0108]
[0109] Table 1 Experimental indicators of the present invention and advanced networks on the NYU Depth V2 dataset
[0110] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A self-supervised monocular depth estimation method for unmanned driving of coal mine monorail crane, characterized by: The following steps are involved: S1. Constructing a depth estimation network based on an adaptive feature aggregation algorithm, and using the depth estimation network to estimate a depth image of an input RGB image; S2, constructing a pose estimation network based on a rotation optimization algorithm, using the pose estimation network to predict the relative pose relationship of the camera, and reconstructing an image with the depth image obtained in S1; S3, constructing a loss optimization module containing an image edge similarity loss function, using the loss optimization module to calculate the loss error between the reconstructed image and the input image, forward propagating the loss error value, and then back propagating to update all weight parameters in the network until the calculated loss reaches a minimum value and converges; In S1, the ResNet50 network is used as a depth estimation network encoder, the target image is used as input, and the Bottleneck convolution module of ResNet50 is used to perform 5-layer convolution and downsampling operations on the input image to reduce the feature resolution, extract features of different scales, i.e., feature images of each level, and finally obtain the extracted output feature image; During the downsampling process, the number of feature image channels at each level varies from low to high to 64, 256, 512, 1024 and 2056 respectively; The decoder network of the adaptive feature aggregation algorithm is embedded in S1, which concatenates the feature image obtained by standard bilinear interpolation upsampling and deconvolution operation at the decoder level with the output of the encoder at the previous level obtained by skip connection according to the channel, and then predicts the offset map ΔC through two learning feature offset mapping branches i and ΔF′ i+1 , the refinement function R is refined by bilinear interpolation, that is, by using the offset map Δ(p) in where p=[x,y] T Generating refinement features at locations The calculation formula is: Where p represents a pixel in the feature map, and <·> represents a bilinear interpolation operation; Two refinement features The formula is: Among them, R is the refinement function, F i+1 Output feature images for each layer of the encoder; C i is the output feature image of each layer of the encoder obtained by skip connection; ΔC i and ΔF′ i+1 is the offset map; The last two refined features are aggregated to obtain F″ i+1 , the formula is: in, Indicates direct pixel superposition, which will result in the aggregated feature F″ i+1 As the input of the previous level of the decoder, the above four aggregation processes are repeated in sequence, and finally the first level output feature image of the decoder is mapped with the Sigmoid function to obtain the predicted depth image D t ; The pose estimation network encoder in S2 uses a ResNet18 structure, and a pre-trained weight model is used in the pose encoder; The dimension of the first convolution kernel in the pre-trained model is expanded so that the network receives 6 channels as input. The weights in the expanded convolution kernel are divided by 2. The encoder network finally outputs image features with a channel dimension of 512. The fourth layer of the pose decoder is a multi-layer convolutional layer, which performs weighted fusion and refinement on all the first 3-dimensional vectors to obtain the output. The calculation formula is: r=λ3R3+λ4R4+λ5R5+λ6R6+λ7R7+λ8R8.. Among them, the hyperparameter λ n represents the weight coefficient, and the hyperparameter λ n is 0.4, R n Represents the first 3-dimensional vector of the predicted multi-dimensional vector, and the number below represents the vector dimension of the current path output; The image edge similarity loss calculation step in S3 includes: S31, using the Canny operator to detect the edge feature information image F of the target image and the predicted depth image respectively edge , D edge ; S32, converting and stretching the two-dimensional edge information image into a one-dimensional feature vector block f(F edge )、f(D edge ); S33, calculating the cosine similarity of the two feature vector blocks; The image edge similarity loss function calculation formula is: L edge =1-cos(f(F edge ),f(D edge )) Where f() is the operation of converting a multi-dimensional feature vector into a one-dimensional feature vector, and cos() is the operation of calculating the cosine similarity; The total loss function is: L all =L pe +λ1L smooth +λ2L nrom +λ3L plane +λ4L edge L pe is the photometric reprojection loss, L smooth is the pixel-by-pixel smoothing loss function, L nrom is the normal vector loss function, L plane is the coplanar loss constraint, L edge is the image edge similarity loss function, and the weight parameters λ1, λ2, λ3 and λ4 are set to 0.001, 0.05, 0.1 and 0.04 respectively.
2. A system based on the self-supervised monocular depth estimation method in unmanned driving of coal mine monorail crane according to claim 1, characterized in that: It includes a depth estimation network based on an adaptive feature aggregation algorithm, a pose estimation network based on a rotation optimization algorithm, and a loss optimization module containing an image edge similarity loss function; and the encoder of the depth estimation network is a ResNet50 network structure, and the pose estimation network encoder uses a ResNet18 network structure.
Citation Information
Patent Citations
Rapid monocular depth estimation method suitable for embedded platform
CN110599533A
Self-supervised monocular depth estimation method based on feature sharing
CN113034563A
Foresight scene depth estimation method based on self-supervised learning
CN113313732A
Monocular depth estimation method based on unsupervised deep learning
CN114170286A
