A method, device and medium for extracting target area of ​​remote sensing image

By introducing a spatial attention mechanism into the U-Net network, the remote sensing images are preprocessed and optimized, and the problems of low efficiency and poor accuracy in remote sensing images are solved, and efficient and accurate target area extraction and information extraction are achieved.

CN119762988AInactive Publication Date: 2025-04-04ZHEJIANG LAB
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510273512.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In large-scale, high-resolution remote sensing image processing, the existing technology has low efficiency, poor extraction accuracy, and poor adaptability to diversified surface coverage in complex environments. It is affected by factors such as image noise and light changes, resulting in instability of the segmentation results.

Method used

The target model is constructed using the U-Net network based on the spatial attention mechanism, and the initial remote sensing image is preprocessed and optimized. It can generate high-quality target data sets through iterative training to achieve efficient pixel-level image segmentation.

Benefits of technology

Through the application of spatial attention mechanism, the interference of complex background noise is reduced, the error detection rate and missed detection rate are reduced, the detection accuracy and robustness are improved, and the automatic segmentation and information extraction of target areas are achieved efficient and accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762988A_ABST
    Figure CN119762988A_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and medium for extracting target regions from remote sensing images. The method comprises: obtaining a set of images to be extracted after preprocessing the acquired initial remote sensing images; constructing a target model of a U‑Net network based on a spatial attention mechanism; inferring the set of images to be extracted through the target model to obtain a set of inferred images after the target region is extracted; and optimizing the inferred image set to generate a target data set. Thus, the target region of the image is inferred and extracted through the target model of the U‑Net network based on the spatial attention mechanism. The spatial attention mechanism can focus the model's attention on the target region, reduce the interference of complex background noise, and reduce the false detection rate and missed detection rate. At the same time, under the U‑Net network architecture, efficient pixel-level image segmentation is achieved. Thus, the combination of the spatial attention mechanism and the U‑Net network achieves efficient and accurate automatic segmentation and information extraction of the target region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of remote sensing image processing, and in particular to a method, device and medium for extracting a target area of ​​a remote sensing image. Background Art

[0002] Remote sensing technology is an important technical means to obtain surface information and is widely used in many fields such as agricultural monitoring, resource survey, urban planning, environmental protection, ecological assessment and disaster monitoring. For example, in the agricultural field, by identifying the target area (e.g., cultivated land) in remote sensing images, it is possible to quickly and accurately obtain information such as cultivated land area, crop planting type, and crop growth, thereby providing a scientific basis for agricultural production decision-making and policy support.

[0003] At present, although the extraction of target areas in remote sensing images based on image processing algorithms has made some progress, in large-scale, high-resolution remote sensing image processing, such methods are often inefficient, have poor extraction accuracy, and are poorly adaptable to diverse surface coverage in complex environments. In addition, they are affected by factors such as image noise and illumination changes, which can lead to instability in segmentation results.

[0004] It can be seen that how to efficiently and accurately extract the target area in the remote sensing image is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] In view of this, one aspect of the present application provides a method for extracting a target area of ​​a remote sensing image, the method comprising: Acquire initial remote sensing images; After preprocessing the initial remote sensing image, a set of images to be extracted is obtained; Construct the target model of U-Net network based on spatial attention mechanism; Inferring the image set to be extracted through the target model to obtain an inferred image set after the target area is extracted; The inference image set is optimized to generate a target data set.

[0006] Optionally, the target model of the U-Net network based on the spatial attention mechanism is constructed, including: Obtain an initial set of image samples for model training; After preprocessing the initial image sample set, a target image sample set is obtained; Taking the U-Net network as the basic architecture, integrating the spatial attention mechanism, so as to build an initial model of the U-Net network based on the spatial attention mechanism; The initial model is iteratively trained using the target image sample set to obtain the target model.

[0007] Optionally, the U-Net network is used as a basic architecture and the spatial attention mechanism is integrated, including: Taking the U-Net network as the basic architecture, a spatial attention module is embedded in a specified position in the U-Net network; wherein the specified position is the position after each downsampling layer in the encoder module.

[0008] Optionally, the preprocessing of the initial image sample set to obtain a target image sample set includes: Screening out images with a specified spatial resolution from the initial image sample set to obtain a first sample set; After performing sample augmentation processing on the first sample set, a second sample set is obtained; wherein the sample augmentation processing includes at least one of left-right flipping, up-down flipping, rotating 90°, rotating 180°, and rotating 270°; After performing sample enhancement processing on the second sample set, the target image sample set is obtained; wherein the sample enhancement processing includes at least one of brightness enhancement and color enhancement.

[0009] Optionally, the specified spatial resolution includes at least the spatial resolution corresponding to the RGB band and the near-infrared band.

[0010] Optionally, after preprocessing the initial remote sensing image, a set of images to be extracted is obtained, including: After sequentially performing radiation correction processing, geometric correction processing and panchromatic multispectral fusion processing on the initial remote sensing image, a first image set is obtained; Performing enhancement processing on the first image set to obtain a second image set; wherein the enhancement processing includes at least one of brightness enhancement and color enhancement; After cropping the second image set, the image set to be extracted is obtained.

[0011] Optionally, the optimizing the inference image set to generate a target data set includes: Performing designated image processing on the inference image set in sequence; wherein the designated image processing includes at least one of removing broken spots, erosion and expansion processing, hole filling processing, and raster-to-vector processing; The image vector lines after the designated image processing are simplified to obtain the target data set.

[0012] Another aspect of the present application provides a target area extraction device for a remote sensing image, the device comprising: An initial remote sensing image acquisition module is used to acquire an initial remote sensing image; A preprocessing module, used for preprocessing the initial remote sensing image to obtain an image set to be extracted; The target model building module is used to build the target model of the U-Net network based on the spatial attention mechanism; An inference module, used to infer the image set to be extracted through the target model to obtain an inference image set after the target area is extracted; The optimization module is used to optimize the inference image set to generate a target data set.

[0013] Another aspect of the present application provides a target area extraction device for remote sensing images, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, the steps of the target area extraction method of the remote sensing image are implemented.

[0014] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the target area extraction method of the remote sensing image are implemented.

[0015] The present application provides a method, device and medium for extracting the target area of ​​a remote sensing image, and the beneficial effects produced are: the target area of ​​the image is inferred and extracted through the target model of the U-Net network based on the spatial attention mechanism, and the spatial attention mechanism can focus the model's attention on the target area, reduce the interference of complex background noise, reduce the false detection rate and missed detection rate, thereby effectively improving the detection accuracy and robustness. At the same time, under the U-Net network architecture, efficient pixel-level image segmentation is achieved. The combination of the spatial attention mechanism and the U-Net network realizes efficient and accurate automatic segmentation and information extraction of the target area. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a flow chart of a method for extracting a target area of ​​a remote sensing image provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of an initial model of a U-Net network based on a spatial attention mechanism provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a spatial attention module provided in an embodiment of the present application; Figure 4 A schematic flow chart of a method for extracting a target area of ​​a remote sensing image provided by another embodiment of the present application; Figure 5 A schematic diagram of the result of target area extraction of a remote sensing image provided in an embodiment of the present application; Figure 6A schematic diagram of the structure of a target area extraction device for a remote sensing image provided in an embodiment of the present application; Figure 7 A schematic structural diagram of a target area extraction device for a remote sensing image provided in another embodiment of the present application.

[0017] The reference numerals are as follows: 70 is a memory, 71 is a processor, 72 is a display screen, 73 is an input / output interface, 74 is a communication interface, 75 is a power supply, 76 is a communication bus, 701 is a computer program, 702 is an operating system, and 703 is data. DETAILED DESCRIPTION

[0018] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0019] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0020] Figure 1 A schematic diagram of a flow chart of a method for extracting a target area of ​​a remote sensing image provided in an embodiment of the present application, such as Figure 1 As shown, the method includes: S10: Acquire initial remote sensing images; S11: After preprocessing the initial remote sensing image, a set of images to be extracted is obtained; In a specific embodiment, an initial remote sensing image for target area extraction is obtained, wherein the target area may include but is not limited to farmland, cities, roads, forests, and water bodies. After obtaining the initial remote sensing image, in order to improve the extraction accuracy of the target area, in an optional embodiment, the initial remote sensing image is preprocessed through step S11 to obtain a preprocessed image set to be extracted.

[0021] It should be noted that the preprocessing may include but is not limited to radiation correction, geometric correction, image fusion and image cropping. In addition, it should be noted that the initial remote sensing image can be obtained from a satellite system, and this application does not limit the way to obtain the initial remote sensing image.

[0022] S12: Construct the target model of U-Net network based on spatial attention mechanism; S13: inferring the image set to be extracted through the target model to obtain the inference image set after the target area is extracted; Furthermore, in an optional embodiment, in order to achieve efficient extraction of target areas in remote sensing images, a target module that can be used for automatic extraction of target areas in images is pre-built. Specifically, since the UNet network adopts a symmetrical encoder-decoder architecture and jump connections, it can accurately perform pixel-level image segmentation, which is particularly suitable for fine extraction of targets in remote sensing images.

[0023] Furthermore, in order to ensure the accuracy of extraction, considering the complex background, the spatial attention mechanism can better capture the features at the edge of the image and suppress background noise. It is especially suitable for the detection of multi-scale targets in remote sensing images, effectively improving the detection accuracy and robustness.

[0024] Therefore, in an optional embodiment, based on the U-Net network as the basic architecture, the spatial attention mechanism is integrated to construct a target model of the U-Net network based on the spatial attention mechanism. On this basis, the image set to be extracted is used as the input of the target model for reasoning, thereby obtaining the reasoning image set.

[0025] S14: Optimize the inference image set to generate a target data set.

[0026] It is understandable that after the target model is processed, the image set is inferred to achieve the extraction of the target area. For example, the output of the target model can be the effective segmentation of cultivated land and the extracted image. In a specific embodiment, due to the complexity of the real environment, it is difficult for the target model to directly infer and extract the image data in one go, that is, there may be errors in the extraction of the target area. Therefore, in order to further improve the extraction accuracy. In an optional embodiment, the inferred image set is further optimized to generate a high-quality target data set. Among them, the optimization process may include but is not limited to morphological operations, path optimization and refinement, and multi-source data fusion.

[0027] In an optional embodiment, the target area is cultivated land. In fact, the extraction method provided in the embodiment of the present application shows excellent performance in the task of cultivated land identification, and can provide solid technical support for precision agriculture, land use monitoring and ecological environmental protection.

[0028] Therefore, the target area extraction method of the remote sensing image provided in the embodiment of the present application is to infer and extract the target area of ​​the image through the target model of the U-Net network based on the spatial attention mechanism. The spatial attention mechanism can focus the model's attention on the target area, reduce the interference of complex background noise, and reduce the false detection rate and missed detection rate, thereby effectively improving the detection accuracy and robustness. At the same time, under the U-Net network architecture, efficient pixel-level image segmentation is achieved. The combination of the spatial attention mechanism and the U-Net network realizes efficient and accurate automatic segmentation and information extraction of the target area.

[0029] As an optional embodiment, a target model of a U-Net network based on a spatial attention mechanism is constructed, including: Obtain an initial set of image samples for model training; After preprocessing the initial image sample set, the target image sample set is obtained; Based on the U-Net network as the basic architecture, the spatial attention mechanism is integrated to build the initial model of the U-Net network based on the spatial attention mechanism; The initial model is iteratively trained using the target image sample set to obtain the target model.

[0030] In a specific embodiment, in order to ensure the inference accuracy of the target model, a high-quality sample library is constructed in advance, and the constructed model is trained with the sample data in the sample library. Specifically, an initial image sample set for model training is obtained, and the initial image sample set is preprocessed to obtain a target image sample set. The preprocessing may include but is not limited to data enhancement.

[0031] It can be understood that the sample set used for model training refers to the sample after the target area is annotated, which is used to train the model so as to guide the model to learn the mapping relationship between input data and output results. Specifically, the initial module constructed is iteratively trained through the target image samples.

[0032] The initial sample is based on the U-Net network as the basic architecture, and the model is obtained by integrating the spatial attention mechanism. The essence of the iterative training of the model is to adjust the initial model parameters through an optimization algorithm (for example, gradient descent) to minimize the difference between the predicted value and the true value, thereby obtaining a high-accuracy target model.

[0033] In an optional embodiment, the initial model is iteratively trained continuously through the target image sample set until the difference between the output signal and the real signal (i.e., the loss value) is less than a threshold, or until the loss curve region is stable. Specifically, the loss function of the model is:

[0034] in, is the loss value between the initial model output signal and the true signal, is the number of target image sample sets, is the true value, is the model prediction value. In an optional embodiment, the parameters in the initial model can be updated and iterated by an adaptive moment estimation (Adam) optimizer to obtain a target model with an optimal loss value.

[0035] In an optional embodiment, the target image sample set can be divided into a training set and a test set, wherein the training set is used to iteratively train the initial model. The test set is independent of the training set and is used to evaluate the performance of the model on unseen data. By running the model on the test set, the generalization ability of the model can be truly measured, that is, the model's ability to predict or classify new data, thereby improving the accuracy of the model.

[0036] It should be noted that in order to realize that the target model can automatically segment and extract different target areas such as forests, cities, roads, and cultivated land, different training data sets can be obtained when training the initial model, that is, target image samples labeled with different target areas can be obtained. After the initial model learns different target areas, the obtained target model can realize automatic, efficient, and accurate extraction of different target areas in remote sensing images.

[0037] Therefore, the target area extraction method of remote sensing images provided in the embodiment of the present application constructs a high-quality sample library, and trains the initial model of the U-Net network based on the spatial attention mechanism through high-quality samples, thereby providing a high-precision model for remote sensing image target area extraction.

[0038] Figure 2 A schematic diagram of the structure of an initial model of a U-Net network based on a spatial attention mechanism provided in an embodiment of the present application, based on the above embodiment, as an optional embodiment, taking the U-Net network as the basic architecture, integrating the spatial attention mechanism, including: Taking the U-Net network as the basic architecture, a spatial attention module is embedded in a specified position in the U-Net network; wherein the specified position is the position after each downsampling layer in the encoder module.

[0039] In a specific embodiment, Figure 2As shown, the initial module is built based on the U-Net network. The overall architecture of the U-Net network includes an input layer, an encoder module, a decoder module, and an output layer. The encoder module includes multiple downsampling layers (Down) and a DoubleConv module. In a specific embodiment, the encoder module gradually reduces the spatial resolution of the image (such as Figure 2 As shown in Figure 1, including down1 to down4), and extract high-level image features. Each downsampling layer extracts features through maximum pooling and convolution operations.

[0040] In the encoder module, the starting module consists of a DoubleConv module to perform preliminary feature extraction on the input image. The DoubleConv module is a commonly used structure in deep learning, especially in convolutional neural networks (CNNs), which extracts more complex features through two consecutive convolution operations.

[0041] In an optional embodiment, the DoubleConv module performs the following operations in sequence: First, a convolution operation is performed on the input image. In an optional embodiment, a 3×3 convolution kernel is applied to the input image to output a feature map of 64 channels. Then, a batch normalization (BN) operation is performed. Specifically, the output of the convolution operation is batch normalized (BN) to ensure the stability of the model during training.

[0042] Furthermore, the ReLU activation function is operated. Specifically, the ReLU activation function is applied after the convolution output to increase the nonlinearity of the network. Then, the convolution operation is performed again, that is, a 3×3 convolution operation is applied to the first convolution output again, and the output is still 64 channels. Finally, batch normalization (BN) and ReLU activation are performed again to further improve the feature expression ability.

[0043] The downsampling layer includes a max pooling layer for gradually reducing the spatial resolution of the image, i.e., for reducing the feature map dimension. In an optional embodiment, the max pooling layer may use a 2×2 pooling window to reduce the image size and extract high-level features. In an optional embodiment, the DoubleConv module extracts higher-level features through two 3×3 convolutional layers.

[0044] Furthermore, based on the U-Net network, a spatial attention module is embedded, that is, Figure 2 Specifically, an Attention Block is embedded after each downsampling layer in the encoder module.

[0045] Figure 3 A schematic diagram of the structure of a spatial attention module provided in an embodiment of the present application is shown in FIG. Figure 3As shown in the figure, the Attention Block generates a channel attention map by calculating the average pooling and maximum pooling of the input IN feature map in the spatial dimension. Then the feature map is weighted through the convolution operation to highlight the more important areas in the image, thereby generating the output OUT of the Attention Block.

[0046] Specifically, the Attention Block is used to enhance the feature expression of key areas in the image, which is specifically achieved through the following steps: First, average pooling and maximum pooling operations are performed on the input feature map respectively to generate two feature maps. Then, the outputs of average pooling and maximum pooling are spliced ​​in the channel dimension to generate a two-dimensional feature map. Furthermore, in an optional embodiment, the spliced ​​feature map is convolved with a 7×7 convolution kernel to generate an attention map. Next, a Sigmoid activation function is used to generate a spatial attention map, in which each pixel value represents the importance of the position. Finally, the spatial attention map is multiplied pixel by pixel with the input feature map to enhance the features of important areas.

[0047] In addition, the U-Net network also includes an input layer, a decoder module and an output layer. The input layer is used to receive the original image data as the input of the network. The number of channels of the input image is n_channels, and the number of output categories is n_classes. In a specific embodiment, the input layer starts to perform preliminary extraction of image features by passing the input image to the subsequent convolution module.

[0048] In an optional embodiment, Figure 2 The parameters of the initial model of the U-Net network based on the spatial attention mechanism shown can be set based on Table 1.

[0049] Table 1 shows the parameters of the initial model.

[0050] like Figure 2 As shown, the decoder module gradually restores the spatial resolution of the image through upsampling operations and fuses it with the low-level features extracted by the encoder. In an optional embodiment, the decoder module includes an upsampling layer and a DoubleConv module. In a specific embodiment, the decoder model includes the following operations: Upsampling operations (such as Figure 2As shown, including up1 to up4), in an optional embodiment, the feature map size is enlarged by 2 times using a bilinear interpolation method to restore the spatial resolution of the image. Two 3×3 convolution operations are applied to the spliced ​​feature map through the DoubleConv module to further extract the fused features and restore the image details. In addition, splicing and feature fusion are also included. Specifically, in each upsampling stage, the decoder model will be spliced ​​with the feature map of the corresponding layer of the encoder module to ensure the effective combination of low-level and high-level features.

[0051] The output layer of the U-Net network is used to generate the final image segmentation result. In an optional embodiment, the output layer maps the feature map output by the decoder to the predicted values ​​of n_classes categories through a 1×1 convolution operation.

[0052] Figure 4 A flowchart of a method for extracting a target area of ​​a remote sensing image provided by another embodiment of the present application is provided as an optional embodiment. Figure 4 As shown, after preprocessing the initial image sample set, the target image sample set is obtained, including: S40: Filtering images with a specified spatial resolution from the initial image sample set to obtain a first sample set; In a specific embodiment, images of a specified spatial resolution are selected from the initial image sample set to obtain a first sample set. It is understandable that in order to ensure the diversity of samples, the accuracy of the target model is improved. In an optional embodiment, the specified spatial resolution includes at least the spatial resolution corresponding to the RGB band and the near infrared band.

[0053] For example, in an optional embodiment, image data with a spatial resolution of 0.5 meters or 0.8 meters may be included. The image with a spatial resolution of 0.5 meters includes three bands: blue (450nm-510nm), green (510nm-580nm), and red (630-690nm), and the corresponding image has an annotation of the target area, for example, including an annotation of the scope of cultivated land. The image with a spatial resolution of 0.8 meters includes four bands: RGB band and near-infrared band, and similarly, the scope of cultivated land is annotated.

[0054] It should be noted that, in an optional embodiment, the sample data can be manually selected to obtain high-quality sample data. Of course, automatic selection and manual selection can also be combined, that is, on the basis of automatic selection, manual verification is performed to obtain high-quality sample data.

[0055] S41: After performing sample augmentation processing on the first sample set, a second sample set is obtained; wherein the sample augmentation processing includes at least one of left-right flipping, up-down flipping, rotating 90°, rotating 180°, and rotating 270°; After obtaining the first sample set, the first sample set is subjected to sample augmentation processing. Specifically, it may include but is not limited to left-right flipping, up-down flipping, rotating 90°, rotating 180°, and rotating 270°. It can be understood that the sample augmentation may be performed to expand the sample so as to ensure that the number of samples for training the initial model is sufficient, thereby improving the model accuracy.

[0056] For example, in an optional embodiment, about 1,000 remote sensing images containing abundant farmland data are selected, and after augmentation processing, the sample size can be expanded to 10,000, thereby ensuring the number of initial model training samples.

[0057] S42: After performing sample enhancement processing on the second sample set, a target image sample set is obtained; wherein the sample enhancement processing includes at least one of brightness enhancement and color enhancement.

[0058] After the second sample set is obtained by augmentation processing, the second sample set is further subjected to sample enhancement processing to obtain a target image sample set. Specifically, the sample enhancement processing may include but is not limited to brightness enhancement and color enhancement.

[0059] In an optional embodiment, color enhancement is performed on all samples by randomly jittering the colors within a certain range. Specifically, the brightness of the image of the second sample set is enhanced by randomly selecting a brightness factor (for example, in the range of 0.5 to 1.5). In an optional embodiment, the selection of the brightness factor can be adjusted by the ImageEnhance.Brightness module to obtain an enhanced image.

[0060] Furthermore, after adjusting the brightness, the random factor is used to enhance the color of the image. The selection range of the color factor can also be 0.5 to 1.5, and the color adjustment is implemented through the ImageEnhance.Color module, thereby generating a sample set of brightness enhancement and color enhancement, that is, a target image sample set.

[0061] In an optional embodiment, after obtaining the target image sample set, the target image sample set can be divided into a training set and a test set, so as to iteratively train and test the initial model of the U-Net network based on the spatial attention mechanism to obtain a high-quality target model.

[0062] Therefore, the target area extraction method of remote sensing images provided in the embodiment of the present application uses near-infrared band data to enhance the performance of vegetation features. At the same time, by fusing multispectral data with panchromatic data, a significant improvement in resolution is achieved, thereby greatly improving the accuracy of ground object extraction. In addition, after brightness enhancement and color enhancement, high-quality sample data is obtained, providing a data basis for the training of the initial model.

[0063] As an optional embodiment, after preprocessing the initial remote sensing image, a set of images to be extracted is obtained, including: After the initial remote sensing images are sequentially processed with radiation correction, geometric correction and panchromatic multispectral fusion, a first image set is obtained; Performing enhancement processing on the first image set to obtain a second image set; wherein the enhancement processing includes at least one of brightness enhancement and color enhancement; After cropping the second image set, the image set to be extracted is obtained.

[0064] In a specific embodiment, the initial remote sensing image is subjected to radiation correction processing. Specifically, the Six6S model can be used to extract information such as the solar altitude angle, central longitude and latitude from metadata information, and calculate correction parameters such as the image average elevation and satellite sensor orbit altitude. Further, the gain Gain and offset Bias of the corresponding band are obtained, and radiation correction and atmospheric correction processing are performed in different bands.

[0065] When performing geometric correction, the GMTED 900m digital elevation model can be used, the resampling method can use bilinear interpolation, and the geometric correction can be achieved through the gdal.Warp function.

[0066] In addition, the images can also be fused with full color and multispectral data. Specifically, the multispectral data is upsampled to the same size as the full color data, fused through Brovey transform (multispectral data is normalized and multiplied with the full color data to increase image information), optimized stretching (percentage truncation, 2.5%-99%, all channels are converted to unsigned 8-bit integers after normalization), and the fused image data is output after adjusting the channels.

[0067] Thus, after the initial remote sensing image is subjected to radiation correction processing, geometric correction processing and panchromatic multi-spectral fusion processing, a first image set can be obtained. Further, the first image set is enhanced to obtain a second image set. Similarly, the enhancement processing includes but is not limited to brightness enhancement and color enhancement.

[0068] Furthermore, in an optional embodiment, when the target image sample set used to train the initial model is a 256×256 pixel image, the fused image needs to be cropped to a 256×256 pixel image for inference recognition, that is, the second image set needs to be cropped. In other words, when the size of the second image set is larger than the target image sample set, the second image set needs to be cropped to ensure that the size of the input image of the target model is the same as the image size during training.

[0069] It should be noted that the affine transformation information of the current tile is calculated and the affine transformation and projection information are written to the new tile, that is, the projection coordinate information of the slice is retained. In other words, when processing geographic data or image tiles, the geometric transformation relationship (affine transformation) of the current tile relative to other tiles or the global coordinate system is first calculated, and then these transformation information and projection information are saved to the new tile for subsequent use.

[0070] As an optional embodiment, the inference image set is optimized to generate a target data set, including: Performing designated image processing on the inference image set in sequence; wherein the designated image processing includes at least one of removing broken spots, erosion and expansion processing, hole filling processing, and raster-to-vector processing; Simplify the image vector lines after the specified image processing to obtain the target data set.

[0071] In an optional embodiment, the connected domain SieveFilter method in Gdal can be used to remove broken spots, thereby filtering small noise areas, and the connectivity parameter can be set to 8. In an optional embodiment, Erode in OpenCV is used to erode the image, and then Dilate is used to dilate the image. Therefore, after morphological processing, the segmented edges can be smoothed to improve the visualization effect.

[0072] In some optional embodiments, for example, in the target area of ​​arable land, the land as a whole is fragmented, and small holes of varying sizes will appear. Therefore, the FindContours method of OpenCV can be used to find each patch, and the area of ​​each patch can be calculated using ContourArea, and small patches whose area is less than an area threshold (for example, 100 square meters) can be recorded. Further, FillPoly is used to fill the small patches, that is, to identify them as arable land. In a specific embodiment, the arable land identification effect is better after the holes are filled, and the ridges and irrigation canals between the arable land will not be filled by mistake.

[0073] Furthermore, the raster-to-vector processing is performed. Specifically, all raster image slices are merged, the row and column numbers of the original image where the slices are located are converted by name, and the pixel values ​​of the slices are filled into the actual positions to piece together a complete Tiff data.

[0074] After the above series of processing, finally, the image vector lines after the specified image processing are simplified to obtain the target data set. Specifically, the Simplify method can be used to simplify the converted vector graphics, reduce a large number of vertices, and eliminate the mosaic phenomenon at the edge.

[0075] Therefore, after a series of raster and vector data processing, the problems of fragmentation and diversity of cultivated land plots were effectively solved, and adverse effects such as jaggedness were eliminated, further improving the accuracy and practicality of the model results. Figure 5 This is a schematic diagram of the result of extracting the target area of ​​a remote sensing image provided in an embodiment of the present application. For ease of understanding, the following will be combined with Figure 5 , taking the target area as cultivated land as an example for explanation.

[0076] like Figure 5 As shown, after the initial remote sensing image P1 is processed by radiation correction, geometric correction, panchromatic multispectral fusion and enhancement, the image set P2 to be extracted is obtained. After the brightness of image P1 is enhanced, the vegetation is more obvious.

[0077] Furthermore, the image set P2 to be extracted is input into the target model of the U-Net network based on the spatial attention mechanism for inference, and image P3 is obtained. That is, after the target model is inferred, the cultivated land area in the image can be extracted. Furthermore, image P3 is processed by removing broken spots to obtain image P4, image P4 is processed by corrosion and expansion to obtain image P5, image P5 is processed by hole filling to obtain image P6, and image P6 is processed by raster-to-vector conversion to obtain image P7. Furthermore, image P7 is vector-line simplified to obtain target image P8.

[0078] In the above-mentioned embodiments, the target region extraction method of the remote sensing image is described in detail. The present application also provides a corresponding embodiment of the target region extraction device of the remote sensing image.

[0079] Figure 6 A schematic diagram of a target region extraction device for a remote sensing image provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device comprises: An initial remote sensing image acquisition module 60 is used to acquire an initial remote sensing image; A preprocessing module 61 is used to preprocess the initial remote sensing image to obtain an image set to be extracted; A target model building module 62 is used to build a target model of a U-Net network based on a spatial attention mechanism; The reasoning module 63 is used to reason the image set to be extracted through the target model to obtain a reasoning image set after the target area is extracted; The optimization module 64 is used to optimize the inference image set to generate a target data set.

[0080] In addition, the target area extraction device of the remote sensing image provided in the embodiment of the present application also includes: An initial image sample set acquisition module is used to acquire an initial image sample set for model training; The preprocessing module is also used to preprocess the initial image sample set to obtain the target image sample set; The initial model building module is used to build the initial model of the U-Net network based on the spatial attention mechanism by integrating the U-Net network as the basic architecture; The iterative training module is used to iteratively train the initial model through the target image sample set to obtain the target model.

[0081] The embedding module is used to embed the spatial attention module at a specified position in the U-Net network based on the U-Net network; wherein the specified position is the position after each downsampling layer in the encoder module.

[0082] A screening module, used to screen out images with a specified spatial resolution from the initial image sample set to obtain a first sample set; An augmentation processing module, configured to perform sample augmentation processing on the first sample set to obtain a second sample set; wherein the sample augmentation processing includes at least one of left-right flipping, up-down flipping, rotating 90°, rotating 180°, and rotating 270°; The enhancement processing module is used to perform sample enhancement processing on the second sample set to obtain a target image sample set; wherein the sample enhancement processing includes at least one of brightness enhancement and color enhancement.

[0083] The preprocessing module is also used to perform radiation correction processing, geometric correction processing and panchromatic multi-spectral fusion processing on the initial remote sensing image in sequence to obtain a first image set; The enhancement processing module is further used to perform enhancement processing on the first image set to obtain a second image set; wherein the enhancement processing includes at least one of brightness enhancement and color enhancement; The cropping module is used to crop the second image set to obtain the image set to be extracted.

[0084] An image processing module, used to perform designated image processing on the inference image set in sequence; wherein the designated image processing includes at least one of removing broken spots, erosion and expansion processing, hole filling processing, and raster-to-vector processing; The vector line simplification module is used to simplify the image vector lines after the specified image processing to obtain the target data set.

[0085] Figure 7 A schematic diagram of a target region extraction device for a remote sensing image provided by another embodiment of the present application is shown in FIG. Figure 7 As shown, the target area extraction device of the remote sensing image includes: a memory 70 for storing a computer program; The processor 71 is used to implement the steps of the target area extraction method of the remote sensing image mentioned in the above embodiment when executing the computer program.

[0086] The target region extraction device of the remote sensing image provided in this embodiment may include but is not limited to a laptop computer or a desktop computer.

[0087] Among them, the processor 71 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 71 can be implemented in at least one hardware form of a digital signal processor (Digital Signal Processor, referred to as DSP), a field programmable gate array (Field-Programmable Gate Array, referred to as FPGA), and a programmable logic array (Programmable Logic Array, referred to as PLA). The processor 71 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (Central Processing Unit, referred to as CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 71 may be integrated with a graphics processing unit (Graphics Processing Unit, referred to as GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 71 may also include an artificial intelligence (Artificial Intelligence, referred to as AI) processor, which is used to process computing operations related to machine learning.

[0088] The memory 70 may include one or more computer-readable storage media, which may be non-transitory. The memory 70 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 70 is at least used to store the following computer program 701, wherein, after the computer program is loaded and executed by the processor 71, it can implement the relevant steps of the target area extraction method of the remote sensing image disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 70 may also include an operating system 702 and data 703, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 702 may include Windows, Unix, Linux, etc. The data 703 may include, but is not limited to, relevant data involved in the target area extraction method of the remote sensing image.

[0089] In some embodiments, the target area extraction device of the remote sensing image may further include a display screen 72 , an input and output interface 73 , a communication interface 74 , a power supply 75 , and a communication bus 76 .

[0090] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the target area extraction device of the remote sensing image, and may include more or fewer components than those shown in the figure.

[0091] The target area extraction device of the remote sensing image provided in the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the target area extraction method of the remote sensing image in the above embodiment.

[0092] It should be noted that, although the operations are depicted in a specific order in the accompanying drawings, this should not be understood as requiring these operations to be performed in the specific order shown or to be performed sequentially, or requiring all illustrated operations to be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.

Claims

1. A method for extracting a target area from a remote sensing image, characterized in that: The method comprises: Acquire initial remote sensing images; After preprocessing the initial remote sensing image, a set of images to be extracted is obtained; Construct the target model of U-Net network based on spatial attention mechanism; Inferring the image set to be extracted through the target model to obtain an inferred image set after the target area is extracted; The inference image set is optimized to generate a target data set.

2. The target area extraction method of remote sensing image according to claim 1, characterized in that: The target model of the U-Net network based on the spatial attention mechanism is constructed, including: Obtain an initial set of image samples for model training; After preprocessing the initial image sample set, a target image sample set is obtained; Taking the U-Net network as the basic architecture, integrating the spatial attention mechanism, so as to build an initial model of the U-Net network based on the spatial attention mechanism; The initial model is iteratively trained using the target image sample set to obtain the target model.

3. The target area extraction method of remote sensing image according to claim 2, characterized in that: The U-Net network is used as the basic architecture and the spatial attention mechanism is integrated, including: Taking the U-Net network as the basic architecture, a spatial attention module is embedded in a specified position in the U-Net network; wherein the specified position is the position after each downsampling layer in the encoder module.

4. The target area extraction method of remote sensing image according to claim 2, characterized in that: After the initial image sample set is preprocessed, a target image sample set is obtained, including: Screening out images with a specified spatial resolution from the initial image sample set to obtain a first sample set; After performing sample augmentation processing on the first sample set, a second sample set is obtained; wherein the sample augmentation processing includes at least one of left-right flipping, up-down flipping, rotating 90°, rotating 180°, and rotating 270°; After performing sample enhancement processing on the second sample set, the target image sample set is obtained; wherein the sample enhancement processing includes at least one of brightness enhancement and color enhancement.

5. The target area extraction method of remote sensing image according to claim 4, characterized in that: The specified spatial resolution at least includes the spatial resolution corresponding to the RGB band and the near-infrared band.

6. The method for extracting target areas from remote sensing images according to claim 1, characterized in that: After preprocessing the initial remote sensing image, a set of images to be extracted is obtained, including: After sequentially performing radiation correction processing, geometric correction processing and panchromatic multispectral fusion processing on the initial remote sensing image, a first image set is obtained; Performing enhancement processing on the first image set to obtain a second image set; wherein the enhancement processing includes at least one of brightness enhancement and color enhancement; After cropping the second image set, the image set to be extracted is obtained.

7. The method for extracting target areas from remote sensing images according to claim 1, characterized in that: The step of optimizing the inference image set to generate a target data set includes: Performing designated image processing on the inference image set in sequence; wherein the designated image processing includes at least one of removing broken spots, erosion and expansion processing, hole filling processing, and raster-to-vector processing; The image vector lines after the designated image processing are simplified to obtain the target data set.

8. A target area extraction device for remote sensing images, characterized in that: The device comprises: An initial remote sensing image acquisition module is used to acquire an initial remote sensing image; A preprocessing module, used for preprocessing the initial remote sensing image to obtain an image set to be extracted; The target model building module is used to build the target model of the U-Net network based on the spatial attention mechanism; An inference module, used to infer the image set to be extracted through the target model to obtain an inference image set after the target area is extracted; The optimization module is used to optimize the inference image set to generate a target data set.

9. A device for extracting a target area of ​​a remote sensing image, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the target area extraction method of remote sensing images described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the target area extraction method of remote sensing images described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Construction site extraction method and system based on remote sensing image feature target detection

    CN115546630A

  • ROI region extraction method based on semantic segmentation model and conditional random field

    CN116630610A

  • Rape remote sensing identification method

    CN119107564A