SAR image ground feature element extraction method based on spatial relation learning and related equipment

Through a method based on spatial relationship learning, using the VIT-PSSL model and self-supervised learning, patch-level data is extracted from SAR images for training and prediction, which solves the problems of poor extraction of a small amount of label data and insufficient feature learning in the existing technology. problem, achieving high-quality feature extraction.

CN118608969APending Publication Date: 2024-09-06SHAANXI YUANYI INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410771014.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing SAR image feature feature extraction methods cannot achieve accurate feature extraction using only a small amount of label data, and due to the similarity of feature features, feature learning is insufficient and it is difficult to distinguish different features.

Method used

Using a method based on spatial relationship learning, position coding and category coding are removed through the VIT-PSSL upstream task model, a random masking strategy is introduced, combined with self-supervised learning, patch-level data is extracted from SAR images for training and prediction, and fully connected conditions are used to randomly The airport performs post-processing to improve the accuracy of the extraction results.

Benefits of technology

It effectively alleviates the dependence on annotated data, achieves excellent feature extraction results by relying only on a very small amount of annotated data, improves feature discriminability and extraction accuracy, and obtains high-quality feature feature extraction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608969A
    Figure CN118608969A
Patent Text Reader

Abstract

The invention discloses an SAR image ground feature element extraction method based on spatial relation learning and related equipment, and belongs to the field of radar remote sensing image intelligent interpretation. The method comprises the steps that patch-level data used for training and testing are acquired from an SAR image, an initial VIT-PSSL upstream task model is trained to obtain a VIT-PSSL upstream task model, and the VIT-PSSL upstream task model is extracted from the VIT-PSSL upstream task model; then, the VIT-PSSL upstream task model is used for conducting fine adjustment on the VIT-PSSL downstream task model; inputting the test data into the VIT-PSSL downstream task model, and finally splicing all ground feature categories to obtain a ground feature element extraction result; according to the method, the information of the SAR image is fully mined through the VIT-PSSL upstream task model so as to learn more effective feature representation, the difficulty of self-supervised learning of the upstream task is improved by removing a position information embedding structure and introducing a random shielding strategy in the upstream task, the dependence on annotation data can be effectively relieved, and the learning efficiency of the SAR image is improved. Excellent surface feature element extraction results can be obtained by only depending on a very small amount of labeled data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of intelligent interpretation of radar remote sensing images, and in particular relates to a method for extracting ground object elements from SAR images based on spatial relationship learning and related equipment. Background Art

[0002] Synthetic Aperture Radar (SAR) is an active ground observation radar. Unlike traditional radar systems, when receiving radar signals, synthetic aperture radar does not need a large-sized antenna corresponding to the physical aperture. Instead, it uses the movement of the motion platform to receive radar echo data multiple times and perform complex signal processing on these data to simulate the effect of a large aperture antenna. Compared with traditional radar systems, SAR systems have certain advantages. SAR systems can achieve high-resolution imaging and produce high-resolution radar images by simulating large apertures. SAR systems have the ability to operate all day and all night, and are not restricted by natural conditions such as clouds, rain and snow. SAR systems can observe at a long distance and are very sensitive to small changes in the surface. Due to the powerful capabilities of SAR systems, SAR images are widely used in disaster monitoring, environmental protection, agricultural monitoring, terrain mapping, etc.

[0003] SAR image interpretation is a hot topic in current research. SAR image feature extraction is a basic task in SAR image interpretation. SAR image feature extraction refers to the process of extracting different features and information of ground objects on the surface from SAR images through certain technologies. These ground objects include buildings, water bodies, vegetation, terrain, etc., which have good application scenarios in tasks such as urban planning and environmental monitoring. It is a challenging task to complete the task of ground object extraction through high-resolution large-scene SAR images. First of all, labeling SAR images is a challenging task. Unlike optical images, SAR image labeling often requires the experience of geological experts. SAR image labeling requires a lot of manpower, financial resources and time. Therefore, it is difficult to collect high-quality SAR image annotations. The popular deep learning method is a data-driven method. The number of labeled samples is positively correlated with network performance, which is a difficulty that limits the task of SAR image feature extraction. Secondly, SAR images contain rich features, some of which are very similar. The existing methods are insufficient in learning the features of different ground objects in SAR images, which makes it difficult to distinguish similar different ground objects through the learned features. For example: The patent application document with Chinese patent publication number CN 115049841 A discloses a method for extracting ground features from high-resolution SAR images based on deep unsupervised multi-step adversarial domain adaptation. The method works by bringing the distribution of the source domain and the target domain closer and training a feature extractor to extract features from the source domain and the target domain for classification. However, since this technical solution requires a large amount of source domain and target domain data at the same time and lacks learning of the internal information of the image, the extracted features are not very discriminative.

[0004] It can be seen that the existing feature extraction method for SAR images cannot achieve accurate ground feature extraction results using only a small amount of label data. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned technology, the present invention provides a SAR image ground feature extraction method and related equipment based on spatial relationship learning, which can solve the technical problem that the existing feature extraction method cannot obtain accurate ground feature extraction results using only a small amount of label data.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A method for extracting ground features from SAR images based on spatial relationship learning, comprising:

[0008] Acquire patch-level data based on SAR images, and divide the patch-level data into training data and test data;

[0009] Inputting the training data into the initial VIT-PSSL upstream task model, and obtaining the VIT-PSSL upstream task model after iterative training; removing the position encoding and the category encoding from the initial VIT-PSSL upstream task model and introducing a random masking strategy;

[0010] Fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model;

[0011] The test data is input into the VIT-PSSL downstream task model to predict the object category corresponding to each sub-image; all object categories are spliced ​​together to obtain the object feature extraction result.

[0012] Furthermore, it also includes:

[0013] The obtained ground feature extraction results are post-processed based on the fully connected conditional random field, and the final ground feature extraction results are output.

[0014] Furthermore, the specific steps of obtaining patch-level data based on SAR images are as follows:

[0015] The SAR image is compared with the corresponding optical image to obtain the gathering area;

[0016] Only patch-level sampling is performed on the clustered area to obtain patch-level data.

[0017] Furthermore, the specific steps of inputting the training data into the initial VIT-PSSL upstream task model and obtaining the VIT-PSSL upstream task model after iterative training are as follows:

[0018] The training data is input into the initial VIT-PSSL upstream task model, and image segmentation, image block embedding, Transformer processing and classification processing are performed in sequence, and the position corresponding to each image block is output; in the initial VIT-PSSL upstream task model, the position encoding and category encoding are removed and a random masking strategy is introduced;

[0019] Based on the preset position-assisted loss function and the position corresponding to each image block, the initial VIT-PSSL upstream task model is updated and iterated until the preset number of training rounds is reached, and the VIT-PSSL upstream task model is output.

[0020] Furthermore, the specific steps of fine-tuning the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model are as follows:

[0021] The weights of the VIT-PSSL upstream task model are transferred to the initial VIT-PSSL downstream task model, and the classification head of the initial VIT-PSSL downstream task model is modified to the category of the output image, where the backbone network of the initial VIT-PSSL upstream task model is the same as that of the initial VIT-PSSL downstream task model.

[0022] Furthermore, the specific steps of inputting the test data into the VIT-PSSL downstream task model to predict the object category corresponding to each sub-image include:

[0023] Perform image block processing on the test data to divide it into multiple sub-images and input all sub-images into the VIT-PSSL downstream task model;

[0024] Traverse all sub-images and predict the terrain category corresponding to each sub-image, where each sub-image corresponds to a central area, and predict all pixels in the central area of ​​each sub-image as pixel values ​​corresponding to the terrain category;

[0025] Finally, the central areas of all sub-images are spliced ​​to obtain the ground feature extraction results.

[0026] Furthermore, the overlapping clipping method is used to process the test data into image blocks, and the sliding window method is used to traverse all sub-images.

[0027] A SAR image ground feature extraction system based on spatial relationship learning, used to implement the steps of the SAR image ground feature extraction method based on spatial relationship learning, including:

[0028] A data acquisition module, used for acquiring patch-level data based on SAR images, and dividing the patch-level data into training data and test data;

[0029] An upstream task construction module is used to input training data into an initial VIT-PSSL upstream task model, and obtain a VIT-PSSL upstream task model after iterative training; the position coding and category coding are removed from the initial VIT-PSSL upstream task model, and a random masking strategy is introduced;

[0030] A downstream task construction module is used to fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model;

[0031] The ground feature extraction module is used to input the test data into the VIT-PSSL downstream task model to predict the ground feature category corresponding to each sub-image; all ground feature categories are spliced ​​to obtain the ground feature extraction result.

[0032] A device comprising:

[0033] Memory for storing computer programs;

[0034] The processor is used to implement the steps of the above-mentioned method for extracting ground object elements from SAR images based on spatial relationship learning when executing the computer program.

[0035] A computer-readable storage medium stores a computer program, which, when executed by a processor, is used to implement the steps of the above-mentioned method for extracting ground object elements from SAR images based on spatial relationship learning.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The present invention provides a method for extracting ground object elements from SAR images based on spatial relationship learning. The method first obtains patch-level data for training and testing from SAR images, trains an initial VIT-PSSL upstream task model to obtain a VIT-PSSL upstream task model, and then uses the VIT-PSSL upstream task model to fine-tune the VIT-PSSL downstream task model; inputs test data into the VIT-PSSL downstream task model, and finally obtains a ground object element extraction result by splicing all ground object categories; the method fully mines information of the SAR image itself through the VIT-PSSL upstream task model to learn a more effective feature representation, and improves the difficulty of the upstream task of self-supervised learning by removing the position information embedding structure and introducing a random shielding strategy in the upstream task, which can effectively alleviate the dependence on labeled data and achieve excellent ground object element extraction results relying only on a very small amount of labeled data.

[0038] Preferably, in the present invention, a post-processing method based on a fully connected conditional random field is also used to reprocess the ground feature extraction results. The fully connected conditional random field (FC-CRF) can improve the extraction accuracy, thereby obtaining a high-quality ground feature extraction result map.

[0039] Preferably, in the present invention, by contrast processing with optical images, the clustered areas in the SAR images can be more accurately located, and then representative data can be obtained through patch-level sampling to improve the accuracy of subsequent training and prediction.

[0040] Preferably, in the present invention, through perfect training steps, it can be ensured that the VIT-PSSL upstream task model can effectively learn the spatial relations and features in the image, providing a solid foundation for the subsequent extraction of ground features.

[0041] Preferably, in the present invention, the initial VIT-PSSL downstream task model is fine-tuned through the VIT-PSSL upstream task model, and the VIT-PSSL upstream task model is used as a pre-training model of the initial VIT-PSSL downstream task model. In this way, the knowledge and features learned by the upstream task model can be utilized to accelerate the training process of the downstream task model, while ensuring that the downstream task model can be optimized for specific land feature extraction tasks.

[0042] Preferably, in the present invention, by image block processing and sliding window traversal, it can be ensured that each sub-image can be accurately predicted and classified, while improving processing efficiency. By splicing the central area of ​​the sub-image, a complete ground feature extraction result can be obtained.

[0043] Further preferably, in the present invention, by means of overlapping clipping and sliding windows, the continuity between adjacent sub-images can be ensured, the boundary effect can be reduced, and the integrity and accuracy of the extraction of ground features can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flowchart of a method for extracting ground features from SAR images based on spatial relationship learning provided by an embodiment of the present invention;

[0045] Figure 2 A comparison diagram of an optical image and a SAR image provided by an embodiment of the present invention;

[0046] Figure 3 The overall structure diagram of the VIT provided by the embodiment of the present invention;

[0047] Figure 4 A flow chart of VIT-PSSL upstream tasks provided by an embodiment of the present invention;

[0048] Figure 5 The overall architecture diagram of VIT-PSSL provided by the embodiment of the present invention;

[0049] Figure 6 SAR images and label maps provided by an embodiment of the present invention, wherein (a) is a SAR image, and (b) is a label map;

[0050] Figure 7 A visualization diagram of the ground feature extraction results of VIT-PSSL and other methods on SAR images provided by an embodiment of the present invention, wherein (a) is a SAR image, (b) is a label map, (c) is Deeplabv3+, (d) is Segformer, (e) is SimCLR, (f) is VIT-PSSL, and (g) is VIT-PSSL combined with FC-CRF;

[0051] Figure 8A flowchart of a method for extracting ground features from SAR images based on spatial relationship learning provided by the present invention;

[0052] Fig. 9 A schematic structural diagram of a SAR image ground feature extraction system based on spatial relationship learning provided by the present invention. DETAILED DESCRIPTION

[0053] The present invention provides a method for extracting ground features from SAR images based on spatial relationship learning. Figure 8 As shown, the following steps are included:

[0054] S1: Acquire patch-level data based on SAR images, and divide the patch-level data into training data and test data; specifically, the specific steps for acquiring patch-level data based on SAR images are as follows: compare the SAR image with the corresponding optical image to obtain the clustering area; sample the clustering area only at the patch level to obtain patch-level data.

[0055] S2: Input the training data into the initial VIT-PSSL upstream task model, and obtain the VIT-PSSL upstream task model after iterative training; the position encoding and category encoding are removed from the initial VIT-PSSL upstream task model and a random masking strategy is introduced.

[0056] Specifically, the training data is input into the initial VIT-PSSL upstream task model, and the specific steps of obtaining the VIT-PSSL upstream task model after iterative training are as follows:

[0057] The training data is input into the initial VIT-PSSL upstream task model, and image segmentation, image block embedding, Transformer processing and classification processing are performed in sequence, and the position corresponding to each image block is output; in the initial VIT-PSSL upstream task model, the position encoding and category encoding are removed and a random masking strategy is introduced;

[0058] Based on the preset position-assisted loss function and the position corresponding to each image block, the initial VIT-PSSL upstream task model is updated and iterated until the preset number of training rounds is reached, and the VIT-PSSL upstream task model is output.

[0059] S3: Fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model.

[0060] Specifically, the specific steps for fine-tuning the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model are as follows:

[0061] The weights of the VIT-PSSL upstream task model are transferred to the initial VIT-PSSL downstream task model, and the classification head of the initial VIT-PSSL downstream task model is modified to the category of the output image, where the backbone network of the initial VIT-PSSL upstream task model is the same as that of the initial VIT-PSSL downstream task model.

[0062] S4: Input the test data into the VIT-PSSL downstream task model to predict the object category corresponding to each sub-image; splice all object categories to obtain the object feature extraction result.

[0063] Specifically, the test data is input into the VIT-PSSL downstream task model, and the specific steps of predicting the object category corresponding to each sub-image include:

[0064] Perform image block processing on the test data to divide it into multiple sub-images and input all sub-images into the VIT-PSSL downstream task model;

[0065] Traverse all sub-images and predict the terrain category corresponding to each sub-image, where each sub-image corresponds to a central area, and predict all pixels in the central area of ​​each sub-image as pixel values ​​corresponding to the terrain category;

[0066] Finally, the central areas of all sub-images are spliced ​​to obtain the ground feature extraction results.

[0067] The overlapping clipping method is used to divide the test data into image blocks, and the sliding window method is used to traverse all sub-images.

[0068] S5: Also includes:

[0069] The obtained ground feature extraction results are post-processed based on the fully connected conditional random field, and the final ground feature extraction results are output.

[0070] like Fig. 9As shown, the present invention also provides a SAR image ground feature extraction system based on spatial relationship learning, including: a data acquisition module, used to obtain patch-level data based on SAR images, and divide the patch-level data into training data and test data; an upstream task construction module, used to input the training data into the initial VIT-PSSL upstream task model, and obtain the VIT-PSSL upstream task model after iterative training; the initial VIT-PSSL upstream task model removes the position code and the category code and introduces a random shielding strategy; a downstream task construction module, used to fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model; a ground feature extraction module, used to input the test data into the VIT-PSSL downstream task model, and predict the ground feature category corresponding to each sub-image; all ground feature categories are spliced ​​to obtain the ground feature extraction result.

[0071] The present invention also provides a device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the method for extracting ground object elements from SAR images based on spatial relationship learning when executing the computer program.

[0072] When the processor executes the computer program, the above-mentioned steps of SAR image ground feature extraction based on spatial relationship learning are implemented, for example: patch-level data is obtained based on the SAR image, and the patch-level data is divided into training data and test data; the training data is input into the initial VIT-PSSL upstream task model, and the VIT-PSSL upstream task model is obtained after iterative training; the position code and category code are removed from the initial VIT-PSSL upstream task model and a random masking strategy is introduced; the initial VIT-PSSL downstream task model is fine-tuned based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model; the test data is input into the VIT-PSSL downstream task model to predict the ground feature category corresponding to each sub-image; all ground feature categories are spliced ​​to obtain the ground feature extraction result.

[0073] Alternatively, when the processor executes the computer program, the functions of each module in the above system are implemented, for example: a data acquisition module, used to obtain patch-level data based on SAR images, and divide the patch-level data into training data and test data; an upstream task construction module, used to input the training data into the initial VIT-PSSL upstream task model, and obtain the VIT-PSSL upstream task model after iterative training; the initial VIT-PSSL upstream task model removes the position code and the category code and introduces a random shielding strategy; a downstream task construction module, used to fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model; a ground feature extraction module, used to input the test data into the VIT-PSSL downstream task model, and predict the ground feature category corresponding to each sub-image; all ground feature categories are spliced ​​to obtain the ground feature extraction result.

[0074] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the SAR image ground feature extraction device based on spatial relationship learning. For example, the computer program can be divided into a data acquisition module, an upstream task construction module, a downstream task construction module and a ground feature extraction module; the specific functions of each module are as follows: a data acquisition module, used to obtain patch-level data based on SAR images, and divide the patch-level data into training data and test data; an upstream task construction module, used to input the training data into the initial VIT-PSSL upstream task model, and obtain the VIT-PSSL upstream task model after iterative training; the initial VIT-PSSL upstream task model removes the position code and the category code and introduces a random masking strategy; a downstream task construction module, used to fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model; a ground feature extraction module, used to input the test data into the VIT-PSSL downstream task model, and predict the ground feature category corresponding to each sub-image; all ground feature categories are spliced ​​to obtain the ground feature extraction result.

[0075] The SAR image ground feature extraction device based on spatial relationship learning can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The SAR image ground feature extraction device based on spatial relationship learning can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above is an example of a SAR image ground feature extraction device based on spatial relationship learning, and does not constitute a limitation on the SAR image ground feature extraction device based on spatial relationship learning, and can include more components than the above, or combine certain components, or different components. For example, the SAR image ground feature extraction device based on spatial relationship learning can also include input and output devices, network access devices, buses, etc.

[0076] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the SAR image ground feature extraction based on spatial relationship learning, and uses various interfaces and lines to connect various parts of the entire SAR image ground feature extraction device based on spatial relationship learning.

[0077] The memory can be used to store the computer program and / or module, and the processor implements various functions of the SAR image ground feature extraction device based on spatial relationship learning by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory.

[0078] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0079] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for extracting ground object elements from SAR images based on spatial relationship learning are implemented.

[0080] If the modules / units integrated in the SAR image ground feature extraction system based on spatial relationship learning are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0081] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned method for extracting ground object elements from SAR images based on spatial relationship learning, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method for extracting ground object elements from SAR images based on spatial relationship learning can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.

[0082] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0083] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.

[0084] The present invention will be further described below in conjunction with the embodiments and drawings:

[0085] Example 1

[0086] As mentioned in the background technology: First, labeling SAR images is a challenging task. Unlike optical images, SAR image labeling often requires the experience of geological experts. SAR image labeling requires a lot of manpower, financial resources and time. Therefore, it is difficult to collect high-quality SAR image labeling maps. The popular deep learning method is a data-driven method. The number of labeled samples is positively correlated with network performance, which is a difficulty that limits the task of extracting ground features from SAR images. Secondly, SAR images contain rich features, some of which are very similar. Existing methods do not learn enough about the features of different ground objects in SAR images, which makes it difficult to distinguish between similar and different ground objects.

[0087] Therefore, how to make full use of a small amount of labeled data to learn effective features has become a hot topic in current research. In this embodiment, self-supervised learning (SSL) is used to automatically learn feature representation from unlabeled data. Compared with traditional supervised learning, self-supervised learning can use the information of the input SAR data itself to provide training signals for the model and reduce the demand for SAR image annotated samples, thereby improving the accuracy and performance of the SAR image feature extraction model.

[0088] In order to achieve the above-mentioned purpose, the present embodiment provides a method for extracting ground object features from SAR images based on spatial relationship learning. The method designs a complete ground object feature extraction framework, designs a task of predicting the relative position of image blocks based on VIT, uses the idea of ​​self-supervised learning to mine the information of SAR images themselves from a large amount of unlabeled data to learn more effective feature representations, and introduces a random masking strategy to enable the model to learn more discriminative features in SAR images. In the overall framework, only a very small number of labeled samples are used to obtain excellent ground object feature extraction results, and the method has the advantages of low dependence on labeled data and strong discriminability of extracted features.

[0089] In order to better understand the technical solution provided by this embodiment, the terms are further explained below:

[0090] VIT-PSSL, the full name of VIT-PSSL is Vision Transformer-Position Self-Supervised Learning, which is a self-supervised learning method based on VIT to predict the position of image blocks, and is optimized and improved based on the VIT structure.

[0091] like Figure 1 As shown, this implementation provides a method for extracting ground features from SAR images based on spatial relationship learning, and the specific steps are as follows:

[0092] Step 1: Data acquisition. This embodiment designs a low-cost data acquisition method that can obtain patch-level data from high-resolution large-scene SAR images using only a small amount of prior knowledge. High-resolution large-scene SAR images contain vast SAR scenes, and the natural areas covered are very large. In these natural areas, there are some large-scale gathering areas, such as farmland, forests, waters, buildings, etc. In this embodiment, by comparing the SAR image with the corresponding optical image, it is easy to find these large-scale gathering areas from the SAR image, and patch-level data can be obtained by performing patch-level sampling on different categories of areas in these large-scale gathering areas. Figure 2 As shown, Figure 2 is the SAR image and its corresponding optical image, Figure 2 The square area in represents the large-scale clustered area found in the SAR image. Compared with the pixel-level annotation method, the cost of using this manual assisted sampling method is negligible, and the patch-level data obtained by sampling can be applied to the task of SAR image ground feature extraction; finally, the patch-level data is divided into training data and test data.

[0093] Step 2: Construct the VIT-PSSL upstream task model. The construction of the VIT-PSSL upstream task model is based on the VIT structure, such as Figure 3 As shown in the figure, the core process of VIT consists of four main parts: image block processing, image block embedding and position encoding, Transformer encoder and MLP classification head.

[0094] Image block processing belongs to the preprocessing process. In the convolutional neural network, the entire image can be directly processed by two-dimensional convolution without special preprocessing. However, for the Transformer structure, due to the characteristics of its self-attention mechanism, the image needs to be divided into fixed-size blocks first, and then these blocks are processed as elements of the sequence. The process of block processing is to make the image adapt to the sequence processing method of Transformer so that the model can effectively learn the global relationship in the image. For an image x∈H×W×C, where H and W represent the spatial dimensions and C represents the number of channels, VIT needs to divide the image into a series of non-overlapping two-dimensional image blocks x p ∈N×(P 2 C), where the size of the image blocks is P*P, and this image can be divided into N = HW / P 2 image blocks, the dimension of each image block is (P 2 ·C).

[0095] In order to convert the vector into a two-dimensional input of (N, D), a Patch Embedding (PE) operation is required. The specific method is to perform a linear transformation (fully connected layer) on each vector. The dimension after compression is D. The encoded vector is shown as follows:

[0096]

[0097] E is the fully connected layer, which adds an additional learnable embedding vector x during Patch Embedding class , x class Similar to the query of the decoder, it is to find category information. pos The representative position encoding represents the position information of the sequence, which is also a trainable variable.

[0098] After the Patch Embedding operation, the vector can be fed into the Transformer encoder module. The Transformer encoder module consists of alternating Layer Normalization (LN), Multi-Head Self-Attention (MHSA) and Multilayer Perceptron (MLP) layers.

[0099] z l '=MSA(LN(z l-1 ))+z l-1 ,l∈[1,2,···,L]

[0100] z l =MLP(LN(z l '))+z l ',l∈[1,2,···,L]

[0101]

[0102] L represents the Transformer encoder used, with a total of L layers. The final category output class is the same as the learnable vector x of the last layer. class Associated.

[0103] The traditional VIT goal is to classify the input image. This embodiment modifies the structure of VIT to predict the relative position of the image block. Figure 4 As shown, Figure 4The upstream task flow chart designed for this embodiment, for the experimental data (training data) obtained from step one, will be divided into many small image blocks in the preprocessing stage of VIT, and position coding and category coding will be added in the PatchEmbedding stage. The role of position coding is to introduce the position information of each image block in the image so that the model can understand the local structure and global layout of the image. The purpose of the upstream task is to predict the position of small image blocks. Therefore, the choice to discard the position coding in the upstream task will increase the difficulty of the task to a certain extent. Similarly, since there is no need to classify the input image, the category coding is discarded. In the process of segmenting the image blocks, this embodiment adopts a random masking strategy, that is, some image blocks are randomly masked with a certain probability γ∈[0,1). The unmasked image blocks are encoded to form the input of the Transformer coding block. The random masking method will also increase the difficulty of the task to a certain extent, which will help the model learn more effective features. The unmasked image blocks without adding position information are encoded to form the input of the Transformer coding block:

[0104]

[0105] VIT-PSSL makes some changes to the final VIT classification head. The VIT classification head does not output the category of the image, but outputs the position of the unmasked image block in the original image.

[0106]

[0107] Where Q represents the number of unmasked image patches, L represents the last perceptron layer, and pos i Indicates the position of the predicted i-th image block in the original image.

[0108] This embodiment constructs a custom position auxiliary loss for training this task, using the idea of ​​cross entropy loss.

[0109] L position =CE(pos pred ,pos)

[0110] where pos pred and pos represent the predicted position and the true position respectively, and CE represents the cross entropy loss.

[0111] At this point, the obtained VIT-PSSL upstream task model is output, and the overall architecture of VIT-PSSL is as follows: Figure 5 shown.

[0112] Step three, construct the VIT-PSSL downstream task model. The downstream task model is a task that uses VIT to extract ground features. The main network structure used by the upstream task model and the downstream task model is consistent, so the upstream task model obtained in step two can be used as a pre-training model for the downstream task to fine-tune the downstream task. For the weights before the VIT classification head in the downstream task, the weights of the upstream task are migrated here. In the downstream task testing phase, for high-resolution large-scene SAR images, the high-resolution large-scene SAR images are cut into image blocks of the same size as the downstream task training set in the preprocessing phase. When cutting, the sliding window method is still used for overlapping cutting, dividing windows of fixed size, and then traversing the entire image by the sliding window method, and the degree of overlap is controlled by a fixed stride. The original image can be divided into multiple sub-images for testing by the sliding cutting method. The SAR image ground feature extraction method designed in this embodiment belongs to a patch-level data segmentation method. The ground feature category of the sub-image is predicted by sending the sub-image obtained by sliding cutting into the model. Each sub-image will have a central area, and all pixels in the central area of ​​each sub-image are predicted as pixel values ​​corresponding to the terrain category. After testing all sub-images in the testing phase, the central areas of all sub-images are spliced ​​to obtain the ground feature extraction results.

[0113] Step 4, combined with FC-CRF. The ground feature extraction method using patch-level data will inevitably produce some errors and will produce jagged structures at the edges of different regions. Therefore, it is necessary to use a post-processing method to improve the accuracy and obtain a high-quality ground feature extraction result map. This embodiment introduces a fully connected conditional random field (FC-CRF). As a post-processing method, FC-CRF is a form of conditional random field. By combining the relationship between all pixels in the original image for modeling, it aims to improve the accuracy of semantic segmentation through global context information, especially when dealing with complex scenes and boundary problems. The use of FC-CRF can smooth the output and reduce the inconsistency between adjacent pixels or regions, which is helpful for improving the jagged structure. Through the interaction between global information and pixels, FC-CRF helps to more accurately define and refine the boundaries of the target object. In some cases, the model generates isolated labels due to the influence of noise or unavoidable errors. FC-CRF can help fix these errors through global context information, making the output more reasonable.

[0114] This embodiment uses an efficient probabilistic approximation algorithm to implement FC-CRF, creating a random field X = {X1, X2, ···, X n}, where X krepresents the label assigned to pixel k, and also creates a random field I = {I1,I2,···,I n}, where I k Represents the RGB vector of pixel k. FC-CRF follows the Gibbs distribution and can be written as:

[0115]

[0116] E(X|I) is an energy function composed of a unary potential function and a binary potential function.

[0117] E(X|I)=Σ i ψ u (x i )+∑ i,j ψ b (x i ,y j )

[0118] The first term ψ u (x i ) is a unary potential function generated by the obtained prediction results, which represents the probability distribution assigned to the pixel label. The second term ψ b (x i ,y j ) is a binary potential function that constrains the relationship between pixels

[0119] Using this FC-CRF post-processing method can eliminate misclassified points at the edges and interiors of different regions and remove the jagged structures that appear in the image, which can alleviate some inevitable errors when extracting ground features using patch-level data and obtain high-quality results.

[0120] In order to verify the effect obtained by adopting the above extraction method, this embodiment also involves an index calculation process, which is as follows:

[0121] Step 5: Calculate the index. This embodiment uses different evaluation indexes to evaluate the obtained ground feature extraction result map. First, the relevant variables are explained. i represents a positive example, j represents a negative example, and p represents a negative example. ij represents the number of pixels that belong to class i but are predicted to be class j.

[0122] PA: The ratio of correctly labeled pixels to total pixels.

[0123]

[0124] Kappa: Used for consistency testing, penalizing model deviations to obtain a more unbiased model.

[0125]

[0126] po Indicates the proportion of correctly classified data to the total data, equivalent to PA; a1, a2, ···a n represents the number of real data of each type; b1, b2, ···b n Represents the number of predicted data in each category; c represents the number of categories; n represents the total number of data.

[0127] MIoU: represents the average value of the intersection over union of the true value and the predicted value.

[0128]

[0129] FWIoU: An improved form of MIoU, which sets weights based on the frequency of occurrence of categories.

[0130]

[0131] CPA: The ratio of true positive examples to all predicted positive examples.

[0132]

[0133] Recall: The ratio of the number of pixels correctly predicted as positive to all positive samples.

[0134]

[0135] F1score: The harmonic mean of CPA and Recall.

[0136]

[0137] Example 2

[0138] In this embodiment, the extraction method used in Example 1 was tested to verify its effect in practice, as follows:

[0139] Regarding the experimental settings and environment: The data used in this embodiment is a SAR image of a certain area taken by a domestic GF3, which contains 5 categories, namely water, forest, building, farmland and other areas, with an image size of 8000*8000, the polarization mode used is HH polarization, the band is C band, and the resolution is 3m. The specific sample information used in this embodiment is shown in Table 1.1. The number of labeled samples used is less than 1% of the total number of samples, which is in line with the goal of this embodiment, that is, to achieve SAR image feature extraction under small samples.

[0140] Table 1.1 shows the specific information of samples used in the VIT-PSSL method

[0141]

[0142] The task of predicting the relative position of image blocks based on VIT is an upstream task. In the training process of the upstream task, it is not necessary to use the labels of the training samples themselves, but to train them through the pseudo labels designed in this embodiment. In the upstream task of this embodiment, the VIT-B / 16 network is used. The initial input image size is 224*224, and the image block size divided in VIT-B / 16 is 16*16, so an image is divided into 196 small image blocks. The idea of ​​random masking was adopted in the experiment, and the masking probability was set to 0.5. During the training process, data enhancement operations were used for the training set of the upstream task, including random color jitter, random sampling and other operations. No data enhancement operations were used for the verification set of the upstream task, which has been proven to be more suitable for solving the upstream task of SAR images. The warmup learning rate is used in the upstream task training process, that is, the learning rate is set to 0.000001 before the actual training begins. As the number of iterations increases linearly to the preset basic learning rate of 0.0005, the cosine learning rate is used to dynamically adjust the learning rate. The warmup stage can help the model gradually adapt to the training data and optimization process, so as to enter the optimization state more robustly. The SGD optimizer is used in the upstream task training process, with momentum set to 0.9 and weight decay set to 0.05, and a total of 300 rounds of training.

[0143] The model obtained by upstream task training will be used as the pre-training model for downstream tasks. Only a small number of labeled samples are needed for fine-tuning in downstream tasks. The sample information used by downstream tasks is shown in Table 1.1. The downstream task network has the same main structure as the upstream task network, so only the classifier part needs to be modified to adapt to the downstream task. The warmup learning rate is also used in the downstream task training phase. In the initial stage, the learning rate is set to 0.00001, and it increases linearly with the number of iterations to the preset basic learning rate of 0.0005. After that, the cosine learning rate is used to dynamically adjust the learning rate. The SGD optimizer is used in the downstream task training process, with the momentum set to 0.9 and the weight decay set to 0.05, and a total of 300 rounds of training. In the downstream task testing phase, the original SAR image is cropped using a sliding window cropping method.

[0144] The experimental environment used in this example is shown in Table 1.2.

[0145] Table 1.2 is the experimental environment configuration table

[0146]

[0147]

[0148] It can be seen that this embodiment conducts experiments on SAR images, compares the VIT-PSSL method proposed in this embodiment with the Deeplabv3+ method, the Segformer method, and the SimCLR method, and compares the VIT-PSSL method without using FC-CRF and the VIT-PSSL (with FC-CRF) method using FC-CRF. Figure 6 and Figure 7 As shown, Figure 6 The SAR image and label map used in this embodiment are: Figure 7 This is a visualization result diagram of the ground feature extraction on SAR images by the VIT-PSSL method proposed in this embodiment and other methods. Table 1.3 shows the ground feature extraction indicators of the VIT-PSSL method proposed in this embodiment and other methods on SAR images.

[0149] It can be seen from Table 1.3 that the number of labeled training samples used in the task of extracting ground features is less than 1% of the total number of samples. When using a very small number of labeled training samples, the PA of the VIT-PSSL (with FC-CRF) method can reach 0.893, the Kappa coefficient reaches 0.832, the MIoU reaches 0.692, and the FWIoU reaches 0.814, which are the highest values ​​among all methods. Due to the small number of labeled samples used, the supervised learning method Deeplabv3+ has a serious overfitting phenomenon, and the ground feature extraction results are not good. Compared with the Segformer method and SimCLR method using pre-trained models, this method also has certain improvements in various indicators. After processing with FC-CRF, VIT-PSSL (with FC-CRF) has an improvement of about 1.5% in various indicators compared with VIT-PSSL. From the perspective of indicators of each category, the method proposed in this embodiment effectively improves the indicators of forests and farmlands. This also proves that the effective features learned by the upstream task designed in this embodiment help the downstream task distinguish similar features such as forests and farmlands. Combined with Figure 6 (a) Figure 6 (b) and Figure 7 (a) to (g), specifically through Figure 7 (g) and Figure 7 (b) Compared with the above, the method proposed in this embodiment achieves excellent visualization results of ground feature extraction when using very few labeled samples.

[0150] Table 1.3 shows the evaluation indexes of VIT-PSSL and other methods for extracting ground features from SAR images

[0151]

[0152]

[0153] In summary, the present invention provides a method for extracting ground features from SAR images based on spatial relationship learning, which solves the problem of deep learning methods' dependence on labeled data and the difficulty in effectively extracting different ground features from SAR images, and at the same time solves the problem of insufficient representativeness of learned features due to the fact that the upstream tasks of self-supervised learning are not difficult enough. The present invention designs an upstream task that predicts the relative positions of image blocks based on the VIT structure, removes position coding information in the upstream task, and introduces a random masking strategy to increase the difficulty of the upstream task in order to learn more discriminative features; at the same time, the information of the SAR image itself can be learned through the designed upstream task to help downstream tasks extract more discriminative features. The present invention designs a complete framework for extracting ground features from SAR images, and verifies the effectiveness of this embodiment using only a very small number of labeled samples by comparing it with multiple groups of comparative experiments on high-resolution large-scene SAR images.

[0154] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.

Claims

1. A method for extracting ground features from SAR images based on spatial relationship learning, characterized in that: include: Acquire patch-level data based on SAR images, and divide the patch-level data into training data and test data; Inputting the training data into the initial VIT-PSSL upstream task model, and obtaining the VIT-PSSL upstream task model after iterative training; removing the position encoding and the category encoding from the initial VIT-PSSL upstream task model and introducing a random masking strategy; Fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model; The test data is input into the VIT-PSSL downstream task model to predict the object category corresponding to each sub-image; all object categories are spliced ​​together to obtain the object feature extraction result.

2. The method for extracting ground features from SAR images based on spatial relationship learning according to claim 1, characterized in that: Also includes: The obtained ground feature extraction results are post-processed based on the fully connected conditional random field, and the final ground feature extraction results are output.

3. The method for extracting ground features from SAR images based on spatial relationship learning according to claim 1, characterized in that: The specific steps of obtaining patch-level data based on SAR images are as follows: The SAR image is compared with the corresponding optical image to obtain the gathering area; Only patch-level sampling is performed on the clustered area to obtain patch-level data.

4. The method for extracting ground features from SAR images based on spatial relationship learning according to claim 1, characterized in that: The specific steps of inputting the training data into the initial VIT-PSSL upstream task model and obtaining the VIT-PSSL upstream task model after iterative training are as follows: The training data is input into the initial VIT-PSSL upstream task model, and image segmentation, image block embedding, Transformer processing and classification processing are performed in sequence, and the position corresponding to each image block is output; in the initial VIT-PSSL upstream task model, the position encoding and category encoding are removed and a random masking strategy is introduced; Based on the preset position-assisted loss function and the position corresponding to each image block, the initial VIT-PSSL upstream task model is updated and iterated until the preset number of training rounds is reached, and the VIT-PSSL upstream task model is output.

5. The method for extracting ground features from SAR images based on spatial relationship learning according to claim 1, characterized in that: The specific steps of fine-tuning the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model are as follows: The weights of the VIT-PSSL upstream task model are transferred to the initial VIT-PSSL downstream task model, and the classification head of the initial VIT-PSSL downstream task model is modified to the category of the output image, where the backbone network of the initial VIT-PSSL upstream task model is the same as that of the initial VIT-PSSL downstream task model.

6. The method for extracting ground features from SAR images based on spatial relationship learning according to claim 1, characterized in that: The specific steps of inputting the test data into the VIT-PSSL downstream task model to predict the object category corresponding to each sub-image include: Perform image block processing on the test data to divide it into multiple sub-images and input all sub-images into the VIT-PSSL downstream task model; Traverse all sub-images and predict the terrain category corresponding to each sub-image, where each sub-image corresponds to a central area, and predict all pixels in the central area of ​​each sub-image as pixel values ​​corresponding to the terrain category; Finally, the central areas of all sub-images are spliced ​​to obtain the ground feature extraction results.

7. The method for extracting ground features from SAR images based on spatial relationship learning according to claim 6, characterized in that: The overlapping clipping method is used to divide the test data into image blocks, and the sliding window method is used to traverse all sub-images.

8. A SAR image ground feature extraction system based on spatial relationship learning, used to implement the steps of the SAR image ground feature extraction method based on spatial relationship learning according to any one of claims 1 to 7, characterized in that: include: A data acquisition module, used for acquiring patch-level data based on SAR images, and dividing the patch-level data into training data and test data; An upstream task construction module is used to input training data into an initial VIT-PSSL upstream task model, and obtain a VIT-PSSL upstream task model after iterative training; the position coding and category coding are removed from the initial VIT-PSSL upstream task model, and a random masking strategy is introduced; A downstream task construction module is used to fine-tune the initial VIT-PSSL downstream task model based on the VIT-PSSL upstream task model to obtain the VIT-PSSL downstream task model; The ground feature extraction module is used to input the test data into the VIT-PSSL downstream task model to predict the ground feature category corresponding to each sub-image; all ground feature categories are spliced ​​to obtain the ground feature extraction result.

9. A device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for extracting ground object elements from SAR images based on spatial relationship learning as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the steps of the method for extracting ground object elements from SAR images based on spatial relationship learning as described in any one of claims 1 to 7.

Citation Information

Cited By

  • InSAR inconsistent phase correction method and system based on coherence matrix guidance, terminal and storage medium

    CN121918079A

  • An InSAR non-uniform phase correction method and system based on coherence matrix guidance, a terminal and a storage medium

    CN121918079B