A Remote Sensing Image Change Detection Method and Detection System Based on Dynamic Weighted Cross-Entropy Loss
Through dynamic weighted cross entropy loss and weight sharing twin neural network, combined with deep supervision mechanism, the problems of category imbalance and small-area change detection in remote sensing change detection are solved, and the detection accuracy and generalization ability are improved.
Patent Information
- Application Number
- CN202310873545.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2043-07-17
AI Technical Summary
The existing remote sensing change detection technology based on deep learning has problems such as category imbalance, insufficient detection capability on small-area changes, and large impact on labeling errors, resulting in insufficient detection accuracy and generalization capability.
A method based on dynamic weighted cross-entropy loss is adopted, combined with a weight sharing twin neural network and a deep supervision mechanism, and dynamically adjusting the weights to balance category imbalance and edge labeling uncertainty, and data augmentation technology is used to improve the generalization ability of the model.
The accuracy and robustness of remote sensing image change detection are improved, especially the detection ability of small area changes, reducing the impact of category imbalance and labeling errors, and improving the detection accuracy and generalization performance of the model.
Smart Images

Figure CN116895019B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of high - resolution remote sensing image processing and remote sensing image data mining, and particularly relates to a remote sensing image change detection method and its detection system based on dynamic weighted cross - entropy loss. Background Art
[0002] Remote sensing change detection identifies the change information occurring on the earth's surface by analyzing multi - temporal remote sensing images acquired from the same geographical area at different times. Currently, it has been widely applied in various fields such as land use change, disaster assessment, urban planning, and natural resource supervision. With the rapid development of wide - area, high - frequency, and high - resolution remote sensing earth observation technology, a large amount of multi - temporal and high - spatial - resolution remote sensing images can be obtained, providing rich and reliable data sources for change detection and enabling rapid and efficient dynamic monitoring of large - scale information on the earth's surface.
[0003] The emergence of deep learning methods provides a new approach for the processing and analysis of remote sensing data with long time spans and broad geographical coverage. As an effective tool for non - linear modeling, it can automatically learn and extract complex abstract features of ground objects from a large amount of remote sensing data, better mine the information in remote sensing data, and improve the interpretation and analysis capabilities of remote sensing data. However, there are still the following challenges in the current remote sensing change detection technology based on deep learning: (1) In the change detection task, the area of the unchanged region is always much larger than that of the changed region, resulting in a serious imbalance in the categories of the training data set, making the deep learning model more inclined to predict as unchanged, with weak recognition ability for change samples, decreased accuracy, and affecting the generalization ability of the model in practical applications. (2) In practical applications, the areas of change patches vary greatly. The model is more likely to capture the feature representations and change patterns of large - area significant changes, such as urban expansion and deforestation. For small - area changes, such as temporary sheds and newly built rural roads, the deep learning model needs to have high - resolution perception ability and detail extraction ability to accurately detect and identify small - area changes. (3) The accuracy of the deep learning model is closely related to the quality of the sample set. However, due to factors such as resolution limitations, misregistration errors of bi - temporal images, occlusion of remote sensing object boundaries, and shadows, the change samples in remote sensing images are more likely to have annotation errors at the edges, resulting in incorrect labels in the training data and affecting the training and performance of deep learning. Summary of the Invention
[0004] The present invention provides a remote sensing image change detection method based on dynamic weighted cross - entropy loss to solve the problem of the deficiency of remote sensing image change detection algorithms.
[0005] The present invention provides a remote sensing image change detection system based on dynamic weighted cross - entropy loss to implement the remote sensing image change detection method.
[0006] The present invention is achieved through the following technical solutions:
[0007] A remote sensing image change detection method based on dynamic weighted cross-entropy loss, the remote sensing image change detection method includes the following steps,
[0008] Step 1: Make a change detection dataset based on high-resolution remote sensing images;
[0009] Step 2: Construct a remote sensing image change detection model based on a weight-sharing Siamese neural network;
[0010] Step 3: Design a dynamic weighted cross-entropy loss function and an optimizer;
[0011] Step 4: Use the high-resolution remote sensing change detection dataset to train the improved deep learning model;
[0012] Step 5: Use data augmentation during testing to predict the test dataset and perform post-processing operations to improve the prediction quality.
[0013] A remote sensing image change detection method based on dynamic weighted cross-entropy loss, the specific content of step 1 is as follows,
[0014] Step 1.1: Complete the image preprocessing process for the collected bi-temporal images;
[0015] Step 1.2: Establish an interpretation mark for the preprocessed change patches. Through manual visual interpretation, compare the pre- and post-period images to draw the change patches, obtain the change patch vectors, and rasterize them to obtain the label map;
[0016] Step 1.3: Set the dataset size to 512x512 and the overlap rate to 10%. The dataset includes the images obtained by synchronously sliding window cropping of the pre-period remote sensing images, the post-period remote sensing images, and the rasterized label map;
[0017] Step 1.4: Divide the dataset obtained in step 1.3 according to the ratio of training set: validation set: test set of 4:1:1.
[0018] A remote sensing image change detection method based on dynamic weighted cross-entropy loss, the weight-sharing Siamese neural network model in step 2 includes a Siamese network structure, a feature fusion module, and a deep supervision mechanism,
[0019] The Siamese network structure: Adopt a weight-sharing mechanism, which can reduce the information loss during channel fusion; Use ResNet34 as the feature extraction layer of the Siamese structure, which is composed of multiple residual modules cascaded. By forming an identity mapping, it is used to ensure that the deep network learns excellent features;
[0020] The feature fusion module: Introduce the decoding structure in the UNet framework, gradually restore the feature maps obtained through multiple convolution operations through deconvolution, increase the size of the feature maps while ensuring that there is no loss of high-level semantic information, and use the larger feature maps to detect small-volume targets, improving the accuracy of the network for change detection of small-volume targets;
[0021] The deep supervision mechanism: Add it after the output of each scale encoding layer, and supervise the backbone network by adding an additional auxiliary classifier.
[0022] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. The specific steps of step 3 are as follows:
[0023] Step 3.1: Process the prediction map using softmax and combine it with the label Figure 1 to calculate the cross-entropy loss;
[0024] Step 3.2: Perform connected component labeling on the label map, and for each connected component, calculate its distance map;
[0025] Step 3.3: Remap the distance map using a Gaussian curve, so that the centroid of the change category has a larger weight value and the edge has a smaller weight value to balance the influence of area differences and weaken the interference of edge uncertain labels;
[0026] Step 3.4: Multiply each pixel in the weight map by the corresponding cross-entropy map and calculate its average value to obtain the dynamic weighted cross-entropy L;
[0027] Step 3.5: The optimizer uses AdamW, the initial learning rate is set to 0.005, and the learning rate policy selects a combined policy of linear learning rate decay and polynomial learning rate decay.
[0028] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. The loss function formula in step 3.4 is defined as follows:
[0029]
[0030] where, y i represents the label of pixel i , the change category is 1 and the unchanged category is 0, p i represents the probability that pixel i is predicted to change, w i represents the weight value corresponding to the pixel.
[0031] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. Specifically, step 4 is to train the improved change detection model using the constructed high-resolution remote sensing image change detection dataset; during each training iteration, randomly select data augmentations for combination to improve the generalization performance of the model.
[0032] Use the mIOU metric of the validation set as the evaluation metric for the model's performance.
[0033] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. Specifically, step 5 includes the following steps:
[0034] Step 5.1: During the process of model inference and prediction on test data, perform different forms of augmentation operations on the input data to generate multiple augmented samples, and then use the model to predict these augmented samples; finally, average or vote on these prediction results to obtain the final prediction result.
[0035] Step 5.2: Use morphological operations to post-process the final prediction result to improve the prediction quality.
[0036] A remote sensing image change detection system based on dynamic weighted cross-entropy loss. The remote sensing image change detection system uses the above remote sensing image change detection method, including:
[0037] An image acquisition module for making a change detection dataset based on high-resolution remote sensing images.
[0038] A remote sensing image change detection model training module for constructing a remote sensing image change detection model based on a weight-sharing siamese neural network; designing a dynamic weighted cross-entropy loss function and an optimizer; using the high-resolution remote sensing change detection dataset to train the improved deep learning model.
[0039] A prediction module for predicting the test dataset using data augmentation during testing and performing post-processing operations to improve the prediction quality.
[0040] An electronic device includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus.
[0041] The memory is used to store computer programs.
[0042] The processor, when executing the programs stored on the memory, implements the above method steps.
[0043] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above method steps.
[0044] The beneficial effects of the present invention are as follows:
[0045] The change detection model used in the present invention adopts a network structure with weight sharing, which can reduce information loss during the feature fusion process of dual-temporal images and reduce the number of parameters. A decoding structure is introduced into the feature fusion module, avoiding the problems of difficult threshold determination and low model automation degree in distance metric-based models, and at the same time improving the accuracy of the network for change detection of small-volume targets. By introducing a deep supervision mechanism, problems such as vanishing gradients and slow convergence speed in the training of deep neural networks can be solved, and the detection accuracy can be improved.
[0046] The dynamic weighted cross-entropy loss function used in the present invention defines higher weight values at the centroids inside the changed regions and lower weight values at the edges, and dynamically adjusts the weight ratio of changed samples to unchanged samples in each sample, reducing the impacts brought by class imbalance, patch area differences, and edge annotation uncertainties in the change detection task, and improving the accuracy and robustness of the training of the change detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flowchart of the method of the present invention.
[0048] Figure 2 is a flowchart of the calculation of the dynamic weighted cross-entropy loss function of the present invention.
[0049] Figure 3 is an effect diagram of the change detection comparison experiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0050] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0051] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0052] It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification of this application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0053] The following describes the technical solutions in the embodiments of this application clearly and completely with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0054] Many specific details are set forth in the following description to facilitate a thorough understanding of this application, but this application may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of this application. Therefore, this application is not limited by the specific embodiments disclosed below.
[0055] Embodiment 1
[0056] An embodiment of the present invention provides a remote sensing image change detection method based on dynamic weighted cross-entropy loss. The remote sensing image change detection method includes the following steps:
[0057] Step 1: Make a change detection dataset based on high-resolution remote sensing images. Specifically, based on dual-temporal high-resolution remote sensing images, collect changed patches and make a remote sensing image change detection dataset.
[0058] Step 2: Build a remote sensing image change detection model based on a weight-sharing Siamese neural network, and improve the accuracy of small target detection through a feature fusion module and a deep supervision mechanism.
[0059] Step 3: Design a dynamic weighted cross-entropy loss function and an optimizer to make the model pay more attention to the changed categories during training, and at the same time reduce the influence of annotation uncertainty at the edges and the difference in the area of changed patches.
[0060] Step 4: Use the high-resolution remote sensing change detection dataset to train the improved deep learning model.
[0061] Step 5: Use data augmentation during testing to predict the test dataset to improve the generalization performance of the model, and perform post-processing operations to improve the prediction quality.
[0062] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. The specific content of Step 1 is as follows:
[0063] Step 1.1: Complete the image preprocessing process for the collected dual-temporal images; including radiometric correction, geometric correction, orthorectification, and image fusion. Then, resample the dual-temporal images to ensure consistent resolution. Finally, perform image registration to keep the positions of homologous ground objects aligned, with the registration error required to be less than 1 pixel.
[0064] Step 1.2: Establish interpretation marks for the preprocessed change patches. Through manual visual interpretation, compare the pre- and post-period images to delineate the change patches, obtain the change patch vectors, and rasterize the change patch vectors to obtain the label map, making its pixel resolution consistent with the remote sensing image.
[0065] Step 1.3: Set the dataset size to 512x512 and the overlap rate to 10%. The dataset includes synchronous sliding window cropping of the pre-period remote sensing image, the post-period remote sensing image, and the rasterized label map. At the same time, considering that the unchanged area is much larger than the changed area, only retain the sample pairs with a changed pixel ratio greater than 1% in the label map.
[0066] Step 1.4: Divide the dataset obtained in Step 1.3 according to the ratio of training set: validation set: test set of 4:1:1.
[0067] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. The weight-sharing siamese neural network model in Step 2 includes a siamese network structure, a feature fusion module, and a deep supervision mechanism.
[0068] The siamese network structure: Adopt a weight-sharing mechanism, which can reduce information loss during channel fusion and greatly reduce the number of parameters. Use ResNet34 as the feature extraction layer of the siamese structure, which is composed of multiple residual modules cascaded. By forming an identity mapping, it is used to ensure that the deep network learns excellent features.
[0069] The feature fusion module: Introduce the decoding structure in the UNet framework, gradually restore the feature maps obtained by multiple convolution operations through deconvolution, increase the size of the feature maps while ensuring that there is no loss of high-level semantic information, and use the larger feature maps to detect small-volume targets, improving the accuracy of the network for detecting changes in small-volume targets.
[0070] The deep supervision mechanism: Added after the output of each scale encoding layer, it supervises the backbone network by adding an additional auxiliary classifier, which can solve problems such as the vanishing gradient and slow convergence speed in the training of deep neural networks.
[0071] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. Step 3 is used to solve the problems of class imbalance, large differences in the area of change patches, and uncertainty of edge labels in the training of the change detection model, and specifically includes the following steps:
[0072] Step 3.1: Process the prediction map using softmax and combine it with the label Figure 1 to calculate the cross-entropy loss in the same way; the prediction map is the output result after inputting the pre- and post-period images into the deep learning model;
[0073] Step 3.2: Perform connected component labeling on the label map. For each connected component, calculate its distance map; find the maximum and minimum distances within each connected component, and then normalize the distance values within each connected component to the range of 0 - 1;
[0074] Step 3.3: Remap the distance map using a Gaussian curve to make the centroid of the changed category have a larger weight value and the edges have a smaller weight value to balance the influence of area differences and weaken the interference of edge uncertainty labels; among them, the peak of the Gaussian curve is set by the inverse ratio of the changed pixels to the unchanged pixels in the label map, which can reduce the differences of unbalanced categories; the standard deviation parameter is used to control the dispersion degree of the curve. The remapped distance map is used as the loss weight map W;
[0075] Step 3.4: Multiply each pixel in the weight map with the corresponding cross-entropy map and calculate its average value to obtain the dynamic weighted cross-entropy L;
[0076] Step 3.5: The optimizer uses AdamW, the initial learning rate is set to 0.005, and the learning rate policy selects a combined policy of linear learning rate decay and polynomial learning rate decay, so that the model uses a higher learning rate for rapid convergence in the early stage of training and a lower learning rate for more stable optimization in the later stage.
[0077] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. The loss function formula in Step 3.4 is defined as follows:
[0078]
[0079] where, y i represents the label of pixel i , the changed category is 1, and the unchanged category is 0, p i represents the probability that pixel i is predicted to change, w i represents the weight value corresponding to the pixel.
[0080] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. Specifically, step 4 is to train the improved change detection model using the constructed high-resolution remote sensing image change detection dataset. During each training iteration, data augmentations are randomly selected and combined to improve the generalization performance of the model. The data augmentations include random cropping, random flipping, and adjustments of brightness, contrast, saturation, and chromaticity.
[0081] The training batch is set to 8, and a total of 40,000 iterations are performed. Finally, the mIOU metric of the validation set is used as the evaluation metric for the model performance.
[0082] A remote sensing image change detection method based on dynamic weighted cross-entropy loss. Specifically, step 5 includes the following steps.
[0083] Step 5.1: During the process of model inference and prediction on the test data, perform different forms of augmentation operations such as random scaling and random flipping on the input data to generate multiple augmented samples. Then, use the model to predict these augmented samples. Finally, average or vote on these prediction results to obtain the final prediction result.
[0084] Step 5.2: Use morphological operations to post-process the final prediction result to improve the prediction quality. Use morphological closing operation to fill the holes in the prediction result and smooth the boundaries. Use small spot filtering to filter out small objects or small connected regions in the result.
[0085] Embodiment 2
[0086] The embodiment of the present invention provides a remote sensing image change detection system based on dynamic weighted cross-entropy loss. The remote sensing image change detection system uses the remote sensing image change detection method based on dynamic weighted cross-entropy loss, and includes an image acquisition module, a remote sensing image change detection model training module, and a prediction module.
[0087] The image acquisition module is used to make a change detection dataset based on high-resolution remote sensing images. Specifically, based on dual-temporal high-resolution remote sensing images, change patches are collected, and a remote sensing image change detection dataset is made.
[0088] The remote sensing image change detection model training module is used to construct a remote sensing image change detection model based on a weight-sharing siamese neural network, and improve the accuracy of small target detection through a feature fusion module and a deep supervision mechanism. Design a dynamic weighted cross-entropy loss function and an optimizer to make the model pay more attention to the change category during training, and at the same time reduce the influence of the annotation uncertainty at the edge and the difference in the area of the change patches. Use the high-resolution remote sensing change detection dataset to train the improved deep learning model.
[0089] A prediction module is used to perform predictions on a test data set using data augmentation during testing to improve the generalization performance of the model and perform post-processing operations to enhance the prediction quality.
[0090] As can be seen from the above, in the embodiments of the present invention, the remote sensing image change detection method described in Embodiment 1 is implemented by running a computer program. The change detection model used has a network structure with weight sharing, which can reduce information loss during the feature fusion process of dual-temporal images and reduce the number of parameters. A decoding structure is introduced into the feature fusion module, which avoids the problems of difficult threshold determination and low model automation in distance metric-based models, and can improve the accuracy of the network for detecting changes in small-volume targets. By introducing a deep supervision mechanism, problems such as vanishing gradients and slow convergence speed in the training of deep neural networks can be solved, and the detection accuracy can be improved.
[0091] The dynamic weighted cross-entropy loss function used defines higher weight values at the centroids inside the changed regions and lower weight values at the edges, and dynamically adjusts the weight ratio of changed samples to unchanged samples in each sample, reducing the impacts brought by class imbalance, patch area differences, and edge annotation uncertainties in the change detection task, and improving the accuracy and robustness of the training of the change detection model.
[0092] Embodiment 3
[0093] The embodiments of the present invention provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The memory is used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory and the processor are connected by a bus. Specifically, when the processor runs the above computer program stored in the memory, any step in Embodiment 1 above is implemented.
[0094] It should be understood that in the embodiments of the present invention, the so-called processor may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0095] The memory may include a read-only memory, a flash memory, and a random access memory, and provide instructions and data to the processor. A part or all of the memory may also include a non-volatile random access memory.
[0096] As can be seen from the above, the electronic device provided by the embodiment of the present invention can implement the remote sensing image change detection method described in Embodiment 1 by running a computer program. The change detection model used has a network structure with weight sharing, which can reduce information loss during the feature fusion process of dual-temporal images and reduce the number of parameters. By introducing a decoding structure into the feature fusion module, the problems of difficult threshold determination and low model automation degree in the distance metric-based model are avoided, and at the same time, the accuracy of the network for detecting changes in small-volume targets can be improved. By introducing a deep supervision mechanism, problems such as vanishing gradients and slow convergence speed in the training of deep neural networks can be solved, and the detection accuracy can be improved.
[0097] The dynamic weighted cross-entropy loss function used defines higher weight values at the centroids inside the changed regions and lower weight values at the edges, and at the same time dynamically adjusts the weight ratio of changed samples to unchanged samples in each sample, reducing the impacts brought by class imbalance, patch area differences, and edge annotation uncertainties in the change detection task, and improving the accuracy and robustness of the change detection model training.
[0098] It should be understood that if the above integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above embodiment methods of the present invention, it can also be completed by a computer program instructing related hardware. The above computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above various method embodiments can be implemented. Among them, the above computer program includes computer program code, and the above computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The above computer-readable medium can include: any entity or device capable of carrying the above computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the above computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0099] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of mutual distinction and do not limit the protection scope of the present invention. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0101] It should be noted that the methods and their detailed examples provided in the above embodiments can be combined with the devices and equipment provided in the embodiments, with reference to each other, and will not be elaborated herein.
[0102] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.
[0103] In the embodiments provided by the present invention, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / equipment embodiments described above are only illustrative. For example, the above-mentioned division of modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0104] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A remote sensing image change detection method based on dynamic weighted cross-entropy loss, characterized in that, The remote sensing image change detection method includes the following steps: Step 1: Create a change detection dataset based on high-resolution remote sensing images; Step 2: Construct a remote sensing image change detection model based on a weight-sharing Siamese neural network; Step 3: Design a dynamic weighted cross-entropy loss function and optimizer; The specific steps of Step 3 are as follows: Step 3.1: Use softmax to process the prediction map and calculate the cross-entropy loss in combination with the label map; Step 3.2: Perform connected component labeling on the label map. For each connected component, calculate its distance map; Find the maximum and minimum distances within each connected component, and then normalize the distance values within each connected component to the range of 0-1; Step 3.3: Remap the distance map using a Gaussian curve so that the centroid of the change category has a larger weight value and the edge has a smaller weight value to balance the influence of area differences and weaken the interference of edge uncertainty labels; Step 3.4: Multiply each pixel in the weight map with the corresponding cross-entropy map and calculate its average value to obtain the dynamic weighted cross-entropy L; The loss function formula in Step 3.4 is defined as follows: Among them, y i represents the label of a pixel, where the changing category is 1 and the unchanged category is 0, i and p i represents the probability that a pixel i is predicted to change, w i and represents the weight value corresponding to the pixel; Step 3.5: The optimizer uses AdamW, the initial learning rate is set to 0.005, and the learning rate strategy selects a combined strategy of linear learning rate decay and polynomial learning rate decay; Step 4: Use the high-resolution remote sensing change detection dataset to train the improved deep learning model; Step 5: Use data augmentation during testing to predict the test dataset and perform post-processing operations to improve the prediction quality.
2. The remote sensing image change detection method based on dynamic weighted cross-entropy loss according to claim 1, wherein, The specific content of Step 1 is as follows: Step 1.1: Complete the image preprocessing process for the collected dual-temporal images; Step 1.2: Establish an interpretation key for the preprocessed change patches. Through manual visual interpretation, compare the pre- and post-period images to outline the change patches, obtain the change patch vectors, and rasterize them to obtain the label map; Step 1.3: Set the dataset size to 512x512 and the overlap rate to 10%. The dataset includes images obtained by synchronously sliding window cropping of the pre-period remote sensing image, the post-period remote sensing image, and the rasterized label map; Step 1.4: Divide the dataset obtained in Step 1.3 according to the ratio of training set: validation set: test set of 4:1:
1.
3. The remote sensing image change detection method based on dynamic weighted cross-entropy loss according to claim 1, wherein, The weight-sharing Siamese neural network model in Step 2 includes a Siamese network structure, a feature fusion module, and a deep supervision mechanism. The Siamese network structure: Adopts a weight-sharing mechanism to reduce information loss during channel fusion; uses ResNet34 as the feature extraction layer of the Siamese structure, which is composed of multiple residual modules cascaded. By forming an identity mapping, it is used to ensure that the deep network learns excellent features; The feature fusion module: Introduces the decoding structure in the UNet framework, gradually restores the feature maps obtained from multiple convolution operations through deconvolution, increases the size of the feature maps while ensuring that there is no loss of high-level semantic information, and uses the larger feature maps to detect small-volume targets, improving the accuracy of the network for detecting changes in small-volume targets; The depth supervision mechanism: It is added after the outputs of each scale encoding layer, and the backbone network is supervised by adding an additional auxiliary classifier.
4. The remote sensing image change detection method based on dynamic weighted cross-entropy loss according to claim 1, wherein, Specifically, step 4 is to train the improved change detection model using the constructed high-resolution remote sensing image change detection dataset; during each training iteration, data augmentations are randomly selected and combined to improve the generalization performance of the model. Use the mIOU metric of the validation set as the evaluation metric for the model's performance.
5. The remote sensing image change detection method based on dynamic weighted cross-entropy loss according to claim 4, wherein Step 5 specifically includes the following steps. Step 5.1: During the process of performing model inference and prediction on the test data, perform different forms of augmentation operations on the input data to generate multiple augmented samples, and then use the model to predict these augmented samples; finally, average or vote on these prediction results to obtain the final prediction result. Step 5.2: Use morphological operations to post-process the final prediction result to improve the prediction quality.
6. A remote sensing image change detection system based on dynamic weighted cross-entropy loss, characterized in that, The remote sensing image change detection system uses the remote sensing image change detection method described in claim 1. It includes: An image acquisition module for making a change detection dataset based on high-resolution remote sensing images. A remote sensing image change detection model training module for constructing a remote sensing image change detection model based on a weight-sharing Siamese neural network; designing a dynamic weighted cross-entropy loss function and an optimizer. Use the high-resolution remote sensing change detection dataset to train the improved deep learning model. A prediction module for using data augmentation during testing to predict the test dataset and performing post-processing operations to improve the prediction quality.
7. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus. The memory is used to store computer programs. The processor, when executing the program stored on the memory, implements the method steps described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the method steps described in any one of claims 1-5.
Citation Information
Patent Citations
Dual-temporal remote sensing image change detection method, model construction method and device
CN114494870A
Building change detection method based on double-time-phase high-resolution remote sensing image
CN115719447A