A training data set generation method considering data balance

By preprocessing and grouping remote sensing images, and combining data diversity sampling and multi-scale data augmentation, a training dataset that takes into account data balance was generated, which solved the problem of high training data requirements in remote sensing change detection and improved detection accuracy and feature extraction capabilities.

CN115690606BActive Publication Date: 2026-05-29CHINA THREE GORGES UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA THREE GORGES UNIV
Filing Date
2022-11-14
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, remote sensing change detection based on deep learning requires a large amount of training data and suffers from problems such as data imbalance and extreme class imbalance, resulting in a high demand for training data and insufficient detection accuracy.

Method used

By preprocessing and grouping remote sensing images, and employing multi-scale data augmentation methods such as data diversity sampling, rotational mirror symmetry, downsizing and upsizing reconstruction, a dataset is generated to ensure data balance and feature diversity.

Benefits of technology

While ensuring change detection accuracy, it significantly reduces the amount of training data required for deep network models and improves detection performance, especially the ability to extract multi-scale features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690606B_ABST
    Figure CN115690606B_ABST
Patent Text Reader

Abstract

The application discloses a training data set generation method considering data balance, which comprises the following steps: step 1, pre-processing two-phase remote sensing images; step 2, grouping remote sensing images and sampling data diversity of the remote sensing images; step 3, rotationally symmetrically enhancing the initial change detection training data set obtained in step 2; reducing and recombining to enhance the initial change detection training data obtained in step 2; enlarging and recombining to enhance the initial change detection training data obtained in step 2; and step 4, merging the data sets obtained in step 3 and training after shuffling the sequence. The application aims to solve the technical problems that simple data enhancement cannot enhance multi-scale features in the data set and the class imbalance still exists in the data set generated by GAN, and provides the training data set generation method considering data balance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing technology and relates to a change detection training dataset generation technology, particularly a change detection training dataset generation technology that takes into account data balance. Background Technology

[0002] With the continuous development of deep learning technology, it has been widely applied in the field of remote sensing. Compared with traditional machine learning techniques, deep learning-based remote sensing change detection has higher accuracy, especially for high-resolution remote sensing imagery. However, deep learning-based change detection requires a large amount of training data for network model pre-training, and generating training datasets often requires significant human and material resources. Therefore, how to reduce the amount of training data required for the network model while ensuring change detection accuracy is a pressing problem to be solved.

[0003] To address this issue, previous research (Guan H. End-to-End Change Detection for HighResolution Satellite Images Using Improved UNet++[J]. Remote Sensing, 2019, 11.) used simple rotational data augmentation and loss functions to alleviate the problems of data imbalance and insufficient data volume. Research (D. Peng, L. Bruzzone, Y. Zhang, H. Guan, H. Ding, and X. Huang, "SemiCDNet: ASemisupervised Convolutional Neural Network for Change Detection in HighResolution Remote-Sensing Images," IEEE Transactions on Geoscience and RemoteSensing, vol. 59, pp. 5891-5906, 2021.) used GANs to generate training sets to alleviate the problem of insufficient datasets. These studies found that maintaining a balanced training dataset is crucial for change detection accuracy; simultaneously, data augmentation techniques can also improve change detection accuracy.

[0004] Based on this, this invention proposes a change detection training dataset generation technique that takes into account data balance. The proposed training dataset generation technique includes two stages: the first stage generates a data-balanced training dataset, and the second stage expands the generated training dataset through data augmentation. Experimental results show that the proposed training dataset generation technique can significantly reduce the amount of training data required for deep network models while maintaining change detection accuracy. Summary of the Invention

[0005] The purpose of this invention is to address the technical problems of existing technologies, such as the inability of simple data augmentation to enhance multi-scale features in datasets and the fact that datasets generated by GANs still suffer from extreme class imbalance, and to provide a training dataset generation method that takes into account data balance.

[0006] The technical solution proposed in this invention is as follows:

[0007] A method for generating a training dataset that takes into account data balance includes the following steps:

[0008] Step 1: Preprocess the two sets of remote sensing images;

[0009] Step 2: Group the remote sensing images and perform data diversity sampling on the remote sensing images;

[0010] Step 3:

[0011] Perform rotational symmetry enhancement on the initial change detection training dataset obtained in step 2;

[0012] The initial change detection training data obtained in step 2 is reduced, recombined, and enhanced.

[0013] The initial change detection training data obtained in step 2 is amplified, recombined, and enhanced.

[0014] Step 4: Merge the datasets obtained in Step 3 and shuffle them for training.

[0015] In step 1, the two remote sensing images are first preprocessed, and then the preprocessed images are segmented to obtain image blocks X of a certain size.

[0016] Step 2 specifically includes the following steps:

[0017] 1) Sort the images from smallest to largest based on the proportion of the area of ​​the region that changed during a certain time period.

[0018] 2) Based on the different ranges of the proportion of the area of ​​the changed region in the image block to the total area of ​​the image block, the images are divided into K groups, where K is a positive integer greater than 1.

[0019] 3) Based on the grouping results, the image blocks are sampled according to the class balance principle, and the sampled image blocks are labeled to obtain the initial change detection training dataset.

[0020] The category balance principle sampling specifically includes the following steps:

[0021] 1) The number of samples in the first group is 1 / K of the required training set size;

[0022] 2) If the number of samples plus the number of remaining datasets already meets the required number, then stop processing and use all remaining datasets as training sets;

[0023] 3) Otherwise, calculate the percentage of changed pixels in the remaining groups. If the percentage is less than 1 / K of the required training set size, do not process it and sample all of them. If the percentage is greater than 1 / K of the required training set size, distribute the remaining required sampling size equally among each group and extract an equal amount of data.

[0024] In step 3, the initial change detection training dataset obtained in step 2 is subjected to rotation and mirror symmetry processing to initially enhance the change detection training dataset and improve the feature richness of the training set at the same scale; specifically, it includes the following steps:

[0025] 1) The sampled data is rotated to obtain the processed training set R1. When rotating 90 degrees, each pixel of image block X is rotated 90 degrees around the center of the image block to its corresponding position, where:

[0026] R1 = Rot90°(X)

[0027] Rot90° means rotating by 90 degrees, X is the input image patch, and R1 is the training set after processing the initial change detection training data;

[0028] 2) After performing symmetric augmentation on the sampled data, the training set R2 is obtained. Symmetric augmentation only requires swapping the corresponding pixels in image block X, where:

[0029] R2 = fliper(X)

[0030] The flipper is a mirror image symmetrical in both the horizontal and vertical directions. X is the input image patch, and R2 is the training set after processing the initial change detection training data.

[0031] In step 3, the initial change detection training data obtained in step 2 is subjected to reduction and recombination enhancement. The reduction and recombination enhancement specifically includes the following steps:

[0032] 1) Resample image patch X to reduce its size to 1 / N of its original size. 2 Take N at time 2The average value of each pixel is used as the pixel value of R3 after the reduction, recombination, and enhancement process, and its size is reduced to 1 / N of the original. 2 This operation is based on global average pooling, which reduces the size of objects in the remote sensing image, making previously larger objects smaller. The result is R3, obtained after the initial change detection training data has been reduced, reassembled, and enhanced.

[0033]

[0034] in To reduce the image patch size to N times the original size 2 R3 is the result of the initial change detection training data after shrinking, reorganizing and augmenting, and N is a positive integer greater than or equal to two;

[0035] 2) With N 2 The reduced image patches are randomly grouped into groups, and each group of image patches is combined to restore the original image patch size. These groups are then added to the training set. The combination and restoration process involves the following steps:

[0036] (1) Process each group of data separately. First, create a square matrix of a specified size, where each square is the same size as R3.

[0037] (2) N belonging to the same group 2 Image blocks are randomly and non-overlappingly filled into a square matrix, such that the size of the filled image blocks is the same as the original.

[0038] In step 3, the initial change detection training data obtained in step 2 is amplified, reconstructed, and enhanced. The amplification, reconstruction, and enhancement specifically includes the following steps:

[0039] 1) Resample image patch X and enlarge its size to N times the original image patch size. 2 This operation is based on bilinear interpolation, using the N nearest neighbors of the pixel to be determined. 2 The pixel value of each point is calculated; at this time, the size of objects in the remote sensing image is magnified, making the originally smaller objects more enhanced, resulting in the magnified and enhanced result R4 of the initial change detection training data, where:

[0040] R4 = ResizeN 2 (X)

[0041] Where ResizeN 2 To enlarge the image block size to N times its original size 2 R4 is the result of amplification and enhancement processing of the initial change detection training data, and N is a positive integer greater than or equal to two;

[0042] 2) Then, each magnified image block X is divided into N equal parts. 2 Partially, image blocks that are entirely variable or entirely non-variable are removed and added to the training set.

[0043] Compared with the prior art, the present invention has the following technical effects:

[0044] The technical solution proposed in this invention takes into account the impact of data balance in the training set on the network training results. By sampling the original dataset, the feature diversity and data balance of the sampled dataset are maintained. Furthermore, multi-scale data augmentation is used to expand the features of the dataset at multiple scales, thereby achieving better results when using the sampled dataset. Attached Figure Description

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

[0046] Figure 1 This is the main flowchart of the method proposed in this invention.

[0047] Figure 2 This is a flowchart of the data sampling method in this invention.

[0048] Figure 3 This is a flowchart of the data augmentation method in this invention.

[0049] Figure 4 This is a diagram illustrating the rotation enhancement effect used in this invention.

[0050] Figure 5 This is a diagram illustrating the symmetrical enhancement effect used in this invention.

[0051] Figure 6 This is a diagram illustrating the scale reduction and enhancement effect proposed in this invention.

[0052] Figure 7 This is a scaled-up enhancement effect diagram proposed in this invention.

[0053] Figure 8 This is a comparison chart of the experimental results of this invention. Detailed Implementation

[0054] like Figure 1-3 As shown, a method for generating a training dataset that takes into account data balance includes the following steps:

[0055] Step 1: First, preprocess the two remote sensing images, and then segment the preprocessed images to obtain image blocks of size n×n. For example, the segmented image block is 256×256, i.e., n=256 in this embodiment.

[0056] Step 2: To maintain class balance in the training dataset and enhance the data's representational power, perform the following steps:

[0057] 1) Sort the image blocks by the proportion of the area of ​​the changed regions within a certain time period (e.g., from 2012 to 2016) in ascending order; for example, compare aerial images of a certain area after an earthquake in 2012 with aerial images of the area after reconstruction in 2016. Assume that the areas of change such as the construction of new houses in the four image blocks are A, B, C, and D, which account for 1%, 30%, 10%, and 5% of their respective image block areas, respectively. Then the sorted result is: image block containing A, image block containing D, image block containing C, and image block containing B.

[0058] 2) Based on the different ranges of the proportion of the area of ​​the changed region in the image block to the area of ​​the image block, it is divided into K groups, such as 0-5%, 5-10%, 10-20%, 20-40%, 40-60%, 60-80%, and 80-100%, which are divided into seven groups, i.e., K=7 in this embodiment;

[0059] 3) Based on the grouping results, image patches are sampled according to the class balance principle, and the sampled image patches are labeled to obtain the initial change detection training dataset. The class balance principle sampling specifically includes the following steps:

[0060] (1) The sampling quantity of the first group is 1 / K of the required training set quantity. In this embodiment, the first group is the group whose area of ​​the change region accounts for 0-5% of the image block area mentioned above, and the sampling quantity is 1 / 7 of the required training set quantity mentioned above.

[0061] (2) If the number of samples plus the number of remaining datasets already meets the required number, then stop processing and use all remaining datasets as training sets.

[0062] (3) Otherwise, calculate the percentage of changed pixels for the remaining groups. Groups with a percentage less than 1 / K of the required training set size are not processed and are sampled entirely. Groups with a percentage greater than 1 / K of the required training set size are equally distributed among the remaining required sampling groups, and an equal amount of data is sampled from each group. For example, if the remaining required sampling number is 300 pairs of data sets, and there are two groups with a percentage greater than 1 / K of the required training set size, then 150 pairs of data sets can be sampled from each group.

[0063] Step 3: Perform rotation and mirror symmetry processing on the initial change detection training dataset obtained in Step 2 to initially enhance the change detection training dataset and improve the feature richness of the training set at the same scale.

[0064] The initial change detection training data obtained in step 2 is downsized, reassembled, and enhanced by performing the following steps:

[0065] 1) Resample the image patch X. This operation is based on global average pooling and reduces its size to 1 / N of the original size. 2 ;

[0066] 2) Then N 2 The reduced image patch X is randomly grouped into groups, and each group of image patches is combined to restore the original image patch size. These groups are then added to the training set to enrich the scale variation features in the training set. The combination and restoration process involves the following steps:

[0067] (1) Process each group of data separately. First, create a square matrix with N×N squares, where each square is the same size as R3.

[0068] (2) N belonging to the same group 2 Image blocks are randomly and non-overlappingly filled into a square matrix, such that the size of the filled image blocks is the same as the original.

[0069] The initial change detection training data obtained in step 2 is amplified, recombined, and enhanced by performing the following steps:

[0070] 1) Resample the image patch X. This operation is based on bilinear interpolation and enlarges its size to N times its original size. 2 times;

[0071] 2) Then, each magnified image block X is divided into N equal parts. 2 Partially, image patches that are entirely variable or entirely non-variable are removed and added to the training set to further enrich the scale variation features in the training set.

[0072] Step 4: Merge the dataset obtained in Step 3 with the original dataset, shuffle the order, and then train.

[0073] In step 3, the initial change detection training dataset obtained in step 2 is subjected to rotation and mirror symmetry processing. This type of processing method improves the feature richness of the training set at the same scale. Rotation and mirror symmetry adjust the position or orientation of the changing objects in the remote sensing image, enabling the network to extract richer features.

[0074] In step 3, the initial change detection training data obtained in step 2 is reduced, reconstructed, and enhanced. The image patch X is resampled, and its size is reduced to 1 / N of the original size. 2 Then N 2 The reduced image patches are randomly grouped into groups, and each group of image patches is combined to restore the original image patch size. This processing method can enrich the scale variation features in the training set and enhance the network's ability to detect objects of different sizes.

[0075] In step 3, the initial change detection training data obtained in step 2 is amplified, reconstructed, and enhanced. The image patch X is resampled, and its size is enlarged to N times its original size. 2 The magnified image block is then divided into N equal parts. 2 In some cases, this type of enhancement, combined with step 4, further enriches the variable scale features in the training set and improves the network's ability to extract multi-scale features.

[0076] To verify the correctness of this invention, UNet was used to test the processed change detection training dataset. UNet is a classic deep learning network model, and many existing change detection methods are based on improved versions of UNet. UNet has the advantages of fewer parameters and easier training. However, since UNet only has one channel, the training set needs to be processed first for change detection tasks. This invention uses a cascading method, concatenating two images together to obtain a 6-channel effect as the training set. This method helps the neural network autonomously learn the change information between the two images.

[0077] To ensure class balance and enhance data representation, and to address the overfitting problem caused by an imbalance in the number of data of different classes in the training set, this invention designs a data sampling method that considers the principle of class balance. Grouped sampling can better increase data diversity and improve the data representation ability of the generated dataset. First, the proportion of the variable class in the dataset is calculated. Since the 0-20% portion of the dataset has a large amount of data, and remote sensing images with smaller proportions of change contain less effective information, the 0-20% portion is divided into three groups: 0-5%, 5-10%, and 10-20%, resulting in a total of 7 groups. Because the 0-5% group contains very little change information, it is processed separately during sampling. The sampling quantity for the 0-5% group is one-seventh of the required training set size. If the sampling quantity plus the remaining dataset size meets the requirement, processing stops, and all remaining datasets are used as the training set; otherwise, the proportion of changed pixels in the remaining groups is calculated. Groups with less than one-seventh of the required training set size are sampled without processing. Groups with more than one-seventh of the required training set size are evenly distributed among the remaining required sampling quantities, and an equal amount of dataset is extracted from each group. The sampling method of this invention randomly selects remote sensing images from each group as the training set, which can ensure the data diversity of the training set.

[0078] Example:

[0079] In this embodiment, to test the reduced training set size that the present invention can achieve, the training set in the existing dataset was sampled. The experiment was conducted using the change detection dataset published in the literature "S. Ji, S. Wei, and M. Lu, Fully Convolutional Networks for Multisource Building Extraction From an Open Aerial and Satellite Imagery Data Set," IEEE Transactions on Geoscience and Remote Sensing, vol. 57, pp. 574-586, 2019." This dataset includes an area affected by a 6.3 magnitude earthquake in February 2011 and subsequently rebuilt in the following years. It consists of aerial images obtained in April 2012, containing 12,796 buildings within a 20.5 square kilometer area (the 2016 dataset contains 16,077 buildings in the same area). The data size is 21243 × 15354, and another dataset is 11265 × 15354. This dataset only labels building changes, not all areas of change. This is to facilitate the training of the neural network. The dataset was randomly cropped to a size of 256×256. The cropped dataset contained 1250 pairs of remote sensing images as the training dataset and 613 pairs of remote sensing images as the test dataset.

[0080] like Figure 1 The diagram shown is a main flowchart of the dataset generation method proposed in this invention. A data sampling method in this invention that considers the principle of class balance includes the following steps:

[0081] Step 1: First, preprocess the two remote sensing images, and then segment the preprocessed images to obtain image blocks of size 256×256.

[0082] Step 2: To maintain class balance in the training dataset and enhance the data's representational power, the image patches are divided into seven groups based on the proportion of the area of ​​changed regions within a certain time period (e.g., 2012 to 2016), from smallest to largest. These groups are further divided into 7 subgroups based on the range of the proportion of changed regions within the image patch: 0-5%, 5-10%, 10-20%, 20-40%, 40-60%, 60-80%, and 80-100%. Based on these groupings, the image patches are sampled according to the class balance principle, and the sampled image patches are labeled to obtain the initial change detection training dataset. The balanced sampling principle is described in detail below.

[0083] The principle of balanced sampling primarily aims to maintain a relatively balanced amount of data across all categories. However, since the 0-20% portion of the dataset contains a large amount of data, and the less variable category contains less effective information, the 0-20% portion is divided into three groups: 0-5%, 5-10%, and 10-20%. Therefore, there are a total of seven groups: 0-5%, 5-10%, 10-20%, 20-40%, 40-60%, 60-80%, and 80-100%. Because the 0-5% group contains very little variable information, it is processed separately during sampling. The sampling size for the 0-5% group is one-seventh of the required training set size. If the sampling size plus the remaining dataset size already meets the requirement, processing stops, and all remaining datasets are used as the training set. Otherwise, the percentage of variable pixels in the remaining groups is calculated. Groups with a percentage less than one-seventh of the required training set size are not processed and are sampled entirely. Groups with a percentage greater than one-seventh of the required training set size are evenly distributed among the remaining required sampling sizes, with each group receiving an equal amount of data. The sampling method of this invention randomly selects remote sensing images from each group as the training set, which can ensure the data diversity of the training set.

[0084] Using the above sampling method, a corresponding number of remote sensing images are extracted from each group as the initial change detection training dataset. This reduces the number of training sets required without affecting the diversity of features. The specific dataset size and sampling size are shown in Table 1.

[0085] Table 1. Number of datasets generated by different sampling ratios

[0086]

[0087] Step 3: Perform rotation and mirror symmetry processing on the initial change detection training dataset obtained in Step 2 to initially enhance the change detection training dataset. This improves the feature richness of the training set at the same scale. Rotation and mirror symmetry enhancement of the sampled data yields R1 and R2. When rotating 90 degrees, each pixel in the image patch is rotated 90 degrees around the center of the image patch to its corresponding position. Symmetry enhancement only requires swapping corresponding pixels in the image patch. This type of enhancement changes the position or orientation of buildings and other objects in the original remote sensing image, which helps the neural network learn the features and change information of objects from different angles while maintaining rich features and further enhancing the feature diversity of the training set. The enhanced effect is as follows: Figure 4 ,、 Figure 5 As shown.

[0088] R1 = Rot90°(X)

[0089] R2 = fliper(X)

[0090] Where Rot90° means a 90-degree rotation, fliper means horizontal and vertical mirror symmetry, X is the input image patch, and R1 and R2 are the training sets after processing the initial change detection training data.

[0091] Step 3: The initial change detection training data obtained in Step 2 is downsized, reassembled, and enhanced by resampling the image patch X. This operation is based on global average pooling, reducing the original image to 1 / N of its original size. 2 Take N at any time 2 The average value of each pixel is used as the pixel value of R3 after the reduction, recombination, and enhancement process, and its size is reduced to 1 / N of the original. 2 At this point, the size of objects in the remote sensing image has been reduced, making previously larger objects appear smaller, resulting in R3; then N 2 The reduced image patches are randomly grouped. Each group of data is processed separately. First, a square matrix of a specified size is created, where each square is the same size as R3. Then, N cells belonging to the same group are grouped... 2 Image patches are randomly and non-overlappingly filled into a square matrix, ensuring that the size of the filled image patch is the same as the original. The processed dataset is then added to the training set. In this method, N=2 is used for testing, as shown in the formula below. In other cases, N=3 is used. When N=4 And so on, where N is a positive integer greater than or equal to two. The effect of shrinking and recombination enhancement is as follows: Figure 6 As shown, it can enrich the scale features in the training set, and the neural network can learn better about objects of different scales in remote sensing images during learning. Multi-scale information is more important in training, and it is more effective for enhancing scale changes. Some large objects in the original remote sensing images will also have their features of different scales extracted after enhancement, which is more conducive to the training of the network.

[0092]

[0093] in To reduce the size of the original image to one-quarter of its original size, R3 represents the result of the initial change detection training data after reduction and reorganization.

[0094] Step 3: The initial change detection training data obtained in Step 2 is amplified, reconstructed, and enhanced. Image patch X is resampled, and its size is enlarged to N times its original size. 2 This operation is based on bilinear interpolation, using the N nearest neighbors of the pixel to be determined. 2The pixel value of each point is calculated using bilinear interpolation, which has a smoothing function and can better fit missing pixels in the magnified remote sensing image. At this point, the size of objects in the remote sensing image is magnified, enhancing previously smaller objects, resulting in R4. Then, each magnified image patch is divided into N equal parts. 2 Partially, remote sensing images that are entirely variable or entirely unchanged are removed and added to the training set. In this method, N is set to 2 for testing, as shown in the formula below. In other cases, when N=3, R4=Resize9(X), when N=4, R4=Resize16(X), and so on, where N is a positive integer greater than or equal to two. The effect of magnification, reconstruction, and enhancement is as follows: Figure 7 As shown, this allows even smaller objects in the original remote sensing image to have features of different scales extracted after enhancement, which is more conducive to network training and further enriches the scale variation features in the training set.

[0095] R4 = Resize4(X)

[0096] Resize4 enlarges the original image to four times its original size, and R4 represents the result of enlarging and enhancing the initial change detection training data.

[0097] To verify the correctness of this invention, UNet was used to test the processed change detection training dataset. UNet is a classic deep learning network model, and many existing change detection methods are based on improved versions of UNet. UNet has the advantages of fewer parameters and easier training. However, since UNet only has one channel, the training set needs to be processed first for change detection tasks. This invention uses a cascading method, concatenating two images together to obtain a 6-channel effect as the training set. This method helps the neural network autonomously learn the change information between the two images. The network input is shown in the figure below.

[0098] Input = X1⊕X2

[0099] Where X1 and X2 represent two remote sensing images respectively, and ⊕ represents a cascading operation.

[0100] To verify the change detection effectiveness of this invention, the required training set size was reduced by 25%, 35%, 45%, and 50%, respectively. Four widely used quantitative metrics were employed to evaluate the performance of different change detection techniques: accuracy, precision, recall, and F1 score.

[0101] Please see Figure 8The diagram presents the change detection results of this invention and the comparative techniques. The results show the training on the original dataset using UNet, and the training results after reducing the dataset size by 25%, 35%, 45%, and 50% respectively, and applying the enhancement strategy of this invention. Table 4 presents four quantitative indicators for the different change detection results.

[0102] Table 2 Quantitative Indicators of Change Detection Results

[0103]

[0104] Comparing the change detection results and quantitative statistical results, the sampling method in this invention can ensure data balance, and the enhancement method can effectively improve multi-scale features in the data. In this embodiment, it can be seen that the training dataset generation technology proposed in this invention can significantly reduce the amount of training data required for deep network models while maintaining change detection accuracy. The enhancement method in this invention improves the detection results regardless of whether the dataset size is reduced by 25%, 35%, 45%, or 50%, demonstrating good performance.

Claims

1. A method for generating a training dataset that takes into account data balance, characterized in that, It includes the following steps: Step 1: Preprocess the two sets of remote sensing images; Step 2: Group the remote sensing images and perform data diversity sampling on the remote sensing images; Step 3: This includes performing rotational symmetry enhancement on the initial change detection training dataset obtained in Step 2, shrinking and recombining the initial change detection training dataset obtained in Step 2, and enlarging and recombining the initial change detection training dataset obtained in Step 2. Step 4: Merge the datasets obtained in Step 3, shuffle them, and then train the datasets. In step 3, the initial change detection training data obtained in step 2 is downsized and reassembled for enhancement, and the downsized and reassembled dataset is added to the training set. The downsized and reassembled enhancement specifically includes the following steps: 3-1) Resample the image patch X, reducing it to 1 / N of its original size. 2 Then take N 2 The average value of each pixel is used as the pixel value of R3 after the downsizing, recombination, and enhancement process: ; in, To reduce the image patch size to N times the original size 2 One-third, R 3 represents the result of the initial change detection training data after shrinking, reorganizing, and augmentation processing, where N is a positive integer greater than or equal to two; 3-2) With N 2 The reduced image blocks are randomly grouped into groups of one image block each. Each group of image blocks is then combined to restore the original image block size and added to the training set. Combined recovery includes the following steps: 3-2-1) Process each group of data separately and create a square matrix of a specified size, where each square is the same size as R3; 3-2-2) N belonging to the same group 2 Each image block is randomly and non-overlapping and filled into a square matrix, so that the size of the image block after filling is the same as the original size; In step 3, the amplification and recombination enhancement specifically includes the following steps: s1) Resample image patch X and enlarge its size to N times the original image patch size. 2 Times, based on the nearest N pixels to the target pixel 2 The pixel value of each point is calculated; the result R4 of the initial change detection training data after amplification and enhancement is: ; in To enlarge the image block size to N times its original size 2 times, R 4 represents the result of amplified and enhanced training data for initial change detection, where N is a positive integer greater than or equal to two. s2) Divide each magnified image block X into N equal parts. 2 Partially, image blocks that are entirely variable or entirely non-variable are removed and added to the training set.

2. The method according to claim 1, characterized in that, In step 1, the two remote sensing images are first preprocessed, and then the preprocessed images are segmented to obtain image blocks X of a certain size.

3. The method according to claim 1, characterized in that, Step 2 specifically includes the following steps: 1) Sort the images from smallest to largest based on the proportion of the area of ​​the region that changed during a certain time period. 2) Based on the different ranges of the proportion of the area of ​​the changed region in the image block to the total area of ​​the image block, the images are divided into K groups, where K is a positive integer greater than 1. 3) Based on the grouping results, the image blocks are sampled according to the class balance principle, and the sampled image blocks are labeled to obtain the initial change detection training dataset.

4. The method according to claim 3, characterized in that, The category balance principle sampling specifically includes the following steps: 1) The number of samples in the first group is 1 / K of the required training set size; 2) If the number of samples plus the number of remaining datasets already meets the required number, then processing stops, and all remaining datasets are used as training sets; 3) Otherwise, calculate the percentage of changed pixels in the remaining groups. If the percentage is less than 1 / K of the required training set size, do not process it and sample all of them. If the percentage is greater than 1 / K of the required training set size, distribute the remaining required sampling size equally among the groups and extract an equal amount of data.

5. The method according to claim 1, characterized in that, In step 3, the initial change detection training dataset obtained in step 2 is subjected to rotation and mirror symmetry processing. The processed training sets R1 and R2 are then added to the training set along with the original influence blocks, thus initially enhancing the change detection training dataset and improving the feature richness of the training set at the same scale. Specifically, this includes the following steps: 1) The sampled data is rotated to obtain the processed training set R1. When rotating 90 degrees, each pixel of image block X is rotated 90 degrees around the center of the image block to its corresponding position, where: ; To rotate 90 degrees, X For the input image block, R 1 represents the training set after processing the initial change detection training data; 2) After performing symmetric augmentation on the sampled data, the training set R2 is obtained. Symmetric augmentation only requires swapping the corresponding pixels in image block X, where: ; In the formula, fliper is a mirror image of the horizontal and vertical axes. X For the input image block, R 2 represents the training set after processing the initial change detection training data.