River ice range extraction method based on KAN-UNetFormer model and Landsat image
By combining the KAN-UNetFormer model with Landsat imagery, the accuracy and efficiency issues of extracting large-scale river ice distribution were resolved, high-precision automated extraction was achieved, manual corrections were reduced, and reliable data support was provided.
Patent Information
- Application Number
- CN202510818237.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-03
AI Technical Summary
Existing technologies lack methods for large-scale, high-precision, and rapid extraction of river ice distribution ranges. Traditional algorithms are prone to misjudgment and require a large amount of manual correction. They are also unable to effectively distinguish river ice from snow and glaciers, have poor adaptability, and are difficult to achieve large-scale river ice distribution mapping.
A method based on the KAN-UNetFormer model and Landsat images was adopted. By constructing a training dataset, annotating the images and inputting them into the model, the model was trained using cross-entropy loss and Dice loss functions. Combined with the Transformer decoder and KAN network, the river ice extent was automatically extracted, reducing manual correction.
It achieves high-precision, automated extraction of river ice distribution over a large area, reduces interference from cloud cover and snow accumulation, improves extraction efficiency and accuracy, reduces manual inspection work, and provides a reliable data foundation.
Smart Images

Figure CN120747733A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of remote sensing geoscience application, and in particular relates to a river ice extent extraction method based on a KAN-UNetFormer model and Landsat images. Background Art
[0002] River ice is a vital component of the cryosphere, with approximately half of the world's rivers freezing over in winter. River ice has a significant impact on regional water resource utilization, climate change, transportation, and other areas. Multispectral satellite remote sensing imagery provides a crucial data source for river ice monitoring research. Landsat satellite imagery, in particular, with its medium-to-high spatial resolution, enables rapid, large-scale river ice monitoring and mapping, providing fundamental data for studying the spatiotemporal distribution and variability of river ice, as well as its hydrological processes.
[0003] Existing research has provided methods for extracting river ice extent at the local channel or basin scale, such as decision trees, thresholding, and visual interpretation. However, there is a lack of methods and processes for rapidly and accurately generating large-scale river ice extent data using multispectral satellite data. Furthermore, these methods require a combination of multiple algorithms and extensive manual supplementation and correction. For example, the Normalized Difference Snow Index (NDSI) algorithm is widely used due to its reliability and applicability, and has the potential to extract river ice extent at the basin scale. However, the NDSI algorithm cannot distinguish between river ice and snow, requiring the use of channel extent to constrain and eliminate interference from snow accumulation in surrounding areas. Due to the large variations in channel curvature and width, using channel vector data and a uniform width (or channel buffer) can lead to significant misjudgment in channel extent delineation. Using the multi-year maximum water surface area of a channel provides some constraints on both river water and ice, and most river ice distribution remains within the multi-year maximum water surface area of the channel. However, river ice accumulation can be significant in some sections of rivers in alpine mountainous areas, extending the ice distribution far beyond the river's maximum multi-year water surface. Therefore, manual judgment is still required to supplement the river ice extent extracted by the NDSI algorithm with river ice outside the river's maximum multi-year water surface. While the relative difference river ice extent extraction algorithm (RDRI) can distinguish river ice from snow, it cannot distinguish river ice covered by thick snow from thin ice, nor can it distinguish lake ice from glaciers, necessitating a certain degree of manual revision. Furthermore, traditional methods, such as thresholding, suffer from significant regional adaptability. When applied across large river basins, significant differences in surface reflectance often require repeated threshold calibration. This lack of versatility limits the extraction of river ice distribution over large areas, hinders river ice distribution mapping, and hinders the production of data products. This presents a technical pain point for further in-depth research on large-scale river ice distribution and changes. Therefore, a large-scale, high-precision, and automated river ice extraction method based on multispectral imagery is urgently needed to overcome the limitations of traditional algorithms. Summary of the Invention
[0004] To solve the problems in the prior art, the present invention provides a river ice extent extraction method based on the KAN-UNetFormer model and Landsat images.
[0005] The technical solutions of the present invention are as follows:
[0006] The present invention discloses a river ice range extraction method based on a KAN-UNetFormer model and Landsat images, comprising the following steps: obtaining a multispectral image containing river ice distribution and constructing a training data set, and performing preprocessing; then annotating the river ice area of the preprocessed multispectral image; wherein the multispectral image is a Landsat image; the annotated multispectral image is input into a KAN-UNetFormer model; the KAN-UNetFormer model includes a CNN encoder based on ResNet18 and a Transformer decoder, wherein the CNN encoder includes a plurality of residual blocks, each of which is used for 2x downsampling and is respectively connected to the Transformer through a skip connection. er decoder; the Transformer decoder includes three global-local Transformer blocks and a feature refinement head, and the convolutional layers in the local branches of the global-local Transformer blocks are replaced by the KAN network; the main loss function is constructed using the cross entropy loss function and the Dice loss function, and then combined with the auxiliary loss function generated by the Transformer decoder output to construct a comprehensive loss function and train the KAN-UNetFormer model; the multispectral image to be extracted is obtained, and the trained KAN-UNetFormer model is used to obtain a binary image, which is converted into a vector graphics of the river ice range to obtain the river ice area in the multispectral image, thus completing the river ice range extraction.
[0007] Furthermore, the method also includes: obtaining distribution images of rivers, lakes and glaciers in the area where the multispectral image to be extracted is located, and removing areas in the vector image that are mistakenly identified as river ice based on the obtained distribution images of rivers, lakes and glaciers.
[0008] Compared with the prior art, the present invention has the following beneficial effects:
[0009] 1) It was determined that multispectral images such as Landsat can be used to quickly extract the distribution range of river ice without the use of other remote sensing algorithms, threshold calibration, or additional conditions.
[0010] 2) It is clear that when using deep learning to extract the distribution range of river ice, the interference of cloud cover and snow cover can be reduced because this method reduces the sensitivity to surface reflectivity.
[0011] 3) It is clear that the deep learning extraction method can exclude most glaciers, lake ice and other ice bodies, and the river ice extraction accuracy is high, which greatly reduces the work of manual inspection and correction.
[0012] 4) It provides a specific and reliable deep learning network architecture and implementation steps for mapping the distribution range of river ice in large areas and producing data products. The data produced can provide basic data for river ice-related research.
[0013] 5) The present invention constructs a KAN-UNetFormer model, which replaces the convolutional layers in the local branches of the GLTB of the Transformer decoder of the UNetFormer model with KAN (Kolmogorov-Arnold Networks) networks; thereby, the multi-scale characteristics of river ice distribution can be captured more efficiently. By selecting multispectral images without snowfall and low cloud interference and containing river ice distribution as input data, the spatial distribution characteristics of river ice are automatically learned to adapt to the complexity and diversity of river ice morphological characteristics, thereby achieving high-precision extraction of river ice detail features. This method relies only on multispectral image data and does not require the use of additional algorithms such as river ice or snow accumulation index. It can significantly improve the accuracy and robustness of river ice extraction, and has better accuracy and efficiency than traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flowchart of the river ice extent extraction method based on the KAN-UNetFormer model and Landsat images;
[0015] Figure 2 This is the structural diagram of the KAN-UNetFormer model;
[0016] Figure 3 Schematic diagram of the global-local Transformer block;
[0017] Figure 4 Schematic diagram of the global branch of the global-local Transformer block;
[0018] Figure 5 This is the structural diagram of the KAN network;
[0019] Figure 6 This is the structural diagram of the feature fine head;
[0020] Figure 7 A comparison chart of the river ice distribution range extracted by the KAN-UNetFormer model and the NDSI index;
[0021] Figure 8 This is a diagram showing the river ice distribution data in some areas of the Qinghai-Tibet Plateau extracted using the KAN-UNetFormer model. DETAILED DESCRIPTION
[0022] The present invention will be further described and illustrated below in conjunction with specific embodiments. The embodiments are merely illustrative of the present disclosure and do not limit its scope. The technical features of the various embodiments of the present invention may be combined accordingly, provided that there is no conflict between them.
[0023] The purpose of the present invention is to address the problems existing in the prior art and provide a river ice range extraction method based on the KAN-UNetFormer model and Landsat images, which solves the problem of how to use multispectral images to quickly and accurately complete large-scale river ice distribution range mapping. The present invention collects multispectral images through satellites such as Landsat, and then uses the KAN-UNetFormer model to directly output the river ice distribution results: the KAN-UNetFormer model combines the encoder-decoder design with the attention mechanism to automatically separate river ice from interfering ground objects such as water bodies and shadows; through visual interpretation of image training models, the ice layer classification ability is dynamically optimized to accurately identify the river ice range. This method greatly reduces the manual correction process and significantly improves the efficiency and accuracy of large-scale river ice extraction; based on the river ice distribution range data, the river ice area can be calculated and the spatiotemporal distribution characteristics and changes of river ice can be studied.
[0024] This invention provides a method for rapidly and accurately generating river ice distribution data on a large scale using multispectral imagery. This method boasts high efficiency and reliability, enabling large-scale river ice distribution mapping. It provides a specific and reliable technical process for mapping river ice distribution over large areas and producing data products. The resulting data can provide fundamental foundational data for river ice-related research.
[0025] To this end, the present invention adopts the following technical solutions:
[0026] like Figure 1 As shown, the first step is to obtain a multispectral image without snowfall and low cloud interference and containing river ice distribution, construct a training data set, and perform preprocessing; then, mark the river ice area of the preprocessed multispectral image; wherein the multispectral image is a Landsat image.
[0027] Multispectral imagery containing river ice distribution, free of snowfall and low cloud interference, is selected as input data. Depending on factors such as river ice width and accuracy requirements, multispectral imagery with medium-to-high spatial resolution (less than or equal to 30 meters) and a temporal span covering the entire river ice development period is typically selected. For example, the Landsat series of satellites has been continuously acquiring global multispectral imagery since 1982. These images have a 16-day revisit period, a 30-meter spatial resolution, and are freely available, making them particularly suitable for extracting river ice distribution over large areas and long time series. Cloud cover can interfere with extracting river ice extent, so images with low cloud cover (e.g., less than 20%) are preferred. This method requires imagery with visible, near-infrared, and shortwave infrared wavelengths. Single or multiple images can be selected based on the size of the study area and the actual needs of the study period. The method itself has no restrictions on data size or format, but data processing efficiency is affected by the computing power of the computer or processing platform.
[0028] To preprocess the multispectral images, atmospheric correction is first performed on the multispectral images in the training dataset. The corrected multispectral images are then processed into a single median image to reduce cloud and snow interference. Finally, the processed multispectral images are normalized to complete the preprocessing. Atmospheric correction can be performed using ENVI (Environment for Visualizing Images) software. After preprocessing, the river ice areas in the preprocessed multispectral images must be annotated.
[0029] To avoid interference from snowfall, images taken more than 3 days before or after snowfall are preferred to ensure clear river ice information.
[0030] To synthesize a single median image from multiple images, you can use the B5, B4, and B3 bands of the multi-view image for median synthesis. This process can be performed using software such as ArcGIS (Geographic Information System) and ENVI, or using remote sensing cloud platforms such as GEE (Google Earth Engine) and PIE (Pixel Information Expert).
[0031] Using median composite images, we created training and test datasets using ArcGIS Pro. Both datasets were 1024×1024 in size. The training dataset was further divided into a training set and a validation set using a specific ratio (usually 8:2 or 7:3). The training and validation sets contained remote sensing image files and label files, as well as two files in which the single-channel labels were converted to three-channel RGB format to ensure data compatibility. Images within each folder were named consistently and mapped one to one. The test dataset consisted solely of the remote sensing image files.
[0032] The second step is to input the annotated multispectral image into the KAN-UNetFormer model; the KAN-UNetFormer model includes a CNN encoder based on ResNet18 and a Transformer decoder, wherein the CNN encoder contains multiple residual blocks, each of which is used for 2x downsampling and is connected to the Transformer decoder through jump connections; the Transformer decoder includes three global-local Transformer blocks and a feature refinement head, and the convolutional layers in the local branches of the global-local Transformer blocks are replaced by the KAN network; the main loss function is constructed using the cross-entropy loss function and the Dice loss function, and then combined with the auxiliary loss function generated by the Transformer decoder output to construct a comprehensive loss function and train the KAN-UNetFormer model.
[0033] The KAN-UNetFormer model is an improved version of the UnetFormer network, primarily consisting of a ResNet18-based CNN encoder and a Transformer decoder. The Transformer decoder includes a global branch that captures global context through windowed multi-head attention and a cross-window interaction module, and a global-local Transformer block that replaces traditional convolutions with improved local branches that more flexibly capture detailed information, as seen in the KAN network. It also includes a feature refinement head for cross-level feature fusion and enhancement. By dynamically adjusting the weights and structure of the convolution kernels, the KAN network can better adapt to the complexity and diversity of river ice distribution characteristics, significantly improving the accuracy and robustness of river ice extent extraction. By optimizing network parameters through backpropagation, the model automatically learns the characteristic differences between river ice and other landforms, enabling efficient extraction of river ice extent. The river ice distribution information output by the model can be directly used for subsequent analysis.
[0034] like Figure 2 As shown in Figure 2, the improved KAN-UNetFormer model architecture is based on UNetFormer, and its core modules include:
[0035] 1) CNN Encoder
[0036] ResNet18 is used as the CNN encoder to extract multi-scale semantic features. The feature maps of each stage are fused with the Transformer decoder features through skip connections, and the common features are selectively aggregated through the weighted sum operation. The formula of the weighted sum operation is expressed as:
[0037] F fuse = α· F res + (1 - α)· F GLF (1)
[0038] Among them, F fuse represents the fusion feature, F res Represents the features generated by Resblocks, F GLF represents the features generated by the Global-Local Transformer (GLTB) block, and α is the weight factor.
[0039] 2) Transformer Decoder
[0040] Multi-scale global-local context capture is achieved through three global-local transformer blocks (GLTB) and a feature refinement head (FRH).
[0041] (1) Global-Local Transformer Block (GLTB)
[0042] like Figure 3 As shown, the Global-Local Transformer Block (GLTB) includes a global branch and a local branch.
[0043] like Figure 4 As shown, the global branch captures the global context based on the multi-head self-attention mechanism of the window. First, the channel dimension of the input 2D feature map ∈ R is converted to B×C×H×W Expanded to three times, where B is the batch size; C is the channel dimension; H is the height of the 2D feature map; W is the width of the 2D feature map. Then, a window partitioning operation is applied to convert the 1D sequence The model is divided into query (Q), key (K), and value (V) vectors. The channel dimension C is set to 64, and the window size w and number of heads h are both set to 8. A cross-window context interaction module is used to capture cross-window relationships. This module fuses the two feature maps generated by the horizontal and vertical average pooling layers to capture global context.
[0044] Specifically, the horizontal average pooling layer establishes a horizontal relationship between windows, such as Win1=H(Win2). It is the same as the The dependency relationship can be modeled as:
[0045]
[0046] Where Win1 represents window 1; Win2 represents window 2; H(*) represents the horizontal average pooling operation, which averages the feature map in the horizontal direction in units of window size to establish a horizontal context relationship between adjacent windows; Indicates the point with horizontal coordinate m and vertical coordinate n in window 1; w is the window size; D i (*) denotes the i-th self-attention calculation, which can model the dependencies between pixel pairs in the local window. Therefore, for any point of the red path in window 1 Its The dependency of can be modeled by formula (3). For any point of the green path in window 2 Its The dependency relationship can be modeled by formula (4). Formula (2) can be rewritten as formula (5), that is, and The dependency between them is modeled. Based on this pixel-level dependency across windows, the horizontal relationship between window 1 and window 2 can be established. Similarly, the vertical relationship between window 1 and window 3 can be established in the same way, that is, Win1 = V(Win3). For window 4, Win1 = V(H(Win4)) + H(V(Win4)). Extended to M×M input (M represents the number of windows), by connecting more intermediate windows (such as window 2 and window 3), the long-distance dependency between any two windows can be modeled. Therefore, the cross-window context interaction module is able to model long-distance dependencies at the window level, thereby capturing the global context.
[0047] For the local branch, the convolutional layers in the local branch of GLTB are replaced by the KAN network, which extracts local details and finally outputs the refined context information by aggregating global and local features.
[0048] (2) Feature refinement head (FRH)
[0049] Fusing shallow spatial features (first stage of CNN encoder) with deep semantic features (GLTB output) to improve accuracy.
[0050] like Figure 6As shown in , these two features are first weighted summed to fully utilize the precise semantic information and spatial details. The fused features are then selected as the input of FRH, as Figure 2 As shown. Secondly, two paths are constructed to enhance the channel and spatial feature representation. Specifically, the channel path uses a global average pooling layer to generate a channel attention map Z∈R 1×1×C The reduction and expansion operation consists of two 1×1 convolutional layers, which first reduce the channel dimension C by a quarter and then expand it back to the original dimension. The spatial path uses depthwise convolution to generate a spatial attention map S∈R a×b×1 , where a and b represent the spatial resolution of the feature map. The attention features generated by the two paths are further fused through a summation operation. Finally, a post-processing 1×1 convolutional layer and upsampling operation are applied to generate the final segmentation map.
[0051] (3) KAN convolution improvement
[0052] like Figure 5 As shown in the figure, in the local branch of the original UNetformer, the traditional convolution is replaced by a dynamic KAN (Kolmogorov-Arnold Networks) network, and the improved KAN convolution is used to accurately extract the distribution range of river ice. The global attention module of the network is used to capture the large-scale context information in the image, while the improved local attention module introduces KAN convolution and dynamically adjusts the convolution kernel weights and structure, which can more efficiently capture the multi-scale characteristics of river ice. Specifically, let the input feature map be For each input vector at spatial position (n, d, e) Output feature map of KAN network By adding the two parts, the formula is as follows (that is, formula (6)):
[0053]
[0054] Where B is the batch size; C in is the number of input channels; C out is the output channel; H1 and W1 are the spatial height and width of the feature map respectively; n represents the nth sample index, and the value range is n=1,2,···,B; d represents the pixel index in the spatial height direction; e represents the pixel index in the spatial width direction; X n,c,d,e represents the input feature value of the nth sample and the cth channel at position (d, e); Y n,o,d,e Represents the output feature value of the nth sample and the oth output channel at position (d, e); represents the learnable weight from input channel c to output channel o in the basic linear branch; For basic activation; represents the o output channels in the spline branch, the learnable weights corresponding to the input channel c and the kth basis function; b c,k (*) is the kth B-spline basis function on channel c; and are the basic linear weight and spline weight respectively; s o,c is an optional spline scaling factor; K represents the total number of B-spline basis functions on each input channel.
[0055] 3) KAN-UNetFormer model training
[0056] The KAN-UNetFormer model training process requires labeled river ice extent data as supervisory information. Using a backpropagation algorithm to optimize network parameters, the network automatically learns the characteristic differences between river ice and other landforms, effectively extracting the river ice extent. The river ice location data output by the KAN-UNetFormer model can be directly used for subsequent analysis.
[0057] The comprehensive loss function of the KAN-UNetFormer model consists of a primary loss function and an auxiliary loss function. The comprehensive loss function of the KAN-UNetFormer model is shown in Equation (7). To better integrate with the primary loss function, the auxiliary loss function is further multiplied by a factor α. By combining the primary and auxiliary losses, this loss function effectively balances the overall performance of the model with the ability to extract local features.
[0058] The main loss function L p By Dice loss function L dice With the cross entropy loss function L ce Weighted combination (such as formula (8)-(10)) is used to deal with class imbalance and auxiliary loss function L aux Used to optimize the decoder (Formula (11)). Formulas (7)-(10) are:
[0059] L=L p +α×L aux (7)
[0060] L p =L ce +L dice (8)
[0061]
[0062] The default value of α is set to 0.4; N represents the total number of pixels in the multispectral image; K represents the number of feature categories in the multispectral image, including river ice and non-river ice, that is, K is 2; One-hot encoding of the actual label indicating that pixel n belongs to category k; represents the confidence that pixel n belongs to category k; n∈[1,...,N].
[0063] Using the cross entropy loss function L ce As the auxiliary loss function L aux , that is, L aux =L ce . and apply it to the auxiliary head. The auxiliary head takes the fused features of the three global-local Transformer blocks as input and constructs a 3×3 convolution layer (with batch normalization and ReLU), a 1×1 convolution layer, and an upsampling operation to generate the output.
[0064] Before training the KAN-UNetFormer model, relevant training parameters are set, including the training batch (epoch), batch size (batch size), learning rate (lr), model save path, and training data paths. Training begins by entering the training command in the terminal. To perform predictions, simply launch the prediction code in the terminal and add the output path. During training, the model automatically saves the optimal training weights based on the accuracy score and automatically calls them during pre-testing.
[0065] Step 3: Obtain a multispectral image without interference from snowfall and low clouds and containing the river ice distribution to be extracted. Use the trained KAN-UNetFormer model to obtain a binary image, convert the binary image into a vector graphic of the river ice range, then remove the misjudged river ice area to obtain the river ice area in the multispectral image, and complete the river ice range extraction.
[0066] Specifically, when the trained KAN-UNetFormer model is used to process multispectral imagery containing the river ice distribution to be extracted, free of snowfall and low cloud, it outputs a binary image that clearly distinguishes river ice from non-ice areas using different grayscale values. However, since the multispectral imagery of the river ice distribution to be extracted may contain wetlands, small strip-shaped ponds, and artificial temporary water bodies, the ice formed by these frozen bodies has similar characteristics to the river ice image, which may lead to misclassification and need to be eliminated.
[0067] Therefore, the binary image extracted by the trained KAN-UNetFormer model is converted into a vector graphics of the river ice extent. Then, it is checked and verified by combining the satellite imagery, DEM data, river channel, lake and glacier distribution data, and other data. The areas in the vector graphics that are misidentified as river ice are removed, and finally the river ice area in the multispectral image is obtained, completing the river ice extent extraction.
[0068] After checking and correcting the river ice extent extracted from the trained KAN-UNetFormer model, complete river ice extent data is generated. The final data can be stored in vector formats (such as shp) or raster formats (such as TIFF), with attribute information such as data projection added. Based on this river ice extent data, river ice area can be further calculated, and the spatiotemporal distribution characteristics and changes of river ice can be studied, providing fundamental data for research on river ice hydrological processes and ice hazard hazards.
[0069] In this invention, river ice distribution data correction and output operations can be performed using ArcGIS software. The spatial calculation functions within ArcGIS software can be used to calculate river ice area. Spatial analysis functions in ArcGIS and other software can be used to determine the spatiotemporal distribution characteristics of river ice. By calculating the interannual area of river ice within a region, multi-year trends in river ice area can be determined.
[0070] The present invention can use deep learning and multispectral satellite data to quickly and widely acquire river ice distribution range information and produce river ice distribution range data. It has high production efficiency and good reliability, making it possible to realize river ice mapping in large areas, and also providing basic data for studying the spatiotemporal distribution characteristics and changes of river ice.
[0071] In one specific embodiment of the present invention, multispectral imagery of a river basin from January to April 2023 is used as sample data. The imagery is from the Landsat 8OLI satellite, with a spatial resolution of 30 meters and a temporal resolution of 16 days. The imagery, acquired via a remote sensing data processing cloud platform, has undergone preprocessing for atmospheric correction and radiometric calibration.
[0072] Step 1: Image selection and synthesis
[0073] Using the remote sensing data processing cloud platform, we selected 78 multispectral images with cloud cover below 20%. We then performed atmospheric correction on the multispectral images. Next, we combined all the atmospherically corrected multispectral images into a single median image to reduce cloud and snow interference. Finally, we normalized the image size to fit the model input. After preprocessing, we then labeled the river ice areas in the multispectral images.
[0074] Step 2: KAN-UNetFormer model training
[0075] Using ArcGIS Pro, we created training and test datasets using the normalized multispectral imagery. We set training parameters, such as 100 epochs, a batch size of 8, a learning rate of 6e-4, and the data path. We then fed the training dataset into the KAN-UNetFormer model for training. During training, the model automatically saved the optimal training weights based on the accuracy metric scores. To generate predictions, we simply launched the prediction code in the terminal, including the output path, to obtain the prediction results.
[0076] Step 3: Extracting the river ice distribution range using the KAN-UNetFormer model and checking and verifying the extraction results. After the KAN-UNetFormer model training is completed, a multispectral image containing the river ice distribution to be extracted without interference from snowfall and low clouds is obtained. The trained KAN-UNetFormer model is used to obtain a binary image, which is converted into a vector graphic of the river ice range. The misjudged river ice area is then removed to obtain the river ice area in the multispectral image, completing the extraction of the river ice range.
[0077] Specifically, the raster-to-polygon tool of software such as ArcGIS is used to convert the prediction results (binary map) into vector data (vector map).
[0078] Because the study area may contain wetlands, small strip-shaped ponds, and artificial temporary water bodies, the ice formed by these frozen bodies is similar to river ice image characteristics, which may lead to misjudgment. The results extracted by the KAN-UNetFormer model were checked and corrected by combining DEM data and river channel data to form a complete river ice distribution for the target area. The final data was stored in vector format (shp) to facilitate statistical analysis and visualization.
[0079] Step 4: Accuracy Verification and Analysis
[0080] The extraction results were verified using deep learning model evaluation metrics and a dual validation method using existing data and visual interpretation to ensure the reliability and accuracy of river ice extraction. The performance of the model extraction results was evaluated by calculating metrics such as overall accuracy (OA), precision (Precision), recall (Recall), F1 score, and Dice coefficient. The evaluation metrics are listed below:
[0081]
[0082] Among them, TP and TN are the numbers of pixels correctly predicted as river ice and correctly predicted as other ground objects, respectively; FP and FN are the numbers of pixels incorrectly predicted as river ice and incorrectly predicted as other ground objects, respectively.
[0083] Specific results show that the overall accuracy (OA) of the model extraction reached 98.5%, the precision (Precision) was 95.3%, the recall rate (Recall) was 97.8%, the F1 score was 96.5%, and the Dice coefficient was 94.7%, indicating that the model has high accuracy and robustness in the river ice extraction task. At the same time, the model extraction results were spatially superimposed and compared with the existing river ice distribution data to analyze the spatial consistency. The results showed that the extraction results were highly consistent with the existing data; the extraction results were manually inspected by visual interpretation method to further verify the accuracy of the extraction results. The visual interpretation results were consistent with the model extraction results. Double verification analysis shows that the river ice extraction method based on the KAN-UNetFormer model of the present invention has high accuracy and reliability, and can meet the needs of rapid extraction of river ice distribution over a large range.
[0084] Figure 7 Region a in the figure represents a long stretch of river, demonstrating the difference between the proposed method and the NDSI algorithm in terms of overall river ice extraction accuracy and river channel continuity. Experiments show that the proposed method can more completely extract continuous river ice, reducing breakage and missed detections. Figure 7 Region b in the image represents a small-scale "local magnification," demonstrating the superiority of our method in preserving detail. Compared to the NDSI algorithm, which is an existing algorithm, our method can more accurately identify river ice edges and small-scale ice fragments, reducing misclassification.
[0085] Figure 8 The a in the figure represents a partial display of the river ice extraction results of the Yellow River source area by KAN-UNetFormer. Figure 8 The b in the figure represents a partial display of the river ice extraction results of the Lancang River source area by KAN-UNetFormer. Figure 8 The figure c represents a partial display of the river ice extraction results of KAN-UNetFormer in the Yangtze River source region. This demonstrates the strong generalization of the method of the present invention and its applicability to various river basins.
[0086] The above-described embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. Persons skilled in the art will readily appreciate that variations and modifications may be made without departing from the scope of the present invention, all of which fall within the scope of protection of the present invention.
Claims
1. A method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images, characterized by: The following steps are involved: Acquire a multispectral image containing river ice distribution, construct a training data set, and perform preprocessing; then annotate the river ice area in the preprocessed multispectral image; wherein the multispectral image is a Landsat image; The annotated multispectral image is input into the KAN-UNetFormer model; the KAN-UNetFormer model includes a CNN encoder based on ResNet18 and a Transformer decoder. The CNN encoder contains multiple residual blocks, each of which is used for 2x downsampling and is connected to the Transformer decoder via skip connections. The Transformer decoder includes three global-local Transformer blocks and a feature refinement head, and the convolutional layers in the local branches of the global-local Transformer blocks are replaced with KAN networks. The main loss function is constructed using the cross entropy loss function and the Dice loss function. Then, the auxiliary loss function generated by the Transformer decoder output is combined to construct a comprehensive loss function and train the KAN-UNetFormer model. The multispectral image to be extracted is obtained, and a binary image is obtained using the trained KAN-UNetFormer model. The binary image is converted into a vector graphic of the river ice range, and the river ice area in the multispectral image is obtained to complete the river ice range extraction.
2. The method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images according to claim 1, characterized in that: The spatial resolution of the multispectral images in the training dataset is less than or equal to 30m, and the cloud coverage of the multispectral images in the training dataset is less than 20%; The time span of all multispectral images in the training dataset covers the entire river ice development period, and the multispectral images in the training dataset are collected by Landsat satellites.
3. The method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images according to claim 1, characterized in that: The preprocessing is to first perform atmospheric correction on the multispectral images in the training data set, then perform multi-scene image synthesis into a scene median image processing on the atmospherically corrected multispectral images, and finally perform image size normalization on the multispectral images that have completed the processing to complete the preprocessing.
4. The method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images according to claim 1, characterized in that: The formula of the comprehensive loss function is: L=L p +α×L aux Among them, L is the comprehensive loss function; L p is the main loss function; α represents a factor, which is a constant; L aux is the auxiliary loss function.
5. The method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images according to claim 4, characterized in that: The main loss function L p The formula is: L p =L ce +L dice Among them, L ce represents the cross entropy loss function; L dice represents the Dice loss function; N represents the total number of pixels in the multispectral image; K represents the number of object categories in the multispectral image, including river ice and non-river ice; One-hot encoding of the actual label indicating that pixel n belongs to category k; represents the confidence that pixel n belongs to category k, where n∈[1,...,N].
6. The method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images according to claim 5, characterized in that: Auxiliary loss L aux The formula is: L aux =L ce 。 7. The method for extracting river ice extent based on the KAN-UNetFormer model and Landsat images according to claim 1, characterized in that: The method further comprises: Obtain distribution images of rivers, lakes, and glaciers in the area where the multispectral image to be extracted is located, and remove areas in the vector image that are misjudged as river ice based on the obtained distribution images of rivers, lakes, and glaciers.
Citation Information
Cited By
Real-time monitoring method, equipment and system for water pollution of sea-entering river
CN121746922A