A multi-level land resource segmentation and migration fine-tuning method with input alignment

By employing a multi-level land resource segmentation migration fine-tuning method with input alignment, utilizing the Transformer architecture and its pre-trained model, combined with an input alignment module and optimized training strategy, the modeling and data dependency problems in land resource segmentation are solved, achieving efficient and accurate multi-level land resource segmentation.

CN121438099BActive Publication Date: 2026-04-03INST OF GEOGRAPHICAL SCI & NATURAL RESOURCE RES CAS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies for land resource segmentation suffer from several drawbacks, including limitations in long-distance relationship modeling, difficulties in Transformer training and optimization, high requirements for labeled data, low pre-training transfer efficiency, and a lack of diversity in segmentation levels.

Method used

A multi-level land resource segmentation migration fine-tuning method with input alignment is adopted. By using three Transformer architectures, namely Swin-Unet, SegFormer and DoubleSwinT, and their pre-trained models, combined with input alignment module, gradient clipping and two-stage training strategy, the model training process is optimized to achieve multi-level land resource segmentation.

Benefits of technology

It significantly improves the training efficiency and segmentation accuracy of the model, reduces the dependence on labeled data, enhances the transferability and applicability of the model, and supports the flexible application of multi-level land resource segmentation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121438099B_ABST
    Figure CN121438099B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-level land resource segmentation migration fine-tuning method with input alignment, comprising the following steps: acquisition and processing of remote sensing image data and label data related to the land resource segmentation task; selection and slicing of sampling areas based on prior knowledge of the study area; data augmentation to expand the dataset and pixel value normalization; partitioning the model dataset using stratified sampling techniques; determining the optimal initial learning rate through hyperparameter optimization, entering input feature alignment, and establishing a quick connection between the input alignment module and the model output; employing three Transformer architectures and their pre-trained models for land resource segmentation, and optimizing the model training process using gradient-value-constrained gradient clipping and two-stage training strategies; step six: segmentation prediction and visualization. This invention improves the model's training efficiency and segmentation performance, achieving high-precision multi-level land resource segmentation and recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for fine-tuning land resource segmentation and migration, and more particularly to a multi-level land resource segmentation and migration fine-tuning method with input alignment. Background Technology

[0002] The core task of land resource segmentation is to accurately classify and divide land resources into regions based on land cover types, utilization characteristics, or spatial distribution features. Traditional image processing-based segmentation methods utilize algorithms such as threshold segmentation, region growing, and edge detection to segment land cover. These methods rely on manually designed features and have low segmentation accuracy. Machine learning methods, by introducing models such as support vector machines, decision trees, and random forests for land cover segmentation, have limited ability to express features and exhibit poor robustness and generalization performance.

[0003] The rapid development of deep learning technology has injected new momentum into land segmentation, and convolutional neural networks (CNNs) have been widely applied in the field of land resource segmentation. Some studies use 3D-DL strategies to process spectral spatial features, combining traditional CNN networks with 3D convolutional operations to achieve spectral and spatial information processing, thus better handling spectral spatial features. For the characteristics of multi-spectral imaging, a dual-path CNN model has been designed for urban land use segmentation. The first branch of this model is an AlexNet network pre-trained on ImageNet, used to extract spatial features. The second branch is a small convolutional neural network (small DCNN) formed by several cascaded convolutional layers, used to extract spectral features. Finally, a feature stacking method is used to fuse spatial and spectral features. Although CNNs have achieved considerable success in land resource segmentation, they lack the ability to model global dependencies and struggle to adapt to complex land cover boundaries.

[0004] Transformers can capture long-range dependencies through self-attention mechanisms, opening up new avenues for global relation modeling. A hyperspectral image Transformer (HiT) classification method has been proposed, which further integrates local spatial context information by embedding convolutions into the Transformer architecture. A coupled CNN-Transformer framework (CCTNet) has also been proposed, aiming to combine local details (e.g., edges and textures) captured by CNNs with global context information obtained through Transformers for crop segmentation based on remote sensing imagery. Although Transformers excel at capturing global context and long-range dependencies, their application in land resource segmentation is relatively limited due to limitations in labeled data, high computational requirements, and difficulties in model optimization.

[0005] The emergence of transfer learning techniques can help overcome the challenge of limited labeled data in target areas. For example, the AlexNet network pre-trained on ImageNet achieved higher classification accuracy for wetland land cover classification compared to classic machine learning models; crop type maps were drawn based on random forest transfer learning and unsupervised clustering techniques. However, it is worth noting that most existing pre-trained models are based on computer vision datasets. Using these datasets as the source domain for land resource segmentation tasks may lead to low transferability due to differences in data distribution, resulting in decreased model performance. Although a small number of pre-trained models are based on remote sensing datasets, remote sensing images come from different sensors, exhibiting diverse spectral characteristics and significant spatiotemporal differences, resulting in highly heterogeneous input features that limit the domain adaptability of pre-trained models. Furthermore, existing research has limited the application of transfer learning techniques to land resource segmentation, and most of these studies often target specific land use types or even specific crop types. In addition, most research on hierarchical transfer learning focuses on natural language processing and computer vision, neglecting its practical application in remote sensing land resource segmentation.

[0006] In summary, the main drawbacks of existing technologies include deficiencies in long-distance relationship modeling, difficulties in Transformer training and optimization, high requirements for labeled data, low efficiency of pre-trained transfer, and a single segmentation level / target. To address these shortcomings, there is an urgent need to propose a multi-level land resource segmentation and transfer fine-tuning method with input alignment. Summary of the Invention

[0007] To address the shortcomings of the aforementioned technologies, this invention provides a multi-level land resource segmentation and migration fine-tuning method with input alignment.

[0008] To solve the above technical problems, the technical solution adopted by the present invention is: a multi-level land resource segmentation and migration fine-tuning method with input alignment, comprising the following steps:

[0009] Step 1: Collection and processing of remote sensing image data and label data related to the land resource segmentation task;

[0010] Step 2: Based on the task requirements and prior knowledge of the study area, select the sampling area and slice the remote sensing image data and label data;

[0011] Step 3: Perform data augmentation to expand the dataset, and at the same time normalize the pixel values ​​of the remote sensing image data;

[0012] Step 4: Divide the model dataset using stratified sampling techniques;

[0013] Step 5: Train the model based on the dataset obtained from the above operations:

[0014] The optimal initial learning rate is determined through hyperparameter optimization, an input alignment module is introduced to align input features, and a shortcut connection is made between the input alignment module and the model output.

[0015] Three Transformer architectures, namely Swin-Unet, SegFormer and DoubleSwinT, and their pre-trained models are used for land resource segmentation. Among them, the fine-grained land resource segmentation task will use the model weights saved from coarse-grained training as initial parameters.

[0016] Meanwhile, three strategies are adopted to optimize the model training process: gradient clipping with gradient value constraints and two-stage training.

[0017] Step 6: After the model training is completed, save the model with the best accuracy and use it for segmentation prediction. Output the best segmentation prediction result for fine-tuning of land resource segmentation and migration, and visualize the output result.

[0018] Preferably, in step one, the target study area and segmentation category of the land resource segmentation task are determined, and remote sensing image data and label data that can meet the task requirements are obtained according to the segmentation task objectives.

[0019] The remote sensing image data undergoes data processing operations including cloud contamination analysis, geometric correction, denoising and filtering, and image cropping.

[0020] The label data is overlaid and compared with the remote sensing image data to check whether the label data is correct and to correct any errors. Then, the categories are filtered according to the task requirements to create a labeled dataset.

[0021] Preferably, in step two, the sampling area is delineated based on the distribution of land resources and terrain features, so that the samples can cover all areas and be evenly distributed in space; the remote sensing image data and label data within the sampling area are sliced ​​into small blocks of fixed size as needed.

[0022] Preferably, in step three, the data augmentation operations include cropping, rotating, scaling, and normalizing the sample data to map it to a uniform numerical range.

[0023] Preferably, in step four, the sample data is grouped and sampled according to the land resource type, and the sample dataset is divided into training set and test set in a 2:1 ratio for each type.

[0024] Preferably, in step five, the hyperparameter optimization process involves testing three learning rate scheduling methods—polynomial, exponential, and cosine annealing—and two optimizers—SGD and Adam. During the hyperparameter search process, a coarse-to-fine approach is adopted, first setting a large range to determine the general parameter trend, and then gradually narrowing the search range to accurately locate the optimal configuration.

[0025] Preferably, input feature alignment is performed by aligning the target domain input features with the source domain input features through linear or convolutional mapping.

[0026] Preferably, the shortcut connection between the input alignment module and the model output is specifically divided into the following: if the number of input bands matches the input of the source domain, then identity mapping is used; otherwise, a linear layer or convolutional layer is used for mapping, and its output can be expressed as:

[0027] ,

[0028] in, The input matrix is ​​in the target domain. The logits vector is unstandardized. The output of the input alignment module, For identity or mapping weight matrix, For pre-trained Transformer.

[0029] Preferably, two-stage training refers to employing a two-stage strategy to perform the model training process, including:

[0030] In the first stage, the pre-trained encoder is frozen, and only the input alignment module and decoder of the model are trained. The optimization objective is:

[0031] ,

[0032] in, , It is a linear projection matrix. For linear detection bias, For model output, Indicates feature extraction ( This refers to the initial feature extractor, i.e., the pre-trained model. Indicates the first Feature extractor updated every cycle). Indicates the input alignment parameter. express The parameters, This represents the bias parameter of the linear probe layer. Represents the loss function

[0033] In the second stage, the model from the first stage is retrained, and all parameters of the model are updated to adapt to the target task. The optimization objective is:

[0034] .

[0035] This invention discloses an input-aligned, multi-level land resource segmentation transfer fine-tuning method, an innovative application of Transformer and its pre-trained models in the field of land resource segmentation. It constructs an input-aligned, multi-level transfer fine-tuning framework, fully utilizing Transformer and its pre-trained models to segment and identify land resources at different classification levels, significantly improving the model's training efficiency and segmentation accuracy. Compared with existing land resource segmentation methods, this invention innovatively applies the Transformer architecture, which can fully model complex relationships and long-distance dependencies in the data, overcoming the limitations of convolutional networks in modeling local features. Simultaneously, the effective utilization of pre-training information reduces the dependence on large-scale labeled data, enabling the model to achieve high-precision segmentation even when data labeling costs are high or data is insufficient. This invention also introduces an input alignment module to enhance feature compatibility between the source and target domains, improving the model's transferability and applicability. Furthermore, this invention employs optimized training and automated hyperparameter tuning strategies to effectively avoid gradient explosion or vanishing gradient problems that may occur during model training, improving the model's convergence speed and computational efficiency. Finally, the framework built by this invention supports multi-level land resource segmentation tasks and can be flexibly applied in different levels of tasks. At the same time, it can further improve the accuracy of fine-grained segmentation by leveraging coarse-grained feature information. Attached Figure Description

[0036] Figure 1 In the background of this invention, the lack of input alignment will lead to severe covariate shift, introducing errors and potential overfitting.

[0037] Figure 2 illustrates the input alignment adaptation framework of this invention, which combines multi-level convolution and residual connections to enhance the domain adaptability of remote sensing semantic segmentation.

[0038] Figure 3 This is a schematic diagram of the technical process of the present invention.

[0039] Figure 4 This is a schematic diagram of the research and sampling area in an application example of the present invention.

[0040] Figure 5 This is a visualization result of a large image in an application example of the present invention.

[0041] Figure 6 This is a visualization of some details in an application example of the present invention. Detailed Implementation

[0042] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0043] Existing land resource segmentation methods are mainly based on convolutional neural networks, with a few based on the Transformer architecture. Classic and widely used convolutional neural networks include U-Net, ResNet, and VGG. While these methods have certain advantages in capturing local spatial location information, they are limited by network depth and kernel size, and cannot fully capture global semantic interactions and contextual information, resulting in poor performance when dealing with complex terrain, ambiguous boundaries, or irregular plots.

[0044] The Transformer architecture can effectively capture the global dependencies between features at any position in the input data through its self-attention mechanism. However, it has quadratic time complexity and introduces more trainable parameters and larger memory footprint, so it usually requires longer training time and the optimization process is also more complex.

[0045] Meanwhile, both convolutional and Transformer-based deep learning models typically require large amounts of labeled data for training, limiting their application in land resource segmentation. Although existing research has utilized transfer learning techniques to help overcome the problem of insufficient labeled data, feature differences between datasets from different domains limit the generalizability of pre-trained models. Remote sensing data differs significantly from computer-generated data; directly applying (pre-)trained models can introduce potential biases, such as… Figure 1 As shown, direct application can lead to significant covariate shift, causing overfitting in the trained model and affecting its generalization ability in later training stages. Furthermore, most existing methods focus only on the same level of segmentation tasks, or even only on specific land use or crop types.

[0046] Based on the above, this invention proposes a multi-level land resource segmentation transfer fine-tuning method with input alignment. Based on a transfer learning framework, it applies multi-domain Transformers and their pre-trained models to land resource segmentation tasks. An input alignment module is designed to enhance the cross-domain adaptability of the pre-trained model. Partially automated initial hyperparameter adjustment is performed, and the model training process is optimized through three strategies: shortcut connections, gradient pruning, and two-stage training. This improves the model's training efficiency and segmentation performance, achieving high-precision multi-level land resource segmentation and recognition. Compared with existing methods, this invention can solve the following problems:

[0047] 1) This invention constructs a technical framework based on the Transformer architecture, which uses its self-attention mechanism to capture global information, thereby solving the limitations of convolutional neural network-based segmentation methods in data relationship modeling and significantly improving the accuracy of land resource segmentation.

[0048] 2) This invention makes full use of pre-trained models through transfer learning technology, which can transfer and apply knowledge from computer vision and other fields to land resource segmentation tasks, effectively reducing the need for labeled data and solving the problem of high cost of acquiring labeled data.

[0049] 3) This invention designs an input alignment module to map and align the input features of the source domain and the target domain, reduce feature bias, solve the problem of low transfer efficiency caused by the difference in feature distribution between the source domain and the target domain, and improve the interpretation accuracy of the model.

[0050] 4) This invention optimizes the Transformer model training process through three strategies: quick connection, gradient pruning, and two-stage training. At the same time, it introduces an automated hyperparameter optimization strategy to effectively alleviate the gradient explosion or gradient vanishing problems that may occur during model training, improve the training efficiency of the model, and solve the problems of long training time and difficult process optimization of the Transformer architecture.

[0051] 5) This invention constructs a multi-level land resource task migration fine-tuning framework, which supports flexible application from coarse-grained segmentation tasks to fine-grained tasks, realizes multi-level semantic segmentation while further improving the segmentation accuracy of fine categories, and solves the problem of single segmentation level or single target in existing research.

[0052] The following is combined with Figure 3 The technical flow of the present invention, as shown, specifically explains the processing steps of the multi-level land resource segmentation and migration fine-tuning method with input alignment. The main steps are as follows:

[0053] Step 1: Collection and processing of remote sensing image data and label data related to the land resource segmentation task;

[0054] Determine the target study area and classification of land resource segmentation task, and acquire remote sensing image data and label data that can meet the task requirements based on the segmentation task objectives;

[0055] Data processing operations such as cloud contamination analysis, geometric correction, denoising and filtering, and image cropping are performed on remote sensing image data to improve data quality, reduce noise and errors, and provide an accurate, stable and reliable data foundation for subsequent model segmentation.

[0056] The labeled data is then compared with the remote sensing image data to check for accuracy and correct any errors. Finally, the data is filtered by category according to the task requirements to create the corresponding labeled dataset.

[0057] Step 2: Based on the task requirements and prior knowledge of the study area, select the sampling area and slice the remote sensing image data and label data;

[0058] Sampling areas are delineated by combining land resource distribution and terrain features to ensure that samples cover all areas and are evenly distributed in space, avoiding class imbalance and segmentation bias caused by local areas;

[0059] Then, the remote sensing image data and label data within the sampling area are sliced ​​into small blocks of fixed size as needed to facilitate subsequent model processing.

[0060] Step 3: Perform data augmentation to expand the dataset, and at the same time normalize the pixel values ​​of the remote sensing image data;

[0061] To enhance the robustness and adaptability of the model, data augmentation is performed through operations such as pruning, rotation, and scaling, which increases the diversity of samples while preserving key features;

[0062] Subsequently, the sample data is normalized to map it to a uniform numerical range, which helps improve the training efficiency and performance of the model.

[0063] Step 4: Divide the model dataset using stratified sampling techniques;

[0064] The sample data is grouped and sampled according to land resource type. Within each type, the sample dataset is divided into training and test sets in a 2:1 ratio to avoid the impact of class imbalance on model performance, while ensuring that there is enough training and test data for model fitting and model evaluation, respectively.

[0065] Step 5: Train the model based on the dataset obtained from the above operations:

[0066] The optimal initial learning rate is determined through hyperparameter optimization, an input alignment module is introduced to align input features, and a shortcut connection is made between the input alignment module and the model output.

[0067] Three Transformer architectures, namely Swin-Unet, SegFormer and DoubleSwinT, and their pre-trained models are used for land resource segmentation. Among them, the fine-grained land resource segmentation task will use the model weights saved from coarse-grained training as initial parameters.

[0068] Meanwhile, three strategies—gradient clipping and two-stage training—are employed to optimize the model training process.

[0069] For the above hyperparameter optimization, the approach is as follows: test three learning rate scheduling methods, namely polynomial, exponential and cosine annealing, and two optimizers, namely SGD and Adam; during the hyperparameter search process, adopt a coarse-to-fine approach, first setting a large interval to determine the general parameter trend, and then gradually narrowing the search range to accurately locate the optimal configuration.

[0070] For the above input feature alignment, the target domain input features are aligned with the source domain input features through linear or convolutional mapping, reducing the bias caused by differences in data features and improving the model's adaptability.

[0071] The shortcut connection between the input alignment module and the model output is specifically divided into the following: if the number of input bands matches the input in the source domain, then identity mapping is used; otherwise, a linear layer or convolutional layer is used for mapping, and its output can be represented as:

[0072] ,

[0073] in, The input matrix is ​​in the target domain. The logits vector is unstandardized. The output of the input alignment module, For identity or mapping weight matrix, For pre-trained Transformer.

[0074] Gradient clipping improves the stability of model training by restricting the gradient values ​​during model updates to fall within a fixed range.

[0075] Two-stage training refers to the process of training a model using a two-stage strategy, which gradually improves the model's ability to generalize to the target task.

[0076] In the first stage, the pre-trained encoder is frozen, and only the input alignment module and decoder of the model are trained. The optimization objective is:

[0077] ,

[0078] in, , It is a linear projection matrix. For linear detection bias, For model output, Indicates feature extraction ( This refers to the initial feature extractor, i.e., the pre-trained model. Indicates the first Feature extractor updated every cycle). Indicates the input alignment parameter. express The parameters, This represents the bias parameter of the linear probe layer. Represents the loss function;

[0079] In the second stage, the model from the first stage is retrained, and all parameters of the model are updated to adapt to the target task. The optimization objective is:

[0080] .

[0081] Step 6: After the model training is completed, save the model with the best accuracy and use it for segmentation prediction. Output the best segmentation prediction result for fine-tuning of land resource segmentation and migration, and visualize the output result.

[0082] In summary, the multi-level land resource segmentation and migration fine-tuning method with input alignment disclosed in this invention has the following innovative design features:

[0083] 1) This invention builds a transfer learning technology framework based on the Transformer architecture, which is suitable for multi-level land resource segmentation tasks. Compared with convolutional neural networks, it can fully capture the complex relationships and global dependencies in the data. It is an innovative application of the Transformer architecture and its pre-trained model in the field of land resource segmentation. At the same time, it can make full use of pre-training information from the fields of computer vision or other fields, improving the accuracy of the segmentation model while reducing the model's need for labeled data.

[0084] 2) This invention introduces an input alignment module to map the input representations between the source and target domains, reducing bias caused by differences in data features between the source and target domains, improving the utilization efficiency of pre-training information, enhancing the model's interpretation accuracy, and increasing the versatility of the pre-trained model across different domains. This is achieved by employing methods such as... Figure 2 The framework design shown here, which combines multi-level convolution with residual connections to achieve input alignment, is as follows:

[0085] The method of this invention introduces an input alignment module to reduce inconsistencies and biases when applying pre-trained models to remote sensing data with different spectral band configurations during transfer learning. For example... Figure 2 As shown, the input alignment module can serve as an adapter for any pre-trained Transformer, facilitating the completion of downstream remote sensing semantic segmentation tasks.

[0086] 3) This invention adds a shortcut connection between the input alignment module and the Transformer output. This design improves the active adaptability of the input registration module and is not affected by the complexity of the Transformer. It effectively alleviates the gradient explosion or gradient vanishing phenomenon during the fine-tuning process of the pre-trained Transformer and plays a key role in stabilizing the training process and promoting the effective learning of the input alignment module.

[0087] 4) This invention optimizes the training process of the Transformer model by adopting gradient pruning and a two-stage training strategy, thereby improving the model's performance on land resource segmentation tasks and effectively enhancing the model's training efficiency.

[0088] 5) This invention adopts a comprehensive optimization strategy for hyperparameters, performs partially automated learning rate scheduling and optimizer selection, and finally determines the optimal initial parameters, thereby improving the model convergence speed and computational efficiency, saving computational costs, and improving the semantic segmentation accuracy of the model.

[0089] 6) The multi-level land resource segmentation migration fine-tuning framework constructed in this invention is not limited to land resource segmentation tasks of a specific level or category. Through this framework, pre-trained models from different domains can be directly transferred and applied to coarse-grained and fine-grained land resource segmentation tasks, and the performance of the model on fine-grained segmentation tasks can be further improved based on the coarse-grained segmentation results.

[0090] Application example:

[0091] The following section provides a further explanation of the input-aligned multi-level land resource segmentation and migration fine-tuning method disclosed in this invention, using specific application examples.

[0092] This application example uses the land resource segmentation in Dongpo District, Meishan City, Sichuan Province, China as an example to illustrate the application and advantages of this invention patent. The research data consists of high-resolution satellite images of Jilin-1 collected in September-October 2022 and vector labeled data obtained through land surveys in 2022. The target categories for land resource segmentation include six types: cultivated land, forest land, transportation land, industrial land, commercial land, and public land.

[0093] Step 1: The target task was defined as the segmentation of six types of land resources in Dongpo District, Meishan City, Sichuan Province. High-resolution remote sensing imagery from Jilin-1, covering the study area in 2022, was acquired. The spatial resolution of the imagery was 1m. Geometric correction, image stitching, and cropping were performed on the imagery data to provide a reliable data foundation for subsequent model segmentation. Simultaneously, land survey data from 2022 was collected as labeled data. This data was in vector format and converted to raster data to maintain the same spatial resolution as the remote sensing imagery data. The labeled data was then overlaid and compared with the imagery data to check and correct the labeled data. Finally, labeled data for the six target types were selected to create a labeled dataset.

[0094] Step 2: Based on the image data and labeled dataset obtained in Step 1, and according to the land resource distribution and topographic features of the study area, select 6 suitable sampling areas ( Figure 4 While ensuring a sufficient number of samples, it is also necessary to maintain a balance in sample categories and spatial distribution. Then, the remote sensing image data and labeled data are cropped according to the selected sampling area, and the cropped data is sliced ​​into small blocks of 224×224 size for subsequent model training.

[0095] Step 3: Perform random rotation and scaling operations on the dataset obtained in Step 3 to augment the data and enhance sample diversity. Table 1 shows the number of samples in each type of training and test set. Furthermore, all sample data are normalized, mapping their pixel values ​​to the range [0,1].

[0096] Table 1. Number of samples for each type

[0097]

[0098] Step 4: Based on the sample dataset obtained in the above steps, stratified sampling is performed according to the six target land resource types. In each type, the samples are divided into training set and test set in a 2:1 ratio, and finally the training and test sample sets for each of the six target types are obtained.

[0099] Step 5: This study employs a binary classification strategy for land resource segmentation, training and predicting models separately for each target type. First, the optimizer and learning rate configuration are determined through hyperparameter optimization. Second, the pre-trained model weights are loaded as initial parameters, and an input alignment module is added and quickly connected to the model output. A two-stage training strategy is adopted, training models based on three Transformer architectures—Swin-Unet, SegFormer, and DoubleSwinT—and their pre-trained models, with gradient pruning performed during training. Finally, the model with the best accuracy is saved and used for prediction, outputting and visualizing the prediction results. Specific details are as follows:

[0100] 5.1 We tested three learning rate scheduling methods—polynomial, exponential, and cosine annealing—and two optimizers—SGD and Adam—and adopted a coarse-to-fine systematic approach to determine the optimal initial learning rate: the Swin-Unet and DoubleSwinT models both used the SGD optimizer with an initial learning rate of 0.01, and the learning rate was adaptively adjusted during model training; the SegFormer model used the Adam optimizer with an initial learning rate of 0.004.

[0101] 5.2 Based on three different Transformer architectures and their pre-trained models, convolutional mapping is performed to align the target domain features with the source domain features. The parameters of the input alignment module participate in the model training process.

[0102] 5.3 The Swin-Unet and SegFormer pre-trained models both have 3 input bands in the source domain, matching the input of the target task, therefore identity mapping is used for shortcut connections. The DoubleSwinT pre-trained model, however, has 13 input bands in the source domain and uses convolutional layers to implement shortcut connections. The parameters of the shortcut connection module are also updated and optimized during model training.

[0103] 5.4 In the first stage of model training, the model weights of the pre-trained encoder are frozen, and only the parameter weights of the decoder, input alignment, and shortcut connection modules are updated. The optimal model from the first stage is saved, and its weights are used as the initial parameters for the second stage of training. In the second stage, all parameters of the updated model are trained for final optimization, and the optimal model from the second stage is saved as the best segmentation model for that class for prediction. The number of iterations for both stages of training is set to 180.

[0104] 5.5 After system testing, the gradient pruning value for the Swin-Unet and DoubleSwinT architectures was determined to be 0.01, while that for the SegFormer architecture was 0.75.

[0105] Table 2 shows the accuracy of land resource segmentation. Figure 5 and Figure 6 This is a visualization of the Swin-Unet model's prediction results for various land resource types. Figure 5 and Figure 6 In the figure, the value represents the predicted MIoU of the image. The results show that the multi-level transfer fine-tuning method with input alignment of this invention can achieve high-precision land resource segmentation. Among them, the Swin-Unet model has the best interpretation accuracy, which can perform semantic segmentation of target features relatively completely and accurately, with good interpretation completeness and detail.

[0106] Table 2. Accuracy of Land Resource Segmentation

[0107]

[0108] In summary, the present invention has the following advantages:

[0109] 1) Based on the Transformer architecture, this invention constructs a transfer learning fine-tuning framework suitable for multi-level land resource segmentation tasks. It can make full use of the pre-trained models in the domain and the complex relationships and global dependencies in land resource data to improve the model segmentation accuracy, effectively solve the problem of high demand for labeled data, and further improve the fine-grained segmentation accuracy by leveraging the effective information learned by the model on coarse-grained land resource segmentation tasks.

[0110] 2) This invention adds an input alignment module before the encoder structure. This module is a linear or convolutional mapping and acts as an adapter in the fine-tuning process of any pre-trained model. It solves the problem of low transfer efficiency caused by feature differences between the source domain and the target domain, thereby improving the utilization efficiency of pre-trained model information and enhancing the model's task adaptability and cross-domain scalability.

[0111] 3) Regarding model training optimization, this invention combines three strategies: shortcut connections, gradient clipping, and two-stage training. First, a shortcut connection is established between the input alignment module and the model output to mitigate the adverse effects of gradient vanishing during fine-tuning of the pre-trained model. Second, gradient clipping effectively avoids gradient explosion or vanishing during model training. Finally, a two-stage training strategy is employed to improve the utilization efficiency of pre-trained encoding information: the first stage freezes the model's encoding layer, performs input alignment, and optimizes the model decoder; the second stage initializes the model with the weights obtained in the first stage, retrains the model, and updates all model parameters to adapt the model to the target task. The organic combination of these three optimization strategies improves the model's segmentation performance and training efficiency.

[0112] 4) This invention performs partially automated initial hyperparameter tuning and tests and compares two different optimizers. Regarding hyperparameter tuning, three learning rate schedulers (polynomial, exponential, and cosine annealing) are explored, and a systematic coarse-to-fine approach is adopted to gradually narrow down the range to accurately locate the optimal position. Simultaneously, partially automated parameter search scripts are developed to improve hyperparameter tuning efficiency.

[0113] [Terminology Explanation]

[0114] Land resource segmentation: This refers to the classification of land resources using semantic segmentation technology. Specifically, starting from the current status of land resources, and based on the regional differentiation patterns, uses, and utilization methods of land resources, semantic segmentation technology is used to divide the land resources of a country or region into several different land resource categories according to a certain hierarchical system.

[0115] Gradient clipping is an optimization technique that prevents gradient explosion or gradient vanishing. It scales or truncates the gradient during backpropagation to keep it within a reasonable range.

[0116] The above embodiments are not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the technical solution of the present invention are also within the protection scope of the present invention.

Claims

1. A multi-level land resource segmentation and migration fine-tuning method with input alignment, characterized in that: Includes the following steps: Step 1: Collection and processing of remote sensing image data and label data related to the land resource segmentation task; Step 2: Based on the task requirements and prior knowledge of the study area, select the sampling area and slice the remote sensing image data and label data; Step 3: Perform data augmentation to expand the dataset, and at the same time normalize the pixel values ​​of the remote sensing image data; Step 4: Divide the model dataset using stratified sampling techniques; Step 5: Train the model based on the dataset obtained from the above operations: The optimal initial learning rate is determined through hyperparameter optimization, an input alignment module is introduced to align input features, and a shortcut connection is made between the input alignment module and the model output. Three Transformer architectures, namely Swin-Unet, SegFormer and DoubleSwinT, and their pre-trained models are used for land resource segmentation. Among them, the fine-grained land resource segmentation task will use the model weights saved from coarse-grained training as initial parameters. Meanwhile, three strategies are adopted to optimize the model training process: gradient clipping with gradient value constraints and two-stage training. Step 6: After the model training is completed, save the model with the best accuracy and use the model to perform segmentation prediction. Output the best segmentation prediction result for fine-tuning of land resource segmentation and migration, and visualize the output result. In step five, the shortcut connection between the input alignment module and the model output is specifically divided into the following: if the number of input bands matches the input of the source domain, then an identity mapping is used; otherwise, a linear layer or a convolutional layer is used for mapping; its output can be expressed as: in, The input matrix is ​​in the target domain. The logits vector is unstandardized. The output of the input alignment module, For identity or mapping weight matrix, For pre-trained Transformer; In step five, the two-stage training refers to the two-stage strategy employed to perform the model training process, including: In the first stage, the pre-trained encoder is frozen, and only the input alignment module and decoder of the model are trained. The optimization objective is: in, , It is a linear projection matrix. For linear detection bias, For model output, Indicates feature extraction, Indicates the input alignment parameter. express The parameters, This represents the bias parameter of the linear probe layer. Represents the loss function; In the second stage, the model from the first stage is retrained, and all parameters of the model are updated to adapt to the target task. The optimization objective is: 。 2. The multi-level land resource segmentation and migration fine-tuning method with input alignment according to claim 1, characterized in that: In step one, the target research area and segmentation category of the land resource segmentation task are determined, and remote sensing image data and label data that can meet the task requirements are obtained according to the segmentation task objectives. The remote sensing image data undergoes data processing operations including cloud contamination analysis, geometric correction, denoising and filtering, and image cropping. The label data is overlaid and compared with the remote sensing image data to check whether the label data is correct and to correct any errors. Then, the categories are filtered according to the task requirements to create a labeled dataset.

3. The multi-level land resource segmentation and migration fine-tuning method with input alignment according to claim 1, characterized in that: In step two, the sampling area is delineated based on the distribution of land resources and terrain features, so that the samples can cover all areas and be evenly distributed in space; the remote sensing image data and label data within the sampling area are sliced ​​into small blocks of fixed size as needed.

4. The multi-level land resource segmentation and migration fine-tuning method with input alignment according to claim 1, characterized in that: In step three, the data augmentation operations include cropping, rotating, scaling, and normalizing the sample data to map it to a uniform numerical range.

5. The multi-level land resource segmentation and migration fine-tuning method with input alignment according to claim 1, characterized in that: In step four, the sample data is grouped and sampled according to the land resource type. Within each type, the sample dataset is divided into a training set and a test set at a ratio of 2:

1.

6. The multi-level land resource segmentation and migration fine-tuning method with input alignment according to claim 1, characterized in that: In step five, the hyperparameter optimization process involves testing three learning rate scheduling methods—polynomial, exponential, and cosine annealing—and two optimizers—SGD and Adam. During the hyperparameter search process, a coarse-to-fine approach is adopted, first setting a large interval to determine the general parameter trend, and then gradually narrowing the search range to accurately locate the optimal configuration.

7. The multi-level land resource segmentation and migration fine-tuning method with input alignment according to claim 6, characterized in that: The input feature alignment is achieved by aligning the target domain input features with the source domain input features through linear or convolutional mapping.

Citation Information

Patent Citations

  • Remote sensing image semantic segmentation method based on category interactive attention and perception fusion

    CN118736231A

  • Medical image segmentation method based on self-supervised pre-training and two-stage fine tuning training

    CN120431333A