Remote sensing image change detection model training method and detection method
Patent Information
- Application Number
- CN202610796122.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-06-04
AI Technical Summary
[0005]本申请的实施例提供了一种遥感影像变化检测模型训练方法和检测方法,能够解决现有模型在复杂场景下出现泛化能力差、鲁棒性不足和检测精度低等的问题
[0017]根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条程序代码,所述至少一条程序代码由处理器加载并执行以实现如上所述的方法。
Smart Images

Figure CN122336474B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, and in particular relates to a training method and detection method for a remote sensing image change detection model. Background Technology
[0002] In the field of geographic information and environmental monitoring, remote sensing imagery, with its unique advantages such as hyperspectral, high spatial resolution, and multi-temporal observation, has become a core source of data acquisition and analysis, and is widely used in many key areas such as dynamic land use monitoring, ecological environment assessment, natural disaster emergency response, and urban planning.
[0003] However, these characteristics of remote sensing imagery also present many unavoidable challenges for deep learning models in the practical application of intelligent change detection in remote sensing imagery. For example, most existing technologies focus on improving network architecture or expanding the size of training datasets, resulting in models exhibiting poor generalization ability, insufficient robustness, and low detection accuracy in complex scenarios.
[0004] Therefore, this application proposes a solution to the above-mentioned problems. Summary of the Invention
[0005] The embodiments of this application provide a training method and a detection method for a remote sensing image change detection model, which can solve the problems of poor generalization ability, insufficient robustness and low detection accuracy of existing models in complex scenarios.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to one aspect of the embodiments of this application, a method for training a remote sensing image change detection model is provided, the method comprising: Obtain a training dataset, wherein the training dataset includes multiple initial samples, each initial sample including a sample image pair, the location coordinates of the sample image pair, the land cover type of the sample image pair, and a label; the sample image pair includes a previous time image and a subsequent time image at the same location coordinates; the label is used to indicate whether the land cover type of the previous time image and the land cover type of the subsequent time image are consistent; Based on the constraint feature information of unchanged ground features, the initial negative samples in the training dataset are filtered to obtain a target negative sample set, and a portion of negative samples are selected from the target negative sample set to construct a training negative sample set; wherein, the initial negative samples are initial samples in the training dataset whose ground feature types in the previous time image and the subsequent time image are consistent. At least a portion of the initial positive samples are selected from the training dataset to construct a training positive sample set; wherein, the initial positive samples are initial samples in the training dataset where the land cover types of the previous time image and the land cover types of the subsequent time image are inconsistent; The candidate detection model is trained using the training negative sample set, the training positive sample set, and the pre-built neural network model. The precision and recall of the candidate detection model are then obtained based on the validation dataset. If the precision does not meet the first threshold or the recall does not meet the second threshold, the number of negative samples in the training negative sample set is adjusted, and the candidate detection model is trained again based on the training positive sample set and the adjusted training negative sample set. If the precision meets the first threshold and the recall meets the second threshold, then the candidate detection model is determined as a remote sensing image change detection model, wherein the remote sensing image change detection model is used to detect whether the land cover type in the remote sensing image has changed.
[0008] In some embodiments of this application, adjusting the number of negative samples in the training negative sample set if the precision does not meet a first threshold or the recall does not meet a second threshold includes: If the precision does not meet the first threshold, the first similarity between the backup negative sample and the misjudged verification sample is obtained, and the backup negative sample is added to the training negative sample set according to the first preset ratio and the first similarity level. The backup negative sample is a negative sample in the target negative sample set that was not used to construct the training negative sample set. The misjudged verification sample is a sample in the verification dataset whose actual label is that the land cover type in the previous image and the land cover type in the subsequent image are the same, but is identified by the candidate detection model as having a different land cover type in the previous image and the subsequent image. If the recall rate does not meet the second threshold, then the second similarity between the negative samples in the training negative sample set and the change verification samples is obtained, and the negative samples in the training negative sample set are removed according to the second preset ratio and the second similarity. The change verification samples are samples in the verification dataset whose actual labels are inconsistent between the land cover types in the previous image and the land cover types in the subsequent image, but which are identified by the candidate detection model as having consistent land cover types in the previous image and the subsequent image.
[0009] In some embodiments of this application, the constraint feature information includes a preset screening ratio corresponding to each unchanged land cover type in each land cover type region; The step of filtering the initial negative samples in the training dataset based on the constraint feature information of unchanged land features to obtain the target negative sample set includes: According to the land cover type region to which the location coordinates of the initial negative sample belong, the initial negative samples in the training dataset are divided into multiple initial negative sample groups, and the initial negative samples in the same initial negative sample group belong to the same land cover type region. For each initial negative sample group, the target preset screening ratio corresponding to each unchanged land cover type in the initial negative sample group is obtained according to the preset information database, and the target number of negative samples to be selected in the initial negative sample group is obtained. The preset information database stores multiple different land cover type regions, the unchanged land cover types in each land cover type region, the preset screening ratio corresponding to each unchanged land cover type in each land cover type region, and the number of negative samples to be selected in each land cover type region. For each initial negative sample group, the product of the target preset screening ratio and the target number of negative samples to be selected is obtained to get the target number of negative samples for each unchanged land cover type in the initial negative sample group. Based on the unchanged land cover type and the target number of negative samples, the first candidate negative samples are selected from the initial negative sample group to obtain the first candidate negative sample set. Based on the first candidate negative sample set, the target negative sample set is obtained.
[0010] In some embodiments of this application, the constraint feature information includes the spectral feature range of the unchanged land cover type; The step of obtaining the target negative sample set based on the first candidate negative sample set includes: Obtain the target spectral features of the first candidate negative sample in the first candidate negative sample set; Based on the target spectral characteristics and the spectral characteristic range of the unchanged land cover type, a second candidate negative sample is selected to obtain a second candidate negative sample set. The target negative sample set is obtained based on the second candidate negative sample set.
[0011] In some embodiments of this application, the constraint feature information includes the unchanging area feature range of unchanging features; Obtaining the target negative sample set based on the second candidate negative sample set includes: Based on the land cover type of the second candidate negative sample in the second candidate negative sample set, obtain the target unchanging area characteristics of the second candidate negative sample; Based on the characteristics of the target unchanging area and the range of the unchanging area characteristics of the unchanging land features, a third candidate negative sample is selected to obtain a third candidate negative sample set. The target negative sample set is obtained based on the third candidate negative sample set.
[0012] In some embodiments of this application, the constraint feature information includes a vector map, which includes verification image pairs corresponding to historically verified unchanged land features, and verification location coordinates corresponding to the historically verified unchanged land features. Obtaining the target negative sample set based on the third candidate negative sample set includes: Based on the position coordinates of the third candidate negative sample in the third candidate negative sample set, the third candidate negative sample is superimposed on the vector image, and the third candidate negative sample whose position coordinates fall into the verification position coordinates and whose image pair features are consistent with the verification image pair features is selected as the fourth candidate negative sample, thus obtaining the fourth candidate negative sample set. The target negative sample set is obtained based on the fourth candidate negative sample set.
[0013] In some embodiments of this application, the constraint feature information includes an actual map, which includes actual image pairs of features corresponding to actual recorded unchanging features, and actual location coordinates corresponding to the actual recorded unchanging features. Obtaining the target negative sample set based on the fourth candidate negative sample set includes: The fourth candidate negative sample in the fourth candidate negative sample set is compared with the actual map, and the fourth candidate negative sample whose position coordinates fall into the actual position coordinates and whose image pair features are consistent with the actual image pair features corresponding to the actual position coordinates is selected as the target negative sample, thus obtaining the target negative sample set.
[0014] In some embodiments of this application, the preset screening ratio is determined by the priority of the unchanged land feature types corresponding to each land feature type area; the land feature type areas include cultivated land areas and building areas; the highest priority of the unchanged land feature types in the cultivated land area is cultivated land and the second highest priority is orchard; the highest priority of the unchanged land feature types in the building area is buildings, the second highest priority is roads and the lowest priority is green space. The spectral features include reflectance values in the near-infrared band; the non-changing region features include edge smoothness and gray-level co-occurrence matrix.
[0015] In some embodiments of this application, obtaining the training dataset includes: Obtain an initial training set, and perform radiation normalization processing on the initial training set to obtain a radiation-normalized training set; Based on the geographic coordinate information and quadratic polynomial fitting of the initial training set, the radiatively normalized training set is geometrically refined to obtain a standardized training set. The training dataset is obtained by augmenting the standardized training set using one or more of the following methods: random horizontal flipping, random vertical flipping, random rotation, random cropping, brightness adjustment, and contrast adjustment.
[0016] According to one aspect of the embodiments of this application, a method for detecting changes in remote sensing images is provided, the method comprising: The image pair to be detected is input into the remote sensing image change detection model to obtain the detection result of whether the land cover type of the previous time image and the land cover type of the later time image of the image pair are consistent; wherein, the remote sensing image change detection model is determined by the remote sensing image change detection model training method described above.
[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the at least one piece of program code being loaded and executed by a processor to implement the method described above.
[0018] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device including one or more processors and one or more memories, the one or more memories storing at least one piece of program code, the at least one piece of program code being loaded and executed by the one or more processors to implement the method as described above.
[0019] Based on the above solution, the technical solution provided in this application has at least the following advantages and advancements: This application constructs a training dataset containing sample image pairs, their location coordinates, land cover types, and labels. Based on the constrained feature information of unchanged land cover types (such as the preset screening ratio for each unchanged land cover type in each land cover type region, the spectral feature range of unchanged land cover types, the non-changing area feature range of unchanged land cover types, vector maps containing historically verified unchanged land cover types, and actual maps containing actually recorded unchanged land cover types), the initial negative samples in the training dataset are precisely screened to obtain a target negative sample set. A portion of the negative samples from the target negative sample set is then selected to construct the training dataset. The method involves training a negative sample set by selecting an appropriate number of negative samples for initial training to facilitate subsequent adjustments to the number of negative samples. A training positive sample set is constructed using at least a portion of the initial positive samples from the training dataset. The model is then trained using both the training negative and positive sample sets to obtain a candidate detection model. The precision and recall of the candidate detection model are obtained using a validation dataset. Based on the precision and recall of the validation dataset, the number of negative samples in the training negative sample set (i.e., the ratio of positive to negative samples used for training) is dynamically adjusted until the model performance meets the preset thresholds corresponding to precision and recall, thus obtaining a remote sensing image change detection model. This method, by introducing a negative sample selection mechanism and dynamically iterating the positive-to-negative sample ratio, effectively improves the model's generalization ability and robustness in complex scenarios, significantly enhancing the accuracy of change detection.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 1 ; Figure 2 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 2 ; Figure 3 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 3 ; Figure 4 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 4 ; Figure 5Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 5 ; Figure 6 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 6 ; Figure 7 A schematic diagram of the training device for the remote sensing image change detection model provided in this application; Figure 8 This is a schematic diagram of the structure of a computer system for an electronic device provided in this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0024] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0025] The flowchart shown in the attached diagram is illustrative and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the actual situation.
[0026] It should also be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such uses of the terms can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described.
[0027] In the field of geographic information and environmental monitoring, remote sensing imagery, with its unique advantages such as hyperspectral density, high spatial resolution, and multi-temporal observation, has become a core source of data acquisition and analysis, and is widely used in many key areas such as dynamic land use monitoring, ecological environment assessment, natural disaster emergency response, and urban planning. However, these characteristics of remote sensing imagery also present many unavoidable challenges for deep learning models in the practical application of intelligent change detection in remote sensing imagery. From the perspective of ground feature recognition, the same ground feature can exhibit drastically different spectral characteristics due to seasonal changes, variations in lighting conditions, and differences in atmospheric conditions. From a data processing perspective, remote sensing imagery data is extremely massive. A single high-spatial-resolution remote sensing image can contain hundreds of megabytes or even gigabytes of data; if it involves multi-temporal images of a large area, the total data volume is even more staggering. Traditional deep learning models often require a large amount of computing resources when processing such large-scale data, placing extremely high demands on hardware (such as high-performance graphics cards and large-capacity memory) and leading to low training efficiency. Sometimes, the complete training process of a model may take several days or even weeks, which seriously affects the application progress of remote sensing change detection technology in actual business, especially in emergency scenarios where change detection results need to be obtained quickly, this efficiency bottleneck is even more prominent.
[0028] Against this backdrop, the importance of negative samples is becoming increasingly prominent. As the core carrier for models to learn features of normal scenarios and construct the boundary between changed and unchanged characteristics, the selection and optimization of negative samples directly determine the detection accuracy, generalization ability, and robustness of deep learning models. If negative samples are selected inappropriately, such as containing a large number of samples with abnormal features or those that do not match the business scenario, the model will be unable to accurately grasp the features of normal scenarios, and will easily lead to misjudgments or missed judgments when facing complex real-world scenarios.
[0029] Unfortunately, current systematic designs for negative samples still have significant shortcomings. Most existing technologies focus on improving network architecture or expanding training datasets, neglecting the fundamental impact of negative sample quality and distribution on model performance. This bias results in models with poor generalization ability and insufficient robustness in complex scenarios. Furthermore, the excessive computational resource requirements of these models make it difficult for frontline operational departments to meet their practical application needs. These departments are often limited by budget and hardware conditions, unable to equip themselves with high-performance computing devices, thus hindering the widespread adoption of advanced remote sensing change detection technologies. Therefore, how to conduct systematic dynamic iteration of negative samples and model size has become an urgent need to overcome the current bottlenecks in the development of remote sensing change detection technologies.
[0030] To address the core issues of quantity imbalance and inconsistent quality of negative samples in intelligent change detection of remote sensing images, this application proposes the following technical solution.
[0031] Figure 1 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 1 ,like Figure 1 As shown, the method includes: S101. Obtain the training dataset, which includes multiple initial samples. Each initial sample includes a sample image pair, the location coordinates of the sample image pair, the land cover type of the sample image pair, and the label. The sample image pair includes a previous time image and a subsequent time image at the same location coordinates. The label is used to indicate whether the land cover type of the previous time image and the land cover type of the subsequent time image are consistent.
[0032] During the data preparation phase, training, validation, and test datasets can be pre-acquired. These datasets can be selected from existing remote sensing image sample databases. Each sample in the training, validation, and test datasets includes a sample image pair, the location coordinates of the sample image pair, the land cover type of the sample image pair, and a label. The images in these samples are segmented images (e.g., each image is 512×512 pixels), and a sample generally includes only one type of land cover. The preceding and subsequent images in a sample image pair are images taken at the same location coordinates at different times; for example, the preceding image was taken in 2015, and the subsequent image was taken in 2018. The label records whether the land cover type in the subsequent image has changed relative to the preceding image, such as whether the preceding and subsequent images are identical.
[0033] The samples selected from the remote sensing image sample database need to undergo preprocessing. For the samples used to construct the training dataset: For example, an initial training set is obtained, and the initial training set is subjected to radiation normalization to obtain a radiation normalized training set. Based on the geographic coordinate information and quadratic polynomial fitting of the initial training set, the radiatively normalized training set is geometrically refined to obtain a standardized training set. The training dataset is obtained by augmenting the standardized training set using one or more of the following methods: random horizontal flipping, random vertical flipping, random rotation, random cropping, brightness adjustment, and contrast adjustment.
[0034] The initial training set is a collection of samples selected from the remote sensing image sample database. Correspondingly, the validation dataset and the test dataset have initial validation sets and initial test sets, which are also collections of samples selected from the remote sensing image sample database. Both the initial validation set and the initial test set are standardized, i.e., radiometric normalization and geometric correction are performed, but no data augmentation is performed, to ensure that the validation and test data closely match the real data to be tested.
[0035] S102. Based on the constraint feature information of unchanged ground features, the initial negative samples in the training dataset are filtered to obtain the target negative sample set, and a portion of the negative samples are selected from the target negative sample set to construct the training negative sample set; wherein, the initial negative samples are the initial samples in the training dataset whose ground feature types in the previous time image and the ground feature types in the subsequent time image are consistent.
[0036] The constraint feature information may include pre-configured first sub-constraints, second sub-constraints, third sub-constraints, fourth sub-constraints, and fifth sub-constraints. The first sub-constraint includes a preset screening ratio corresponding to each unchanged land cover type region in each land cover type region. Additionally, there is a corresponding preset information database, which stores multiple different land cover type regions, the unchanged land cover types in each land cover type region, the preset screening ratio corresponding to each unchanged land cover type region, and the number of candidate negative samples for each land cover type region. The preset screening ratio is the ratio of the number of candidate negative samples for a single unchanged land cover type in the same land cover type region to the number of candidate negative samples for the same unchanged land cover type region. The ratio of the number of candidate negative samples in the same land cover type region is predetermined by the priority of each unchanged land cover type in each region. The second sub-constraint includes the spectral feature range of the unchanged land cover type; the third sub-constraint includes the non-changing region feature range of the unchanged land cover; the fourth sub-constraint is the vector map, which includes the features of verified image pairs corresponding to historically verified unchanged land cover types, and the verification location coordinates of the historically verified unchanged land cover types; the fifth sub-constraint is the actual map, which includes the features of actual image pairs corresponding to actually recorded unchanged land cover types, and the actual location coordinates of the actually recorded unchanged land cover types. Based on at least one of the above constraint features, negative samples falling within the constraint range are selected from the initial negative samples in the training dataset to construct the target negative sample set.
[0037] The selection order of the aforementioned sub-constraints can be as follows: The fifth sub-constraint is placed last, and the remaining four sub-constraints are arbitrarily ordered. The selection of the current sub-constraint can be based on the candidate negative samples obtained from the previous sub-constraint selection, or some sub-constraints can be considered as parallel relationships. If parallel sub-constraints result in duplicate candidate negative samples, one of these duplicate candidates is selected to construct the training negative sample set. Since the target negative sample set contains a large number of negative samples, a subset can be selected from the target negative sample set to construct the training negative sample set. This process, through precise negative sample selection, provides an accurate data foundation for model training.
[0038] S103. Select at least a portion of the initial positive samples from the training dataset to construct a training positive sample set; wherein, the initial positive samples are the initial samples in the training dataset where the land cover types of the previous time images and the land cover types of the subsequent time images are inconsistent.
[0039] The number of initial positive samples in the training dataset is much smaller than the number of initial negative samples, and also much smaller than the number of negative samples in the training negative sample set. Therefore, some or all of the initial positive samples in the training dataset can be selected to construct the training positive sample set.
[0040] S104. Train the candidate detection model based on the training negative sample set, the training positive sample set, and the pre-built neural network model, and obtain the precision and recall of the candidate detection model based on the validation dataset.
[0041] The constructed training positive sample set and training negative sample set are input into the pre-constructed neural network model for training. The training is divided into multiple stages. After each stage of training, the current candidate detection model is obtained. Then, the precision and recall of the current candidate detection model are obtained through the validation dataset, which can be used as the basis for adjusting the number of negative samples later.
[0042] S105. If the precision does not meet the first threshold or the recall does not meet the second threshold, the number of negative samples in the training negative sample set is adjusted, and the candidate detection model is trained again based on the training positive sample set and the adjusted training negative sample set.
[0043] S106. If the precision meets the first threshold and the recall meets the second threshold, then the candidate detection model is determined as the remote sensing image change detection model, wherein the remote sensing image change detection model is used to detect whether the land cover type in the remote sensing image has changed.
[0044] If either precision or recall fails to meet its corresponding threshold (the first and second thresholds can have different values), the number of negative samples in the training negative sample set used to train the model is adjusted (i.e., the ratio of positive to negative samples is adjusted). The adjusted training negative sample set is then used as input to the current candidate detection model and enters the next stage of training for the candidate detection model until both precision and recall meet their corresponding thresholds. This process improves the accuracy of model training by dynamically adjusting the ratio of negative samples.
[0045] Figure 2 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 2 ,like Figure 2 As shown, the method includes: S201. If the precision does not meet the first threshold, the first similarity between the backup negative sample and the misjudged verification sample is obtained, and the backup negative sample is added to the training negative sample set according to the first preset ratio and the first similarity level. The backup negative sample is a negative sample in the target negative sample set that was not used to construct the training negative sample set. The misjudged verification sample is a sample in the verification dataset whose actual label is the same for the land cover type in the previous image and the land cover type in the subsequent image, but is identified by the candidate detection model as having a different land cover type in the previous image and the subsequent image.
[0046] The first preset ratio is the ratio between the number of negative samples to be added and the number of positive samples in the training positive sample set. If the precision does not meet the first threshold, the first similarity between the backup negative samples and the misjudged verification samples is calculated. The first preset ratio is multiplied by the number of positive samples in the training positive sample set to obtain the target number of negative samples to be added. Based on the order of the first similarity corresponding to the backup negative samples from high to low, the backup negative samples of the target number of negative samples to be added are selected to obtain the negative samples to be added. The negative samples to be added are then added to the training negative sample set.
[0047] For example, the range of the first preset ratio can be set to 10%-20% (10%, 20%, or any percentage between 10% and 20%). If the number of positive samples in the current stage training positive sample set is M, and the first preset ratio is set to 15%, then the target number of negative samples to be added is 15%×M. The backup negative samples are sorted from high to low according to the first similarity, and the first 15%×M backup negative samples are selected as negative samples to be added to the current stage training negative sample set to obtain the adjusted training negative sample set.
[0048] S202. If the recall rate does not meet the second threshold, the second similarity between the negative samples in the training negative sample set and the change verification samples is obtained, and the negative samples in the training negative sample set are removed according to the second preset ratio and the second similarity. The change verification samples are samples in the verification dataset whose actual labels are inconsistent between the land cover type in the previous image and the land cover type in the subsequent image, but which are identified by the candidate detection model as having the same land cover type in the previous image and the subsequent image.
[0049] The second preset ratio is the ratio between the number of negative samples to be deleted and the number of positive samples in the training positive sample set. If the recall rate does not meet the second threshold, the second similarity between the negative samples in the training negative sample set and the change verification samples is calculated. The second preset ratio is then multiplied by the number of positive samples in the training positive sample set to obtain the target number of negative samples to be deleted. Based on the second similarity scores of the negative samples in the training negative sample set, from high to low, the target number of negative samples to be deleted from the training negative sample set are deleted. Negative samples deleted from the training negative sample set can also be marked in the target negative sample set to avoid being used as backup negative samples, or negative samples deleted from the training negative sample set can also be deleted in the target negative sample set.
[0050] For example, the range of the second preset ratio can be set to 10%-15% (10%, 15%, or any percentage between 10% and 15%). If the number of positive samples in the current training positive sample set is M, and the second preset ratio is set to 12%, then the target number of negative samples to be deleted is 12%×M. The negative samples in the training negative sample set are sorted from high to low according to the second similarity, and the first 12%×M negative samples in the training negative sample set are selected for deletion to obtain the adjusted training negative sample set.
[0051] During the negative sample adjustment process, the ratio of the number of negative samples to the number of positive samples used for training is limited to a preset range (e.g., 10%-300%).
[0052] Figure 3 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 3 ,like Figure 3 As shown, the method includes: S301. According to the land cover type region to which the location coordinates of the initial negative sample belong, divide the initial negative samples in the training dataset into multiple initial negative sample groups. The initial negative samples in the same initial negative sample group belong to the same land cover type region.
[0053] The constraint feature information includes the preset screening ratio (first sub-constraint) corresponding to each unchanged land cover type in each land cover type region. The initial negative sample screening is constrained by the preset screening ratio corresponding to each unchanged land cover type in each land cover type region. A land use type map can be used to pre-determine the type of land cover (e.g., cultivated land or building area). Each land cover type area corresponds to a certain coordinate range. Each land cover type area can correspond to at least one unchanging land cover type. For example, the unchanging land cover types in a cultivated land area include cultivated land and orchards. Different types of land cover types may have the same type of unchanging land cover types. For example, both cultivated land and building areas can have buildings as unchanging land cover types. The pre-selected screening ratio of the same type of unchanging land cover types can be different in different types of land cover type areas, and the pre-selected screening ratio of different types of unchanging land cover types can be different in the same type of land cover type area.
[0054] The preset filtering ratio is related to the land cover type region and the unchanged land cover type corresponding to the land cover type region. Therefore, the initial negative samples are grouped and filtered according to the land cover type region: Based on the location coordinates of each initial negative sample, the land cover type region to which each initial negative sample belongs is determined; initial negative samples belonging to the same land cover type region are divided into the same initial negative sample group.
[0055] S302. For each initial negative sample group, obtain the target preset screening ratio corresponding to each unchanged land cover type in the initial negative sample group according to the preset information database, and obtain the target number of negative samples to be selected in the initial negative sample group. The preset information database stores multiple different land cover type areas, the unchanged land cover types in each land cover type area, the preset screening ratio corresponding to each unchanged land cover type in each land cover type area, and the number of negative samples to be selected in each land cover type area.
[0056] For each initial negative sample group, i.e., within the same land cover type region: based on the unchanging land cover types corresponding to the land cover type region and the preset screening ratio corresponding to the unchanging land cover types pre-stored in the preset information database, obtain the unchanging land cover types corresponding to the initial negative sample group and the target preset screening ratio corresponding to the unchanging land cover types; based on the number of candidate negative samples corresponding to the land cover type region pre-stored in the preset information database, obtain the target number of candidate negative samples corresponding to the initial negative sample group.
[0057] For example, the preset screening ratio is determined by the priority of the unchanged land feature types corresponding to each land feature type area; the land feature type areas include cultivated land areas and building areas; the highest priority of the unchanged land feature types in the cultivated land area is cultivated land and the second highest priority is orchard; the highest priority of the unchanged land feature types in the building area is building, the second highest priority is road and the lowest priority is green space.
[0058] The preset screening percentage is the ratio of the number of candidate negative samples of a single unchanged land cover type in a region of the same land cover type to the total number of candidate negative samples in the same land cover type region. For each land cover type region, the preset screening percentage of each unchanged land cover type in that region is related to the priority of the unchanged land cover type in that region. For example, in a cultivated land region, the priority of unchanged land cover types is cultivated land > orchard, orchard > others (such as buildings). Therefore, the preset screening percentage of cultivated land in the cultivated land region is greater than that of orchard, and the preset screening percentage of orchard is greater than that of buildings. Assuming there are N candidate negative samples in a cultivated land region, and the preset screening percentage of cultivated land is 50%, the preset screening percentage of orchard is 30%, and the preset screening percentage of buildings is 20%, then the target preset screening percentage of cultivated land belonging to the initial negative sample group of the cultivated land region is 50%, the target preset screening percentage of orchard is 30%, and the target preset screening percentage of buildings is 20%, and the target number of candidate negative samples belonging to the initial negative sample group of the cultivated land region is N.
[0059] S303. For each initial negative sample group, obtain the product of the target preset screening ratio and the number of target candidate negative samples to obtain the number of target negative samples for each unchanged land cover type in the initial negative sample group, and select the first candidate negative sample from the initial negative sample group based on the unchanged land cover type and the number of target negative samples to obtain the first candidate negative sample set.
[0060] For example, the target negative sample number for cultivated land in the initial negative sample group belonging to cultivated land area is 50%×N, the target negative sample number for orchard in the initial negative sample group belonging to cultivated land area is 30%×N, and the target negative sample number for buildings in the initial negative sample group belonging to cultivated land area is 20%×N. Based on these unchanged land feature types and the target negative sample number, the first candidate negative sample is selected from the initial negative sample group belonging to cultivated land area to obtain the first candidate negative sample set. The same applies to the initial negative sample groups for other land feature types.
[0061] S304. Based on the first candidate negative sample set, obtain the target negative sample set.
[0062] The target negative sample set is obtained by selecting a portion of negative samples from the first candidate negative sample set; the process of selecting a portion of negative samples from the first candidate negative sample set can also be based on other constraint feature information.
[0063] Figure 4 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 4 ,like Figure 4 As shown, the method includes: S401. Obtain the target spectral features of the first candidate negative sample in the first candidate negative sample set.
[0064] The constrained feature information includes the spectral feature range of unchanged land cover types; for example, the spectral features include reflectance values in the near-infrared band.
[0065] S402. Based on the spectral characteristics of the target and the spectral characteristic range of the unchanged land cover type, select the second candidate negative samples to obtain the second candidate negative sample set.
[0066] If the target spectral features of the first candidate negative sample fall within the spectral feature range of the unchanged land cover type, then the first candidate negative sample is selected as the second candidate negative sample, and the second candidate negative sample is used to construct the second candidate negative sample set.
[0067] S403. Based on the second candidate negative sample set, obtain the target negative sample set.
[0068] A subset of negative samples is selected from the second candidate negative sample set to obtain the target negative sample set; the process of selecting a subset of negative samples from the second candidate negative sample set can also be based on other constraint feature information.
[0069] Figure 5 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 5 ,like Figure 5 As shown, the method includes: S501. Based on the land cover type of the second candidate negative sample in the second candidate negative sample set, obtain the target unchanging area characteristics of the second candidate negative sample.
[0070] Constraint feature information includes the range of unchanging regional features of unchanged features; for example, unchanging regional features include edge smoothness and gray-level co-occurrence matrix.
[0071] Edge smoothness is used to quantify water samples, while gray-level co-occurrence matrix is used to quantify forest samples. Edge smoothness is generally not used to quantify forest samples, and gray-level co-occurrence matrix is generally not used to quantify water samples.
[0072] For example, if the land cover type of the second candidate negative sample in the second candidate negative sample set is determined to be forest, the target gray-level co-occurrence matrix of the second candidate negative sample (the target non-changing area feature of forest) can be further calculated. If the land cover type of the second candidate negative sample in the second candidate negative sample set is determined to be water, the target edge smoothness of the second candidate negative sample (the target non-changing area feature of water) can be further calculated.
[0073] S502. Based on the characteristics of the target unchanging area and the range of the unchanging area characteristics of the unchanging land features, select the third candidate negative sample and obtain the third candidate negative sample set.
[0074] If the target unchanging region feature of the second candidate negative sample falls within the range of the unchanging region features of the unchanging ground features, then the second candidate negative sample is selected as the third candidate negative sample, and the third candidate negative sample set is constructed using the third candidate negative sample. For example, if the target gray-level co-occurrence matrix of the second candidate negative sample falls within the range of the gray-level co-occurrence matrix of the unchanging ground features, then the second candidate negative sample is selected as the third candidate negative sample.
[0075] S503. Based on the third candidate negative sample set, obtain the target negative sample set.
[0076] The target negative sample set is obtained by selecting a portion of negative samples from the third candidate negative sample set; the process of selecting a portion of negative samples from the third candidate negative sample set can also be based on other constraint feature information.
[0077] Figure 6 Schematic diagram of the training method for the remote sensing image change detection model provided in this application Figure 6 ,like Figure 6 As shown, the method includes: S601. Based on the position coordinates of the third candidate negative sample in the third candidate negative sample set, the third candidate negative sample is superimposed on the vector image, and the third candidate negative sample whose position coordinates fall into the verification position coordinates and whose image pair features are consistent with the verification image pair features is selected as the fourth candidate negative sample, thus obtaining the fourth candidate negative sample set.
[0078] The constraint feature information includes a vector map, which includes verification image pairs corresponding to historically verified unchanged features, as well as the verification location coordinates corresponding to historically verified unchanged features. The third candidate negative sample is overlaid with the vector image based on the location coordinates. The third candidate negative sample whose location coordinates fall into the verification location coordinates and whose image pair features are consistent with the verification image pair features is selected as the fourth candidate negative sample, thus obtaining the fourth candidate negative sample set.
[0079] The vector map is larger than the third candidate negative sample size, meaning the vector map can be an unsegmented complete image. The vector map is marked with the location ranges corresponding to historically verified unchanged features (such as a bounding box). The coordinate system of the vector map is consistent with the coordinate system of the third candidate negative sample. If they are inconsistent, they can be converted to be consistent. The initial sample is mapped to the vector map according to its location coordinates. It is determined whether the third candidate negative sample falls within the location range corresponding to the unchanged feature, and whether the image pair features of the third candidate negative sample are consistent with the features of the verified image pair at the location on the vector map. If both conditions are met, the third candidate negative sample is determined to be a reliable unchanged sample and can be used to construct the fourth candidate negative sample set.
[0080] S602. Based on the fourth candidate negative sample set, obtain the target negative sample set.
[0081] The target negative sample set is obtained by selecting a portion of negative samples from the fourth candidate negative sample set; the process of selecting a portion of negative samples from the fourth candidate negative sample set can also be based on other constraint feature information.
[0082] For example, the constraint feature information includes the actual map, which includes actual image pairs of features corresponding to the actual recorded unchanged features, and the actual location coordinates of the actual recorded unchanged features. Based on the fourth candidate negative sample set, the target negative sample set is obtained, including: The fourth candidate negative sample in the fourth candidate negative sample set is compared with the actual map. The fourth candidate negative sample whose location coordinates fall into the actual location coordinates and whose image pair features are consistent with the actual image pair features corresponding to the actual location coordinates is selected as the target negative sample, thus obtaining the target negative sample set.
[0083] The actual map is also a complete map with a size larger than that of the fourth candidate negative sample. The method for selecting the fourth candidate negative sample based on the actual map can be referred to the method for selecting the third candidate negative sample from the vector map above, which will not be repeated here.
[0084] The change detection method based on the remote sensing image change detection model obtained in the above manner is as follows: For example, the image pair to be detected is input into the remote sensing image change detection model to obtain the detection result of whether the land cover type of the previous time image and the land cover type of the later time image of the image pair are consistent; wherein, the remote sensing image change detection model is determined by the remote sensing image change detection model training method described above.
[0085] The following are specific implementation examples based on actual data: Step 1: Data Preprocessing Data preprocessing is a fundamental step in ensuring the training quality of remote sensing image change detection models. It mainly includes image standardization, data augmentation, and dataset partitioning. The specific process is as follows: Image standardization processing: First, radiometric normalization is performed on the remote sensing images (such as samples in the training dataset) to eliminate spectral deviations caused by differences in illumination and atmospheric conditions between images from different time periods. Second, geometric correction is performed. Using the geographic coordinates inherent in the dataset to which the remote sensing images belong (such as the training dataset), quadratic polynomial fitting is used to eliminate geometric distortions in the images, ensuring accurate spatial matching of multi-temporal images with an error controlled within 1 pixel.
[0086] Data augmentation: To improve the model's generalization ability and avoid overfitting, various data augmentation methods can be applied to the training dataset images. Different data augmentation methods include random horizontal flipping (50% probability), random vertical flipping (50% probability), random rotation (angle range -15° to 15°, step size 1°, ° is the angle unit), random cropping (crop size 512×512 pixels, ensuring complete inclusion of ground features), and brightness and contrast adjustment (brightness variation range ±10%, contrast variation range ±15%). One or more of these data augmentation methods can be selected for data augmentation. Augmentation operations are only applied to the training dataset; the validation dataset and test dataset remain in their original state to ensure the authenticity of the evaluation results.
[0087] Dataset partitioning: The dataset was divided into training, validation, and test datasets in a 7:2:1 ratio. The training dataset was used for model parameter learning, the validation dataset for dynamic adjustment using negative samples and intermediate evaluation of model performance, and the test dataset for final detection accuracy verification. Stratified random sampling was used during the partitioning process to ensure consistent distribution of object types across datasets, avoiding any impact on model generalization ability due to data distribution bias.
[0088] Step 2: Construct a negative sample prior sample knowledge base The prior knowledge base for negative samples is the core support for achieving accurate negative sample screening. By integrating prior knowledge from multiple sources, a structured and quantifiable knowledge system is constructed. The specific construction process is as follows: Knowledge Dimension Determination and Data Collection: This involves defining multiple knowledge dimensions (constraint feature information) including geospatial constraints (first sub-constraint), imaging mechanism constraints (second sub-constraint), expert rules (third sub-constraint), historical change data (fourth sub-constraint), and crowdsourced geographic data (fifth sub-constraint). Geospatial constraints include administrative division maps of the study area, 1:10000 land use type maps, and Digital Elevation Model (DEM) topographic data. Imaging mechanism constraints include sensor technical parameters (band range, spatial resolution, radiometric accuracy) of the Landsat-8 Operational Land Imager (Landsat-8 OLI) and spectral reflectance curves of unchanged features. Expert rules include the characteristics of unchanging areas labeled with unchanging features based on the extensive experience of experts in remote sensing change detection. Historical change data includes manually verified change detection patches and vector data (vector maps) of unchanged areas from the past five years. Crowdsourced geographic data includes the latest vector data (including elements such as buildings, roads, and water bodies) from sources such as Tianditu (actual maps). Geospatial constraints can be used to delineate and identify regions with different land cover types.
[0089] Knowledge quantification and structured storage: Knowledge from various dimensions is transformed into calculable and callable quantified rules, and structured storage is performed using a relational database. Geospatial constraints are quantified as the priority of unchanged land cover types in different land cover types, and the preset screening ratio of each unchanged land cover type in each land cover type region; imaging mechanism constraints are quantified as the band reflectance range of unchanged land cover types; expert rules are quantified as the characteristic parameter range of unchanged land cover types; historical change data is quantified as historically verified coordinates of unchanged areas and the corresponding characteristic information of unchanged areas; crowdsourced geographic data is quantified as the actual recorded coordinates of unchanged areas and the corresponding characteristic information of unchanged areas. The database is equipped with a knowledge update interface to support knowledge iteration every quarter based on the latest data.
[0090] Based on the constructed multi-source prior knowledge base, negative samples are screened from multiple knowledge dimensions, including geospatial constraints, imaging mechanism constraints, expert rules, historical change data, and crowdsourced geographic data. This ensures the feature effectiveness and business adaptability of negative samples from the source. The specific steps are as follows: 1. Filtering based on geospatial constraints Based on the geospatial characteristics of the study area, the priority of negative sample land cover types in different areas is determined, and the specific operational procedures are as follows: Step 1: Perform spatial overlay analysis between the land use type map of the study area and the initial negative samples of the training dataset to determine the land cover type region (such as cultivated land region, building region, forest region, etc.) to which each initial negative sample belongs.
[0091] Step 2: Based on the geospatial constraints in the knowledge base, determine the priority rules for negative sample feature types in different regions. For example, in county-level areas with concentrated arable land (or arable land areas), negative samples should primarily consist of farmland features, with the priority order of unchanged feature types being: arable land > orchards > others (such as buildings); in urban core areas (or building areas), negative samples should primarily consist of urban features such as buildings, roads, and green spaces, with the priority order of unchanged feature types being: buildings > roads > green spaces > others. Regarding the case where "other" features are included in the priority: other unchanged feature types can be one or more categories. If there are multiple categories, all these unchanged feature types can be treated as "other" and a preset filtering percentage can be set. Alternatively, these unchanged feature types can be prioritized individually, and corresponding preset filtering percentages can be set for each.
[0092] Step 3: Filter the initial negative samples in the training dataset according to priority rules, retaining high-priority initial negative samples and removing those with an excessive proportion of low-priority samples. For example, in cultivated land areas, if the proportion of samples containing buildings in the initial negative samples exceeds the target preset screening proportion by 20%, some initial negative samples with a building proportion exceeding this proportion will be removed. This ensures that the spatial distribution of the initial negative samples is consistent with the dominant land cover types in the study area, reducing interference from irrelevant land cover types on model training. The retained initial negative samples will be used as the first candidate negative samples.
[0093] 2. Screening based on imaging mechanism constraints Based on the technical parameters of the remote sensing sensor used and the radiometric correction standards for multi-temporal images, the spectral characteristic range of negative samples is determined, and samples with abnormal spectral characteristics are removed. Specific steps include: Step 1: Obtain the technical parameters of the remote sensing sensor used. Taking the OLI sensor of the Landsat-8 satellite as an example, its near-infrared wavelength range is 0.845-0.885 μm (micrometers). Based on the imaging mechanism constraints in the knowledge base, determine the reflectance range of unchanged ground objects in this near-infrared band. The imaging mechanism constraints can also include the reflectance range of unchanged ground objects in the red band.
[0094] Step 2: Extract the spectral features of the first candidate negative sample and calculate the reflectance value of each first candidate negative sample in each key band (such as near-infrared band and red band).
[0095] Step 3: Compare the actual reflectance value of the first candidate negative sample with the reflectance range of unchanged land features in the knowledge base. If the reflectance of the first candidate negative sample exceeds the reflectance range of the corresponding land feature type, it is determined to be a sample with abnormal spectral characteristics and is removed. The retained first candidate negative sample is used as the second candidate negative sample.
[0096] 3. Filtering based on expert rules and historical change data By combining domain expert knowledge with validated historical change data, the quality of negative samples can be further optimized. Specific steps include: Step 1: Transform the non-changing region features annotated by domain experts into quantification rules. For example, the edge smoothness of water samples (measured by calculating the gradient change value of edge pixels) should be less than 0.3, and the gray-level co-occurrence matrix contrast of forest samples should be between 10 and 30.
[0097] Step 2: For the second candidate negative samples selected based on geospatial and imaging mechanism constraints, feature verification is performed according to the aforementioned expert rules, and second candidate negative samples that do not meet the rules are eliminated. For example, if the gray-level co-occurrence matrix contrast of a forest negative sample is 5, which is lower than the rule's lower limit, it is determined to be a second candidate negative sample with abnormal features and is eliminated. The second candidate negative samples that meet the rules are selected as the third candidate negative samples.
[0098] Step 3: Integrate remote sensing change detection data from the past 3-5 years, extract the coordinates and feature information of unchanged areas that have been manually verified, and generate vector maps of the unchanged areas. The time span of the remote sensing change detection data can cover the years of both previous and subsequent images of samples in each dataset.
[0099] Step 4: Spatially overlay the third candidate negative sample with the vector map of the unchanged region. If the third candidate negative sample is located within the unchanged region and the features of the third candidate negative sample are consistent with the features of the unchanged region, then the fourth candidate negative sample is obtained and included in the negative sample candidate library.
[0100] 4. Crowdsourced geographic data verification and screening Using vector information from crowdsourced geographic data such as Tianditu, the negative samples after initial screening are validated for land cover attributes to eliminate samples from potentially changed areas. Specific steps include: Step 1: Download vector data of the study area that is close to the time of the later image from the official website of Crowdsource Geographic Data. This mainly includes building vectors, road vectors, water body vectors, etc., and preprocess the data to ensure that it is consistent with the spatial reference of the remote sensing image data.
[0101] Step 2: Taking buildings as an example, the fourth candidate negative samples selected in the first three steps are overlaid with the vector data for analysis, and the building vector information corresponding to each fourth candidate negative sample is extracted. If the building is clearly visible in the previous time image and remains unchanged between the previous and subsequent time images, it is a valid fourth candidate negative sample. If the building does not exist in the previous time image, or if there is a significant change between the previous and subsequent time images, it is discarded.
[0102] Step 3: For non-building negative samples (such as road and water samples), a similar method is used for verification. For example, road samples need to coincide with the existing road vectors in the crowdsourced geographic data, and there should be no records of new road construction or rerouting; water samples need to coincide with the existing water body vectors, and there should be no records of changes such as drying up or expansion, to ensure that the land feature attributes of the negative samples are true and reliable.
[0103] Through the above screening, fourth candidate negative samples with abnormal features, incorrect attributes, and mismatch with business scenarios were eliminated from the source, significantly improving the quality of negative samples and laying a solid foundation for subsequent model training and dynamic iteration.
[0104] Step 3: Model Training Model training is based on UNet (fully convolutional neural network) architecture. By constructing multi-parameter model variants (such as setting different numbers of channels) and setting optimization training strategies, the collaborative learning of negative samples and the model is achieved.
[0105] Step 4: Results Analysis For each model variant, calculate precision and recall based on the test dataset results under different proportions of negative samples.
[0106] Step 5: Dynamic Configuration of Negative Samples Feedback Metric Monitoring and Threshold Setting: Precision (threshold 80%) and recall (threshold 85%) of the validation dataset are used as the core feedback metrics. The metrics are automatically calculated after every 10 epochs of training (10 rounds, one round including one forward propagation and one backward propagation). When precision < 80%, it is considered insufficient negative sample feature coverage; when recall < 85%, it is considered redundant or confusing negative sample features; when both meet the thresholds, the current configuration is maintained but monitoring continues. One round includes one forward propagation and one backward propagation of all training samples.
[0107] Adaptive adjustment of the negative sample ratio: When precision is insufficient, increase the negative sample ratio by 10%-20%, and use the K-Means clustering algorithm to select the top 20% of samples with the highest similarity to the misjudged region features to supplement the training dataset; when recall is insufficient, decrease the negative sample ratio by 10%-15%, and remove the top 10% of samples with the highest similarity to the changed region features. The ratio of negative to positive samples should be controlled within the range of 10%-300% to avoid extreme ratios that could lead to model training imbalance.
[0108] In summary, this application provides guidance for negative sample selection from different dimensions by pre-setting discrimination conditions. For example, geospatial constraints ensure that the spatial distribution of negative samples matches the land cover types in the study area, and imaging mechanism constraints ensure the rationality of the spectral characteristics of negative samples, thereby ensuring sample validity from the source and preventing invalid or low-quality samples from entering the subsequent training process. An adaptive adjustment mechanism for the proportion of negative samples based on precision and recall of the validation dataset is established. Precision and recall are key indicators for measuring model performance and can directly reflect the impact of the number and feature distribution of negative samples on the model. By monitoring these two indicators in real time, the proportion of negative samples is dynamically adjusted to solve the problem of imbalance in the number of negative samples.
[0109] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the methods described in the above embodiments of this application.
[0110] Figure 7This is a schematic diagram of the training device for the remote sensing image change detection model provided in this application. The device 700 may include: an acquisition module 701, a first screening module 702, a second screening module 703, a training module 704, a first processing module 705, and a second processing module 706; The acquisition module 701 is used to acquire a training dataset, wherein the training dataset includes multiple initial samples, each initial sample includes a sample image pair, the location coordinates of the sample image pair, the land cover type of the sample image pair, and a label; the sample image pair includes a previous time image and a subsequent time image at the same location coordinates; the label is used to indicate whether the land cover type of the previous time image and the land cover type of the subsequent time image are consistent; The first filtering module 702 is used to filter the initial negative samples in the training dataset according to the constraint feature information of the unchanged ground features to obtain a target negative sample set, and select a portion of negative samples from the target negative sample set to construct a training negative sample set; wherein, the initial negative samples are initial samples in the training dataset whose ground feature types in the previous time image and the subsequent time image are consistent. The second filtering module 703 is used to filter at least a portion of the initial positive samples from the training dataset to construct a training positive sample set; wherein the initial positive samples are initial samples in the training dataset where the land cover types of the previous time image and the land cover types of the subsequent time image are inconsistent. The training module 704 is used to train a candidate detection model based on the training negative sample set, the training positive sample set, and a pre-built neural network model, and to obtain the precision and recall of the candidate detection model based on the validation dataset. The first processing module 705 is configured to adjust the number of negative samples in the training negative sample set if the precision does not meet the first threshold or the recall does not meet the second threshold, and continue to train the candidate detection model based on the training positive sample set and the adjusted training negative sample set. The second processing module 706 is used to determine the candidate detection model as a remote sensing image change detection model if the precision rate meets the first threshold and the recall rate meets the second threshold, wherein the remote sensing image change detection model is used to detect whether the land cover type in the remote sensing image has changed.
[0111] It should be noted that for any content not described in detail in this embodiment of the device, please refer to the method described above.
[0112] Figure 8 This is a schematic diagram of the structure of a computer system for an electronic device provided in this application. It should be noted that... Figure 8The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0113] like Figure 8 As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 802 or programs loaded from storage portion 808 into Random Access Memory (RAM) 803, such as performing the methods described in the above embodiments. The RAM 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An Input / Output (I / O) interface 805 is also connected to the bus 804.
[0114] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0115] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs various functions defined in the system of this application.
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0117] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0118] In another aspect, this application also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods described in the above embodiments.
[0119] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to implement the methods described in the above embodiments.
[0120] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0121] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0122] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for training a remote sensing image change detection model, characterized in that, The method includes: Obtain a training dataset, wherein the training dataset includes multiple initial samples, each initial sample including a sample image pair, the location coordinates of the sample image pair, the land cover type of the sample image pair, and a label; the sample image pair includes a previous time image and a subsequent time image at the same location coordinates; the label is used to indicate whether the land cover type of the previous time image and the land cover type of the subsequent time image are consistent; Based on the constraint feature information of unchanged ground features, the initial negative samples in the training dataset are filtered to obtain a target negative sample set, and a portion of negative samples are selected from the target negative sample set to construct a training negative sample set; wherein, the initial negative samples are initial samples in the training dataset whose ground feature types in the previous time image and the subsequent time image are consistent. At least a portion of the initial positive samples are selected from the training dataset to construct a training positive sample set; wherein, the initial positive samples are initial samples in the training dataset where the land cover types of the previous time image and the land cover types of the subsequent time image are inconsistent; The candidate detection model is trained using the training negative sample set, the training positive sample set, and the pre-built neural network model. The precision and recall of the candidate detection model are then obtained based on the validation dataset. If the precision does not meet the first threshold or the recall does not meet the second threshold, the number of negative samples in the training negative sample set is adjusted, and the candidate detection model is trained again based on the training positive sample set and the adjusted training negative sample set. If the precision meets the first threshold and the recall meets the second threshold, then the candidate detection model is determined as a remote sensing image change detection model, wherein the remote sensing image change detection model is used to detect whether the land cover type in the remote sensing image has changed; If the precision does not meet the first threshold or the recall does not meet the second threshold, the number of negative samples in the training negative sample set is adjusted, including: If the precision does not meet the first threshold, the first similarity between the backup negative sample and the misjudged verification sample is obtained, and the backup negative sample is added to the training negative sample set according to the first preset ratio and the first similarity level. The backup negative sample is a negative sample in the target negative sample set that was not used to construct the training negative sample set. The misjudged verification sample is a sample in the verification dataset whose actual label is that the land cover type in the previous image and the land cover type in the subsequent image are the same, but is identified by the candidate detection model as having a different land cover type in the previous image and the subsequent image. If the recall rate does not meet the second threshold, then the second similarity between the negative samples in the training negative sample set and the change verification samples is obtained, and the negative samples in the training negative sample set are removed according to the second preset ratio and the second similarity. The change verification samples are samples in the verification dataset whose actual labels are inconsistent between the land cover types in the previous image and the land cover types in the subsequent image, but which are identified by the candidate detection model as having consistent land cover types in the previous image and the subsequent image.
2. The remote sensing image change detection model training method according to claim 1, characterized in that, The constraint feature information includes the preset screening ratio corresponding to each unchanged land cover type in each land cover type region; The step of filtering the initial negative samples in the training dataset based on the constraint feature information of unchanged land features to obtain the target negative sample set includes: According to the land cover type region to which the location coordinates of the initial negative sample belong, the initial negative samples in the training dataset are divided into multiple initial negative sample groups, and the initial negative samples in the same initial negative sample group belong to the same land cover type region. For each initial negative sample group, the target preset screening ratio corresponding to each unchanged land cover type in the initial negative sample group is obtained according to the preset information database, and the target number of negative samples to be selected in the initial negative sample group is obtained. The preset information database stores multiple different land cover type regions, the unchanged land cover types in each land cover type region, the preset screening ratio corresponding to each unchanged land cover type in each land cover type region, and the number of negative samples to be selected in each land cover type region. For each initial negative sample group, the product of the target preset screening ratio and the target number of negative samples to be selected is obtained to get the target number of negative samples for each unchanged land cover type in the initial negative sample group. Based on the unchanged land cover type and the target number of negative samples, the first candidate negative samples are selected from the initial negative sample group to obtain the first candidate negative sample set. Based on the first candidate negative sample set, the target negative sample set is obtained.
3. The remote sensing image change detection model training method according to claim 2, characterized in that, The constraint feature information includes the spectral feature range of unchanged land cover types; The step of obtaining the target negative sample set based on the first candidate negative sample set includes: Obtain the target spectral features of the first candidate negative sample in the first candidate negative sample set; Based on the target spectral characteristics and the spectral characteristic range of the unchanged land cover type, a second candidate negative sample is selected to obtain a second candidate negative sample set. The target negative sample set is obtained based on the second candidate negative sample set.
4. The remote sensing image change detection model training method according to claim 3, characterized in that, The constraint feature information includes the unchanging area feature range of unchanged features; Obtaining the target negative sample set based on the second candidate negative sample set includes: Based on the land cover type of the second candidate negative sample in the second candidate negative sample set, obtain the target unchanging area characteristics of the second candidate negative sample; Based on the characteristics of the target unchanging area and the range of the unchanging area characteristics of the unchanging land features, a third candidate negative sample is selected to obtain a third candidate negative sample set; The target negative sample set is obtained based on the third candidate negative sample set.
5. The remote sensing image change detection model training method according to claim 4, characterized in that, The constraint feature information includes a vector map, which includes verification image pairs corresponding to historically verified unchanged land features, and verification location coordinates corresponding to the historically verified unchanged land features. Obtaining the target negative sample set based on the third candidate negative sample set includes: Based on the position coordinates of the third candidate negative sample in the third candidate negative sample set, the third candidate negative sample is superimposed on the vector image, and the third candidate negative sample whose position coordinates fall into the verification position coordinates and whose image pair features are consistent with the verification image pair features is selected as the fourth candidate negative sample, thus obtaining the fourth candidate negative sample set. The target negative sample set is obtained based on the fourth candidate negative sample set.
6. The remote sensing image change detection model training method according to claim 5, characterized in that, The constraint feature information includes an actual map, which includes actual image pairs of features corresponding to the actual recorded unchanging features, and actual location coordinates of the actual recorded unchanging features. Obtaining the target negative sample set based on the fourth candidate negative sample set includes: The fourth candidate negative sample in the fourth candidate negative sample set is compared with the actual map, and the fourth candidate negative sample whose position coordinates fall into the actual position coordinates and whose image pair features are consistent with the actual image pair features corresponding to the actual position coordinates is selected as the target negative sample, thus obtaining the target negative sample set.
7. The remote sensing image change detection model training method according to claim 4, characterized in that, The preset screening ratio is determined by the priority of the unchanged land feature types corresponding to each land feature type region; the land feature type regions include cultivated land regions and building regions. The highest priority for unchanged land feature types in the cultivated land area is cultivated land, and the second highest priority is orchard; the highest priority for unchanged land feature types in the building area is building, the second highest priority is road, and the lowest priority is green space. The spectral features include reflectance values in the near-infrared band; the non-changing region features include edge smoothness and gray-level co-occurrence matrix.
8. The remote sensing image change detection model training method according to claim 1, characterized in that, The acquisition of the training dataset includes: Obtain an initial training set, and perform radiation normalization processing on the initial training set to obtain a radiation-normalized training set; Based on the geographic coordinate information and quadratic polynomial fitting of the initial training set, the radiatively normalized training set is geometrically refined to obtain a standardized training set. The training dataset is obtained by augmenting the standardized training set using one or more of the following methods: random horizontal flipping, random vertical flipping, random rotation, random cropping, brightness adjustment, and contrast adjustment.
9. A method for detecting changes in remote sensing images, characterized in that, The method includes: The image pair to be detected is input into the remote sensing image change detection model to obtain the detection result of whether the land cover type of the previous time image and the land cover type of the subsequent time image of the image pair to be detected are consistent; wherein, the remote sensing image change detection model is determined by the remote sensing image change detection model training method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Object-oriented graph neural network unsupervised remote sensing image change detection method
CN115661652A
Multi-temporal remote sensing image change detection method and system based on interactive prompt
CN120708070A