Underwater monocular depth estimation method and system based on uppg and gsfi
By combining the UPPG and GSFI-based underwater monocular depth estimation method with global-state feature interaction and underwater physical prior guidance, the problems of blurred depth boundaries and high computational complexity in underwater monocular depth estimation are solved, achieving high-precision and low-complexity depth estimation results.
Patent Information
- Application Number
- CN202611346526.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-11-27
AI Technical Summary
Existing underwater monocular depth estimation methods struggle to accurately reconstruct the true spatial structure in complex underwater environments. Depth boundaries are easily blurred, depths are discontinuous in distant regions, and computational complexity is high, making it difficult to balance depth estimation accuracy, structural consistency, and computational efficiency.
An underwater monocular depth estimation method based on UPPG and GSFI is adopted. Semantic features are extracted through a hybrid encoder. The global-state feature interaction module GSFI and the underwater physical prior guidance module UPPG are combined. The inverted transmission prior features are used for feature reweighting and binning regression to achieve global context modeling, long-range dependency modeling and local texture perception. The feature expression method is dynamically adjusted to reduce computational complexity.
It improves structural consistency and depth prediction accuracy in complex underwater degradation scenarios, enhances the model's adaptability to non-uniform degradation regions, reduces depth prediction bias, and improves depth recovery capability and prediction stability in distant regions.
Smart Images

Figure CN123181527A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer vision and image processing technology, specifically to an underwater monocular depth estimation method and system based on UPPG and GSFI. Background Technology
[0002] Underwater monocular depth estimation (UMDE) is a fundamental technology in the field of underwater visual perception, widely used in tasks such as autonomous navigation of underwater robots, underwater target detection, 3D scene reconstruction, marine resource development, and underwater environmental monitoring. Compared with active ranging methods such as binocular vision, lidar, or sonar, monocular depth estimation can recover scene depth information based on only a single RGB image, offering advantages such as low equipment cost, flexible deployment, and strong environmental adaptability. Therefore, it has significant research value and application prospects in complex underwater environments.
[0003] However, underwater imaging is affected by complex physical degradation factors such as light absorption, forward scattering, and backscattering. The attenuation of different wavelengths of light in water varies significantly, especially in the red channel, where attenuation is more severe. Simultaneously, scattering effects caused by suspended particles lead to color shifts, low contrast, blurred edges, texture loss, and degradation of information in distant areas, resulting in noticeably non-uniform degradation characteristics in underwater images. These issues make it difficult for traditional depth estimation methods based on single RGB images to accurately reconstruct the true spatial structure in underwater scenes. Depth boundaries are easily blurred, depth in distant areas is discontinuous, and cross-scene generalization ability is limited.
[0004] In existing technologies, while convolutional neural network-based methods can effectively extract local texture and edge features, they are limited by the receptive field of convolution and have difficulty fully modeling spatial dependencies between distant regions. In complex underwater environments, they are prone to problems such as depth discontinuity and insufficient structural representation. Transformer-based methods enhance global context modeling capabilities, but their computational complexity is high, which can lead to significant computational overhead in high-resolution underwater image processing. They also have insufficient ability to represent local texture and boundary details. While visual state space model-based methods can model long-range spatial dependencies with lower complexity, they are usually difficult to balance global semantic modeling capabilities and fine-grained structural representation capabilities when used alone.
[0005] Furthermore, existing methods for incorporating underwater physical priors are mostly concentrated in image enhancement, input preprocessing, loss function constraints, or post-processing stages, rarely explicitly utilizing the physical laws of underwater imaging during feature learning and cross-layer feature interaction in depth estimation networks. While some methods introduce priors in transmittance, background light, or dark channels, these physical priors are typically used directly for feature guidance, failing to fully consider the discrepancies between physical degradation information and depth semantics. For example, underwater transmittance is affected by object color, local illumination, reflectance, and water turbidity, and its variation trend is not strictly equivalent to the true depth distribution. Directly using physical priors for depth feature guidance can easily lead to erroneous constraints, affecting the depth recovery effect in complex degraded regions.
[0006] On the other hand, in the process of global feature modeling and long-range dependency modeling, existing methods typically use fixed weights or simple feature concatenation for fusion, making it difficult to dynamically adjust the feature sources according to the degree of degradation in different regions. For example, in regions with strong scattering, low texture, and long distances, there is a greater need to enhance the ability to model long-range dependencies; while in regions with clear boundaries and rich textures, it is more necessary to preserve global context and structural details. Therefore, how to combine underwater degradation physical priors to achieve adaptive collaborative modeling of different feature branches remains a challenging problem in current technology.
[0007] Meanwhile, in practical applications, underwater robots and embedded devices place higher demands on the computational complexity, real-time performance, and robustness of models, while existing methods often struggle to balance depth estimation accuracy, structural consistency, and computational efficiency.
[0008] Therefore, there is an urgent need to propose an underwater monocular depth estimation method that can simultaneously integrate local texture modeling, global context modeling, and long-range dependency modeling capabilities, and explicitly introduce underwater physical degradation prior constraints in the feature learning and skip connection stages. To solve the above problems, this application proposes an underwater monocular depth estimation method and system based on Underwater Physics Prior Guidance (UPPG) and Global-State Feature Interaction (GSFI). Summary of the Invention
[0009] This application addresses one or more technical deficiencies in the prior art by proposing the following technical solution.
[0010] Based on the first aspect of this application, an underwater monocular depth estimation system based on UPPG and GSFI is proposed, including a hybrid encoder, a global-state feature interaction module GSFI, an underwater physical prior guidance module UPPG, a decoder, and a binning regression module. The underwater physics prior guidance module UPPG constructs inverted transmission prior features based on the medium transmittance. In response to the preprocessed underwater RGB image, the system extracts semantic features through the hybrid encoder. The global-state feature interaction module GSFI includes a global channel correlation branch XCA and a state space branch VMamba. The semantic features are enhanced globally and in the state space through a spatial gating fusion mechanism. The Underwater Physics Prior Guidance Module (UPPG) obtains physical query features through the inverted transmission prior features. It calculates the correlation between the physical query features and semantic features through a cross-covariance attention mechanism and dynamically reweights the semantic features based on the correlation to obtain enhanced jump features. In response to the deep features in the semantic features, the decoder performs step-by-step upsampling to obtain decoded features and fuses the decoded features with the enhanced jump features to obtain high-resolution features. The binning regression module performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
[0011] This application enhances local texture perception, global semantic modeling, and long-range spatial structure representation capabilities through the Global-State Feature Interaction (GSFI) module, thereby improving structural consistency and depth prediction accuracy in complex underwater degradation scenarios. A spatial gating fusion mechanism driven by underwater degradation physics priors enables different degradation regions to dynamically select more suitable feature representation methods, enhancing adaptability to non-uniform degradation regions in complex underwater scenarios and improving depth boundary recovery and structural continuity. The Underwater Physics Prior Guidance (UPPG) module provides robustness and depth recovery capabilities in low-contrast, strong-scattering, and non-uniform degradation regions. Learnable depth interval probability modeling improves the scale consistency and stability of depth prediction, resolving the issues of blurred depth boundaries and local prediction discontinuities in complex underwater scenarios. It reduces depth prediction bias caused by local scattering, color shifts, and uneven illumination, improving depth recovery capabilities and prediction stability in complex degradation regions and distant regions.
[0012] Furthermore, the semantic features are enhanced globally and in the state space through a spatial gating fusion mechanism, specifically including: The inverted transmission prior features are scale-aligned and jointly mapped with the semantic features to generate a spatial gating graph. The spatial gating graph is then used to adjust the fusion ratio of the global channel correlation branch XCA and the state space branch VMamba output features.
[0013] This application models the global contextual relationship of the channel dimension in semantic features through the global channel correlation branch XCA, and the state space branch VMamba uses the visual state space model to model the long-range dependency of semantic features. It can capture the continuous structure, near and far region relationship and spatial change trend in underwater images with low computational complexity. This step can alleviate the problem that fixed weight fusion is difficult to adapt to underwater non-uniform degradation, improve the depth boundary recovery capability and the depth continuity of distant regions.
[0014] Furthermore, an underwater dark channel prior is constructed based on the green and blue channels of the underwater RGB image, the minimum response of the green and blue channels is calculated, and the underwater dark channel features are obtained through the minimum pooling operation of the local window. The medium transmittance is calculated by combining the ambient light estimation strategy, and the inverted transmission prior features are constructed.
[0015] This step can explicitly introduce the physical laws of underwater imaging into the depth estimation network, providing a basis for degradation perception for subsequent interaction between physical priors and depth semantic features.
[0016] Furthermore, the formula for calculating the transmittance of the medium is: ; in, Indicates pixel position The transmittance of the medium at that location; Represented in pixels A local window centered on the user; Indicates the pixel position within a local window underwater images Channel pixel values; express Global ambient light of the channel; Indicates green and blue channels; This represents the scattering attenuation coefficient.
[0017] Furthermore, the inverted transmission prior features are subjected to convolutional mapping and linear transformation to obtain initial physical query features. The inverted transmission prior features are then jointly mapped with the current semantic features to generate query correction values. Residual correction is then applied to the initial physical query features to obtain physical query features.
[0018] This step can reduce the potential for misguidance from directly utilizing transmission a priori information and enhance the model's ability to perceive the structure and recover the depth of complex degraded regions.
[0019] Furthermore, the binning regression module divides the continuous depth space of the high-resolution feature into multiple learnable depth intervals and predicts the probability distribution of each pixel belonging to each depth interval. By weighted summation of the center values and corresponding probability distributions of each depth interval, a continuous depth estimate for each pixel is obtained, generating a dense depth map of the underwater RGB image.
[0020] The binning regression strategy in this step can improve the scale consistency and prediction stability of the depth estimation results, reduce local depth estimation errors caused by color attenuation, scattering blur and low contrast in complex underwater environments, and make the output depth map have better boundary continuity, structural integrity and scene geometric consistency.
[0021] Furthermore, the center value of each depth interval is calculated based on the learnable bin width parameter; ; in, and These represent the minimum and maximum depths, respectively. The learnable bin width parameter is used to adaptively adjust the distribution density in different depth ranges. This represents the width parameter of the k-th bin. Indicates the center value.
[0022] This step transforms the continuous depth regression problem into a problem that combines discrete depth interval probabilistic modeling with continuous depth weighted reconstruction. This allows the model to maintain the consistency of the global depth distribution while improving the depth boundary ambiguity caused by the instability of direct regression in local areas. As a result, the structural integrity, scale consistency, and cross-scene robustness of depth estimation results in complex underwater environments are improved.
[0023] Furthermore, an end-to-end supervised training of the underwater monocular depth estimation network is performed using a joint loss function consisting of L2 loss, scale-invariant log loss, and underwater degradation prior consistency loss.
[0024] This step not only ensures pixel-level absolute depth prediction accuracy and overall scale consistency, but also incorporates underwater physical degradation laws to constrain the prediction results, enabling the output dense depth map to have better boundary continuity, structural consistency, long-distance depth recovery capability, and cross-scene robustness in complex underwater environments.
[0025] Based on a second aspect of this application, a method for underwater monocular depth estimation using the system described above is also proposed, comprising: S1: In response to the preprocessed underwater RGB image, the system extracts semantic features through a hybrid encoder; S2: The underwater physics prior guidance module UPPG constructs inverted transmission prior features based on the medium transmittance. S3: The Global-State Feature Interaction Module (GSFI) uses a spatial gating fusion mechanism to enhance the semantic features globally and in the state space. S4: Perform convolution mapping and linear transformation on the inverted transmission prior features to obtain initial physical query features; jointly map the inverted transmission prior features with the current semantic features to generate query correction values; and perform residual correction on the initial physical query features to obtain physical query features. S5: Calculate the correlation between the physical query features and semantic features through a cross-covariance attention mechanism, and dynamically reweight the semantic features based on the correlation to obtain enhanced jump features; S6: The decoder upsamples the deep features in the semantic features step by step to obtain the decoded features, and then fuses the decoded features with the enhanced jump features to obtain high-resolution features; S7: The binning regression module performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
[0026] Based on a third aspect of this application, a computer program product is also proposed, on which one or more computer programs are stored, which, when executed by a computer processor, implement the method described above.
[0027] The technical effect of this application is that: through the Global-State Feature Interaction Module (GSFI) and the dual-branch structure, this application achieves the collaborative fusion of global context modeling in the channel dimension and long-range dependency modeling in the spatial dimension, enabling the model to simultaneously possess local texture perception capability, global semantic modeling capability, and long-range spatial structure expression capability, thereby improving the structural consistency and depth prediction accuracy in complex underwater degradation scenarios. In the Global-State Feature Interaction Module (GSFI), a spatial gating fusion mechanism driven by underwater degradation physical priors is introduced. The spatial gating map is generated by using inverted transmission priors and encoded semantic features to adaptively adjust the fusion ratio position by position, so that different degradation regions can dynamically select more suitable feature representation methods, thereby enhancing the model's adaptability to non-uniform degradation regions in complex underwater scenes and improving the depth boundary recovery capability and structural continuity. By introducing the Underwater Physical Prior Guidance Module (UPPG), an underwater dark channel prior is constructed based on the green and blue channels to estimate the medium transmittance and generate an inverted transmittance physical prior. Combined with the semantic residual correction mechanism, physical query features adapted to the depth task are constructed, so that the light absorption, scattering attenuation and non-uniform degradation laws in underwater imaging can be explicitly involved in the depth estimation process at the feature level, thereby enhancing the robustness and depth recovery capability of the model in low-contrast, strong scattering and non-uniform degradation regions. By combining a hybrid encoder, a stepwise upsampling decoder, and a binning regression strategy, multi-scale semantic features, underwater physical prior information, and long-range dependency features are integrated while restoring spatial resolution. Furthermore, the scale consistency and stability of depth prediction are improved through learnable depth interval probability modeling, thereby addressing the issues of blurred depth boundaries and discontinuous local predictions in complex underwater scenarios. By introducing a physical consistency constraint based on inverted transmission a priori, the predicted depth change trend is kept consistent with the underwater degradation degree, thereby reducing the depth prediction bias caused by local scattering, color shift and uneven illumination, and improving the depth recovery capability and prediction stability in complex degradation areas and distant areas. Attached Figure Description
[0028] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0029] Figure 1 This is a block diagram of an underwater monocular depth estimation system based on UPPG and GSFI, provided according to an embodiment of this application.
[0030] Figure 2 This is a flowchart of an underwater monocular depth estimation method based on UPPG and GSFI, provided according to an embodiment of this application.
[0031] Figure 3 This is a flowchart of a Global-State Feature Interaction Module (GSFI) provided according to an embodiment of this application.
[0032] Figure 4 This is a flowchart of an underwater physical prior guidance module (UPPG) provided according to an embodiment of this application.
[0033] Figure 5 This is a qualitative comparison experiment effect diagram based on the Atlantis dataset provided according to an embodiment of this application.
[0034] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments. Detailed Implementation
[0035] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0036] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0037] Figure 1 This application illustrates an underwater monocular depth estimation system based on UPPG and GSFI, including a hybrid encoder 101, a global-state feature interaction module GSFI 102, an underwater physical prior guidance module UPPG 103, a decoder 104, and a binning regression module 105. The underwater physics prior guidance module UPPG103 constructs inverted transmission prior features based on the medium transmittance. In response to the preprocessed underwater RGB image, the system extracts semantic features through the hybrid encoder 101. The global-state feature interaction module GSFI 102 includes a global channel correlation branch XCA and a state space branch VMamba. The semantic features are enhanced globally and in the state space through a spatial gating fusion mechanism. The underwater physics prior guidance module UPPG103 obtains physical query features through the inverted transmission prior features, calculates the correlation between the physical query features and semantic features through a cross-covariance attention mechanism, and dynamically reweights the semantic features based on the correlation to obtain enhanced jump features; in response to the deep features in the semantic features, the decoder 104 performs step-by-step upsampling to obtain decoded features, and fuses the decoded features with the enhanced jump features to obtain high-resolution features; The binning regression module 105 performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
[0038] It should be noted that this application, through the Global-State Feature Interaction Module (GSFI), can improve local texture perception, global semantic modeling, and long-range spatial structure representation capabilities, thereby enhancing structural consistency and depth prediction accuracy in complex underwater degradation scenes. Through a spatial gating fusion mechanism driven by underwater degradation physics priors, different degradation regions can dynamically select more suitable feature representation methods, enhancing adaptability to non-uniform degradation regions in complex underwater scenes and improving depth boundary recovery and structural continuity. Through the Underwater Physics Prior Guidance Module (UPPG), robustness and depth recovery capabilities are provided in low-contrast, strong-scattering, and non-uniform degradation regions. Through learnable depth interval probability modeling, the scale consistency and stability of depth prediction are improved, solving the problems of blurred depth boundaries and local prediction discontinuities in complex underwater scenes, reducing depth prediction bias caused by local scattering, color shift, and uneven illumination, and improving depth recovery capabilities and prediction stability in complex degradation regions and distant regions.
[0039] It should be noted that the semantic features are enhanced globally and in the state space through a spatial gating fusion mechanism, specifically including: The inverted transmission prior features are scale-aligned and jointly mapped with the semantic features to generate a spatial gating graph. The spatial gating graph is then used to adjust the fusion ratio of the global channel correlation branch XCA and the state space branch VMamba output features.
[0040] It should be noted that this application models the global context relationship of the channel dimension in semantic features through the global channel correlation branch XCA, and the state space branch VMamba uses the visual state space model to model the long-range dependency of semantic features. This can capture the continuous structure, near and far region relationship and spatial change trend in underwater images with low computational complexity. This step can alleviate the problem that fixed weight fusion is difficult to adapt to underwater non-uniform degradation, improve the depth boundary recovery ability and the depth continuity of distant regions.
[0041] It should be noted that an underwater dark channel prior is constructed based on the green and blue channels of the underwater RGB image, the minimum response of the green and blue channels is calculated, and the underwater dark channel features are obtained through the minimum pooling operation of the local window. The medium transmittance is calculated by combining the ambient light estimation strategy and an inverted transmittance prior feature is constructed.
[0042] It should be noted that this step can explicitly introduce the physical laws of underwater imaging into the depth estimation network, providing a basis for degradation perception for subsequent interaction between physical priors and depth semantic features.
[0043] It should be noted that the formula for calculating the transmittance of the medium is: ; in, Indicates pixel position The transmittance of the medium at that location; Represented in pixels A local window centered on the user; Indicates the pixel position within a local window underwater images Channel pixel values; express Global ambient light of the channel; Indicates green and blue channels; This represents the scattering attenuation coefficient.
[0044] It should be noted that the inverted transmission prior features are subjected to convolutional mapping and linear transformation to obtain the initial physical query features. The inverted transmission prior features are then jointly mapped with the current semantic features to generate a query correction value. The initial physical query features are then subjected to residual correction to obtain the physical query features.
[0045] It should be noted that this step can reduce the potential for misguidance from directly utilizing transmission a priori information and enhance the model's ability to perceive the structure and recover the depth of complex degraded regions.
[0046] It should be noted that the binning regression module divides the continuous depth space of the high-resolution feature into multiple learnable depth intervals and predicts the probability distribution of each pixel belonging to each depth interval. By weighted summation of the center values and corresponding probability distributions of each depth interval, a continuous depth estimate for each pixel is obtained, generating a dense depth map of the underwater RGB image.
[0047] It should be noted that the binning regression strategy in this step can improve the scale consistency and prediction stability of the depth estimation results, reduce the local depth estimation error caused by color attenuation, scattering blur and low contrast in complex underwater environments, and make the output depth map have better boundary continuity, structural integrity and scene geometric consistency.
[0048] It should be noted that the center value of each depth interval is calculated based on the learnable bin width parameter; ; in, and These represent the minimum and maximum depths, respectively. The learnable bin width parameter is used to adaptively adjust the distribution density in different depth ranges. This represents the width parameter of the k-th bin. Indicates the center value.
[0049] It should be noted that this step transforms the continuous depth regression problem into a problem that combines discrete depth interval probability modeling with continuous depth weighted reconstruction. This allows the model to maintain the consistency of the global depth distribution while improving the depth boundary ambiguity caused by the instability of direct regression in local areas. This improves the structural integrity, scale consistency, and cross-scene robustness of depth estimation results in complex underwater environments.
[0050] It should be noted that the underwater monocular depth estimation network is trained end-to-end using a joint loss function consisting of L2 loss, scale-invariant log loss, and underwater degradation prior consistency loss.
[0051] It should be noted that this step not only ensures pixel-level absolute depth prediction accuracy and overall scale consistency, but also incorporates underwater physical degradation laws to constrain the prediction results, enabling the output dense depth map to have better boundary continuity, structural consistency, long-distance depth recovery capability, and cross-scene robustness in complex underwater environments.
[0052] It should be noted that in the hybrid encoder, the input underwater RGB image first undergoes shallow feature extraction and initial spatial downsampling through the Stage 1 convolutional stem (Conv Stem), and then enters three hierarchical encoding stages: Stage 2, Stage 3, and Stage 4. Stage 2 to Stage 4 generate feature representations at scales of H / 4, H / 8, and H / 16, respectively. Each encoding stage includes cross-stage feature concatenation, downsampling, a convolutional neural network local feature extraction module (CNN), and a global-state feature interaction module (GSFI) to achieve collaborative modeling of local texture features, global context information, and long-range spatial dependencies. In the Global-State Feature Interaction Module (GSFI), a spatial gating mechanism driven by underwater degradation physics priors is set up. Specifically, the inverted transmission prior generated by the Underwater Physics Prior Guidance Module (UPPG), after scale alignment, is used together with the encoded features to generate a spatial gating map. This map is then used to dynamically adjust the fusion ratio of the global channel correlation branch (XCA) and the state space branch (VMamba) at each location, enabling the network to adaptively select feature sources according to the degree of degradation in different regions. In particular, low-degradation, textured regions retain more global context information, while strong scattering, weak texture, and long-distance degradation regions make more use of long-range dependency features in the state space to alleviate the problems of depth boundary blurring and depth discontinuity caused by underwater non-uniform degradation. During the skip connection between the encoder and decoder, the shallow or mid-layer encoded semantic features are enhanced by the Underwater Physical Prior Guidance Module (UPPG) and then input into the corresponding upsampling stage. The UPPG constructs an underwater dark channel based on the green and blue channels, and generates an inverted transmittance physical prior by combining background light estimation and transmittance calculation. The inverted transmittance physical prior is used to generate the initial physical query features, and a query correction value is generated by combining the current semantic features. The initial physical query is residually corrected to obtain physical query features suitable for depth estimation tasks. The corrected physical query features are used as the Query, and the encoded semantic features are used as the Key and Value. A cross-source attention mechanism is used to achieve cross-source fusion of physical degradation information and deep semantic features, reducing the possible misguidance caused by directly using the transmittance prior. The decoder restores spatial resolution through stepwise upsampling, fuses the skip connection features enhanced by the underwater physical prior guidance module UPPG with the decoded features, and finally performs probabilistic modeling of the continuous depth space through the binning regression module, outputting a dense depth map corresponding to the input RGB image, thereby improving the depth prediction accuracy, boundary recovery capability, robustness and cross-domain generalization capability in complex underwater scenes.
[0053] The following is for reference. Figure 2 It illustrates a method for underwater monocular depth estimation based on the system described above, comprising: S1: In response to the preprocessed underwater RGB image, the system extracts semantic features through a hybrid encoder; S2: The underwater physics prior guidance module UPPG constructs inverted transmission prior features based on the medium transmittance. S3: The Global-State Feature Interaction Module (GSFI) uses a spatial gating fusion mechanism to enhance the semantic features globally and in the state space. S4: Perform convolution mapping and linear transformation on the inverted transmission prior features to obtain initial physical query features; jointly map the inverted transmission prior features with the current semantic features to generate query correction values; and perform residual correction on the initial physical query features to obtain physical query features. S5: Calculate the correlation between the physical query features and semantic features through a cross-covariance attention mechanism, and dynamically reweight the semantic features based on the correlation to obtain enhanced jump features; S6: The decoder upsamples the deep features in the semantic features step by step to obtain the decoded features, and then fuses the decoded features with the enhanced jump features to obtain high-resolution features; S7: The binning regression module performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
[0054] It should be noted that this application achieves the collaborative fusion of global context modeling in the channel dimension and long-range dependency modeling in the spatial dimension through the global-state feature interaction module GSFI and the dual-branch structure, enabling the model to simultaneously possess local texture perception capability, global semantic modeling capability, and long-range spatial structure expression capability, thereby improving structural consistency and depth prediction accuracy in complex underwater degradation scenarios. In the Global-State Feature Interaction Module (GSFI), a spatial gating fusion mechanism driven by underwater degradation physical priors is introduced. The spatial gating map is generated by using inverted transmission priors and encoded semantic features to adaptively adjust the fusion ratio position by position, so that different degradation regions can dynamically select more suitable feature representation methods, thereby enhancing the model's adaptability to non-uniform degradation regions in complex underwater scenes and improving the depth boundary recovery capability and structural continuity. By introducing the Underwater Physical Prior Guidance Module (UPPG), an underwater dark channel prior is constructed based on the green and blue channels to estimate the medium transmittance and generate an inverted transmittance physical prior. Combined with the semantic residual correction mechanism, physical query features adapted to the depth task are constructed, so that the light absorption, scattering attenuation and non-uniform degradation laws in underwater imaging can be explicitly involved in the depth estimation process at the feature level, thereby enhancing the robustness and depth recovery capability of the model in low-contrast, strong scattering and non-uniform degradation regions. By combining a hybrid encoder, a stepwise upsampling decoder, and a binning regression strategy, multi-scale semantic features, underwater physical prior information, and long-range dependency features are integrated while restoring spatial resolution. Furthermore, the scale consistency and stability of depth prediction are improved through learnable depth interval probability modeling, thereby addressing the issues of blurred depth boundaries and discontinuous local predictions in complex underwater scenarios. By introducing a physical consistency constraint based on inverted transmission a priori, the predicted depth change trend is kept consistent with the underwater degradation degree, thereby reducing the depth prediction bias caused by local scattering, color shift and uneven illumination, and improving the depth recovery capability and prediction stability in complex degradation areas and distant areas.
[0055] It should be noted that, since underwater images often suffer from degradation phenomena such as color shift, uneven brightness, scattering, fogging, and low contrast, the underwater RGB images undergo uniform preprocessing, including image size adjustment, pixel value normalization, channel order unification, and tensor format conversion. This ensures that the input images meet the computational requirements of the subsequent hybrid encoder, guaranteeing that underwater images from different sources and at different resolutions have a consistent input format. At the same time, it preserves the color, texture, and structural information in the images related to underwater imaging degradation, providing basic data for subsequent physical prior construction and depth estimation.
[0056] It should be noted that the preprocessed underwater RGB image is input into a four-stage hybrid encoder for hierarchical feature extraction. The input image is subjected to shallow feature extraction through a convolutional stem module to obtain initial semantic features containing edge, texture, local color changes, and low-level structural information. The initial semantic features are then sequentially entered into the first, second, third, and fourth encoding stages, progressively reducing the spatial resolution and expanding the receptive field to obtain semantic feature representations at different scales and semantic levels. The shallow semantic features are mainly used to preserve underwater target boundaries and local texture information, the mid-level semantic features are used to express regional structure and local contextual relationships, and the deep semantic features are used to model global semantic information and the overall spatial structure of the scene. The four-stage hybrid encoder provides a multi-scale feature foundation for the subsequent Global-State Feature Interaction Module (GSFI), Physical Prior Guidance Module (UPPG), and decoding and recovery process.
[0057] It should be noted that inputting the semantic features output by the four-stage hybrid encoder into the Global-State Feature Interaction Module (GSFI) enhances the model's ability to express global contextual information and long-range spatial dependencies in complex underwater scenarios. The Global-State Feature Interaction Module (GSFI) includes a Global Channel Correlation Branch (XCA) and a State Space Branch (VMamba). The Global Channel Correlation Branch (XCA) is used to model the global context relationship of the channel dimension in the features, enabling semantic associations between distant regions, thereby improving the model's ability to understand the overall scene structure. The State Space Branch (VMamba) is used to model the long-range dependencies of the features using a visual state space model, capturing the continuous structure, near-far region relationships, and spatial change trends in underwater images with low computational complexity. The Global-State Feature Interaction Module (GSFI) adopts a spatial gating fusion mechanism driven by underwater degradation physical priors. The generated inverted transmittance physical priors are scale-aligned and jointly mapped with the encoded semantic features before inputting into the GSFI module to generate a spatial gating graph. The spatial gating graph is used to dynamically adjust the fusion ratio of the output features of the global channel correlation branch (XCA) and the output features of the state space branch (VMamba) on a position-by-position basis. When the spatial gating graph value is large, the fused features retain more of the global context features output by the global channel correlation branch XCA; when the spatial gating graph value is small, the fused features introduce more of the long-range state space dependency features output by the state space branch VMamba, enabling the network to adaptively select feature sources according to the degree of degradation in different regions. Through this step, the problem that fixed weight fusion is difficult to adapt to underwater non-uniform degradation can be alleviated, and the depth boundary recovery capability and depth continuity in distant regions can be improved.
[0058] It should be noted that UPPG underwater physics priors are constructed based on the input underwater RGB images to explicitly describe the light absorption, scattering, and color attenuation patterns during the underwater imaging process. Considering that the red channel attenuates significantly in the underwater environment, the green and blue channels are better able to reflect the effective imaging information of the underwater scene. Therefore, it is preferable to construct the underwater dark channel prior based on the green and blue channels. By calculating the minimum responses of the green and blue channels within a local window, underwater dark channel features are obtained. Further, combined with an ambient light estimation strategy, the medium transmittance is calculated, and an inverted transmission prior is constructed based on this transmittance. This inverted transmission prior reflects the degree of degradation and potential depth-related information in different regions of the image. Regions with stronger degradation typically correspond to more pronounced scattering, blurring, and low contrast phenomena. This step explicitly introduces the physical laws of underwater imaging into the depth estimation network, providing a degradation perception basis for subsequent interaction between physical priors and depth semantic features.
[0059] It should be noted that the inverted transmittance prior features are interacted with the semantic features extracted by the encoder through cross-source feature interaction. Specifically, the inverted transmittance physical prior is first converted into initial physical query features through convolutional mapping and linear transformation. Further, the physical prior features are jointly mapped with the current encoded semantic features to generate query correction values, and residual correction is performed on the initial physical query features to obtain physical query features suitable for depth estimation tasks. The corrected physical query features are used as the Query. The semantic features output by the encoder are linearly mapped to generate Key and Value respectively. The correlation between the physical query features and the decoded semantic features is calculated through a cross-covariance attention mechanism. The semantic features are dynamically reweighted according to the correlation to obtain the enhanced jump features that fuse underwater physical degradation information and deep semantic information. Since underwater transmittance is affected by factors such as color attenuation, local illumination, surface reflectance, and turbidity, it does not have a strict correspondence with the true depth. Therefore, by encoding semantic features to perform residual correction on physical query features, we can reduce the misguidance that may be caused by directly using the transmittance prior. This allows the physical prior to be aligned with the current depth semantic context before participating in cross-source attention, thereby enhancing the model's ability to perceive the structure and recover the depth of complex degraded regions.
[0060] It should be noted that the deep semantic features are input into the decoder, and the spatial resolution of the feature map is restored through a step-by-step upsampling method. The decoder starts from the low-resolution deep semantic features and gradually performs upsampling and feature fusion so that the feature resolution gradually approaches the resolution of the input image. In each stage of decoding, the enhanced jump features are fused with the current decoding semantic features to supplement shallow texture information, boundary structure information, and details of physically degraded regions. Since the enhanced jump features contain physical degradation information guided by underwater dark channel priors and transmission priors, they can help the decoder more accurately distinguish foreground targets, background regions, distant regions, and scattering blurred regions, thereby improving the spatial detail representation ability and depth boundary recovery effect of the decoding features.
[0061] It should be noted that the final high-resolution features obtained by progressive upsampling and decoding are input into the binning regression module for dense depth prediction. Unlike the method of directly regressing continuous depth values for each pixel, the binning regression module divides the continuous depth space into multiple learnable depth intervals and predicts the probability distribution of each pixel belonging to each depth interval. It then performs a weighted summation based on the center value and corresponding probability of each depth interval to obtain the continuous depth estimate of each pixel, and finally generates a dense depth map corresponding to the input underwater RGB image. By employing a binning regression strategy, the scale consistency and prediction stability of depth estimation results can be improved, and the local depth estimation error caused by color attenuation, scattering blur and low contrast in complex underwater environments can be reduced, resulting in output depth maps with better boundary continuity, structural integrity and scene geometric consistency.
[0062] In specific embodiments, such as Figure 3 As shown, a global-state feature interaction module (GSFI) is set at the end of the hybrid encoder to improve the structural consistency representation ability and depth prediction accuracy in complex underwater degradation environments. GSFI includes a global channel correlation branch (XCA301) output feature for establishing global contextual relationships in the channel dimension and a state space branch (VMamba302) for establishing long-range state dependencies in the spatial dimension. In the global channel correlation branch, the input semantic feature F of XCA301 first undergoes layer normalization processing, and then generates the query matrix Q, key matrix K, and value matrix V through linear mapping. Unlike traditional self-attention mechanisms that mainly perform global correlation modeling in the spatial dimension, this application performs cross-covariance attention calculation in the channel dimension to establish global semantic correlation between different feature channels, realize cross-regional contextual information modeling, and reduce the computational complexity and memory overhead under high-resolution underwater image input conditions. The attention calculation process is represented as follows: in, and These represent the query matrix and key matrix after L2 normalization along the token dimension of the space, respectively. Represents the cross-covariance attention weight matrix; This represents the global channel correlation enhancement feature output by the global channel correlation branch XCA; Indicates the learnable temperature coefficient; In the state space branch of VMamba, the input semantic features F are sequentially processed through layer normalization, linear mapping, depthwise separable convolution, and nonlinear activation operations to enhance the ability to express local structures and capture edge details. The input is then fed into the visual state space model for selective state modeling. The described visual state space model employs a two-dimensional selective scanning mechanism, establishing long-range dependencies in four directions: left-to-right, right-to-left, top-to-bottom, and bottom-to-top. This enhances the modeling capabilities of continuous structures, near and far regions, and spatial variation trends in underwater scenes. Through this branch, long-range spatial dependency features can be obtained with lower computational complexity, avoiding the excessive computational overhead of traditional global attention mechanisms at high resolutions. The features output by the state space branch of VMamba are denoted as... ; After completing the dual-branch feature extraction, this application does not employ a fixed-weighted or ordinary learnable-weight fusion method, but instead introduces a spatially gated fusion mechanism driven by underwater physical degradation priors. Specifically, the inverted transmission prior features generated by the underwater physical prior guidance module UPPG are used... Scaled to the same spatial resolution as the current encoded semantic features, and the encoded semantic features before the input global-state feature interaction module GSFI. By concatenating the features, we obtain the joint semantic features: Furthermore, a spatially gated graph is generated using convolutional mapping and the sigmoid activation function: The spatial gating graph (G) ranges from 0 to 1 and is used to dynamically adjust the fusion ratio of the global channel correlation branch XCA and the state space branch VMamba at each position. The final fused semantic features are as follows: in, This represents element-wise multiplication. When the gating weight is large, the fused semantic features retain more of the global context features output by the global channel correlation branch XCA; when the gating weight is small, the fused semantic features incorporate more of the long-range state space dependency features output by the state space branch VMamba. In regions with low degradation, clear texture, and distinct structural boundaries, gating graphs tend to assign higher weights to the global channel correlation branch XCA; while in regions with strong scattering, weak texture, and long-distance degradation, gating graphs tend to assign higher weights to the state space branch VMamba. Furthermore, to enhance the stability of the jump feature representation and ensure gradient propagation efficiency during network training, the fused semantic features are residually connected to the input semantic features, and then nonlinearly enhanced through layer normalization and a multi-layer perceptron (MLP). Specifically, this can be expressed as follows: in, LN represents residual fusion features, MLP represents layer normalization operation, and LN represents multilayer perceptron. This represents the enhanced global-state interaction semantic features output by the Global-State Feature Interaction Module (GSFI). Through the above structural design, the Global-State Feature Interaction Module (GSFI) of this application can achieve the synergistic effect of cross-covariance attention mechanism and visual state space modeling mechanism, and dynamically adjust the feature sources of different regions by utilizing underwater degradation physical priors, so that the model can simultaneously have local texture perception capability, channel-dimensional global context modeling capability and spatial long-range continuous relationship expression capability, thereby improving the depth estimation accuracy, structural consistency and boundary restoration effect in complex underwater degradation environments.
[0063] It should be noted that, in order to further enhance the physical consistency constraint capability and robustness of depth features in complex underwater degradation scenarios, this application introduces an underwater physical prior guidance module (UPPG) in the skip connection stage between the encoder and decoder. Unlike traditional methods that rely solely on semantic feature transmission, this module explicitly integrates the physical laws of underwater imaging into the feature learning process and further utilizes encoded semantic information to perform task adaptation correction on physical query features. This enables the model to adaptively perceive the spatial degradation distribution caused by water scattering, absorption attenuation, and color shift, thereby improving the physical interpretability and structural consistency of depth recovery. like Figure 4 As shown, when performing the depth estimation task, the input underwater RGB image is first acquired, and physical degradation prior information is constructed based on the Underwater Dark Channel Prior (UDCP). Considering the severe attenuation of red light in the underwater environment, it is preferable to use only the green and blue channels for local minimum calculation, and obtain the dark channel features through local window minimum pooling operation. At the same time, the global ambient light A is estimated by combining the Top-K strategy, and the medium transmittance t(x) is calculated based on the ambient light information. ; in, Indicates pixel position The transmittance of the medium at that location; Represented in pixels A local window centered on the user; Indicates the pixel position within a local window underwater images Channel pixel values; express Global ambient light of the channel; Indicates green and blue channels; Indicates the scattering attenuation coefficient; Since physical transmittance is related to the degree of underwater degradation and the depth of the macroscopic scene, this application constructs an inverted transmittance a priori feature. The inverted transmission a priori is used to characterize the degradation intensity and potential depth structure information of different regions, where regions with stronger degradation usually correspond to more severe scattering, low contrast, and distant scenes. The inverted transmissivity feature is adjusted to a spatial resolution consistent with the encoded semantic feature through bilinear interpolation to achieve spatial alignment between the physical prior and the semantic feature, and feature mapping is performed. Unlike the method of directly using the physical prior to generate query features, this application further introduces a semantic residual correction mechanism to improve the adaptability of the physical prior to the depth estimation task. First, physical degradation feature representations are generated through convolutional mapping, and initial physical query features are obtained through linear transformation: ,in, This represents the physical characteristic representation obtained from the inverted transmission a priori mapping. Represents the query mapping matrix; Considering that underwater transmittance is affected by factors such as color attenuation, local illumination variations, surface reflectance, and turbidity, and its relationship with true depth is not strictly one-to-one, directly using transmittance a priori as a physical query feature in cross-source attention computation may lead to misguidance. Therefore, further combining this with current encoded semantic features is necessary. Together with the inverted transmission a priori features, a query correction value is generated: ; and construct physical query features suitable for depth estimation tasks using residual methods: Subsequently, the semantic features output by the encoder are used to generate key features through two parallel linear mappings. Sum value characteristics ,Right now: ; After feature construction is completed, cross-source interaction modeling between physical query features and semantic features is achieved through a cross-covariance attention mechanism: Cross-source enhancement features are obtained through residual connections. With input semantic features To merge: Finally, the fused features are refined through layer normalization and a lightweight feedforward network, and then fused again with the residual aggregated features to obtain the final enhanced jump features: Through the above structural design, the underwater physical prior guidance module UPPG of this application explicitly integrates the physical degradation law of underwater imaging with the deep feature learning process, and mitigates the erroneous physical guidance that may be caused by directly using the transmission prior through a semantic residual correction mechanism. This enables the network to maintain low computational complexity while possessing both physical consistency constraint capability and semantic expression capability, thereby effectively improving the depth estimation accuracy, boundary recovery capability and cross-scene generalization performance in complex underwater environments.
[0064] It should be noted that, in order to improve the scale consistency, boundary continuity and prediction stability of the underwater monocular depth estimation results, this application introduces a binning regression decoder in the decoding stage. The binning regression decoder is set after the stepwise upsampling decoder and is used to convert the high-resolution feature map output by the decoder into a dense depth map. First, the encoder performs upsampling decoding of deep semantic features step by step to restore spatial resolution. During the decoding process, semantic features enhanced by global-state interaction from different encoding stages and jump features enhanced by the Physical Prior Guided Module (UPPG) are fused with the current decoded semantic features to simultaneously preserve global context information, long-range spatial dependency information, and physical prior information of underwater degradation areas. After multi-level upsampling and feature fusion, the final high-resolution decoded feature map is obtained. Unlike the direct regression of continuous depth values for each pixel, the binning regression decoder described in this application employs a learnable adaptive depth binning strategy, dividing the continuous depth space into N dynamically adjustable depth intervals. This transforms the depth estimation task into a problem combining discrete depth probability prediction and continuous depth reconstruction. The width of the depth intervals can be adaptively adjusted according to the scene depth distribution during training, thereby enhancing the model's ability to represent the depth of near-distance targets, distant regions, and complex degraded regions. Specifically, the bin-based regression module first uses a global context modeling unit to model the deep semantic relationships in the decoded features to obtain spatial feature representations related to the scene depth distribution. Preferably, the global context modeling unit can use a lightweight attention structure to achieve long-distance semantic association, thereby enhancing the ability to express depth relationships between different regions in complex underwater scenes. The decoded semantic features are then used by the prediction head to calculate the normalized probability distribution of each depth bin, resulting in a discrete probability matrix. : in, F( represents the probability weight of the k-th depth bin.) () represents the bin prediction function obtained from the decoded feature map. The final continuous depth estimate is obtained by weighted summation of the bin centers: in, This represents the depth center value corresponding to the k-th bin, which is calculated as a cumulative form based on the learnable bin width parameter: in, and These are the minimum and maximum depth estimates, respectively. The learnable bin width parameter is used to adaptively adjust the distribution density in different depth intervals, improving the model's ability to model near and far targets. This represents the width parameter of the k-th bin. Indicates the center value; This application transforms the continuous depth regression problem into a problem that combines discrete depth interval probabilistic modeling with continuous depth weighted reconstruction. This enables the model to maintain the consistency of the global depth distribution and improve the problem of blurred depth boundaries caused by the instability of direct regression in local areas. This improves the structural integrity, scale consistency and cross-scene robustness of depth estimation results in complex underwater environments.
[0065] It should be noted that, in order to achieve end-to-end supervised training of the underwater monocular depth estimation network, a joint loss function consisting of pixel-level L2 loss, scale-invariant log loss, and underwater degradation prior consistency loss is adopted. The joint loss function not only constrains the absolute error and relative scale relationship between the predicted depth and the true depth, but also combines the inverted transmission prior generated by the underwater physical prior guidance module (UPPG) to impose physical consistency constraints on the predicted depth results, thereby improving the depth prediction accuracy, boundary recovery capability, and scale stability in complex underwater environments. Mean squared error loss ( The L2 loss is used to constrain the absolute depth error at the pixel level, forcing the model to focus on the accurate recovery of local edges and details. The L2 loss is expressed as: in, This represents the true depth value of the i-th pixel. Represents the predicted depth value of the i-th pixel. This represents the expectation operation over all training samples and pixel locations. Represents the L2 norm; Since monocular depth estimation inherently suffers from scale uncertainty, especially in underwater environments with extremely low contrast and non-uniform scattering, the absolute error is highly susceptible to global scale drift. Therefore, this paper introduces scale-invariant logarithmic loss (SILog loss) to mitigate scale blur, focusing on the accuracy of the relative depth relationships between pixels. The formula for scale-invariant logarithmic loss is: in, ,λ=0.85,α=10, in SILog This represents the logarithmic depth difference, where n represents the number of valid pixels; Considering that the degree of degradation in underwater scenes is related to the scene depth, and that the inverted transmission prior can characterize the scattering intensity and degree of degradation in different regions, this application further introduces the Underwater Prior Consistency Loss to constrain the consistency relationship between the predicted depth results and the physical degradation prior. Specifically, the predicted depth map is first normalized to ensure it has a consistent numerical range with the inverted transmission a priori. Then, by calculating the difference between the normalized predicted depth map and the inverted transmission a priori, a weak consistency constraint between the degree of degradation and the depth trend is achieved. Its expression is as follows: in, This represents the depth map predicted by the model. This indicates the a priori feature of inverted transmission. This indicates a normalization operation. express Norm; Since the inverted transmission prior can reflect the scattering intensity and potential distance relationship of different regions in an underwater scene to a certain extent, introducing this loss term can make the network pay more attention to the depth recovery ability of severely degraded regions, weak texture regions and distant regions during training, thereby reducing the depth prediction bias in complex scattering environments and improving the structural consistency and physical rationality of the prediction results. This application does not directly constrain the inverted transmittance to be strictly consistent with the true depth value. Instead, it guides the model to learn the correlation between the degree of degradation and the trend of depth change through weak constraints, so as to avoid incorrect physical guidance caused by local color shift, surface reflectance change or non-uniform lighting. Finally, the joint loss function used to supervise the overall model training is: in, This represents the mean squared error loss. This represents the scale-invariant logarithmic loss. This indicates the loss of prior consistency due to underwater degradation; By using the aforementioned joint loss function, not only can pixel-level absolute depth prediction accuracy and overall scale consistency be guaranteed, but the prediction results can also be constrained by underwater physical degradation laws, enabling the output depth map to have better boundary continuity, structural consistency, long-distance depth recovery capability, and cross-scene robustness in complex underwater environments.
[0066] It should be noted that, to verify the effectiveness of the method of this invention, quantitative experimental evaluation and qualitative comparative experiments were conducted on the publicly available underwater monocular depth estimation dataset Atlantis, and compared with existing representative depth estimation methods. The experimental evaluation indicators include absolute relative error (Abs Rel), squared relative error (Sq Rel), root mean square error (RMSE), logarithmic error (Log10), and threshold accuracy indicators δ1<1.25, δ2<1.25², and δ3<1.25. 3 ; The quantitative experimental results on the Tlantis dataset of this application are shown in Table 1. The experimental results show that this application has good comprehensive performance in terms of absolute relative error (Abs Rel), root mean square error (RMSE), square relative error (Sq Rel), and threshold accuracy indicators δ1<1.25, δ2<1.25² and δ3<1.25³. This application has better depth estimation accuracy and scale consistency in complex underwater degradation scenarios, and also shows stable performance in cross-scenario generalization ability. Table 1 Quantitative experimental results on the Atlantis dataset Among them, higher values of δ1, δ2 and δ3 indicate better performance, while lower values of the other indicators indicate better performance. Bold indicates the best result, and underline indicates the second best result. Qualitative comparison results on the Atlantis dataset are as follows: Figure 5 As shown, from left to right: (a) input RGB image, (b) LapDepth, (c) TransDepth, (d) Lite-Mono, (e) UDepth, (f) UMono, (g) Ours (the method of this application).
[0067] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0068] like Figure 6 As shown, the computer system includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for system operation. CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0069] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a liquid crystal display (LCD) and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card and a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0070] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined in the methods of this application. It should be noted that the computer-readable storage medium of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0071] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0072] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0073] The modules described in the embodiments of this application can be implemented in software or in hardware.
[0074] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: extract semantic features through a hybrid encoder in response to a preprocessed underwater RGB image; construct an inverted transmission prior feature using the medium transmittance; perform global channelization enhancement and state space enhancement on the semantic features through a spatial gating fusion mechanism; perform convolution mapping and linear transformation on the inverted transmission prior feature to obtain initial physical query features; and perform the inverted transmittance... Prior features are jointly mapped with current semantic features to generate query correction values and perform residual correction on initial physical query features to obtain physical query features; the correlation between the physical query features and semantic features is calculated through a cross-covariance attention mechanism, and the semantic features are dynamically reweighted based on the correlation to obtain enhanced jump features; the decoder upsamples deep features in the semantic features stepwise to obtain decoded features, and fuses the decoded features with the enhanced jump features to obtain high-resolution features; the binning regression module performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
[0075] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. An underwater monocular depth estimation system based on UPPG and GSFI, characterized in that, It includes a hybrid encoder, a global-state feature interaction module (GSFI), an underwater physical prior guidance module (UPPG), a decoder, and a binning regression module; The underwater physics prior guidance module UPPG constructs inverted transmission prior features based on the medium transmittance. In response to the preprocessed underwater RGB image, the system extracts semantic features through the hybrid encoder. The global-state feature interaction module GSFI includes a global channel correlation branch XCA and a state space branch VMamba. The semantic features are enhanced globally and in the state space through a spatial gating fusion mechanism. The Underwater Physics Prior Guidance Module (UPPG) obtains physical query features through the inverted transmission prior features. It calculates the correlation between the physical query features and semantic features through a cross-covariance attention mechanism and dynamically reweights the semantic features based on the correlation to obtain enhanced jump features. In response to the deep features in the semantic features, the decoder performs step-by-step upsampling to obtain decoded features and fuses the decoded features with the enhanced jump features to obtain high-resolution features. The binning regression module performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
2. The system according to claim 1, characterized in that, The semantic features are enhanced globally through channelization and in the state space through a spatial gating fusion mechanism, specifically including: The inverted transmission prior features are scale-aligned and jointly mapped with the semantic features to generate a spatial gating graph. The spatial gating graph is then used to adjust the fusion ratio of the global channel correlation branch XCA and the state space branch VMamba output features.
3. The system according to claim 1, characterized in that, Based on the green and blue channels of the underwater RGB image, an underwater dark channel prior is constructed. The minimum response of the green and blue channels is calculated, and the underwater dark channel features are obtained through the minimum pooling operation of the local window. The medium transmittance is calculated by combining the ambient light estimation strategy, and the inverted transmission prior features are constructed.
4. The system according to claim 3, characterized in that, The formula for calculating the transmittance of the medium is: ; in, Indicates pixel position The transmittance of the medium at that location; Represented in pixels A local window centered on the user; Indicates the pixel position within a local window underwater images Channel pixel values; express Global ambient light of the channel; Indicates green and blue channels; This represents the scattering attenuation coefficient.
5. The system according to claim 1, characterized in that, The inverted transmission prior features are convolutionally mapped and linearly transformed to obtain the initial physical query features. The inverted transmission prior features are then jointly mapped with the current semantic features to generate a query correction value. The initial physical query features are then residually corrected to obtain the physical query features.
6. The system according to claim 1, characterized in that, The binning regression module divides the continuous depth space of the high-resolution feature into multiple learnable depth intervals and predicts the probability distribution of each pixel belonging to each depth interval. By weighted summation of the center values and corresponding probability distributions of each depth interval, a continuous depth estimate for each pixel is obtained, generating a dense depth map of the underwater RGB image.
7. The system according to claim 6, characterized in that, The center value of each depth interval is calculated based on the learnable bin width parameter; ; in, and These represent the minimum and maximum depths, respectively. The learnable bin width parameter is used to adaptively adjust the distribution density in different depth ranges. This represents the width parameter of the k-th bin. Indicates the center value.
8. The system according to claim 1, characterized in that, An end-to-end supervised training of the underwater monocular depth estimation network was conducted using a joint loss function consisting of L2 loss, scale-invariant log loss, and underwater degradation prior consistency loss.
9. A method for underwater monocular depth estimation based on the system according to any one of claims 1-8, characterized in that, include: S1: In response to the preprocessed underwater RGB image, the system extracts semantic features through a hybrid encoder; S2: The underwater physics prior guidance module UPPG constructs inverted transmission prior features based on the medium transmittance. S3: The Global-State Feature Interaction Module (GSFI) uses a spatial gating fusion mechanism to enhance the semantic features globally and in the state space. S4: Perform convolution mapping and linear transformation on the inverted transmission prior features to obtain initial physical query features; jointly map the inverted transmission prior features with the current semantic features to generate query correction values; and perform residual correction on the initial physical query features to obtain physical query features. S5: Calculate the correlation between the physical query features and semantic features through a cross-covariance attention mechanism, and dynamically reweight the semantic features based on the correlation to obtain enhanced jump features; S6: The decoder upsamples the deep features in the semantic features step by step to obtain the decoded features, and then fuses the decoded features with the enhanced jump features to obtain high-resolution features; S7: The binning regression module performs dense depth prediction on the high-resolution features to generate a dense depth map of the underwater RGB image.
10. A computer program product having one or more computer programs stored thereon, characterized in that, The method of claim 9 is performed when the computer program is executed by a computer processor.
