Cross-domain extraction method and equipment of buildings in remote sensing images based on OSM

By using OSM data and building edge and corner information in remote sensing images to construct a loss function and update the building mask, the problem of low mask accuracy in cross-domain extraction of buildings in remote sensing images is solved, and high-precision buildings are achieved. Object mask extraction.

CN117315285BActive Publication Date: 2024-10-11CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311383587.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2024-10-11
Estimated Expiration
2043-10-24

AI Technical Summary

Technical Problem

In the cross-domain extraction of buildings from remote sensing images using existing technology, the accuracy of building masks is low, making it difficult to fully utilize the characteristics of the building objects in the task area data, and requiring high-integrity crowd-source data to participate in the construction of the data set. Resulting in poor quality cross-domain building extraction.

Method used

By obtaining the OSM data of the target area, converting it into an information intensity map, combining the building edge and corner information of the target area and the source domain, constructing an edge loss function and a corner loss function, updating the initial building mask, and obtaining the final building Mask to improve mask accuracy.

Benefits of technology

It improves the accuracy and precision of building masks, makes full use of OSM data for initial mask extraction guidance, provides real and effective data, and ensures the high accuracy of the final mask.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117315285B_ABST
    Figure CN117315285B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of remote sensing image detection, and provides a method and device for cross-domain extraction of remote sensing image buildings based on OSM. The cross-domain extraction method for remote sensing image buildings includes: obtaining OSM data existing in the target area; converting each OSM data into an information intensity map; extracting the initial building mask of each building in the target area based on the images of all buildings in the target area and all information intensity maps; obtaining the true building edge of each source domain building in the source domain, and constructing an edge loss function with the true edges of all buildings as spatial guidance information; obtaining the number of building corner points in the target area, and constructing a corner loss function based on the number of building corner points; using the edge loss function and the corner loss function to update each initial building mask, and obtain the final building mask of each building in the target area. The method of the present application can effectively improve the accuracy of the building mask.
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 detection, and in particular to a method and device for cross-domain extraction of remote sensing image buildings based on OSM. Background Art

[0002] In the application of building extraction from remote sensing images, deep learning methods use large-scale data sets to train neural network weights and automatically learn high-level features, which can better realize the analysis and understanding of complex scenes and have powerful feature expression and computing capabilities. Network structures such as Fully Convolutional Networks (FCN), U-shaped segmentation network (Unet), and semantic segmentation deep network (SegNet) can achieve the goal of high-precision extraction of objects in remote sensing images. However, deep learning methods have obvious data- and region-oriented characteristics, and ideal prediction results cannot be separated from large-scale training data. Since remote sensing image annotation is time-consuming and costly, it is particularly important to develop algorithms that can migrate labeled source domain models to unlabeled target area models. At present, domain adaptation methods are the mainstream methods to solve the above model migration problems. For example, the automatic model (AdaptNet) that reduces the distribution difference between the source domain and the target area results through adversarial learning in the output space is a milestone. Based on the recurrent generative adversarial network and adversarial learning, a joint domain adaptation network at the pixel level and representation level is proposed. The image distribution of the source domain is transferred to the image distribution of the target region, reducing the appearance difference at the image level and converting the training image into a data sample for the target network to overcome the performance degradation caused by the domain gap. These unsupervised domain adaptation methods mainly use the idea of ​​adversarial learning, do not require labeled data in the target region, and improve the performance of cross-domain target recognition. However, these mainstream methods focus on aligning the data distribution characteristics of the source domain and the target region, and pay less attention to building scenes and building features, making it difficult to fully utilize the inherent characteristics of building objects in the task area data.

[0003] In addition, many scholars have found that crowdsource geographic data provides a new solution to land use problems in terms of spatial guidance and sample expansion, and it can also provide effective spatial reference information for buildings. For example, data is obtained through the public street map (OSM, Open Street Map) instead of manually collecting samples, and buildings are successfully extracted using OSM. In the case of complete lack or limited real labels, urban datasets are constructed using crowdsource building information such as OSM to complete change detection tasks. However, the above methods often require high-complete crowdsource data to participate in dataset construction, and different datasets need to be constructed for different regions. The datasets corresponding to the regions are used as samples, lacking real information guidance, and the quality of building masks extracted from cross-domain buildings is poor. Therefore, there is a problem of low accuracy of building masks. Summary of the invention

[0004] The present application provides a method and device for cross-domain extraction of buildings from remote sensing images based on OSM, which can solve the problem of low accuracy of building masks.

[0005] In a first aspect, an embodiment of the present application provides a method for extracting buildings from remote sensing images based on OSM, and the method for extracting buildings from remote sensing images includes:

[0006] Obtain OSM data of buildings in the target area; the OSM data corresponds to the buildings in the target area one by one;

[0007] Convert each OSM data into an information intensity map; the information intensity map is used to describe the confidence level of the existence of the building corresponding to the OSM data;

[0008] Extracting an initial building mask for each building in the target area based on the images of all buildings in the target area and all information intensity maps;

[0009] Obtain the true building edge of each source domain building in the source domain, and construct an edge loss function with all the true building edges as spatial guidance information; the source domain is the area with the true building mask;

[0010] Obtain the number of building corner points in the target area, and construct a corner point loss function based on the number of building corner points;

[0011] Each initial building mask is updated using the edge loss function and the corner loss function to obtain the final building mask for each building in the target area.

[0012] Optionally, convert each OSM data into an information intensity map, including:

[0013] For each OSM data, determine the maximum inscribed circle of the OSM data;

[0014] Convert OSM data into information intensity maps based on the maximum inscribed circle.

[0015] Optionally, convert OSM data into information intensity maps based on the maximum inscribed circle, including:

[0016] By formula:

[0017]

[0018] Calculate the prior information confidence strength Q(x) of the i-th pixel in the maximum inscribed circle i );

[0019] Among them, x irepresents the distance from the i-th pixel in the maximum inscribed circle to the center of the circle, i=1,2,...,I, I represents the total number of pixels in the maximum inscribed circle, a represents the radius of the largest inscribed circle, σ represents the variance in the Gaussian function, and A represents the extension coefficient;

[0020] The prior information confidence strength of all pixels within the maximum inscribed circle is integrated into the same map to obtain the information intensity map corresponding to the OSM data.

[0021] Optionally, based on the images of all buildings in the target area and all information intensity maps, an initial building mask for each building in the target area is extracted, including:

[0022] For each information intensity map, the information intensity map is superimposed with the image of the building corresponding to the information intensity map to obtain a building information image;

[0023] Integrate all building information images and images of all other buildings in the target area that do not have corresponding OSM data into the same image to obtain the final building information image of the target area;

[0024] The segmentation network is used to perform mask extraction on the final building information image to obtain the initial building mask of each building in the target area.

[0025] Optionally, obtain the real building edge of each source domain building in the source domain, including:

[0026] For each source domain building, obtain the true building mask of the source domain building;

[0027] The real building mask is expanded outward by n pixels to obtain the expansion edge, and is eroded inward by n pixels to obtain the erosion edge;

[0028] The difference between the expansion edge and the erosion edge is calculated, and the difference is used as the true building edge of the source domain building.

[0029] Optionally, an edge loss function is constructed using the true edges of all buildings as spatial guidance information, including:

[0030] Using the segmentation network to extract each source domain building in the source domain, and obtain the building mask of each source domain building;

[0031] An edge loss function is constructed based on the building masks of all source domain buildings and the true edges of all buildings in the source domain. The edge loss function is:

[0032]

[0033] in, represents the edge loss function value, y represents the building edge in the building mask of all source domain buildings in the source domain obtained using the segmentation network, Represents the true building edges of all source domain buildings in the source domain.

[0034] Optionally, the corner loss function is:

[0035]

[0036] Among them, L corner Represents the corner loss function value, Sum inter Represents the number of initial building corner points in all initial building masks in the target area, Sum all represents the number of building corner points in the target area, and Sum inter <Sum all .

[0037] Optionally, each initial building mask is updated using an edge loss function and a corner loss function to obtain a final building mask for each building in the target area, including:

[0038] Determine whether the edge loss function value reaches the edge loss function preset value;

[0039] If so, determining whether the corner loss function value reaches the preset value of the corner loss function, if the corner loss function value reaches the preset value of the corner loss function, taking each initial building mask as the final building mask of the building corresponding to the initial building mask, if the corner loss function value does not reach the preset value of the edge loss function, changing the parameters in the segmentation network, and returning to the step of using the segmentation network to extract the mask of the final building information image to obtain the initial building mask of each building in the target area;

[0040] Otherwise, change the parameters in the segmentation network and return to the step of using the segmentation network to extract the mask of the final building information image to obtain the initial building mask of each building in the target area.

[0041] In a second aspect, an embodiment of the present application provides a cross-domain extraction device for remote sensing image buildings based on OSM, comprising:

[0042] An acquisition module is used to acquire OSM data existing in the target area; the OSM data corresponds to the buildings in the target area one by one;

[0043] The conversion module converts each OSM data into an information intensity map; the information intensity map is used to describe the confidence of the existence of the building corresponding to the OSM data;

[0044] an extraction module for extracting an initial building mask for each building in the target area based on the images of all buildings in the target area and all information intensity maps;

[0045] The first construction module is used to obtain the real building edge of each source domain building in the source domain, and construct an edge loss function with all the real building edges as spatial guidance information; the source domain is the area with the real building mask;

[0046] The second construction module is used to obtain the number of building corner points in the target area and construct a corner point loss function based on the number of building corner points;

[0047] The update module updates each initial building mask using the edge loss function and the corner loss function to obtain the final building mask for each building in the target area.

[0048] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned OSM-based remote sensing image cross-domain building extraction method when executing the above-mentioned computer program.

[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned OSM-based remote sensing image cross-domain building extraction method.

[0050] The above solution of the present application has the following beneficial effects:

[0051] In an embodiment of the present application, OSM data existing in the target area is obtained, and then each OSM data is converted into an information intensity map, and then the initial building mask of each building in the target area is extracted based on the images of all buildings in the target area and all information intensity maps, and then the real building edge of each source domain building in the source domain is obtained, and the edge loss function is constructed with the real edges of all buildings as spatial guidance information, and then the number of building corner points in the target area is obtained, and the corner loss function is constructed based on the number of building corner points, and finally each initial building mask is updated using the edge loss function and the corner loss function to obtain the final building mask of each building in the target area. Among them, the initial building mask is extracted based on the information intensity map, and the OSM data can be fully utilized to guide the extraction of the initial building mask, thereby improving the accuracy of the initial building mask, and the source domain can provide real and effective data, and the real edge of the building in the source domain replaces the sample set of the target area as a spatial guide, so that a high-precision final building mask can be obtained, which effectively improves the accuracy of the building mask.

[0052] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 A flowchart of a method for extracting buildings from remote sensing images based on OSM according to an embodiment of the present application;

[0055] Figure 2 A schematic diagram of converting OSM data provided by an embodiment of the present application into an information intensity map;

[0056] Figure 3 A schematic diagram of a segmented network structure provided in an embodiment of the present application;

[0057] Figure 4 A specific flowchart of updating the initial building mask provided in one embodiment of the present application;

[0058] Figure 5 A schematic diagram of a building mask provided in an embodiment of the present application;

[0059] Figure 6 A schematic diagram of the structure of a cross-domain building extraction device based on OSM remote sensing images provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0061] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0062] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0063] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0064] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0065] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0066] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0067] In view of the problem of low accuracy of existing building masks, an embodiment of the present application provides a cross-domain extraction method for remote sensing image buildings based on OSM. The cross-domain extraction method for remote sensing image buildings obtains OSM data existing in the target area, then converts each OSM data into an information intensity map, and then extracts the initial building mask of each building in the target area based on the images of all buildings in the target area and all information intensity maps, and then obtains the real building edge of each source domain building in the source domain, and constructs an edge loss function with the real edges of all buildings as spatial guidance information, and then obtains the number of building corner points in the target area, and constructs a corner loss function based on the number of building corner points, and finally uses the edge loss function and the corner loss function to update each initial building mask to obtain the final building mask of each building in the target area. Among them, the initial building mask is extracted based on the information intensity map, and the OSM data can be fully utilized to guide the extraction of the initial building mask, thereby improving the accuracy of the initial building mask, and the source domain can provide real and effective data, and the real edge of the building in the source domain replaces the sample set of the target area as a spatial guide, so that the final building mask with high accuracy can be obtained, which effectively improves the accuracy of the building mask.

[0068] Next, an exemplary description is given of the cross-domain extraction method of buildings from remote sensing images based on OSM provided in this application.

[0069] like Figure 1 As shown, the cross-domain extraction method of remote sensing images of buildings based on OSM provided in this application includes the following steps:

[0070] Step 11, obtaining the OSM data existing in the target area.

[0071] The target area is an area with building images but no building masks, and masks of the buildings in the area need to be extracted. The OSM data corresponds to the buildings in the target area one by one.

[0072] Exemplarily, the OSM data in the target area may be obtained through channels such as the OSM official website.

[0073] It should be noted that OSM data mainly relies on volunteer annotation, and quality problems such as attribute errors, position offset, and low completeness are inevitable. In remote sensing images, similar objects often show similar image features, while different types of objects will show certain feature differences. Therefore, after obtaining all OSM data of the target area, it is necessary to perform anomaly detection on all OSM data, eliminate abnormal OSM data, and ensure that the OSM data of all buildings are correct data.

[0074] In some embodiments of the present application, by selecting four texture features including third-order color moment, second-order angular moment, contrast, correlation and inverse difference moment, two building-related indices including Morphological Building Index (MBI) and Morphological Shadow Index (MSI), and greenness, a total of 10-dimensional features are used to express the characteristics of the ground objects in the image, and the isolation forest algorithm is used as an anomaly detection model to measure the degree of abnormality of the image object, thereby discovering abnormal building OSM data.

[0075] It is worth mentioning that obtaining OSM data of buildings and eliminating abnormal OSM data can provide correct OSM data for calculations in subsequent steps and reduce errors.

[0076] Step 12: Convert each OSM data into an information intensity map.

[0077] The above information intensity map is used to describe the confidence level of the existence of buildings corresponding to OSM data.

[0078] Specifically, for each OSM data, the maximum inscribed circle of the OSM data is determined, and then the OSM data is converted into an information intensity map based on the maximum inscribed circle.

[0079] In some embodiments of the present application, the above-mentioned conversion of OSM data into an information intensity map based on the maximum inscribed circle is specifically as follows:

[0080] The first step is through the formula:

[0081]

[0082] Calculate the prior information confidence strength Q(x) of the i-th pixel in the maximum inscribed circle i );

[0083] Among them, x i represents the distance from the i-th pixel in the maximum inscribed circle to the center of the circle, i=1,2,...,I, I represents the total number of pixels in the maximum inscribed circle, a represents the radius of the largest inscribed circle, σ represents the variance in the Gaussian function, and A represents the extension coefficient;

[0084] The prior information confidence strength of all pixels within the maximum inscribed circle is integrated into the same map to obtain the information intensity map corresponding to the OSM data.

[0085] It should be noted that the above-mentioned maximum inscribed circle is the largest circle that can be tangent to the OSM data inside the OSM data. Therefore, the maximum inscribed circle is located at the center of the corresponding OSM data. The specific expression of the above-mentioned prior information confidence strength is grayscale. The role of the above-mentioned extension coefficient is to expand the value range of the prior information confidence strength to the pixel grayscale range of [0, 255]. The center of the above-mentioned maximum inscribed circle is the focus of attention of the spatial guidance information. The closer the pixel on the maximum inscribed circle is to the center of the maximum inscribed circle, the higher the prior information confidence strength of the pixel, the lower the grayscale value, and the whiter the color.

[0086] For example, the maximum inscribed circle of OSM data can be determined by using computer software for data processing such as Matlab, and the OSM data can be converted into an information intensity map.

[0087] It is worth mentioning that converting OSM data into an information intensity map for describing confidence can effectively represent the location of buildings corresponding to the OSM data and the confidence of their existence. Using the information intensity map for subsequent calculations can reduce the errors caused by the offset of OSM data.

[0088] The above steps are illustrated below with reference to a specific example.

[0089] like Figure 2 As shown in the figure, the polygon is the OSM data corresponding to the building, the circle in the polygon is the maximum inscribed circle, the curve is the prior information confidence strength curve obtained after calculation, and the horizontal axis represents the distance between the pixel in the maximum inscribed circle and the center of the maximum inscribed circle, with the center of the circle as 0. Figure 2 In the figure, r represents the radius of the largest inscribed circle (i.e., a in the above text represents the radius of the largest inscribed circle), the vertical axis represents the value of the prior information confidence strength, the dotted circle is the edge of the information strength diagram, the straight line with an arrow represents the direction in which the value of the prior information confidence strength increases, and the direction of the arrow indicates the direction of strength. The visual representation of the information strength diagram is a gradient circle that changes from black to white from the edge to the center of the circle.

[0090] Step 13: extracting an initial building mask of each building in the target area based on the images of all buildings in the target area and all information intensity maps.

[0091] Specifically, for each information intensity map, the information intensity map is superimposed with the image of the building corresponding to the information intensity map to obtain the building information image, and then all the building information images and the images of all other buildings in the target area for which there is no corresponding OSM data are integrated into the same map to obtain the final building information image of the target area. Finally, the segmentation network is used to extract the mask of the final building information image to obtain the initial building mask of each building in the target area.

[0092] In some embodiments of the present application, the above-mentioned segmentation network is a Unet network that introduces a spatial attention mechanism and a channel attention mechanism.

[0093] It should be noted that the image format of the input of the segmentation network is usually H×W×3, where W represents the width of the image, H represents the height of the image, and 3 means that the image is generally composed of three bands of RGB. In this application, the information intensity map is superimposed on the image of the building and then input into the segmentation network, that is, the image format of the segmentation network input of this application is H×W×4.

[0094] Exemplarily, after the above-mentioned building information image is input into the segmentation network, it undergoes four convolutions and downsampling to obtain feature representations of four different sizes, which are layered from large to small according to the size of the feature representation. Except for the last layer, all other layers are processed with spatial attention and channel attention to obtain the corresponding deep features, and the deep features and the final feature representation of the next layer are convolved and upsampled before being input into the previous layer, and convolved together with the deep features of the previous layer to obtain the final feature representation. The feature representation of the last layer is output to the penultimate layer after convolution and upsampling, and the final feature representation of the first layer is output to the extraction layer. The extraction layer is the building information features obtained by convolution of the building information image. The building information features are processed with spatial attention and channel attention to obtain the deep features of the building information. The deep features of the building information are convolved together with the final features of the first layer to obtain the building mask.

[0095] It is worth mentioning that extracting the initial building mask based on the information intensity map can make full use of OSM data to guide the extraction of the initial building mask, thereby improving the accuracy of the initial building mask. In addition, by introducing spatial attention and channel attention, the segmentation network can adaptively integrate global contextual information and multi-channel building features, enhance the effective features of buildings and suppress invalid features, and improve the network's segmentation performance and the degree of attention to buildings in the target area.

[0096] The above segmentation network is exemplarily described below with reference to a specific example.

[0097] like Figure 3As shown in the figure, after the OSM data is converted into an information intensity map, it is superimposed with the target area image (i.e., the image of all buildings in the target area mentioned above) and then subjected to four convolution operations and downsampling. The layer of the building mask extracted is the extraction layer, and the lower layers of the extraction layer are the first to fourth layers in sequence. In the figure, A represents the attention module, and the input of the attention module is the shallow features of the corresponding layer after convolution. The shallow features are passed through the encoder to obtain the encoder-level features, and then the first features are obtained through the spatial attention processing. At the same time, the shallow features are passed through the decoder to obtain the decoder-level features to obtain the second features. The first and second features are concatenated and the deep features are obtained by using the channel attention. The deep features corresponding to the extraction layer are convolved to obtain the building mask.

[0098] Step 14, obtain the true building edge of each source domain building in the source domain, and construct the edge loss function with all the true building edges as spatial guidance information.

[0099] The above source domain is the area with real building masks.

[0100] Specifically, the first step is to obtain the real building edge of each source domain building in the source domain.

[0101] For each source domain building, the real building mask of the source domain building is obtained, and then the real building mask is expanded outward by n pixels to obtain the expanded edge, and is eroded inward by n pixels to obtain the eroded edge. Finally, the difference between the expanded edge and the eroded edge is calculated, and the difference is used as the real building edge of the source domain building.

[0102] In the second step, the edge loss function is constructed using the true edges of all buildings as spatial guidance information.

[0103] The segmentation network is used to extract each source domain building in the source domain to obtain the building mask of each source domain building. Then, an edge loss function is constructed based on the building masks of all source domain buildings in the source domain and the true edges of all buildings. The edge loss function is:

[0104]

[0105] in, represents the edge loss function value, y represents the building edge in the building mask of all source domain buildings in the source domain obtained using the segmentation network, Represents the true building edges of all source domain buildings in the source domain.

[0106] For example, the real building masks of the source domain may be processed by computer software such as Geographic Information System (GIS) to obtain the real building edges of the source domain buildings.

[0107] It should be noted that, while using the segmentation network to perform mask extraction on the target area, the segmentation network is also used to perform mask extraction on the image of the source domain building in the source domain to obtain the building mask of the source domain building. An edge loss function is constructed based on the building edge in the building mask of the source domain building and the real building edge of the source domain building. The edge loss function is used to evaluate the effect of the segmentation network in extracting the building edge, thereby reflecting the effect of the building edge in the initial building mask obtained by the segmentation network to extract the target area.

[0108] It is worth mentioning that the real edge of the building can be obtained by calculating the difference between the dilation edge and the erosion edge, which can improve the accuracy of the real edge of the building. At the same time, the source domain can provide real and effective data. The real edge of the building in the source domain replaces the sample set of the target area as spatial guidance information, which can evaluate the performance of the segmentation network and then evaluate the accuracy of the initial building mask of the target area. The information reflected by the constructed edge loss function is highly credible.

[0109] Step 15, obtaining the number of building corner points in the target area, and constructing a corner point loss function based on the number of building corner points.

[0110] Specifically, the above corner loss function is:

[0111]

[0112] Among them, L corner Represents the corner loss function value, Sum inter Represents the number of initial building corner points in all initial building masks in the target area, Sum all represents the number of building corner points in the target area, and Sum inter <Sum all .

[0113] It should be noted that the above number of building corner points is the total number of building corner points of all buildings in the target area, and the total number of building corner points is obtained by obtaining all corner points in the target area and eliminating non-building corner points.

[0114] Exemplarily, the building index is a combination of building characteristics in high-resolution images and morphological operator properties. Compared with the original image, it can reflect the building intensity information in the image more specifically. The Harris algorithm can be used to extract corner points on the building index intensity map of the target area. During the extraction process, some regular artificial structures such as vehicles and greenery are misidentified as buildings, which will reduce the proportion of building corner points in the corner point extraction results. The feature that building corner points are distributed in long straight edge lines is used to screen out all building corner points in the target area and eliminate non-building corner points.

[0115] It is worth mentioning that by constructing the corner loss function, the comprehensiveness and accuracy of the corner points in the building mask of the initial target area can be described.

[0116] Step 16, using the edge loss function and the corner loss function to update each initial building mask to obtain the final building mask of each building in the target area.

[0117] Specifically, determine whether the edge loss function value reaches a preset value of the edge loss function;

[0118] If so, determining whether the corner loss function value reaches the preset value of the corner loss function, if the corner loss function value reaches the preset value of the corner loss function, taking each initial building mask as the final building mask of the building corresponding to the initial building mask, if the corner loss function value does not reach the preset value of the edge loss function, changing the parameters in the segmentation network, and returning to the step of using the segmentation network to extract the mask of the final building information image to obtain the initial building mask of each building in the target area;

[0119] Otherwise, change the parameters in the segmentation network and return to the step of using the segmentation network to extract the mask of the final building information image to obtain the initial building mask of each building in the target area.

[0120] Exemplarily, if the edge loss function value is 2, the edge loss function preset value is 2.5, and the edge loss function value does not reach the edge loss function preset value, it means that the mask extraction effect of the segmentation network at this time does not reach the expected effect, and the initial building mask does not reach the expected accuracy. Then, the parameters in the segmentation network are changed, and the building mask is re-extracted to obtain the initial building mask, and the edge loss function value at this time is calculated. If the edge loss function value reaches the edge loss function preset value at this time, it is determined whether the corner loss function value reaches the corner loss function preset value. If the corner loss function value reaches the corner loss function preset value, the initial building mask at this time is used as the final building mask of the corresponding building. If the corner loss function value does not reach the corner loss function preset value, it means that the initial building mask still does not reach the expected accuracy at this time, and it is necessary to adjust the parameters in the segmentation network for re-extraction. That is, only when the edge loss function value and the corner loss function value reach the preset value at the same time, the accuracy of the initial building mask reaches the preset accuracy and is the final building mask.

[0121] It is worth mentioning that by using two loss functions to evaluate and update the accuracy of the initial building mask, a final building mask with high precision can be obtained, which effectively improves the accuracy of the building mask.

[0122] The above steps are illustrated below with reference to a specific example.

[0123] like Figure 4 As shown in the figure, the source domain and the target area are simultaneously input into the segmentation network to obtain the source domain building mask (i.e., the building mask of all source domain buildings in the source domain mentioned above) and the initial building mask of the target area. The edge loss function is constructed by using the source domain building edge in the source domain building mask and the true edge of the source domain building (i.e., the true building edge of all source domain buildings mentioned above). At the same time, the corner loss function is constructed by using the initial building mask of the target area and the number of corner points in the target area. The source domain building mask and the true source domain building mask are compared to obtain the segmentation loss of the source domain (i.e., the loss between the source domain building mask obtained by the segmentation network and the true source domain building mask). The source domain building mask and the initial building mask are input into the discriminator. The discriminator determines whether the parameters in the segmentation network need to be updated based on the edge loss function and the corner loss function.

[0124] The following is an illustrative example of the cross-domain building extraction method based on OSM remote sensing images provided in this application.

[0125] The French National Institute for Information and Automation Aerial Image Label Dataset (IAILD, Institut nationalde recherche en informatique et en automatique Image Label datasets) is a remote sensing image dataset designed for urban building detection. The pixel spatial resolution is 0.3 meters, including 180 training images with a spatial resolution of 5000×5000 and corresponding pixel-level labeled images.

[0126] The Aerial Image Segmentation Dataset (AISD) covers different areas of cities such as Berlin, Chicago, Paris and Zurich. The images come from aerial remote sensing images of Google Maps, and the corresponding label data comes entirely from the pixel-level label information of OpenStreetMap buildings, roads and backgrounds.

[0127] The experiment uses the IAILD dataset as the source domain dataset and the AISD dataset as the target area dataset. The experimental results include the direct prediction of the source domain pre-trained segmentation network in the target area, the prediction results of the UNet network (AU_AdaptNet) combined with the attention mechanism and the AdaptNet adversarial training mechanism combined with the shape loss (i.e., the edge loss and corner loss mentioned above), the prediction results of AU_AdaptNet combined with the shape loss and OSM data when there is a certain amount of OSM data in the target area, and the results of independent training and prediction in the target area data. Among them, considering that the coverage rate of the OSM dataset of buildings in the target area cannot be determined under actual conditions, and the OSM labels of the experimental target area dataset are basically completely covered, the training process of the experiment extracts 50% of the building objects in the source domain labels as OSM-like data, and extracts 0 to 50% of the building objects in the target area labels.

[0128] The final prediction result is Figure 5 As shown in the figure, (a) is the remote sensing images of the three target areas (i.e., the images of all the buildings in the target areas mentioned above), (b) is the OSM data corresponding to the three target areas respectively, (c) is the extraction result of AU_AdaptNet, (d) is the extraction result of AU_AdaptNet combined with shape loss, (e) is the extraction result of AU_AdaptNet combined with shape loss and OSM data, and (f) is the extraction result of the cross-domain extraction method of remote sensing images of buildings based on OSM in this application.

[0129] The accuracy evaluation is shown in Table 1.

[0130]

[0131] Table 1

[0132] Among them, F1 represents a performance metric that comprehensively considers the recall rate and accuracy of building extraction, and the intersection over union (IoU) is a standard performance metric for object category segmentation problems. The above two evaluation criteria are commonly used indicators for semantic segmentation and object extraction tasks. Shape represents shape loss, Source only represents the building mask of the target area where the segmentation network is not conducive to direct acquisition of OSM data, and Full Surpervised represents the cross-domain extraction method of remote sensing images based on OSM in this application.

[0133] It can be seen from this that the cross-domain building extraction method based on OSM remote sensing images provided in this application can use OSM data and source domain as spatial guidance information without constructing a sample set of the target area, thereby greatly improving the accuracy of the building mask.

[0134] The following is an exemplary description of the cross-domain extraction device for remote sensing images of buildings based on OSM provided in this application.

[0135] like Figure 6 As shown, the embodiment of the present application provides a cross-domain extraction device for remote sensing image buildings based on OSM, and the cross-domain extraction device 600 for remote sensing image buildings based on OSM includes:

[0136] An acquisition module 601 is used to acquire OSM data existing in a target area; the OSM data corresponds to buildings in the target area one by one;

[0137] The conversion module 602 converts each OSM data into an information intensity map; the information intensity map is used to describe the confidence of the existence of the building corresponding to the OSM data;

[0138] An extraction module 603 is used to extract an initial building mask of each building in the target area based on the images of all buildings in the target area and all information intensity maps;

[0139] The first construction module 604 is used to obtain the real building edge of each source domain building in the source domain, and construct an edge loss function with all the real building edges as spatial guidance information; the source domain is a region with a real building mask;

[0140] The second construction module 605 is used to obtain the number of building corner points in the target area and construct a corner point loss function based on the number of building corner points;

[0141] The updating module 606 updates each initial building mask using the edge loss function and the corner loss function to obtain a final building mask for each building in the target area.

[0142] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0143] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0144] like Figure 7 As shown, an embodiment of the present application provides a terminal device. The terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 7 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above-mentioned method embodiments when executing the computer program D102.

[0145] Specifically, when the processor D100 executes the computer program D102, the OSM data existing in the target area is obtained, and then each OSM data is converted into an information intensity map, and then the initial building mask of each building in the target area is extracted based on the images of all buildings in the target area and all information intensity maps, and then the real building edge of each source domain building in the source domain is obtained, and the edge loss function is constructed with the real edges of all buildings as spatial guidance information, and then the number of building corner points in the target area is obtained, and the corner loss function is constructed based on the number of building corner points, and finally each initial building mask is updated using the edge loss function and the corner loss function to obtain the final building mask of each building in the target area. Among them, the initial building mask is extracted based on the information intensity map, and the OSM data can be fully utilized to guide the extraction of the initial building mask, thereby improving the accuracy of the initial building mask, and the source domain can provide real and effective data, and the real edge of the building in the source domain is used to replace the sample set of the target area as a spatial guide, so that the final building mask with high accuracy can be obtained, and the accuracy of the building mask can be effectively improved.

[0146] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0147] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.

[0148] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0149] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0150] 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the remote sensing image building cross-domain extraction method device / terminal device based on OSM, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0151] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0153] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A cross-domain extraction method for buildings in remote sensing images based on OSM, characterized in that: include: Get the OSM data existing in the target area; The OSM data corresponds one-to-one to the buildings in the target area; Convert each of the OSM data into an information intensity map; the information intensity map is used to describe the confidence of the existence of the building corresponding to the OSM data; Extracting an initial building mask for each building in the target area based on images of all buildings in the target area and all information intensity maps; Obtaining the real building edge of each source domain building in the source domain, and constructing an edge loss function with all the real building edges as spatial guidance information; the source domain is a region with a real building mask; Obtaining the number of building corner points in the target area, and constructing a corner point loss function based on the number of building corner points; Using the edge loss function and the corner loss function to update each of the initial building masks, to obtain a final building mask for each of the buildings in the target area; The step of converting each of the OSM data into an information intensity map comprises: For each of the OSM data, determine the maximum inscribed circle of the OSM data; Converting the OSM data into an information intensity map based on the maximum inscribed circle; The step of constructing an edge loss function using the real edges of all the buildings as spatial guidance information includes: Extracting each source domain building in the source domain by using a segmentation network to obtain a building mask of each source domain building; The edge loss function is constructed based on the building masks of all source domain buildings in the source domain and the real edges of all the buildings. The edge loss function is: in, represents the edge loss function value, y represents the building edge in the building mask of all source domain buildings in the source domain obtained by using the segmentation network, Representing the real building edges of all source domain buildings in the source domain; The corner point loss function is: Among them, L corner Represents the corner loss function value, Sum inter represents the number of initial building corner points in all initial building masks in the target area, Sum all represents the number of building corner points in the target area, and Sum inter <Sum all .

2. The cross-domain building extraction method based on OSM remote sensing images according to claim 1 is characterized in that: The converting the OSM data into an information intensity map based on the maximum inscribed circle comprises: By formula: Calculate the prior information confidence strength Q(x) of the i-th pixel in the maximum inscribed circle i ); Among them, x i represents the distance from the i-th pixel in the maximum inscribed circle to the center of the circle, i=1,2,...,I, I represents the total number of pixels in the maximum inscribed circle, a represents the radius of the largest inscribed circle, σ represents the variance in the Gaussian function, and A represents the extension coefficient; The prior information confidence strengths of all pixels within the maximum inscribed circle are integrated into the same map to obtain an information strength map corresponding to the OSM data.

3. The cross-domain building extraction method based on OSM remote sensing images according to claim 1 is characterized in that: The extracting an initial building mask of each building in the target area based on the images of all buildings in the target area and all information intensity maps comprises: For each information intensity map, superimpose the information intensity map with an image of a building corresponding to the information intensity map to obtain a building information image; Integrate all building information images and images of all other buildings in the target area for which no corresponding OSM data exists into the same image to obtain a final building information image of the target area; The final building information image is subjected to mask extraction using a segmentation network to obtain an initial building mask for each building in the target area.

4. The cross-domain building extraction method based on OSM remote sensing images according to claim 1 is characterized in that: The obtaining of the real building edge of each source domain building in the source domain comprises: For each of the source domain buildings, respectively, obtain a real building mask of the source domain building; The real building mask is expanded outward by n pixels to obtain an expanded edge, and is corroded inward by n pixels to obtain an eroded edge; The difference between the expansion edge and the erosion edge is calculated, and the difference is used as the real building edge of the source domain building.

5. The cross-domain building extraction method based on OSM remote sensing images according to claim 1 is characterized in that: The step of updating each of the initial building masks by using the edge loss function and the corner loss function to obtain a final building mask for each of the buildings in the target area comprises: Determine whether the edge loss function value reaches the edge loss function preset value; If so, determining whether the corner loss function value reaches the preset value of the corner loss function, if the corner loss function value reaches the preset value of the corner loss function, taking each of the initial building masks as the final building mask of the building corresponding to the initial building mask, if the corner loss function value does not reach the preset value of the edge loss function, changing the parameters in the segmentation network, and returning to the step of using the segmentation network to extract the mask from the final building information image to obtain the initial building mask of each building in the target area; Otherwise, the parameters in the segmentation network are changed, and the process returns to the step of using the segmentation network to perform mask extraction on the final building information image to obtain an initial building mask for each building in the target area.

6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the cross-domain extraction method of remote sensing images of buildings based on OSM is implemented as described in any one of claims 1 to 5.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cross-domain extraction method of buildings from remote sensing images based on OSM is implemented.