An Image Enhancement Method Based on Prior State Fusion for Underwater Robot Inspection
By combining prior physical knowledge with the Mamba state-space model, an image enhancement method is constructed that incorporates prior-guided feature normalization, multi-branch feature adaptive fusion, and state-space modules. This method solves the problems of color shift, texture detail, and long-range dependency in underwater image enhancement, generating high-quality underwater enhanced images and improving the image usability for underwater robot inspections.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV OF JINAN
- Filing Date
- 2026-06-17
- Publication Date
- 2026-07-17
AI Technical Summary
Existing underwater image enhancement methods have shortcomings such as insufficient color shift correction, inadequate restoration of local texture details, limited ability to model long-range dependencies, and large number of model parameters, resulting in poor underwater image quality and affecting the stability and reliability of target detection and scene understanding.
Combining prior physical knowledge with the Mamba state-space model, this paper constructs an image enhancement method for underwater robot inspection through a prior-guided feature normalization module, a multi-branch feature adaptive fusion module, and a state-space module. It utilizes local convolutional coding and global context modeling, combined with a joint loss function for end-to-end optimization.
It has significant advantages in color correction, local detail restoration and global context modeling, and generates underwater enhanced images with balanced color distribution, clear texture details and consistent structure. It has good potential for lightweight deployment and improves the visual quality and detection stability of underwater images.
Smart Images

Figure CN122415367A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image enhancement, specifically relating to an image enhancement method for prior state fusion for underwater robot inspection. Background Technology
[0002] Because water absorbs and scatters light, light of different wavelengths exhibits strong and uneven attenuation during propagation, resulting in generally reduced contrast, blurred details, and severe color distortion and degradation in acquired underwater images. This not only reduces the visual quality of underwater images but also poses a serious challenge to the stability and reliability of high-level visual tasks such as target detection and scene understanding. Early underwater image enhancement methods mainly relied on image processing techniques and physical imaging models, introducing artificial priors and rule constraints to improve the visibility and visual quality of underwater images. However, their performance usually depends on artificially designed prior assumptions, physical parameter estimations, or fixed rules. When water type, imaging depth, and lighting conditions change significantly, these methods are prone to over-enhancement, color distortion, or artifacts, and their overall robustness and cross-scene generalization ability remain limited.
[0003] With the development of deep learning technology, researchers have begun to utilize neural networks to automatically learn the degradation and restoration mapping relationships of underwater images from data, thereby alleviating the dependence of traditional methods on manual priors and precise physical parameters. Early research was mainly based on convolutional neural networks, achieving end-to-end underwater image enhancement through encoder-decoder structures. In recent years, the Transformer architecture, with its global modeling capability based on self-attention mechanisms, has been gradually introduced into underwater image enhancement tasks to overcome the shortcomings of convolutional neural networks in long-range dependency modeling. However, the computational complexity of self-attention mechanisms typically increases quadratically with feature resolution, causing such methods to still face significant computational and storage overhead when processing high-resolution underwater images. In addition to Transformer, state-space models M... Mamba, through its selective scanning mechanism, effectively models long-range dependencies while maintaining linear computational complexity, and has demonstrated good performance in image restoration and low-light enhancement of low-level vision tasks. Although a few studies have attempted to introduce Mamba-like state-space models into underwater image enhancement tasks in recent years, related work is still relatively limited, and a unified understanding of model structure and application paradigm has not yet been formed. To address the above issues, a prior state fusion image enhancement method for underwater robot inspection is proposed. This method combines Mamba with CNN by incorporating early physical prior knowledge, models local texture features through convolutional structures, and utilizes Mamba to capture global color degradation and contextual dependencies, thereby achieving a better balance between performance and efficiency. Summary of the Invention
[0004] This invention provides an image enhancement method for underwater robot inspection based on prior state fusion. It proposes to combine physical prior knowledge with the state space model Mamba, aiming to solve the problems of insufficient color shift correction, inadequate restoration of local texture details, limited ability to model long-range dependencies, and large number of model parameters in existing underwater image enhancement methods; including the following steps.
[0005] S1. Control the underwater robot to navigate in the waters to be inspected and collect raw underwater images of the underwater environment; then perform size adjustment, normalization and noise suppression preprocessing on the raw underwater images to obtain preprocessed underwater robot inspection images.
[0006] S2. Construct a priori guided feature normalization module PGFNM, which generates channel-level correction factors based on the deviation relationship between the mean of each color channel and the global grayscale statistical mean, and combines logarithmic domain normalization to suppress global illumination perturbation, thereby obtaining priori guided features with color consistency constraints.
[0007] S3. Construct a multi-branch feature adaptive fusion module (MBFFM) to fuse the prior guided features with the global response information obtained by average pooling, the local saliency information obtained by max pooling, and the orientation-aware features to generate spatial feature weights. Based on these weights, the feature responses at different spatial locations are recalibrated to obtain spatial-aware features.
[0008] S4. Constructing the state space module MEF-Mamba utilizes local convolution to encode the neighborhood structure information of spatially aware features, and generates input mapping parameters, output mapping parameters, and adaptive time step parameters through multi-branch state space modeling, thereby establishing long-range dependencies across regions and obtaining enhanced features with global contextual representation capabilities.
[0009] S5. In the process of underwater image enhancement, a joint loss function is constructed from the aspects of pixel fidelity, structural consistency, perceptual semantic similarity, color distribution stability and image edge region clarity, and the model parameters are updated in reverse using the joint loss function.
[0010] Preferably, in step S2, the prior guided feature normalization module PGFNM is constructed. The specific process includes: PGFNM first performs a global average along the spatial dimension on each channel to obtain the channel mean. Then, the gray world statistical mean across channels is calculated. , is represented as: , where H, W and C represent the height, width and number of channels of the underwater image or feature map to be enhanced, respectively; This indicates the position of the input image X in the c-th color channel. The eigenvalues at the specified location; subsequently, PGFNM introduces an adaptive gain factor for each channel. Then, channel-level recalibration is performed on the input features to rebalance the global color distribution while maintaining the spatial structure. The calculation method is expressed as follows: , ,in This represents the smallest positive number used to ensure numerical stability. This represents the recalibrated eigenvalues; inspired by Retinex theory, after completing statistical recalibration, PGFNM uses logarithmic operations on... Normalization is performed, and the calculation method is as follows: , Where log represents the logarithmic operation, This represents the eigenvalues after the logarithmic operation. This represents the normalized feature values; finally, the features are restored to the original intensity domain through exponential mapping, and channel-level min-max normalization is used to stabilize the numerical range. The calculation method is as follows: Where exp represents the exponential operation, and min(·) and max(·) represent the minimum and maximum value operations in the spatial dimension, respectively. This represents the eigenvalue after the exponential operation. This represents the smallest positive number used to ensure numerical stability. This represents the final output feature value of PGFNM.
[0011] Preferably, in step S2, a priori guided feature normalization module PGFNM is constructed. Since underwater images typically suffer from uneven color channel responses, inconsistent illumination distribution, and overall color shifts, a gray-world statistical prior and a Retinex-inspired logarithmic domain normalization mechanism are introduced into the feature space to perform lightweight, interpretable color correction and feature distribution stabilization on the input image or feature map. Specifically, PGFNM first performs a global average on each channel of the input image or feature map to obtain the statistical mean of each channel, and further calculates the gray-world statistical mean across channels. Then, based on the deviation between the channel mean and the gray-world statistical mean, a corresponding channel-level adaptive gain factor is generated, and this gain factor is used to... The input features undergo channel-level recalibration to balance the overall response of different color channels. After channel-level recalibration, PGFNM performs logarithmic mapping on the recalibrated features and performs centering normalization in the logarithmic domain to reduce the impact of global illumination variations on feature distribution. Subsequently, the normalized features are restored to the intensity domain through exponential mapping, and channel-level min-max normalization is further used to stabilize the numerical range of the output features, resulting in prior guiding features. Through the above processing, PGFNM can alleviate color shift and illumination inconsistency problems in underwater images without changing the original spatial structure, and provide input features with more balanced color distribution and more stable numerical range for subsequent multi-branch feature adaptive fusion modules.
[0012] Preferably, in step S3, the multi-branch feature adaptive fusion module MBFFM is constructed, and the specific process is as follows: S31. MBFFM first extracts the overall response trend and local saliency information of the features through average pooling and max pooling, respectively. These are then concatenated and passed through a 1×1 convolution before entering the constructed HFSM module. Finally, the GELU activation function is used for non-linear mapping. This process is represented as: ,in This represents the eigenvalues after average pooling. Represents the eigenvalues after max pooling, [ [] indicates a splicing operation. Indicates the HFSM module. This represents the GELU activation function; subsequently, MBFFM further performs orientation-aware modeling on the statistical features, decomposing the fused statistical features along the spatial dimension into sub-features in the height and width directions, respectively used to characterize the statistical change trends in the vertical and horizontal directions; lightweight convolution mapping is used to independently model the statistical features in the two directions on the multi-branch channels, and spatial modulation weights are constructed on this basis; this process is represented as: , ,in This indicates decomposition along the height and width directions of the spatial feature dimensions. Represents the sub-features decomposed along the height direction of the feature dimension space. This represents the sub-features decomposed along the width direction of the feature dimension space. ( ) represents a learnable feature map. Then, spatial feature adaptive fusion is performed. After obtaining the spatial modulation weights, MBFFM modulates the input features element-wise, thereby suppressing regions with limited contribution to enhancement and emphasizing feature responses with high recovery value. The modulated features are fused with the original features through residual connections and further refined by the HFSM module to obtain the final output features. This process can be expressed by the following formula, where... Element-wise multiplication: , ; The S32 and HFSM designs are inspired by the focus on local details and edge information in underwater images. They aim to enhance feature expressiveness through multi-scale feature fusion and nonlinear mapping. First, local spatial features are extracted through convolution. Then, along the channel dimension, the features are split into two branches: one for distribution correction and the other for content preservation. This process can be expressed by the following formula: , ,in Indicates 3 Depth-3 separable convolution, The first step represents the channel dimension splitting operation; subsequently, for the distribution correction branch, a normalization operation is applied to standardize the features, where LN(·) represents the layer normalization operation; then, the normalized feature content is concatenated with the features of the retained branches to obtain the fused features. ,in This process can be represented as: , The fused features are then processed through a nonlinear activation function to enhance representational power, and through 3 3. Convolution modeling local context information; finally, residual connections are introduced to connect the transformed features with the processed features. The input features of the convolutional mapping are summed to preserve the original semantic information and stabilize network training; this process can be represented by the following formula: , ,in Indicates 3 3. Convolutional mapping, This represents the GELU activation function. This represents the input features after being mapped by a 1×1 convolution.
[0013] Preferably, in step S3, a multi-branch feature adaptive fusion module (MBFFM) is constructed. MBFFM fuses the global response information, local saliency information, and orientation-aware information of the input features, and generates spatial modulation weights based on the degradation degree of different spatial regions, thereby achieving adaptive recalibration of the feature response. Specifically, MBFFM first performs average pooling and max pooling operations on the input features to extract the overall response trend and local saliency information respectively. Subsequently, the two types of pooled features are concatenated and... Convolution, the HFSM module, and the GELU nonlinear activation function are fused to obtain statistical fusion features. Further, MBFFM decomposes the statistical fusion features along the height and width directions, modeling the feature variation trends in the vertical and horizontal directions respectively, and generates spatial modulation weights through lightweight learnable mappings. After obtaining the spatial modulation weights, MBFFM uses element-wise multiplication to spatially modulate the input features to enhance regional features with high recovery value and suppress regional responses with limited contribution to enhancement. The modulated features are fused with the original input features through residual connections, and then refined by the HFSM module to obtain spatially perceptual features. HFSM is used to further enhance local details and edge textures. HFSM first... Convolutional processing extracts local spatial features, which are then divided into a distribution correction branch and a content preservation branch along the channel dimension. The distribution correction branch stabilizes the feature distribution through layer normalization, while the content preservation branch preserves the original local responses. Subsequently, the features from the two branches are concatenated and then processed using the GELU activation function. Depthwise separable convolution models local contextual information; finally, the transformed features are fused with the input mapping features through residual connections to obtain the HFSM output features; through the above processing, MBFFM can establish an adaptive fusion relationship between global statistical information, local salient information and orientation-aware information, enabling the model to dynamically adjust the feature response according to the degree of degradation in different spatial regions, thereby improving the ability of underwater images to restore color, enhance texture and preserve structure under complex degradation conditions.
[0014] Preferably, in step S4, the state space module MEF-Mamba is constructed, and the specific process is as follows: S41 and MEF-Mamba first use local convolution to encode input features to capture texture and edge information within the neighborhood, and preserve the original spatial structure through residual connections; to enhance the model's adaptability, learnable scaling parameters are used. This is used to weight and adjust different feature branches, while combining normalization operations to alleviate feature distribution drift and improve the stability of the global modeling process. Based on this, an FMB-SSD module is designed to model long-range dependencies of features. Through a multi-branch feature processing mechanism, it can effectively fuse contextual information from different spatial locations, thereby enhancing the ability to model long-distance dependencies and characterizing the cross-regional degradation associations commonly found in underwater images. After completing global dependency modeling, MEF-Mamba refines and reconstructs features through local convolution to supplement potentially weakened local structural information. Subsequently, a feedforward nonlinear mapping module is introduced to reorganize and enhance channel-dimensional features. A multi-level residual structure runs through the entire base layer, achieving effective fusion of features from different modeling stages. This process can be represented as: , , , ,in Presentation layer normalization operation, ( ) indicates the FMB-SSD module. This indicates the feedforward nonlinear mapping module; The S42 and FMB-SSD modules, based on the classic SSD module, introduce a multi-branch state-space modeling mechanism. Through multi-branch state-space modeling and latent state fusion, they enhance the global dependency modeling capability of features. Specifically, FMB-SSD first performs channel transformation and preliminary encoding on given input features using one-dimensional convolution to meet the requirements of state-space modeling. Then, the encoded features are split into three sub-feature branches along the channel dimension, each performing state-space modeling independently. The split features are then fed into multiple parallel ConvLinear1D branches, which are used to generate the input mapping parameters b, output mapping parameters C, and adaptive time step ∆t in the state-space model, respectively. Here, ConvLinear1D represents a one-dimensional convolutional linear layer, and this process can be represented by the following formula: ,in Reshape( ) represents a one-dimensional convolutional linear layer The tensor shape transformation and channel splitting operations are represented by ), where all parameters except the stride have a length of L and a dimension of N. To introduce local spatial priors before global state modeling, FMB-SSD introduces depthwise separable convolution during the parameter generation stage to jointly enhance the output mapping parameters B, C, and ∆t, enabling the state parameters to perceive local neighborhood structure information. This process can be represented as: ,in Indicates the kernel size as The module employs a deep convolution operator. Then, it combines the learnable global state parameter *a* with an adaptive time step *∆t*, constructs state transition weights through discretization, and combines them element-wise with the mapping parameter *B* to obtain a joint weight representation for state evolution. Based on this, FMB-SSD implements the evolution process of the hidden state through matrix multiplication, which can be represented as: , ,in This represents element-wise multiplication. Represents matrix multiplication. This represents a sequence of hidden states. The transpose matrix is used to represent the process, which enables information aggregation across spatial locations without explicitly constructing an attention matrix, thus effectively modeling long-range spatial dependencies. To enhance feature representation and stabilize state propagation, the hidden state H is fed into a gated nonlinear branch, followed by a one-dimensional linear convolutional layer to generate the hidden state h and feature modulation term Z. The final state representation is obtained through joint modulation of element-wise gating and the residual scaling factor D. ,in This represents the Sigmoid function. This represents element-wise multiplication; finally, the mapping parameters are output. It is used to project the hidden state back into the feature space and reconstruct it into a two-dimensional spatial form as the output of the FMB-SSD module: .
[0015] Preferably, in step S4, a state space module MEF-Mamba is constructed. MEF-Mamba combines local convolutional encoding and state space modeling to establish long-range dependencies across regions while preserving local texture structure, thereby enhancing the model's ability to express global degradation features of underwater images. Specifically, MEF-Mamba first encodes the input features through local convolution to capture texture, edge, and local structural information within the neighborhood, and preserves the original spatial structure through residual connections. Subsequently, the encoded features are subjected to layer normalization and input into the FMB-SSD module for long-range dependency modeling. The module integrates contextual information from different spatial locations through a multi-branch state-space modeling mechanism, enabling the model to achieve cross-regional information interaction without explicitly constructing a large-scale attention matrix. This allows it to characterize the cross-regional correlations of color attenuation, scattering blur, and structural degradation in underwater images. After completing global dependency modeling, MEF-Mamba further refines and reconstructs features through local convolutions to supplement potentially weakened local structural information. Subsequently, a feedforward nonlinear mapping module is introduced to reorganize and enhance channel-dimensional features. The entire module employs multi-level residual connections throughout the local encoding, global modeling, local refinement, and channel enhancement processes to achieve effective feature integration at different stages. The FMB-SSD method effectively integrates and improves training stability. First, it performs one-dimensional convolutional encoding and shape reconstruction on the input features, transforming the two-dimensional spatial features into a sequence representation suitable for state space modeling. Then, it divides the sequence features along the channel dimension into multiple sub-feature branches and generates input mapping parameters, output mapping parameters, and adaptive time step parameters through parallel mapping branches. Further, FMB-SSD introduces depthwise separable convolution in the parameter generation stage to enhance the state parameters' perception of local neighborhood structures. Finally, FMB-SSD combines the learnable global state parameters with the adaptive time step parameters to construct state transition weights, and then... The hidden state evolution process enables information aggregation between different spatial locations. After obtaining the hidden state representation, the module modulates the state features through gated nonlinear branches and residual scaling mechanisms to improve the stability of state propagation and feature representation capabilities. Finally, the hidden state is projected back into the feature space using the output mapping parameters and restored to a two-dimensional spatial form to obtain the output features of FMB-SSD. Through the above processing, MEF-Mamba can simultaneously maintain local structure and model global context, enabling the model to have strong long-range dependency representation capabilities under lightweight conditions, thereby improving the color consistency, texture clarity, and structural integrity of underwater image enhancement results.
[0016] Preferably, in step S5, the joint loss function is constructed as follows: to effectively supervise the network's learning process in terms of pixel fidelity, structural consistency, perceptual semantic similarity, color distribution stability, and image edge region sharpness, a joint loss consisting of multiple loss functions is designed to optimize the model end-to-end; the overall loss function is defined as: ,in , , , The weights are used to balance the influence of different loss terms during training. First, regarding pixel fidelity, a pixel-space-based reconstruction loss is introduced to constrain the consistency of the augmented result with the reference image in overall brightness and color distribution. The loss adopts the L1 norm form and is defined as: ,in Indicates the first element in the augmented image generated by the model. The predicted value of each pixel. Indicates the first reference image in the clear image The true value of each pixel, where N represents the total number of pixels involved in the calculation. Compared to L2 loss, L1 loss is more robust to outliers and can help alleviate color shift problems that may occur during underwater image enhancement. Secondly, regarding structural consistency, to maintain the consistency of the enhancement results in local texture and overall structure, structural similarity loss is introduced as a structural constraint, which takes the form of: ,in The structural similarity metric function is used, and this loss is sensitive to changes in the structural information and contrast of the image, helping to suppress structural distortion that may occur during the enhancement process. Then, regarding perceptual semantic similarity, a perceptual loss based on a pre-trained network is used to improve the naturalness of the enhancement result at the perceptual level. Over-constraining the consistency between the enhanced image and the reference image in the high-level semantic feature space guides the network to generate enhancement results that are more consistent with human visual perception. ,in This represents the feature mapping of the l-th layer in the pre-trained feature extraction network; then, in terms of color distribution stability, considering the color distortion phenomenon that is common in underwater images, constraints are imposed in the perceptually related HVI color space, and HVI color consistency loss is introduced. If the nonlinear mapping from RGB space to HVI space is represented, then the loss is defined as: ,in, The image represents the enhanced image generated by the model, while the corresponding sharp reference image represents the image. The L1 norm is used to explicitly guide the network to focus on the consistency of hue, brightness, and intensity distributions, thereby effectively mitigating color shift caused by light absorption and scattering in underwater images. Finally, regarding image edge sharpness, to further enhance the sharpness of image details and edge regions, an edge-preserving loss is introduced to constrain the consistency between the enhanced result and the reference image in gradient space. ,in This represents the edge extraction operator. This loss helps suppress blurring during the enhancement process and improves the clarity of local structures and contours.
[0017] Preferably, in step S5, to jointly supervise the model in terms of pixel fidelity, structural consistency, perceptual semantic similarity, color distribution stability, and image edge region sharpness, a joint loss function composed of multiple loss functions is used to optimize the model end-to-end. The joint loss function includes reconstruction loss, HVI color consistency loss, structural similarity loss, perceptual loss, and edge preservation loss, and its overall form is expressed as follows: Specifically, the reconstruction loss uses the L1 norm to constrain the brightness and color consistency between the enhanced image and the reference image in pixel space; the structural similarity loss is used to maintain the overall structure and local texture of the enhancement result; the perceptual loss constrains the consistency between the enhanced image and the reference image in the high-level semantic feature space through a pre-trained feature extraction network; the HVI color consistency loss is used to constrain the consistency of hue, brightness, and intensity distribution between the enhanced image and the reference image in the perceptually related color space; and the edge preservation loss is used to constrain the consistency between the enhanced image and the reference image in the gradient space to improve the clarity of edge contours and local textures. Through the above joint loss functions, color restoration, structure preservation, texture details, and visual naturalness can be constrained simultaneously during model training, thereby improving the overall quality of underwater image enhancement results.
[0018] Compared with existing technologies, the beneficial effects of this invention are as follows: By introducing a priori guided feature normalization module, a multi-branch feature adaptive fusion module, and a state space module, this invention has significant advantages in color correction, local detail restoration, global context modeling, and lightweight deployment; it can alleviate the color shift problem in underwater images by utilizing explicit color statistical priors; it can adaptively enhance the feature responses of different degradation regions through spatial modulation weights; it can improve the ability to preserve edge and texture details through a local refinement module; it can establish long-range dependencies across regions with low computational overhead through a state space modeling mechanism; and it can constrain the model training process from multiple levels through a joint loss function; therefore, it can generate underwater enhanced images with more balanced color distribution, clearer texture details, and better structural consistency, while also having good potential for lightweight deployment. Attached Figure Description
[0019] Figure 1 This is a flowchart of an image enhancement method for prior state fusion for underwater robot inspection provided by the present invention.
[0020] Figure 2 This is a flowchart of the prior guided feature normalization module PGFNM provided by the present invention.
[0021] Figure 3 This is a schematic diagram of the structure of the multi-branch feature adaptive fusion module MBFFM provided by the present invention.
[0022] Figure 4 This is a schematic diagram of the heterogeneous normalized fusion module HFSM provided by the present invention.
[0023] Figure 5 This is a structural diagram of the MEF-Mamba state space module provided by the present invention.
[0024] Figure 6 This is a schematic diagram of the structure of the multi-branch state space modeling unit FMB-SSD provided by the present invention. Detailed Implementation
[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0026] Please see Figures 1 to 6 This invention provides an image enhancement method based on prior state fusion for underwater robot inspection. It aims to address common problems in underwater images such as color shift, uneven illumination, decreased contrast, blurred texture, and degraded structural details. Based on prior guided feature normalization, multi-branch feature adaptive fusion, and long-range dependency modeling mechanism of state space, it generates underwater enhanced images with balanced color distribution, clear texture details, and good structural consistency, thereby improving the image usability and information expression capability of underwater robots in marine environmental monitoring tasks.
[0027] S1. Control the underwater robot to navigate in the waters to be inspected and collect raw underwater images of the underwater environment; then perform size adjustment, normalization and noise suppression preprocessing on the raw underwater images to obtain preprocessed underwater robot inspection images.
[0028] Furthermore, in S1, the underwater robot navigates the waters to be inspected in an underwater environment ranging from 0 to 100 meters, following a preset inspection path, and acquires raw inspection images of the underwater environment through its onboard underwater optical imaging equipment. Before the formal acquisition, the underwater robot platform's navigation attitude, shooting distance, and supplementary lighting conditions are adjusted, and the image acquisition state is uniformly set to reduce the impact of equipment imaging differences and underwater environment changes on image quality. For the acquired raw underwater images, quality screening is first performed according to preset rules to remove invalid images caused by drastic changes in robot posture, motion blur, occlusion by suspended particles, local over-darkness, or supplementary lighting reflection. Subsequently, the screened underwater images undergo distortion correction, invalid edge cropping, uniform size transformation, and data format conversion. Furthermore, the underwater images are numerically normalized and standardized to ensure that the image data from different acquisition scenarios have similar data distributions. Finally, the processed underwater robot inspection images are used as preprocessed input images for subsequent prior state fusion image enhancement networks.
[0029] S2. Construct a priori guided feature normalization module PGFNM, including channel statistical feature extraction, gray world prior response generation, logarithmic domain normalization correction, prior correction factor calculation, and feature recalibration output.
[0030] Furthermore, in S2, a priori guided feature normalization module PGFNM is constructed, and the specific process includes...
[0031] The original underwater image X is used to generate a stable feature-normalized image through the PGFNM module. The underwater image is first globally averaged along the spatial dimension for each channel to obtain the channel mean. Then, the gray world statistical mean across channels is calculated. , is represented as: Where H is 256, W is 256, and C is 64, representing the height, width, and feature dimension of the underwater image to be enhanced, respectively; This indicates the position of the input image X in the c-th feature channel. The eigenvalues at the specified location; subsequently, PGFNM introduces an adaptive gain factor for each channel. By using an adaptive gain factor to recalibrate the input features at the channel level, the global color distribution is rebalanced while maintaining the spatial structure. The calculation method is expressed as follows: , ,in This represents the smallest positive number used to ensure numerical stability. This represents the recalibrated eigenvalues; inspired by Retinex theory, after completing statistical recalibration, PGFNM uses logarithmic operations on... Normalization is performed, and the calculation method is as follows: , Where log represents the logarithmic operation, This represents the eigenvalues after the logarithmic operation. This represents the normalized feature values; finally, the features are restored to the original intensity domain through exponential mapping, and channel-level min-max normalization is used to stabilize the numerical range. The calculation method is as follows: Where exp represents the exponential operation, and min(·) and max(·) represent the minimum and maximum value operations in the spatial dimension, respectively. This represents the eigenvalue after the exponential operation. This represents the smallest positive number used to ensure numerical stability. This represents the final output feature value of PGFNM; this output feature is then used as the input feature of the subsequent network skeleton.
[0032] S3. Construct a multi-branch feature adaptive fusion module (MBFFM), which includes global response feature extraction, local salient feature extraction, orientation-aware feature encoding, spatial modulation weight generation, and multi-branch feature fusion output.
[0033] Furthermore, in S3, a multi-branch feature adaptive fusion module (MBFFM) is constructed, the specific process of which includes...
[0034] S31. Construct MBFFM, whose input features are ,in The value of 8 indicates the batch size. 64 indicates the number of channels. and Both are 256, representing the height and width of the feature map, respectively. First, average pooling and max pooling are used to extract the overall response trend and local saliency information of the features, respectively. They are then concatenated, and the channels are up-dimensioned using 1×1 convolutions, where... The convolution has 2 input channels and 1 output channel. With a value of 64, a step size of 1, and padding of 0, its function is to complete channel mapping and cross-channel information fusion into the constructed HFSM module without changing the spatial dimensions, and then use the GELU activation function for nonlinear mapping; this process is expressed as: ,in This represents the eigenvalues after average pooling. Represents the eigenvalues after max pooling, [ [] indicates a splicing operation. Indicates the HFSM module. This represents the GELU activation function; MBFFM further performs orientation-aware modeling on the statistical features, decomposing the fused statistical features along the spatial dimension into sub-features in the height and width directions, respectively used to characterize the statistical change trends in the vertical and horizontal directions; lightweight convolution mapping is used to independently model the statistical features in the two directions on the multi-branch channels, and spatial modulation weights are constructed on this basis; this process is represented as: , ,in This indicates decomposition along the height and width directions of the spatial feature dimensions. Represents the sub-features decomposed along the height direction of the feature dimension space. This represents the sub-features decomposed along the width direction of the feature dimension space. ( ) represents a learnable feature map. and Let these represent the learnable mappings in the height and width directions, respectively. Then, spatial feature adaptive fusion is performed. After acquiring spatial modulation privilege, MBFFM modulates the input features element-wise, thereby suppressing regions with limited contribution to enhancement and emphasizing feature responses with high recovery value. The modulated features are fused with the original features through residual connections and further refined by the HFSM module to obtain the final output features. This process can be expressed by the following formula: ,in This represents element-wise multiplication. This represents the features after spatial weight modulation. This operation can enhance regional responses with high recovery value and suppress regional responses with limited contribution to the enhancement. Finally, the modulated features are... Compared with the original input features Residual connections are performed, and the data is further refined by the HFSM module to obtain the output features of MBFFM: Through the above specific implementation methods, MBFFM can simultaneously utilize global statistical response, local salient response, and spatial variation information in the height and width directions to adaptively modulate the feature responses of different spatial locations and different channels, thereby improving the model's ability to recover non-uniformly degraded regions, locally blurred regions, and color imbalance regions in underwater images.
[0035] S32. Construct the Heterogeneous Normalized Fusion Module (HFSM). In step S3, the HFSM module is used to perform local spatial modeling, distribution correction, and content preservation on the input features, thereby enhancing the expressive power of local textures, edge contours, and detailed structures in underwater images. This module can be embedded in MBFFM to further refine statistical fusion features or residual fusion features. The design of HFSM is inspired by the focus on local details and edge information in underwater images, aiming to improve the expressive power of features through multi-scale feature fusion and nonlinear mapping. First, local spatial features are extracted through convolution, and then the features are split into two branches along the channel dimension, one for distribution correction and the other for content preservation. This process can be expressed by the formula: , ,in Indicates 3 3 convolutions, This indicates a channel-dimensional splitting operation, when the number of channels... When the number of channels is even, the two branches have the same number of channels; when the number of channels is even... When it is not divisible by 2, it can be done by The number of channels is pre-adjusted during convolution, or channel splitting is performed using an approximately equal distribution method. Then, for the distribution correction branch, a normalization operation is applied to standardize the features, where LN(·) represents the layer normalization operation. Finally, the normalized feature content is concatenated with the features of the retained branches to obtain the fused features. ,in This process can be represented as: , The fused features are then processed through the non-linear activation function Sigmoid to enhance representational power, and then through 3... 3. Depthwise separable convolutions model local contextual information, followed by a Sigmoid function to enhance feature representation; finally, to ensure consistent channel dimensions between the two feature paths in the residual connections, HFSM further employs... Convolution pairs input features Perform mapping to obtain input mapping features. Then, a residual connection is introduced to connect the transformed features with the transformed features. The input features of the convolutional mapping are summed to preserve the original semantic information and stabilize network training; this process can be represented by the following formula: , ,in Indicates 3 3. Convolutional mapping, The GELU activation function is represented here. Through the above specific implementation, HFSM stabilizes the feature distribution by normalizing the distribution correction branch layer on the one hand, and preserves the original local detail response by the content preservation branch on the other hand. The two are combined and then local context modeling is performed by nonlinear mapping and depthwise separable convolution, thereby enhancing the ability to express the edge contours, texture details and local structures in underwater images.
[0036] S4. Construct the state space module MEF-Mamba, including local texture feature extraction, multi-branch state space modeling, cross-regional long-range dependency capture, residual feature enhancement, and global context-enhanced feature output.
[0037] Furthermore, the MEF-Mamba state space module is constructed in S4, and the specific process includes...
[0038] S41. In step S4, a MEF-Mamba module is constructed. MEF-Mamba first uses local convolution to encode the input features to capture texture and edge information within the neighborhood, and preserves the original spatial structure through residual connections. To enhance the model's adaptability, learnable scaling parameters are used. It will be used to weight and adjust different feature branches. Initially, it can be set to a small positive number, where Initialized to 0.1, this controls the influence of the state space branch on the backbone features during the initial training phase. Simultaneously, normalization is used to mitigate feature distribution drift and improve the stability of the global modeling process. Based on this, an FMB-SSD module is designed to model long-range dependencies of features. Through a multi-branch feature processing mechanism, it effectively fuses contextual information from different spatial locations, thereby enhancing the ability to model long-distance dependencies and characterizing the cross-regional degradation associations commonly found in underwater images. After completing global dependency modeling, MEF-Mamba refines and reconstructs features through local convolution to supplement potentially weakened local structural information. Subsequently, a feedforward nonlinear mapping module is introduced to reorganize and enhance channel-dimensional features. A multi-level residual structure runs through the entire base layer, achieving effective fusion of features from different modeling stages. This process can be represented as: , , , ,in This indicates that the input feature has a dimension of 64. This represents a 3×3 convolution operation. Presentation layer normalization operation, ( ) indicates the FMB-SSD module. This indicates the feedforward nonlinear mapping module.
[0039] S42. In step S4, an FMB-SSD module is constructed. Based on the classic SSD module, the FMB-SSD module introduces a multi-branch state space modeling mechanism. Through multi-branch state space modeling and latent state fusion, it enhances the global dependency modeling capability of features. Specifically, FMB-SSD processes input features... Perform shape transformation to unfold the two-dimensional spatial features into one-dimensional sequence features; then... The image is unfolded into a length of The sequence, where The length of the spatial location sequence is represented by L = 256 × 256; subsequently, FMB-SSD uses one-dimensional convolution to apply the sequence features. Channel transformation and preliminary encoding are performed; a one-dimensional convolution with a kernel size of 1 and a stride of 1 is used, and padding is set according to the kernel size to maintain the sequence length. The process remains unchanged; this one-dimensional convolution is used to perform preliminary feature mapping in the sequence dimension or channel dimension, adapting the input features to the subsequent state space modeling process; after the preliminary encoding is completed, the encoded features are split into three sub-feature branches along the channel dimension, each branch independently performing state space modeling; then the split features are fed into multiple parallel linear convolution branches ConvLinear1D, which are used to generate the input mapping parameters b, output mapping parameters C, and adaptive time step ∆t in the state space model; where ConvLinear1D represents a one-dimensional convolutional linear layer, and this process can be expressed by the formula: Reshape( () represents tensor shape transformation and channel splitting operations. The expression represents a linear convolutional layer, ConvLinear1D, where all parameters except the stride have a length of L and a dimension of N; where... , and All have the same length as the sequence. The relevant representations are used to model the state propagation relationships at different spatial locations. Each branch can independently learn its corresponding state parameters, thereby improving the model's ability to express degradation patterns in different regions. It should be noted that if a joint enhancement approach is used in the actual implementation, it can also be... , and After concatenation, a unified depthwise separable convolution is input, followed by further splitting to obtain enhanced state parameters, which are not uniquely limited here. To introduce local spatial priors before global state modeling, FMB-SSD introduces depthwise separable convolutions during the parameter generation stage to jointly enhance the output mapping parameters B, C, and ∆t, enabling the state parameters to perceive local neighborhood structural information. This process can be represented as: ,in Indicates the kernel size as The module employs a deep convolution operator. Then, it combines the learnable global state parameter *a* with an adaptive time step *∆t*, constructs state transition weights through discretization, and combines them element-wise with the mapping parameter *B* to obtain a joint weight representation for state evolution. Based on this, FMB-SSD implements the evolution process of the hidden state through matrix multiplication, which can be represented as: , ,in This represents element-wise multiplication. Represents matrix multiplication. This represents a sequence of hidden states. Let X, A, and B represent the transpose matrix, with dimensions of 256. This process enables information aggregation across spatial locations without explicitly constructing an attention matrix, thus effectively modeling long-range spatial dependencies. To enhance feature representation and stabilize state propagation, the hidden state H is fed into a gated nonlinear branch, followed by a one-dimensional linear convolutional layer to generate the hidden state h and feature modulation term Z. The final state representation is obtained through joint modulation of element-wise gating and the residual scaling factor D. ,in This represents the Sigmoid function. This represents element-wise multiplication. Through this gated modulation process, effective state information can be enhanced and redundant responses suppressed, thereby improving the stability of state propagation. Finally, the output mapping parameters are... It is used to project the hidden state back into the feature space and reconstruct it into a two-dimensional spatial form as the output of the FMB-SSD module: Through the above specific implementation methods, FMB-SSD can simultaneously learn the state propagation relationships in different subspaces through a multi-branch state space modeling mechanism, and improve the stability and expressiveness of the long-range dependency modeling process by combining local spatial priors and gating modulation mechanisms. Compared with explicit attention modeling, this module does not need to directly construct a complete spatial attention matrix, which helps to reduce computational complexity and is suitable for lightweight underwater image enhancement networks.
[0040] In step S5, to effectively supervise the network's learning process in terms of pixel fidelity, structural consistency, perceptual semantic similarity, color distribution stability, and image edge region sharpness, a joint loss consisting of multiple loss functions is used to optimize the model end-to-end; the overall loss function is defined as: ,in, , , , The weights are used to balance the influence of different loss terms during training. First, a pixel-space-based reconstruction loss is introduced to constrain the consistency of the augmented result with the reference image in terms of overall brightness and color distribution. The loss adopts the L1 norm form and is defined as follows: ,in Indicates the first element in the augmented image generated by the model. The predicted value of each pixel. Indicates the first reference image in the clear image The true value of each pixel, where N represents the total number of pixels involved in the calculation. Compared to L2 loss, L1 loss is more robust to outliers and can help alleviate color shift problems that may occur during underwater image enhancement. Secondly, regarding structural consistency, to maintain the consistency of the enhancement results in local texture and overall structure, structural similarity loss is introduced as a structural constraint, which takes the form of: ,in The structural similarity metric function is used, and this loss is sensitive to changes in the structural information and contrast of the image, helping to suppress structural distortion that may occur during the enhancement process. Then, regarding perceptual semantic similarity, a perceptual loss based on a pre-trained network is used to improve the naturalness of the enhancement result at the perceptual level. Over-constraining the consistency between the enhanced image and the reference image in the high-level semantic feature space guides the network to generate enhancement results that are more consistent with human visual perception. ,in This represents the feature mapping of the l-th layer in the pre-trained feature extraction network; then, in terms of color distribution stability, considering the color distortion phenomenon that is common in underwater images, constraints are imposed in the perceptually related HVI color space, and HVI color consistency loss is introduced. If the nonlinear mapping from RGB space to HVI space is represented, then the loss is defined as: ,in, The image represents the enhanced image generated by the model, while the corresponding sharp reference image represents the image. The L1 norm is used to explicitly guide the network to focus on the consistency of hue, brightness, and intensity distributions, thereby effectively mitigating color shift caused by light absorption and scattering in underwater images. Finally, regarding image edge sharpness, to further enhance the sharpness of image details and edge regions, an edge-preserving loss is introduced to constrain the consistency between the enhanced result and the reference image in gradient space. ,in This represents the edge extraction operator. This loss helps to suppress the blurring phenomenon generated during the enhancement process and improve the clarity of local structures and contours.
[0041] Furthermore, the image enhancement method for prior state fusion in underwater robot inspection is implemented using Python and the PyTorch framework; the model input is a resolution of [resolution value missing]. RGB underwater images, of which The height and width of the input image are represented by 3, and 3 represents the three color channels of RGB. After feature extraction, the input image is sequentially input into the prior guided feature normalization module PGFNM, the multi-branch feature adaptive fusion module MBFFM, and the state space module MEF-Mamba, and finally outputs an underwater enhanced image with the same size as the input.
[0042] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements all fall within the protection scope of the present invention.
Claims
1. An image enhancement method for prior state fusion in underwater robot inspection, characterized in that, Includes the following steps: S1. Control the underwater robot to navigate in the waters to be inspected and collect raw underwater images of the underwater environment; then perform size adjustment, normalization and noise suppression preprocessing on the raw underwater images to obtain preprocessed underwater robot inspection images; S2. Construct a priori guided feature normalization module PGFNM, generate channel-level correction factors based on the deviation relationship between the mean of each color channel and the global grayscale statistical mean, and combine logarithmic domain normalization to suppress global illumination perturbation to obtain priori guided features with color consistency constraints. S3. Construct a multi-branch feature adaptive fusion module MBFFM, which fuses the global response information obtained by average pooling, the local saliency information obtained by max pooling, and the orientation-aware features of the prior guided features to generate spatial feature weights, and recalibrates the feature responses of different spatial locations accordingly to obtain spatial-aware features. S4. Constructing a state space module: MEF-Mamba utilizes local convolution to encode the neighborhood structure information of spatially aware features, and generates input mapping parameters, output mapping parameters, and adaptive time step parameters through multi-branch state space modeling, thereby establishing long-range dependencies across regions and obtaining enhanced features with global contextual expression capabilities. S5. In the process of underwater image enhancement, a joint loss function is constructed from the aspects of pixel fidelity, structural consistency, perceptual semantic similarity, color distribution stability and image edge region clarity, and the model parameters are updated in reverse using the joint loss function.
2. The image enhancement method for prior state fusion for underwater robot inspection according to claim 1, characterized in that, In step S2, the process of prior-guided enhancement of image features is as follows: PGFNM first performs a global average along the spatial dimension on each channel to obtain the channel mean. Then, the gray world statistical mean across channels is calculated. , represented as: Where H, W and C represent the height, width and feature dimension of the underwater image or feature map to be enhanced, respectively; This indicates the position of the input image X in the c-th color channel. Eigenvalues at; Subsequently, PGFNM introduced an adaptive gain factor for each channel. Then, channel-level recalibration is performed on the input features to rebalance the global color distribution while maintaining the spatial structure. The calculation method is expressed as follows: , ,in This represents the smallest positive number used to ensure numerical stability. This represents the recalibrated eigenvalues; inspired by Retinex theory, after completing statistical recalibration, PGFNM uses logarithmic operations on... Normalization is performed, and the calculation method is as follows: , Where log represents the logarithmic operation, This represents the eigenvalues after the logarithmic operation. This represents the normalized feature values; finally, the features are restored to the original intensity domain through exponential mapping, and channel-level min-max normalization is used to stabilize the numerical range. The calculation method is as follows: Where exp represents the exponential operation, and min(·) and max(·) represent the minimum and maximum value operations in the spatial dimension, respectively. This represents the eigenvalue after the exponential operation. This represents the smallest positive number used to ensure numerical stability. This represents the final output feature value of PGFNM.
3. The image enhancement method for prior state fusion for underwater robot inspection according to claim 1, characterized in that, In step S3, the adaptive fusion process of multi-branch features is as follows: S31. MBFFM first extracts the overall response trend and local saliency information of features through average pooling and max pooling, respectively. These are then concatenated and passed through a 1×1 convolution before entering the constructed heterogeneous normalization fusion module HFSM. Finally, the GELU activation function is used for nonlinear mapping. This process is represented as: ,in This represents the eigenvalues after average pooling. Represents the eigenvalues after max pooling, [ [] indicates a splicing operation. Indicates the HFSM module. This represents the GELU activation function; subsequently, MBFFM further performs orientation-aware modeling on the statistical features, decomposing the fused statistical features along the spatial dimension into sub-features in the height and width directions, respectively used to characterize the statistical change trends in the vertical and horizontal directions; lightweight convolution mapping is used to independently model the statistical features in the two directions on the multi-branch channels, and spatial modulation weights are constructed on this basis; this process is represented as: , ,in This indicates decomposition along the height and width directions of the spatial feature dimensions. Represents the sub-features decomposed along the height direction of the feature dimension space. Represents the sub-features decomposed along the width direction of the feature dimension space. ( ) represents a learnable feature map. Then, spatial feature adaptive fusion is performed. After obtaining spatial modulation privilege, MBFFM modulates the input features in an element-wise manner, thereby suppressing regions that contribute little to the enhancement and emphasizing features with high recovery value. The modulated features are fused with the original features through residual connections and further refined by the HFSM module to obtain the final output features. This process can be represented by the following formula, where Element-wise multiplication: , ; S32. The Heterogeneous Normalization Fusion Module (HFSM) is inspired by the focus on local details and edge information in underwater images. It aims to enhance feature expressiveness through multi-scale feature fusion and nonlinear mapping. First, local spatial features are extracted through convolution. Then, along the channel dimension, the features are split into two branches: one for distribution correction and the other for content preservation. This process can be expressed by the formula: , ,in Indicates 3 3 convolutions, The first step represents the channel dimension splitting operation; subsequently, for the distribution correction branch, a normalization operation is applied to standardize the features, where LN(·) represents the layer normalization operation; then, the normalized feature content is concatenated with the features of the retained branches to obtain the fused features. ,in This process can be represented as: , The fused features are then processed through a nonlinear activation function to enhance representational power, and through 3 3. Depthwise separable convolution models local contextual information; finally, residual connections are introduced to combine the transformed features with the processed features. The input features of the convolutional mapping are summed to preserve the original semantic information and stabilize network training; this process can be represented by the following formula: , ,in Indicates 3 3. Convolutional mapping, This represents the GELU activation function. This represents the input features after being mapped by a 1×1 convolution.
4. The image enhancement method for prior state fusion for underwater robot inspection according to claim 1, characterized in that, In step S4, the MEF-Mamba construction process is as follows: S41 and MEF-Mamba first use local convolution to encode input features to capture texture and edge information within the neighborhood, and preserve the original spatial structure through residual connections; to enhance the model's adaptability, learnable scaling parameters are used. This will be used to weight and adjust different feature branches, while combining normalization operations to alleviate feature distribution drift and improve the stability of the global modeling process. Based on this, we designed the FMB-SSD module for long-range dependency modeling of features. Its multi-branch feature processing mechanism can effectively fuse contextual information from different spatial locations, thereby enhancing the ability to model long-distance dependencies and characterizing the cross-regional degradation associations commonly found in underwater images. After completing global dependency modeling, MEF-Mamba refines and reconstructs features through local convolution to supplement potentially weakened local structural information. Subsequently, a feedforward nonlinear mapping module is introduced to reorganize and enhance channel-dimensional features. A multi-level residual structure runs through the entire base layer, achieving effective fusion of features from different modeling stages. This process can be represented as: , , , ,in Presentation layer normalization operation, ( ) indicates the FMB-SSD module. This indicates the feedforward nonlinear mapping module; S42. The Multi-Branch State Space Modeling Unit (FMB-SSD) module, based on the classic SSD module, introduces a multi-branch state space modeling mechanism. Through multi-branch state space modeling and latent state fusion, it enhances the global dependency modeling capability of features. Specifically, for a given input feature, FMB-SSD first performs channel transformation and preliminary encoding through one-dimensional convolution to meet the requirements of state space modeling. Then, the encoded feature is split into three sub-feature branches along the channel dimension, each performing state space modeling independently. The split features are then fed into multiple parallel ConvLinear1D branches, used to generate the input mapping parameter b, output mapping parameter C, and adaptive time step ∆t in the state space model, respectively. Here, ConvLinear1D represents a one-dimensional convolutional linear layer, and this process can be expressed by the formula: Reshape( The tensor shape transformation and channel splitting operations are represented by ), where all parameters except the stride have a length of L and a dimension of N. To introduce local spatial priors before global state modeling, FMB-SSD introduces depthwise separable convolution during the parameter generation stage to jointly enhance the output mapping parameters B, C, and ∆t, enabling the state parameters to perceive local neighborhood structure information. This process can be represented as: ,in Indicates the kernel size as The module employs a deep convolution operator. Then, it combines the learnable global state parameter *a* with an adaptive time step *∆t*, constructs state transition weights through discretization, and combines them element-wise with the mapping parameter *B* to obtain a joint weight representation for state evolution. Based on this, FMB-SSD implements the evolution process of the hidden state through matrix multiplication, which can be represented as: , ,in This represents element-wise multiplication. Represents matrix multiplication. This represents a sequence of hidden states. The transpose matrix is used to represent the process, which enables information aggregation across spatial locations without explicitly constructing an attention matrix, thus effectively modeling long-range spatial dependencies. To enhance feature representation and stabilize state propagation, the hidden state H is fed into a gated nonlinear branch, followed by a one-dimensional linear convolutional layer to generate the hidden state h and feature modulation term Z. The final state representation is obtained through joint modulation of element-wise gating and the residual scaling factor D. ,in This represents the Sigmoid function. This represents element-wise multiplication; finally, the mapping parameters are output. It is used to project the hidden state back into the feature space and reconstruct it into a two-dimensional spatial form as the output of the FMB-SSD module: .
5. The image enhancement method for prior state fusion for underwater robot inspection according to claim 1, characterized in that, In step S5, the joint loss function is constructed: To effectively supervise the learning process of the network in terms of pixel fidelity, structural consistency, perceptual semantic similarity, color distribution stability, and image edge region sharpness, a joint loss consisting of multiple loss functions was designed to optimize the model end-to-end; the overall loss function is defined as: ,in , , , The weights are used to balance the influence of different loss terms during training. First, regarding pixel fidelity, a pixel-space-based reconstruction loss is introduced to constrain the consistency of the augmented result with the reference image in overall brightness and color distribution. The loss adopts the L1 norm form and is defined as: ,in Indicates the first element in the augmented image generated by the model. The predicted value of each pixel. Indicates the first reference image in the clear image The true value of each pixel, where N represents the total number of pixels involved in the calculation. Compared to L2 loss, L1 loss is more robust to outliers and can help alleviate color shift problems that may occur during underwater image enhancement. Secondly, regarding structural consistency, to maintain the consistency of the enhancement results in local texture and overall structure, structural similarity loss is introduced as a structural constraint, which takes the form of: ,in The structural similarity metric function is represented by a loss function that is sensitive to changes in the structural information and contrast of the image, which helps to suppress structural distortion that may occur during the enhancement process. Then, in terms of perceptual semantic similarity, a perceptual loss based on a pre-trained network is adopted to improve the naturalness of the enhancement result at the perceptual level. By over-constraining the consistency between the enhanced image and the reference image in the high-level semantic feature space, the network is guided to generate enhanced results that are more consistent with human visual perception. ,in This represents the feature mapping of the l-th layer in the pre-trained feature extraction network; then, in terms of color distribution stability, considering the color distortion phenomenon that is common in underwater images, constraints are imposed in the perceptually related HVI color space, and HVI color consistency loss is introduced. If the nonlinear mapping from RGB space to HVI space is represented, then the loss is defined as: ,in, The image represents the enhanced image generated by the model, while the corresponding sharp reference image represents the image. The L1 norm is used to explicitly guide the network to focus on the consistency of hue, brightness, and intensity distributions, thereby effectively mitigating color shift caused by light absorption and scattering in underwater images. Finally, regarding image edge sharpness, to further enhance the sharpness of image details and edge regions, an edge-preserving loss is introduced to constrain the consistency between the enhanced result and the reference image in gradient space. ,in This represents the edge extraction operator. This loss helps to suppress the blurring phenomenon generated during the enhancement process and improve the clarity of local structures and contours.