A large model remote sensing small sample change detection method and system combined with attention
By performing radiometric correction, atmospheric correction, and georegistration on remote sensing images, and combining this with a graph attention feature encoder, a target remote sensing small-sample change detection model is constructed. This solves the problems of low accuracy and poor generalization ability of traditional methods under small sample data, and achieves efficient and intelligent remote sensing change detection.
Patent Information
- Application Number
- CN202511098247.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-08-06
AI Technical Summary
Traditional remote sensing change detection methods suffer from low accuracy and poor generalization ability when processing small sample data.
A large-scale remote sensing small-sample change detection method combining graph attention is adopted. By performing radiometric and atmospheric correction on the original remote sensing images, standardized remote sensing images are generated. The images are then aligned to a unified geographic coordinate system through georegistration. The graph attention feature encoder is used to capture the spatiotemporal topological relationships of ground features, and a target remote sensing small-sample change detection model is constructed to detect change types.
It improves the accuracy of change detection in small sample scenarios, solves the problem of traditional methods relying on a large amount of labeled data, and realizes efficient and intelligent remote sensing image analysis.
Smart Images

Figure CN120707799B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a large model remote sensing small sample change detection method and system combined with graph attention. BACKGROUND
[0002] With the development of remote sensing technology, change detection is widely used in resource monitoring, urban planning and other fields. Traditional remote sensing change detection methods have low precision and poor generalization ability when processing small sample data. SUMMARY
[0003] The purpose of the present application is to provide a large model remote sensing small sample change detection method and system combined with graph attention.
[0004] In a first aspect, the embodiments of the present application provide a large model remote sensing small sample change detection method combined with graph attention, comprising:
[0005] Radiometric correction and atmospheric correction are performed on the original remote sensing image data of the target area to generate standardized remote sensing images;
[0006] Through geographic registration processing, the standardized remote sensing images of different time phases are aligned to a unified geographic coordinate system;
[0007] Obtain the aligned reference time phase remote sensing image and change time phase remote sensing image; the change time phase remote sensing image is a remote sensing image collected at a preset collection time interval from the reference time phase remote sensing image;
[0008] The reference time phase remote sensing image and the change time phase remote sensing image are input into a pre-trained target remote sensing small sample change detection model to obtain a change type map of the target area.
[0009] In one possible implementation, the target remote sensing small sample change detection model is trained by the following method, comprising:
[0010] Obtain an initial remote sensing small sample change detection model, the initial remote sensing small sample change detection model comprising: a reference time phase feature extraction model and a change discrimination model, the reference time phase feature extraction model and the change discrimination model sharing the same graph attention feature encoder, the reference time phase feature extraction model comprising the graph attention feature encoder and a reference time phase feature discriminator, and the change discrimination model comprising the graph attention feature encoder and a change type discriminator;
[0011] The benchmark time phase feature extraction model is trained by using a benchmark time phase remote sensing data instance, model parameters of the graph attention feature encoder and the benchmark time phase feature discriminator included in the benchmark time phase feature extraction model are updated, and a graph attention feature encoder after initial training and a benchmark time phase feature discriminator after initial training are obtained; wherein the benchmark time phase remote sensing data instance includes benchmark time phase remote sensing image data.
[0012] Based on the change type discriminator and the graph attention feature encoder after initial training, an initialized change discrimination model is constructed.
[0013] The change type discriminator in the initialized change discrimination model is trained by using a change time phase remote sensing data instance, model parameters of the graph attention feature encoder after initial training are frozen, and model parameters of the change type discriminator are updated, so as to obtain a change type discriminator after initial training; wherein the change time phase remote sensing data instance includes change time phase remote sensing image data.
[0014] Based on the graph attention feature encoder after initial training and the change type discriminator after initial training, a change discrimination model after initial training is constructed.
[0015] The change discrimination model after initial training is trained by using the change time phase remote sensing data instance, model parameters of the graph attention feature encoder after initial training and the change type discriminator after initial training are updated, so as to obtain a graph attention feature encoder after advanced training and a change type discriminator after advanced training.
[0016] Based on the graph attention feature encoder after advanced training, the benchmark time phase feature discriminator after initial training and the change type discriminator after advanced training, an intermediate remote sensing small sample change detection model is constructed.
[0017] The intermediate remote sensing small sample change detection model is trained by using a small sample change detection data instance, so as to obtain a target remote sensing small sample change detection model; wherein an output of the target remote sensing small sample change detection model is a change type graph, and the small sample change detection data instance includes at least one of the following: the benchmark time phase remote sensing image data and the change time phase remote sensing image data.
[0018] In a possible implementation, the benchmark time phase remote sensing data instance is multi-spectral sequence data, the benchmark time phase remote sensing data instance includes at least one benchmark time phase multi-spectral sequence sample data; the change time phase remote sensing data instance is change single image data, and the change time phase remote sensing data instance includes at least one change time phase hyperspectral single image sample data.
[0019] The base phase feature extraction model is trained using the base phase remote sensing data instance, model parameters of the graph attention feature encoder and the base phase feature discriminator included in the base phase feature extraction model are updated, a graph attention feature encoder after initial training and a base phase feature discriminator after initial training are obtained, including:
[0020] For each base phase multispectral sequence sample data, a plurality of sequence time node images corresponding to the base phase multispectral sequence sample data are obtained according to a plurality of extraction time sequence nodes;
[0021] The base phase feature extraction model is trained using the base phase multispectral sequence sample data corresponding to the plurality of sequence time node images, the model parameters of the graph attention feature encoder and the base phase feature discriminator included in the base phase feature extraction model are updated, the graph attention feature encoder after initial training and the base phase feature discriminator after initial training are obtained;
[0022] The change type discriminator in the initialized change discrimination model is trained using the change phase remote sensing data instance, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated, a change type discriminator after initial training is obtained, including:
[0023] For each change phase hyperspectral single image sample data, data augmentation is performed on the change phase hyperspectral single image sample data, a plurality of augmented sample data corresponding to the change phase hyperspectral single image sample data are obtained;
[0024] The change type discriminator is trained using the plurality of augmented sample data corresponding to the change phase hyperspectral single image sample data, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated, the change type discriminator after initial training is obtained.
[0025] In a possible implementation, the change phase remote sensing data instance is change single image data, and the change phase remote sensing data instance includes at least one change phase hyperspectral single image sample data;
[0026] The change type discriminator in the initialized change discrimination model is trained using the change phase remote sensing data instance, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated, a change type discriminator after initial training is obtained, including:
[0027] a plurality of different image regions are cropped from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images; wherein, there is a locally overlapping image region between any two of the to-be-processed images derived from the same change temporal high-spectral single sample data;
[0028] the plurality of to-be-processed images are determined as sample instances of the initialized change discrimination model;
[0029] a remote sensing feature representation of the sample instance is extracted by the graph attention feature encoder that has completed the initial training;
[0030] a change type detection result of the sample instance is determined by the change type discriminator according to the remote sensing feature representation of the sample instance;
[0031] an error parameter is determined according to the change type detection result of the sample instance and a change type target value, and a model parameter of the change type discriminator is updated based on the error parameter to obtain the change type discriminator that has completed the initial training.
[0032] In a possible implementation, the plurality of different image regions are cropped from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images, including:
[0033] a size of an image cropping window is determined;
[0034] the image cropping window is slid on a plurality of different sampling points of the change temporal high-spectral single sample data, and an image region in the image cropping window is cropped respectively to obtain the plurality of to-be-processed images;
[0035] the plurality of different image regions are cropped from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images, further including:
[0036] a size of an image cropping window and a spatial arrangement position in the change temporal high-spectral single sample data are determined;
[0037] a plurality of different scale factors corresponding to the change temporal high-spectral single sample data are determined in a scale transformation range corresponding to the change temporal high-spectral single sample data;
[0038] the size of the change temporal high-spectral single sample data is transformed respectively according to the plurality of different scale factors to obtain a plurality of change temporal high-spectral single sample data that have completed scale transformation;
[0039] an image region in the image cropping window is cropped from the plurality of change temporal high-spectral single sample data that have completed scale transformation to obtain the plurality of to-be-processed images;
[0040] The multiple different image regions are cropped from the same change temporal high-spectral single sample data to obtain multiple to-be-processed images, and the method further comprises:
[0041] The change temporal high-spectral single sample data is spatially smoothed by using multiple differentiated spatial smoothing processing model parameters to obtain multiple processed change temporal high-spectral single sample data.
[0042] The image regions within the image cropping window are cropped from the multiple processed change temporal high-spectral single sample data to obtain the multiple to-be-processed images.
[0043] In a possible implementation, the graph attention feature encoder comprises a graph node feature embedding component and a graph topology attention component.
[0044] The remote sensing feature representation of the sample instance is extracted by using the graph attention feature encoder that has completed the initial training, and the method comprises:
[0045] For a target to-be-processed image in the sample instance, the target to-be-processed image is divided into multiple graph nodes by using a super-pixel segmentation method to obtain multiple graph nodes corresponding to the target to-be-processed image.
[0046] For a target graph node in the multiple graph nodes, the target graph node is subjected to feature embedding extraction by using the graph node feature embedding component to obtain a spatial feature vector of the target graph node, wherein the spatial feature vector of the target graph node is used to indicate an image region of the target graph node.
[0047] A temporal feature vector of the target graph node and a topology feature vector of the target graph node are determined, wherein the temporal feature vector of the target graph node is used to indicate a time phase to which the target graph node belongs, and the topology feature vector of the target graph node is used to indicate a spatial topology relationship of the target graph node in the to-be-processed image to which the target graph node belongs.
[0048] The spatial feature vector of the target graph node, the temporal feature vector of the target graph node, and the topology feature vector of the target graph node are merged to obtain a node space-time feature vector of the target graph node, and the graph nodes corresponding to the multiple to-be-processed images of the same sample instance use the same temporal feature vector.
[0049] The node space-time feature vectors corresponding to the sample instance are loaded into the graph topology attention component, wherein the node space-time feature vectors corresponding to the sample instance comprise the node space-time feature vectors of the graph nodes corresponding to the multiple to-be-processed images belonging to the sample instance.
[0050] The graph topology attention component is configured to perform attention aggregation on the node space-time feature vector corresponding to the sample instance to obtain a remote sensing feature representation corresponding to the sample instance.
[0051] In a possible implementation, the training of the intermediate remote sensing small sample change detection model by using the small sample change detection data instance comprises:
[0052] The reference time-phase feature discriminator and the change type discriminator are sequentially determined as the feature discriminator to be updated; and discriminators other than the feature discriminator in the reference time-phase feature discriminator and the change type discriminator are determined as reference discriminators;
[0053] The sample instance of the feature discriminator is determined in the small sample change detection data instance.
[0054] The intermediate remote sensing small sample change detection model is configured to output a to-be-determined detection result and a reference detection result corresponding to the sample instance of the feature discriminator; the to-be-determined detection result is a detection result generated by the feature discriminator, and the reference detection result is a detection result generated by the reference discriminators;
[0055] A preset true value discriminator is configured to determine a true detection result corresponding to the sample instance of the feature discriminator; the preset true value discriminator is a discriminator that is trained and is used for the same type of discrimination task as the reference discriminators.
[0056] The error parameter of the feature discriminator is determined according to the to-be-determined detection result, the reference detection result, and the true detection result.
[0057] The model parameters of the graph attention feature encoder and the feature discriminator are updated according to the error parameter of the feature discriminator, until a model convergence condition is met, to obtain the target remote sensing small sample change detection model.
[0058] In a possible implementation, the determination of the error parameter of the feature discriminator according to the to-be-determined detection result, the reference detection result, and the true detection result comprises:
[0059] The detection error of the feature discriminator is determined according to the to-be-determined detection result and a change type target value corresponding to the to-be-determined detection result; the detection error is used to represent the reliability of the to-be-determined detection result generated by the feature discriminator.
[0060] determine a reference error of the feature discriminator according to the reference detection result and the real detection result, wherein the reference error is used to represent stability between the reference detection result and the real detection result;
[0061] determine an error parameter of the feature discriminator according to the detection error and the reference error.
[0062] In a possible implementation, the training of the intermediate remote sensing small sample change detection model by using the small sample change detection data instance to obtain a target remote sensing small sample change detection model comprises:
[0063] determine a plurality of sample instances of the intermediate remote sensing small sample change detection model from the small sample change detection data instance according to spatiotemporal coverage distribution matching of the reference time-phase remote sensing data instance and the change time-phase remote sensing data instance;
[0064] output first detection results and second detection results corresponding to the sample instances by the intermediate remote sensing small sample change detection model, wherein the first detection results are detection results generated by the reference time-phase feature discriminator, and the second detection results are detection results generated by the change type discriminator;
[0065] determine a first detection error according to the first detection result and a change type target value corresponding to the first detection result, wherein the first detection error is used to represent reliability of the first detection result generated by the reference time-phase feature discriminator;
[0066] determine a second detection error according to the second detection result and a change type target value corresponding to the second detection result, wherein the second detection error is used to represent reliability of the second detection result generated by the change type discriminator;
[0067] determine a first regularization term according to the first detection result and a real detection result corresponding to the first detection result, wherein the first regularization term is used to represent stability between the first detection result and the real detection result corresponding to the first detection result;
[0068] determine a second regularization term according to the second detection result and a real detection result corresponding to the second detection result, wherein the second regularization term is used to represent stability between the second detection result and the real detection result corresponding to the second detection result;
[0069] fuse the first detection error, the second detection error, the first regularization term and the second regularization term according to a fusion coefficient to obtain a model error parameter, wherein the fusion coefficient is adaptively adjusted according to error proportions of each discrimination task during training.
[0070] According to the model error parameter, the model parameters of each network in the intermediate remote sensing small sample change detection model are updated until the model convergence condition is met, and the target remote sensing small sample change detection model is obtained.
[0071] In a second aspect, an embodiment of the present application provides a server system, comprising a server configured to execute the method of the first aspect.
[0072] Compared with the prior art, the present application provides the following beneficial effects: the combination of the large model remote sensing small sample change detection method and system disclosed in the present application relates to the field of artificial intelligence technology, which comprises the following steps: first, performing radiation correction and atmospheric correction on the original remote sensing image to generate a standardized remote sensing image; aligning the standardized images of different time phases to a unified geographic coordinate system through geographic registration; obtaining the aligned reference time phase and change time phase images; inputting the two time phase images into the pre-trained target remote sensing small sample change detection model containing a graph attention feature encoder to output a change type map of the target region. The present application captures the spatial and temporal topological relationship of ground objects through the graph attention mechanism, solves the problem of relying on a large amount of labeled data in traditional methods, and improves the change detection accuracy in the small sample scene. BRIEF DESCRIPTION OF DRAWINGS
[0073] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0074] Figure 1 A step flowchart of a large model remote sensing small sample change detection method combining graph attention provided by an embodiment of the present application is shown in the figure.
[0075] Figure 2 A structural schematic block diagram of a computer device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0077] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0078] To solve the technical problems in the foregoing background art, Figure 1 The flowchart of the large model remote sensing small sample change detection method combined with image attention provided by the embodiments of the present disclosure is shown below. The large model remote sensing small sample change detection method combined with image attention is described in detail below.
[0079] Step S201, performing radiation correction and atmospheric correction on the original remote sensing image data of the target area to generate standardized remote sensing images;
[0080] Step S202, aligning the standardized remote sensing images of different time phases to a unified geographic coordinate system through geographic registration processing;
[0081] Step S203, obtaining the aligned reference time phase remote sensing image and change time phase remote sensing image; the change time phase remote sensing image is a remote sensing image collected at a preset collection time interval from the reference time phase remote sensing image;
[0082] Step S204, inputting the reference time phase remote sensing image and change time phase remote sensing image into a pre-trained target remote sensing small sample change detection model to obtain a change type map of the target area.
[0083] In the embodiments of the present disclosure, the server performs large model remote sensing small sample change detection combined with image attention on remote sensing image data (including multi-spectral images of reference time phase and change time phase, with a spatial resolution of 10 meters and covering visible light to near-infrared bands) of a certain target area.
[0084] First, the digital quantization value (DN) of the original satellite image is disturbed by factors such as sensor gain offset, solar elevation angle, and atmospheric scattering / absorption, and cannot directly reflect the true reflectivity of the ground. The server first calls the radiation correction module of a professional remote sensing processing tool, inputs the absolute calibration coefficient provided by the satellite (including the gain and offset parameters of each band), and converts the DN value to the ground reflectivity. For example, the DN value of a certain pixel is processed, and the reflectivity conforms to the true spectral characteristics of different ground objects such as vegetation (usually 30%-50%) and buildings (10%-20%). Subsequently, an atmospheric correction model (such as FLA ASH) is used, combined with the atmospheric type (such as moderate continental atmosphere) of the target area, the visibility (such as 10 kilometers, without serious fog and haze), and the aerosol model (such as urban aerosol, suitable for human emission scenes such as industrial areas), to calculate the atmospheric transmittance and aerosol scattering contribution, and further eliminate the influence of the atmosphere on the image. Finally, the standardized remote sensing image (file format: GeoTIFF) is generated. At this time, the spectral information of the image has accurately restored the ground conditions, laying a foundation for subsequent analysis.
[0085] Due to factors such as satellite orbit deviation and terrain undulation, there is a geometric difference (the position deviation of the same ground object in the two images is about 2 pixels) between the standardized images of the reference phase and the change phase. The server uses the reference phase image as a reference (with higher geometric accuracy) to extract 20 evenly distributed feature points (covering the four corners and the center area of the image to ensure uniform distribution) such as road intersections, building corners, and water boundary points using feature extraction algorithms (such as SIFT). The coordinates of the feature point pairs are fitted using a polynomial model (such as a quadratic polynomial) to construct a geometric transformation equation. Then, the change phase image is resampled using a bilinear interpolation method to convert it to the same coordinate system as the reference phase (such as the transverse Mercator projection suitable for mid-latitude regions). Finally, the registration accuracy is verified: the root mean square error (RMSE) of all feature point pairs is less than 1 pixel (about 10 meters), meeting the spatial consistency requirements of remote sensing change detection and ensuring that the spatial resolution and pixel arrangement of the two-phase images are completely consistent.
[0086] The server retrieves the two-phase images that have been standardized and georeferenced from the local remote sensing image database, confirming that they cover the same target area, use the same coordinate system, have the same spatial resolution (10 meters), and pixel size (such as 512x512). At this point, the two-phase images have the core conditions of "same area, same coordinate system, same resolution" and can be directly used as input for the subsequent change detection model.
[0087] The server splices the reference phase (3 channels: red, green, blue) and change phase (3 channels) images into a 6-channel input tensor (size consistent with the original image, such as 512x512x6), and normalizes the reflectance values to the range of 0-1 (such as reflectance 0.2 corresponding to the normalized value 0.2). The pre-trained "large model combined with graph attention" (this model is trained using small sample data, only using 10% of the labeled samples in the target area, solving the problem of traditional methods relying on a large amount of labeled data) is input.
[0088] The internal processing logic of the model is as follows: first, superpixel segmentation is performed on each time phase image (for example, using the SLIC algorithm to divide the image into 1000 superpixels), and the image is divided into multiple "graph nodes" (each node corresponds to a superpixel area, and the area is uniform); then, the "spatial features" (the spectral average of all pixels in the area, such as the average reflectivity of the red, green and blue bands) of each node, "temporal features" (the reference phase is marked as 0, and the change phase is marked as 1, which distinguishes different time dimensions) and "topological features" (the spatial Euclidean distance between the node and all other nodes, reflecting the spatial relationship between the nodes) are extracted, and the three are combined into a "node space-time feature vector" (dimension about 1000+); then, the attention weight between nodes is calculated through the graph topology attention component (using the attention mechanism of the Leaky ReLU activation function, reflecting the space-time correlation between nodes, such as the nodes of the same road having a higher weight, and the corresponding nodes of different time phases having a higher weight), and the node features are aggregated according to the weight (obtaining the "context feature vector" of each node, which fuses the information of the surrounding nodes); subsequently, the reference phase feature discriminator (full connection layer) outputs the feature type of each reference phase node (such as building, road, vegetation, and water body), and the change type discriminator (full connection layer that fuses the context features of two time phases) outputs the change type of each node (such as building addition, road expansion, vegetation reduction, and water body disappearance); finally, the prediction result at the node level is mapped back to the pixel level (for example, a superpixel area contains 100 pixels, and the change type of all pixels is the prediction result of the node), and a "change type map" (size consistent with the input image, such as 512x512) is generated.
[0089] The change type map is encoded in pseudo-color (for example, red represents "building addition", blue represents "vegetation reduction", green represents "road expansion", and yellow represents "water body disappearance"), which clearly shows the ground changes between the two time phases in the target area, for example, the newly added building area in the target area is displayed in red, and the reduced vegetation area is displayed in blue. The server saves the map as a GeoTIFF file containing coordinate system information, providing accurate spatial data support for city planning (such as industrial area expansion monitoring) and environmental protection (such as vegetation coverage change analysis).
[0090] From the original image to the final change type map, the server ensures spectral authenticity through standardized processing, spatial consistency through geographic registration, and space-time correlation through the graph attention model, achieving accurate remote sensing change detection under small sample conditions and effectively solving the problem of relying on a large amount of labeled data in traditional methods, providing an efficient and intelligent solution for remote sensing image analysis.
[0091] In the embodiment of the application, the target remote sensing small sample change detection model is trained in the following manner.
[0092] obtaining an initial remote sensing small sample change detection model, the initial remote sensing small sample change detection model comprising: a reference time phase feature extraction model and a change discrimination model, the reference time phase feature extraction model and the change discrimination model sharing a same graph attention feature encoder, the reference time phase feature extraction model comprising the graph attention feature encoder and a reference time phase feature discriminator, the change discrimination model comprising the graph attention feature encoder and a change type discriminator;
[0093] training the reference time phase feature extraction model using a reference time phase remote sensing data instance, updating model parameters of the graph attention feature encoder and the reference time phase feature discriminator included in the reference time phase feature extraction model, to obtain a graph attention feature encoder after initial training and a reference time phase feature discriminator after initial training; wherein the reference time phase remote sensing data instance includes reference time phase remote sensing image data;
[0094] based on the change type discriminator and the graph attention feature encoder after initial training, constructing an initialized change discrimination model;
[0095] training the change type discriminator in the initialized change discrimination model using a change time phase remote sensing data instance, freezing model parameters of the graph attention feature encoder after initial training, and updating model parameters of the change type discriminator, to obtain a change type discriminator after initial training; wherein the change time phase remote sensing data instance includes change time phase remote sensing image data;
[0096] based on the graph attention feature encoder after initial training and the change type discriminator after initial training, constructing a change discrimination model after initial training;
[0097] training the change discrimination model after initial training using the change time phase remote sensing data instance, updating model parameters of the graph attention feature encoder after initial training and the change type discriminator after initial training, to obtain a graph attention feature encoder after advanced training and a change type discriminator after advanced training;
[0098] based on the graph attention feature encoder after advanced training, the reference time phase feature discriminator after initial training, and the change type discriminator after advanced training, constructing an intermediate remote sensing small sample change detection model;
[0099] The intermediate remote sensing small sample change detection model is trained by using a small sample change detection data instance, to obtain a target remote sensing small sample change detection model; wherein an output of the target remote sensing small sample change detection model is a change type map, and the small sample change detection data instance comprises at least one of the following: the reference time phase remote sensing image data and the change time phase remote sensing image data.
[0100] In the embodiments of the present application, the initial model is composed of a reference time phase feature extraction model and a change discrimination model, both of which share a graph attention feature encoder (used to capture the spatial topological relationship and the spatio-temporal correlation of features in remote sensing images). The reference time phase feature extraction model includes the graph attention feature encoder and a reference time phase feature discriminator (outputting reference time phase feature types such as buildings, roads, etc.); the change discrimination model includes the same graph attention feature encoder and a change type discriminator (outputting change types between two time phases such as building addition, vegetation reduction, etc.). At this time, all model parameters are randomly initialized and have not been trained. The server uses reference time phase remote sensing data instances (including reference time phase multi-spectral images and corresponding feature type labels) to train the reference time phase feature extraction model. During the training process, the graph attention feature encoder performs superpixel segmentation on the reference time phase image, divides the image into a plurality of graph nodes, extracts the spatial features (such as spectral mean) of each node, the topological features (such as the spatial distance from other nodes) and the time phase features (such as the reference time phase label), and aggregates the node features through the attention mechanism to generate a context feature vector; the reference time phase feature discriminator receives the feature vector and outputs the feature type prediction. The server updates the parameters of the graph attention feature encoder and the reference time phase feature discriminator through back propagation, so that the model learns the feature representation and classification ability of the features in the reference time phase, and finally obtains the graph attention feature encoder with completed initial training (with feature extraction ability) and the reference time phase feature discriminator with completed initial training (with feature type discrimination ability). The server combines the graph attention feature encoder with completed initial training (with fixed parameters and retained feature extraction ability) and the untrained change type discriminator (with randomly initialized parameters) to construct an initialized change discrimination model. At this time, the change type discriminator has not learned the feature pattern of the change type and only exists as part of the model structure. The server uses change time phase remote sensing data instances (including change time phase hyperspectral images and corresponding change type labels) to train the change type discriminator in the initialized change discrimination model. During the training, the parameters of the graph attention feature encoder are frozen (not involved in updating) and only responsible for extracting the node context features of the change time phase image; the change type discriminator receives the features and outputs the change type prediction. The server updates only the parameters of the change type discriminator through back propagation, so that the model focuses on learning the feature pattern of the change type in the change time phase, and finally obtains the change type discriminator with completed initial training (with change type discrimination ability). The server combines the graph attention feature encoder with completed initial training (with fixed parameters) and the change type discriminator with completed initial training (with updated parameters) to construct the change discrimination model with completed initial training. At this time, the model has a preliminary change type detection ability, but the parameters of the graph attention feature encoder have not been optimized for the change time phase data. The server again uses change time phase remote sensing data instances to train the change discrimination model with completed initial training.Different from the previous step, this time the parameters of the graph attention feature encoder are not frozen, but are updated simultaneously with the parameters of the change type discriminator. During training, the graph attention feature encoder adjusts the feature extraction strategy according to the change phase data to generate more suitable context features for change type discrimination; the change type discriminator optimizes the change type prediction according to the updated features. Through the collaborative optimization of the two, the graph attention feature encoder that has completed the advanced training (with more accurate change-related feature extraction capability) and the change type discriminator that has completed the advanced training (with more accurate change type discrimination capability) are finally obtained. The server combines the graph attention feature encoder that has completed the advanced training (optimized feature extraction capability), the baseline phase feature discriminator that has completed the initial training (retained feature type discrimination capability), and the change type discriminator that has completed the advanced training (optimized change type discrimination capability) to construct an intermediate remote sensing small sample change detection model. At this time, the model has fused the baseline phase feature discrimination and change type discrimination capabilities, but has not yet been adjusted for the small sample change detection scene. The server uses small sample change detection data instances (containing a small amount of baseline phase and change phase image pairs and corresponding change type labels) to train the intermediate remote sensing small sample change detection model. During training, the server fine-tunes the model parameters (including the graph attention feature encoder, the baseline phase feature discriminator, and the change type discriminator) to adapt the model to the change detection task in the small sample scene. The graph attention feature encoder further optimizes feature extraction to capture subtle changes in small sample data; the baseline phase feature discriminator and the change type discriminator are adjusted collaboratively to improve the accuracy of change type prediction. Finally, when the model converges, the target remote sensing small sample change detection model is obtained, which outputs a change type map (pixel-level change type label) and can accurately detect changes on the ground under small sample conditions. The entire training process takes "feature extraction-discrimination capability learning-collaborative optimization-small sample adaptation" as the main line, and through the iterative model structure and parameters, the baseline phase data (learning feature), the change phase data (learning change type), and the small sample data (adapting to the target task) are fully utilized to ultimately obtain the target model with small sample change detection capability. The model captures the spatio-temporal correlation of features through the graph attention mechanism, solves the problem of relying on a large amount of labeled data in traditional methods, and can provide an efficient and intelligent solution for remote sensing image analysis.
[0101] In the embodiment of the present application, the baseline phase remote sensing data instance is a multispectral sequence data, and the baseline phase remote sensing data instance includes at least one baseline phase multispectral sequence sample data; the change phase remote sensing data instance is a change single image data, and the change phase remote sensing data instance includes at least one change phase hyperspectral single image sample data;
[0102] The base time phase remote sensing data instance is used to train the base time phase feature extraction model, update the model parameters of the graph attention feature encoder and the base time phase feature discriminator included in the base time phase feature extraction model, and obtain the graph attention feature encoder after initial training and the base time phase feature discriminator after initial training. The implementation can be performed through the following examples.
[0103] For each base time phase multispectral sequence sample data, according to a plurality of extraction time sequence nodes, a plurality of sequence time node images corresponding to the base time phase multispectral sequence sample data are obtained.
[0104] The base time phase feature extraction model is trained using the plurality of sequence time node images corresponding to the base time phase multispectral sequence sample data, the model parameters of the graph attention feature encoder and the base time phase feature discriminator included in the base time phase feature extraction model are updated, and the graph attention feature encoder after initial training and the base time phase feature discriminator after initial training are obtained.
[0105] The change type discriminator in the initialized change discrimination model is trained using the change phase remote sensing data instance, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated to obtain the change type discriminator after initial training, including:
[0106] For each change time phase hyperspectral single image sample data, data augmentation is performed on the change time phase hyperspectral single image sample data to obtain a plurality of augmented sample data corresponding to the change time phase hyperspectral single image sample data.
[0107] The change type discriminator is trained using the plurality of augmented sample data corresponding to the change time phase hyperspectral single image sample data, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated to obtain the change type discriminator after initial training.
[0108] In the embodiments of the present application, the server reads 1000 reference time phase remote sensing data instances of the exemplary multi-spectral sequence sample (each sample contains 4 multi-spectral images of the target area in spring (March), summer (June), autumn (September) and winter (December) in 2022, each image is 3 channels (red, green and blue), and the spatial resolution is 10 meters), and each sample is labeled with a pixel-level feature type label (building, road, vegetation and water body). For each sequence sample, the server directly extracts 4 sequence time node images (i.e. images in March, June, September and December 2022) corresponding to the sample according to the quarterly time sequence nodes (spring, summer, autumn and winter) without additional interpolation or screening, which covers the typical changes of feature spectral characteristics in a year (such as vegetation returning green in spring and leaves falling in autumn). During training, the server splices the 4 node images of each sequence sample into a 12-channel input tensor (4 phases x 3 bands), inputs the reference time phase feature extraction model: the graph attention feature encoder performs superpixel segmentation (SLIC algorithm, 1000 superpixels per image) on each node image, extracts the spatial feature (regional pixel spectral mean), time sequence feature (phase label, such as 0 for spring and 1 for summer) and topological feature (Euclidean distance with other nodes) of each node, and combines them into a 1004-dimensional node space-time feature vector; the 2-layer GAT (graph attention layer) calculates the attention weight between nodes (such as the node weight of the same vegetation area is higher), and aggregates to obtain a 128-dimensional context feature vector (fusing space-time correlation); the reference time phase feature discriminator (2-layer fully connected network) receives the context feature vector and outputs the feature type prediction probability (4 categories) of each node. The server uses the cross-entropy loss function (calculates the error of the predicted probability and the true label), uses the Adam optimizer (learning rate 1e-4, batch size 32) to back propagate, and simultaneously updates the parameters of the graph attention feature encoder and the reference time phase feature discriminator. The training lasts for 50 rounds, and the feature classification accuracy of the verification set (200 samples) is improved from the initial 52% to 85% (the loss value decreases from 2.1 to 0.4) every round, and finally the graph attention feature encoder with initial training (with annual time sequence feature extraction capability) and the reference time phase feature discriminator with initial training (feature classification accuracy 85%) are saved. The server reads 500 change time phase remote sensing data instances of the exemplary high-spectral single sample (each sample is a high-spectral image of the target area in January 2023, 13 bands (covering visible light to near infrared), and the spatial resolution is 10 meters), and each sample is labeled with a pixel-level change type label (building addition, road expansion, vegetation reduction and water body disappearance).For each single sample, the server performs data augmentation to expand the small sample size: sliding window cropping: a 256x256 pixel window is used to slide on the sample with a 50% overlap rate, generating 5 sub-region images for each sample (covering different spatial positions of the sample); scale transformation: 0.8 times (reduction), 1.0 times (original size), and 1.2 times (enlargement) scaling is performed on each sub-region image, generating 3 times data (a total of 5x3 = 15); spatial smoothing: a Gaussian filter with different sigma values (0.5, 1.0, 1.5) is used to smooth the scaled images, simulating the influence of different degrees of atmospheric scattering, generating 3 times data (a total of 15x3 = 45 augmented samples per original sample). During training, the server inputs each augmented sample into the frozen graph attention feature encoder (parameters fixed, retaining the feature extraction capability of the feature), to extract a 128-dimensional context feature vector; then, the change type discriminator (2-layer fully connected network, input dimension 128) receives the feature vector and outputs a change type prediction probability (4 categories). The server uses a cross-entropy loss function (calculating the error between the prediction and the true label) and an Adam optimizer (learning rate 5e-5, batch size 16) to only update the parameters of the change type discriminator (the encoder parameters are frozen to avoid damaging the learned features of the features). The training lasts for 30 rounds, and the change type detection accuracy of the validation set (500 augmented samples) increases from 31% to 72% (the loss value decreases from 2.3 to 0.6), and the change type discriminator that has completed the initial training is finally saved (with change type discrimination capability). Throughout the process, the server extracts the interannual spectral change information that retains the baseline temporal data through the time sequence node, enabling the encoder to learn more robust features of the features; the small sample problem of the change phase single image data is solved through multi-strategy data augmentation, enabling the change type discriminator to focus on learning change features. Both of them lay the foundation for subsequent model advanced training.
[0109] In the embodiment of the application, the change phase remote sensing data instance is change single image data, and the change phase remote sensing data instance includes at least one change phase hyperspectral single sample data;
[0110] The change type discriminator in the initialized change discrimination model is trained using the change phase remote sensing data instance, the model parameters of the graph attention feature encoder that has completed the initial training are frozen, and the model parameters of the change type discriminator are updated to obtain the change type discriminator that has completed the initial training. The implementation can be performed by the following examples.
[0111] A plurality of different image regions are cropped from the same change phase hyperspectral single sample data to obtain a plurality of to-be-processed images; wherein there is a locally overlapping image region between any two of the to-be-processed images derived from the same change phase hyperspectral single sample data;
[0112] determine the plurality of to-be-processed images as sample instances of the initialized change discrimination model;
[0113] extract a remote sensing feature representation of the sample instance by the graph attention feature encoder that has completed the initial training;
[0114] determine a change type detection result of the sample instance according to the remote sensing feature representation of the sample instance by the change type discriminator;
[0115] determine an error parameter according to the change type detection result of the sample instance and a change type target value, and update a model parameter of the change type discriminator based on the error parameter to obtain the change type discriminator that has completed the initial training.
[0116] In the embodiments of the present application, for example, the server trains the change type discriminator in the initialized change discrimination model (the parameters of the graph attention feature encoder are frozen) based on the change time phase hyperspectral single sample data (for example, the 13-band hyperspectral image of January 2023 in an industrial area, the spatial resolution is 10 meters, and the four types of pixel-level change type labels are labeled as “building addition, road expansion, vegetation reduction, and water body disappearance”), and the specific process is as follows: the server reads a change time phase hyperspectral single sample (the file name is “20230120_industrial_hs.tif”, the size is 1024*1024 pixels, and the coverage area is about 10.24 km*10.24 km), sets the cropping window parameters: the window size is 256*256 pixels (corresponding to the actual area of about 2.56 km*2.56 km), and the sliding step is 128 pixels (the overlap rate is 50%). The server calls the “Warp” tool of the GDAL library, takes the upper left corner of the sample as the starting point, slides the window along the horizontal and vertical directions, and cuts out five to-be-processed images (named “20230120_industrial_hs_crop1.tif” to “_crop_5.tif”) in turn. There is a local overlap of 128 pixels between these to-be-processed images (for example, crop1 and crop2 overlap by 128 pixels in the horizontal direction, and crop1 and crop3 overlap by 128 pixels in the vertical direction), which ensures that the sample covers the entire spatial area of the original sample while preserving the spatial continuity of the ground objects. The server directly uses the five to-be-processed images obtained by cropping as sample instances of the initialized change discrimination model (without additional preprocessing, only the 13-band hyperspectral information of the original sample is retained). The size of each sample instance is 256*256*13, which meets the spatial size requirement of the model input (consistent with the input during the training of the reference time phase). The server calls the graph attention feature encoder that has completed the initial training (the parameters are frozen, and the ground object feature extraction capability is retained) to extract features from each sample instance: superpixel segmentation: the SLIC algorithm is used to segment each to-be-processed image into 1000 superpixels (each superpixel corresponds to an area of about 65500 square meters), ensuring that the segmentation result is consistent with the number of nodes during the training of the reference time phase; node feature fusion: the spatial features (13-band hyperspectral reflectance mean, dimension 13), time phase features (change time phase label 1, dimension 1), and topological features (Euclidean distance from other 999 nodes, dimension 999) of each superpixel graph node are extracted, and combined into a 1013-dimensional node spatio-temporal feature vector; attention aggregation: the attention weights between nodes (for example, the weights of the nodes in the building addition area and the surrounding road nodes are higher) are calculated through 2 layers of GAT (graph attention layer, 128 hidden units per layer), and a 128-dimensional context feature vector (fusing spatial topology and spatio-temporal correlation) is aggregated.The server inputs the context feature vector (128 dimensions) of each sample instance into the initialized change type discriminator (2-layer fully connected network, input dimension 128, output dimension 4) to output the change type prediction probability of each superpixel graph node (for example, the prediction probability of a certain node is “building addition: 0.85, road expansion: 0.10, vegetation reduction: 0.03, water body disappearance: 0.02”). The server compares the change type prediction probability of each sample instance with the true label (pixel-level change type annotation in the original sample) and calculates the error parameter using the cross-entropy loss function (for example, the loss value of a certain sample instance is 0.5, reflecting the deviation between the prediction and the true label). Subsequently, the server uses the Adam optimizer (learning rate 5e-5, batch size 16) to update only the parameters of the change type discriminator (the parameters of the graph attention feature encoder are frozen to avoid damaging the learned land feature). During the training process, the server uses 5-fold cross-validation (2500 images to be processed generated from 500 original samples are divided into 5 groups, 500 images in each group, and each group is used as a validation set in turn), and calculates the change type detection accuracy of the validation set after each round of training (for example, the accuracy of the first round is 31%, the accuracy of the tenth round is improved to 55%, and the accuracy of the thirtieth round is improved to 72%). When the validation set accuracy improves by less than 0.5% for 3 consecutive rounds, the training stops, and the server saves the completed initial training change type discriminator (after parameter update, the change type detection accuracy is 72%). The server generates multiple images to be processed from the same change time phase hyperspectral single sample by local overlapping cropping, which expands the small sample size; extracts stable land features through the frozen graph attention feature encoder to ensure that the change type discriminator focuses on learning change features; and updates the discriminator parameters through the cross-entropy loss and Adam optimization to ultimately obtain a model component with change type discrimination capability. The entire process solves the small sample problem of change time phase single image data and lays the foundation for subsequent model advanced training.
[0117] In the embodiments of the present application, the multiple different image regions are cropped from the same change time phase hyperspectral single sample data to obtain multiple images to be processed, which can be implemented by the following examples.
[0118] Determine the size of the image cropping window;
[0119] Slide the image cropping window on multiple different sampling points of the change time phase hyperspectral single sample data, and crop the image region in the image cropping window to obtain the multiple images to be processed.
[0120] In the embodiment of the present application, for example, the server generates a plurality of to-be-processed images by sliding window cropping from the changed time phase hyperspectral single sample data (taking the 13-band hyperspectral image "20230120_industrial_hs.tif" of January 2023 in an industrial area as an example, the size is 1024*1024 pixels, the spatial resolution is 10 meters, and the coverage area is about 10.24 kilometers*10.24 kilometers), and the specific process is as follows: the server determines the cropping window size to be 256*256 pixels according to the model input consistency requirement (which needs to match the superpixel segmentation and feature extraction size during the training of the reference time phase). The size corresponds to an actual geographical area of about 2.56 kilometers*2.56 kilometers, which can not only retain enough spatial information of ground objects (such as complete building blocks and road sections), but also meet the model's limitation on the input spatial dimension (to avoid overloading of computing resources due to excessively large size). The server sets the sliding step to be 128 pixels (i.e., the window moves 128 pixels horizontally / vertically each time, with an overlap rate of 50%), so as to ensure the spatial continuity of ground objects between adjacent to-be-processed images (for example, the same road or building area will not be completely divided due to cropping). Sampling point calculation: from left to right in the horizontal direction, the upper left corner x coordinates are 0, 128, 256, 384, 512, 640, and 768 (a total of 7 sampling points, covering the sample width of 1024 pixels); from top to bottom in the vertical direction, the upper left corner y coordinates are also 0, 128, 256, 384, 512, 640, and 768 (a total of 7 sampling points, covering the sample height of 1024 pixels). Window sliding and cropping: the server iterates through all the sampling points (a total of 7*7=49), slides the cropping window to each sampling point position (for example, sampling point (0, 0) corresponds to the window range x=0-255, y=0-255; sampling point (128, 0) corresponds to x=128-383, y=0-255), calls the "RasterIO" function of the GDAL library to crop the image area in the window, and saves each cropped image as a to-be-processed image (named as "20230120_industrial_hs_crop_xx_yy.tif", where xx is the upper left corner x coordinate and yy is the upper left corner y coordinate). Finally, 49 to-be-processed images are cropped from the same changed time phase hyperspectral single sample, each to-be-processed image has a size of 256*256*13 (13-band hyperspectral), and each two to-be-processed images have a local overlapping area of 128 pixels (for example, "crop_0_0.tif" and "crop128_0.tif" overlap by 128 pixels in the horizontal direction). This cropping method not only expands the small sample size (converts one original sample into 49 to-be-processed samples), but also retains the spatial topological relationship of ground objects, providing continuous and complete spatial feature data for the subsequent training of the change type discriminator.
[0121] In the embodiment of the present application, the multiple different image regions are cropped from the same change temporal phase hyperspectral single sample data to obtain the multiple images to be processed, which can be implemented by the following examples.
[0122] The size of the image cropping window and the spatial arrangement position in the change temporal phase hyperspectral single sample data are determined.
[0123] In the scale transformation range corresponding to the change temporal phase hyperspectral single sample data, multiple different scale factors corresponding to the change temporal phase hyperspectral single sample data are determined.
[0124] According to the multiple different scale factors, the size of the change temporal phase hyperspectral single sample data is transformed to obtain multiple change temporal phase hyperspectral single sample data after scale transformation.
[0125] The image regions in the image cropping window are cropped from the multiple change temporal phase hyperspectral single sample data after scale transformation to obtain the multiple images to be processed.
[0126] In the embodiments of the present application, an exemplary server generates a plurality of images to be processed for a hyperspectral single sample of a certain industrial area in January 2023 (file name “20230120_industrial_hs.tif”, size 1024*1024 pixels, 13 bands, spatial resolution 10 meters, labeled with change type labels such as “building addition”), by “scale transformation + fixed position cropping”, as follows: According to the spatial consistency requirement of the model input (which needs to match the superpixel segmentation size trained in the reference phase), the server sets the cropping window size to 256*256 pixels (corresponding to an actual geographic area of about 2.56 km*2.56 km, which can completely retain typical ground objects such as building blocks and road sections in the industrial area). At the same time, in order to cover the core area of the sample (the main production area of the industrial area), the center of the sample is selected as the spatial layout position, and the upper left corner coordinate is (384, 384) (corresponding to the window range: x=384-639 pixels, y=384-639 pixels). The server selects three scale factors of 0.8 (reduction), 1.0 (original size) and 1.2 (enlargement) within the scale transformation range of 0.8-1.2. The reduction factor simulates low-resolution satellite images (such as Sentinel 2 10-meter resolution), and the enlargement factor simulates high-resolution images (such as worldview-3 0.3-meter resolution), aiming to enhance the robustness of the model to changes in ground objects of different scales (for example, the feature difference between small-area building addition and large-area road expansion). The server calls the “resize” function of the OpenCV library to perform scale transformation on the original sample using the bilinear interpolation method (to maintain the continuity of spectral information): 0.8 factor: reduce the original 1024*1024 sample to 819*819 pixels (1024*0.8, rounded); 1.0 factor: retain the original sample size (1024*1024); 1.2 factor: enlarge the original sample to 1229*1229 pixels (1024*1.2, rounded). From each sample that has completed scale transformation, a 256*256 window is cropped according to the preset center spatial layout position: 0.8 scaled sample (819*819): center coordinate (409, 409) (819 / 2≈409), cropped window 281-536*281-536 pixels (409±128, ensuring window size 256*256); 1.0 original sample (1024*1024): directly crop the preset center area (384-639*384-639 pixels); 1.2 enlarged sample (1229*1229): center coordinate (614, 614) (1229 / 2≈614), cropped window 486-741*486-741 pixels (614±128).Finally, the server obtains 3 images to be processed (corresponding to scales of 0.8, 1.0, and 1.2) from the same change time sample, each of which is 256*256*13 bands (retaining hyperspectral information) and covers the core industrial area of the sample. This way, the scale diversity of the sample is expanded through scale transformation, helping the change type discriminator to learn change characteristics at different resolutions (such as details of small-area building addition in enlarged images and overall trends of large-area road expansion in reduced images), and improving the generalization ability of the model to real scenes.
[0127] In the embodiment of the present application, the multiple different image regions are obtained by cropping from the same change time hyperspectral single sample data, and the multiple images to be processed can be implemented by the following examples.
[0128] The change time hyperspectral single sample data is spatially smoothed by using multiple differentiated spatial smoothing model parameters to obtain multiple processed change time hyperspectral single sample data.
[0129] The image regions within the image cropping window are cropped from the multiple processed change time hyperspectral single sample data to obtain the multiple images to be processed.
[0130] In the embodiments of the present application, for example, the server generates multiple images to be processed from a hyperspectral single sample of a certain industrial area in January 2023 (file name: “20230120_industrial_hs.tif”, size 1024x1024 pixels, 13 bands, spatial resolution 10 meters, labeled with pixel-level change type labels such as “building addition”), by “differentiated spatial smoothing + fixed window cropping”, the process is as follows: the server selects a Gaussian filter (a commonly used spatial smoothing tool) and sets three differentiated sigma values (standard deviation): 0.5, 1.0, 1.5. The smaller the sigma value, the lighter the smoothing degree (retaining more details of ground objects, such as building edges); the larger the sigma value, the heavier the smoothing degree (blurring details, highlighting the overall features of large-area ground objects, such as vegetation areas). These parameters aim to simulate different degrees of atmospheric scattering or image noise, enhancing the robustness of the model to blurred images. The server calls the “GaussianBlur” function of the OpenCV library to perform batch processing on the original sample: sigma = 0.5: slightly smooth the image of each band, retaining details such as building edges, road markings (for example, the corners of the newly added factory building in the industrial area are still clearly visible); sigma = 1.0: moderate smoothing, balancing details and noise (for example, the boundary of the road expansion retains continuity while eliminating local pixel noise); sigma = 1.5: heavy smoothing, blurring small-area details (for example, the fine patches of vegetation reduction areas are merged into large-area regions, highlighting the overall trend of change). After processing, three processed change temporal hyperspectral single samples are obtained (named “20230120_industrial_hs_sigma_0.5.tif”, “_sigma1.0.tif”, “_sigma1.5.tif”), all retaining 13-band hyperspectral information. The server crops from each processed sample according to the pre-set fixed window (size 256x256 pixels, center position of the core industrial area of the original sample, upper left corner coordinates 384x384, corresponding window range 384-639x384-639 pixels). For example: crop “20230120_industrial_hs_sigma_0.5_crop.tif” from the “sigma_0.5” sample (retaining building edge details); crop “20230120_industrial_hs_sigma1.5_crop.tif” from the “sigma1.5” sample (highlighting the overall trend of vegetation reduction). Finally, the server obtains three images to be processed from the same change temporal sample (corresponding to the three sigma values), each of which is 256x256x13 bands (retaining hyperspectral characteristics).This way expands the blur diversity of the sample by differentiating spatial smoothing, helping the change type discriminator to learn the change characteristics under different blur levels (such as small-area building addition in clear images and large-area vegetation reduction in blurred images), and improving the model's adaptability to disturbances such as "atmospheric scattering" and "image noise" in real scenes.
[0131] In the embodiment of the present application, the graph attention feature encoder comprises a graph node feature embedding component and a graph topology attention component.
[0132] The remote sensing feature representation of the sample instance can be obtained by the graph attention feature encoder after the initial training.
[0133] For the target image to be processed in the sample instance, the target image to be processed is divided into a plurality of graph nodes by adopting a superpixel segmentation method, and a plurality of graph nodes corresponding to the target image to be processed are obtained.
[0134] For the target graph node in the plurality of graph nodes, the target graph node is feature-embedded and extracted by the graph node feature embedding component to obtain a spatial feature vector of the target graph node; wherein the spatial feature vector of the target graph node is used to indicate the image area of the target graph node.
[0135] The temporal feature vector of the target graph node and the topology feature vector of the target graph node are determined; wherein the temporal feature vector of the target graph node is used to indicate the time phase to which the target graph node belongs, and the topology feature vector of the target graph node is used to indicate the spatial topology relationship of the target graph node in the image to be processed.
[0136] The spatial feature vector of the target graph node, the temporal feature vector of the target graph node and the topology feature vector of the target graph node are merged to obtain a node spatio-temporal feature vector of the target graph node.
[0137] The node spatio-temporal feature vector corresponding to the sample instance is loaded into the graph topology attention component; wherein the node spatio-temporal feature vector corresponding to the sample instance comprises the node spatio-temporal feature vectors of the graph nodes corresponding to the plurality of images to be processed belonging to the sample instance.
[0138] The node spatio-temporal feature vector corresponding to the sample instance is aggregated by the graph topology attention component to obtain a remote sensing feature representation corresponding to the sample instance.
[0139] In the embodiments of the present application, for example, the server extracts remote sensing feature representation for a single sample of hyperspectral image at a change phase (for example, “20230120_industrial_hs_crop_0_0.tif” of an industrial area in January 2023, the image to be processed is 256×256 pixels, 13-band hyperspectral, and is cropped from the upper left corner of the original sample), by a graph attention feature encoder (including a graph node feature embedding component and a graph topology attention component), as follows: the server calls the SLIC superpixel segmentation algorithm (with a compactness of 10 and a segmentation number of 1000) on the target image to be processed (256×256×13), and divides the image into 1000 continuous pixel regions (i.e., graph nodes). Each graph node corresponds to an actual geographical area of about 65500 square meters (256×256 pixels / 1000 nodes×10 meters×10 meters), covering typical ground object areas such as “new buildings”, “original roads”, and “reduced vegetation”, for example, the graph node numbered “Node_001” is located at the upper left corner of the image, covering an area of about the size of a standard factory building (about 65000 square meters), and containing pixels of new buildings. For each target graph node (such as “Node_001”), the graph node feature embedding component calculates the 13-band hyperspectral reflectance mean value: traverse all pixels (about 65 pixels, 256×256 / 1000≈65) in the node, take the average value for each band (such as the visible red band and the near-infrared band), and obtain a 13-dimensional spatial feature vector. For example, the red band reflectance mean value of “Node_001” is 0.15 (a typical reflectance of a building), the near-infrared band mean value is 0.20, and the final spatial feature vector is [0.15, 0.12, 0.10, …, 0.20] (13 numerical values), which accurately indicates the spectral characteristics of the image area of the node. Time phase feature vector: since the image to be processed is from a change phase (January 2023), the server fixes its time phase feature vector as a 1-dimensional vector [1] (the reference time phase is [0]), which is used to distinguish features of different time dimensions. Topological feature vector: the server calculates the spatial Euclidean distance (based on the real distance after converting the pixel coordinates to geographical coordinates) between the target graph node (such as “Node_001”) and the other 999 graph nodes. For example, “Node_001” is located at the upper left corner of the image (geographical coordinates: East 120°15′00″, North 30°35′00″), and “Node_500” is located at the center of the image (East 120°17′30″, North 30°32′30″), and the Euclidean distance between the two is about 3.5 kilometers, so the value of the position corresponding to “Node_500” in the topological feature vector of “Node_001” is 3500 meters. Finally, the topological feature vector is 999-dimensional, which completely indicates the spatial topological relationship of the target graph node in the image to be processed.The server concatenates the spatial feature vector (13 dimensions), the temporal feature vector (1 dimension), and the topological feature vector (999 dimensions) of the target graph node in sequence to obtain a 1013-dimensional node spatio-temporal feature vector. For example, the node spatio-temporal feature vector of "Node_001" is [0.15, 0.12,..., 0.20, 1, 0, 500, 1000,..., 3500] (the first 13 positions are spatial features, the 14th position is 1, and the last 999 positions are topological distances), which integrates the spectral, temporal, and spatial location information of the node. The server collects the graph node spatio-temporal feature vectors of all the images to be processed in the sample instance (for example, if the sample instance contains 49 cropped images, each image has 1000 nodes, then there are a total of 49x1000 = 49000 node spatio-temporal feature vectors), and loads them into the graph topological attention component (2-layer GAT network, 128 hidden units per layer). These vectors cover the entire spatial area of the sample instance (1024x1024 pixels of the original sample), and retain the spatial continuity of the features. The graph topological attention component calculates the correlation weight between nodes through the attention mechanism (using a Leaky-ReLU activation function). For example, the weight between "Node_001" (newly added building) and the adjacent "Node_002" (newly added building) is relatively high (about 0.8), and the weight between "Node_001" and the distant "Node_999" (reduced vegetation) is relatively low (about 0.1). Subsequently, the component aggregates the node features according to the weight to obtain a 128-dimensional context feature vector for each node (integrating the spatio-temporal features of the neighbor nodes). For example, the context feature vector of "Node_001" integrates the building features of "Node_002" and the road features of "Node_003", and more comprehensively reflects the feature combination in the region. Finally, the server aggregates the context feature vectors of all nodes to obtain the remote sensing feature representation corresponding to the sample instance (49000x128-dimensional matrix). This representation not only retains the spatio-temporal details of each graph node (such as the location and spectrum of the newly added building), but also captures the spatial correlation between features (such as the adjacency relationship between buildings and roads) through attention aggregation, providing accurate feature input for the subsequent change type discriminator. In the entire process, the server converts the image into a graph structure through superpixel segmentation, integrates spectral, temporal, and spatial information through feature embedding, captures the correlation between features through attention aggregation, and finally extracts a robust remote sensing feature representation, laying a foundation for small sample change detection.
[0140] In the embodiments of the present application, the graph nodes corresponding to the plurality of images to be processed of the same sample instance use the same temporal feature vector.
[0141] In the embodiment of the present application, the server processes 49 cropped images to be processed (all from January 2023) of the sample instance of the change time phase "20230120_industrial_hs", and the same time phase feature vector [1] (indicating the change time phase) is used for the graph nodes of all cropped images, ensuring the consistency of the time dimension of the same instance.
[0142] In the embodiment of the present application, the intermediate remote sensing small sample change detection model is trained by using the small sample change detection data instance to obtain the target remote sensing small sample change detection model, which can be implemented by the following examples.
[0143] In turn, the reference time phase ground object discriminator and the change type discriminator are determined as the feature discriminators to be updated; wherein the discriminators other than the feature discriminators in the reference time phase ground object discriminator and the change type discriminator are determined as reference discriminators;
[0144] In the small sample change detection data instance, the sample instance of the feature discriminator is determined;
[0145] The intermediate remote sensing small sample change detection model outputs the pending detection result and the reference detection result corresponding to the sample instance of the feature discriminator; wherein the pending detection result is the detection result generated by the feature discriminator, and the reference detection result is the detection result generated by the reference discriminator;
[0146] The preset true value discriminator is used to determine the true detection result corresponding to the sample instance of the feature discriminator; wherein the preset true value discriminator is a discriminator that has completed training and is used for the same type of discrimination task as the reference discriminator;
[0147] According to the pending detection result, the reference detection result and the true detection result, the error parameter of the feature discriminator is determined;
[0148] According to the error parameter of the feature discriminator, the model parameters of the graph attention feature encoder and the feature discriminator are updated until the model convergence condition is met, and the target remote sensing small sample change detection model is obtained.
[0149] In the embodiments of the present application, for example, the server trains the intermediate remote sensing small sample change detection model (including the graph attention feature encoder GAT completed with advanced training, the baseline phase ground object discriminator D1 completed with initial training, and the change type discriminator D2 completed with advanced training) based on small sample change detection data instances (100 image pairs, including 2022 January baseline phase multispectral images, 2023 January change phase hyperspectral images, and corresponding ground object type / change type pixel-level labels) of an industrial area. The process is as follows: the server sets D1 as the feature discriminator to be updated and D2 as the baseline discrimination source (both are intermediate model components). The baseline phase images (2022 January, 3 channels, 256*256 pixels) are extracted from the 100 small samples as sample instances (100 in total) of D1. After the baseline images are input into the intermediate model, the GAT extracts 128-dimensional context features through superpixel segmentation (1000 nodes), feature embedding (spatial spectrum + time phase label + topological distance), and attention aggregation; D1 receives the features and outputs the pending detection results (ground object type prediction, for example, the probability of a certain pixel being “building” is 0.85). At the same time, the corresponding change phase images (2023 January, 13 channels) are input into the intermediate model, and D2 outputs the baseline detection results (change type prediction, for example, the probability of a certain pixel being “building addition” is 0.7). To obtain the true detection results, the server calls the pre-trained high-accuracy change type discriminator T2 (trained with 1000 change phase samples, with an accuracy of 90%) and inputs the change phase images into T2 to obtain the true results (close to the sample labels) that the probability of “building addition” is 0.95. Then, the error is calculated using the fusion loss function: the pending detection error of D1 (cross-entropy loss with the baseline phase true label, weight 0.6) and the baseline detection error of D2 (cross-entropy loss with the T2 true result, weight 0.4) are weighted and summed (for example, the total error of a certain sample is 0.35). The parameters of GAT and D1 are updated (D2 is frozen) using the Adam optimizer (learning rate 1e-6) for back propagation. After 10 rounds of training, the ground object type accuracy of the verification set is improved from 80% to 85%. The server switches D2 to the feature discriminator to be updated and D1 to the baseline discrimination source. The change phase images (2023 January, 13 channels, 256*256 pixels) are extracted from the 100 small samples as sample instances (100 in total) of D2. The change images are input into the intermediate model, GAT extracts the features, and D2 outputs the pending detection results (change type prediction, for example, the probability of a certain pixel being “building addition” is 0.75); at the same time, the corresponding baseline phase images are input into the intermediate model, and D1 outputs the baseline detection results (ground object type prediction, for example, the probability of a certain pixel being “building” is 0.8). The pre-trained high-accuracy ground object type discriminator T1 (trained with 1000 baseline phase samples, with an accuracy of 92%) is called, and the baseline images are input into T1 to obtain the true results that the probability of “building” is 0.93.The error is calculated using a fusion loss function: the undetermined detection error of D2 (cross-entropy loss with the change phase true label, weight 0.7) and the reference detection error of D1 (cross-entropy loss with T1 true result, weight 0.3) are weighted and summed (such as a sample total error of 0.3). The Adam optimizer (learning rate 1e-6) is used for back propagation to update the parameters of GAT and D2 (D1 is frozen). After 10 rounds of training, the change type accuracy of the validation set is improved from 82% to 87%. The server alternately iterates to update D1 and D2, and calculates the validation set accuracy of the target task (change type detection) after each round of training. When the accuracy is continuously improved by less than 0.5% for 3 rounds (such as 87% in the 20th round, 87.2% in the 21st round, and 87.3% in the 22nd round), stop training and save the target remote sensing small sample change detection model. The change type detection accuracy of the model reaches 87%, which can accurately output the change type map of the industrial area (such as the "building addition" area is marked with red, and the "vegetation reduction" area is marked with blue). The whole process updates two discriminators alternately, uses the output of the reference discriminant source and the true result of the preset true value discriminator to constrain the training of the to-be-updated discriminator, effectively improves the model performance in the small sample scene, and solves the problem of relying on a large amount of labeled data in traditional methods.
[0150] In the embodiment of the application, the error parameter of the feature discriminator can be determined according to the undetermined detection result, the reference detection result and the true detection result.
[0151] According to the undetermined detection result and the change type target value corresponding to the undetermined detection result, the detection error of the feature discriminator is determined; wherein the detection error is used to represent the reliability of the undetermined detection result generated by the feature discriminator;
[0152] According to the reference detection result and the true detection result, the reference error of the feature discriminator is determined; wherein the reference error is used to represent the stability between the reference detection result and the true detection result;
[0153] According to the detection error and the reference error, the error parameter of the feature discriminator is determined.
[0154] In the embodiment of the present application, for example, the server calculates the error parameter of the intermediate model (the to-be-updated feature discriminator is the change type discriminator D2, the baseline discrimination source is the baseline time phase feature discriminator D1, and the preset true value discriminator is the pre-trained high-accuracy feature discriminator T1) for the small sample change detection data instance (taking the sample of the industrial area in January 2022, the change time phase image in January 2023, and the corresponding “building addition” pixel-level label as an example), and the process is as follows: the server extracts the change time phase image (January 2023, 13 bands, 256*256 pixels) from the sample, inputs the graph attention feature encoder GAT of the intermediate model (completed advanced training, parameters can be updated), and extracts a 128-dimensional context feature vector; the to-be-updated feature discriminator D2 (change type discriminator) receives the feature, outputs the to-be-determined detection result, and the change type prediction probability of a certain pixel is [0.8 (building addition), 0.1 (road expansion), 0.05 (reduced vegetation), 0.05 (water body disappearance)]. The change type target value of the sample is the real label [1 (building addition), 0, 0, 0] (the pixel is labeled as “building addition”). The server calculates the detection error by using the cross-entropy loss function (formula: wherein (y i ) is the target value, and (p i ) is the prediction probability): [L det =-[1*ln(0.8)+0*ln(0.1)+0*ln(0.05)+0*ln(0.05)]=-ln(0.8)≈0.223]; the detection error (0.223) represents the deviation of the to-be-determined detection result (“building addition” probability 0.8) generated by D2 from the real label, and the smaller the value is, the higher the reliability is. The server extracts the baseline time phase image (January 2022, 3 bands, 256*256 pixels) from the sample, inputs the GAT of the intermediate model, and extracts the context feature; the baseline discrimination source D1 (baseline time phase feature discriminator, completed initial training, parameters frozen) receives the feature, outputs the baseline detection result, and the feature type prediction probability of a certain pixel is [0.9 (building), 0.05 (road), 0.03 (vegetation), 0.02 (water body)] (the pixel is “building” in the baseline time phase). In order to obtain the real detection result, the server calls the preset true value discriminator T1 (trained by 1000 baseline time phase samples, and the feature classification accuracy is 92%), inputs the baseline time phase image into T1, and outputs the real detection result. The feature type prediction probability of a certain pixel is [0.95 (building), 0.03 (road), 0.01 (vegetation), 0.01 (water body)] (close to the baseline time phase real label [1, 0, 0, 0] of the sample). The server calculates the baseline error by using the cross-entropy loss function (the formula is the same as above, which measures the deviation of the baseline detection result of D1 from the real detection result of T1): [L ref= - [0.95 * ln(0.9) + 0.03 * ln(0.05) + 0.01 * ln(0.03) + 0.01 * ln(0.02)] = - [0.95 * (-0.105) + 0.03 * (-2.996) + 0.01 * (-3.507) + 0.01 * (-3.912)] = 0.051]; the benchmark error (0.051) represents the stability of the benchmark detection result of D1 (the probability of "building" is 0.9) and the true detection result of T1 (the probability of "building" is 0.95), the smaller the value, the more stable the output of D1. According to the task priority (the change type detection is the target task, the weight is higher), the server sets the detection error weight to 0.7 (reflecting the prediction reliability of the to-be-updated discriminator D2), the benchmark error weight to 0.3 (reflecting the output stability of the benchmark discriminator source D1), and the weighted sum of the two is used to obtain the error parameter: [L total = 0.7 * L det t+ 0.3 * L ref = 0.7 * 0.223 + 0.3 * 0.051 = 0.156 + 0.015 = 0.171]; the error parameter (0.171) integrates the prediction accuracy of D2 (detection error) and the output stability of D1 (benchmark error), which ensures that D2 can accurately predict the change type and also ensures consistency with the trained D1 (to avoid degradation of feature discrimination ability due to updating D2). The server measures the prediction reliability of the to-be-updated discriminator through the detection error, measures the output stability of the benchmark discriminator source through the benchmark error, and then obtains the error parameter by weighted fusion. This process ensures that when updating the feature discriminator, the performance of the target task (change type detection) is optimized, and the stability of the overall model is maintained (without damaging the existing feature discrimination ability), effectively improving the model generalization ability in the small sample scenario. For example, the error parameter 0.171 of the above sample will be used for back propagation to update the parameters of GAT and D2, so that the "building addition" prediction probability of D2 is increased from 0.8 to 0.9, which is closer to the true label (such as the error parameter after training is reduced to 0.1).
[0155] In the embodiments of the present application, the intermediate remote sensing small sample change detection model is trained by using the small sample change detection data instance, and a target remote sensing small sample change detection model is obtained. The implementation can be performed by the following examples.
[0156] According to the spatio-temporal coverage distribution ratio of the benchmark time-phase remote sensing data instance and the change time-phase remote sensing data instance, a plurality of sample instances of the intermediate remote sensing small sample change detection model are determined from the small sample change detection data instance;
[0157] The intermediate remote sensing small sample change detection model outputs a first detection result and a second detection result corresponding to the sample instance; the first detection result is a detection result generated by the reference time phase ground object discriminator, and the second detection result is a detection result generated by the change type discriminator;
[0158] According to the first detection result and the second detection result, a model error parameter is determined;
[0159] According to the model error parameter, model parameters of each network in the intermediate remote sensing small sample change detection model are updated until a model convergence condition is met, and the target remote sensing small sample change detection model is obtained.
[0160] In the embodiment of the application, the server trains the intermediate remote sensing small sample change detection model (including the graph attention feature encoder GAT completed with advanced training, the baseline phase feature discriminator D1 completed with initial training, and the change type discriminator D2 completed with advanced training) according to the following process based on the small sample change detection data instances (including 100 “baseline phase + change phase”image pairs, the baseline phase is the multi-spectral image of spring, summer, autumn and winter in 2022, and the change phase is the hyperspectral image of the same period in 2023, which is labeled with the pixel-level label of feature type / change type), and obtains the target model: The server first reviews the spatio-temporal coverage distribution of the baseline phase remote sensing data instances (four seasons in 2022, each accounting for 25%) and the change phase remote sensing data instances (the same period in 2023, each accounting for 25%): In terms of time, the baseline phase covers spring (March), summer (June), autumn (September) and winter (December), and the change phase is the same period in 2023; in terms of space, the baseline and change phases cover industrial areas (40%), residential areas (30%), farmland (20%) and water bodies (10%). In order to maintain the consistency of the distribution of training data, the server selects 4 sample instances (25 image pairs in each group) from the 100 small samples: spring season: baseline image in March 2022 + change image in March 2023 (25, spatial coverage industrial area 10, residential area 7, farmland 5, water body 3); summer season: baseline image in June 2022 + change image in June 2023 (25, spatial distribution same as above); autumn season: baseline image in September 2022 + change image in September 2023 (25, spatial distribution same as above); winter season: baseline image in December 2022 + change image in December 2023 (25, spatial distribution same as above). The spatio-temporal distribution of each sample instance is completely consistent with the previous training data, ensuring that the model can still learn comprehensive spatio-temporal features in the small sample scenario. The server inputs each sample instance into the intermediate model, and processes the baseline phase image and the change phase image in turn: baseline phase image processing: taking “industrial area baseline image in March 2022” (3 channels, 256x256 pixels) as an example, GAT extracts the spatial features (spectral mean), phase features (spring season marked as 0) and topological features (Euclidean distance from other nodes) of each node through superpixel segmentation (1000 nodes), and combines them into a 1013-dimensional node spatio-temporal feature vector; 128-dimensional context features are obtained through attention aggregation (2-layer GAT); the baseline phase feature discriminator D1 (2-layer fully connected network) receives the features and outputs the first detection result, and the feature type prediction probability of a pixel is [0.85 (building), 0.08 (road), 0.05 (vegetation), 0.02 (water body)] (the true label of the pixel in the baseline phase is “building”).Change phase image processing: take "2023 March industrial area change image" (13 channels, 256x256 pixels) as an example, GAT extracts features of the same structure (the temporal feature is marked as 1 in spring); the change type discriminator D2 (2 layers of fully connected network) receives the features and outputs the second detection result, the change type prediction probability of a certain pixel is [0.75 (building addition), 0.15 (road expansion), 0.07 (reduction of vegetation), 0.03 (water body disappearance)] (the true label of this pixel is "building addition"). The server fuses the first detection result error (D1 feature discrimination error) and the second detection result error (D2 change type discrimination error) for each sample instance to obtain the model error parameter: the first detection result error: use the cross-entropy loss function to calculate the deviation of D1 prediction probability and the benchmark temporal true label (formula: y 1i is the benchmark feature true label, p 1i is the D1 prediction probability). For example, the true label of the above benchmark image pixel is [1 (building), 0, 0, 0], then: [L1 = -[1xln(0.85)+0xln(0.08)+0xln(0.05)+0xln(0.02)] = -ln(0.85)≈0.17]; the second detection result error: also use the cross-entropy loss function to calculate the deviation of D2 prediction probability and the change type true label (formula: y 2i is the change type true label, p 2i is the D2 prediction probability). For example, the true label of the above change image pixel is [1 (building addition), 0, 0, 0], then: [L2 = -[1xln(0.75)+0xln(0.15)+0xln(0.07)+0xln(0.03)] = -ln(0.75)≈0.29]; the model error parameter: according to the priority of the target task (the change type detection is the core task), set the first error weight to 0.3 (the feature discrimination is auxiliary), the second error weight to 0.7 (the change type is the target), and use the weighted sum to fuse the two: [L total = 0.3xL1+0.7xL2 = 0.3x0.17+0.7x0.29 = 0.051+0.203 = 0.254]; the server uses the Adam optimizer (learning rate 1e-6, batch size 8) to back propagate the model error parameter L total , and update the parameters of GAT, D1, and D2 (all components of the intermediate model participate in fine-tuning, ensuring that feature extraction and discrimination ability are optimized cooperatively). After the first round of training, the server evaluates the change type detection accuracy (target task performance indicator) using the validation set (20 samples, spatial and temporal distribution consistent with the training set). For example: after the first round of training, the validation set accuracy is 82% (L totalwith a mean of 0.32); after the 5th round of training, the accuracy was improved to 85% (L total with a mean of 0.21); after the 10th round of training, the accuracy was 85.3% (L total with a mean of 0.19); after the 11th round of training, the accuracy was 85.4% (L total with a mean of 0.188); after the 12th round of training, the accuracy was 85.5% (L total with a mean of 0.185). When the accuracy of the validation set is continuously improved by less than 0.5% for 3 rounds (improved by 0.2% for the 10th-12th rounds), the server determines that the model converges, stops training, and saves the target remote sensing small sample change detection model. The change type detection accuracy of the model reaches 85.5%, and the region change type graph can be accurately output (for example, the red color is used to mark the "building addition" region of the industrial area, and the blue color is used to mark the "vegetation reduction" region of the farmland). The server selects sample instances through spatial and temporal coverage distribution matching to ensure that the small sample data is consistent with the distribution of the previous training data; two detection results (ground objects and change types) are output through the intermediate model, and the model error parameters are obtained by fusing the errors of the two; all component parameters are updated through back propagation until the target task performance converges. The entire process effectively solves the "data distribution deviation" problem in the small sample scene, improves the generalization ability of the model, and finally obtains a target model that can accurately detect changes on the ground.
[0161] In the embodiments of the present application, the determination of the model error parameter according to the first detection result and the second detection result can be implemented through the following examples.
[0162] According to the first detection result and the change type target value corresponding to the first detection result, a first detection error is determined, and the first detection error is used to represent the reliability of the first detection result generated by the reference time phase ground object discriminator;
[0163] According to the second detection result and the change type target value corresponding to the second detection result, a second detection error is determined, and the second detection error is used to represent the reliability of the second detection result generated by the change type discriminator;
[0164] According to the first detection result and the real detection result corresponding to the first detection result, a first regularization term is determined, and the first regularization term is used to represent the stability between the first detection result and the real detection result corresponding to the first detection result;
[0165] According to the second detection result and the real detection result corresponding to the second detection result, a second regularization term is determined, and the second regularization term is used to represent the stability between the second detection result and the real detection result corresponding to the second detection result;
[0166] Fusing the first detection error, the second detection error, the first regularization term and the second regularization term according to a fusion coefficient to obtain the model error parameter; wherein the fusion coefficient is adaptively adjusted according to the error proportion of each discrimination task during the training period.
[0167] In the embodiment of the application, an exemplary server calculates a model error parameter of an intermediate remote sensing small sample change detection model (including a graph attention feature encoder GAT, a baseline time phase feature discriminator D1, and a change type discriminator D2) for an industrial area small sample change detection data instance (including a 2022 January baseline time phase multispectral image, a 2023 January change time phase hyperspectral image, and pixel-level labels of "building" (baseline feature) and "building addition" (change type)), and the process is as follows: the server inputs the baseline time phase image (2022 January, 3 channels, 256*256 pixels) into the intermediate model, the GAT extracts node space-time features (spatial spectrum + time phase label + topological distance) and aggregates them into context features, the D1 outputs a first detection result, and the feature type prediction probability of a certain pixel is [0.85 (building), 0.08 (road), 0.05 (vegetation), 0.02 (water body)] (the baseline time phase true label of the pixel is "building"). At the same time, the change time phase image (2023 January, 13 channels, 256*256 pixels) is input into the intermediate model, the GAT extracts features, and the D2 outputs a second detection result, and the change type prediction probability of a certain pixel is [0.75 (building addition), 0.15 (road expansion), 0.07 (reduction of vegetation), 0.03 (disappearance of water body)] (the change type true label of the pixel is "building addition"). First detection error (reliability of D1): the server uses a cross-entropy loss function to calculate the deviation of the first detection result of D1 from the baseline time phase true label (formula: y 1i is the baseline feature true label, p 1i is the D1 prediction probability). The true label of the pixel is [1 (building), 0, 0, 0], and thus: L det1 =-[1*ln(0.85)+0*ln(0.08)+0*ln(0.05)+0*ln(0.02)]=-ln(0.85)≈0.17; this value represents the prediction reliability of D1 for the baseline feature (the smaller the value, the higher the reliability). Second detection error (reliability of D2): the same cross-entropy loss is used to calculate the deviation of the second detection result of D2 from the change type true label (formula: y 2i is the change type true label, p 2i is the D2 prediction probability). The true label of the pixel is [1 (building addition), 0, 0, 0], and thus: L det2= -[1 x ln(0.75) + 0 x ln(0.15) + 0 x ln(0.07) + 0 x ln(0.03)] = -ln(0.75) ~ 0.29; this value represents the prediction reliability of D2 on the change type (the smaller the value, the higher the reliability). To ensure the stability of the model output (not deviating from the reliable results trained), the server calls the preset true value discriminator (pre-trained high-accuracy model): the first regularization term (stability of D1): call the pre-trained ground object discriminator T1 (trained with 1000 baseline time phase samples, accuracy 92%), input the baseline time phase image into T1, get the true detection result, the ground object type prediction probability of a certain pixel is [0.95 (building), 0.03 (road), 0.01 (vegetation), 0.01 (water body)] (close to the true label). The deviation between the first detection result of D1 and the output of T1 is calculated by cross entropy (formula: t 1i is the true detection result output by T1): R1 = -[0.95 x ln(0.85) + 0.03 x ln(0.08) + 0.01 x ln(0.05) + 0.01 x ln(0.02)] ~ 0.05; this value represents the stability of the output of D1 and the output of T1 (the smaller the value, the more stable D1). The second regularization term (stability of D2): call the pre-trained change type discriminator T2 (trained with 1000 change time phase samples, accuracy 90%), input the change time phase image into T2, get the true detection result, the change type prediction probability of a certain pixel is [0.9 (building addition), 0.07 (road expansion), 0.02 (vegetation reduction), 0.01 (water body disappearance)] (close to the true label). The deviation between the second detection result of D2 and the output of T2 is calculated by cross entropy (formula: t 2i is the true detection result output by T2): R2 = -[0.9 x ln(0.75) + 0.07 x ln(0.15) + 0.02 x ln(0.07) + 0.01 x ln(0.03)] ~ 0.12; this value represents the stability of the output of D2 and the output of T2 (the smaller the value, the more stable D2). The server adaptively adjusts the fusion coefficient according to the error proportion during training (ensures that the error proportion of the target task (change type detection) is higher). For example, in the previous round of training, the second detection error (change type error of D2) accounts for 60% of the total error, the first detection error accounts for 30%, and the regularization term accounts for 10%, so the fusion coefficient is set to: (a1 = 0.2) (first detection error, reliability of D1); (a2 = 0.5) (second detection error, reliability of D2, target task, highest weight); (a3 = 0.15) (first regularization term, stability of D1); (a4 = 0.15) (second regularization term, stability of D2). The four terms are fused by weighted sum to get the model error parameter: Ltotal =α1×L det1 +α2×L det2 +α3×R1+α4×R2=0.2×0.17+0.5×0.29+0.15×0.05+0.15×0.12=0.034+0.145+0.0075+0.018=0.2045; The server measures the predictive reliability of the discriminator through detection errors (D1 for baseline features, D2 for change type), measures the stability of the discriminator output and the pre-trained ground truth discriminator through a regularization term, and then adaptively adjusts the fusion coefficients according to the error weights, and finally weights and fuses the four terms to obtain the model error parameters. This process ensures both the performance optimization of the target task (change type detection) (the second detection error has the highest weight) and the stability of the model output (regularization term), effectively improving the model's generalization ability in small sample scenarios. For example, the model error parameter of 0.2045 in the above sample will be used for backpropagation to update the parameters of GAT, D1, and D2, so that the prediction probability of "new building" in D2 is increased from 0.75 to 0.9, which is closer to the output of T2 (such as the error parameter decreasing to 0.15 after training).
[0168] This invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 performs the aforementioned large-model remote sensing small-sample change detection method incorporating graph attention. Figure 2 As shown, Figure 2 This is a structural block diagram of a computer device 100 provided in an embodiment of the present invention. The computer device 100 includes a memory 111, a processor 112, and a communication unit 113. To enable data transmission or interaction, the memory 111, processor 112, and communication unit 113 are electrically connected to each other directly or indirectly. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0169] For illustrative purposes, the foregoing description has been made with reference to specific embodiments. However, the foregoing illustrative discussions are not intended to be exhaustive or to limit the present disclosure to the precise forms disclosed. Numerous modifications and variations are possible in accordance with the foregoing teachings. These embodiments were chosen and described in order to best illustrate the principles of the present disclosure and its practical application, thereby enabling those skilled in the art to best utilize the disclosure and to employ various embodiments with different modifications to suit a particular intended application.
Claims
1. A large model remote sensing small sample change detection method combined with attention, characterized in that, The method comprises the following steps: radiation correction and atmospheric correction are performed on original remote sensing image data of a target area to generate standardized remote sensing images; through a geographic registration process, standardized remote sensing images of different time phases are aligned to a unified geographic coordinate system; a reference time phase remote sensing image and a change time phase remote sensing image are obtained; the change time phase remote sensing image is a remote sensing image collected at a preset collection time interval from the reference time phase remote sensing image; the reference time phase remote sensing image and the change time phase remote sensing image are input into a pre-trained target remote sensing small sample change detection model to obtain a change type map of the target area; the target remote sensing small sample change detection model is trained in the following manner, comprising: an initial remote sensing small sample change detection model is obtained, the initial remote sensing small sample change detection model comprising a reference time phase feature extraction model and a change discrimination model, the reference time phase feature extraction model and the change discrimination model sharing a same graph attention feature encoder, the reference time phase feature extraction model comprising the graph attention feature encoder and a reference time phase ground feature discriminator, and the change discrimination model comprising the graph attention feature encoder and a change type discriminator; the reference time phase feature extraction model is trained using a reference time phase remote sensing data instance, model parameters of the graph attention feature encoder and the reference time phase ground feature discriminator included in the reference time phase feature extraction model are updated, a graph attention feature encoder after initial training and a reference time phase ground feature discriminator after initial training are obtained; wherein the reference time phase remote sensing data instance comprises reference time phase remote sensing image data; an initialized change discrimination model is constructed based on the change type discriminator and the graph attention feature encoder after initial training; the change type discriminator in the initialized change discrimination model is trained using a change time phase remote sensing data instance, model parameters of the graph attention feature encoder after initial training are frozen, and model parameters of the change type discriminator are updated, to obtain a change type discriminator after initial training; wherein the change time phase remote sensing data instance comprises change time phase remote sensing image data; a change discrimination model after initial training is constructed based on the graph attention feature encoder after initial training and the change type discriminator after initial training; the change discrimination model after initial training is trained using the change time phase remote sensing data instance, model parameters of the graph attention feature encoder after initial training and the change type discriminator after initial training are updated, to obtain a graph attention feature encoder after advanced training and a change type discriminator after advanced training; an intermediate remote sensing small sample change detection model is constructed based on the graph attention feature encoder after advanced training, the reference time phase ground feature discriminator after initial training, and the change type discriminator after advanced training; The intermediate remote sensing small sample change detection model is trained by using a small sample change detection data instance, to obtain a target remote sensing small sample change detection model; wherein an output of the target remote sensing small sample change detection model is a change type map, and the small sample change detection data instance comprises at least one of the following: the reference time phase remote sensing image data and the change time phase remote sensing image data.
2. The method of claim 1, wherein, The reference time phase remote sensing data instance is multi-spectral sequence data, and the reference time phase remote sensing data instance comprises at least one reference time phase multi-spectral sequence sample data; the change time phase remote sensing data instance is change single-image data, and the change time phase remote sensing data instance comprises at least one change time phase hyperspectral single-image sample data; The reference time phase feature extraction model is trained by using the reference time phase remote sensing data instance, and model parameters of the graph attention feature encoder and the reference time phase feature discriminator included in the reference time phase feature extraction model are updated, to obtain a graph attention feature encoder after initial training and a reference time phase feature discriminator after initial training, including: For each reference time phase multi-spectral sequence sample data, a plurality of sequence time node images corresponding to the reference time phase multi-spectral sequence sample data are obtained according to a plurality of extraction time sequence nodes; The reference time phase feature extraction model is trained by using the plurality of sequence time node images corresponding to the reference time phase multi-spectral sequence sample data, and the model parameters of the graph attention feature encoder and the reference time phase feature discriminator included in the reference time phase feature extraction model are updated, to obtain the graph attention feature encoder after initial training and the reference time phase feature discriminator after initial training; The change type discriminator in the initialized change discrimination model is trained by using the change time phase remote sensing data instance, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated, to obtain a change type discriminator after initial training, including: For each change time phase hyperspectral single-image sample data, a plurality of enhanced sample data corresponding to the change time phase hyperspectral single-image sample data are obtained by performing data enhancement on the change time phase hyperspectral single-image sample data; The change type discriminator is trained by using the plurality of enhanced sample data corresponding to the change time phase hyperspectral single-image sample data, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated, to obtain the change type discriminator after initial training.
3. The method of claim 1, wherein, The change time phase remote sensing data instance is change single-image data, and the change time phase remote sensing data instance comprises at least one change time phase hyperspectral single-image sample data; The change type discriminator in the initialized change discrimination model is trained by using the change time phase remote sensing data instance, the model parameters of the graph attention feature encoder after initial training are frozen, and the model parameters of the change type discriminator are updated, to obtain a change type discriminator after initial training, including: cropping a plurality of different image regions from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images; wherein there is a locally overlapping image region between any two of the to-be-processed images derived from the same change temporal high-spectral single sample data; determining the plurality of to-be-processed images as sample instances of the initialized change discrimination model; extracting remote sensing feature representations of the sample instances by the graph attention feature encoder that has completed the initial training; determining a change type detection result of the sample instance according to the remote sensing feature representation of the sample instance by the change type discriminator; determining an error parameter according to the change type detection result of the sample instance and a change type target value, and updating model parameters of the change type discriminator based on the error parameter to obtain the change type discriminator that has completed the initial training.
4. The method of claim 3, wherein, The cropping a plurality of different image regions from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images comprises: determining the size of an image cropping window; sliding the image cropping window on a plurality of different sampling points of the change temporal high-spectral single sample data to respectively crop image regions in the image cropping window to obtain the plurality of to-be-processed images; The cropping a plurality of different image regions from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images further comprises: determining the size of an image cropping window and the spatial arrangement position of the image cropping window in the change temporal high-spectral single sample data; determining a plurality of different scale factors corresponding to the change temporal high-spectral single sample data within a scale transformation range corresponding to the change temporal high-spectral single sample data; respectively transforming the size of the change temporal high-spectral single sample data according to the plurality of different scale factors to obtain a plurality of change temporal high-spectral single sample data that have completed scale transformation; cropping image regions in the image cropping window from the plurality of change temporal high-spectral single sample data that have completed scale transformation to obtain the plurality of to-be-processed images; The cropping a plurality of different image regions from the same change temporal high-spectral single sample data to obtain a plurality of to-be-processed images further comprises: respectively performing spatial smoothing processing on the change temporal high-spectral single sample data using a plurality of different spatial smoothing processing model parameters to obtain a plurality of processed change temporal high-spectral single sample data; cropping image regions in the image cropping window from the plurality of processed change temporal high-spectral single sample data to obtain the plurality of to-be-processed images.
5. The method of claim 3, wherein, The graph attention feature encoder comprises a graph node feature embedding component and a graph topology attention component. The extracting remote sensing feature representations of the sample instances by the graph attention feature encoder that has completed the initial training comprises: for a target to-be-processed image in the sample instance, constructing graph nodes by performing superpixel segmentation on the target to-be-processed image to obtain a plurality of graph nodes corresponding to the same target to-be-processed image; For a target graph node in the plurality of graph nodes, a spatial feature vector of the target graph node is obtained by performing feature embedding extraction on the target graph node by the graph node feature embedding component; wherein the spatial feature vector of the target graph node is used to indicate an image area of the target graph node; a temporal feature vector of the target graph node and a topological feature vector of the target graph node are determined; wherein the temporal feature vector of the target graph node is used to indicate a time phase to which the target graph node belongs, and the topological feature vector of the target graph node is used to indicate a spatial topological relationship of the target graph node in the image to be processed to which the target graph node belongs; the spatial feature vector of the target graph node, the temporal feature vector of the target graph node and the topological feature vector of the target graph node are merged to obtain a node spatio-temporal feature vector of the target graph node; the graph nodes corresponding to the plurality of images to be processed of the same sample instance adopt the same temporal feature vector; the node spatio-temporal feature vector corresponding to the sample instance is loaded to the graph topological attention component; wherein the node spatio-temporal feature vector corresponding to the sample instance includes the node spatio-temporal feature vectors of the graph nodes corresponding to the plurality of images to be processed belonging to the sample instance; the node spatio-temporal feature vector corresponding to the sample instance is aggregated by attention by the graph topological attention component to obtain a remote sensing feature representation corresponding to the sample instance.
6. The method of claim 1, wherein, The intermediate remote sensing small sample change detection model is trained by using the small sample change detection data instance to obtain a target remote sensing small sample change detection model, including: The baseline time phase feature discriminator and the change type discriminator are sequentially determined as a feature discriminator to be updated; wherein the discriminators other than the feature discriminator in the baseline time phase feature discriminator and the change type discriminator are determined as baseline discrimination sources; sample instances of the feature discriminator are determined in the small sample change detection data instance; the sample instances of the feature discriminator are output by the intermediate remote sensing small sample change detection model to obtain a to-be-determined detection result and a baseline detection result corresponding to the sample instances; wherein the to-be-determined detection result is a detection result generated by the feature discriminator, and the baseline detection result is a detection result generated by the baseline discrimination source; a true detection result corresponding to the sample instances of the feature discriminator is determined by a preset true value discriminator; wherein the preset true value discriminator is a discriminator that is completed training and is used for the same type of discrimination task as the baseline discrimination source; error parameters of the feature discriminator are determined according to the to-be-determined detection result, the baseline detection result and the true detection result; model parameters of the graph attention feature encoder and the feature discriminator are updated according to the error parameters of the feature discriminator until a model convergence condition is met, and the target remote sensing small sample change detection model is obtained.
7. The method of claim 6, wherein, The error parameters of the feature discriminator are determined according to the to-be-determined detection result, the baseline detection result and the true detection result, including: determine a detection error of the feature discriminator according to the pending detection result and a change type target value corresponding to the pending detection result, wherein the detection error is used to represent reliability of the pending detection result generated by the feature discriminator; determine a benchmark error of the feature discriminator according to the benchmark detection result and the true detection result, wherein the benchmark error is used to represent stability between the benchmark detection result and the true detection result; determine an error parameter of the feature discriminator according to the detection error and the benchmark error.
8. The method of claim 1, wherein, The training of the intermediate remote sensing small sample change detection model by using the small sample change detection data instance comprises: determining a plurality of sample instances of the intermediate remote sensing small sample change detection model from the small sample change detection data instance according to spatio-temporal coverage distribution matching of the benchmark time-phase remote sensing data instance and the change time-phase remote sensing data instance; outputting first detection results and second detection results corresponding to the sample instances by the intermediate remote sensing small sample change detection model, wherein the first detection results are detection results generated by the benchmark time-phase feature discriminator, and the second detection results are detection results generated by the change type discriminator; determining a first detection error according to the first detection result and a change type target value corresponding to the first detection result, wherein the first detection error is used to represent reliability of the first detection result generated by the benchmark time-phase feature discriminator; determining a second detection error according to the second detection result and a change type target value corresponding to the second detection result, wherein the second detection error is used to represent reliability of the second detection result generated by the change type discriminator; determining a first regularization term according to the first detection result and a true detection result corresponding to the first detection result, wherein the first regularization term is used to represent stability between the first detection result and the true detection result corresponding to the first detection result; determining a second regularization term according to the second detection result and a true detection result corresponding to the second detection result, wherein the second regularization term is used to represent stability between the second detection result and the true detection result corresponding to the second detection result; fusing the first detection error, the second detection error, the first regularization term and the second regularization term according to a fusion coefficient to obtain a model error parameter, wherein the fusion coefficient is adaptively adjusted according to error proportions of each discrimination task during training; updating model parameters of each network in the intermediate remote sensing small sample change detection model according to the model error parameter, until a model convergence condition is met, to obtain the target remote sensing small sample change detection model.
9. A server system, characterized by The server is configured to execute the method in any one of claims 1-8.
Citation Information
Patent Citations
Small sample change detection method based on multi-scale feature extraction
CN112668494A
Receiver for communications satellite down-link reception
US4956864A