Method and device for segmenting building in remote sensing image
By using the progressive growth mechanism and the convolutional neural network model of the Transformer Block module in remote sensing image segmentation, the limitations of remote sensing image segmentation methods for specific images are solved, and high-precision building segmentation of different types of remote sensing images is achieved.
Patent Information
- Application Number
- CN202410564016.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-08-23
AI Technical Summary
Existing remote sensing image segmentation methods are only suitable for specific remote sensing images. They cannot achieve good segmentation results for different types of remote sensing images. There are problems such as poor building edge extraction and incorrect segmentation of occluded targets.
Using a convolutional neural network model based on the progressive growth mechanism, through multi-stage training and feature extraction, the resolution of the input image and model depth are gradually increased, and the Transformer Block module is combined for feature extraction and feature fusion to adapt to different sizes and occluded targets. of building divisions.
It improves the flexibility and accuracy of remote sensing image segmentation, can adaptively learn rich detailed features of targets of different sizes and occluded targets, improves the accuracy of building segmentation, and solves the problem of poor segmentation results.
Smart Images

Figure CN118537345A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and device for segmenting buildings in remote sensing images. Background Art
[0002] Building segmentation in remote sensing images is an important research field in remote sensing image processing. It can extract building information from images and provide important data support for urban planning, environmental monitoring, disaster assessment and other fields. Traditional building segmentation methods mainly analyze image pixel-level information, but due to the complex and changeable characteristics of remote sensing images, these methods often have problems such as low segmentation accuracy and high computational complexity.
[0003] In order to solve the above defects, the prior art applies convolutional neural networks based on residual dense spatial pyramids to the task of remote sensing image segmentation in urban areas, and utilizes the features of remote sensing images at different scales. By adding a feature pyramid structure to the Unet network, a convolutional neural network-based image segmentation method is used to extract typical land spectral information and spatial information in remote sensing images to identify remote sensing satellite images. UNets of different scales are fused together to propose a multi-scale adaptive remote sensing semantic segmentation model. The introduction of an adaptive receptive field mechanism and a channel attention module can reduce the interference of background features, improve the segmentation accuracy of remote sensing images, and effectively solve the problems of target occlusion and difficult segmentation of small targets. A high-resolution remote sensing image building segmentation model based on residual grouped convolution is proposed by using a multi-level encoding and decoding structure to extract features of different scales.
[0004] Existing methods are often only applicable to specific remote sensing images, and may not achieve good segmentation results for different types of remote sensing images. The building edge extraction effect is poor, and there are problems such as segmentation errors of targets of different sizes and occluded targets.
[0005] The remote sensing image segmentation method in the above-mentioned related technologies is only applicable to specific remote sensing images, and cannot achieve good segmentation effects for different types of remote sensing images. There are great limitations, and no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a method and device for segmenting buildings in remote sensing images, so as to at least solve the technical problem that the remote sensing image segmentation method in the related art is only applicable to specific remote sensing images, cannot achieve good segmentation effects for different types of remote sensing images, and has great limitations.
[0007] According to one aspect of an embodiment of the present invention, a method for segmenting buildings in a remote sensing image is provided, comprising: obtaining a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image; inputting the remote sensing image to be segmented into an image segmentation model, so as to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
[0008] Optionally, acquiring the remote sensing image to be segmented includes: after receiving an image acquisition instruction, triggering an image acquisition device to acquire an image within a predetermined range to obtain the remote sensing image to be segmented.
[0009] Optionally, before inputting the remote sensing image to be segmented into an image segmentation model to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, the method for segmenting buildings in the remote sensing image also includes: obtaining the multiple sets of training data including the sample remote sensing image and the sample building segmentation image corresponding to the sample remote sensing image; inputting the multiple sets of training data into a Transformer U-net model, and using the TransformerUnet model to perform feature extraction on the sample remote sensing image in the multiple sets of training data to obtain remote sensing image feature information; and performing multi-stage training on the Transformer Unet model using the remote sensing image feature information to obtain the image segmentation model.
[0010] Optionally, before inputting the multiple sets of training data into the Transformer U-net model, the method for segmenting buildings in remote sensing images also includes: cropping the sample remote sensing images in the multiple sets of training data to obtain the sample remote sensing images of a predetermined resolution; and defogging the sample remote sensing data of the predetermined resolution to obtain the defogged sample remote sensing images.
[0011] Optionally, the Transformer Unet model is trained in multiple stages using the remote sensing image feature information to obtain the image segmentation model, including: in each of the multiple stages, the resolution of the remote sensing image feature information input to each layer of the network structure of the Transformer Unet model is sequentially increased, wherein the output result of each previous stage in the multiple stages is the input of the adjacent subsequent stage; and the remote sensing image feature information with increased resolution is processed through each layer of the network structure to obtain the image segmentation model.
[0012] Optionally, after the Transformer Unet model is trained in multiple stages using the remote sensing image feature information to obtain the image segmentation model, the method for segmenting buildings in remote sensing images also includes: obtaining multiple groups of test data including the sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; testing the image segmentation model using the multiple groups of test data to obtain test results; and determining that the training of the image segmentation model is completed when the test results indicate that the similarity between the image segmentation results of the image segmentation model and the sample building segmentation images in the multiple groups of test data reaches a predetermined threshold.
[0013] Optionally, the remote sensing image to be segmented is input into an image segmentation model so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, including: cropping the remote sensing image to be segmented to obtain the remote sensing image to be segmented with a predetermined resolution; defogging the remote sensing image to be segmented with a predetermined resolution to obtain the defogged remote sensing image to be segmented; and inputting the defogged remote sensing image to be segmented into the image segmentation model so as to use the image segmentation model to perform image segmentation processing on the defogged remote sensing image to be segmented.
[0014] According to another aspect of an embodiment of the present invention, there is also provided a device for segmenting buildings in a remote sensing image, comprising: a first acquisition unit, used to acquire a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image; a processing unit, used to input the remote sensing image to be segmented into an image segmentation model, so as to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
[0015] Optionally, the first acquisition unit includes: an acquisition module, which is used to trigger an image acquisition device to acquire an image within a predetermined range after receiving an image acquisition instruction, so as to obtain the remote sensing image to be segmented.
[0016] Optionally, the device for segmenting buildings in remote sensing images also includes: a second acquisition unit, used to acquire the multiple sets of training data including the sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images before inputting the remote sensing images to be segmented into the image segmentation model to perform image segmentation processing on the remote sensing images to be segmented using the image segmentation model; an extraction unit, used to input the multiple sets of training data into the Transformer U-net model, and use the Transformer Unet model to perform feature extraction on the sample remote sensing images in the multiple sets of training data to obtain remote sensing image feature information; a training unit, used to perform multi-stage training on the Transformer Unet model using the remote sensing image feature information to obtain the image segmentation model.
[0017] Optionally, the device for segmenting buildings in remote sensing images also includes: a cropping processing unit, used to perform cropping processing on the sample remote sensing images in the multiple groups of training data before inputting the multiple groups of training data into the Transformer U-net model to obtain the sample remote sensing images of a predetermined resolution; a defogging processing unit, used to perform defogging processing on the sample remote sensing data of a predetermined resolution to obtain the sample remote sensing images after defogging.
[0018] Optionally, the training unit includes: an adding module, used to sequentially increase the resolution of the remote sensing image feature information input to each layer of the network structure of the Transformer Unet model in each stage of the multiple stages, wherein the output result of each previous stage in the multiple stages is the input of the adjacent subsequent stage; and a first processing module, used to process the remote sensing image feature information after the resolution is increased through each layer of the network structure to obtain the image segmentation model.
[0019] Optionally, the device for segmenting buildings in remote sensing images also includes: a third acquisition unit, used to obtain multiple groups of test data including the sample remote sensing image and sample building segmentation images corresponding to the sample remote sensing image after performing multi-stage training on the Transformer Unet model using the remote sensing image feature information to obtain the image segmentation model; a testing unit, used to test the image segmentation model using the multiple groups of test data to obtain a test result; and a determination unit, used to determine that the training of the image segmentation model is completed when the test result indicates that the similarity between the image segmentation result of the image segmentation model and the sample building segmentation images in the multiple groups of test data reaches a predetermined threshold.
[0020] Optionally, the processing unit includes: a cropping processing module, used to perform cropping processing on the remote sensing image to be segmented to obtain the remote sensing image to be segmented with a predetermined resolution; a defogging processing module, used to perform defogging processing on the remote sensing image to be segmented with a predetermined resolution to obtain the remote sensing image to be segmented after defogging; and a second processing module, used to input the remote sensing image to be segmented after defogging processing into the image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented after defogging processing.
[0021] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above methods for segmenting buildings in remote sensing images.
[0022] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein the program executes any one of the above methods for segmenting buildings in remote sensing images when running.
[0023] In an embodiment of the present invention, a remote sensing image to be segmented is obtained, wherein the remote sensing image to be segmented includes a building image; the remote sensing image to be segmented is input into an image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, and each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism. Through the above scheme, the image segmentation model of the convolutional neural network based on the progressive growth mechanism is used to segment the remote sensing image to be segmented, so as to adapt to the purpose of segmentation processing of buildings of different sizes and obscured targets, and achieve the technical effect of improving the flexibility of image segmentation of remote sensing images, so that the segmentation of building images is no longer limited to specific remote sensing images, and can adaptively learn rich detail features of targets of different sizes and obscured targets, thereby improving the accuracy of building segmentation, thereby solving the technical problem that the remote sensing image segmentation method in the related art is only applicable to specific remote sensing images, and cannot achieve good segmentation effects for different types of remote sensing images, and has great limitations. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for segmenting buildings in a remote sensing image according to an embodiment of the present invention;
[0026] Figure 2 is a flow chart of a method for segmenting buildings in a remote sensing image according to an embodiment of the present invention;
[0027] Figure 3 is a structural diagram of a Transformer Block in an image segmentation model according to an embodiment of the invention;
[0028] Figure 4 is a schematic diagram of an image segmentation model according to an embodiment of the present invention;
[0029] FIG5( a ) is a schematic diagram of a remote sensing image with an original resolution of (5000×5000) and a building annotation image according to an embodiment of the present invention;
[0030] FIG5( b ) is a schematic diagram of a small piece of cropped remote sensing image for training and testing according to an embodiment of the present invention;
[0031] Figure 6 is a schematic diagram of a Transformer Unet model in the final stage according to an embodiment of the present invention;
[0032] Figure 7 is a schematic diagram of a segmentation ablation experiment of a PGT-Unet model on target samples of different sizes according to an embodiment of the present invention;
[0033] Figure 8 is a schematic diagram of a segmentation ablation experiment of an optional PGT-Unet model on target samples of different sizes according to an embodiment of the present invention;
[0034] Fig. 9 is a schematic diagram of a device for segmenting buildings in a remote sensing image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] As introduced in the background technology, the existing building segmentation method is often only applicable to specific remote sensing images, and may not achieve good segmentation results for different types of remote sensing images, and the building edge extraction effect is poor, and there are problems such as segmentation errors of targets of different sizes and occluded targets. In view of the above defects, a method and device for segmenting buildings in remote sensing images are provided in an embodiment of the present invention.
[0038] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0039] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal for a method for segmenting buildings in a remote sensing image according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0040] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for segmenting buildings in remote sensing images in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] According to an embodiment of the present invention, a method embodiment of a method for segmenting buildings in remote sensing images is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 2 is a flow chart of a method for segmenting buildings in a remote sensing image according to an embodiment of the present invention. Figure 2 As shown, the method for segmenting buildings in the remote sensing image includes the following steps:
[0043] Step S202, obtaining a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image.
[0044] Optionally, the remote sensing image to be segmented may be an image of a predetermined range acquired by an image acquisition device (satellite, drone, etc.), for example, a certain district in a city. The remote sensing image to be segmented here includes an image of a building in a certain area.
[0045] Step S204, inputting the remote sensing image to be segmented into the image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
[0046] Optionally, the above-mentioned image segmentation model is a model obtained by pre-training through machine learning using multiple sets of training data.
[0047] Traditional convolution kernels and deformable convolution kernels extract target information of all scales at the same time, which easily leads to information redundancy and will inevitably cause a lot of computational and storage waste for models with deeper network structures. The training method of introducing a progressive growth mechanism based on the traditional neural network model can achieve the purpose of multi-level feature extraction at different scales. Figure 3 is a structural diagram of the Transformer Block in the image segmentation model according to an embodiment of the invention, such as Figure 3As shown in the figure, by setting four training stages, in the first stage, the low-resolution (64×64) input image passes through a layer of encoding module, bottleneck module and decoding module to obtain the rough segmentation result of the building; in the second stage, the resolution of the input image is increased to (128×128), and a layer of encoding module and a layer of decoding module are added to the model. The parameters obtained from the previous stage training are directly transferred to the corresponding layers in the new model, and a smaller learning rate is set for the trained model parameters, and a larger learning rate is set for the newly added convolutional layer parameters, so that a fine segmentation result of the building with a larger resolution can be obtained; the third and fourth stages are similar, and the image resolution (256×256) and (512×512) and the depth of the model are gradually increased, and finally more and more fine building segmentation contours are obtained.
[0048] Transformer Block Figure 3 As shown in the figure, it is mainly composed of a multi-head attention module with residual connections and normalization layers and a multi-layer perceptron. The multi-head attention module is an important component of Transformer Block and consists of multiple self-attention connections. The self-attention is expressed as: Here Q, K, and V represent Query, Key, and Value, respectively. head is the channel dimension, they have the same dimension (HWxC), two multi-layer perceptrons and a 3×3 depth-separable convolutional layer are used to obtain the Transformer's Positional Encoding position information, which is expressed as follows: F out =MLP(GELU(Conv2D 3×3 (MLP(F in ))))+F in , Fin is the feature map of self-attention, GELU represents the Gaussian Error Linear Unit activation function, F out Represents Positional Encoding position information.
[0049] As can be seen from the above, in an embodiment of the present invention, a remote sensing image to be segmented can be obtained, wherein the remote sensing image to be segmented includes a building image; the remote sensing image to be segmented is input into an image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, and each of the multiple sets of training data includes: a sample remote sensing image, and a sample building segmentation image corresponding to the sample remote sensing image. The predetermined model is a convolutional neural network based on a progressive growth mechanism, which realizes the segmentation processing of the remote sensing image to be segmented using an image segmentation model of a convolutional neural network based on a progressive growth mechanism, so as to adapt to the purpose of segmenting buildings of different sizes and occluded targets, and achieves the technical effect of improving the flexibility of image segmentation of remote sensing images, so that the segmentation of building images is no longer limited to specific remote sensing images, and can adaptively learn rich detail features of targets of different sizes and occluded targets, thereby improving the accuracy of building segmentation.
[0050] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention solves the technical problem that the remote sensing image segmentation method in the related art is only applicable to specific remote sensing images, cannot achieve good segmentation effects for different types of remote sensing images, and has great limitations.
[0051] According to the above embodiment of the present invention, acquiring the remote sensing image to be segmented includes: after receiving an image acquisition instruction, triggering an image acquisition device to acquire an image within a predetermined range to obtain the remote sensing image to be segmented.
[0052] In this embodiment, when city or regional planning is required, an image acquisition device can be used to acquire images of a city or a specific area according to image acquisition requirements, that is, after receiving an image acquisition instruction, the image acquisition red bar can be triggered to acquire images within a predetermined range. It should be noted that the image here can be a multi-frame image.
[0053] Figure 4 is a schematic diagram of an image segmentation model according to an embodiment of the present invention, that is, a Transformer Unet (PGT-Unet) convolutional neural network model based on a progressive growth mechanism, such as Figure 4 As shown, the depth of the model and the scale of the input image are gradually increased. The input of the model is a remote sensing image, and the output is a building segmentation result image.
[0054] Among them, the first stage network of the above network model consists of a down-sampling encoding module and an up-sampling decoding module. The encoding module and the decoding module are connected by a bottleneck module. The second, third and fourth stages gradually increase the depth of the encoding module and the decoding module, respectively, so that the number of up-sampling and down-sampling increases to 2, 3, and 4. The resolution of the input image also starts from a low resolution (64×64) and gradually increases to the second stage (128×128), the third stage (256×256), and the fourth stage (512×512). Finally, the Transformer Unet convolutional neural network structure of the fourth stage is as follows: Figure 3 As shown in the figure. After the model converges in each stage, the parameters are directly transferred to the same convolutional layer in the next stage. In the initial stage of the training process, the model first obtains large-scale structural information and image distribution, and then shifts its attention to more and more precise detail features in the later stage of training. In contrast, traditional convolutional neural networks extract information of all scales at the same time. During the training process, in order to avoid the impact of each model change on the generalization ability of the previous model, we set a smaller learning rate (1e-6) for the trained low-resolution convolutional layer with parameters to be transferred, and a larger learning rate (1e-4) for the newly added convolutional layer, and then start a new round of training.
[0055] According to the above embodiment of the present invention, before the remote sensing image to be segmented is input into the image segmentation model so as to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, the method for segmenting buildings in the remote sensing image may also include: obtaining multiple sets of training data including sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; inputting the multiple sets of training data into the Transformer U-net model, and extracting features of the sample remote sensing images in the multiple sets of training data using the Transformer Unet model to obtain remote sensing image feature information; and performing multi-stage training on the Transformer Unet model using the remote sensing image feature information to obtain an image segmentation model.
[0056] In this embodiment, the data set is a high-resolution remote sensing building segmentation image data set, covering an area of 810km2, and the images cover buildings in five different cities, including Austin, Chicago, Kitsap, Tyro lw, and Vienna. The image resolution is (5000×5000) pixels, and each city has 36 images. The data set has a total of 180 images. Considering that the original image size is too large, all images can be cropped to a (512×512) resolution, and finally 14,400 training samples and 3,600 test samples are obtained. Then, these samples are used to perform multi-stage training on the Transformer Unet model to obtain an image segmentation model.
[0057] According to the above embodiment of the present invention, before inputting multiple groups of training data into the Transformer U-net model, the method for segmenting buildings in the remote sensing image may also include: cropping the sample remote sensing images in the multiple groups of training data to obtain sample remote sensing images of a predetermined resolution; and defogging the sample remote sensing data of the predetermined resolution to obtain a defogged sample remote sensing image.
[0058] In this embodiment, since the original image has the problem of blurred details and color distortion, all data can be subjected to dehazing processing based on bilateral filtering and logarithmic domain MSR enhancement. Figure 5(a) is a schematic diagram of a remote sensing image with an original resolution of (5000×5000) and a building annotation image according to an embodiment of the present invention, and Figure 5(b) is a schematic diagram of a small block of a remote sensing image after cropping for training and testing according to an embodiment of the present invention.
[0059] Through the above method, before using multiple sets of training data for model training, multiple sets of sample data can be preprocessed to improve the efficiency and accuracy of model training.
[0060] In an embodiment of the present invention, the image segmentation model uses a comprehensive loss function that combines Dice loss and cross entropy loss to train and learn the PGT-Unet model. Dice_loss is a set similarity measurement function that represents the deviation between the predicted segmentation result and the labeled building. The formula is as follows: Dice_loss=1-FP+22TTPP+FN, where TP represents the overlapping area between the building segmentation result of the neural network model and the manual annotation result, FP represents the erroneous area of the building segmentation of the neural network model compared with the manual annotation result, FN represents the building area that the neural network model fails to automatically segment compared with the manual annotation result, and Dice_loss represents the above deviation. Therefore, the smaller the value of Dice_loss, the more accurate the segmentation result of the neural network model.
[0061] In addition, the cross entropy loss can evaluate the distance between the two distributions of the neural network model building segmentation results and the manual annotation results. The cross entropy is used to evaluate the difference between the building segmentation probability distribution obtained by the current training and the distribution of the actual manual annotation results. The formula is as follows: Where q is the true value probability, p is the predicted probability, and CE_Loss represents the above differences.
[0062] According to the above embodiment of the present invention, a Transformer Unet model is trained in multiple stages using remote sensing image feature information to obtain an image segmentation model, including: in each of the multiple stages, the resolution of the remote sensing image feature information input to each layer of the network structure of the Transformer Unet model is sequentially increased, wherein the output result of each previous stage in the multiple stages is the input of the adjacent subsequent stage; and the remote sensing image feature information with increased resolution is processed through each layer of the network structure to obtain an image segmentation model.
[0063] In this embodiment, the first stage network of the network model is composed of a down-sampling encoding module and an up-sampling decoding module. The encoding module and the decoding module are connected by a bottleneck module. The depths of the encoding module and the decoding module are gradually increased in the second, third and fourth stages, respectively, so that the number of up-sampling and down-sampling increases to 2, 3 and 4. The resolution of the input image also starts from a low resolution (64×64) and gradually increases to the second stage (128×128), the third stage (256×256), and the fourth stage (512×512). Finally, the Transformer Unet convolutional neural network structure of the fourth stage is as follows: Figure 6 As shown, Figure 6 is a schematic diagram of a Transformer Unet model in the final stage according to an embodiment of the present invention.
[0064] According to the above embodiment of the present invention, after the Transformer Unet model is trained in multiple stages using remote sensing image feature information to obtain an image segmentation model, the method for segmenting buildings in remote sensing images also includes: obtaining multiple groups of test data including sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; testing the image segmentation model using the multiple groups of test data to obtain test results; when the test results indicate that the similarity between the image segmentation result of the image segmentation model and the sample building segmentation images in the multiple groups of test data reaches a predetermined threshold, determining that the image segmentation model training is completed.
[0065] In this embodiment, after the image segmentation model is trained using the above-mentioned multiple sets of training data, the trained image segmentation model can also be tested using multiple sets of test data; when the test result indicates that the similarity between the output result of the trained image segmentation model and the sample building segmentation image reaches a predetermined threshold, it is determined that the training process of the image segmentation model is completed.
[0066] According to the above-mentioned embodiment of the present invention, the remote sensing image to be segmented is input into the image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, including: cropping the remote sensing image to be segmented to obtain the remote sensing image to be segmented with a predetermined resolution; defogging the remote sensing image to be segmented with the predetermined resolution to obtain the defogged remote sensing image to be segmented; and inputting the defogged remote sensing image to be segmented into the image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the defogged remote sensing image to be segmented.
[0067] In this embodiment, before the remote sensing image to be segmented is processed by the image segmentation model, the remote sensing image to be segmented is preprocessed first to improve the accuracy of the processing result of the image segmentation model and the processing efficiency.
[0068] In one example of the present invention, the model can be trained and tested on an NVIDIA TESLA V100 GPU, with a dehazed enhanced remote sensing image with a resolution of (512×512) as the input of the model, and the output is a building segmentation result image, the batch size is 12, and the training epoch is 500. By comparing the automatic segmentation results of the model and the building annotation images, the average intersection over union (IoU) is used to evaluate the segmentation accuracy, and the IoU of the remote sensing image building segmentation is 0.775. Compared with the current models with better segmentation performance in the Inr ia Aer ia l Image Labeling dataset, the average intersection over union (IoU) is also used as the evaluation index. The index results are shown in Table 1. From the experimental results, it can be seen that the IoU value of the method proposed by us is the best, indicating that the image segmentation model here has advantages in the segmentation effect of targets of different sizes and occluded targets. Table 1 shows the comparison of the building segmentation results of the existing methods in the Inr ia Aer ia l Image Labeling dataset:
[0069] Table 1
[0070]
[0071]
[0072] It can be seen from Table 1 above that the segmentation performance of the image segmentation model provided by the embodiment of the present invention is better than other methods.
[0073] In order to verify the superiority of the model, the proposed model can be subjected to an ablation experiment. All models use the same data set and server environment. The ablation experiment results are shown in Table 2. The segmentation result of adding the Transformer module to the Unet structure is 0.76, the segmentation result of adding the progressive growth mechanism to the Unet structure is 0.754, and the segmentation result of PGT-Unet, which introduces the progressive growth mechanism and Transformer at the same time, is 0.775.
[0074] Table 2
[0075] Model IOU Unet+Transformer 0.76 Unet+PG 0.754 PGT-Unet (Our Method) 0.775
[0076] Some test results of the ablation experiment are as follows Figure 7 and Figure 8 As shown, (a) is a cropped remote sensing image with a resolution of (512×512), (b) is the manual annotation result of the corresponding remote sensing image, (c) is the building segmentation result of the integrated Unet and Transformer Block models, (d) is the building segmentation result of the Unet model integrated with the progressive growth mechanism, and (e) is the building segmentation result of the PGT-Unet model integrated with the progressive growth mechanism and the Transformer Block module.
[0077] Figure 7 is a schematic diagram of a segmentation ablation experiment of a PGT-Unet model according to an embodiment of the present invention on target samples of different sizes. Figure 7 As shown, (a) is a cropped remote sensing image with a resolution of (512×512), (b) is the manual annotation result of the corresponding remote sensing image, (c) is the building segmentation result of the integrated Unet and Transformer Block models, (d) is the building segmentation result of the Unet model with an integrated progressive growth mechanism, and (e) is the building segmentation result of the PGT-Unet model with an integrated progressive growth mechanism and Transformer Block module. Here, the first and third rows of remote sensing images are mainly building targets blocked by trees, and the second and fourth rows are local enlargements of the blocked targets in the previous row. The segmentation of blocked targets is relatively difficult. The method provided in the embodiment of the present invention can better learn the contextual feature information of the blocked targets, and has obvious segmentation effect on buildings blocked by trees.
[0078] Figure 8 is a schematic diagram of a segmentation ablation experiment of an optional PGT-Unet model according to an embodiment of the present invention on target samples of different sizes, such as Figure 8As shown, (a) is a cropped remote sensing image with a resolution of (512×512), (b) is the manual annotation result of the corresponding remote sensing image, (c) is the building segmentation result of the integrated Unet and Transformer Block models, (d) is the building segmentation result of the Unet model with an integrated progressive growth mechanism, and (e) is the building segmentation result of the PGT-Unet model with an integrated progressive growth mechanism and TransformerBlock module. Here, the first and second rows of remote sensing images are mainly block buildings. Such irregular block building edge contours are difficult to segment. The method in this paper has a better segmentation effect on irregular block targets. The third and fourth rows of remote sensing images are small target buildings. Small target buildings are easily overlooked, and the target boundaries are difficult to accurately segment. The method provided by the embodiment of the present invention can learn the building detail features of small targets. Through ablation experiments, it can be verified that the PGT-Unet method based on the Transformer Unet convolutional neural network model based on the progressive growth mechanism proposed by us can extract rich target context features, which greatly improves the segmentation effect of partially occluded targets and target buildings of different sizes.
[0079] Through the technical solution provided by the above embodiment of the present invention, the feature information of large-scale coarse structure is first learned at the beginning of training, and more and more fine detail structure information is gradually learned in the subsequent training stage, and the building edge segmentation effect is gradually improved, which can enhance the integrity of the edge segmentation of target buildings of different sizes and occluded target buildings, and has good generalization ability for the building segmentation of the Inria Aeria l Image Labeling data set. It gradually increases the resolution of the input image and the depth of the model in a progressive manner, so that the model first obtains a relatively convergent output result on the image with a smaller scale, and then can focus on learning the feature information of adjacent scales in each stage, and finally obtains the final building segmentation result on the original scale image; at the same time, the TransformerBlock module is introduced in the encoding and decoding stages of the network model for feature extraction and feature fusion, so as to obtain a larger receptive field and a stronger context shaping ability, so as to achieve the purpose of improving the sensitivity and accuracy of the model.
[0080] This method gradually increases the resolution of the input image and the depth of the model, so that the model first obtains a relatively convergent output result on a smaller-scale image, and then focuses on learning the feature information of adjacent scales in each stage, and finally obtains the final building segmentation result on the original-scale image; at the same time, the Transformer Block module is introduced in the encoding and decoding stages of the network model for feature extraction and feature fusion, so as to obtain a larger receptive field and stronger context shaping ability, thereby achieving the purpose of improving the sensitivity and accuracy of the model.
[0081] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0083] According to an embodiment of the present invention, a device for segmenting buildings in a remote sensing image is provided for implementing the above-mentioned method for segmenting buildings in a remote sensing image. Fig. 9 is a schematic diagram of a device for segmenting buildings in a remote sensing image according to an embodiment of the present invention. Fig. 9 As shown, the device comprises: a first acquisition unit 91 and a processing unit 93. The device for segmenting buildings in remote sensing images is described in detail below.
[0084] The first acquisition unit 91 is used to acquire the remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image.
[0085] The processing unit 93 is used to input the remote sensing image to be segmented into the image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
[0086] It should be noted here that the above-mentioned first acquisition unit 91 and processing unit 93 correspond to steps S202 to S204 in the above-mentioned embodiment, and the two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the contents disclosed in the above-mentioned embodiment.
[0087] As can be seen from the above, in the scheme recorded in the above embodiment of the present invention, a first acquisition unit can be used to acquire a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image; and a processing unit is used to input the remote sensing image to be segmented into an image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, and each of the multiple sets of training data includes: a sample remote sensing image, and a sample building segmentation image corresponding to the sample remote sensing image. The predetermined model is a convolutional neural network based on a progressive growth mechanism, which realizes the segmentation processing of the remote sensing image to be segmented using an image segmentation model based on a convolutional neural network based on a progressive growth mechanism, so as to adapt to the purpose of segmenting buildings of different sizes and occluded targets, and achieves the technical effect of improving the flexibility of image segmentation of remote sensing images, so that the segmentation of building images is no longer limited to specific remote sensing images, and can adaptively learn rich detail features of targets of different sizes and occluded targets, thereby improving the accuracy of building segmentation.
[0088] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention solves the technical problem that the remote sensing image segmentation method in the related art is only applicable to specific remote sensing images, cannot achieve good segmentation effects for different types of remote sensing images, and has great limitations.
[0089] Optionally, the first acquisition unit includes: an acquisition module, which is used to trigger the image acquisition device to acquire an image within a predetermined range after receiving an image acquisition instruction, so as to obtain a remote sensing image to be segmented.
[0090] Optionally, the device for segmenting buildings in remote sensing images also includes: a second acquisition unit, used to acquire multiple sets of training data including sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images before inputting the remote sensing images to be segmented into the image segmentation model to perform image segmentation processing on the remote sensing images to be segmented using the image segmentation model; an extraction unit, used to input the multiple sets of training data into the Transformer U-net model, and use the Transformer Unet model to extract features of the sample remote sensing images in the multiple sets of training data to obtain remote sensing image feature information; a training unit, used to perform multi-stage training on the Transformer Unet model using the remote sensing image feature information to obtain an image segmentation model.
[0091] Optionally, the device for segmenting buildings in the remote sensing image also includes: a cropping processing unit, which is used to crop the sample remote sensing images in the multiple sets of training data before inputting the multiple sets of training data into the Transformer U-net model to obtain sample remote sensing images of a predetermined resolution; a defogging processing unit, which is used to defog the sample remote sensing data of the predetermined resolution to obtain the sample remote sensing image after defogging.
[0092] Optionally, the training unit includes: an adding module, which is used to sequentially increase the resolution of the remote sensing image feature information input to each layer of the network structure of the Transformer Unet model in each stage of the multiple stages, wherein the output result of each previous stage in the multiple stages is the input of the adjacent subsequent stage; and a first processing module, which is used to process the remote sensing image feature information after the resolution is increased through each layer of the network structure to obtain an image segmentation model.
[0093] Optionally, the device for segmenting buildings in remote sensing images also includes: a third acquisition unit, used to obtain multiple groups of test data including sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images after performing multi-stage training on the Transformer Unet model using remote sensing image feature information to obtain the image segmentation model; a testing unit, used to test the image segmentation model using the multiple groups of test data to obtain test results; and a determination unit, used to determine that the image segmentation model training is completed when the test result indicates that the similarity between the image segmentation result of the image segmentation model and the sample building segmentation images in the multiple groups of test data reaches a predetermined threshold.
[0094] Optionally, the processing unit includes: a cropping processing module, which is used to crop the remote sensing image to be segmented to obtain a remote sensing image to be segmented with a predetermined resolution; a defogging processing module, which is used to defog the remote sensing image to be segmented with a predetermined resolution to obtain the defogged remote sensing image to be segmented; and a second processing module, which is used to input the defogged remote sensing image to be segmented into an image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the defogged remote sensing image to be segmented.
[0095] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program, wherein the program executes any one of the above methods for segmenting buildings in remote sensing images.
[0096] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0097] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image; inputting the remote sensing image to be segmented into an image segmentation model, so as to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, and each set of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
[0098] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: after receiving an image acquisition instruction, triggering an image acquisition device to acquire an image within a predetermined range to obtain a remote sensing image to be segmented.
[0099] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: before inputting the remote sensing image to be segmented into the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, obtaining multiple sets of training data including sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; inputting the multiple sets of training data into the Transformer U-net model, and using the Transformer Unet model to extract features of the sample remote sensing images in the multiple sets of training data to obtain remote sensing image feature information; and using the remote sensing image feature information to perform multi-stage training on the Transformer Unet model to obtain an image segmentation model.
[0100] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: before inputting multiple sets of training data into the Transformer U-net model, cropping the sample remote sensing images in the multiple sets of training data to obtain sample remote sensing images of a predetermined resolution; and defogging the sample remote sensing data of the predetermined resolution to obtain a defogged sample remote sensing image.
[0101] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: in each of the multiple stages, the resolution of the remote sensing image feature information input to each layer of the network structure of the Transformer Unet model is sequentially increased, wherein the output result of each previous stage in the multiple stages is the input of the adjacent subsequent stage; the remote sensing image feature information with increased resolution is processed through each layer of the network structure to obtain an image segmentation model.
[0102] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after performing multi-stage training on the Transformer Unet model using remote sensing image feature information to obtain an image segmentation model, obtaining multiple sets of test data including sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; testing the image segmentation model using the multiple sets of test data to obtain test results; and determining that the image segmentation model training is completed when the test results indicate that the similarity between the image segmentation result of the image segmentation model and the sample building segmentation images in the multiple sets of test data reaches a predetermined threshold.
[0103] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: cropping the remote sensing image to be segmented to obtain a remote sensing image to be segmented of a predetermined resolution; defogging the remote sensing image to be segmented of the predetermined resolution to obtain a defogged remote sensing image to be segmented; inputting the defogged remote sensing image to be segmented into an image segmentation model, so as to use the image segmentation model to perform image segmentation on the defogged remote sensing image to be segmented.
[0104] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein when the program is run, any one of the above methods for segmenting buildings in a remote sensing image is executed.
[0105] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0106] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0107] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0109] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0111] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for segmenting buildings in remote sensing images, characterized in that: include: Acquire a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image; The remote sensing image to be segmented is input into an image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, so as to obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
2. The method for segmenting buildings in remote sensing images according to claim 1, characterized in that: Obtain the remote sensing image to be segmented, including: After receiving the image acquisition instruction, the image acquisition device is triggered to acquire an image within a predetermined range to obtain the remote sensing image to be segmented.
3. The method for segmenting buildings in remote sensing images according to claim 1, characterized in that: Before inputting the remote sensing image to be segmented into the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented using the image segmentation model, the method further includes: Acquire the plurality of sets of training data including the sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; Inputting the multiple sets of training data into a Transformer U-net model, and using the Transformer U-net model to perform feature extraction on the sample remote sensing images in the multiple sets of training data to obtain remote sensing image feature information; The Transformer Unet model is trained in multiple stages using the remote sensing image feature information to obtain the image segmentation model.
4. The method for segmenting buildings in remote sensing images according to claim 3, characterized in that: Before inputting the plurality of sets of training data into the Transformer U-net model, it also includes: Performing cropping processing on the sample remote sensing images in the multiple sets of training data to obtain the sample remote sensing images of a predetermined resolution; Defogging is performed on the sample remote sensing data of a predetermined resolution to obtain the sample remote sensing image after defogging.
5. The method for segmenting buildings in remote sensing images according to claim 3, characterized in that: The Transformer Unet model is trained in multiple stages using the remote sensing image feature information to obtain the image segmentation model, including: In each of the multiple stages, the resolution of the remote sensing image feature information input to each layer of the network structure of the Transformer Unet model is sequentially increased, wherein the output result of each previous stage in the multiple stages is the input of the adjacent subsequent stage; The feature information of the remote sensing image with increased resolution is processed through each layer of the network structure to obtain the image segmentation model.
6. The method for segmenting buildings in remote sensing images according to claim 3, characterized in that: After the Transformer Unet model is trained in multiple stages using the remote sensing image feature information to obtain the image segmentation model, the method further includes: Acquire multiple groups of test data including the sample remote sensing images and sample building segmentation images corresponding to the sample remote sensing images; Using the multiple groups of test data to test the image segmentation model, and obtain test results; When the test result indicates that the similarity between the image segmentation result of the image segmentation model and the sample building segmentation images in the multiple groups of test data reaches a predetermined threshold, it is determined that the training of the image segmentation model is completed.
7. The method for segmenting buildings in a remote sensing image according to any one of claims 1 to 6, characterized in that: Inputting the remote sensing image to be segmented into an image segmentation model, and using the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, comprising: Performing cropping processing on the remote sensing image to be segmented to obtain the remote sensing image to be segmented with a predetermined resolution; Performing defogging processing on the remote sensing image to be segmented with a predetermined resolution to obtain the remote sensing image to be segmented after defogging processing; The defogging remote sensing image to be segmented is input into the image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the defogging remote sensing image to be segmented.
8. A device for segmenting buildings in remote sensing images, characterized in that: include: A first acquisition unit is used to acquire a remote sensing image to be segmented, wherein the remote sensing image to be segmented includes a building image; A processing unit is used to input the remote sensing image to be segmented into an image segmentation model, so as to use the image segmentation model to perform image segmentation processing on the remote sensing image to be segmented, and obtain a building segmentation image corresponding to the remote sensing image to be segmented, wherein the image segmentation model is a model obtained by training a predetermined model through machine learning using multiple sets of training data, each of the multiple sets of training data includes: a sample remote sensing image, a sample building segmentation image corresponding to the sample remote sensing image, and the predetermined model is a convolutional neural network based on a progressive growth mechanism.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method for segmenting buildings in a remote sensing image according to any one of claims 1 to 7.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the method for segmenting buildings in a remote sensing image as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Convolutional neural network and Transform fused remote sensing image building extraction method
CN116071650A
Remote sensing image semantic segmentation method combining Unet and Transform
CN116091929A
Remote sensing semantic segmentation method based on U-Net3 +
CN117152435A
Semi-supervised classification method, apparatus and device for high-resolution remote sensing image, and medium
WO2023000159A1
Cited By
Abdominal CT image segmentation method based on branch growth neural network architecture search
CN119131064A
Abdominal ct image segmentation method based on branch growing neural network architecture search
CN119131064B
Building vector polygon contour extraction method based on multi-modal large model
CN119888257A
Method and device for determining laying quality of wing protection pad
CN120235816A
