Monocular self-supervised underwater image depth estimation method, device and storage medium
By constructing a monocular self-supervised underwater image depth estimation network and using the method of combining GAN and CNN, the problem of low accuracy of monocular depth estimation in underwater scenes is solved, and fast and accurate depth estimation and object feature discrimination are achieved, which is suitable for Underwater biological detection.
Patent Information
- Application Number
- CN202210751916.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-06-28
AI Technical Summary
Existing monocular depth estimation methods have low accuracy in underwater scenes, especially when there are moving targets, and unsupervised methods rely on the assumption that there is only camera motion in the scene, ignoring the existence of underwater creatures. , causing the prediction accuracy to be affected.
Generative Adversarial Network (GAN) and Convolutional Neural Network (CNN) are used to construct a monocular self-supervised underwater image depth estimation network. The depth map is calculated through relative disparity map and relative pose, and a recurrent generation network is introduced into the network to enhance the data. Utilize and feature resolution to form a Cycle-GAN structure.
It achieves fast and accurate depth estimation in underwater images, improves the accuracy of depth estimation and object feature resolution, and is suitable for target detection and weight and length measurement of underwater creatures.
Smart Images

Figure CN115082537B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of underwater image processing, and in particular to a method, a device and a storage medium for monocular self-supervised underwater image depth estimation. Background Art
[0002] In underwater scenes, in order to accurately measure the weight and length of fish in real time, accurate depth estimation is first required. Depth estimation is a fundamental problem in the field of computer vision. It is to estimate the depth of the scene in the image, that is, the vertical distance from each pixel in the scene to the camera imaging plane. The purpose is to help the computer understand the depth of the image and predict the distance of the scene elements for each pixel. It can be applied in robot navigation, augmented reality, 3D reconstruction, autonomous driving and other fields. Although there are many devices that can directly obtain depth, the equipment is expensive.
[0003] Depth estimation based on monocular only uses video sequences and images from one viewpoint to estimate the distance of each pixel in the image relative to the shooting source. It has the advantages of low price, rich information content, and small sensor size. Compared with binocular and multi-view, most application scenarios have only one viewpoint. For example, for the human eye, due to the existence of a large amount of prior knowledge, a large amount of depth information can be extracted from the image information obtained by one eye, so monocular is closer to actual application needs. Monocular depth estimation not only needs to learn objective depth information from two-dimensional images, but also needs to extract some empirical information, the latter of which is more sensitive to the camera and scene in the data set.
[0004] At present, single-purpose depth estimation methods can be divided into supervised and unsupervised methods according to whether real depth labels are used. Supervised methods use a single image as training data, regard depth estimation as a regression task of dense prediction, and use convolutional neural networks to fit depth values. However, the shortcomings of this type of method are also obvious. It relies on a large amount of labeled data, and the cost of obtaining the corresponding depth labels is high. Unsupervised methods are inspired by traditional motion-based methods, using continuous image sequences as training data to infer the three-dimensional structure of the scene based on the movement of the camera. However, this type of method needs to assume that only the camera moves in the scene, that is, it ignores the existence of moving targets such as fish swimming underwater. When there are a large number of moving targets in the scene, the prediction accuracy of this type of method will be greatly affected. Summary of the invention
[0005] To solve the above problems, the present invention proposes a monocular self-supervised underwater image depth estimation method, device and storage medium, and constructs a monocular self-supervised underwater image depth estimation network by combining a generative adversarial network (GAN) and a convolutional neural network (CNN) to quickly and accurately estimate the depth of underwater images.
[0006] To this end, the present invention provides the following technical solutions:
[0007] On the one hand, the present invention provides a monocular self-supervised underwater image depth estimation method, the method comprising:
[0008] Obtain underwater image videos captured by a monocular camera;
[0009] Adjacent frame images in the underwater image video are input into a trained monocular self-supervised underwater image depth estimation network to obtain a relative disparity map and a relative pose; wherein the monocular self-supervised underwater image depth estimation network includes two parts: an unsupervised adversarial depth estimation network composed of a first generative adversarial network and a camera pose estimation network, and a cyclic generative network for adversarial depth estimation formed by adding a second generative adversarial network to the unsupervised adversarial depth estimation network; the generator of the first generative adversarial network takes the first frame image in the adjacent frame images as input and outputs a relative disparity map; the pose estimation network takes the second frame image in the adjacent frame images as input and outputs a relative pose; the cyclic generative network synthesizes images of different perspectives in a cyclic manner to form self-supervision for the depth estimation network;
[0010] A depth map is calculated based on the relative disparity map and the relative pose.
[0011] Furthermore, the cyclic generative network synthesizes images of different perspectives in a cyclic manner, including:
[0012] The first frame image I generated by the first generative adversarial network t The corresponding first disparity map d t And the second frame image I generated by the pose estimation network t-1 The corresponding relative pose P t,t-1 Distorted reconstruction, the first reconstructed image I is obtained t-1 ′;
[0013] The first reconstructed image I t-1 ′ is input to the generator of the second generative adversarial network to generate the first reconstructed image I t-1 ′The corresponding second disparity map d t-1 ;
[0014] The second disparity map d t-1 and relative pose P t,t-1 Distorted reconstruction, the second reconstructed image I is obtained t ′.
[0015] Furthermore, the training of the monocular self-supervised underwater image depth estimation network includes:
[0016] Calculate the first reconstructed image I t-1 ′ and the first frame image I t Minimize the photometric loss between
[0017] Calculate the second frame image I t-1 With the first reconstructed image I t-1 ′Reconstruction consistency loss between ′;
[0018] Calculate the first frame image I t With the second reconstructed image I t ′ between cycle consistency loss;
[0019] Calculate the first frame image I t With the second reconstructed image I t ′; the perceptual consistency loss between
[0020] Calculating the generative adversarial loss of the first generative adversarial network and the second generative adversarial network;
[0021] Iterative training is performed based on photometric loss, reconstruction consistency loss, cycle consistency loss, perceptual consistency loss and generative adversarial loss to obtain a trained monocular self-supervised underwater image depth estimation network.
[0022] Furthermore, the function that minimizes the photometric loss is calculated as:
[0023]
[0024] Where N is I t Projection to I t-1 The set of valid points in the image plane, p is a generic point in N, I t (p) is a target value, is the estimated value of the model output, and the SSIM function represents I t (p) The similarity between the elements solves the lighting changes.
[0025] Among them, C1, C2 are constants, μ represents the mean, and σ represents the variance, which represents the local statistics of the image color.
[0026] Furthermore, the function for calculating the reconstruction consistency loss is:
[0027]
[0028] Among them, I t-1 is the second frame of the input video, is the reconstructed second frame image.
[0029] Furthermore, the function for calculating the cycle consistency loss is:
[0030]
[0031] in, For forward cycle consistency, I t After one of the generators generates an image G1(I t ), and is generated back as the input of another generator G2(G1(I t )), as close as possible to the original image, I t →G1(I t )→G2(G1(I t ))≈I t ; For reverse cycle consistency, the specific process principle is the same as above. t-1 →G1(I t-1 )→G2(G1(I t-1 ))≈I t-1 .
[0032] Furthermore, the function for calculating the perceptual consistency loss is:
[0033]
[0034]
[0035] where || ||2 represents the standard L2-norm and Represents a feature extractor.
[0036] Furthermore, the function for calculating the generated adversarial loss is:
[0037]
[0038] Among them, the adversarial loss is applied to two mappings G1 and G2; G1 and G2 are generator networks, D1 and D2 are corresponding identifiers, the role of the generator is to generate a disparity map, and the role of the identifier is to distinguish whether the generated one is the corresponding disparity map.
[0039] In another aspect, the present invention further provides a monocular self-supervised underwater image depth estimation device, comprising:
[0040] A video acquisition unit, used to acquire underwater image videos taken by a monocular camera;
[0041] The model building unit is used to build a monocular self-supervised underwater image depth estimation network, which includes two parts: an unsupervised adversarial depth estimation network composed of a first generative adversarial network and a camera pose estimation network, and a cyclic generative network for adversarial depth estimation formed by adding a second generative adversarial network to the unsupervised adversarial depth estimation network; the generator of the first generative adversarial network takes the first frame image I in adjacent frame images as the first frame image I in the adjacent frame images. t As input, output the first frame image I t The corresponding first disparity map d t ; The pose estimation network uses the second frame image I in the adjacent frame image t-1 As input, the output relative pose P t,t-1 ; The generator of the second generative adversarial network takes the first disparity map d t and relative pose P t,t-1 The first reconstructed image I obtained by warping reconstruction t-1 ' is input and output is the first reconstructed image I t-1 ′The corresponding second disparity map d t-1 ; The second disparity map d t-1 and relative pose P t,t-1 Distorted reconstruction, the second reconstructed image I is obtained t ′;
[0042] A model training unit is used to train the monocular self-supervised underwater image depth estimation network established by the model establishment unit, comprising: calculating a first reconstructed image I t-1 ′ and the first frame image I t Minimize the photometric loss between; Calculate the second frame image I t-1 With the first reconstructed image I t-1 ′Reconstruction consistency loss between the two; Calculate the first frame image I t With the second reconstructed image I t ′ between the cycle consistency loss; Calculate the first frame image I t With the second reconstructed image I t ′; calculating the generative adversarial loss of the first generative adversarial network and the second generative adversarial network; iteratively training based on photometric loss, reconstruction consistency loss, cycle consistency loss, perceptual consistency loss and generative adversarial loss to obtain a trained monocular self-supervised underwater image depth estimation network;
[0043] The depth estimation unit is used to input adjacent frame images in the underwater image video acquired by the video acquisition unit into a trained monocular self-supervised underwater image depth estimation network to obtain a relative disparity map and a relative pose; based on the relative disparity map and the relative pose, a depth map is calculated.
[0044] On the other hand, the present invention also provides a computer-readable storage medium, which stores a computer instruction set. When the computer instruction set is executed by a processor, the monocular self-supervised underwater image depth estimation method as described above is implemented.
[0045] Advantages and positive effects of the present invention: Most of the existing depth estimation methods are for land scenes. The present invention is applied to the depth estimation of underwater images, which can obtain accurate depth estimation results and is of great help in target detection of underwater organisms and measurement of their weight and length.
[0046] The present invention is based on self-supervised single-purpose underwater image depth estimation. Aiming at the problem that large-scale data sets with depth labels are difficult to obtain, based on an unsupervised method, it is proposed to use a generative adversarial network architecture in the depth estimation network structure, realize self-supervision in a cyclic manner, control the importance of features at different spatial positions, enhance the feature resolution of objects, and improve the accuracy of depth estimation.
[0047] Compared with the existing unsupervised depth estimation methods, such as patent CN111783582A-an unsupervised monocular depth estimation algorithm based on deep learning, the present invention uses two generative adversarial networks to form a cycle structure of Cycle-GAN for the depth estimation of underwater images, which is conducive to data enhancement. Cycle-GAN is essentially two mirror-symmetric GANs, forming a ring network. The two GANs share two generators, and each has a discriminator, that is, there are two discriminators and two generators. A unidirectional GAN has two losses, and two have a total of four losses. The second half-cycle prevents the first half-cycle network from predicting inconsistent disparity pairs, and the two cycles share parameters. Although this process increases the complexity of the training model, it does not increase the amount of calculation, and can achieve fast and accurate depth estimation of underwater images. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0049] Figure 1Flow chart of a monocular self-supervised underwater image depth estimation method according to an embodiment of the present invention;
[0050] Figure 2 A network model for monocular self-supervised underwater image depth estimation in an embodiment of the present invention;
[0051] Figure 3 4 is a structural block diagram of a monocular self-supervised underwater image depth estimation device in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0054] In order to achieve real-time monocular image depth estimation, the present invention proposes a monocular self-supervised underwater image depth estimation method. Two GANs and a CNN-based relative pose network are used to construct a monocular self-supervised underwater image depth estimation network. The network is trained on images of adjacent frames in an underwater video time series, and takes adjacent frame images in the input video as model input, and outputs relative disparity maps and relative poses for calculating depth maps.
[0055] like Figure 1 As shown, it shows a monocular self-supervised underwater image depth estimation method in an embodiment of the present invention, the method comprising the following steps:
[0056] S1, obtaining underwater image video captured by a monocular camera;
[0057] S2, inputting adjacent frame images in the underwater image video into a trained monocular self-supervised underwater image depth estimation network to obtain a relative disparity map and relative pose;
[0058] Among them, the monocular self-supervised underwater image depth estimation network consists of two parts:
[0059] (1) Unsupervised adversarial depth estimation network:
[0060] It consists of a first generative adversarial network and a camera pose estimation network; adjacent frame images in the input video enter the generator of the first generative adversarial network and the camera pose estimation network respectively, predict the relative disparity map and relative pose, and the depth map can be calculated through the formula based on the relative disparity map and relative pose. Among them, the first generative adversarial network takes the first frame image in the adjacent frame images as input and outputs the relative disparity map; the pose estimation network takes the second frame image in the adjacent frame images as input and outputs the relative pose. It should be noted here that the first frame image and the second frame image can be two adjacent frames at any position in the underwater image video, and are not limited to two frames starting from the initial frame of the underwater image video.
[0061] The input image and the adjacent frame images are paired to train the enhanced network, solving the problem of lack of supervisory signals in the enhanced network.
[0062] (2) Cyclic Generative Network for Adversarial Depth Estimation:
[0063] In order to make the reconstruction of adjacent frame images have potential constraints on each other, the present invention proposes a cyclic generative network structure. On the basis of the above unsupervised adversarial depth estimation network, a second generative adversarial network is added. The first generative adversarial network generates a disparity map of two adjacent frame images, and the second generative adversarial network synthesizes images of different perspectives in a cyclic manner to form self-supervision for the depth estimation network. Photometric loss, cycle consistency loss, etc. are used to help optimize the generator and pose estimation network.
[0064] S3. Calculate a depth map based on the relative disparity map and the relative pose.
[0065] For ease of understanding, the above monocular self-supervised underwater image depth estimation network is described in detail below. Figure 1 As shown, two adjacent frame images I in the input video t and I t-1 Enter the first generator network G1 and the camera pose estimation network respectively. The first generator network G1 generates I t The corresponding disparity map d t , the camera pose estimation network estimates the relative pose P t,t-1 , disparity map d t With relative pose Pt,t-1 Wrapping Reconstruction I t-1 ′,I t-1 ′ and I t Minimize the photometric loss function:
[0066]
[0067] Where N is I t Projection to I t-1 The set of valid points in the image plane, p is a generic point in N, I t (p) is a target value, is the estimated value of the model output, and the SSIM function represents I t (p) The similarity between the elements solves the lighting changes. Among them, C1, C2 are constants, μ represents the mean, and σ represents the variance, which represents the local statistics of the image color.
[0068] Optimize network and enhance I t-1 In order to solve the problem of moving objects in static scenes, the photometric reconstruction error of this part should be multiplied by a mask.
[0069] At the same time, I t-1 with I t-1 ′Reconstruct the consistency loss function between:
[0070]
[0071] Among them, I t-1 is the second frame of the input video, is the reconstructed second frame image.
[0072] I t-1 'Generate I through the second generator network G2 t-1 ′ corresponds to the disparity map d t-1 , disparity map d t-1 With relative pose P t,t-1 Wrapping Reconstruction I t ′.
[0073] In order to distinguish the two generator networks G1 and G2, ensure that the generated image retains the information of the source image as much as possible, and make the data distribution generated by the generator network as close to the real data distribution as possible, I t with I t ′Perform cycle consistency loss function:
[0074]
[0075] in, For forward cycle consistency, I t After one of the generators generates an image G1(I t ), and is generated back as the input of another generator G2(G1(I t )), as close as possible to the original image, I t →G1(I t )→G2(G1(I t ))≈I t ; For reverse cycle consistency, the specific process principle is the same as above. t-1 →G1(I t-1 )→G2(G1(I t-1 ))≈I t-1 .
[0076] GAN consists of a generator G and a discriminator D. In each epoch, the generator and discriminator of GAN are trained separately, that is, the generator G is fixed first, and the discriminator D is trained. The goal of the generator is to output synthetic images that the discriminator classifies as real. The purpose is to generate more and more real pictures, update the parameters of G, and D(G(I)) tends to 1. In the process of tending to 1, due to the update of G's parameters, the loss function value is also reduced, so that pictures closer to reality are generated. The loss function of the generative adversarial network is:
[0077]
[0078] Among them, the adversarial loss is applied to two mappings G1 and G2; G1 and G2 are generator networks, D1 and D2 are corresponding identifiers, the role of the generator is to generate a disparity map, and the role of the identifier is to distinguish whether the generated one is the corresponding disparity map.
[0079] In order to compare the features obtained by convolution of the real image with those obtained by convolution of the generated image, the high-level information (content and global structure) is close and the original image structure is maintained. t with I t ′Do the perceptual consistency loss function between:
[0080]
[0081] where || ||2 represents the standard L2-norm and Represents a feature extractor.
[0082] In the embodiment of the present invention, the depth estimation applied to underwater images can obtain accurate depth estimation results, and is of great help to the target detection of underwater creatures and the measurement of their weight and length. The depth estimation method in the embodiment of the present invention is based on self-supervised single-purpose underwater image depth estimation. In view of the problem that large-scale data sets with depth labels are difficult to obtain, based on an unsupervised method, it is proposed to use a generative adversarial network architecture in the depth estimation network structure, realize self-supervision in a cyclic manner, control the importance of features at different spatial positions, enhance the feature resolution of objects, and improve the accuracy of depth estimation.
[0083] Corresponding to the monocular self-supervised underwater image depth estimation method of the present invention, the present invention also provides a monocular self-supervised underwater image depth estimation device, such as Figure 3 As shown, the device comprises:
[0084] The video acquisition unit 100 is used to acquire underwater image videos taken by a monocular camera;
[0085] The model building unit 200 is used to construct a monocular self-supervised underwater image depth estimation network, which includes two parts: an unsupervised adversarial depth estimation network composed of a first generative adversarial network and a camera pose estimation network, and a cyclic generative network for adversarial depth estimation formed by adding a second generative adversarial network to the unsupervised adversarial depth estimation network; the generator of the first generative adversarial network takes the first frame image I in the adjacent frame images as an input. t As input, output the first frame image I t The corresponding first disparity map d t ; The pose estimation network uses the second frame image I in the adjacent frame image t-1 As input, the output is the relative pose P t,t-1 ; The generator of the second generative adversarial network takes the first disparity map d t and relative pose P t,t-1 The first reconstructed image I obtained by warping reconstruction t-1 ' is input and output is the first reconstructed image I t-1 ′The corresponding second disparity map d t-1 ; The second disparity map d t-1 and relative pose P t,t-1 Distorted reconstruction, the second reconstructed image I is obtained t ′;
[0086] The model training unit 300 is used to train the monocular self-supervised underwater image depth estimation network constructed by the model building unit 200, including calculating the first reconstructed image I t-1 ′ and the first frame image I t Minimize the photometric loss between; Calculate the second frame image I t-1With the first reconstructed image I t-1 ′Reconstruction consistency loss between the two; Calculate the first frame image I t With the second reconstructed image I t ′ between the cycle consistency loss; Calculate the first frame image I t With the second reconstructed image I t ′; calculating the generative adversarial loss of the first generative adversarial network and the second generative adversarial network; iteratively training based on photometric loss, reconstruction consistency loss, cycle consistency loss, perceptual consistency loss and generative adversarial loss to obtain a trained monocular self-supervised underwater image depth estimation network;
[0087] The depth estimation unit 400 is used to input the adjacent frame images in the underwater image video acquired by the video acquisition unit 100 into the monocular self-supervised underwater image depth estimation network trained by the model training unit 300 to obtain a relative disparity map and a relative pose; based on the relative disparity map and the relative pose, a depth map is calculated.
[0088] For the monocular self-supervised underwater image depth estimation device in the embodiment of the present invention, since it corresponds to the monocular self-supervised underwater image depth estimation method in the above embodiment, the description is relatively simple. For relevant similarities, please refer to the description of the monocular self-supervised underwater image depth estimation method in the above embodiment, which will not be described in detail here.
[0089] An embodiment of the present invention further discloses a computer-readable storage medium, which stores a computer instruction set. When the computer instruction set is executed by a processor, the monocular self-supervised underwater image depth estimation method provided in any of the above embodiments is implemented.
[0090] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0091] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0092] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0093] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A monocular self-supervised underwater image depth estimation method, characterized in that: The method comprises: Obtain underwater image videos captured by a monocular camera; Adjacent frame images in the underwater image video are input into a trained monocular self-supervised underwater image depth estimation network to obtain a relative disparity map and a relative pose; wherein the monocular self-supervised underwater image depth estimation network includes two parts: an unsupervised adversarial depth estimation network composed of a first generative adversarial network and a camera pose estimation network, and a cyclic generative network for adversarial depth estimation formed by adding a second generative adversarial network to the unsupervised adversarial depth estimation network; the generator of the first generative adversarial network takes the first frame image in the adjacent frame images as input and outputs a relative disparity map; the pose estimation network takes the second frame image in the adjacent frame images as input and outputs a relative pose; the cyclic generative network synthesizes images of different perspectives in a cyclic manner to form self-supervision for the depth estimation network; A depth map is calculated based on the relative disparity map and the relative pose.
2. The monocular self-supervised underwater image depth estimation method according to claim 1, characterized in that: The cycle generation network synthesizes images of different perspectives in a cycle, including: The first frame image I generated by the first generative adversarial network t The corresponding first disparity map d t And the second frame image I generated by the pose estimation network t-1 The corresponding relative pose P t,t-1 Distorted reconstruction, the first reconstructed image I is obtained t-1 ′; The first reconstructed image I t-1 ′ is input to the generator of the second generative adversarial network to generate the first reconstructed image I t-1 ′The corresponding second disparity map d t-1 ; The second disparity map d t-1 and relative pose P t,t-1 Distorted reconstruction, the second reconstructed image I is obtained t ′.
3. The monocular self-supervised underwater image depth estimation method according to claim 2, characterized in that: The training of the monocular self-supervised underwater image depth estimation network includes: Calculate the first reconstructed image I t-1 ′ and the first frame image I t Minimize the photometric loss between Calculate the second frame image I t-1 With the first reconstructed image I t-1 ′Reconstruction consistency loss between ′; Calculate the first frame image I t With the second reconstructed image I t ′ between cycle consistency loss; Calculate the first frame image I t With the second reconstructed image I t ′; the perceptual consistency loss between Calculating the generative adversarial loss of the first generative adversarial network and the second generative adversarial network; Iterative training is performed based on photometric loss, reconstruction consistency loss, cycle consistency loss, perceptual consistency loss and generative adversarial loss to obtain a trained monocular self-supervised underwater image depth estimation network.
4. The monocular self-supervised underwater image depth estimation method according to claim 3, characterized in that: The function that minimizes the photometric loss is calculated as: Where N is I t Projection to I t-1 The set of valid points in the image plane, p is a generic point in N, I t (p) is a target value, is the estimated value of the model output, and the SSIM function represents I t (p) The similarity between the elements solves the lighting changes. Among them, C1, C2 are constants, μ represents the mean, and σ represents the variance, which represents the local statistics of the image color.
5. The monocular self-supervised underwater image depth estimation method according to claim 3, characterized in that: The function for calculating the reconstruction consistency loss is: Among them, I t-1 is the second frame of the input video, is the reconstructed second frame image.
6. The monocular self-supervised underwater image depth estimation method according to claim 3, characterized in that: The function for calculating the cycle consistency loss is: in, For forward cycle consistency, I t After one of the generators generates an image G1(I t ), and is generated back as the input of another generator G2(G1(I t )), as close as possible to the original image, I t →G1(I t )→G2(G1(I t ))≈I t ; For reverse cycle consistency, the specific process principle is the same as above. t-1 →G1(I t-1 )→G2(G1(I t-1 ))≈I t-1 .
7. The monocular self-supervised underwater image depth estimation method according to claim 3, characterized in that: The function for calculating perceptual consistency loss is: where ||||2 represents the standard L2-norm and Represents a feature extractor.
8. The monocular self-supervised underwater image depth estimation method according to claim 3, characterized in that: The function for calculating the generated adversarial loss is: Among them, the adversarial loss is applied to two mappings G1 and G2; G1 and G2 are generator networks, D1 and D2 are corresponding identifiers, the role of the generator is to generate a disparity map, and the role of the identifier is to distinguish whether the generated disparity map is its corresponding one.
9. A monocular self-supervised underwater image depth estimation device, characterized in that: include: A video acquisition unit, used to acquire underwater image videos taken by a monocular camera; A model building unit is used to construct a monocular self-supervised underwater image depth estimation network, which includes two parts: an unsupervised adversarial depth estimation network composed of a first generative adversarial network and a camera pose estimation network, and a recurrent generative network for adversarial depth estimation formed by adding a second generative adversarial network to the unsupervised adversarial depth estimation network; The generator of the first generative adversarial network takes the first frame image I in the adjacent frame images t As input, output the first frame image I t The corresponding first disparity map d t ; The pose estimation network uses the second frame image I in the adjacent frame image t-1 As input, the output is the relative pose P t , t-1 ; The generator of the second generative adversarial network takes the first disparity map d t and relative pose P t,t-1 The first reconstructed image I obtained by warping reconstruction t-1 ' is input and output is the first reconstructed image I t-1 ′The corresponding second disparity map d t-1 ; The second disparity map d t-1 and relative pose P t,t-1 Distorted reconstruction, the second reconstructed image I is obtained t ′; A model training unit is used to train the monocular self-supervised underwater image depth estimation network established by the model establishment unit, comprising: calculating a first reconstructed image I t-1 ′ and the first frame image I t Minimize the photometric loss between; Calculate the second frame image I t-1 With the first reconstructed image I t-1 ′Reconstruction consistency loss between the two; Calculate the first frame image I t With the second reconstructed image I t ′ between the cycle consistency loss; Calculate the first frame image I t With the second reconstructed image I t ′; calculating the generative adversarial loss of the first generative adversarial network and the second generative adversarial network; iteratively training based on photometric loss, reconstruction consistency loss, cycle consistency loss, perceptual consistency loss and generative adversarial loss to obtain a trained monocular self-supervised underwater image depth estimation network; The depth estimation unit is used to input adjacent frame images in the underwater image video acquired by the video acquisition unit into a trained monocular self-supervised underwater image depth estimation network to obtain a relative disparity map and a relative pose; based on the relative disparity map and the relative pose, a depth map is calculated.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer instruction set, and when the computer instruction set is executed by a processor, the monocular self-supervised underwater image depth estimation method as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Unsupervised monocular depth estimation algorithm based on deep learning
CN111783582A
Monocular unsupervised depth estimation method based on context attention mechanism
CN111739078A
Self-lifting learning method and device for self-supervised monocular depth estimation and equipment
CN113724155A
Monocular endoscope depth and pose estimation method and device based on unsupervised learning
CN114022527A
Key point thermodynamic diagram guided self-supervised monocular visual odometer method
CN114663509A
