Semi-supervised remote sensing image semantic segmentation method and system based on region contrast learning

Through a semi-supervised method based on regional contrast learning, using hierarchical enhancement and region-aware contrast modules, problems such as intra-class variance and scale changes in semantic segmentation of remote sensing images are solved, accurate recognition and classification of remote sensing images are achieved, and segmentation is improved. performance and training efficiency.

CN118710906AActive Publication Date: 2024-09-27HUNAN UNIV

Patent Information

Application Number
CN202410849538.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-27
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Semantic segmentation of remote sensing images faces problems such as large intra-class variance, scale changes, data fusion, and few samples, which makes segmentation difficult and makes it difficult for existing technologies to effectively identify and classify ground objects.

Method used

A semi-supervised method based on regional contrast learning is adopted. Through the hierarchical enhancement module and the region-aware contrast module, three student networks and a teacher network are constructed to conduct semi-supervised semantic segmentation training, and pseudo labels and region-aware contrast losses are used to improve segmentation performance.

Benefits of technology

It achieves accurate recognition and segmentation of different categories of objects in remote sensing images, improves the performance and training efficiency of the encoder and segmentation network, improves segmentation results with a small amount of annotated data, and reduces the impact of pseudo labels on model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710906A
    Figure CN118710906A
Patent Text Reader

Abstract

The invention discloses a semi-supervised remote sensing image semantic segmentation method and system based on regional contrast learning. The method comprises the step of carrying out semi-supervised semantic segmentation training on encoders and segmentation networks by adopting a hierarchical enhancement module HA, a regional consciousness comparison module RC, three student networks formed by the encoders and the segmentation networks and a teacher network, and comprises the following steps of: carrying out hierarchical enhancement on label / no-label images by utilizing the HA and then inputting the label / no-label images into the student networks; updating the parameters of the teacher network according to the parameters of the student network and generating a pseudo tag; and calculating a total loss function formed by regional perception comparison loss and pixel-level cross entropy loss through a regional awareness comparison module RC according to a predicted regional center and a pseudo tag of the student network, and updating parameters of the student network. The invention aims at accurately and effectively identifying and segmenting different types of objects in the remote sensing image, and improving the performance and training efficiency of a semantic segmentation network formed by an encoder and a segmentation network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a semi-supervised remote sensing image semantic segmentation method and system based on regional contrast learning. Background Art

[0002] Remote sensing images generally refer to records of electromagnetic wave information of surface objects obtained through aviation or satellite platforms, usually in the form of film or digital photos. Remote sensing images can be obtained through different imaging methods, including aerial photography, aerial scanning, and microwave radar. The application of remote sensing images is very extensive, including but not limited to geographic information systems, environmental monitoring, urban planning, agricultural management, and disaster assessment. With the development of technology, the resolution and quality of remote sensing images are constantly improving. At the same time, the combination with artificial intelligence and data analysis technology has also made the application of remote sensing images more in-depth and extensive.

[0003] Remote sensing image semantic segmentation is an advanced image processing technique that aims to assign each pixel in a remote sensing image to a specific category, thereby achieving accurate identification and classification of different objects. This process is crucial for fields such as geographic information systems, environmental monitoring, and urban planning. However, despite its great potential and application value, this technology also faces a series of technical problems and challenges: Intra-class variance and inter-class variance: High-resolution remote sensing images contain a large amount of ground object information, which is diverse and complex. Within the same category, objects may show large differences (intra-class variance), while the differences between different categories may be small (inter-class variance), which leads to low class distinction and makes semantic segmentation difficult. Scale variation problem: In remote sensing images, geospatial objects may have large scale variations, which means that the same object may have different sizes and shapes in different images. This scale variation poses a challenge to accurate segmentation. Data fusion strategy: In order to improve segmentation accuracy, multiple data sources and multiple network structures can be combined. For example, combining geometric information and spectral information, or using different data as auxiliary features to improve segmentation. The problem of few samples: In some cases, there may be few labeled samples available for training, which requires the use of data synthesis or data augmentation techniques to expand the training set, or the use of semi-supervised learning methods to utilize unlabeled data. In summary, remote sensing image semantic segmentation is a complex and multifaceted technical field that requires continuous research and innovation to solve the above problems in order to better serve related application scenarios. Summary of the invention

[0004] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a semi-supervised remote sensing image semantic segmentation method and system based on regional contrast learning are provided. The present invention aims to accurately and effectively identify and segment objects of different categories in remote sensing images, and improve the performance and training efficiency of the semantic segmentation network composed of the encoder and the segmentation network.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: A semi-supervised remote sensing image semantic segmentation method based on regional contrast learning includes using a hierarchical enhancement module HA, a regional awareness contrast module RC, three student networks each consisting of an encoder and a segmentation network, and a teacher network to perform semi-supervised semantic segmentation training on the encoder and the segmentation network. A semi-supervised semantic segmentation training includes: S101, there will be label images The hierarchical enhancement module HA is used to enhance the image to simulate only spatial changes. , the unlabeled image The hierarchical enhancement module HA is used to enhance the image to simulate spatial variation and uniform spectral variation. and images that simulate spatial variation and non-uniform spectral variation ; S102, the image Input the first branch’s student network to extract labeled images Features , and according to the characteristics Predict labeled images The prediction results , according to the prediction results Get labeled images The center of the region will have the label image The center of the area is saved to the central storage part; the image Input the student network of the second branch to extract unlabeled images Features , according to the characteristics Predict unlabeled images The prediction results , according to the prediction results Get unlabeled images The center of the area; the image Input to the student network of the third branch to extract features and obtain the predicted value of the unlabeled remote sensing image , according to the predicted value Get the center of the region; update the parameters of the teacher network after the exponential moving average EMA operation on the parameters of the student network, and use the new teacher network to perform the hierarchical enhancement module HA on the unlabeled image The extracted unlabeled image generation only simulates the spatial variation to produce unlabeled images Pseudo labels ; S103, through the regional awareness comparison module RC according to the regional center and pseudo label The region-aware contrast loss and pixel-level cross entropy loss are calculated, and the parameters of the student network are updated based on the total loss function composed of the region-aware contrast loss and the pixel-level cross entropy loss.

[0006] Optionally, in step S101, there will be a label image The hierarchical enhancement module HA is used to enhance the image to simulate only spatial changes. When including images with labels Weak enhancement using hierarchical enhancement module HA w Get an image that only simulates spatial changes , the weak enhancement A w This includes partial or complete translation, rotation, scaling, and flipping.

[0007] Optionally, in step S101, the unlabeled image The hierarchical enhancement module HA is used to enhance the image to simulate spatial variation and uniform spectral variation. and images that simulate spatial variation and non-uniform spectral variation When including the unlabeled image Use the layered enhancement module HA to first perform weak enhancement A w Then perform strong enhancement A s Get an image that simulates spatial variation and uniform spectral variation , the unlabeled image Use the hierarchical enhancement module HA to first perform weak enhancement A' w Then perform strong enhancement A' s , and then the obtained image and image Splice A c Get an image that simulates spatial variation and non-uniform spectral variation , where the weak enhancement A w and weak enhancement A' w Including translation, rotation, scaling, flipping, part or all of the process, strong enhancement A s and strong enhancement A' s This includes randomly changing the image color, changing the image brightness and contrast, and adding some or all of Gaussian noise.

[0008] Optionally, the calculation function expression of the region center is: , In the above formula, For a regional center of category i, Pixels in the image Features, is the pixel in the prediction result Tags, A binary indicator indicating whether the pixel belongs to class i.

[0009] Optionally, in step S102, there is a label image x l The function expression of the regional center saved to the central storage part is: , In the above formula, For the central storage part, For a labeled dataset, is the i-th labeled image in the labeled dataset, is the i-th labeled image in the labeled dataset the entire regional centre.

[0010] Optionally, the function expression of the total loss function based on the region-aware contrast loss and the pixel-level cross entropy loss in step S102 is: , In the above formula, is the total loss function, is the pixel-level cross entropy loss, is the weight parameter, is the region-aware contrast loss, and the pixel-level cross entropy loss is composed of the supervised learning part and the unsupervised learning part Additive composition, region-aware contrast loss supervised learning part and the unsupervised learning part Add together, and we have: , , , , In the above formula, is the number of labeled images, is the number of unlabeled images, For labeled images, For a labeled dataset, is the i-th label of the labeled image, To simulate only spatially varying images Via the student network The result obtained is, is an unlabeled dataset, To simulate the spatial variation and uniform spectral variation of the image Through the Teacher Network The result obtained is, To simulate the spatial variation and uniform spectral variation of the image Via the student network The result obtained is, To simulate the spatial variation and non-uniform spectral variation of the image Through the Teacher Network The result obtained is, To simulate the spatial variation and non-uniform spectral variation of the image Via the student network The result obtained is, is the number of categories, is the regional perception of category i, and has: , In the above formula, The central storage part All regional centers belonging to category i in for The feature vectors of the same category in yes The feature vectors of different categories in is the feature vector of the current image, is a hyperparameter.

[0011] Optionally, in step S102, the function expression for updating the parameters of the teacher network after the parameters of the student network are subjected to the exponential moving average EMA operation is: , In the above formula, is the weight or bias in the parameters of the teacher network at the current moment, is the smoothing coefficient, is the weight or bias in the parameters of the teacher network at the previous moment, is the weight or bias in the parameters of the student network at the current moment.

[0012] In addition, the present invention also provides a semi-supervised remote sensing image semantic segmentation system based on regional contrast learning, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on regional contrast learning.

[0013] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning through a processor.

[0014] In addition, the present invention also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning through a processor.

[0015] Compared with the prior art, the present invention mainly has the following advantages: 1. The semantic segmentation of the present invention can accurately and effectively identify and segment objects of different types in an image. The image is first layered and enhanced to further simulate the spatial changes and spectral distribution changes in reality, and then the regional center of the image is extracted using a regional awareness contrast learning strategy. The segmentation results of the unlabeled image are supervised based on the set of regional centers of the labeled image.

[0016] 2. The present invention proposes a hierarchical enhancement strategy for semi-supervised remote sensing image semantic segmentation based on regional contrast learning, that is, through the hierarchical enhancement module HA, three data enhancement branches simulate three situations in remote sensing images, namely: (1) only simulating spatial changes, (2) spatial changes and uniform spectral changes, and (3) spatial changes and non-uniform spectral changes. These common data enhancements can simulate remote sensing images in different scenarios through different combinations, so that the model can learn from remote sensing data in various situations, which can greatly improve the performance of the network.

[0017] 3. The present invention proposes a regional awareness contrast learning strategy, that is, the regional center of the remote sensing image is obtained by using the features and prediction results of the labeled data through the regional awareness contrast module RC, and the regional center of the labeled data is used to supervise the segmentation results of the unlabeled data. The application of this strategy can obtain reliable class-level feature distribution, improve the performance of the segmentation network, and also improve the utilization rate of unlabeled data, effectively reducing the impact of pseudo-labels on model performance.

[0018] 4. The present invention uses a self-training mode, using a model trained on labeled images to generate pseudo-labels for unlabeled remote sensing images, and then uses the generated pseudo-labels to supervise the unlabeled image segmentation. The accuracy and quantity of the pseudo-labels determine the performance of the model. When the labeled images are not trained enough, the pseudo-labels will be noisy. However, in the method of this embodiment, all pseudo-labels are retained, so that the model fully understands the true feature distribution of unlabeled data, and class labels are used to reduce the impact of false pseudo-labels. The problem of loss of semantic information and potential distribution bias in self-training is solved.

[0019] 5. The present invention adopts deep learning to determine the training weights and pseudo-label confidences. The obtained semantic segmentation images can more accurately identify, classify and label objects, and the segmentation effect is better when there is less training data and the training difficulty is higher.

[0020] 6. When training network parameters, the present invention has low requirements for training data and is easy to use. After the network is trained, the applicable scenarios are diverse and can meet various needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention.

[0022] Figure 2 Schematic diagram of the network structure used in the embodiment of the present invention.

[0023] Figure 3 Schematic diagram of the network structure of the regional awareness comparison module RC used in the embodiment of the present invention.

[0024] Figure 4 This is the imaging influence caused by spatial variation, uniform spectral variation and non-uniform spectral variation in the embodiment of the present invention.

[0025] Figure 5 The figure is a comparison between the method of the embodiment of the present invention and WSCL on the Potsdam test set.

[0026] Figure 6 The figure is a comparison between the method of the embodiment of the present invention and WSCL on the Vaihingen test set.

[0027] Figure 7 Schematic diagram of a weak-to-strong network structure used in an ablation experiment in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] like Figure 1 and Figure 2As shown, the semi-supervised remote sensing image semantic segmentation method based on regional contrast learning in this embodiment includes using a hierarchical enhancement module HA (Hierarchical Augmentation), a region-aware contrast module RC (Region-aware Contrastive), three student networks each consisting of an encoder and a segmentation network, and a teacher network to perform semi-supervised semantic segmentation training on the encoder and the segmentation network. It should be noted that the encoder and the segmentation network can adopt the required network type as needed. For example, as an optional implementation, the encoder in this embodiment adopts the resnet-50 model pre-trained by ImageNet, and the segmentation network adopts the FCN model. Therefore, the network model composed of the encoder and the segmentation network is referred to as the FCN-resnet50 model. The method of this embodiment performs a semi-supervised semantic segmentation training, including: S101, there will be label images The hierarchical enhancement module HA is used to enhance the image to simulate only spatial changes. , the unlabeled image The hierarchical enhancement module HA is used to enhance the image to simulate spatial variation and uniform spectral variation. and images that simulate spatial variation and non-uniform spectral variation ; S102, the image Input the first branch’s student network to extract labeled images Features , and according to the characteristics Predict labeled images The prediction results , according to the prediction results Get labeled images The center of the region will have the label image The center of the area is saved to the central storage part; the image Input the student network of the second branch to extract unlabeled images Features , according to the characteristics Predict unlabeled images The prediction results , according to the prediction results Get unlabeled images The center of the area; the image Input to the student network of the third branch to extract features and obtain the predicted value of the unlabeled remote sensing image , according to the predicted value Get the center of the region; update the parameters of the teacher network after the exponential moving average EMA operation on the parameters of the student network, and use the new teacher network to perform the hierarchical enhancement module HA on the unlabeled image The extracted unlabeled image generation only simulates the spatial variation to produce unlabeled images Pseudo labels ; S103, through the regional awareness comparison module RC according to the regional center and pseudo label Calculate the region-aware contrast loss and pixel-level cross entropy loss, and update the parameters of the student network based on the total loss function composed of the region-aware contrast loss and pixel-level cross entropy loss, such as Figure 3 As shown, is the region-aware contrast loss.

[0029] The input labeled and unlabeled remote sensing image data first pass through the hierarchical enhancement module HA to obtain images with three different enhancement strategies, which simulate spatial changes, uniform spectral changes, and non-uniform spectral changes respectively. The labeled data simulates spatial changes, and the unlabeled data simulates uniform and non-uniform spectral changes. The images of the three branches are then input into the student network respectively, and the obtained features and prediction results are processed in the regional awareness comparison module RC. Finally, the final segmented image is obtained under the supervision of pseudo labels. Figure 1 and Figure 2 As shown, in step S101 of this embodiment, there will be a label image The hierarchical enhancement module HA is used to enhance the image to simulate only spatial changes. When including images with labels Weak enhancement using hierarchical enhancement module HA w Get an image that only simulates spatial changes , the weak enhancement A w This includes some or all of the translation, rotation, scaling, and flipping that can be expressed as: , In step S101, the unlabeled image The hierarchical enhancement module HA is used to enhance the image to simulate spatial variation and uniform spectral variation. and images that simulate spatial variation and non-uniform spectral variation When including the unlabeled image Use the layered enhancement module HA to first perform weak enhancement A w Then perform strong enhancement A s Get an image that simulates spatial variation and uniform spectral variation , which can be expressed as: , The unlabeled image Use the hierarchical enhancement module HA to first perform weak enhancement A' w Then perform strong enhancement A' s , and then the obtained image and image Splice A c Get an image that simulates spatial variation and non-uniform spectral variation , which can be expressed as: , Among them, weak enhancement A w and weak enhancement A' w Including translation, rotation, scaling, flipping, part or all of the process, strong enhancement A s and strong enhancement A' s This includes randomly changing the image color, changing the image brightness and contrast, and adding some or all of Gaussian noise. Figure 4 The imaging effects caused by spatial variation, uniform spectral variation and non-uniform spectral variation in this embodiment are shown in Figure 1, where (a) is the original image, (b)-(d) simulate the spatial variation of the original image, including flipping, rotation and cropping, (e)-(h) simulate the uniform spectral variation of the original image, including blur, grayscale, noise and distortion, and (i)-(l) simulate the non-uniform spectral variation of the original image. Figure 1 , Figure 2 As can be seen from the above description, the hierarchical enhancement module HA in this embodiment includes three branches. The first branch is used to transform the labeled image Weak enhancement using hierarchical enhancement module HA w Get an image that only simulates spatial changes , the second branch is used to convert the unlabeled images Use the layered enhancement module HA to first perform weak enhancement A w Then perform strong enhancement A s Get an image that simulates spatial variation and uniform spectral variation , the third branch is used to convert the unlabeled images Use the hierarchical enhancement module HA to first perform weak enhancement A' w Then perform strong enhancement A' s , and then the obtained image and image Splice A c Get an image that simulates spatial variation and non-uniform spectral variation , the data enhancement processing performed on each branch is different, and the weak enhancement and strong enhancement on the three branches are also different (random). During network training, three data processed with different data enhancements are input into three different student networks respectively. The labeled and unlabeled images are input into the hierarchical enhancement module HA respectively, and then input into three different student networks after three different data enhancement processes. The obtained features and prediction results are used as the input of the regional awareness comparison module, and the regional centers of the three branch images are obtained respectively. The set of regional centers of the labeled images is used as the central storage part to supervise the prediction results of the unlabeled images. After the network training is completed, this embodiment only needs to input the unlabeled remote sensing image x u The final segmentation result can be obtained. In the obtained result, each type of object will be identified and marked with the same color, and different types of objects will use different colors. Since the structure of the student network and the teacher network is the same, the parameters of the student network processed by EMA can be directly used in the teacher network. Together with the parameters, the weakly enhanced A w The teacher network generates two prediction results for the unlabeled image, and these two prediction results are then A c Operation, generating an unlabeled image x u The pseudo label y pseudo The image processed with uniform spectral change and the image processed with non-uniform spectral change use their respective regional centers and prediction results p us 、p uc To calculate the central storage part and pseudo label y pseudo Contrast loss and pixel-level cross entropy loss. Since the pseudo-label cannot be completely accurate, the central storage part is not updated in the learning of unlabeled images.

[0030] The regional awareness comparison module RC uses the features and prediction results of the images obtained under the three data enhancement methods to calculate the regional center, and saves the regional center of the labeled image in the central storage part. The regional center of category i is the average value of the features of all pixels belonging to category i in a single image. The calculation function expression of the regional center in this embodiment is: , In the above formula, For a regional center of category i, Pixels in the image Features, is the pixel in the prediction result Tags, A binary indicator indicating whether the pixel belongs to class i.

[0031] In this embodiment, in step S102, there is a label image The function expression of the regional center saved to the central storage part is: , In the above formula, For the central storage part, For a labeled dataset, is the i-th labeled image in the labeled dataset, is the i-th labeled image in the labeled dataset Then, the regional center of the unlabeled image is calculated, the regional contrast loss between the unlabeled image regional centers is calculated, and the central storage part M is updated in the training of the labeled image.

[0032] In this embodiment, in the final region awareness comparison module RC, in order to obtain a more accurate prediction result, pixel-level cross entropy loss and region-aware contrast loss are used, and the total loss is the sum of the two. The parameters in the student network and the teacher network are adjusted according to the obtained loss until the appropriate parameters are adjusted to minimize the loss. The function expression of the total loss function based on region-aware contrast loss and pixel-level cross entropy loss in step S102 of this embodiment is: , In the above formula, is the total loss function, is the pixel-level cross entropy loss, is the weight parameter, is the region-aware contrast loss, and the pixel-level cross entropy loss is composed of the supervised learning part and the unsupervised learning part Additive composition, region-aware contrast loss supervised learning part and the unsupervised learning part Add together, and we have: , , , , In the above formula, is the number of labeled images, is the number of unlabeled images, For labeled images, For a labeled dataset, is the i-th label of the labeled image, To simulate only spatially varying images Via the student network The result obtained is, is an unlabeled dataset, To simulate the spatial variation and uniform spectral variation of the image Through the Teacher Network The result obtained is, To simulate the spatial variation and uniform spectral variation of the image Via the student network The result obtained is, To simulate the spatial variation and non-uniform spectral variation of the image Through the Teacher Network The result obtained is, To simulate the spatial variation and non-uniform spectral variation of the image Via the student network The result obtained is, is the number of categories, is the regional perception of category i, and has: , In the above formula, The central storage part All regional centers belonging to category i in for The feature vectors of the same category in yes The feature vectors of different categories in is the feature vector of the current image, is a hyperparameter.

[0033] In step S102 of this embodiment, the function expression for updating the parameters of the teacher network after the parameters of the student network are subjected to the exponential moving average EMA operation is: , In the above formula, is the weight or bias in the parameters of the teacher network at the current moment, is the smoothing coefficient, is the weight or bias in the parameters of the teacher network at the previous moment, is the weight or bias in the parameters of the student network at the current moment.

[0034] In this example, each batch contains four labeled images and four unlabeled images during training. During training, stochastic gradient descent (SGD) with a weight decay of 5e-4 and a momentum of 0.9 is used to optimize the segmentation network. Experiments were also completed on the Potsdam and Vaihingen datasets using two Nvidia RTX2080Ti, and experiments were completed on the LoveDA dataset using one NvidaRTX3090 GPU.

[0035] In order to further verify the effectiveness of the proposed method, this embodiment uses average F1 and mean IoU as evaluation indicators, where the calculation function expression of average F1 is: , In the above formula, For accuracy, is the recall rate, and: , , In the above formula, , and are the number of true positive, false positive, and false negative samples, respectively.

[0036] The calculation function expression of mean IoU is: , In the above formula, is the mean IoU, is the number of categories, is the intersection and ratio, and we have: , In the above formula, the commonly used semi-supervised method in this embodiment is compared with the proposed semi-supervised remote sensing image semantic segmentation method based on multi-level enhancement and regional contrast learning on the three datasets of Potsdam, Vaihingen and LoveDA, and the results are shown in Tables 1, 2, and 3.

[0037] Table 1 Performance comparison of this embodiment and other semi-supervised methods on the Potsdam dataset

[0038] Table 2 Performance comparison of this embodiment and other semi-supervised methods on the Vaihingen dataset

[0039] Table 3 Performance comparison of this embodiment and other semi-supervised methods on the urban-rural domain adaptive land cover dataset

[0040] In Tables 1 to 3, the baseline method is used for comparison, directly using FCN-resnet50 and supervised training with labeled data. Hung et al. is used as an existing self-training method for comparison, see the reference: WC Hung, YHTsai, YT Liou, YY Lin, and MH Yang, “Adversarial learning for semi-supervised semantic segmentation”, in 29th British Machine Vision Conference, BMVC 2018, 2019. S4-GAN is used as an existing self-training method for comparison, see the reference: S. Mittal, M.Tatarchenko, and T. Brox, “Semi-supervised semantic segmentation with high-and low-level consistency,” IEEE transactions on pattern analysis and machineintelligence, vol. 43, no. 4, pp. 1369–1379, 2019. CCT is an existing consistency regularization-based method for comparison. For details, see the literature: Y. Ouali, C. Hudelot, and M. Tami, “Semi-supervised semantic segmentation with cross-consistency training,” in Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 12674–12 684. Li et al. is an existing self-training method for comparison. For details, see the literature: J. Li, B. Sun, S.Li, and X. Kang, “Semisupervised semantic segmentation of remote sensing images with consistency self-training,” IEEE Transactions on Geoscience and Remote Sensing, vol. 60, pp. 1–11, 2021.WSCL is an existing consistency regularization method for comparison, see the literature: X. Lu, L. Jiao, L. Li, F. Liu, X. Liu, S. Yang, Z. Feng, and P.Chen, “Weak-to-strong consistency learning for semisupervised imagesegmentation,” IEEE Transactions on Geoscience and Remote Sensing, 2023. HARC represents the method of this embodiment. As shown in Tables 1 to 3: Compared with the baseline method, the method of this embodiment (HARC) has a great improvement on these three test sets. On the Potsdam test set, for 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 5.1% and 7.48% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 4.31% and 5.05% respectively. On the Vaihingen test set, for 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 8.85% and 10.52% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 6.65% and 8.66% respectively. On the Potsdam and Vaihingen test sets, the segmentation effect of the car category is the largest improvement. From the evaluation indicators of the baseline method, it can be seen that the car category is the most difficult to segment, and in these two datasets, the car category has the least number of training samples. This result shows that the method of this embodiment (HARC) has better performance in small and difficult categories. On the LoveDA test set, for 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 2.96% and 3.28% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 2.97% and 3.09% respectively. In these three datasets, the performance of the method of this embodiment in 1 / 8 labeled data is higher than the baseline of 1 / 4 labeled data, and the Vaihingen dataset has the least training samples, but the method of this embodiment (HARC) has the greatest improvement over Vaihingen, which shows that the method of this embodiment (HARC) can better cope with the challenge of a small number of labeled samples compared with other baseline methods.

[0041] Compared with other consistency regularization-based methods (such as CCT and WSCL), on the Potsdam test set, in 1 / 8 labeled data, the method of this embodiment (HARC) increased the average F1 and average IoU by 1.07%-37.1% and 1.73%-5.7% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) increased the average F1 and average IoU by 1.03%-2.81% and 1.67%-4.33% respectively. This embodiment also makes a visual comparison with WSCL, which has the second highest evaluation index, as shown in Figure 2. Figure 5 As shown, 1 / 8 and 1 / 4 labeled data of the Potsdam dataset are compared, where (a) is the input original image, (b) is the true label, (c) and (d) are the results of WSCL and the method of this embodiment (HARC) on 1 / 8 labeled data of the Potsdam dataset, respectively, and (e) and (f) are the results of WSCL and the method of this embodiment (HARC) on 1 / 4 labeled data of the Potsdam dataset, respectively. On the Vaihingen test set, in 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 4.68%-9.77% and 5.88%-11.27% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 3.78%-60.1% and 5.10%-7.33% respectively. This embodiment also makes a visual comparison with WSCL, which has the second highest evaluation index, as shown in the figure. Figure 6 As shown, the 1 / 8 and 1 / 4 labeled data of the Vaihingen dataset are compared, where (a) is the input original image, (b) is the true label, (c) and (d) are the results of WSCL and the method of this embodiment (HARC) on the 1 / 8 labeled data of the Vaihingen dataset, and (e) and (f) are the results of WSCL and the method of this embodiment (HARC) on the 1 / 4 labeled data of the Vaihingen dataset. On the LoveDA test set, in the 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 14.48% and 13.05% respectively; in the 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 11.76% and 11.13% respectively.

[0042] Compared with other self-training methods, such as Hung et al., s4-GAN, Li et al., on the Potsdam test set, in 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 0.84%-2.05% and 1.38%-2.68% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 1.32%-2.64% and 2.03%-2.80% respectively. On the Vaihingen test set, in 1 / 8 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 3.4%-15.55% and 4.58%-12.89% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improves the average F1 and average IoU by 3.06%-17.41% and 4.03%-15.58% respectively. On the LoveDA test set, in 1 / 8 labeled data, the method of this embodiment (HARC) improved the average F1 and average IoU by 1.00% and 1.23% respectively; in 1 / 4 labeled data, the method of this embodiment (HARC) improved the average F1 and average IoU by 3.21% and 3.30% respectively.

[0043] In addition, this embodiment also completed an ablation experiment on the Vaihingen dataset to explore the respective roles of the hierarchical enhancement module HA and the regional awareness comparison module RC. Table 4 shows the performance comparison results of the ablation experiment, mainly comparing weak to strong, weak to strong + RC, HA and the baseline method. The weak-to-strong network structure is as follows: Figure 7 As shown, the contrast-based class-level supervision in Weak-to-Strong+RC is weak-to-strong; HA is HARC without contrast-based class-level supervision.

[0044] Table 4 Performance comparison results of the performance ablation experiment on the Vaihingen dataset

[0045] As shown in Table 4, compared with weak-to-strong, HA improves the average F1 and average IoU by 0.21% and 0.20% in 1 / 8 labeled data; and improves the average F1 and average IoU by 1.2% and 1.69% in 1 / 4 labeled data. Compared with weak-to-strong+RC, the method of this embodiment (HARC) improves the average F1 and average IoU by 0.22% and 0.30% in 1 / 8 labeled data; the hierarchical enhancement module HA improves the average F1 and average IoU by 0.28% and 0.39% in 1 / 4 labeled data. These improvements show that HA has a good effect in the semi-supervised semantic segmentation of RS. Compared with weak-to-strong, weak-to-strong+RC improves the average F1 and average IoU by 0.27% and 0.55% in 1 / 8 labeled data, and improves them by 2.02% and 2.86% in 1 / 4 labeled data. Compared with HA, the method in this embodiment (HARC) improves the average F1 and average IoU by 0.48% and 0.65% in 1 / 8 labeled data, and improves the average F1 and average IoU by 1.10% and 1.56% in 1 / 4 labeled data. These improvements show that contrast-based class-level supervision has a good effect on semi-supervised semantic segmentation in RS. And the improvement of the region-aware contrast module RC is more significant than that of the hierarchical enhancement module HA.

[0046] In summary, based on the analysis of consistency regularization and self-training, the semi-supervised remote sensing image semantic segmentation method based on regional contrast learning in this embodiment proposes a semi-supervised remote sensing image semantic segmentation method based on hierarchical enhancement and region-aware contrast, referred to as the HARC (Hierarchical Augmentation and Region-aware Contrastive) method, the key of which includes a hierarchical enhancement module HA and a region-aware contrast module RC. The hierarchical enhancement module HA can simulate more situations than weak to strong consistency regularization. It allows the segmentation network to learn from images affected by uneven spectral changes, and then improves the performance of the segmentation network; the region-aware contrast module RC allows the segmentation network to fully learn the class-level feature distribution of labeled data, and can also improve the utilization rate of unlabeled data, effectively reducing the impact of pseudo-labels on model performance. Among them, the hierarchical enhancement module HA consists of three links, which simulate three situations in remote sensing images respectively; the first branch only simulates the influence of spatial changes; the second branch simulates the influence of spatial changes and uniform spectral changes; the third branch uses splicing between the second branch and the third branch affected by spatial changes and uniform spectral changes, so that the spectral distribution of the third branch becomes uneven, thereby simulating the influence of spatial changes and uneven spectral changes. In the method of this embodiment, the first branch is used to train labeled images and generate pseudo labels for unlabeled image samples using the trained network, and the second and third branches are used to train unlabeled samples. In order to solve the problem of balancing the quality and quantity of pseudo labels, this embodiment does not focus on doing experiments to find the optimal confidence, but retains all pseudo labels to make full use of unlabeled data, which will cause the model to be easily affected by a large number of noise labels during the unlabeled data training stage. Therefore, it is very critical to let the model understand the true feature distribution of unlabeled data. In order to solve this problem, this embodiment designs a regional awareness comparison module RC. First, the region-aware contrast module RC uses region-aware contrastive learning to learn the class feature distribution in labeled data training, and then the region-aware contrast module RC constrains the unlabeled data to have the same class distribution characteristics as the labeled data. Specifically, the region-aware contrast module converts each image into n region centers based on the prediction results of the image, where n is the number of categories in the dataset, and then uses contrastive learning to allow the feature centers of the same category to be clustered together, in this way, the class feature memory is found and iterated in the labeled data training. Thanks to the accurate label guidance, the classification features of the labeled data have a more accurate distribution than the class features of the unlabeled data. Therefore, the class feature memory can be a good class label for the unlabeled data to mitigate the impact of false pseudo-labels.The HARC method of this embodiment uses region-aware contrastive learning to learn the class-level feature distribution of all unlabeled samples instead of some screened unlabeled samples, which solves the problem that the consistency regularization method is insufficient in simulating remote sensing images and the self-training method causes loss of semantic information. In the HARC method of this embodiment, a hierarchical enhancement strategy is used to simulate three levels of imaging condition changes, including spatial changes, uniform spectral changes, and non-uniform spectral changes. The first layer of enhancement strategy only includes spatial changes, the second layer includes spatial changes and uniform spectral changes, and the third layer includes spatial changes and non-uniform spectral changes. Experimental results show that the HARC method of this embodiment is superior to the most advanced semi-supervised method, and can accurately and effectively realize the semantic segmentation of remote sensing images. It is also proved through ablation experiments that the robust features of the data can be fully learned under the interference of noisy pseudo-labels.

[0047] In addition, this embodiment also provides a semi-supervised remote sensing image semantic segmentation system based on region contrast learning, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning.

[0048] In addition, this embodiment also provides a computer-readable storage medium, which stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning through a processor.

[0049] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning through a processor.

[0050] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0051] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A semi-supervised remote sensing image semantic segmentation method based on region contrast learning, characterized in that: The method includes using a hierarchical enhancement module HA, a region awareness contrast module RC, three student networks each consisting of an encoder and a segmentation network, and a teacher network to perform semi-supervised semantic segmentation training on the encoder and the segmentation network. A semi-supervised semantic segmentation training includes: S101, there will be label images The hierarchical enhancement module HA is used to enhance the image to simulate only spatial changes. , the unlabeled image The hierarchical enhancement module HA is used to enhance the image to simulate spatial variation and uniform spectral variation. and images that simulate spatial variation and non-uniform spectral variation ; S102, the image Input the first branch’s student network to extract labeled images Features , and according to the characteristics Predict labeled images The prediction results , according to the prediction results Get labeled images The center of the region will have the label image The center of the area is saved to the central storage part; the image Input the student network of the second branch to extract unlabeled images Features , according to the characteristics Predict unlabeled images The prediction results , according to the prediction results Get unlabeled images The center of the area; the image Input to the student network of the third branch to extract features and obtain the predicted value of the unlabeled remote sensing image , according to the predicted value Get the center of the region; update the parameters of the teacher network after the exponential moving average EMA operation on the parameters of the student network, and use the new teacher network to perform the hierarchical enhancement module HA on the unlabeled image The extracted unlabeled image generation only simulates the spatial variation to produce unlabeled images Pseudo labels ; S103, through the regional awareness comparison module RC according to the regional center and pseudo label The region-aware contrast loss and pixel-level cross entropy loss are calculated, and the parameters of the student network are updated based on the total loss function composed of the region-aware contrast loss and the pixel-level cross entropy loss.

2. The method for semi-supervised remote sensing image semantic segmentation based on region contrast learning according to claim 1, characterized in that: In step S101, there will be a label image The hierarchical enhancement module HA is used to enhance the image to simulate only spatial changes. When including the labeled image Weak enhancement using hierarchical enhancement module HA w Get an image that only simulates spatial changes , the weak enhancement A w This includes partial or complete translation, rotation, scaling, and flipping.

3. The semi-supervised remote sensing image semantic segmentation method based on region contrast learning according to claim 1, characterized in that: In step S101, the unlabeled image The hierarchical enhancement module HA is used to enhance the image to simulate spatial variation and uniform spectral variation. and images that simulate spatial variation and non-uniform spectral variation When including the unlabeled image Use the layered enhancement module HA to first perform weak enhancement A w Then perform strong enhancement A s Get an image that simulates spatial variation and uniform spectral variation , the unlabeled image Use the hierarchical enhancement module HA to first perform weak enhancement A' w Then perform strong enhancement A' s , and then the obtained image and image Splice A c Get an image that simulates spatial variation and non-uniform spectral variation , where the weak enhancement A w and weak enhancement A' w Including translation, rotation, scaling, flipping, part or all of the process, strong enhancement A s and strong enhancement A' s This includes randomly changing the image color, changing the image brightness and contrast, and adding some or all of Gaussian noise.

4. The method for semi-supervised remote sensing image semantic segmentation based on region contrast learning according to claim 1, characterized in that: The calculation function expression of the regional center is: , In the above formula, For a regional center of category i, Pixels in the image Features, is the pixel in the prediction result Tags, A binary indicator indicating whether the pixel belongs to class i.

5. The method for semi-supervised remote sensing image semantic segmentation based on region contrast learning according to claim 1, characterized in that: In step S102, there will be a label image x l The function expression of the regional center saved to the central storage part is: , In the above formula, For the central storage part, For a labeled dataset, is the i-th labeled image in the labeled dataset, is the i-th labeled image in the labeled dataset the entire regional centre.

6. The method for semi-supervised remote sensing image semantic segmentation based on region contrast learning according to claim 1, characterized in that: The function expression of the total loss function based on the region-aware contrast loss and the pixel-level cross entropy loss in step S102 is: , In the above formula, is the total loss function, is the pixel-level cross entropy loss, is the weight parameter, is the region-aware contrast loss, and the pixel-level cross entropy loss is composed of the supervised learning part and the unsupervised learning part Additive composition, region-aware contrast loss supervised learning part and the unsupervised learning part Add together, and we have: , , , , In the above formula, is the number of labeled images, is the number of unlabeled images, For labeled images, For a labeled dataset, is the i-th label of the labeled image, To simulate only spatially varying images Via the student network The result obtained is, is an unlabeled dataset, To simulate the spatial variation and uniform spectral variation of the image Through the Teacher Network The result obtained is, To simulate the spatial variation and uniform spectral variation of the image Via the student network The result obtained is, To simulate the spatial variation and non-uniform spectral variation of the image Through the Teacher Network The result obtained is, To simulate the spatial variation and non-uniform spectral variation of the image Via the student network The result obtained is, is the number of categories, is the regional perception of category i, and has: , In the above formula, The central storage part All regional centers belonging to category i in for The feature vectors of the same category in yes The feature vectors of different categories in is the feature vector of the current image, is a hyperparameter.

7. The method for semi-supervised remote sensing image semantic segmentation based on region contrast learning according to claim 1, characterized in that: In step S102, the function expression for updating the parameters of the teacher network after the parameters of the student network are subjected to the exponential moving average EMA operation is: , In the above formula, is the weight or bias in the parameters of the teacher network at the current moment, is the smoothing coefficient, is the weight or bias in the parameters of the teacher network at the previous moment, is the weight or bias in the parameters of the student network at the current moment.

8. A semi-supervised remote sensing image semantic segmentation system based on region contrast learning, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning described in any one of claims 1 to 7 through a processor.

10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the semi-supervised remote sensing image semantic segmentation method based on region contrast learning described in any one of claims 1 to 7 through a processor.

Citation Information

Patent Citations

  • Semi-supervised remote sensing image semantic segmentation method and equipment based on strong transformation

    CN114283329A

  • Semi-supervised semantic segmentation method and device based on MIM and comparative learning

    CN116363357A

  • Semi-supervised classification method, apparatus and device for high-resolution remote sensing image, and medium

    WO2023000159A1

Cited By

  • Semi-supervised remote sensing image change detection method and device based on multi-scale feature fusion

    CN119904758A

  • A semi-supervised remote sensing image change detection method and device based on multi-scale feature fusion

    CN119904758B

  • Semi-supervised remote sensing image semantic segmentation model training method and device

    CN120047948A

  • Self-adaptive medical image segmentation method based on selective online self-training passive field

    CN120182218A

  • Breast ultrasonic image segmentation method based on category embedding separation contrast learning network

    CN120374990A