Ice water characteristic and icing rate intelligent identification method in low contrast scene

By introducing a deformable convolutional neural network and an attention mechanism, an intelligent ice-sealing rate recognition algorithm was developed, which solved the problem of ice and water feature recognition in low-contrast scenes, achieved high-precision calculation of ice-sealing rate, and improved the prediction capability of ice-flood disasters.

CN122023883APending Publication Date: 2026-05-12CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA INST OF WATER RESOURCES & HYDROPOWER RES
Filing Date
2026-01-09
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In low-contrast scenarios, existing technologies struggle to accurately identify ice and water characteristics and calculate ice cover rates, resulting in insufficient ability to predict ice jam flood disasters.

Method used

An intelligent ice-sealing rate recognition algorithm based on deformable convolutional neural networks is adopted. By introducing deformable convolutional layers and attention mechanisms, the sampling position of the convolutional kernel is adaptively adjusted. Combined with the U-Net architecture and dual-branch feature extraction, the accuracy of ice water feature recognition is improved.

Benefits of technology

It improves the accuracy of ice cover rate recognition in low-contrast scenes, enhances the ability to capture ice and water features, and improves the ability to predict ice jam flood disasters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023883A_ABST
    Figure CN122023883A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent identification method for ice water characteristics and a freezing rate in a low-contrast scene. The method comprises the following steps: acquiring an image; making a data set; constructing and training a model; calling the model and identifying the icing rate; and ending. According to the intelligent identification algorithm for the icing rate based on the deformable convolutional neural network, a variable convolutional layer and an attention mechanism are adopted, the sampling points are guided to extend towards the ice body contour direction, the sampling points are extended and guided to extend towards the ice body contour direction, and the sampling range is expanded, so that the convolution kernel can break through the limitation of a fixed shape; and the attention mechanism can further capture important features of ice and water on two levels of ice and water color channel dimension and spatial distribution, and further capture important features of ice and water, so that the identification precision of the icing rate in a low-contrast scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an intelligent identification method for ice and water features and ice-sealing rate in low-contrast scenes, a hydrological calculation method, and a method for acquiring channel hydrological data. Background Technology

[0002] Rivers, canals, and reservoirs in high-altitude and cold regions are generally at risk of ice jam disasters. During the initial freezing or thawing stages, ice floes often appear in rivers, canals, and reservoirs. Large amounts of ice floes can easily form ice dams, obstructing upstream water flow. Once these ice dams collapse, they can cause flooding. The ice cover rate is a crucial parameter affecting water heat loss and ice formation, and for assessing the risk of ice jam disasters. Accurate ice cover rate data allows for efficient and accurate prediction of ice jam floods, which is vital for disaster prevention and mitigation. The definition of the ice cover rate is quite simple: it's the ratio of the area of ​​ice on the water surface to the total area of ​​ice and water. While this data seems simple, obtaining it in rivers, canals, and reservoirs is extremely difficult. Surface ice in cold-region rivers can stretch for over 1000 kilometers, and the ice constantly collides, accumulates, and compresses during its flow, making the process very complex. Early ice cover rate monitoring relied on visual inspection, which suffered from large errors, low frequency, and lack of verifiability. In recent years, with the advent of high-definition video and the improvement of image recognition technology, ice cover rate monitoring methods based on high-definition image recognition have developed rapidly, largely overcoming many of the shortcomings of traditional manual visual inspection. Compared to rivers, artificial water conveyance projects have fewer variations in ice and water boundaries and hydrodynamic conditions, as well as superior water quality. This results in lower contrast between ice and water, making them difficult to distinguish in images. Consequently, video image-based ice cover rate identification methods experience significantly increased errors, impacting the ability to predict ice-induced flood disasters. This problem is particularly pronounced in large-scale water conveyance projects. Accurately obtaining ice cover rates within water conveyance channels is a problem that needs to be solved. Summary of the Invention

[0003] To overcome the problems of existing technologies, this invention proposes an intelligent recognition method for ice and water features and ice-sealing rates in low-contrast scenes. The method proposes an intelligent ice-sealing rate recognition algorithm based on deformable convolutional neural networks. This algorithm introduces deformable convolutional layers, which can adaptively adjust the sampling position of the convolutional kernels to more accurately capture complex ice and water features in low-contrast scenes.

[0004] The objective of this invention is achieved as follows: a method for intelligent recognition of ice water features and ice-sealing rate in low-contrast scenes, comprising the following steps:

[0005] Step 1, Image Acquisition: Collect video data from the surveillance camera, set a time interval threshold t, extract image frames from the read video at the threshold t, and then perform image format conversion and normalization preprocessing.

[0006] Step 2, Dataset Creation: Construct a drift ice image dataset based on the collected image data, including: labeling the data, finely segmenting the ice and water regions, generating a single-channel grayscale reference image, dividing the data, and classifying the images in the dataset into training set, validation set and test set according to the proportions of 75%, 20% and 5% respectively.

[0007] Step 3, Model Building and Training: This includes model building and model training.

[0008] (1) Model building:

[0009] (1.1) Image feature extraction: Based on the U-Net model, deep and shallow dual-branch extraction networks are used to extract ice and water features in parallel before the downsampling stage. Three conventional convolutional layers with a kernel size of 3×3 are used, and the images are input sequentially to achieve feature information extraction. The deep branch network focuses on the overall contour of ice and water in the image. Two conventional convolutional layers with a kernel size of 3×3 are used, and an attention mechanism module is embedded after each convolutional layer. The attention mechanism module includes a channel attention mechanism for mining important features of ice and water in the color channel dimension and a spatial attention mechanism for identifying the location of the important features in the image.

[0010] The operation of the channel attention mechanism includes the following sub-steps:

[0011] Sub-step 311: Calculate the average and maximum values ​​of all pixels in each channel using global average pooling and max pooling.

[0012] Sub-step 312 generates a weight value between 0 and 1 for each channel using the Sigmoid function. The closer the weight value is to 1, the more important the channel is for distinguishing the ice-water interface.

[0013] Sub-step 313 involves multiplying the weight values ​​with the pixel values ​​of the original feature map to amplify the features of important channels and suppress the features of secondary channels.

[0014] The spatial attention mechanism described above operates through the following sub-steps:

[0015] Sub-step 321: Calculate the average and maximum values ​​of all channels at each spatial location in the feature map to obtain two single-channel maps that aggregate different information, in order to determine which spatial locations exhibit high response in all feature channels;

[0016] Sub-step 322: stitch the two images together to generate a single spatial importance map;

[0017] Sub-step 323: Using the Sigmoid function, normalize each value in the spatial importance map to a range of 0 to 1, with higher values ​​indicating more critical positions.

[0018] Sub-step 324: Multiply this map with the feature map after channel attention processing to enhance the feature response of the ice-water boundary region and weaken irrelevant background regions.

[0019] (1.2) Downsampling: The feature information after the dual-branch extraction network will be integrated, the dimension will be unified and the feature map size will be cropped through a feature fusion module. The downsampling stage includes 5 deformable convolutional modules. Each deformable convolutional module includes one deformable convolutional layer with a kernel size of 3×3 and two deformable convolutional layers with a kernel size of 1×1. An attention mechanism module is embedded after each deformable convolutional module.

[0020] (1.3) Upsampling: The upsampling stage includes 4 regular convolutional modules, each of which contains one regular convolutional layer with a kernel size of 2×2, a kernel size of 3×3, and a kernel size of 1×1.

[0021] The workflow of the conventional convolutional module is as follows:

[0022] Sub-step 331: Pass the feature map through a convolutional layer with a kernel size of 2×2 to restore the feature map resolution to its original resolution;

[0023] Sub-step 332: The feature map is then input into a convolutional layer with a kernel size of 3×3, and then through a convolutional layer with a kernel size of 1×1 to perform feature channel dimensionality reduction operation to simplify the computation.

[0024] (2) Model training:

[0025] Iterative training is carried out based on the training set data, and the learning parameters in the network are continuously updated through the backpropagation mechanism, including: convolution kernel weights and deformable convolution offsets; the average intersection-union ratio after recognition of the validation set images is calculated in real time during the training process, and the early stopping mechanism is triggered to terminate the training when the average intersection-union ratio no longer improves for several consecutive rounds.

[0026] Step 4, Model Invocation and Freezing Rate Identification: This includes the following sub-steps:

[0027] Sub-step 401: Load the optimal model parameters after training, switch the model to inference mode, and deploy it to the appropriate computing device;

[0028] Sub-step 402 performs the same preprocessing operations as the training set on the newly acquired ice-flowing images, including scaling the images to 1280×720 pixel resolution, converting them to RGB three-channel format, normalizing the pixel values ​​to the 0~1 range, and adjusting them to a tensor dimension of [1,3,720,1280].

[0029] Sub-step 403: Extract image features using a dual-branch feature extraction network;

[0030] Sub-step 404, downsampling: key features that enhance the distinction between ice and water through deformable convolutional layers and attention mechanisms;

[0031] Sub-step 405, upsampling: restore image resolution and form a classification probability map of ice and water bodies;

[0032] Sub-step 406: Convert the probability map into a binary mask with a threshold of 0.5;

[0033] Sub-step 407, calculate the freezing rate IC, formula:

[0034] Ice cover rate IC = (Number of ice pixels / (Number of ice pixels + Number of water pixels)) × 100%

[0035] Sub-step 408, result evaluation: compare the recognition accuracy (ACC) of the predicted ice cover rate with the ice cover rate marked on the baseline, and evaluate the segmentation accuracy by the intersection-union ratio (IoU) of the predicted ice body region and the marked ice body region;

[0036] Step 5, End: Output a visualization image with ice bodies marked in white and water bodies marked in black, as well as the ice cover rate (IC) value.

[0037] The advantages and beneficial effects of this invention are as follows: This invention is based on a deformable convolutional neural network-based intelligent ice-sealing rate recognition algorithm. The method introduces a deformable convolutional layer, which can adaptively adjust the sampling position of the convolutional kernel to more accurately capture the features of complex ice and water in low-contrast scenes. The method adopts the U-Net architecture and uses dual-branch feature extraction, avoiding the loss of basic information in the image and high-level feature information distinguishing flowing ice from water, thereby improving the accuracy of ice and water feature recognition and extraction. The deformable convolutional layer and attention mechanism introduced by the method guide the sampling points to extend towards the ice body contour, expanding the sampling range, allowing the convolutional kernel to break through the limitations of a fixed shape, thus improving the recognition ability of the outer contour and detailed features of flowing ice. The attention mechanism can further capture important features of ice and water at both the color channel dimension and spatial distribution levels, thereby improving the accuracy of ice-sealing rate recognition in low-contrast scenes. The method also uses ACC and IoU as indicators to quantify the recognition effect, further improving the accuracy of ice and water recognition, and thus improving the accuracy of ice-sealing rate calculation. Attached Figure Description

[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0039] Figure 1 This is a flowchart of the method described in the embodiments of the present invention;

[0040] Figure 2 This is a black-and-white data annotation diagram of flowing ice in an application example of an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of the attention mechanism flow according to an embodiment of the present invention;

[0042] Figure 4 This is a schematic diagram of the deformable convolution process according to an embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram of the model architecture of an embodiment of the present invention;

[0044] Figure 6 This is a schematic diagram illustrating the model training parameter optimization process in an application example of this invention. Detailed Implementation

[0045] Example 1:

[0046] This embodiment is a method for intelligent recognition of ice water features and freezing rate in low-contrast scenes, including the following steps, the basic process of which is as follows: Figure 1 As shown:

[0047] Step 1, Image Acquisition: Collect video data from the surveillance camera, set a time interval threshold t, extract image frames from the read video at the threshold t, and then perform image format conversion and normalization preprocessing.

[0048] With modern network technology, image acquisition has become an easy task. Data can be collected by setting up automated monitoring stations with cameras in key sections of the canal, or by using drones to temporarily select locations for filming in some sections, especially in remote areas. Using a combination of large and small drones allows for real-time, close-up image capture at very low cost. However, due to the good water quality in water conveyance channels, the contrast between the water surface and flowing ice is low, resulting in blurred boundaries that are difficult to distinguish from high altitudes. Therefore, satellite imagery is not suitable for these channels and can only serve as a non-real-time reference.

[0049] Taking the South-to-North Water Diversion Project (Middle Route) as an application example:

[0050] 330 images were taken of a certain section of the canal. After the images were acquired, the raw images needed to be preprocessed, including: converting the base image of the image to an RGB image, preprocessing the images to a resolution of 1280×720, and using the RGB three-channel color mode.

[0051] Step 2, Dataset Creation: Construct a drift ice image dataset based on the collected image data, including: labeling the data, finely segmenting the ice and water regions, generating a single-channel grayscale reference image, dividing the data, and classifying the images in the dataset into training set, validation set and test set according to the proportions of 75%, 20% and 5% respectively.

[0052] In an application example, during the fine segmentation of ice and water regions, the pixel value of the ice region is 255, and the pixel value of the water region is 0, resulting in a black and white image, such as... Figure 2 As shown, the data is divided into training, validation, and test sets, with images in the dataset classified into three groups according to a ratio of 75%, 20%, and 5%. The dataset used in the application example contains a training set (245 images) for training the algorithm model, a validation set (65 images) to support parameter optimization, and a test set (20 images) to demonstrate the algorithm's segmentation performance.

[0053] Step 3, Building and training the ice-sealing rate recognition model based on the improved U-Net: including model building and model training:

[0054] (1) Model building:

[0055] (1.1) Image Feature Extraction: Based on the U-Net model, deep and shallow dual-branch extraction networks are used to extract ice and water features in parallel before the downsampling stage. Three conventional convolutional layers with a kernel size of 3×3 are used, and the images are input sequentially to achieve feature information extraction. The deep branch network focuses on the overall contours of ice and water in the image, using two conventional convolutional layers with a kernel size of 3×3. An attention mechanism module is embedded after each convolutional layer. The attention mechanism module includes a channel attention mechanism for mining important features of ice and water in the color channel dimension and a spatial attention mechanism for identifying the location of the important features in the image.

[0056] The operation of the channel attention mechanism includes the following sub-steps:

[0057] Sub-step 311: Calculate the average and maximum values ​​of all pixels in each channel using global average pooling and max pooling.

[0058] Sub-step 312 generates a weight value between 0 and 1 for each channel using the Sigmoid function. The closer the weight value is to 1, the more important the channel is for distinguishing the ice-water interface.

[0059] Sub-step 313 involves multiplying the weight values ​​with the pixel values ​​of the original feature map to amplify the features of important channels and suppress the features of secondary channels.

[0060] The spatial attention mechanism described above operates through the following sub-steps:

[0061] Sub-step 321: Calculate the average and maximum values ​​of all channels at each spatial location in the feature map to obtain two single-channel maps that aggregate different information, in order to determine which spatial locations exhibit high response across all feature channels.

[0062] Sub-step 322: stitch the two images together to generate a single spatial importance map.

[0063] Sub-step 323 uses the Sigmoid function to normalize each value in the spatial importance map to a range of 0 to 1, with higher values ​​indicating more critical positions.

[0064] Sub-step 324 multiplies this map with the feature map after channel attention processing, thereby enhancing the feature response of the ice-water boundary region and weakening irrelevant background regions.

[0065] Based on the U-Net model, a dual-branch feature extraction network is used for image feature extraction before the downsampling layer. Then, the regular convolutional layers in the downsampling stage are replaced with deformable convolutional layers, and an attention mechanism is embedded after the deformable convolutional layers to build an ice cover rate recognition model. The construction steps are as follows: Before the downsampling stage, deep and shallow dual-branch extraction networks are used to extract ice and water features in parallel. The shallow branch network uses smaller convolutional kernels to obtain specific differences in ice and water color, texture, edges, etc. in local images. It uses three regular convolutional layers with a kernel size of 3×3. The images are input sequentially to extract feature information. The deep branch network focuses on the overall contour of ice and water in the image. It uses two regular convolutional layers with a kernel size of 3×3. An attention mechanism module is embedded after each convolutional layer.

[0066] The attention mechanism module includes channel attention and spatial attention mechanisms. The channel attention mechanism extracts key features of ice and water across color channels. First, it calculates the average and maximum values ​​of all pixels in each channel using global average pooling and max pooling. Then, it generates a weight value between 0 and 1 for each channel using the sigmoid function; the closer the weight value is to 1, the more important that channel is for distinguishing the ice-water interface. Finally, it multiplies the weight value by the pixel values ​​of the original feature map to amplify important channel features and suppress secondary channel features. After filtering out the differences in ice and water color features based on channel attention, the spatial attention mechanism is used to identify the location of these important features in the image. First, the average and maximum values ​​of all channels at each spatial location (i.e., pixel) in the feature map are calculated, resulting in two single-channel maps that aggregate different information. This identifies which spatial locations exhibit high responses across all feature channels. These two maps are then concatenated to generate a single spatial importance map. Similarly, the sigmoid function is used to normalize each value in the spatial importance map to between 0 and 1, with higher values ​​indicating more critical locations. Finally, this map is multiplied by the feature map after channel attention processing, thereby enhancing the feature responses of ice and water boundary regions and weakening irrelevant background regions. The flow of an attention mechanism module is as follows: Figure 3 As shown.

[0067] (1.2) Downsampling: The feature information after the dual-branch extraction network will be integrated, the dimension will be unified and the feature map size will be cropped through a feature fusion module. The downsampling stage includes 5 deformable convolutional modules. Each deformable convolutional module includes one deformable convolutional layer with a kernel size of 3×3 and two deformable convolutional layers with a kernel size of 1×1. An attention mechanism module is embedded after each deformable convolutional module.

[0068] The feature information extracted by the dual-branch extraction network is then integrated, dimensionality unified, and feature map size cropped through a feature fusion module. After fusing the feature information extracted by the dual-branch extraction network, it is input into the downsampling stage for further classification and recognition. The downsampling stage contains five deformable convolutional modules, each containing one 3×3 deformable convolutional layer and two 1×1 deformable convolutional layers. Traditional convolutional kernels use a fixed regular grid to perform convolution operations on the image (e.g., ...). Figure 4 (The 3×3 convolution kernel within the dashed lines) has two-dimensional coordinates for any pixel p0 in the image. Convolution calculation can be expressed as:

[0069] (1)

[0070] In the formula, To output feature maps in Eigenvalues ​​at; Let n be the nth sampling point in the regular grid, and let n represent the number of sampling points, with a value of n. N is the total number of sampling points of the convolution kernel. For example, for a 3×3 convolution kernel, N=9. To and The corresponding weighting coefficients; This refers to the actual sampled coordinates on the input feature map. The flow of a deformable convolutional module is as follows: Figure 4 As shown: The feature map input to the deformable convolutional module first passes through a deformable convolutional layer with a kernel size of 1×1 for feature channel dimensionality reduction, simplifying computation; then it is input into a deformable convolutional layer with a kernel size of 3×3. This convolutional layer achieves adaptive sampling by adding an additional offset generation module (offset Net): this module first predicts the two-dimensional offset of each convolutional sampling point based on the features of the input image. (Where Δx and Δy represent the offset increments of the image's horizontal and vertical coordinates, respectively; n represents the number of sampling points, and its value is...) N is the total number of sampling points of the convolution kernel. For example, if it is a 3×3 convolution kernel, then N=9). Then equation (1) can be transformed into:

[0071] (2)

[0072] In the formula, To perform deformable convolution calculations, pixel points After offset After adaptive adjustment, the corresponding pixel value (or feature value) at the actual sampling location.

[0073] During training, the offset As learnable parameters of deformable convolutional neural networks, the sampling points are... In this approach, sampling points outside the ice body are extended in reverse to the ice body area, thereby improving the algorithm's ability to capture the outer contour features of the ice body. Next, a deformable convolutional layer with a 1×1 kernel is used to restore the number of feature channels, and finally, an attention mechanism module is applied. The feature map sequentially passes through five deformable convolutional modules, gradually reducing the feature map resolution to half its original value and integrating key information about the ice and water features.

[0074] (1.3) Upsampling: The upsampling stage includes 4 regular convolutional modules, each of which contains one regular convolutional layer with a kernel size of 2×2, a kernel size of 3×3, and a kernel size of 1×1.

[0075] The workflow of a typical convolutional module is as follows: The feature map input to the module first passes through a 2×2 convolutional layer to restore its original resolution. It then passes through a 3×3 convolutional layer, followed by a 1×1 convolutional layer for feature channel dimensionality reduction, simplifying computation. By sequentially passing through four typical convolutional modules, the feature map resolution is gradually restored to half its original value, and key information about ice and water features is integrated.

[0076] The difference between a "variable convolution module" and a "regular convolution module" lies in the following: A regular convolution module uses a square, fixed-size grid for sampling, with sampling points strictly following a preset grid arrangement. In contrast, a deformable convolution module uses an additional offset net to provide a two-dimensional offset for each sampling point. This allows the sampling point positions to adjust adaptively, no longer limited by a fixed grid, thus enabling better capture of irregular ice-water interfaces. Regular convolution only includes the weight parameters of the convolution kernel. As the content that convolutional neural networks can learn; deformable convolutional modules additionally assign offsets. By incorporating learnable parameters, the model can dynamically optimize the sampling strategy based on the actual shape of the input features, making it more flexible. Therefore, when dealing with irregularly contoured targets such as ice and water interfaces, the fixed sampling points used by conventional convolutional modules tend to fall outside the ice area, making it difficult to accurately capture contour features. Variable convolutional modules, on the other hand, can adaptively adjust the offset to extend the search for ice and water interfaces, significantly improving the ability to capture the contour features of irregular targets.

[0077] The final step is to segment ice and water in the image of drifting ice. The overall process of the model is as follows: Figure 5 As shown.

[0078] (2) Model training:

[0079] The model was trained using a constructed dataset of flowing ice images to obtain an intelligent recognition model for ice and water features and ice-sealing rates in low-contrast scenes. The core of the model training is iterative training based on the training set data. Learnable parameters such as convolutional kernel weights and deformable convolutional offsets in the network are continuously updated through a backpropagation mechanism. During training, the average intersection-over-union (IoU) ratio of the validation set images is calculated in real time. When this metric no longer improves for several consecutive rounds, an early stopping mechanism is triggered to terminate the training, thereby avoiding overfitting and retaining the optimal training parameters. Figure 6 The diagram illustrates the parameter optimization process for model training in an application example, where (a) is the IoU process line for the training set and (b) is the IoU process line for the validation set.

[0080] The model is trained by iteratively updating the convolutional kernel weights. Training terminates when the average IoU after image recognition on the validation set no longer improves. In the application example, five training iterations were performed using the five-fold cross-validation method, with the highest possible average IoU on the validation set used as the criterion for selecting model parameters. The specific training process is as follows: Figure 6 As shown. The optimal optimization curve during the five training cycles is... Figure 6 Draw a line at the midpoint; when the number of iterations reaches 98... Figure 6 (a) The average IoU of the training set reached a maximum of 0.936. Figure 6 In (b), the average IoU of the validation set reaches its highest value of 0.911. In the subsequent 30 iterations, the IoU value of the validation set no longer increases, at which point training terminates, and the parameters at the 98th iteration are saved as the model parameters.

[0081] Step 4, Model Invocation and Freezing Rate Identification: This includes the following sub-steps:

[0082] Sub-step 401: Load the optimal model parameters after training, switch the model to inference mode, and deploy it to the appropriate computing device;

[0083] Sub-step 402 performs the same preprocessing operations as the training set on the newly acquired ice-flowing images, including scaling the images to 1280×720 pixel resolution, converting them to RGB three-channel format, normalizing the pixel values ​​to the 0~1 range, and adjusting them to a tensor dimension of [1,3,720,1280].

[0084] Sub-step 403: Extract image features using a dual-branch feature extraction network;

[0085] Sub-step 404, downsampling: key features that enhance the distinction between ice and water through deformable convolutional layers and attention mechanisms;

[0086] Sub-step 405, upsampling: restore image resolution and form a classification probability map of ice and water bodies;

[0087] Sub-step 406: Convert the probability map into a binary mask with a threshold of 0.5;

[0088] Sub-step 407, calculate the freezing rate IC, formula:

[0089] Ice cover rate IC = (Number of ice pixels / (Number of ice pixels + Number of water pixels)) × 100%

[0090] Sub-step 408, result evaluation: compare the recognition accuracy (ACC) of the predicted ice cover rate with the ice cover rate marked on the baseline, and evaluate the segmentation accuracy by the intersection-union ratio (IoU) of the predicted ice body region and the marked ice body region;

[0091] In the model invocation and ice cover rate identification stage, the optimal model parameters after training are first loaded, the model is switched to inference mode and deployed to the appropriate GPU / CPU computing device; then, the newly acquired ice flow images are subjected to preprocessing operations that are completely consistent with the training set, including scaling the images to 1280×720 pixel resolution, converting them to RGB three-channel format, normalizing the pixel values ​​to the 0~1 range, and adjusting them to a tensor dimension of [1,3,720,1280]. After the preprocessed image is input into the model, image features are first extracted through a dual-branch feature extraction network. In the downsampling stage, key features distinguishing ice and water are enhanced through deformable convolutional layers and an attention mechanism. Then, the image resolution is restored through an upsampling stage, outputting classification probability maps for ice and water. The probability maps are converted into binary masks (ice regions are 1, water regions are 0) with a threshold of 0.5. The number of pixels representing ice and water in the mask is counted, and the ice-sealing rate (IC) is calculated according to the formula: "Ice-sealing rate = (number of ice pixels / (number of ice pixels + number of water pixels) × 100%". In the model evaluation stage, the accuracy (ACC) of the predicted ice-sealing rate is compared with that of the baseline labeled ice-sealing rate. The segmentation accuracy is evaluated using the intersection-over-union (IoU) ratio of the predicted ice region and the labeled ice region. A visual image is output, showing ice labeled in white and water labeled in black, along with quantitative evaluation metrics including IC, ACC, and IoU, to assess the overall ice-sealing rate recognition performance. The closer the values ​​of both are to 1, the better the recognition effect.

[0092] (3)

[0093] (4)

[0094] Where: ICA refers to the total number of pixels in the ice region identified by the algorithm; R_ICA refers to the total number of pixels in the ice region in the reference image; IC refers to the ice-covered rate identified by the algorithm, %; R_IC refers to the ice-covered rate in the reference image, %.

[0095] Step 5, End: Output a visualization image with ice bodies marked in white and water bodies marked in black, as well as the ice cover rate (IC) value.

[0096] In practical applications, model calls only need to complete the ice cover rate identification according to the above process, output the ice and water visualization images and ice cover rate values, without needing to output evaluation indicators such as identification accuracy and crossover ratio.

[0097] Finally, it should be noted that the above is only used to illustrate the technical solution of the present invention and not to limit it. Although the present invention has been described in detail with reference to the preferred arrangement, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solution of the present invention (such as the form of the channel, the application of various formulas, the order of steps, etc.) without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for intelligent recognition of ice water features and freezing rate in low-contrast scenes, characterized in that, Includes the following steps: Step 1, Image Acquisition: Collect video data from the surveillance camera, set a time interval threshold t, extract image frames from the read video at the threshold t, and then perform image format conversion and normalization preprocessing. Step 2, Dataset Creation: Construct a drift ice image dataset based on the collected image data, including: labeling the data, finely segmenting the ice and water regions, generating a single-channel grayscale reference image, dividing the data, and classifying the images in the dataset into training set, validation set and test set according to the proportions of 75%, 20% and 5% respectively. Step 3, Model Building and Training: This includes model building and model training. (1) Model building: (1.1) Image feature extraction: Based on the U-Net model, deep and shallow dual-branch extraction networks are used to extract ice and water features in parallel before the downsampling stage. Three conventional convolutional layers with a kernel size of 3×3 are used, and the images are input sequentially to achieve feature information extraction. The deep branch network focuses on the overall contour of ice and water in the image. Two conventional convolutional layers with a kernel size of 3×3 are used, and an attention mechanism module is embedded after each convolutional layer. The attention mechanism module includes a channel attention mechanism for mining important features of ice and water in the color channel dimension and a spatial attention mechanism for identifying the location of the important features in the image. The operation of the channel attention mechanism includes the following sub-steps: Sub-step 311: Calculate the average and maximum values ​​of all pixels in each channel using global average pooling and max pooling. Sub-step 312 generates a weight value between 0 and 1 for each channel using the Sigmoid function. The closer the weight value is to 1, the more important the channel is for distinguishing the ice-water interface. Sub-step 313 involves multiplying the weight values ​​with the pixel values ​​of the original feature map to amplify the features of important channels and suppress the features of secondary channels. The spatial attention mechanism described above operates through the following sub-steps: Sub-step 321: Calculate the average and maximum values ​​of all channels at each spatial location in the feature map to obtain two single-channel maps that aggregate different information, in order to determine which spatial locations exhibit high response in all feature channels; Sub-step 322: stitch the two images together to generate a single spatial importance map; Sub-step 323: Using the Sigmoid function, normalize each value in the spatial importance map to a range of 0 to 1, with higher values ​​indicating more critical positions. Sub-step 324: Multiply this map with the feature map after channel attention processing to enhance the feature response of the ice-water boundary region and weaken irrelevant background regions. (1.2) Downsampling: The feature information after the dual-branch extraction network is integrated, the dimension is unified and the feature map size is cropped through a feature fusion module. The downsampling stage includes 5 deformable convolutional modules. Each deformable convolutional module contains one deformable convolutional layer with a kernel size of 3×3 and two deformable convolutional layers with a kernel size of 1×1. An attention mechanism module is embedded after each deformable convolutional module. (1.3) Upsampling: The upsampling stage includes 4 regular convolutional modules, each of which contains one convolutional layer with a kernel size of 2×2, a kernel size of 2×3, and a kernel size of 1×1. The workflow of the conventional convolutional module is as follows: Sub-step 331: Pass the feature map through a convolutional layer with a kernel size of 2×2 to restore the feature map resolution to its original resolution; Sub-step 332: The feature map is then input into a convolutional layer with a kernel size of 3×3, and then through a convolutional layer with a kernel size of 1×1 to perform feature channel dimensionality reduction operation to simplify the computation. (2) Model training: Iterative training is carried out based on the training set data, and the learning parameters in the network are continuously updated through the backpropagation mechanism, including: convolution kernel weights and deformable convolution offsets; the average intersection-union ratio after recognition of the validation set images is calculated in real time during the training process, and the early stopping mechanism is triggered to terminate the training when the average intersection-union ratio no longer improves for several consecutive rounds. Step 4, Model Invocation and Freezing Rate Identification: This includes the following sub-steps: Sub-step 401: Load the optimal model parameters after training, switch the model to inference mode, and deploy it to the appropriate computing device; Sub-step 402 performs the same preprocessing operations as the training set on the newly acquired ice-flowing images, including scaling the images to 1280×720 pixel resolution, converting them to RGB three-channel format, normalizing the pixel values ​​to the 0~1 range, and adjusting them to a tensor dimension of [1,3,720,1280]. Sub-step 403: Extract image features using a dual-branch feature extraction network; Sub-step 404, downsampling: key features that enhance the distinction between ice and water through deformable convolutional layers and attention mechanisms; Sub-step 405, upsampling: restore image resolution and form a classification probability map of ice and water bodies; Sub-step 406: Convert the probability map into a binary mask with a threshold of 0.5; Sub-step 407, calculate the freezing rate IC, formula: Ice cover rate IC = (Number of ice pixels / (Number of ice pixels + Number of water pixels)) × 100% Sub-step 408, result evaluation: compare the recognition accuracy (ACC) of the predicted ice cover rate with the ice cover rate marked on the baseline, and evaluate the segmentation accuracy by the intersection-union ratio (IoU) of the predicted ice body region and the marked ice body region; Step 5, End: Output a visualization image with ice bodies marked in white and water bodies marked in black, as well as the ice cover rate (IC) value.