DSM image hole repairing method and system based on GAN network and space attention

Through the DSM image cavity repair method based on GAN network and spatial attention, the ZRr-GAN network and spatial attention normalization module are used to solve the problems of high complexity and low efficiency of DSM cavity repair in the prior art, and the hollow completion effect with high precision, strong adaptability and high computing efficiency is achieved.

CN119863398APending Publication Date: 2025-04-22Chinese People's Liberation Army Cyberspace Force Information Engineering University
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411646624.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The existing DSM hole repair methods have high computational complexity, low efficiency, easy to introduce more errors, and excessive and unsmooth repair areas, making it difficult to meet the production needs of high-precision DSM data.

Method used

The DSM image hole repair method based on GAN network and spatial attention is adopted. The DSM data to be repaired is taken as input through the ZRr-GAN network, and the generator and discriminator are used to repair the holes, and the spatial attention normalization module is added during the repair process to enhance the learning ability of the network.

Benefits of technology

It realizes high-precision hole completion, reduces errors, and the generated DSM images are more in line with the actual environment, improves the overall repair effect, has strong adaptability, high computing efficiency, and is suitable for real-time applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863398A_ABST
    Figure CN119863398A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of remote sensing image processing, in particular to a DSM image hole repairing method and system based on a GAN network and spatial attention, DSM data is acquired from an original data source to form a DSM data set, and the data set is divided into DSM sample data and DSM data to be repaired; constructing and using DSM sample data to train a ZRr-GAN network suitable for DSM hole repair; dSM data to be repaired serve as input of the ZRr-GAN network, and DSM image holes are repaired through the model. According to the method, improvement is carried out based on the GAN network, a space attention normalization module is integrated, the learning ability of the network on the topographic features and the space relation of the DSM data is enhanced, and more accurate hole completion is realized. The ZRr-GAN network can capture more terrain details, reduces errors, and can generate natural filling content highly consistent with surrounding DSM images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of remote sensing image processing, and in particular to a DSM image hole repair method and system based on a GAN network and spatial attention. Background Art

[0002] With the rapid development of remote sensing technology, digital surface model (DSM) is an important tool for accurately depicting the surface morphology, and its data accuracy has become a key indicator for measuring the quality of surface information extraction. However, in practical applications, DSM data is often affected by many factors. For example, during the data collection process, due to the obstruction of objects such as terrain, vegetation, and clouds, the image acquisition equipment cannot penetrate these obstacles, resulting in holes in the corresponding areas of the produced DSM data; during the data processing process, when multiple data sources are used to construct DSM, errors may occur in the registration and fusion process between different data sources, which will also cause holes in the splicing of DSM data; in complex terrain areas (such as ridges, valleys, etc.), due to the rapid changes and diversity of the terrain, it may be difficult to accurately capture all the details, which will also cause holes in the produced DSM. These holes will affect the accuracy and precision of DSM data and affect the subsequent application of the data.

[0003] The current traditional technologies for dealing with DSM holes mainly include double line interpolation, Kriging interpolation, diffusion-based repair, and patch-based repair.

[0004] Bilinear interpolation: By considering the influence of the four immediate neighbors around the sample point to be tested, linear interpolation is performed. For large-scale holes, the interpolation method may not provide enough contextual information to accurately fill, resulting in a large difference between the filling result and the actual terrain. For complex hole shapes, it may be difficult to capture all terrain details, resulting in unnatural transitions or errors.

[0005] Kriging interpolation: It is a statistical interpolation method that can take into account the autocorrelation of spatial data and provide the best unbiased estimate. Compared with simple interpolation methods, the calculation process of Kriging interpolation is more complicated and requires more computing resources.

[0006] Based on diffusion repair technology: starting from the elevation data of the effective area as the starting point of diffusion, through a series of iterative steps, these elevation data are gradually extended to the hole area. The diffusion process is repeated until the elevation value of the hole area tends to be stable or meets the preset convergence standard. Small errors will be introduced in the diffusion process, causing a certain degree of deviation between the filling result and the real terrain. In order to achieve a satisfactory filling effect, a large number of iterative calculations are usually required to achieve the ideal filling effect, and the calculation complexity is high.

[0007] Patch-based inpainting method: By identifying the hole area, its location, size and shape characteristics are determined. The available data sources are searched for patch areas that are similar or adjacent to the hole. After finding a suitable patch, its size and shape are adjusted to match the hole, and the patch is seamlessly merged with the surrounding valid data through a specific algorithm. The effective implementation of this method depends on sufficient reference data resources. For areas with scarce data, this method may be difficult to apply. At the same time, discontinuities or unclear transitions may occur at the boundary where the patch merges with the surrounding environment.

[0008] Through the above analysis, the existing DSM hole repair method has high computational complexity, low efficiency, easy to introduce more errors, and the repaired area is not smooth and natural, which is difficult to meet the needs of high-precision DSM data production. There is an urgent need for a high-precision, high-efficiency, and more natural DSM image hole repair method. Summary of the invention

[0009] The present invention aims to solve the problems of high computational complexity, low efficiency, easy introduction of more errors, and excessive unsmoothness and unnaturalness of the repaired area in the current DSM hole repair method, and proposes a DSM image hole repair method and system based on GAN network and spatial attention to comprehensively improve the accuracy and precision of DSM data.

[0010] To achieve the above purpose, the technical solution adopted is:

[0011] A DSM image hole repair method based on GAN network and spatial attention, including:

[0012] DSM data is obtained from the original data source to form a DSM data set, which is divided into DSM sample data and DSM data to be repaired;

[0013] Construct and use DSM sample data to train a ZRr-GAN network suitable for DSM hole repair;

[0014] The DSM data to be repaired is used as the input of the ZRr-GAN network, and the DSM image holes are repaired through this model.

[0015] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, the DSM sample data covers a variety of terrain features and different hole types.

[0016] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, the ZRr-GAN network includes a generator, the generator adopts a symmetric encoder-decoder structure, and uses a fast spatial pyramid pooling module to link the encoder and decoder. The encoder and decoder are both designed as a five-layer structure; the corresponding layers of the encoder and the decoder are jump-connected through a spatial attention normalization module.

[0017] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, two convolution modules are used in each layer of the encoder to extract features and increase the number of feature map channels, each convolution module includes Conv2d, a normalization layer and a SiLu activation function, and then the maximum pooling layer is used to halve the size of the feature map; a convolution module is used in each layer of the decoder, the convolution module includes Conv2d, a normalization layer and a SiLu activation function, and then the upsampling layer is used to enlarge the size of the feature map; finally, a convolution layer is used to output the result image.

[0018] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, the working process of the spatial attention normalization module includes three steps of attention map learning, self-sampling regularization and normalization:

[0019] (1) Learning of attention map: Attention map is realized through convolution calculation: S raw =K s (X), where X is the feature map output by the encoder, K s is the filter, the attention map S raw Each channel of represents the attention of a semantic entity;

[0020] (2) Self-sampling regularization: First, use the local convolution update mask to distinguish the hole area and the normal area, and then randomly select 2n blocks from the hole area and the normal area of ​​the feature map, and record the selected blocks as s(X) 2n and s(F) 2n ; Then calculate s(X) 2n and s(F) 2n The similarity between them, select s(F) 2n The n blocks with the highest similarity to the hole area are used as regularized semantic filters s(F) n ; The final regularization term S re The calculation of s(F) is n As the convolution kernel, X is convolved and calculated;

[0021] (3) Normalization: First, use the attention map S raw and the attention regularization term S re, calculate the final semantic attention graph S, formula S = S raw +aS re , where a is a learnable vector; then the Softmax operation is applied to obtain the attention score map S * ; Using the attention score map S * Normalize the feature map X; the output of the final spatial attention normalization module is to use the residual to calculate the original feature map X and the normalized feature map The weighted sum of .

[0022] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, the ZRr-GAN network also includes a discriminator, which uses three downsampling layers to reduce the feature map, and then adjusts the number of feature map channels through two convolutional layers; finally, the output average of each pixel of the feature map is calculated as the final decision.

[0023] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, the DSM data to be repaired is used as the input of the ZRr-GAN network, and repairing the DSM image hole through the model includes:

[0024] After receiving the DSM data to be repaired, the generator generates a DSM image with the holes repaired; at the same time, the discriminator evaluates the DSM image with the holes filled.

[0025] According to the DSM image hole repair method based on the GAN network and spatial attention of the present invention, further, after the model repairs the DSM image holes, it also includes smoothing operations and edge area enhancement processing on the complete DSM image.

[0026] Furthermore, the present invention also provides a DSM image hole repair system based on a GAN network and spatial attention, which is used to implement the DSM image hole repair method based on a GAN network and spatial attention as described above, comprising:

[0027] A data set construction module is used to obtain DSM data from an original data source to form a DSM data set, and the data set is divided into DSM sample data and DSM data to be repaired;

[0028] Model building module, used to build and use DSM sample data to train the ZRr-GAN network suitable for DSM hole repair;

[0029] The hole repair module is used to use the DSM data to be repaired as the input of the ZRr-GAN network and repair the DSM image holes through the model.

[0030] The beneficial effects achieved by adopting the above technical solution are:

[0031] 1. High precision of hole repair: Based on the GAN network, the network is improved and the spatial attention normalization module is integrated to enhance the network's ability to learn the terrain features and spatial relationships of DSM data, so as to achieve more accurate hole completion. The ZRr-GAN network can capture more terrain details, reduce errors, and generate highly consistent and natural filling content with the surrounding DSM images, making the generated DSM images more consistent with the actual environment, thereby improving the overall repair effect. Compared with other current hole repair methods based on deep learning networks, this method can more effectively repair DSM image holes and perform better in terms of image quality and details.

[0032] 2. Consistency of DSM image texture features: Through training, the ZRr-GAN network can learn the feature representation of DSM images under different conditions, including terrain features under different image quality, weather conditions and surface coverage, and can maintain the consistency of restoration effects under complex conditions.

[0033] 3. Strong adaptability: The trained ZRr-GAN network can flexibly handle DSM image holes of various types, resolutions and terrains without adjusting parameters or retraining for each case, showing good adaptability and generalization. In addition, its built-in spatial attention normalization module can effectively extract and focus on image features with high attention scores to repair holes, making image restoration more accurate and efficient.

[0034] 4. Real-time performance and computational efficiency: The ZRr-GAN network has a fast processing speed in DSM hole repair, can quickly cope with large amounts of data, and is suitable for real-time applications. It quickly meets the DSM data processing needs and realizes real-time image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings of the embodiments of the present invention, wherein the drawings are only used to illustrate some embodiments of the present invention, but not to limit all embodiments of the present invention thereto.

[0036] Figure 1 is a flow chart of a DSM image hole repair method based on a GAN network and spatial attention according to an embodiment of the present invention;

[0037] Figure 2 is a structural diagram of a ZRr-GAN network generator according to an embodiment of the present invention;

[0038] Figure 3 is a structural diagram of a ZRr-GAN network discriminator according to an embodiment of the present invention;

[0039] Figure 4 It is a structural diagram of the spatial attention normalization module of an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings of specific embodiments of the present invention to clearly and completely describe the exemplary scheme of the embodiment of the present invention. Unless otherwise defined, the technical terms or scientific terms used in the present invention should be the common meanings understood by people with ordinary skills in the field.

[0041] like Figure 1 As shown, this embodiment discloses a DSM image hole repair method based on a GAN network and spatial attention, comprising the following steps:

[0042] Step S101: DSM data is obtained from an original data source to form a DSM data set, which is divided into DSM sample data (training set) and DSM data to be repaired (test set).

[0043] DSM sample data: These data are used as data sets for training models. The training sample data covers a variety of terrain features and different types of cavities, allowing the model to fully learn and adapt to various surface morphologies and restorations. Through comprehensive training, the model can accumulate rich experience and lay a solid foundation for subsequent restoration work.

[0044] DSM data to be repaired: These data are used as data sets to test the model. The data contains the void areas that need to be repaired in the project. By applying the model to these DSM data to be repaired, its performance in different situations can be evaluated, and the model parameters and algorithms can be further optimized to achieve the best repair effect.

[0045] Step S102: construct and use DSM sample data to train a ZRr-GAN network suitable for DSM hole repair.

[0046] The ZRr-GAN network consists of a generator and a discriminator. The generator adopts a typical symmetric encoder-decoder structure, and the Bottlenect that links the encoder and decoder is designed as a fast spatial pyramid pooling module (Fastspatial pyramid pooling, SPPF). On the one hand, SPPF can fuse multi-scale features in the encoding process and provide a smooth transition for the decoder to reconstruct the profile; on the other hand, SPPF supplements the global information lost in the local similarity constraint by increasing the receptive field.

[0047] like Figure 2 As shown in the figure, both the encoder and decoder are designed as a five-layer structure, that is, N = 5. When the grayscale image or data is received, the generator receives an input of (Size, Size, 1) and produces an output of the same size. When the received image is received, it receives an input of (Size, Size, 3) and produces an output of the same size.

[0048] Two convolution modules are used in each layer of the encoder to extract features and increase the number of channels in the feature map. Each convolution module includes Conv2d, InstanceNorm2d, and SiLu activation functions. Then, a 2×2 maximum pooling layer is used to halve the size of the feature map. After 4 downsamplings, the encoder finally obtains a (Size / 16, Size / 16, 512) feature map. The SPPF module does not change the size and number of channels of the data feature map, and fuses the results of the encoder and passes them to the decoder. A convolution module is used in each layer of the decoder. The convolution module includes Conv2d, InstanceNorm2d, and SiLu activation functions. Then, upsampling is used to enlarge the size of the feature map and the number of channels is halved. Finally, a convolution layer is used to output the result map.

[0049] The corresponding layers of the encoder and decoder are connected by a jump connection through the spatial attention normalization module. This method makes it possible to focus on valid information farther away and use it to repair the hole area, while avoiding interference from invalid information in the hole and information belonging to different semantic entities. The spatial attention normalization (SAN) module divides the feature map into different groups by calculating the similarity of pixels inside and outside the hole, and performs feature normalization in these groups. SAN can be divided into three steps: learning of attention map, self-sampling regularization and normalization, such as Figure 4 shown.

[0050] (1) Learning of Attention Maps

[0051] The first is to assume that the attention map is usually generated by calculating the weights or probability distributions of different positions in the feature map, which reflect the degree of attention paid by the model to different positions; the second is to assume that the feature map is regarded as a set of multiple semantic entities, and each pixel is associated with at least one of the semantic entities. For a given feature map X∈R from the encoder c*h*w , using a filter K s ∈R n*c*1*1 Semantic entities are fitted by back propagation. R represents the dimension of the feature, h, w are the height and width of the feature map, c is the number of channels, and n represents the number of predefined semantic entities.

[0052] The correlation between the feature map and these semantic entities is defined as the original attention map S about these semantic entities raw , which can be calculated by convolution calculation, S raw =K s (X), attention map S rawEach channel of represents the attention of a semantic entity, and orthogonal regularization is used as the loss function to guide the learning of semantic entities. Formula Where K s Compressed to one dimension is R n*c A two-dimensional weight matrix, each row of the matrix represents the span weight of a semantic entity. Represents the orthogonal regularization loss calculation.

[0053] (2) Self-sampling regularization

[0054] First, use the local convolution update mask to distinguish the hole area from the normal area, and then randomly (uniformly sample) take 2n patches from the hole area and the normal area of ​​the feature map, and record the selected patches as s(X) 2n and s(F) 2n In addition, in order to capture a wider range of information, 3×3 blocks are taken and stretched to a dimension of R c*9 The vector of , which is convenient for calculating the similarity between them. Then the calculation formula of the correlation is shown in the formula.

[0055]

[0056] Where i and j represent the indices of blocks in X and F respectively, i,j∈[0,2n). Select s(F) 2n The n blocks with the highest similarity to the hole area are used as regularized semantic filters s(F) n .

[0057] Finally, the regularization term S re The calculation of s(F) is n As the convolution kernel, convolution is performed on X to obtain the formula S re =s(F) n (X).

[0058] (3) Normalization

[0059] Using the learned original attention map S raw and the attention regularization term S re , calculate the final semantic attention graph S, formula S = S raw +aS re , where a∈R 1*1*n is a learnable vector initialized to 0.1; it adaptively adjusts s re The regularization effect prevents some entities from learning useless semantics. Then the Softmax operation is used to obtain the attention score map S * , the formula is:

[0060]

[0061] Where i and j are the channel indices, and exp(·) represents an exponential function with base e. Finally, according to the obtained attention score map S* , the feature map can be divided into n regions and normalized separately. The calculation method is as follows:

[0062]

[0063] X and S in the formula * Before calculation, broadcast it to R using broadcast operation. c*n*h*w to align the dimensions of the two matrices, ⊙ represents the calculation of the Hadamard Product. μ(·) and σ(·) calculate the mean and standard deviation of the instance respectively. Each region shares a mean and variance, strengthening the connection between internal pixels even if they are far apart.

[0064] The output of the spatial attention normalization module is to calculate the original feature map X and the normalized feature map using the residual The weighted sum of where γ is a learnable scalar initialized to 0.

[0065] The attention map calculated in this embodiment performs attention transfer, which fills the gaps by weighted copying of features from the context. n Select n blocks at the same position (denoted as s(G) n ), and use it as a convolution filter to reconstruct the gradient information of the hole area. Finally, it is connected with the decoded feature map.

[0066] The traditional generative adversarial network discriminator usually gives a binary result of true or false, which may lose the local correlation in the image or data. This embodiment adopts the Patch GAN strategy to evaluate the generator's results by averaging the "true" or "false" of the feature map module of Size / 8×Size / 8. The structure of the discriminator is as follows Figure 3 As shown in the figure. Depending on the data source, when the input is a grayscale image or data, the input size of the discriminator is (Size, Size, 1), and when the input is an image, the input size of the discriminator is (Size, Size, 3). Three downsampling layers reduce the feature map to (Size / 8, Size / 8, 256); then two convolutional layers adjust the number of feature map channels and generate a feature map of (Size / 8, Size / 8, 1). Finally, the output average of each pixel in the feature map is calculated as the final decision.

[0067] Step S103: Use the DSM data to be repaired as the input of the ZRr-GAN network, and use the model to repair the DSM image holes.

[0068] The trained model is loaded into the system, and the DSM image with holes is used as input data and sent to the generator. After the generator receives the DSM image with holes, it will use its learned features and rules to repair the holes in the DSM image. The discriminator will evaluate the DSM image with the hole filled to ensure that the hole area is consistent with the surrounding valid data in structure and texture, and generate a more natural and accurate filling result. This process needs to ensure that the filled data has a smooth transition with the surrounding valid data to avoid obvious boundaries or discontinuities.

[0069] Step S104: Perform smoothing operations such as median filtering on the restored DSM image to eliminate noise and unevenness. On the basis of smoothing, enhance the edge area of ​​the DSM image to maintain the clarity and accuracy of the terrain features to achieve the best effect and form a complete DSM data restoration process.

[0070] Corresponding to the above method, this embodiment also proposes a DSM image hole repair system based on a GAN network and spatial attention, including:

[0071] A data set construction module is used to obtain DSM data from an original data source to form a DSM data set, and the data set is divided into DSM sample data and DSM data to be repaired;

[0072] Model building module, used to build and use DSM sample data to train the ZRr-GAN network suitable for DSM hole repair;

[0073] The hole repair module is used to use the DSM data to be repaired as the input of the ZRr-GAN network and repair the DSM image holes through the model.

[0074] Traditional DSM image hole repair methods generally rely on external data sources to provide the information required for repair, or require complex processing steps. The ZRr-GAN network-based method can directly learn features from the DSM image to be repaired and generate filling content that is coordinated with the surrounding area without the need for additional data sources or complex preprocessing, thereby simplifying the repair process.

[0075] Based on the ZRr-GAN network, it has stronger capabilities in feature expression. It enables the model to better focus on different positions in the input feature map. By learning weights, the model can selectively focus on features at certain positions, thereby extracting more important and relevant image features to fill holes. The addition of the attention mechanism helps to improve the model's perception of spatial structure, spatial dimension, and channel dimension, thereby improving the model's repair quality for the DSM structure.

[0076] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present invention.

[0077] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0078] The units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation is not considered to be beyond the scope of the present invention.

[0079] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk. Optionally, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits, and accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of software function modules. The present invention is not limited to any specific form of combination of hardware and software.

[0080] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A DSM image hole repair method based on GAN network and spatial attention, characterized in that: Include: DSM data is obtained from the original data source to form a DSM data set, which is divided into DSM sample data and DSM data to be repaired; Construct and use DSM sample data to train a ZRr-GAN network suitable for DSM hole repair; The DSM data to be repaired is used as the input of the ZRr-GAN network, and the DSM image holes are repaired through this model.

2. The DSM image hole repair method based on GAN network and spatial attention according to claim 1 is characterized in that: The DSM sample data covers a variety of terrain features and different cavity types.

3. The DSM image hole repair method based on GAN network and spatial attention according to claim 1 is characterized in that: The ZRr-GAN network includes a generator, which adopts a symmetric encoder-decoder structure and uses a fast spatial pyramid pooling module to link the encoder and decoder. The encoder and decoder are both designed as a five-layer structure. The corresponding layers of the encoder and decoder are jump-connected through a spatial attention normalization module.

4. The DSM image hole repair method based on GAN network and spatial attention according to claim 3 is characterized in that: Two convolution modules are used in each layer of the encoder to extract features and increase the number of feature map channels, each convolution module includes Conv2d, a normalization layer and a SiLu activation function, and then a maximum pooling layer is used to halve the size of the feature map; a convolution module is used in each layer of the decoder, the convolution module includes Conv2d, a normalization layer and a SiLu activation function, and then an upsampling layer is used to enlarge the size of the feature map; finally, a convolution layer is used to output the result map.

5. The DSM image hole repair method based on GAN network and spatial attention according to claim 3 is characterized in that: The working process of the spatial attention normalization module includes three steps: attention map learning, self-sampling regularization and normalization: (1) Learning of attention map: Attention map is realized through convolution calculation: S raw =K s (X), where X is the feature map output by the encoder, K s is the filter, the attention map S raw Each channel of represents the attention of a semantic entity; (2) Self-sampling regularization: First, use the local convolution update mask to distinguish the hole area and the normal area, and then randomly select 2n blocks from the hole area and the normal area of ​​the feature map, and record the selected blocks as s(X) 2n and s(F) 2n ; Then calculate s(X) 2n and s(F) 2n The similarity between them, select s(F) 2n The n blocks with the highest similarity to the hole area are used as regularized semantic filters s(F) n ; The final regularization term S re The calculation of s(F) is n As the convolution kernel, X is convolved and calculated; (3) Normalization: First, use the attention map S raw and the attention regularization term S re , calculate the final semantic attention graph S, formula S = S raw +aS re , where a is a learnable vector; then the Softmax operation is applied to obtain the attention score map S * ; Using the attention score map S * Normalize the feature map X; the output of the final spatial attention normalization module is to use the residual to calculate the original feature map X and the normalized feature map The weighted sum of .

6. The DSM image hole repair method based on GAN network and spatial attention according to claim 3 is characterized in that: The ZRr-GAN network also includes a discriminator, which uses three downsampling layers to reduce the feature map, and then adjusts the number of feature map channels through two convolutional layers; finally, the output average of each pixel in the feature map is calculated as the final decision.

7. The DSM image hole repair method based on GAN network and spatial attention according to claim 6, characterized in that: The DSM data to be repaired is used as the input of the ZRr-GAN network. The model is used to repair DSM image holes, including: After receiving the DSM data to be repaired, the generator generates a DSM image with the holes repaired; at the same time, the discriminator evaluates the DSM image with the holes filled.

8. The DSM image hole repair method based on GAN network and spatial attention according to claim 1, characterized in that: After the model repairs the holes in the DSM image, it also includes smoothing operations and edge area enhancement processing on the complete DSM image.

9. A DSM image hole repair system based on GAN network and spatial attention, characterized in that: The method for repairing DSM image holes based on a GAN network and spatial attention according to any one of claims 1 to 8 comprises: A data set construction module is used to obtain DSM data from an original data source to form a DSM data set, and the data set is divided into DSM sample data and DSM data to be repaired; Model building module, used to build and use DSM sample data to train the ZRr-GAN network suitable for DSM hole repair; The hole repair module is used to use the DSM data to be repaired as the input of the ZRr-GAN network and repair the DSM image holes through the model.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.