A method and system for farmland plot segmentation based on semi-supervised learning

CN122473463BActive Publication Date: 2026-09-01WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610941845.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-09-01
Estimated Expiration
2046-06-29

AI Technical Summary

Technical Problem

然而,传统方法忽略了对这些拓扑信息的利用,难以识别紧密相邻田块的分界,导致地块粘连与边界混淆,无法满足高精度提取需求

Benefits of technology

(1)降低标注成本,实现大规模耕地监测:采用半监督学生-教师互学习架构,利用教师网络生成动态伪标签,并引入自适应分配权重模块(SAWM)动态调整无标签数据贡献,抑制噪声干扰,在显著减少标注样本需求的同时,更好地适应了大规模耕地监测需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122473463B_ABST
    Figure CN122473463B_ABST
Patent Text Reader

Abstract

This invention discloses a semi-supervised learning-based method and system for farmland plot segmentation, belonging to the field of intelligent interpretation of remote sensing images. Based on the ResNet34 architecture, the encoder incorporates an edge feature fusion module, dynamically fusing deep semantics and shallow edge features through a spatial attention mechanism, and preserving spatial constraints through residual connections. An edge enhancement module is designed, cascading multi-level attention maps to generate global edge features, which are then injected into the decoder to improve boundary extraction accuracy. In terms of training strategy, a student-teacher mutual learning framework is constructed, introducing a discriminator to distinguish between real and predicted distributions, and dynamically adjusting the contribution of unlabeled data through an adaptive weight allocation module. The loss function integrates cross-entropy, adversarial loss, and topological loss to optimize pixel accuracy, topological connectivity, and generalization ability. This method effectively reduces the network's dependence on pixel-level annotation, solving the problems of high data annotation costs and difficulties in large-scale application in farmland segmentation of remote sensing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent interpretation of remote sensing images, and in particular to a method and system for segmenting farmland plots based on semi-supervised learning. Background Technology

[0002] With the rapid development of high-resolution Earth observation technology, the ability to quickly and accurately acquire spatial distribution information of arable land plots using remote sensing imagery is of great significance for agricultural statistics, precision agriculture management, and land spatial planning. Traditional methods for arable land extraction mainly rely on manual visual interpretation. While this method offers high accuracy, it is time-consuming, labor-intensive, and highly susceptible to the subjective experience of interpreters, making it difficult to meet the needs of large-scale, high-frequency monitoring.

[0003] With the advancement of computer vision technology, traditional pixel-based classification methods (such as support vector machines and random forests) have been gradually applied to remote sensing image interpretation. However, these methods mainly rely on manually designed features (such as spectral and texture features). When faced with complex background interference in high-resolution images (such as shadows, clouds, and mixed pixels), their feature representation ability is limited, and they are prone to salt-and-pepper noise, making it difficult to obtain complete and connected farmland plots.

[0004] In recent years, deep learning technologies, represented by convolutional neural networks, especially fully convolutional networks and their variants (such as U-Net and DeepLab series), have made breakthrough progress in semantic segmentation tasks. Most existing deep learning-based methods for farmland extraction employ a fully supervised learning model, i.e., using large amounts of image data with pixel-level fine annotations for model training. While these methods perform well on specific datasets, they still face the following challenges in practical applications: First, the high cost of data annotation limits the scalable application of the model. Fully supervised learning heavily relies on massive amounts of labeled samples. For farmland parcel segmentation tasks, professionals are needed to annotate farmland in images at the pixel level. High-resolution images are rich in detail and have complex parcel boundaries, making the creation of high-quality pixel-level labels extremely costly in terms of manpower and time. Furthermore, the spectral characteristics of farmland vary greatly across different regions and seasons, limiting the model's generalization ability. Often, it is necessary to re-collect and re-label data for new regions or even new time periods, which restricts the practical application of deep learning techniques.

[0005] Secondly, existing methods have shortcomings in terms of boundary fineness and topological preservation. Standard codec networks are prone to losing spatial details during downsampling, resulting in problems such as inaccurate farmland plot boundary positioning and jagged edges. More importantly, existing methods are mostly based on pixel classification, neglecting the consideration of the global geometric structure and spatial topological constraints of the scene. The boundaries of farmland plots are often composed of linear features such as field ridges and rural roads, which spatially form isolation zones and topological boundaries between plots. However, traditional methods ignore the use of this topological information, making it difficult to identify the boundaries of closely adjacent plots, leading to plot adhesion and boundary confusion, and failing to meet the requirements of high-precision extraction.

[0006] Finally, the potential of semi-supervised learning in utilizing unlabeled data has not been fully explored. Although semi-supervised learning aims to improve model performance by using a small amount of labeled data and a large amount of unlabeled data, existing semi-supervised segmentation methods (such as those based on consistency regularization or pseudo-labels) often face problems such as low-quality pseudo-labels and noise accumulation when processing remote sensing images. In the context of farmland, my country's farmland is widely distributed and exhibits significant differences in morphology between the north and south (regular in the north, fragmented in the south). It is also susceptible to temporal changes and complex surface environmental interference. Simple semi-supervised strategies are prone to introducing erroneous supervisory signals, leading to a decline in the model's generalization ability.

[0007] In summary, the key issue that needs to be addressed is how to design a method for dividing farmland into plots that can effectively utilize unlabeled data to reduce labeling costs while also capturing precise edge details. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention provides a semi-supervised learning-based method for farmland plot segmentation. By constructing a semi-supervised learning framework, it makes full use of a small number of labeled remote sensing images and a large number of unlabeled remote sensing images, effectively improving the efficiency of model training while ensuring segmentation accuracy. This provides a feasible technical solution for extracting farmland information from large-scale remote sensing images.

[0009] This invention provides a method for dividing arable land parcels based on semi-supervised learning, comprising the following steps: Construct a sample library of remote sensing images of cultivated land plots; A semi-supervised learning-based farmland plot segmentation network model is constructed, comprising a student network, a teacher network, and a discriminator. The student and teacher networks have identical encoder-decoder structures. An edge feature fusion module is introduced into the encoder to generate enhanced feature maps with edge awareness. The decoder contains multiple upsampling units. Based on the enhanced feature maps, bilinear interpolation and convolution operations are used to gradually restore spatial resolution. An edge feature enhancement module is designed to generate a global edge feature map as input to the discriminator. The discriminator is located after the decoder of the student network and acts adversarially against the student network. A semi-supervised learning-based farmland plot segmentation network model is trained and optimized using a sample database of remote sensing images of farmland plots. The training and optimization include training the discriminator and joint optimization of the student network and the teacher network to obtain a well-trained student network. The remote sensing image to be segmented is input into the trained student network, and pixel-level farmland plot segmentation results are directly output through forward inference.

[0010] Furthermore, the specific processing procedure of the edge feature fusion module is as follows: Receive m multi-scale feature maps output by the encoder, where m is a constant; The feature map at scale m is upsampled using bilinear interpolation and then added pixel-by-pixel to the feature map at scale m-1. This is followed by convolutional smoothing to generate the feature map. ;Will After upsampling, the feature map at scale m-2 is added pixel by pixel, and then smoothed by convolution to generate... Repeat until generated. ; Output multi-scale fused feature map set .

[0011] Furthermore, the specific processing procedure of the edge feature enhancement module is as follows: Receive the output of the edge feature fusion module Adjust the scale of each feature map in the feature map set so that the scales of the m-1 feature maps are the same. Average pooling is used to smooth each feature map after it has been standardized to obtain the low-frequency background component. And extract its detailed response components. , where i is the level index; Will After processing through a convolutional layer and a sigmoid activation function, the output edge attention weight map is obtained. ; For each level, the attention weights are multiplied pixel-by-pixel by the uniformly sized feature map, and then the enhanced edge feature map is obtained through residual connections. ; The enhanced edge feature maps of m-1 levels are concatenated along the channel dimension to obtain a tensor. After convolution, the channels are compressed to 1 to generate the final global edge feature map. And use it as an edge enhancement injection feature for the decoder: .

[0012] Furthermore, the discriminator includes a downsampling convolutional module, a global average pooling layer, and a binary classification fully connected layer. The specific processing procedure is as follows: Receive raw images from a database of remote sensing images of cultivated land plots. And the prospect probability graph generated by the student network. , Segmentation probability graph output by student network The probability distribution of each pixel belonging to the foreground and background is obtained by using the Softmax operation, and then the foreground channel is extracted by slicing. The two inputs are processed by convolution to obtain feature maps. and ; feature map and Pixel-by-pixel addition yields the fused features. ; The fused features are sequentially passed through multiple convolutional layers, each followed by a Leaky ReLU activation function, progressively reducing the resolution and increasing the number of channels to obtain... ; Will Feature vectors are obtained through adaptive max-pooling compression. and will Input to a fully connected layer, output the binary log odds z. It is used to determine whether the input comes from a labeled image (positive class) or an unlabeled image (negative class). Corresponding positive class score, The corresponding negative score has a range of values. Finally, the probability of belonging to the positive class is obtained by the Softmax function. : ; Among them, probability Used for loss calculation.

[0013] Furthermore, the semi-supervised learning-based farmland plot segmentation network model also includes an adaptive weight allocation module, which acts between the teacher network output and the student network loss function, specifically including: Establish two independent category confidence memories, initially empty, with the labeled category confidence memory as follows: It is used to store the segmentation probability vectors of each category of pixels in labeled images by the student network; the unlabeled category confidence memory is... It is used to store the segmentation probability vectors of pixels of each class in unlabeled images predicted by the teacher network; each memory is used for each class. Maintain a capacity of A first-in, first-out queue, which stores probability vectors downsampled to a certain resolution. Wherein, the probability vector of the student network is The probability vector of the teacher network is ; Ranking ratio calculation: Assume the original resolution of the teacher network output. The percentage of rankings with tags is from Medium category Random sampling in the queue probability vectors If the queue length is insufficient Then fill with a zero vector and calculate the current confidence level. The proportion of samples with similar confidence levels greater than the proportion of samples with similar confidence levels: , in The pseudo-label category in the sampling vector Confidence level, For indicator functions; The proportion of unlabeled rankings from Medium category Random sampling in the queue A probability vector, if the queue length is insufficient Then fill with zero vectors and calculate the unlabeled ranking ratio: , in The pseudo-label category in the sampling vector Confidence level value; The original weight of each pixel is obtained by weighting and fusing the two ranking ratios: , in As a balance factor; Calculate the final pixel-level weights and output the weight map. Used to calculate weighted pseudo-label loss: , in, This represents the current iteration step. This represents the total number of iterations. For temperature parameters, This is the scale parameter.

[0014] Furthermore, the processing procedure of the semi-supervised learning-based farmland plot segmentation network model is as follows: The training set from the remote sensing image sample database of cultivated land plots was divided into labeled and unlabeled subsets. Labeled images and their corresponding ground truth labels, along with unlabeled images, were input into both the student and teacher networks for forward inference. The labeled images were... The truth label is Unlabeled images are ; Labeled and unlabeled images are first processed by an encoder to extract features from the input images. Each residual block generates multiple sets of feature maps at different scales. The generated feature maps at different scales are input into the edge feature fusion module to generate a multi-scale fused feature map; The multi-scale fused feature map output by the edge feature fusion module is fed into the edge feature enhancement module to generate the final edge feature map. ; The decoder processes the multi-scale feature maps generated by the encoder, and the edge feature maps generated by the edge feature enhancement module. Perform upsampling and feature reconstruction to output a segmentation probability map. ;right The final segmentation result is obtained by taking the maximum index along the channel direction. In this context, a pixel value of 0 represents the background, and 1 represents the target region; the segmentation probability map output by the student network on the labeled image is denoted as... The segmentation probability map output on the unlabeled image is denoted as . The segmentation probability map output by the teacher network on the labeled image is denoted as . The segmentation probability map output on the unlabeled image is denoted as . .

[0015] Furthermore, the training process for the discriminator is as follows: Original image with label Student network prediction results for labeled images Foreground probability plot As positive samples, the unlabeled original image Student network prediction results for unlabeled images Foreground probability plot As negative samples, they are all input into the discriminator. The discriminator label for positive samples is set to 1, and the discriminator label for negative samples is set to 0. Freeze the student network and teacher network, input the labeled and unlabeled images of the current batch and the corresponding predicted foreground images of students into the discriminator, and output the probability of the positive class. ; The discriminator loss is calculated as the sum of the cross-entropies of all labeled and unlabeled samples: ,in, and These represent the set of labeled images and the set of unlabeled images in the current training batch, respectively. The backpropagation function is called to perform gradient calculation, which, based on the automatic differentiation mechanism, uses a loss scalar. Starting from the discriminator network, we traverse all trainable parameters in reverse along the computation graph of the discriminator network, apply the chain rule layer by layer to calculate the gradient of the loss function with respect to each parameter, and store the obtained gradient values ​​in the gradient buffer of the corresponding parameter, so as to provide accurate numerical basis for the subsequent discriminator optimizer to perform parameter updates. The Adam optimizer is invoked to perform gradient descent updates, and the parameters of the discriminator network are adjusted accordingly to minimize the discriminator loss. This enhances the discriminator's ability to distinguish between labeled and unlabeled sample predictions; at this point, the discriminator has completed one iteration of training. The gradient calculation of all parameters in the student network and teacher network is reset to the enabled state to ensure that the partial derivatives of the loss function with respect to each parameter can be calculated normally during the subsequent generator training process, thereby realizing the joint optimization of the student network and teacher network.

[0016] Furthermore, training optimization also includes updating the adaptive weight allocation module and calculating pixel-level weights, the specific implementation process of which is as follows: Initialize the adaptive weight allocation module memory: The adaptive weight allocation module establishes two independent class confidence memory libraries, including a label class confidence memory library. Initially empty, used to store the segmentation probability vectors of pixels of each category in labeled images; unlabeled category confidence memory. Initially empty, it is used to store the segmentation probability vectors of pixels of each class in the unlabeled image predicted by the teacher network; each memory is for each class. Maintain a capacity of The queue follows the first-in, first-out (FIFO) rule; Update the labeled memory for the current batch of labeled samples: extract the segmentation probability map from the student network output. By downsampling to a certain resolution using bilinear interpolation, we obtain ; Traversal Each pixel position in Read its true category and its corresponding probability vector ;Will Store in a tagged memory bank Medium category At the end of the queue, if the queue length exceeds If so, then remove the head vector of the queue; Update the unlabeled memory for the current batch of unlabeled samples: using the segmentation probability graph output by the teacher network. Calculate pseudo-labels ;Will and By downsampling to a certain resolution using bilinear interpolation, we obtain and ; Traversal and Each pixel position Read its corresponding probability vector and its pseudo-labels ;Will Store in untagged memory Medium category At the end of the queue, if the queue length exceeds If so, then remove the head vector of the queue; Calculate the weight of each pixel in the unlabeled image: Obtain the raw resolution probability vector from the teacher network output. and its pseudo-labels ;from and Random sampling from each Calculate the probability vectors of the same type; calculate the ranking ratio. and The original weights of each pixel are obtained by weighted fusion. The original weights of each pixel are subjected to a non-linear transformation to obtain the final weights. ; Output weight map: Combine the calculated weights of each pixel into a weight map. .

[0017] Furthermore, the joint optimization of student and teacher networks specifically includes: Construction of the total loss function for the student network: The total loss function for the student network It consists of four parts: supervised segmentation loss, weighted pseudo-label loss, edge topology loss, and adversarial loss, expressed as: ; Supervised loss segmentation Only for labeled images and its real label Calculate the cross-entropy loss: ,in Indicates the student network at pixel location Predicted as category The probability, This represents the set of labeled images in the current training batch; Weighted pseudo-label loss The pseudo-labels generated by the teacher network guide the student network, and a weight map is formed by combining the weights of each pixel. Weighted cross-entropy loss, pseudo-labels loss function ,in, For adaptive weights, The original, unlabeled image. This represents the set of unlabeled images in the current training batch. This represents the prediction results of the student network for unlabeled images; A simplified topology loss function is employed, which penalizes topology errors by comparing the connectivity and endpoint features of the segmentation results with the true labels. , This is the topology loss function; Adversarial loss function The discriminator was used to evaluate the student network's predictions on unlabeled images: ,in The prospect probability graph output for the student network. This determines the probability that the input belongs to a labeled sample for the discriminator. Backpropagation and parameter update of student network: After the total loss is calculated, the historical gradients in the optimizer are cleared first, and then the gradients of each parameter are calculated by backpropagation and the gradients are clipped to prevent gradient explosion. Then, the Adam optimizer is used to perform a gradient descent update according to the learning rate corresponding to the current iteration step to minimize the total loss. Teacher network exponential moving average update: After the student network parameters are updated, the teacher network is synchronized using the exponential moving average of the student network parameters to provide a stable and consistent learning objective.

[0018] The present invention also provides a farmland plot segmentation system based on semi-supervised learning, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the farmland plot segmentation method based on semi-supervised learning as described in the above technical solution.

[0019] One or more technical solutions provided in this invention have at least the following technical effects or advantages: (1) Reduce labeling costs and realize large-scale farmland monitoring: A semi-supervised student-teacher mutual learning architecture is adopted, dynamic pseudo-labels are generated by the teacher network, and an adaptive weight allocation module (SAWM) is introduced to dynamically adjust the contribution of unlabeled data and suppress noise interference. While significantly reducing the need for labeled samples, it better adapts to the needs of large-scale farmland monitoring.

[0020] (2) Accurate extraction of farmland plot boundaries by utilizing edge and topology information: The edge feature fusion module (EFM) dynamically fuses shallow and deep features, and the edge enhancement module (EEM) generates global edge features to guide the network to focus on boundary information during the decoding process; the topology loss created by the topology features constrains the connectivity of the segmentation results, which significantly improves the continuity and segmentation accuracy of farmland plot boundaries.

[0021] (3) Introduce adversarial learning mechanism to improve robustness in complex scenarios: On the basis of semi-supervised framework, introduce discriminator to perform domain discrimination on the distribution of segmentation map output by student network, identify the distribution difference between predicted segmentation map and real label map, so that student network generates segmentation results that are closer to the real distribution, thereby enhancing the robustness of model to complex backgrounds (such as shadows and building interference) and improving the feature separability of cultivated land and non-cultivated land categories. Attached Figure Description

[0022] Figure 1 This is a structural diagram of a farmland plot segmentation network model based on semi-supervised learning, according to an embodiment of the present invention.

[0023] Figure 2 This is a structural diagram of the Edge Feature Fusion Model (EFM) module according to an embodiment of the present invention.

[0024] Figure 3 This is a structural diagram of the Edge Enhancement Model (EEM) according to an embodiment of the present invention.

[0025] Figure 4 This is a structural diagram of the Self-adaptive Assignment WeightModel (SAWM) module according to an embodiment of the present invention.

[0026] Figure 5 This is a comparison diagram of the farmland plot segmentation results of the embodiments of the present invention and existing semi-supervised classification networks (MCSS, DWL), where (a)-(e) represent farmland plots under different scenarios. Detailed Implementation

[0027] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.

[0028] This invention provides a method for dividing arable land parcels based on semi-supervised learning, comprising the following steps: (1) Construction of a sample database of remote sensing images of cultivated land plots.

[0029] (2) Construction of a semi-supervised learning-based farmland segmentation network model. A semi-supervised segmentation network consisting of a student network, a teacher network, and a discriminator was constructed. The student network and the teacher network have the same structure, using ResNet34 as the encoder backbone. An Edge Feature Fusion Model (EFM) was introduced to dynamically fuse deep semantics and shallow edge features, and an Edge Enhancement Model (EEM) was designed to generate global edge features by cascading multi-level attention maps. The decoder gradually restores spatial resolution through upsampling and injects edge features from the EEM output to improve boundary extraction accuracy. The discriminator consists of a downsampling convolutional module, a global average pooling layer, and a binary classification fully connected layer, used to distinguish the distribution differences between the predicted segmentation map and the real label map.

[0030] (3) Training and optimization of the farmland plot segmentation network model based on semi-supervised learning. This involves using student... The teacher-interactive learning framework utilizes a small number of labeled images and a large number of unlabeled images for joint training. During training, the discriminator receives predicted foreground images from both labeled and unlabeled images, along with the original image, and performs adversarial training using cross-entropy loss. Simultaneously, a Self-adaptive Assignment Weight Model (SAWM) module is introduced to dynamically calculate the confidence weights of unlabeled pixels to weight the pseudo-label loss. The total loss function includes supervised cross-entropy loss, weighted pseudo-label loss, topological loss, and adversarial loss. The student network updates parameters via backpropagation and the Adam optimizer, while the teacher network synchronizes parameters from the student network using Exponential Moving Average (EMA), iteratively training until the model converges.

[0031] (4) Segmentation of farmland plots in remote sensing images. The remote sensing image to be segmented is input into the trained student network, and the pixel-level farmland plot segmentation result map is directly output through forward inference. The map clearly distinguishes farmland from non-farmland. The result can be used for tasks such as land use management, natural resource survey, ecological environment analysis and agricultural monitoring. The model has good scalability and can be fine-tuned to adapt to other land feature segmentation scenarios.

[0032] The specific implementation method for each step is explained in detail below: (1) Construction of a remote sensing image sample database of cultivated land plots: Optical remote sensing images containing a large number of cultivated land plots were acquired from the Gaofen-2 (GF-2) and Jilin-1 satellites. First, the original images were preprocessed, including radiometric calibration, atmospheric correction, and geometric fine correction. Then, samples were created by removing invalid background areas from the images and using a sliding window strategy to crop the effective image areas into 512×512 pixel image blocks. The cultivated land plots in the image blocks were then labeled at the pixel level using professional annotation tools, thereby constructing a cultivated land plot sample dataset to provide data support for subsequent model training. Finally, the constructed dataset was divided into training, validation, and test sets according to a preset ratio, which were used for iterative optimization of model parameters, adjustment of hyperparameters, and objective evaluation of generalization performance, thereby improving the overall accuracy of cultivated land plot segmentation.

[0033] As a preferred embodiment, the sample library construction of the embodiment specifically includes the following sub-steps: 1) First, regarding the acquisition of high-resolution remote sensing images of cultivated land plots, this invention emphasizes acquiring remote sensing images containing a large number of cultivated land plots to ensure that the model can obtain rich cultivated land plot samples in subsequent training.

[0034] 2) After acquiring the image, preprocessing steps such as radiometric calibration, atmospheric correction, and geometric fine correction need to be performed in sequence to eliminate radiometric distortion and geometric distortion during the imaging process and ensure data quality.

[0035] 3) After preprocessing, invalid background areas need to be removed first. Then, the effective area is divided into 512×512 pixel image blocks based on the sliding window strategy. Subsequently, the cultivated land blocks in the image are labeled at the pixel level using professional annotation tools. Finally, a cultivated land block sample dataset is constructed to provide data support for subsequent model training and result analysis.

[0036] 4) Based on the actual needs of model training, the dataset is divided into training, validation, and test sets proportionally. The training set is used for model parameter fitting and feature learning, the validation set is used to monitor model training performance and guide parameter tuning, and the test set is used for performance evaluation after training. This division method avoids the risks of overfitting and underfitting while ensuring the model's stability on different datasets.

[0037] (2) Construction of a farmland plot segmentation network model based on semi-supervised learning: This invention designs a novel network structure. For example... Figure 1As shown, the system comprises two identical segmentation networks: a discriminator network and an adaptive weight allocation module (SAWM). The two segmentation networks employ a student-teacher dual-path architecture, sharing the same weight parameters during initialization. During training, the teacher network parameters are updated using an exponential moving average mechanism, generating a low-variance moving average estimate of the student network parameters, thus constructing a stable knowledge distillation framework. The encoder of the segmentation network consists of a feature extractor with a ResNet34 backbone and an edge feature fusion module (EFM) to generate enhanced feature maps with edge awareness. The decoder contains multiple upsampling units, using bilinear interpolation and convolution operations to progressively restore spatial resolution. Simultaneously, it injects enhanced edge features output from the edge feature enhancement module (EEM) to ensure clear geometric contours are preserved while extracting the main information of farmland plots. The discriminator, located after the decoder of the student network, consists of three cascaded downsampling convolutional modules, a global average pooling layer, and a binary classification fully connected layer. It downsamples the features extracted by the student network and outputs a probability value to determine whether the input data comes from a labeled or unlabeled image. This discriminator acts adversarially against the student network to improve the reliability of the pseudo-labels generated by the student network and guide supervision between segmentation networks. The SAWM module operates between the output of the teacher network and the loss function of the student network. By dynamically evaluating the confidence of the pseudo-labels generated by the teacher network, it generates pixel-level adaptive weights to weight the unsupervised learning part of the student network, thereby improving the efficiency of pseudo-label utilization. For a detailed implementation of ResNet34, please refer to the relevant literature: He K, Zhang X, Ren S, et al. Deep Residual Learning for Image Recognition[J].IEEE, 2016.DOI:10.1109 / CVPR.2016.90. The following focuses on the edge feature fusion module (EFM), edge enhancement module (EEM), discriminator structure, and adaptive weight allocation module (SAWM) proposed in this invention. These modules work together to effectively improve the representation capability of deep features, providing support for generating more accurate farmland plot segments. This innovative design provides a reliable technical foundation for remote sensing image analysis.

[0038] This invention designs an edge feature fusion module (EFM) for dynamically fusing multi-scale feature maps output by a ResNet34 encoder to construct a feature pyramid with strong semantic information.

[0039] As a preferred embodiment, the detailed structure of the edge feature fusion module (EFM) proposed in the embodiment is as follows: Figure 2 As shown, the specific steps for the feature within this structure are as follows: A1) Receive the four sets of feature maps output by the encoder: , , and .

[0040] A2) will Perform bilinear interpolation upsampling to ,and Pixel-by-pixel summation, followed by 3×3 convolution for smoothing, generates ;Will Upsampling to ,and Pixel-by-pixel addition, followed by 3×3 convolution for smoothing, generates ;Will Upsampling to ,and Pixel-by-pixel addition, followed by 3×3 convolution for smoothing, generates .

[0041] A3) Output multi-scale fused feature map set .

[0042] This invention designs an edge enhancement module (EEM) to extract multi-level edge attention maps from the multi-scale feature maps output by EFM, and generates global edge features through cascaded fusion, which are then injected into the decoder to enhance the extraction accuracy of farmland plot boundaries. This module effectively solves the problems of inaccurate boundary positioning, jagged edges, and adhesion of adjacent plots caused by the loss of spatial details during downsampling in standard codec networks.

[0043] As a preferred embodiment, the detailed structure of the edge feature enhancement module (EEM) proposed in the embodiment is as follows: Figure 3 As shown, the specific steps for the feature within this structure are as follows.

[0044] B1) Receive EFM output ,Will Bilinear interpolation upsampling to ,generate and Make the two and The spatial dimensions are consistent.

[0045] B2) Feature map after each uniform size , and Average pooling is used for smoothing to obtain the low-frequency background component. Subsequently, , and respectively with , and Perform pixel-by-pixel subtraction to extract its detail response components. This component is rich in high-frequency edge and texture information.

[0046] B3) will After a 3×3 convolutional layer and Sigmoid activation function Process and output the edge attention weight map: .

[0047] B4) For each level, the attention weights are... , , After pixel-by-pixel multiplication, the enhanced edge feature map is obtained through residual connections: ; ; ; in, This indicates pixel-by-pixel multiplication.

[0048] B5) Enhance the feature maps of the three levels , and By splicing along the channel dimension, we obtain... The tensor is then subjected to a 1×1 convolution operation to compress the channels to 1, generating the final global edge feature map. And use it as an edge enhancement injection feature for the decoder: ; This invention introduces a discriminator to distinguish whether the segmentation predictions of the student network come from labeled images (positive class) or unlabeled images (negative class) during semi-supervised training. This forces the student network to output segmentation results that more closely approximate the true distribution through adversarial learning. This discriminator effectively solves the problems of pseudo-label noise accumulation and poor robustness to complex backgrounds in traditional semi-supervised methods. As a preferred embodiment, the specific steps of the feature within the discriminator are as follows.

[0049] C1) receives two inputs: the original image Foreground probability graph generated by student network .in, Segmentation probability graph output by student network The Softmax operation is used to obtain the probability distribution of each pixel belonging to the foreground and background, and then the foreground channel is extracted through slicing. ; in, This indicates retrieving all elements along a specific dimension. C2) The two inputs are each processed through a 3×3 convolution operation to obtain feature maps: ; ; C3) Feature map and Pixel-by-pixel addition yields the fused feature: ; C4) The fused features are sequentially passed through four 3×3 convolutional layers with a stride of 2, each followed by a LeakyReLU activation function, gradually reducing the resolution and increasing the number of channels: , , , .

[0050] C5) will The feature vector is obtained by compressing it to a size of 128×1×1 using adaptive max pooling. and will Input to a fully connected layer, output the binary log odds z. It determines whether the input comes from a labeled image (positive class) or an unlabeled image (negative class). Corresponding positive class score, The corresponding negative score has a range of values. Finally, the probability of belonging to the positive class (with a label) is obtained using the Softmax function: ; This probability value is calculated using adversarial loss, enabling the student network to generate segmentation results that more closely approximate the true distribution.

[0051] This invention proposes an Adaptive Weight Assignment Module (SAWM) that operates between the teacher network output and the student network loss function. It is used to dynamically evaluate the confidence of each pixel prediction in an unlabeled image and generate pixel-level weights to weight the pseudo-label loss, thereby suppressing the negative impact of low-quality pseudo-labels.

[0052] As a preferred embodiment, the detailed structure of the Adaptive Weight Allocation Module (SAWM) proposed in the embodiment is as follows: Figure 4 As shown, the specific steps for the feature within this structure are as follows.

[0053] D1) Create two independent category confidence memories, initially empty. The labeled category confidence memory is... It is used to store the segmentation probability vectors of each category of pixels in labeled images by the student network; the unlabeled category confidence memory is... This is used to store the segmentation probability vectors of pixels in unlabeled images, predicted by the teacher network for each class. Each memory is used for each class. Maintain a capacity of The first-in-first-out queue stores probability vectors downsampled to 64×64 resolution. Wherein, the probability vector of the student network is The probability vector of the teacher network is .

[0054] D2) Ranking Proportion Calculation. Assume the original resolution of the teacher network output. The percentage of tags in the ranking is from... Medium category Random sampling in the queue probability vectors (If the queue length is insufficient) (Then fill with the zero vector) and calculate the current confidence level. The proportion of samples with similar confidence levels greater than the proportion of samples with similar confidence levels: , in The pseudo-label category in the sampling vector Confidence level, This is an indicator function.

[0055] The proportion of unlabeled rankings from Medium category Random sampling in the queue A probability vector (if the queue length is insufficient) Calculate the unlabeled ranking ratio by filling with zero vectors: , in The pseudo-label category in the sampling vector The confidence level value.

[0056] D3) The two ranking ratios are weighted and merged to obtain the original weight of each pixel: , in It is a balancing factor.

[0057] D4) Calculate the final pixel-level weights and output the weight map. Used for subsequent weighted pseudo-label loss: , in, This represents the current iteration step. The total number of iterations, temperature parameter Scale parameters .

[0058] (3) Training and optimization of the farmland plot segmentation network model based on semi-supervised learning, including: Data input forward propagation: E1) The training set is divided into labeled and unlabeled subsets. Labeled images and their corresponding ground truth labels, along with unlabeled images, are input into both the student and teacher networks for forward inference. The labeled images are... The truth label is Unlabeled images are .

[0059] E2) Labeled and unlabeled images are first processed by the feature extraction network ResNet34, to... For example, ResNet34 extracts features from the input image, and each residual block generates five sets of feature maps at different scales. , , , and The five sets of features are of different sizes. , and It contains a wealth of spatial details. and It contains a wealth of semantic information.

[0060] E3) The feature maps generated by ResNet34 , , and The input is fed into EFM, and multi-scale fused feature maps are generated according to the specific steps of the features within the EFM structure. These feature maps preserve the semantic information of deep networks while also incorporating the spatial details of shallow networks.

[0061] E4) The feature map output by the EFM module , and The data is fed into the EEM module, where it is processed according to the specific steps within the EEM structure to generate the final edge feature map. The edge feature map output by the EEM module not only retains the multi-scale semantic information fused by the EFM module, but also significantly enhances the feature responses of its edge and texture parts, making them sharper and clearer.

[0062] E5) decoder generates multi-scale feature maps from ResNet34 , , , and and the edge feature map generated by the EEM module. Perform upsampling and feature reconstruction to output a segmentation probability map. ;right The final segmentation result is obtained by taking the maximum index along the channel direction. In this diagram, a pixel value of 0 represents the background, and a value of 1 represents the target region. The segmentation probability map output by the student network on the labeled image is denoted as... The segmentation probability map output on the unlabeled image is denoted as . The segmentation probability map output by the teacher network on the labeled image is denoted as . The segmentation probability map output on the unlabeled image is denoted as . .

[0063] Discriminator training: F1) will display the original image with labels. Student network prediction results for labeled images Foreground probability plot As positive samples, the unlabeled original image Student network prediction results for unlabeled images Foreground probability plot As negative samples, they are input into the discriminator. The discriminator label for positive samples is set to 1, and the discriminator label for negative samples is set to 0.

[0064] F2) Freeze the student and teacher networks, and input the labeled and unlabeled images of the current batch, along with the corresponding predicted foreground images of students, into the two-branch discriminator. The discriminator outputs the probability of the positive class according to the specific steps of the features within the discriminator structure. .

[0065] F3) Calculate the discriminator loss, which is defined as the sum of the cross-entropies of all labeled and unlabeled samples: ,in, and These represent the set of labeled images and the set of unlabeled images in the current training batch, respectively.

[0066] F4) Calls the backpropagation function to perform gradient calculation, based on the automatic differentiation mechanism, using the loss scalar. Starting from the discriminator network, the algorithm iterates backward along the computation graph of the discriminator network, traversing all trainable parameters. Layer by layer, the chain rule is applied to calculate the gradient of the loss function with respect to each parameter, and the resulting gradient values ​​are stored in the gradient buffer of the corresponding parameter. This provides accurate numerical basis for the subsequent parameter updates performed by the discriminator optimizer.

[0067] F5) Invoke the Adam optimizer to perform gradient descent updates, adjusting the parameters of the discriminator network accordingly to minimize the discriminator loss. This enhances the discriminator's ability to distinguish between labeled and unlabeled sample predictions. At this point, the discriminator has completed one iteration of training.

[0068] F6) Resets the gradient calculation of all parameters in the student network and teacher network to the enabled state to ensure that the partial derivatives of the loss function with respect to each parameter can be calculated normally during the subsequent generator training process, thereby realizing the joint optimization of the student network and teacher network.

[0069] SAWM update and pixel-level weight calculation: G1) Initialize the SAWM memory. SAWM establishes two independent class confidence memories, including a labeled class confidence memory. Initially empty, used to store the segmentation probability vectors of pixels of each category in labeled images; unlabeled category confidence memory. Initially empty, this memory stores the segmentation probability vectors of pixels in unlabeled images, predicted by the teacher network for each class. Each memory is configured for each class. Maintain a capacity of The queue follows the first-in, first-out (FIFO) rule.

[0070] G2) Update the labeled memory for the current batch of labeled samples. (This refers to the segmentation probability graph output by the student network.) Downsampling to 64×64 resolution via bilinear interpolation yields... ; Traversal Each pixel position in Read its true category and its corresponding probability vector ;Will Store in a tagged memory bank Medium category At the end of the queue, if the queue length exceeds If so, then remove the head vector of the queue.

[0071] G3) Updates the unlabeled memory for the current batch of unlabeled samples. Utilizes the segmentation probability graph output by the teacher network. Calculate pseudo-labels ;Will and Downsampling to 64×64 resolution via bilinear interpolation yields... and ; Traversal and Each pixel position Read its corresponding probability vector and its pseudo-labels ;Will Store in untagged memory Medium category At the end of the queue, if the queue length exceeds If so, then remove the head vector of the queue.

[0072] G4) Calculate the weight of each pixel in the unlabeled image. Obtain the raw resolution probability vector output by the teacher network. and its pseudo-labels ;from and Random sampling from each Calculate the probability vectors of the same type; calculate the ranking ratio. and The original weights of each pixel are obtained by weighted fusion. The original weights of each pixel are subjected to a non-linear transformation to obtain the final weights. .

[0073] G5) Output weight map. Combine the calculated weights of each pixel into a weight map. This is used for the weighted pseudo-label loss in subsequent student network joint optimization.

[0074] Joint optimization of student and teacher networks: H1) Construction of the total loss function for the student network. The total loss function for the student network. It consists of four parts: supervised segmentation loss, weighted pseudo-label loss, edge topology loss, and adversarial loss, expressed as: .

[0075] Supervised loss segmentation Only for labeled images and its real label Calculate the cross-entropy loss: ,in Indicates the student network at pixel location Predicted as category The probability of.

[0076] Weighted pseudo-label loss The pseudo-labels generated by the teacher network guide the student network, and the weights of each pixel obtained by C6 are combined to form a weight map. Weighted cross-entropy loss, pseudo-labels loss function ,in, The adaptive weights output by C5.

[0077] A simplified topology loss function is employed, which penalizes topology errors by comparing the connectivity and endpoint features of the segmentation results with the true labels. , The topology loss function is calculated as follows: ① Calculate the gradient magnitude and apply it to the prediction map. and real labels Calculate the horizontal gradient using the Sobel operator. and vertical gradient The Sobel convolution kernel is defined as: , ; Gradient components are obtained through convolution operations: , , , , Calculate the gradient magnitude: , ,in, ; ② Calculate gradient consistency loss: ; ③ Binarize the gradient magnitude to obtain edge information: , And calculate the edge loss: .

[0078] ④ Averaging the gradient consistency loss and the edge continuity loss yields the topological loss: ; Adversarial loss function The discriminator was used to evaluate the student network's predictions on unlabeled images: ,in The prospect probability graph output for the student network. This determines the probability that the input belongs to a labeled sample in the discriminator.

[0079] H2) Backpropagation and parameter update of the student network. After calculating the total loss, the system first clears the historical gradients in the optimizer, then backpropagates to calculate the gradients of each parameter and prunes the gradients to prevent gradient explosion. Subsequently, the Adam optimizer is used to perform a gradient descent update based on the learning rate corresponding to the current iteration step to minimize the total loss.

[0080] H3) Teacher network exponential moving average update. After the student network parameters are updated, the teacher network does not update via gradient descent, but instead uses the exponential moving average (EMA) of the student network parameters for synchronization to provide a stable and consistent learning objective. For a detailed implementation of EMA, please refer to the relevant literature: Tarvainen A, Valpola H. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results[J].2017.DOI:10.48550 / arXiv.1703.01780. H4) Iterative Process. After completing the above steps, the current training iteration ends. The system updates the iteration count and repeats the discriminator training, adaptive weight calculation, student network joint optimization, and teacher network update process until the preset maximum number of iterations of 200 is reached. Through this joint optimization strategy, the student network gradually improves its segmentation accuracy under the combined effects of labeled data supervision, adaptive weighted pseudo-labels, topological constraints, and adversarial learning. The teacher network provides stable pseudo-labels and consistency objectives through EMA. Together, they achieve high-precision farmland parcel segmentation model training using only a small amount of labeled data.

[0081] (4) Farmland Plot Segmentation from Remote Sensing Images: The farmland plot segmentation model obtained through training and its optimal weight parameters ensure the performance stability and segmentation accuracy in subsequent applications. In practice, users only need to input the remote sensing image data to be processed into the student network to automatically generate a high-precision farmland plot segmentation result map.

[0082] like Figure 5As shown, the segmentation results generated by the method of this invention have clear edges and complete main bodies, which can effectively cope with the complex scenarios of scattered and fragmented plots in the south and regular large fields in the north. The prediction results of MCSS (Multiple perturbation dynamicconsistency with Class prototype memory for Semi-supervised RS semanticsegmentation method) have obvious boundary ambiguity problems. The boundary lines between some plots are incorrectly connected or missing, making it difficult to distinguish adjacent plots. In addition, for small or irregularly shaped plots, MCSS is prone to missed detection and misclassifies them as background. Although the prediction results of DWL (Multiple perturbation dynamicconsistency with Class prototype memory for Semi-supervised RS semanticsegmentation method) have good overall integrity, there are many misclassified pixels at the boundary between farmland and background (such as bare soil and roads). Some background areas are incorrectly marked as farmland, while some farmland has cavities or cracks. Furthermore, the extraction results show that this method achieves a pixel accuracy (PA) of 91.32% and a mean intersection-union ratio (mIoU) of 83.58% using only 20% of the labeled samples. The segmented map extracted by this invention can not only be directly used for thematic mapping but also support analytical tasks such as land use management, natural resource surveys, and ecological environment analysis. Experiments demonstrate that this invention significantly reduces the cost of manual annotation while achieving high-precision extraction of cultivated land parcels and possesses good scalability.

[0083] Building upon this foundation, the segmentation model of this invention also possesses high efficiency and scalability. It can adapt to different types of remote sensing image data and allows for fine-tuning of the network model as needed to suit other land cover segmentation tasks. This flexibility makes the model widely applicable in various scenarios, such as agricultural monitoring and remote sensing land cover classification, and infrastructure management. In summary, this invention provides an efficient, accurate, and scalable solution in the field of semantic segmentation, significantly improving the efficiency of remote sensing image analysis and applications.

[0084] On the other hand, embodiments of the present invention also provide a farmland plot segmentation system based on semi-supervised learning, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the farmland plot segmentation method based on semi-supervised learning as described in the above technical solution.

[0085] Finally, it should be noted that those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, the intent of this invention is also encompassed within these modifications and variations.

Claims

1. A method for dividing arable land parcels based on semi-supervised learning, characterized in that, include: Construct a sample library of remote sensing images of cultivated land plots; A semi-supervised learning-based farmland plot segmentation network model is constructed, comprising a student network, a teacher network, and a discriminator. The student network and the teacher network have the same encoder-decoder structure. An edge feature fusion module is introduced into the encoder to generate an enhanced feature map with edge awareness. The decoder contains multiple upsampling units. Based on the enhanced feature map, bilinear interpolation and convolution operations are used to gradually restore the spatial resolution. An edge feature enhancement module is designed to generate a global edge feature map as the input of the discriminator. The discriminator is located after the decoder of the student network and forms an adversarial relationship with the student network. The processing procedure of the semi-supervised learning-based farmland parcel segmentation network model is as follows: The training set from the remote sensing image sample database of cultivated land plots was divided into labeled and unlabeled subsets. Labeled images and their corresponding ground truth labels, along with unlabeled images, were input into both the student and teacher networks for forward inference. The labeled images were... The truth label is Unlabeled images are ; Labeled and unlabeled images are first processed by an encoder to extract features from the input images. Each residual block generates multiple sets of feature maps at different scales. The generated feature maps at different scales are input into the edge feature fusion module to generate a multi-scale fused feature map; The multi-scale fused feature map output by the edge feature fusion module is fed into the edge feature enhancement module to generate the final edge feature map. ; The decoder processes the multi-scale feature maps generated by the encoder, and the edge feature maps generated by the edge feature enhancement module. Perform upsampling and feature reconstruction to output a segmentation probability map. ;right The final segmentation result is obtained by taking the maximum index along the channel direction. In this context, a pixel value of 0 represents the background, and 1 represents the target region; the segmentation probability map output by the student network on the labeled image is denoted as... The segmentation probability map output on the unlabeled image is denoted as . The segmentation probability map output by the teacher network on the labeled image is denoted as . The segmentation probability map output on the unlabeled image is denoted as . ; The semi-supervised learning-based farmland plot segmentation network model also includes an adaptive weight allocation module, which acts between the teacher network output and the student network loss function, specifically including: Establish two independent category confidence memories, initially empty, with the labeled category confidence memory as follows: It is used to store the segmentation probability vectors of each category of pixels in labeled images by the student network; the unlabeled category confidence memory is... It is used to store the segmentation probability vectors of pixels of each class in unlabeled images predicted by the teacher network; each memory is used for each class. Maintain a capacity of The first-in-first-out queue stores probability vectors downsampled to a certain resolution. Wherein, the probability vector of the student network is The probability vector of the teacher network is ; Ranking ratio calculation: Assume the original resolution of the teacher network output. The percentage of rankings with tags is from Medium category Random sampling in the queue probability vectors If the queue length is insufficient Then fill with a zero vector and calculate the current confidence level. The proportion of samples with similar confidence levels greater than the proportion of samples with similar confidence levels: , in The pseudo-label category in the sampling vector confidence level For indicator functions; The proportion of unlabeled rankings from Medium category Random sampling in the queue A probability vector, if the queue length is insufficient Then fill with zero vectors and calculate the unlabeled ranking ratio: , in The pseudo-label category in the sampling vector Confidence level value; The original weight of each pixel is obtained by weighting and fusing the two ranking ratios: , in As a balance factor; Calculate the final pixel-level weights and output the weight map. Used to calculate weighted pseudo-label loss: , in, This represents the current iteration step. This represents the total number of iterations. For temperature parameters, For scale parameters; A semi-supervised learning-based farmland plot segmentation network model is trained and optimized using a sample database of remote sensing images of farmland plots. The training and optimization include training the discriminator and joint optimization of the student network and the teacher network to obtain a well-trained student network. The remote sensing image to be segmented is input into the trained student network, and pixel-level farmland plot segmentation results are directly output through forward inference.

2. The method for dividing farmland plots based on semi-supervised learning as described in claim 1, characterized in that: The specific processing steps of the edge feature fusion module are as follows: Receive m multi-scale feature maps output by the encoder, where m is a constant; The feature map at scale m is upsampled using bilinear interpolation and then added pixel-by-pixel to the feature map at scale m-1. This is followed by convolutional smoothing to generate the feature map. ;Will After upsampling, the feature map at scale m-2 is added pixel by pixel, and then smoothed by convolution to generate... Repeat until generated. ; Output multi-scale fused feature map set .

3. The method for dividing farmland plots based on semi-supervised learning as described in claim 1, characterized in that: The specific processing steps of the edge feature enhancement module are as follows: Receive the output of the edge feature fusion module Adjust the scale of each feature map in the feature map set so that the scales of the m-1 feature maps are the same. Average pooling is used to smooth each feature map after it has been standardized to obtain the low-frequency background component. And extract its detailed response components. , where i is the level index; Will After processing through a convolutional layer and a sigmoid activation function, the output edge attention weight map is obtained. ; For each level, the attention weights are multiplied pixel-by-pixel by the uniformly sized feature map, and then the enhanced edge feature map is obtained through residual connections. ; The enhanced edge feature maps of m-1 levels are concatenated along the channel dimension to obtain a tensor. After convolution, the channels are compressed to 1 to generate the final global edge feature map. And use it as an edge enhancement injection feature for the decoder: 。 4. The method for dividing farmland parcels based on semi-supervised learning as described in claim 1, characterized in that: The discriminator consists of a downsampling convolutional module, a global average pooling layer, and a binary classification fully connected layer. The specific processing procedure is as follows: Receive raw images from a database of remote sensing images of cultivated land plots. And the prospect probability graph generated by the student network. , Segmentation probability graph output by student network The probability distribution of each pixel belonging to the foreground and background is obtained by using the Softmax operation, and then the foreground channel is extracted by slicing. The two inputs are processed by convolution to obtain feature maps. and ; feature map and Pixel-by-pixel addition yields the fused features. ; The fused features are sequentially passed through multiple convolutional layers, each followed by a Leaky ReLU activation function, progressively reducing the resolution and increasing the number of channels to obtain... ; Will Feature vectors are obtained through adaptive max-pooling compression. and will Input to a fully connected layer, output the binary log odds z. It is used to determine whether the input comes from a labeled image (positive class) or an unlabeled image (negative class). Corresponding positive class score, The corresponding negative score has a range of values. Finally, the probability of belonging to the positive class is obtained by the Softmax function. : ; Among them, probability Used for calculating adversarial losses.

5. The method for dividing cultivated land parcels based on semi-supervised learning as described in claim 1, characterized in that: The training process of the discriminator is as follows: Original image with label Student network prediction results for labeled images Foreground probability plot As positive samples, the unlabeled original image Student network prediction results for unlabeled images Foreground probability plot As negative samples, they are all input into the discriminator. The discriminator label for positive samples is set to 1, and the discriminator label for negative samples is set to 0. Freeze the student network and teacher network, input the labeled and unlabeled images of the current batch and the corresponding predicted foreground images of students into the discriminator, and output the probability of the positive class. ; The discriminator loss is calculated as the sum of the cross-entropies of all labeled and unlabeled samples: ,in, and These represent the set of labeled images and the set of unlabeled images in the current training batch, respectively. The backpropagation function is called to perform gradient calculation, which, based on the automatic differentiation mechanism, uses a loss scalar. Starting from the discriminator network, we traverse all trainable parameters in reverse along the computation graph of the discriminator network, apply the chain rule layer by layer to calculate the gradient of the loss function with respect to each parameter, and store the obtained gradient values ​​in the gradient buffer of the corresponding parameter, so as to provide accurate numerical basis for the subsequent discriminator optimizer to perform parameter updates. The Adam optimizer is invoked to perform gradient descent updates, and the parameters of the discriminator network are adjusted accordingly to minimize the discriminator loss. This enhances the discriminator's ability to distinguish between labeled and unlabeled sample predictions; at this point, the discriminator has completed one iteration of training. The gradient calculation of all parameters in the student network and teacher network is reset to the enabled state to ensure that the partial derivatives of the loss function with respect to each parameter can be calculated normally during the subsequent generator training process, thereby realizing the joint optimization of the student network and teacher network.

6. The method for dividing farmland parcels based on semi-supervised learning as described in claim 1, characterized in that: Training optimization also includes updating the adaptive weight allocation module and calculating pixel-level weights, the specific implementation process of which is as follows: Initialize the adaptive weight allocation module memory: The adaptive weight allocation module establishes two independent class confidence memory libraries, including a label class confidence memory library. Initially empty, used to store the segmentation probability vectors of pixels of each category in labeled images; unlabeled category confidence memory. Initially empty, it is used to store the segmentation probability vectors of pixels of each class in the unlabeled image predicted by the teacher network; each memory is for each class. Maintain a capacity of The queue follows the first-in, first-out (FIFO) rule; Update the labeled memory for the current batch of labeled samples: extract the segmentation probability map from the student network output. By downsampling to a certain resolution using bilinear interpolation, we obtain ; Traversal Each pixel position in Read its true category and its corresponding probability vector ;Will Store in a tagged memory bank Medium category At the end of the queue, if the queue length exceeds If so, then remove the head vector of the queue; Update the unlabeled memory for the current batch of unlabeled samples: using the segmentation probability graph output by the teacher network. Calculate pseudo-labels ;Will and By downsampling to a certain resolution using bilinear interpolation, we obtain and ; Traversal and Each pixel position Read its corresponding probability vector and its pseudo-labels ;Will Store in untagged memory Medium category At the end of the queue, if the queue length exceeds If so, then remove the head vector of the queue; Calculate the weight of each pixel in the unlabeled image: Obtain the raw resolution probability vector from the teacher network output. and its pseudo-labels ;from and Random sampling from each Calculate the probability vectors of the same type; calculate the ranking ratio. and The original weights of each pixel are obtained by weighted fusion. The original weights of each pixel are subjected to a non-linear transformation to obtain the final weights. ; Output weight map: Combine the calculated weights of each pixel into a weight map. .

7. The method for dividing farmland parcels based on semi-supervised learning as described in claim 6, characterized in that: The joint optimization of student and teacher networks specifically includes: Construction of the total loss function for the student network: The total loss function for the student network It consists of four parts: supervised segmentation loss, weighted pseudo-label loss, edge topology loss, and adversarial loss, expressed as: ; Supervised loss division Only for labeled images and its real label Calculate the cross-entropy loss: ,in Indicates the student network at pixel position Predicted as category The probability, This represents the set of labeled images in the current training batch; Weighted pseudo-label loss The pseudo-labels generated by the teacher network guide the student network, and a weight map is formed by combining the weights of each pixel. Weighted cross-entropy loss, pseudo-labels loss function ,in, For adaptive weights, The original, unlabeled image. This represents the set of unlabeled images in the current training batch. This represents the prediction results of the student network for unlabeled images; A simplified topology loss function is employed, which penalizes topology errors by comparing the connectivity and endpoint features of the segmentation results with the true labels. , This is the topology loss function; Adversarial loss function The discriminator was used to evaluate the student network's predictions on unlabeled images: ,in The prospect probability graph output for the student network. This determines the probability that the input belongs to a labeled sample for the discriminator. Backpropagation and parameter update of student network: After the total loss is calculated, the historical gradients in the optimizer are cleared first, and then the gradients of each parameter are calculated by backpropagation and the gradients are clipped to prevent gradient explosion. Then, the Adam optimizer is used to perform a gradient descent update according to the learning rate corresponding to the current iteration step to minimize the total loss. Teacher network exponential moving average update: After the student network parameters are updated, the teacher network is synchronized using the exponential moving average of the student network parameters to provide a stable and consistent learning objective.

8. A farmland plot segmentation system based on semi-supervised learning, characterized in that: It includes a processor and a memory, the memory being used to store program instructions, and the processor being used to call the program instructions in the memory to execute the farmland plot segmentation method based on semi-supervised learning as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for remote sensing mapping of cultivated land parcels based on cross-resolution semantic segmentation

    CN118298182A

  • Remote sensing image semantic segmentation method and device based on semi-supervised adversarial learning

    CN119904629A