A water body color identification regression method and system based on spatiotemporal causality and manifold learning
By employing a water color recognition regression method based on spatiotemporal causality and manifold learning, the problems of environmental interference and computational complexity in water color monitoring are solved, enabling real-time, accurate water color recognition and lightweight deployment in complex terrain backgrounds.
Patent Information
- Application Number
- CN202511705076.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-20
AI Technical Summary
Existing technologies struggle to achieve real-time, large-scale water color monitoring, especially in complex terrain environments where water area segmentation is not robust enough. Furthermore, they are computationally complex, making them unsuitable for edge device deployment and unable to effectively address the impacts of haze, light interference, and spatiotemporal dynamics.
We employ a water color recognition regression method based on spatiotemporal causality and manifold learning. Through defogging and illumination correction, water region segmentation, feature dimensionality reduction and feature fusion, combined with an end-to-end lightweight architecture, we achieve full-link automation of environmental interference suppression and feature extraction.
It achieves stable and accurate water color recognition in natural scenes, reduces computational complexity, adapts to real-time deployment of edge devices, eliminates fog and light interference, and improves recognition efficiency and robustness.
Smart Images

Figure CN121170610B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of environmental monitoring and computer vision, and in particular relates to a water color recognition regression method and system based on spatiotemporal causality and manifold learning. Background Technology
[0002] Water color is an important visual indicator for assessing water quality and the health of aquatic ecosystems. Its changes are affected by phytoplankton reproduction, river outflows, meteorological conditions, and human activities (such as eutrophication). Long-term monitoring of water color and transparency is crucial for assessing environmental changes. Water color can reflect the concentration and distribution of suspended solids, organic matter, algae, and other components in the water.
[0003] Traditional water color monitoring methods mainly rely on on-site sampling (such as radiometers) and laboratory analysis. These methods are time-consuming and labor-intensive, making real-time, large-scale monitoring difficult. Traditional satellite remote sensing methods have limited accuracy in nearshore and inland waters, and are costly and cumbersome. Some researchers use satellite remote sensing images to identify water color anomalies based on chromaticity angle, FUI color index, and water transparency; others extract colors from high-resolution camera images in the HSV color space; still others perform color analysis based on reflectance spectra. With the development of computer vision technology, image processing-based water color recognition methods are gradually attracting attention. Among these, WACODI combines spectroscopy and colorimetry techniques to extract the inherent color of water from digital images, and some researchers have improved UNet for water color recognition.
[0004] Extensive analysis and research have revealed several key challenges to current water color recognition technology: First, water images in natural scenes are often affected by environmental interference such as haze and sudden changes in light intensity, leading to significant fluctuations in recognition accuracy. Second, accurate segmentation of water areas is a fundamental prerequisite for color recognition, but existing algorithms lack robustness in segmentation against complex terrain backgrounds (such as riparian vegetation and water-land transition zones). Third, water color exhibits significant spatiotemporal dynamics, making it difficult for single-modal feature extraction to fully cover its seasonal spectral variations and regional color difference patterns. Fourth, existing methods generally suffer from high computational complexity, making it difficult to meet the engineering deployment requirements for real-time monitoring on low-computing-power edge devices.
[0005] In existing technologies, some methods attempt to address the aforementioned problems. For example, some studies have employed deep learning methods for water body segmentation, but these methods typically require large amounts of labeled training data and have high model complexity. Other studies have utilized image enhancement techniques to address haze and lighting issues, but have failed to effectively integrate them with water color recognition tasks. Still other studies have explored water color classification methods based on spectral features, but these methods often ignore temporal information and struggle to perform accurate color value regression.
[0006] In summary, existing technologies have not yet provided a water color recognition solution that can simultaneously address image quality enhancement, accurate water segmentation, multimodal feature fusion, and lightweight computation, especially suitable for real-time monitoring in edge computing environments. Summary of the Invention
[0007] The purpose of this invention is to provide a water color recognition regression method and system based on spatiotemporal causality and manifold learning to solve the above-mentioned methods in the prior art.
[0008] This invention is achieved through the following technical solution:
[0009] In a first aspect, the present invention provides a water color recognition regression method based on spatiotemporal causality and manifold learning, comprising:
[0010] Obtain the current water body video sequence, and perform defogging and illumination correction on the current water body video sequence to obtain the target water body video sequence;
[0011] The water body region is detected and extracted from the current target water body video sequence, and the high-dimensional features of the water body region are reduced to obtain manifold learning features;
[0012] A spatiotemporal causal feature learning model is established, and features are extracted from the water body area through the spatiotemporal causal feature learning model to obtain spatiotemporal causal features;
[0013] A feature fusion model is established to fuse manifold learning features and spatiotemporal causal features to obtain fused features. A color recognition model is then established, and the final predicted water color value is output based on the fused features.
[0014] Secondly, the present invention also provides a water body color recognition and regression system based on spatiotemporal causality and manifold learning, for use in the aforementioned water body color recognition and regression method based on spatiotemporal causality and manifold learning:
[0015] The multidimensional coupling preprocessing module is configured to acquire the current water body video sequence, and perform defogging and illumination correction on the current water body video sequence to obtain the target water body video sequence.
[0016] The water body region segmentation module is configured to detect and extract water body regions from the current target water body video sequence, and perform high-dimensional feature reduction on the water body regions to obtain manifold learning features;
[0017] The spatiotemporal causal feature learning module is configured to establish a spatiotemporal causal feature learning model, and extract features from the water body area through the spatiotemporal causal feature learning model to obtain spatiotemporal causal features;
[0018] The adaptive multimodal feature fusion and regression module is configured to establish a feature fusion model, which fuses manifold learning features and spatiotemporal causal features to obtain fused features, establishes a color recognition model, and outputs the final predicted water color value based on the fused features through the color recognition model.
[0019] The technical solution of the present invention has at least the following advantages and beneficial effects:
[0020] 1. This invention eliminates interference from fog, water surface reflection, and sudden changes in illumination by using a hierarchical feature decoupling dehazing network and a multi-scale illumination correction framework, thereby achieving spectral fidelity and brightness balance in water body images and providing pure input for color recognition.
[0021] 2. Based on hierarchical feature extraction networks and multi-scale boundary optimization, combined with pre-trained knowledge transfer and spatial attention mechanisms, pixel-level water area localization is achieved in scenarios such as riparian vegetation and water-land transition zones.
[0022] 3. Innovative dynamic node topology network and Riemann optimization mechanism reduce the spatiotemporal feature dimension while preserving the essential color characteristics, thereby reducing computational complexity and adapting to real-time deployment of edge devices.
[0023] 4. By using a dual-stream decoupling architecture to separate causal signals from environmental confounding factors, and combining temporal gating and mutual information constraints, the evolution of color over time is captured, thereby improving the temporal consistency of recognition.
[0024] 5. By integrating spatiotemporal causal features and manifold learning features through an adaptive attention mechanism, and combining residual augmented regression and multi-level loss supervision, stable and accurate color prediction is achieved in natural scenes.
[0025] 6. End-to-end lightweight architecture with fully automated processing. Adopting an end-to-end pipeline design of preprocessing-segmentation-feature modeling-regression, no manual intervention is required from video input to color prediction. Through the cascading collaboration of five core modules (video preprocessing, water segmentation, manifold learning, temporal causal modeling, and color recognition), the entire process from environmental interference suppression and feature extraction to result output is automated, avoiding information loss in intermediate stages and improving recognition efficiency and robustness. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1This is a schematic diagram of the overall architecture of the present invention;
[0028] Figure 2 This is a rendering of the defogging module in this invention;
[0029] Figure 3 This is a rendering of the invention in the illumination correction module;
[0030] Figure 4 This is a flowchart of the process for detecting and extracting water bodies in this invention;
[0031] Figure 5 This is a schematic diagram of the manifold modeling process in this invention;
[0032] Figure 6 This is a schematic diagram of the spatiotemporal causal modeling process in this invention;
[0033] Figure 7 This is a diagram illustrating the color recognition effect of the present invention.
[0034] Figure 8 This is a schematic diagram illustrating the accuracy of the present invention;
[0035] Figure 9 This is a divergence plot for predicting water color values according to the present invention. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0037] This invention provides a water color recognition regression method based on spatiotemporal causality and manifold learning, comprising:
[0038] S1: Acquire the current water body video sequence, and perform defogging and illumination correction on the current water body video sequence to obtain the target water body video sequence; S2: Detect and extract the water body region from the current target water body video sequence, and perform high-dimensional feature reduction on the water body region to obtain manifold learning features; S3: Establish a spatiotemporal causal feature learning model, and extract features from the water body region through the spatiotemporal causal feature learning model to obtain spatiotemporal causal features; S4: Establish a feature fusion model, and fuse the manifold learning features and spatiotemporal causal features through the feature fusion model to obtain fused features, establish a color recognition model, and output the final predicted water body color value based on the fused features through the color recognition model.
[0039] The method described above in this invention achieves fully automated processing with an end-to-end lightweight architecture. Employing an end-to-end pipeline design of preprocessing-segmentation-feature modeling-regression, no manual intervention is required from video input to color prediction. Through the cascading collaboration of five core modules (video preprocessing, water segmentation, manifold learning, temporal causal modeling, and color recognition), the entire process from environmental interference suppression and feature extraction to result output is automated, avoiding information loss in intermediate stages and improving recognition efficiency and robustness.
[0040] In one exemplary embodiment of the present invention, the step of performing defogging and illumination correction on the current water body video sequence to obtain the target water body video sequence includes:
[0041] S101: Decode the acquired water body video sequence, extract key frames according to the preset time interval, and obtain the real image sequence;
[0042] Real image sequence , Let T be the T-th keyframe, where T is the number of keyframes extracted. Then, the extracted keyframes are resized to meet the input requirements of subsequent modules.
[0043] S102: Construct a water defogging framework for hierarchical feature decoupling and spectral fidelity preservation, and restore water images under fog interference based on the current real image sequence based on the water defogging framework;
[0044] A water dehazing network framework based on hierarchical feature decoupling is constructed. Through a variable-scale convolutional kernel group and adaptive weight fusion mechanism, the fog distribution and water texture are accurately separated. This module designs a three-level processing flow to address the low contrast and spectral distortion problems unique to water scenes: multi-scale feature extraction, dynamic compensation mapping generation, and cross-color gamut joint optimization, to ensure high-fidelity restoration of the water spectrum after dehazing.
[0045] image 16-channel features are obtained after initial convolution. To address the issue of traditional defogging priors failing due to visual confusion caused by low contrast in water areas and fog, this paper abandons the traditional pooling operation, which easily loses high-frequency details, and employs four sets of parallel dilated convolutions (dilation rates r=1, 3, 5, 7) to capture fog features at different scales. Small dilation rates (r=1, 3) capture local details such as nearshore water edges, ripples, and small suspended particles, while large dilation rates (r=5, 7) cover the global fog distribution in open water. After activation by LeakyReLU, each set of features is fused through a feature pyramid to output a composite feature. :
[0046]
[0047] in, Indicates feature splicing, This represents a 3×3 convolution operation with an expansion rate of i. This structure addresses the visual confusion between fog and texture in water areas through multi-scale receptive field collaboration. This is the LeakyReLU activation function.
[0048] To address the issue of traditional residual models being prone to oversmoothing in clearly defined water regions, an adaptive compensation mechanism based on feature entropy is designed. The compensation mapping is defined. For a clearer image With foggy images The difference:
[0049]
[0050] Among them, a clear image is defined as , The global atmospheric light value was estimated from the fog image using guided filtering. This is the fog transport matrix.
[0051] First, a two-layer convolutional network Φ is used to predict the fog transport matrix t(x), which reflects the degree of light attenuation in the fog:
[0052]
[0053] in, It is the Sigmoid activation function. for Activation function. From this, the compensation mapping is obtained:
[0054]
[0055] To enhance the ability to preserve water details, a pixel-level weighting factor is introduced. The compensation intensity is dynamically adjusted based on the local feature entropy.
[0056]
[0057] in, For the characteristic entropy function, For adjustment coefficients, For composite features at pixel location The eigenvalues at that location. The final compensation mapping is expressed as:
[0058]
[0059] Based on global residuals Generate a preliminary clear image:
[0060]
[0061] in This provides a preliminary clear image and lays the foundation for subsequent color correction.
[0062] Fog reduces image saturation and causes uneven brightness distribution (overexposure or underexposure), and the characteristic blue and green tones of water are easily distorted. To address this issue, a dual-color gamut joint optimization strategy is designed to generate a preliminary clear image. Then, HSV-Lab joint color optimization is performed. First, saturation is enhanced in the HSV space, and then brightness is adaptively corrected in the Lab space. Both HSV and Lab are color models in this field.
[0063] Will The saturation component is extracted by converting the RGB image to linear RGB using inverse gamma-corrected transform, and then to HSV. To address the fading problem caused by water mist, a piecewise nonlinear saturation mapping function based on the spectral characteristics of water color is designed:
[0064]
[0065] in, For saturation components, To adaptively enhance color intensity, a threshold of 0.6 is set to fit the normal saturation range in water scenes. At that time, through Increase color intensity; when At that time, through Avoid oversaturation. This is a piecewise nonlinear saturation mapping function.
[0066] Convert the saturation-optimized image to Lab color space. (Regarding the luminance component...) Perform based on local brightness mean Adaptive gamma correction:
[0067]
[0068] in, To adjust parameters and optimize brightness distribution, To compensate for the parameters and correct the overall brightness offset, This is the adaptive gamma correction function. and From local brightness average Dynamic calculation:
[0069]
[0070]
[0071] in, To reflect the average brightness of a local area. When (Commonly found in areas with strong water reflection). Reduce (<1) to suppress overexposure; when (Commonly found in shadows or deep water areas). Increase (>1) to enhance brightness. It provides non-linear offset compensation. This mechanism effectively solves the brightness imbalance problem caused by water surface reflection and restores a more natural brightness level of the water body.
[0072] To synergistically ensure the dehazing effect and the visual fidelity of water color, a triple joint loss supervision strategy is constructed. An improved SSIM structural similarity loss is used to measure the structural difference between the sharp image and the real image. A CIEDE2000 chromatic aberration loss (L2) is used to strictly constrain the difference between the restored image and the real sharp image in the perceptual color space (Lab), with particular sensitivity to the core blue-green domain of the water body, ensuring that the restored water color conforms to human visual perception. A multilayer perceptual loss (L3) based on pre-trained ResNet18 is used to calculate the spectral perceptual difference. Finally, these three losses are weighted and fused. The loss function design of the dehazing module of this invention is as follows:
[0073]
[0074]
[0075]
[0076]
[0077] in, , It is a constant. This represents the average local brightness of a truly clear image. A preliminary clear map for prediction The local average brightness For the local brightness covariance of the clear image and the preliminary clear image, The standard deviation of local brightness in the clear image. To determine the local brightness standard deviation of the preliminary clear image, For SSIM structural similarity loss, To compensate for color difference loss, For multi-layer sensing loss, The weighted fusion result of the loss, It is a true and clear image under the CIEDE2000 standard. With predicted clear images The color difference of each pixel in the Lab color space, especially for the blue of water ( (weight) and the green of vegetation ( (Quantity) Represents coordinates. , , Let represent the height, width, and number of channels of the feature map at layer i of the pre-trained ResNet network, respectively. Divide by This involves normalizing the feature maps to eliminate the impact of size differences between different layers on loss calculation, enabling comparison and optimization of feature differences across layers at the same scale. For the output of the i-th layer of ResNet with respect to the real clear image, Let be the output of the i-th layer of ResNet for predicting a clear image. This loss guides the dehazing results to better match the visual perception of clear water at the texture, structural, and semantic levels. , , The weight parameters were optimized through extensive experiments and set to... , , This weighting combination has been verified to optimize the overall effect of defogging in water bodies.
[0078] In the reasoning stage, the original image is input. Obtain a clear image with no fog and sharp colors. The defogging effect obtained is as follows Figure 2 As shown.
[0079] S103: Construct an adaptive illumination correction network and restore the water body illumination based on the current real image sequence.
[0080] To address the issues of localized overexposure, underexposure in shadow areas, and insufficient global contrast caused by strong reflections from the water surface in water images, a dynamic correction framework based on a spectral response equalizer and spatiotemporal illumination manifold is designed. This module restores the physical consistency of water illumination through decoupling of layered illumination features, adaptive reflection suppression, and cross-scale contrast regulation, providing uniform illumination conditions for subsequent color recognition.
[0081] Highlights created by specular reflection from the water surface are extremely bright and irregularly distributed, requiring suppression via a global illumination sensing network. (Read in a clear image.) First, it is processed by the spectral dimensionality reduction module, and then through the learnable matrix. Generate a light intensity map:
[0082]
[0083] To suppress overexposed areas, a logarithmic compression mapping is introduced. :
[0084]
[0085] in, This is a light intensity map. For different channels, for Clear images under the channel, for Learnable matrices under a channel This is a normalized light intensity map. The dynamic compression factor. The global maximum brightness value is used. Multi-scale illumination features are extracted using Spatial Pyramid Pooling (SPP). These correspond to global, mesoscopic, and local illumination distributions, respectively, with the pooling kernel size set to... , The height of the pooling core, This represents the width of the pooling kernel.
[0086] Multi-scale features are fused through residual fusion blocks polymerization:
[0087]
[0088] in, For global illumination characteristics, Indicates feature splicing, For learnable weight matrix, It is the Sigmoid activation function. , , These represent multi-scale illumination characteristics. This operation can effectively capture the spatial distribution patterns of areas with strong light.
[0089] Underexposure in shadow areas requires noise suppression while increasing brightness. A deformable dilated convolution (DDConv) module is designed to address this. Capture water texture details through adaptive sampling points:
[0090]
[0091] in, For local lighting characteristics, The current pixel coordinates, For the k-th deformable offset, These are the corresponding weights. This is for filtering noise. A gating mechanism is introduced to determine the total number of deformable offsets. :
[0092]
[0093] in, For local detail features, and The mean and standard deviation of local features. The hyperbolic tangent activation function is used. To prevent division by zero, use a very small constant.
[0094] To address the non-uniformity of illumination caused by water transparency, a layered illumination compensation model was designed. This model estimates local transmittance. Calculate the compensation value :
[0095]
[0096]
[0097] in, This represents the global atmospheric light value. and These are empirical parameters, dynamically adjusted based on water turbidity. For about pixels Light intensity diagram.
[0098] To balance global and local illumination, a dynamic weight aggregation module is designed. Integrating global illumination features with local details :
[0099]
[0100] in, for and Fusion features, weights Due to illumination variance Adaptive computation:
[0101]
[0102] in, For adjustment coefficients, This is the threshold for illumination uniformity.
[0103] Further enhancement of contrast is achieved through histogram equalization of the image after illumination normalization. Perform block processing (block size set to...) ), calculate the cumulative distribution function (CDF) for each block:
[0104]
[0105] in, After block histogram equalization, pixel coordinates The final enhanced pixel value at that location, and within the block The minimum and maximum values, After illumination normalization, the image is in coordinates The pixel value at that location.
[0106] To ensure the visual realism of the corrected image, a triple loss function is constructed, including spectral fidelity loss, structural gradient loss, and dynamic range loss.
[0107] Calculate the color difference between the predicted image and the real image in the CIE Lab space:
[0108]
[0109] in, Due to color difference, This represents the difference between the Lab channels.
[0110] Structural gradient loss via the Sobel operator Constraint edge consistency:
[0111]
[0112] Dynamic range loss ensures reasonable compression of the dynamic range of illumination:
[0113]
[0114] The total loss function is:
[0115]
[0116] in, Structural gradient loss value, To predict the corrected image at the pixel level Pixel value at that location, For real images in pixels Pixel value at that location, This is the dynamic range loss value. To predict the maximum pixel value of the corrected image, To predict the minimum pixel value of the corrected image, The maximum pixel value of the real image. The minimum pixel value of the real image. This is the total loss function of the illumination correction module. These are the weighting coefficients.
[0117] During inference, the input image is generated through spectral dimensionality reduction and logarithmic compression. ; Extraction of global illumination features at multiple scales Then, through deformable convolution and gated denoising, it generates... ; then obtain through dynamic weight fusion Finally, cross-scale contrast enhancement generates the final corrected image, with illumination correction effects as follows: Figure 3 As shown.
[0118] One exemplary embodiment of the present invention addresses the problem of insufficient robustness in water body segmentation in complex terrain contexts (such as riparian vegetation and water-land transition zones). Figure 4 As shown, this invention achieves pixel-level precise localization and boundary enhancement of water bodies through three-level progressive feature encoding, dynamic dimension adaptation, and boundary-sensitive loss optimization.
[0119] The process of detecting and extracting water body regions from the current target water body video sequence includes:
[0120] S201: Construct a four-level progressive hierarchical feature extraction network, perform cross-channel feature coupling through three-dimensional convolutional kernels, and reduce high-dimensional feature memory by embedding dynamic dimension adaptation units;
[0121] To address the segmentation requirements of complex water body scenes, a Layered Feature Extraction Network (LFEN) is designed as the backbone architecture. LFEN employs a four-level progressive feature encoding structure, which differs from the traditional Transformer architecture. The output features of each layer satisfy the following:
[0122]
[0123] in, For the output features of the j-th layer, The number of channels for each layer is set to [value]. , To define the stride, cross-channel feature coupling is achieved using 3D convolutional kernels. To address the memory bottleneck of high-dimensional features, Dynamic Dimension Adaptation Units (DDAUs) are embedded between layers, mathematically expressed as:
[0124]
[0125] in, For about Dynamic dimension adaptation unit, For dimensionality reduction matrix (dimension) ), For increasing the dimension of the matrix (dimension) The number of feature channels is uniformly compressed to 64 dimensions through bilinear transformation. To extract the output features of a specific layer in the hierarchical feature extraction network LFEN, The bias term of the dimension reduction matrix. For the bias term of the up-dimensional matrix, The activation function is the Gaussian Error Linear Unit.
[0126] S202: Each level of the four-level progressive hierarchical feature extraction network is connected to a region perception enhancement block. The deformable convolution in the region perception enhancement block captures the irregular boundaries of the water area, and the spatial attention matrix suppresses background noise such as coastal vegetation.
[0127] Level 4 features of LFEN output Each is connected to a Region-Aware Enhancement Block (RAEB) to capture irregular features of the water body boundary. The computational process is as follows:
[0128]
[0129] in, For output features, For spatial attention modules, pixel-level correlation matrices are calculated. Suppressing background noise from coastal vegetation, etc.
[0130]
[0131] In the formula, For the correlation matrix The value in the i-th row and j-th column, , It is a pixel coordinate vector. As the normalization factor, An adaptive distance threshold (range [1.5, 3.0]) is used. The final output features... The number of channels is uniformly set to 32 dimensions to achieve feature separation between water bodies and the background.
[0132] S203: Construct a pyramid fusion decoder to perform three-level upsampling, and generate a segmentation mask by weighted fusion of the three-layer output;
[0133] A Pyramidal Fusion Decoder (PFD) is constructed to achieve precise localization of water areas through three levels of upsampling. The hierarchical decoding process of PFD is defined as follows:
[0134]
[0135] in, , , This is the third-stage output of the decoder. , , , Features for different resolutions. For upsampling, As a fully connected layer, DecBlock is a two-layer convolutional module, i.e., a decoder block:
[0136]
[0137] Finally, the segmentation mask is obtained by weighted fusion of the three-layer output. :
[0138]
[0139] In the formula, These are features at different resolutions that have undergone upsampling and additional processing. For the k-th level output of the decoder, the weights are... Dynamic optimization is achieved through gradient backpropagation.
[0140] S204: Construct a method based on regional overlap coefficient loss and binary cross-entropy optimization term to enhance the accuracy of land-water boundary segmentation.
[0141] To enhance the accuracy of land-water boundary segmentation, a joint supervision mechanism is designed, combining Region Overlap Coefficient Loss (ROC Loss) and Binary Cross-Entropy Optimization (BCEO).
[0142]
[0143]
[0144]
[0145] in, For the truth mask, The foreground weight factor (empirical value of 1.8) is used to improve the segmentation effectiveness of features at each level through a deep supervision mechanism. For the predicted pixel-level probability of water bodies, , Image pixel coordinates, This is the total loss function for this module.
[0146] Extract the water area mask.
[0147] During the inference phase, the preprocessed image is input into LFEN, and after DDAU dimension adaptation, RAEB feature enhancement, and PFD decoding, the final segmentation mask is generated. This provides clean input for subsequent color feature extraction. Water regions are extracted using element-wise multiplication.
[0148]
[0149] in, For the input image, ⊙ represents element-wise multiplication. This provides a pure water body region with a ROI (Region of Interest) free from background interference for subsequent color recognition.
[0150] In one exemplary embodiment of the present invention, addressing the bottlenecks of noise redundancy, temporal non-stationarity, and computational efficiency in the high-dimensional features of water color, a dynamic node topology network and a Riemann optimization dimensionality reduction mechanism are proposed. The manifold modeling process is as follows: Figure 5 As shown, this achieves noise-robust feature compression and spatiotemporal coherence preservation.
[0151] The dimensionality reduction of high-dimensional features in the water body region includes:
[0152] Extracting high-dimensional color space features specifically includes:
[0153] S301: Dynamically adjust M according to the water flow velocity, where M is the size of the time window, extract the RGB mean to construct a 3M-dimensional feature vector, and remove the noise subspace by decomposing the eigenvalues of the spatiotemporal correlation matrix.
[0154] To address the issues of noise redundancy and temporal non-stationarity in high-dimensional color features of natural water body images, a feature construction mechanism based on dynamic windows is designed. Water color exhibits dynamic characteristics due to variations in water flow velocity and illumination. Color changes are slow in still water areas, while rapid current areas experience drastic color fluctuations due to water mixing. Therefore, the feature temporal window needs to be adaptively adjusted according to the water flow conditions.
[0155] Calculate the RGB mean sequence of M consecutive frames Extract the mean of the RGB three channels of the water region in frame t as the basic color feature, denoted as:
[0156]
[0157] In the formula, The basic color features of the water area in frame t. These are the RGB three-channel averages of the water region in frame t. This is a transpose.
[0158] Stacking to form a 3M-dimensional feature vector Specifically, it involves concatenating the features of frame t and the preceding M-1 frames to form a 3M-dimensional feature vector:
[0159]
[0160] In the formula, It is a 3M-dimensional feature vector.
[0161] The time window size M is based on the water flow rate. Dynamic adjustment:
[0162]
[0163] This design employs a water flow velocity discrimination mechanism to retain long-term temporal features in still water scenes to capture slow changes, while using a short-time window in rapid flow scenes to avoid feature distortion caused by motion blur. 0.5 pixels per frame.
[0164] Introducing a spatiotemporal correlation matrix to suppress feature variance inflation caused by noise, and constructing a spatiotemporal correlation matrix. Defined as:
[0165]
[0166] Wherein, regularization coefficient , The noise intensity is the water color characteristic estimated based on water turbidity. The spatiotemporal correlation matrix, in this embodiment, specifically refers to the spatiotemporal covariance matrix of the high-dimensional color features of the water body in frame t. It is the identity matrix. Through eigenvalue decomposition, , For the characteristic matrix, For the eigenvalue matrix, retain the first d principal components ( This operation builds the foundation for dimensionality reduction by using principal component analysis to remove noisy subspaces while preserving the essential manifold structure of color features.
[0167] Constructing a dynamic node topology network specifically includes:
[0168] S302: Constructing an incremental topology network, before selecting the initial node set. Frame feature clustering centers are used to correct the color manifold structure through a dynamic node update mechanism;
[0169] To address the problem of manifold discretization in high-dimensional feature spaces, an incremental topological network construction strategy is designed to discretize the color manifold into a weighted node network. Initialize the node set ,in For dynamically updated feature nodes, N is the number of nodes and edges. Contains first-order geometric edges and zero-order topological edges .
[0170] Initial node set Before selection Cluster centers of frame features For each node Calculate the tangent space:
[0171]
[0172] in, For nodes The local tangent space at that point. To generate subspace functions, An orthogonal basis for local neighborhood features is obtained through incremental PCA. A node matching mechanism introduces a manifold curvature penalty, which is then calculated. With nodes Weighted distance :
[0173]
[0174] in, for With nodes The weighted distance, The curvature penalty coefficient is the curvature intensity of the rank approximation manifold of the tangent space. , Let be the curvature intensity of the rank approximate manifold of the tangent space. It is the L2 norm of the matrix. It is to find the second derivative. Is it a manifold in The second derivative at point represents the manifold at... The curvature metric at a location represents local flatness through the tangent space dimension. Regions with high curvature (such as color abrupt change points) are assigned greater distance weights to avoid mismatches of nodes in complex topological regions.
[0175] The dynamic absorption radius design covers three uncertainties: noise, nodal stability, and manifold intrinsic error. Its formula is as follows:
[0176]
[0177] in, The dynamic absorption radius, For the number of node updates, For noise terms, To estimate the variance, Due to inherent errors in the manifold, Noise intensity representing the color characteristics of water bodies. As the essential dimension of water color characteristics, The input is the high-dimensional water body color feature dimension.
[0178] Design topology evolution rules, when Update in time :
[0179]
[0180] in, This is an incremental QR decomposition.
[0181] when Create new node and with satisfaction Establish first-order edges on the nodes:
[0182]
[0183] in, To filter out nodes that meet the criteria after traversing all existing nodes, Let be the set of first-order edges, and let be the radius of the neighborhood of a first-order edge. ( Neighborhood coefficient, (This refers to the current minimum node spacing). This incremental construction strategy avoids global retraining, adapts to the temporal evolution of water color, and ensures accurate approximation of the color manifold by the topology through curvature penalty and dynamic radius. The threshold is then dynamically adjusted. .
[0184] Achieving globally optimal dimensionality reduction specifically includes:
[0185] S303: Use first-order edges and zero-order edges to constrain geometric distance and topological distance respectively, construct a topological temporal joint optimization objective function, and perform high-dimensional feature dimensionality reduction through geometric projection step, topological jump step and temporal smoothing projection.
[0186] To achieve globally optimal dimensionality reduction while maintaining spatiotemporal coherence, an optimization mechanism is designed that alternates between geometric projection steps and topological jump steps. Projected to low-dimensional coordinates Minimize the objective function:
[0187]
[0188] in, For reconstruction error, For topological constraints, For timing smoothing, For landmark-based Local linear mapping, For constraint strength, To calculate the weights. Topological constraints. Ensure low-dimensional consistency between first-order edges and zero-order edges:
[0189]
[0190] Among them, first-order edge embedding , and They are nodes and low-dimensional coordinates Orthogonally project high-dimensional vectors onto nodes Local tangent space Projection operator on, and They are nodes and nodes High-dimensional color characteristics, For points of a linear mapping, For nodes The weight of the edge to node v.
[0191] The optimization process is achieved through geometric projection steps, topological jump steps, and temporal smoothing projection.
[0192] Riemann gradient approximation based on geometric projection step:
[0193]
[0194] In the formula, For the Riemann gradient approximation, This is the projection of the tangent space.
[0195] Select first-order neighbor points make Maximum, Update :
[0196]
[0197] In the formula, is the learning rate. The geometric projection step uses local gradient information to guide the direction of dimensionality reduction, ensuring that the geometric structure of the feature manifold is preserved.
[0198] If the geometric projection step fails to reduce the objective function value, and the objective function does not decrease, then a topological jump step is performed, selecting zero-order neighbors to make... Minimum, Update :
[0199]
[0200] The topological skip step escapes local optima through global distance comparison, ensuring global consistency of the dimensionality reduction results.
[0201] If the objective function can be reduced, then temporal smoothing projection is performed to force the low-dimensional coordinate differences between adjacent frames to satisfy:
[0202]
[0203] This can prevent timing fluctuations from exceeding noise levels, where, The standard deviation of noise. The maximum allowable threshold for time-series changes. To define the essential dimension of water body color characteristics and prevent temporal fluctuations from exceeding noise levels, this constraint maintains the temporal continuity of color characteristics, consistent with the physical characteristics of slow evolution of water body color. (Update) :
[0204]
[0205] The final low-dimensional manifold learned features The main manifold structure of water color was preserved while noise and redundant information were removed, providing an efficient characterization for subsequent color regression.
[0206] An exemplary embodiment of the present invention, such as Figure 6 As shown, this step quantifies the causal influence of pixels through a dynamic correlation network, explicitly separates causal signals from confounding factors using a two-stream architecture, and ensures the causal invariance of features by combining self-supervised constraints. This effectively solves the problem of spurious correlation caused by environmental interference in water color changes and provides pure spatiotemporal causal features for subsequent color regression.
[0207] Establishing a spatiotemporal causal feature learning model includes:
[0208] S401: Construct a spatiotemporal correlation network and dynamic feature representation based on dynamic topology, quantify the intensity of pixel causal influence through gradient correlation matrix, and integrate 8-neighborhood spatial prior and data-driven correlation.
[0209] Spatiotemporal variations in water color are often influenced by non-causal factors, such as sudden changes in light intensity caused by weather events or spectral shifts caused by the migration of aquatic organisms. Traditional feature extraction methods struggle to distinguish between genuine causal signals and spurious correlations. Therefore, this invention constructs a spatiotemporal correlation network based on dynamic topology to achieve targeted extraction of causal features.
[0210] For the preprocessed water area image sequence, a spatiotemporal feature matrix is defined. ,in, For time step, This represents the number of spatial pixels, with 3 indicating RGB channels. Basic features are extracted through multi-scale convolution:
[0211]
[0212] In the formula, Basic features, Indicates inclusion , Parallel convolution operations of convolution kernels are used to capture spatial texture features at different scales. This represents the spatiotemporal causal characteristics without removing confounding factors.
[0213] To quantify the strength of causal influence between pixels, a gradient-based correlation matrix is introduced. Its element calculation is as follows:
[0214]
[0215] in, For the correlation matrix elements, To estimate the spatiotemporal characteristic gradient energy difference, For pixels Color prediction function, For pixels The RGB eigenvalues are used to characterize the strength of causal relationships between pixels by quantifying the impact of feature perturbations on the prediction results.
[0216] Integrating spatial prior knowledge with data-driven associations, based on prior graphs Construct the final causal relationship matrix :
[0217]
[0218] in, Represents the correlation matrix Normalization is performed. This is the prior graph, specifically the 8-neighborhood space prior matrix. The adaptive fusion coefficient is dynamically adjusted by the bi-branch entropy value:
[0219]
[0220] In the formula For the Sigmoid function, Calculate the matrix information entropy to ensure that the weights of data-driven associations are enhanced when there is spatial prior uncertainty. This is the weight coefficient matrix.
[0221] S402: It adopts a master-slave dual-stream architecture. The main branch models spatiotemporal dependencies through a graph convolution-temporal gating combination structure, while the auxiliary branch explicitly intervenes in environmental parameters through MLP and channel attention.
[0222] The design employs a dual-stream architecture to separate spatiotemporal causal features from confounding interference. The main branch focuses on spatiotemporal dependency modeling, achieving long-range capture of causal temporal features through a time-gated selective state-space module (TG-Mamba). The auxiliary branch uses physical constraints to explicitly intervene in confounding factors, addressing the problem of fuzzy causal signals in traditional models under non-uniform time intervals.
[0223] The main branch adopts a graph convolution-temporal gating combination structure, which captures neighborhood features by improving graph convolution operations:
[0224]
[0225] in, For spatial causal characteristics, It is a causal relationship matrix. For degree matrix, For convolution weights, This is the LeakyReLU activation function. This operation aggregates neighborhood information through a weighted correlation matrix, strengthening causal correlation features and suppressing the spatial propagation of irrelevant noise.
[0226] Design a time-gated selective state-space module (TG-Mamba) to explicitly model the inter-frame time difference. To achieve time-selective memory of causal signals.
[0227] TG-Mamba introduces time-gated vectors Based on the current spatial causal characteristics and time interval Dynamically modulated input weight matrix Output a temporal causal state vector that integrates historical states and current features. The calculation method is as follows:
[0228]
[0229] in, This is the initial temporal causal state vector. Indicates passing before Frame feature calculation , for spatial causal characteristics , For natural numbers, This is the temporal causal state vector of the video frame sequence from the previous time step. , Flatten the two-dimensional spatial features into a one-dimensional vector. For element-wise multiplication, The state transition matrix is calculated using the HiPPO-Legendre polynomial basis. :
[0230]
[0231] in, It is a high-order polynomial projection matrix. The state dimension determines the model's ability to capture temporal details (X=128 dimensions balance computational efficiency and feature representation). B is the logarithmic time interval, which transforms the linear time scale into a logarithmic domain to compress long-interval differences and ensures uniform gradient propagation across different time scales; B is the input weight matrix, which incorporates the current features. Mapped to the state space, The time-gated vector is calculated using a two-input gating network:
[0232]
[0233] in, For learnable weights, This is the inter-frame time interval. This is the bias term. This mechanism enables the model to strengthen the weights of recent features when the sampling interval is shortened (e.g., during sudden rainfall). Approaching 1), it depends on historical stable states when the interval is lengthened. (Approaching 0.3), to avoid dilution of causal signals caused by abrupt changes in time scale.
[0234] Targeting the dominant characteristics of the blue-green channel (450-570nm) in water color, the output stage enhances causal signals through channel attention:
[0235]
[0236] in, Let t be the spatiotemporal causal feature of the t-th frame. , The output weight matrix represents the state and input, mapping the state space to the spectral channel feature space. Calculate weights for colors. , The weighting of the blue-green channels is increased to suppress the influence of the red channel (non-causal interferences such as vegetation reflection and cloud shadow).
[0237] The auxiliary branch intervenes in the confounding factors through physical constraints:
[0238]
[0239] In the formula, To obtain the spatiotemporal causal characteristics that have eliminated environmental interference, It is a multilayer perceptron. This is a hybrid feature, that is, a causal irrelevance feature resulting from the fusion of multiple factors. For channel attention mechanism, As learnable weights, the causal signal is purified by explicitly modeling the effects of confounding factors such as cloud shadows and algae migration. S represents physical environment parameters, which are transformed through linear combination and dimensionality matching. :
[0240]
[0241]
[0242]
[0243]
[0244]
[0245]
[0246] in, For the duration of the data collection period, To extract the mean values of the blue and green channels in the water body area, i.e., the blue-green spectral ratio characteristics, It is a function of average value. For the blue and green channels of frame t, To prevent division by zero, The information entropy of the texture map, i.e., the texture complexity feature. Let be the probability of the i-th LBP histogram. To obtain global dynamic features, i.e., dynamically changing features, by calculating the optical flow modulus of each frame and aggregating them along the time dimension, It is a function of standard deviation. and Let be the motion vectors of the optical flow field in the x and y directions, respectively, from frame t to frame t+1. For a single frame of optical flow field, Let be the pixel value at pixel (x,y) in the t-th frame, and let (u,v) be the motion vector of pixel (x,y). Let be the pixel value at pixel (x+u, y+u) in the (t+1)th frame of the image. For the domain, For local windows, The mean and standard deviation of the blue-green ratio for clean water bodies can be calculated offline using the first 30 frames. The calibration parameters were determined using clean water and turbid water samples. The PCA transform matrix was calculated offline over the first 100 frames. This is a weighted matrix based on a physical model, used to suppress non-causal features. .
[0247] S403: Construct a causal feature loss function that forces causal features and confounding factors to be independent by minimizing mutual information loss. Based on causal invariant feature fusion and self-supervised optimization, spatiotemporal causal features are obtained.
[0248] By merging the main and auxiliary branches, the causal purity of water color features is improved through causal intervention.
[0249] Dual-stream features are fused by residual enhancement, preserving the original signal while removing confounding features. The fusion method is as follows:
[0250]
[0251]
[0252] In the formula, For attention fusion, two-stream features, Indicates cross attention. Here is the attention weight matrix. For the final causal characteristics, For layer normalization, For learning weights, As a dimension of attention head, causal features As the output of step S4 This is the Softmax activation function.
[0253] The causal characteristics are strengthened through self-supervised causal constraints. A mutual information minimization loss is designed, theoretically guaranteeing the independence of causal characteristics from confounding factors. The loss function is designed as follows:
[0254]
[0255]
[0256]
[0257] in, To reconstruct the loss, For spatiotemporal causal features without removing confounding factors, To minimize the loss of mutual information, To calculate the correlation coefficient, For the loss of spacetime causality, The decoder is used to reconstruct the features of the original image. For the smoothing term, the reconstruction loss Ensure feature integrity and minimize mutual information loss. Forced causal characteristics and confounding factors are unique.
[0258] One exemplary embodiment of the present invention addresses the problems of insufficient accuracy in multimodal feature fusion and nonlinear distortion in color saturation regions under complex aquatic environments. It achieves high-precision color prediction that combines physical interpretability and visual consistency by dynamically integrating spatiotemporal causal features and manifold learning features through adaptive attention weights, combined with residual-enhanced dual-path regression and multi-level loss supervision.
[0259] The establishment of the feature fusion model includes:
[0260] S501: Adopts an adaptive weighted fusion strategy to fuse spatiotemporal causal features and manifold learning features;
[0261] The feature fusion model employs an adaptive weighted fusion strategy to effectively integrate spatiotemporal causal features and manifold-learned features. The fusion process is as follows:
[0262] First, the manifold learning features obtained in step S3 and the spatiotemporal causal features obtained in step S4 are combined. Standardization process:
[0263]
[0264]
[0265] in, for The result after normalization for The result after normalization For manifold learning features, LayerNorm represents a layer normalization operation that ensures features from different sources have similar numerical ranges.
[0266] The design fuses manifold-learned features and spatiotemporal causal features through adaptive attention weights, and achieves dynamic feature selection through learnable gating. Gating weights are calculated as follows:
[0267]
[0268]
[0269] in, Gating weights for spatiotemporal causal features, For popular learning features, , The weight matrix is a learnable matrix. , For bias terms, Using the Sigmoid activation function, the weights are normalized to the [0,1] interval. The weights are obtained through soft-constraint normalization.
[0270]
[0271]
[0272] In the formula, For normalized spatiotemporal causal feature weights, The weights are normalized popular learning features.
[0273] The fusion feature is obtained by weighted summation:
[0274]
[0275] In the formula, This is a feature of fusion.
[0276] To enhance feature representation capabilities, a nonlinear transformation is applied to the fused features:
[0277]
[0278] in, The transformed fusion features Let be the transformation matrix. This is the bias term for the nonlinear transformation. This is the activation function.
[0279] S502: The establishment of the color recognition model includes:
[0280] A dual-path regression structure is constructed, including layer normalization and fully connected layers. A residual-enhanced multilayer perceptron and a gated feature transformation module are used to obtain the predicted water color value. A color recognition loss is set, and the final loss function is output based on the color recognition loss and the causal feature loss function.
[0281] A dual-path regression structure is designed to address the nonlinear distortion problem in the color saturation region. A residual-enhanced multilayer perceptron (ResMLP) and a gated feature transformation module are employed to enhance the nonlinear mapping capability of features while maintaining lightweight design.
[0282]
[0283] in, These are the predicted RGB color values, with a dimension of 3, corresponding to the red, green, and blue channels respectively. , , To calculate the coefficients, and These are all bias terms of nonlinear mappings. For layer normalization, For adaptive gating mechanism, This is the residual branch. The adaptive gating mechanism enhances the nonlinear expression through a combination of two-branch activation functions:
[0284]
[0285] In the formula, It is a non-linear expression function. For the activation function, the adaptive gating mechanism uses element-wise multiplication fusion. The smooth nonlinearity and probabilistic mapping properties of the sigmoid function preserve high-frequency color details in the features. Hyperbolic tangent mapping and channel attention weighting are employed.
[0286]
[0287] in, The learning weights for the residual branches, For the bias term of the residual branch, Generated through global average pooling and fully connected layers:
[0288]
[0289] in, For learning weights, For global average pooling and the bias term of the fully connected layer, This is the global average pooling function. The design assigns higher weight to the blue-green channel (B / G), which is dominated by water color, and suppresses noise interference from the red channel. For pixels. (Through) The function performs layer normalization to stabilize the feature distribution:
[0290] Finally, the output value range is constrained to [0,1] using the Sigmoid function, matching the RGB color space standard.
[0291]
[0292] At the same time, the hyperbolic tangent mapping in the residual connection is preserved, and the color shift is compensated by adjusting the positive and negative values.
[0293] Multi-level loss joint optimization integrates pixel-level, perceptual-level, and causal-level triple supervision to improve the visual quality and causal robustness of predictions. The loss function for color regression uses a combination of mean squared error (MSE) and perceptual loss.
[0294]
[0295] in, For color regression loss, This represents the actual color value of the water body. To predict water color values, MSE calculates the mean square error between the predicted color and the true color. The weighting coefficients for perceived loss, For loss perception:
[0296]
[0297] In the formula, The predicted water color value for channel i. This represents the actual water color value for the i-channel.
[0298] Perceived loss The differences in color in the perceptual space are calculated using a pre-trained VGG network:
[0299]
[0300] The model's final loss function combines the color recognition loss and the spatiotemporal causality loss from step 4:
[0301]
[0302] in, This is the final loss function of the model. For color regression loss, This is a balance coefficient that controls the relative importance of the two types of losses.
[0303] Reasoning process.
[0304] like Figure 1 As shown, during the inference phase, given an input video sequence, the model performs water color recognition according to the following steps:
[0305] The video preprocessing module performs defogging and illumination correction; the water body region detection module extracts water body regions; and manifold learning features are extracted through manifold learning. Spatiotemporal causal features are extracted through spatiotemporal causal modeling. ; fused features are obtained through feature fusion. The final water color value is predicted and output through color regression. .
[0306] The entire inference process is completed end-to-end without human intervention, and can run in real time on edge devices, ultimately achieving the following results: Figure 7-9 As shown.
[0307] A water body color recognition regression system based on spatiotemporal causality and manifold learning is used to perform the aforementioned water body color recognition regression method based on spatiotemporal causality and manifold learning.
[0308] Specifically, the multi-dimensional coupling preprocessing module achieves environmental interference suppression and color fidelity preservation.
[0309] A hierarchical feature-decoupled water dehazing network is constructed, employing a variable-scale convolutional kernel group (expansion rate 1 / 3 / 5 / 7) to capture fog features at different scales. An adaptive feature entropy compensation mechanism dynamically adjusts the residual mapping to address the visual confusion between fog and texture in low-contrast water scenes. An HSV-Lab dual-color-domain joint optimization strategy is designed, enhancing saturation in the HSV space to restore the blue-green hue of the water, and using adaptive gamma correction to balance brightness in the Lab space. This is further enhanced by triple supervision using SSIM structural similarity loss, CIEDE2000 chromatic aberration loss, and pre-trained ResNet perceptual loss to ensure spectral fidelity after dehazing. For areas with strong water surface reflection and shadows, a multi-scale illumination perception network is designed. Illumination intensity maps are generated through spectral dimensionality reduction, and global-local illumination features are extracted using spatial pyramid pooling. Deformable dilated convolution and gated denoising mechanisms enhance details, and histogram equalization achieves cross-scale contrast control. Lab chromatic aberration loss, structural gradient loss, and dynamic range loss ensure illumination consistency.
[0310] The water body region precise segmentation module enables hierarchical feature extraction and boundary optimization.
[0311] A four-level progressive hierarchical feature extraction network (LFEN) is adopted, which achieves cross-channel feature coupling through three-dimensional convolutional kernels and embeds dynamic dimension adaptation units (DDAU) to reduce the memory bottleneck of high-dimensional features. The four levels of features are respectively connected to region-aware augmentation blocks (RAEB), and deformable convolutions are used to capture irregular water body boundaries. Spatial attention matrices are used to suppress background noise such as riparian vegetation. A pyramid fusion decoder (PFD) is constructed to achieve three levels of upsampling. A segmentation mask is generated by weighted fusion of the three-layer output. Region overlap coefficient loss (ROC Loss) and binary cross-entropy optimization term (BCEO) are designed to enhance the accuracy of land-water boundaries and address the problem of insufficient segmentation robustness in complex terrain backgrounds.
[0312] The high-dimensional spatiotemporal color manifold modeling module enables topological constraint dimensionality reduction and dynamic evolution.
[0313] The time window is dynamically adjusted based on the water flow velocity (M=10 for still water, M=5 for rapid flow). The RGB mean is extracted to construct a 3M-dimensional feature vector. Noise subspaces are removed through eigenvalue decomposition of the spatiotemporal correlation matrix. An incremental topology network is then constructed. The initial node set is selected from the cluster centers of the first M0 frames. A dynamic node update mechanism is used to approximate the color manifold structure. First-order edges and zero-order edges constrain geometric distance and topological distance, respectively. A joint topology-temporal optimization objective function is designed. High-dimensional feature dimensionality reduction is achieved through geometric projection steps, topological jump steps, and temporal smoothing projection. This reduces computational complexity while preserving the essential color manifold structure, laying the foundation for edge deployment.
[0314] The spatiotemporal causal feature learning module enables the decoupling of hybrid factors and invariance constraints.
[0315] A spatiotemporal correlation network based on dynamic topology is constructed. The intensity of pixel causal influence is quantified through gradient correlation matrix, and 8-neighborhood spatial priors and data-driven correlations are fused. The fusion weights are dynamically adjusted by the entropy values of the two branches. A master-slave dual-stream architecture is adopted. The master branch models spatiotemporal dependencies through temporally gated selective state space modules (TG-Mamba), while the auxiliary branch explicitly intervenes in environmental parameters such as turbidity and illumination through MLP and channel attention. The mutual information minimization loss is introduced to force causal features and confounding factors to be independent, thus solving the problem of spurious correlations caused by environmental interference.
[0316] Adaptive multimodal feature fusion and regression module.
[0317] Layered normalization is applied to manifold learning features and spatiotemporal causal features. Adaptive attention weights are calculated using a learnable gating mechanism to achieve cross-modal dynamic fusion. A residual-enhanced dual-path regression structure is constructed, combining gated nonlinear transformation and channel attention to strengthen blue-green spectral features and address the nonlinear distortion problem in the color saturation region. A multi-level supervision system is designed with pixel-level MSE, VGG perceptual loss, and spatiotemporal causal loss to balance prediction accuracy and causal robustness. High-precision real-time regression for complex water scenes is achieved through a lightweight architecture, adaptable to edge computing deployment.
[0318] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A water body color identification regression method based on spatiotemporal causality and manifold learning, characterized in that, The method comprises the following steps: obtaining a current water body video sequence, performing defogging and light correction on the current water body video sequence to obtain a target water body video sequence; detecting and extracting a water body region from the current target water body video sequence, and reducing the dimension of the high-dimensional feature of the water body region to obtain a manifold learning feature; establishing a spatio-temporal causal feature learning model, extracting features of the water body region through the spatio-temporal causal feature learning model, and obtaining spatio-temporal causal features; establishing a feature fusion model, fusing the manifold learning feature and the spatio-temporal causal feature through the feature fusion model to obtain a fused feature, establishing a color recognition model, and outputting a final predicted water body color value through the color recognition model based on the fused feature.
2. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 1, characterized in that, The method comprises the following steps: decoding the obtained water body video sequence, extracting key frames according to a preset time interval, and obtaining a real image sequence; constructing a hierarchical feature decoupling and spectral fidelity water body defogging framework, and recovering water body images under fog interference based on the water body defogging framework; constructing an adaptive light correction network, and recovering water body light based on the adaptive light correction network.
3. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 2, characterized in that, The method comprises the following steps: adopting a hierarchical feature decoupling defogging network, capturing different scale fog features through a variable scale convolution kernel group, and dynamically adjusting residual mapping through a feature entropy adaptive compensation mechanism; adopting an HSV-Lab dual color domain joint optimization strategy, enhancing saturation recovery of water body blue-green tone through segmented nonlinear mapping in HSV space, and dynamically calculating a gamma parameter based on local brightness mean in Lab space to realize adaptive brightness equalization; setting a defogging framework loss function for correction, wherein the defogging framework loss function comprises an SSIM structural similarity loss, a CIEDE2000 color difference loss, and a pre-trained ResNet perception loss.
4. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 2, characterized in that, The method comprises the following steps: performing dimension reduction on the real image sequence based on a learnable matrix spectrum, generating an illumination intensity map, suppressing overexposed areas in the illumination intensity map based on a logarithmic compression mapping, and extracting global and local light features through spatial pyramid pooling; adopting a deformable hollow convolution and a gated denoising mechanism to enhance the details of the shadow area of the illumination intensity map, and fusing the global and local light features through a dynamic weight aggregation module; and setting a correction network loss function for correction, wherein the correction network loss function comprises a Lab color difference loss, a structural gradient loss, and a dynamic range loss.
5. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 1, characterized in that, The method comprises the following steps: constructing a four-level progressive hierarchical feature extraction network, coupling cross-channel features through a three-dimensional convolution kernel, and reducing high-dimensional feature memory through an embedded dynamic dimension adaptation unit; connecting a region perception enhancement block to each level of the four-level progressive hierarchical feature extraction network, capturing irregular boundaries of the water body region through deformable convolution in the region perception enhancement block, and suppressing background noise through a spatial attention matrix; constructing a pyramid fusion decoder for three-level upsampling, and generating a segmentation mask through weighted fusion of three-layer outputs. A region overlap coefficient loss and a binary cross-entropy optimization term are constructed to improve the accuracy of water-land boundary segmentation.
6. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 1, characterized in that, The high-dimensional feature dimension reduction of the water body region comprises the following steps: A time sequence window is dynamically adjusted according to a water flow rate, a 3M-dimensional feature vector is constructed by extracting an RGB mean value, M is the size of the time sequence window, and noise subspaces are removed through eigenvalue decomposition of a space-time correlation matrix; Constructing incremental topology network, initial node set selection before Frame feature clustering center, correcting color manifold structure through dynamic node updating mechanism; A topological time sequence joint optimization objective function is constructed by using a first-order edge and a zero-order edge to constrain geometric distance and topological distance respectively, and high-dimensional feature dimension reduction is performed through a geometric projection step, a topological jump step and a time sequence smoothing projection.
7. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 1, characterized in that, The spatiotemporal causal feature learning model comprises the following steps: A spatiotemporal correlation network based on dynamic topology and dynamic feature representation are constructed, a gradient correlation matrix is used to quantify the causal influence intensity of pixels, and 8-neighbor spatial priori and data-driven correlation are fused; A main-aid dual-flow architecture is adopted, the main branch models spatiotemporal dependence through a graph convolution-time sequence gating combination structure, and the auxiliary branch explicitly intervenes environmental parameters through an MLP and a channel attention; A causal feature loss function is constructed by using mutual information minimization loss to force causal features and mixed factors to be independent, and spatiotemporal causal features are obtained based on causal invariance feature fusion and self-supervised optimization.
8. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 7, characterized in that, The feature fusion model comprises the following steps: An adaptive weighted fusion strategy is adopted to fuse the spatiotemporal causal features and the manifold learning features. The color recognition model comprises the following steps: A double-path regression structure is constructed, a residual enhanced multilayer perceptron and a gated feature transformation module are adopted to obtain predicted water body color values, a color recognition loss is set, and a final loss function is output based on the color recognition loss and the causal feature loss function.
9. The water color identification regression method based on spatiotemporal causality and manifold learning according to claim 8, characterized in that, The double-path regression structure is constructed, a residual enhanced multilayer perceptron and a gated feature transformation module are adopted to obtain predicted water body color values. wherein, is a predicted color value, , , are respectively a calculation weight, is an activation function, and are bias terms, is a fusion feature, is a normalization layer, is an adaptive gating mechanism, is a residual branch.
10. A spatio-temporal causal and manifold learning based water color identification regression system, characterized in that, A water body color recognition regression method based on spatiotemporal causality and manifold learning is used to perform any one of claims 1-9. A multi-dimensional coupling preprocessing module is configured to obtain a current water body video sequence, perform defogging and illumination correction on the current water body video sequence to obtain a target water body video sequence; A water body region segmentation module is configured to detect and extract a water body region from the current target water body video sequence, and perform high-dimensional feature dimension reduction on the water body region to obtain manifold learning features; A spatiotemporal causal feature learning module is configured to establish a spatiotemporal causal feature learning model, extract features from the water body region through the spatiotemporal causal feature learning model, and obtain spatiotemporal causal features; An adaptive multi-modal feature fusion and regression module is configured to establish a feature fusion model, fuse the manifold learning features and the spatiotemporal causal features through the feature fusion model to obtain fused features, establish a color recognition model, and output a final predicted water body color value based on the fused features through the color recognition model.
Citation Information
Patent Citations
Water quality color classification method and device based on visual mode
CN117934965A
Method and device for detecting water quality based on color recognition, and storage medium
US20210096121A1