Method, device and equipment for processing linearity of contour of residential area extraction results
By overlaying DSM data, edge feature enhancement and contour constraint processing in the residential area extraction process, the problem of linear processing of edge contours in residential area extraction in the existing technology is solved, the degree of automation and intelligence is improved, and efficient residential area mapping is realized. material extraction.
Patent Information
- Application Number
- CN202010778043.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-05
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-08-05
AI Technical Summary
It is difficult for the existing technology to effectively implement linear processing of edge contours during the residential area extraction process, resulting in a highly cumbersome algorithm and a low degree of automation and intelligence.
By superimposing DSM data in the original image, edge feature enhancement processing and semantic segmentation network feature extraction are performed, combined with the contour constraint loss function, to achieve linear processing of edge contours of residential area extraction results.
It simplifies the process of extracting residential areas, improves the automation and intelligence of the algorithm, makes the edge contours of the extraction results of residential areas more linear, and meets the accuracy requirements of mapping.
Smart Images

Figure CN112070780B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of remote sensing mapping, and in particular to a method, device and equipment for processing the linearity of the contour of a residential area extraction result. Background Art
[0002] 1:50000 topographic map data is one of the most basic geographic information data, playing a fundamental and strategic role in the national economic and national defense construction. With the rapid development of society, users have higher and higher requirements for the timeliness of topographic maps, and the updating of topographic maps has become a primary and urgent task. Since the changes in geomorphic data are generally relatively small, the update of topographic map data is mainly the update of land features. Among the many land features, residential areas are one of the most important elements in topographic maps. At present, remote sensing image feature extraction methods for residential feature mapping are constantly emerging, which can be summarized as segmentation extraction and post-processing. Segmentation extraction belongs to the category of semantic segmentation, and post-processing usually refers to the diagram specifications to regularize and optimize the extracted contours to meet the mapping requirements. However, in order to meet the mapping requirements, the method of processing the mapping results with straight contours according to the diagram specifications while maintaining the accuracy requirements of the closed and irregular contour boundaries of the residential areas increases the complexity of the algorithm and reduces the automation and intelligence of the overall algorithm for extracting residential features. Summary of the invention
[0003] In view of this, the present application proposes a method for processing the linearity of the edge contour of residential areas, which can effectively simplify the linearity processing method of the edge contour of residential areas and improve the automation and intelligence of the overall algorithm for extracting residential features.
[0004] According to one aspect of the present application, a method for processing the linearity of a residential area extraction result contour is provided, comprising:
[0005] Acquire an original image, and superimpose DSM data consistent with the area in the original image onto the original image to obtain an input image;
[0006] Performing edge feature enhancement processing on the input image to obtain a first feature map after edge enhancement, and using a semantic segmentation network to perform feature extraction on the input image to obtain a corresponding second feature map;
[0007] Connecting and combining the first feature map and the second feature map to obtain a corresponding output feature map;
[0008] The output feature map is subjected to contour constraints using a contour constraint loss function, and a residential area extraction result is obtained through the constrained output feature map.
[0009] In a possible implementation, superimposing DSM data consistent with the region in the original image onto the original image includes:
[0010] The DSM data is collected based on the original image, and after normalization processing is performed on the DSM data, the normalized DSM data is superimposed on the original image;
[0011] The resolution of the collected DSM data is consistent with the resolution of the original image.
[0012] In a possible implementation, when edge feature enhancement processing is performed on the input image, a Laplacian operator template is used.
[0013] In a possible implementation, when the first feature map and the second feature map are connected and combined, 1*1 convolution is used for the connection and combination.
[0014] In a possible implementation, when the contour of the output feature map is constrained by using a contour constraint loss function, the contour constraint loss function is a joint loss function in which a directional derivative is added to the loss function of the semantic segmentation network;
[0015] Wherein, the joint loss function is:
[0016]
[0017] is the loss function of the semantic segmentation network, and α and β are both loss weighting coefficients.
[0018] According to another aspect of the present application, there is also provided a device for processing linearity of the contour of a residential area extraction result, comprising a data superposition module, an edge enhancement processing module, a semantic segmentation module, a connection combination module and a contour constraint module;
[0019] The data superposition module is configured to obtain an original image, and superimpose the DSM data consistent with the area in the original image onto the original image to obtain an input image;
[0020] The edge enhancement module is configured to perform edge feature enhancement processing on the input image to obtain a first feature map after edge enhancement;
[0021] The semantic segmentation module is configured to extract features from the input image using a semantic segmentation network to obtain a corresponding second feature map;
[0022] The connection and combination module is configured to connect and combine the first feature map and the second feature map to obtain a corresponding output feature map;
[0023] The contour constraint module is configured to use a contour constraint loss function to perform contour constraints on the output feature map, and obtain a residential area extraction result through the constrained output feature map.
[0024] In a possible implementation, the edge enhancement module includes a Laplacian processing layer, a normalization layer, and a first convolution layer that are cascaded layer by layer;
[0025] The Laplacian processing layer is configured to use a Laplacian operator template to operate on the input image;
[0026] The normalization layer is configured to use ReLu and Tanh activation functions to normalize the input image after the Laplacian operator operation;
[0027] The first convolutional layer is configured to perform feature enhancement on the normalized input feature data and then output the first feature map.
[0028] In a possible implementation, the semantic segmentation network is a Unet network;
[0029] The connection combination module includes a second convolution layer, and the convolution kernel of the second convolution layer is a 1*1 convolution kernel.
[0030] According to one aspect of the present application, a device for processing linearity of a residential area extraction result contour is provided, comprising:
[0031] processor;
[0032] a memory for storing processor-executable instructions;
[0033] Wherein, the processor is configured to implement any of the above-mentioned methods when executing the executable instructions.
[0034] According to another aspect of the present application, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any of the above-mentioned methods is implemented.
[0035] In the method for processing the linearity of the contour of the result of extraction of residential areas in the embodiment of the present application, DSM data overlay processing is added to the input layer, edge feature enhancement processing is added to the feature extraction layer, and contour constraint processing is added to the output layer. Through the above three designs, the linearity processing of the edge contour of the residential area can be achieved in the process of extracting the residential area from the original image. That is, the method for processing the linearity of the contour of the result of extraction of residential areas in the embodiment of the present application performs linearity processing of the area contour in the process of extracting the residential area, so that the contour linearity processing and the extraction of the residential area are carried out simultaneously. When the extraction of the residential area is completed, the linearity processing of the area contour is also achieved, which also achieves the purpose of improving the linearity of the residential area contour end-to-end. Compared with the method of extracting the residential area and then processing the edge contour by post-processing in the related art, the processing method is effectively simplified, making the extraction of the residential area simpler, and at the same time, the automation and intelligence of the overall algorithm for extracting residential objects are effectively improved.
[0036] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the present application and, together with the description, serve to explain the principles of the present application.
[0038] Figure 1 A flowchart showing a method for processing the linearity of the contour of a residential area extraction result according to an embodiment of the present application;
[0039] Figure 2 An example diagram showing DSM data of a certain area collected in the method for processing the linearity of the contour of the residential area extraction result according to an embodiment of the present application;
[0040] Figure 3a An original image of a certain area to be processed in a method for processing linearity of a residential area extraction result contour according to an embodiment of the present application is shown;
[0041] Figure 3b An example diagram showing special labels for mapping in a residential area sample library constructed in a method for processing the linearity of a residential area extraction result contour according to an embodiment of the present application is shown;
[0042] Figure 3c The results of the conventional residential area extraction are shown in Figure 2. Figure 3a The resulting map of residential areas extracted from the original image is shown;
[0043] Figure 3dThe linearity processing method of the residential area extraction result according to an embodiment of the present application is shown. Figure 3a The resulting map of residential areas extracted from the original image is shown;
[0044] Figure 4a An original image of a certain area to be processed in a method for processing linearity of a residential area extraction result contour according to another embodiment of the present application is shown;
[0045] Figure 4b An example diagram showing special labels for mapping in a residential area sample library constructed in a method for processing the linearity of a residential area extraction result contour according to another embodiment of the present application;
[0046] Figure 4c The results of the conventional residential area extraction are shown in Figure 2. Figure 4a The resulting map of residential areas extracted from the original image is shown;
[0047] Figure 4d The linearity processing method of the residential area extraction result according to an embodiment of the present application is shown. Figure 4a The resulting map of residential areas extracted from the original image is shown;
[0048] Figure 5 A structural block diagram showing a device for processing linearity of a residential area extraction result contour according to an embodiment of the present application;
[0049] Figure 6 A structural block diagram of a device for processing linearity of contours of residential area extraction results according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0051] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0052] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0053] Figure 1A flowchart of a method for processing the linearity of the contour of a residential area extraction result according to an embodiment of the present application is shown. Figure 1 As shown, the method includes: step S100, obtaining the original image, superimposing the DSM data consistent with the area in the original image onto the original image, and obtaining an input image. Here, it should be noted that DSM data refers to three-dimensional land feature information used to describe the surface of the earth, including elevation values of land features such as settlements in the area. In the method of the embodiment of the present application, the DSM data is added to the original image as prior information, thereby laying a good data foundation for the subsequent extraction of the settlement area in the original image to be able to straighten the contour of the extracted settlement area.
[0054] Step S200, edge feature enhancement processing is performed on the input image to obtain a first feature map after edge enhancement, and feature extraction is performed on the input image using a semantic segmentation network to obtain a corresponding second feature map. That is, in the method for processing the linearity of the contour of the residential area extraction result of the embodiment of the present application, when the semantic segmentation network is used to extract features from the input image to obtain the residential area in the input image, the edge feature enhancement processing is also performed on the input image to strengthen the edge contour of the extracted residential area.
[0055] Step S300, connect and combine the first feature map and the second feature map to obtain a corresponding output feature map. By combining the input image (i.e., the first feature map) after edge feature enhancement processing with the residential area at the feature extraction point, the edge contour of the extracted residential area is enhanced, so that the edge contour of the residential area in the final output feature map is more obvious and clear.
[0056] Step S400, the contour of the output feature map is constrained by the contour constraint loss function, and the residential area extraction result is obtained through the constrained output feature map. That is, in the obtained output feature map, the edge contour of the residential area in the output feature map is further strengthened and constrained by the contour constraint loss function, so that in the residential area extraction result obtained through the output feature map after the contour constraint, the edge contour of the residential area is more inclined to a straight line segment.
[0057] Therefore, in the linearity processing method of the residential extraction result contour of the embodiment of the present application, by superimposing the corresponding DSM data in the original image as prior information, since the DSM data has significant step characteristics at the edge of the residential area, and the corners are mostly natural right-angle transitions without obvious convex and concave parts, the DSM data is superimposed as prior information and superimposed on the original image, which can effectively improve the linearity of the edge contour of the extracted residential area. At the same time, when the original image (i.e., the input image) superimposed with DSM data is extracted using a semantic segmentation network to obtain the residential area result, the edge feature enhancement processing is also performed on the input image at the same time, and the result after the edge feature enhancement processing is connected and combined with the residential area result extracted by the semantic segmentation network, thereby strengthening the edge features of the extracted residential area. Finally, the contour constraint loss function is used to constrain the contour of the output feature map, so that when the residential extraction result is finally obtained through the output feature map after the contour constraint, the edge contour of the residential area in the obtained residential extraction result tends to be more linear, thereby effectively improving the linearity of the edge contour of the residential area.
[0058] That is to say, in the method for processing the linearity of the contour of the result of extraction of the settlement in the embodiment of the present application, DSM data overlay processing is added to the input layer, edge feature enhancement processing is added to the feature extraction layer, and contour constraint processing is added to the output layer. Through the above three designs, the linearity processing of the edge contour of the settlement area can be achieved in the process of extracting the settlement area from the original image. That is, the method for processing the linearity of the contour of the result of extraction of the settlement in the embodiment of the present application performs linearity processing of the area contour during the extraction of the settlement area, so that the contour linearity processing and the extraction of the settlement area are performed simultaneously. When the extraction of the settlement area is completed, the linearity processing of the area contour is also achieved, which also achieves the purpose of improving the linearity of the settlement area contour end-to-end. Compared with the method of processing the edge contour by post-processing after extracting the settlement area in the related art, the processing method is effectively simplified, making the extraction of the settlement area simpler, and at the same time, the automation and intelligence of the overall algorithm for extracting settlement objects are effectively improved.
[0059] In one possible implementation, when the DSM data is superimposed on the original image, the following method can be used. That is, the DSM data is collected based on the original image, and the DSM data is normalized. Then, the normalized DSM data is superimposed on the original image to obtain the input image.
[0060] Here, it should be noted that in order to ensure the accuracy of the extracted residential area results, the collected DSM data should be the DSM data of the area displayed in the original image. In other words, the collected DSM data is the three-dimensional object information corresponding to the area in the original image. After the corresponding DSM data is sampled based on the original image, when the DSM data is superimposed on the original image as prior information, the DSM data needs to be normalized. Among them, the normalization method of the DSM data can be implemented by the conventional normalization method in the field, which will not be repeated here.
[0061] See also Figure 2 , which is the DSM data of a certain area displayed as a grayscale image after the elevation value is normalized. Among them, in the DSM data after the elevation value is normalized, the grid spacing is 1m, and the pixels with high grayscale values represent that the location has a larger elevation value. It can be seen from the figure that the DSM data has obvious step characteristics at the edge of the residential area, and the corners are mostly natural right-angle transitions without obvious convex and concave areas. Therefore, the DSM data after sampling and normalization is superimposed on the original image as prior information, so that the edge contour of the residential area in the original image (i.e., the input image) superimposed with the DSM data tends to be straight line segmented.
[0062] It should be noted that when collecting the corresponding DSM data with reference to the original image, the resolution of the collected DSM data should be consistent with the resolution of the original image, so that when the DSM data is superimposed on the original image as prior information, the accuracy of the superposition result can be effectively guaranteed.
[0063] In addition, in a possible implementation, when the DSM data is superimposed on the original image, a direct superposition method can be adopted. That is, the DSM data is directly superimposed on the original image as an additional channel layer, so that the original image has an additional channel layer. The direct superposition method effectively simplifies the linearity processing process of the residential area extraction result contour, and reduces the difficulty of the linearity processing of the residential area extraction result contour.
[0064] Furthermore, after the DSM data is superimposed on the original image to obtain the input image, the edge feature enhancement processing can be performed on the input image, and the feature extraction of the input image can be performed using a semantic segmentation network. Among them, in a possible implementation, when the edge feature enhancement processing of the input image is performed, a Laplacian operator template can be used to implement it. When the feature extraction of the input image is performed, a semantic segmentation network can be used to implement it.
[0065] Specifically, edges usually occur at locations where grayscale values are discontinuous, and are generally obtained using the first-order or second-order derivatives of the image grayscale function. Therefore, when the Laplace operator is used to enhance edge features, the Laplace operator is the simplest isotropic differential operator with rotation invariance. The Laplace transform of a two-dimensional image function f(x, y) is an isotropic second-order derivative, defined as:
[0066]
[0067] Expressing this equation in discrete form:
[0068]
[0069] According to formula (2), the Laplacian operator can be expressed in the form of a template, as shown in Table 1. Since the edge in the image is the area where the grayscale jumps, the Laplacian operator template can effectively enhance the edge information.
[0070] Table 1
[0071] 0 1 0 1 -4 1 0 1 0
[0072] Corresponding to the Laplacian operator template designed above, in the process of edge feature enhancement processing of the input image, the Laplacian operator template can be first used to operate the input image, and then the result of the operation can be normalized using the Relu and Than activation functions, and then the normalized input image is enhanced through the convolution layer to output the image result with enhanced edge features.
[0073] Among them, in the above implementation, when the normalized input image is subjected to feature enhancement processing through the convolution layer, the convolution layer can be set as a two-layer cascaded convolution layer, so that the normalized input image is subjected to feature enhancement through two convolution layers in succession. It should be pointed out that two consecutive convolution layers can be the same or different, and the convolution parameters of the convolution layer (such as the size of the convolution kernel, etc.) can be flexibly set according to actual conditions, which will not be described in detail here.
[0074] Furthermore, while edge feature enhancement is performed on the input image, a semantic segmentation network is also used to extract features from the input image. In the method for processing the linearity of the contour of the residential area extraction result of the embodiment of the present application, the semantic segmentation network used can be a conventional neural network in the art, such as a Unet network.
[0075] When the conventional semantic segmentation network in the art is used to extract the features of the input image to obtain the output result of the residential area, it is only necessary to make appropriate adjustments to the network model, and the adjustment method is: adding a DSM data overlay layer to the front-end input layer, adding a network branch of the edge feature enhancement layer, and adding a contour constraint to the loss function of the back-end output side. The adjustment method is simple and easy to implement.
[0076] In addition, after the input image is subjected to edge feature enhancement processing to obtain a first feature map through the above step S200, and the input image is subjected to feature extraction using a semantic segmentation network to obtain a second feature map, the first feature map and the second feature map can be connected and combined. In a possible implementation, a convolution layer can be used to convolve the first feature map and the second feature map. When the first feature map and the second feature map are connected and combined using a convolution layer, the convolution kernel size of the convolution layer used can be: 1*1 convolution kernel.
[0077] In addition, in the method for processing the linearity of the contour of the residential area extraction result in the embodiment of the present application, when the contour of the output feature map is constrained by the contour constraint loss function, the contour constraint loss function is a joint loss function in which a directional derivative is added to the loss function of the semantic segmentation network. Among them, it can be understood by those skilled in the art that the loss function is different for different semantic segmentation networks, and the corresponding joint loss function is also different. That is to say, in the method of the embodiment of the present application, the joint loss function used when constraining the contour of the output feature map is determined based on the semantic segmentation network used.
[0078] For example, considering that directional derivatives or gradients have a good effect in indicating the direction of edges, when adding contour constraints to the loss function of the semantic segmentation network, the directional derivatives can be used to calculate the loss to constrain the contour characteristics when extracting residential areas. Refer to the formula:
[0079]
[0080] In the above formula (3), O∈{0,1} W×H represents the true value label, W×H represents the image size (i.e., the size of the original image), and They represent the directional derivatives of the network inference result image (i.e., the output feature map) in the row direction and column direction respectively, and They respectively represent the directional derivatives of the true value label image (i.e., the sample image used when training the network model of the method for processing the linearity of the contour of the residential area extraction result of the embodiment of the present application) in the row direction and the column direction, and ||*||1 is the 1 norm.
[0081] represents the inconsistency between the two images in terms of directional derivatives. During the training phase, by making the joint loss function Minimum, the optimal model can be obtained, and the joint loss function is shown as follows:
[0082]
[0083] in, is the original loss function of the basic network, α and β are the weighted coefficients of the two types of losses, which can be determined by experiments.
[0084] The above strategy is universal and can be superimposed on the loss function of any basic semantic segmentation network. For example, the semantic segmentation network generally uses cross entropy loss, and the calculation formula is as follows:
[0085]
[0086] Among them, O∈{0,1} W×H represents the true value label, y x Represents the value of the network prediction result Y at position x.
[0087] In addition, it should be pointed out that since the method for processing the linearity of the contour of the settlement extraction result of the embodiment of the present application is implemented based on the semantic segmentation network, the network structure of the semantic segmentation network is adjusted accordingly, so that the adjusted network model is used to process the linearity of the contour of the settlement extraction result. Therefore, the method of the embodiment of the present application also includes a step of training the network model. During the training process, it is necessary to construct a settlement sample library. When constructing the sample library, the pixel-level ground feature labels are mainly obtained manually. In the present application, in order to meet the end-to-end extraction training of settlements with linear contours, the constructed settlement sample library should be a sample library whose label contour has regularized linear characteristics, and the sample library can also be referred to as a special label for mapping. Among them, the method of constructing the settlement sample library can be implemented in a conventional manner in the field, which will not be repeated here.
[0088] In addition, in order to more clearly illustrate the improvement effect of the linearity processing method of the residential area extraction result contour of the embodiment of the present application on the linear segmentation of the extracted residential area contour, see Figure 3a — Figure 3d ,as well as Figure 4a — Figure 4d , respectively Figure 3a and Figure 4a The remote sensing image shown is used as an example for explanation.
[0089] Among them, see Figure 3c and Figure 3dIt can be seen that the linearity processing method of the residential area extraction result of the embodiment of the present application is effective. Figure 3a The contours of the residential areas extracted from the remote sensing image shown are more linear. Figure 4c and Figure 4d It can also be seen intuitively that the linearity processing method of the residential area extraction result of the embodiment of the present application is effective. Figure 4a The outline of the residential area extracted from the remote sensing image shown is more linear than the outline of the residential area extracted using conventional methods.
[0090] Correspondingly, based on any of the above-mentioned methods for processing the linearity of the contour of the residential extraction result, the present application also provides a device for processing the linearity of the contour of the residential extraction result. It should be noted that, according to the above description, the device for processing the linearity of the contour of the residential extraction result of the embodiment of the present application is essentially a network model constructed to realize the linearity processing of the contour of the residential extraction result.
[0091] See also Figure 5 The linearity processing device 100 of the result of the extraction of residential areas in the embodiment of the present application includes a data superposition module 110, an edge enhancement processing module 120, a semantic segmentation module 130, a connection and combination module 140 and a contour constraint module 150. The data superposition module 110 is configured to obtain an original image, and superimpose the DSM data consistent with the area in the original image onto the original image to obtain an input image; the edge enhancement module is configured to perform edge feature enhancement processing on the input image to obtain a first feature map after edge enhancement; the semantic segmentation module 130 is configured to extract features from the input image using a semantic segmentation network to obtain a corresponding second feature map; the connection and combination module 140 is configured to connect and combine the first feature map and the second feature map to obtain a corresponding output feature map; the contour constraint module 150 is configured to constrain the contour of the output feature map using a contour constraint loss function, and obtain the result of the extraction of residential areas through the constrained output feature map.
[0092] Furthermore, the edge enhancement module includes a Laplace processing layer, a normalization layer and a first convolution layer that are cascaded layer by layer. Among them, the Laplace processing layer is configured to use the Laplace operator template to operate on the input image; the normalization layer is configured to use the Relu and Than activation functions to normalize the input image after the Laplace operator operation; the first convolution layer is configured to output the first feature map after feature enhancement of the input feature data after the normalization process. Here, it should be pointed out that the first convolution layer can be two consecutive convolution layers. In addition, the convolution parameters of the two convolution layers can be the same or different, and are not specifically limited here.
[0093] The semantic segmentation network may be a Unet network. The connection combination module 140 includes a second convolution layer, and the convolution kernel of the second convolution layer is a 1*1 convolution kernel.
[0094] In addition, according to the foregoing description, since the linearity processing device for the contour of the residential extraction result of the embodiment of the present application is a self-designed network model, when the linearity processing device for the contour of the residential extraction result of the embodiment of the present application is used to extract the residential area from the received remote sensing image, it is necessary to train the high network model. Specifically, the training process can be achieved by:
[0095] First, a sample database of residential areas is constructed, using special labels for residential mapping. Then, the network model is trained based on the constructed sample database of residential areas:
[0096] (1) Read in the original image, the DSM data of the corresponding region, and the label image; then, (2) refer to the original image, sample and normalize the DSM data, and superimpose it on the original image, so that the original image adds a channel layer to obtain the original input data; then, (3) the original input data passes through the conventional semantic segmentation network A and the edge feature enhancement layer respectively, and the outputs of the two are connected and combined using 1×1 convolution to obtain the output feature map; then, (4) the loss function with the added contour constraint is used to calculate the loss between the output feature map and the label image; then, (5) the calculated loss is used for back propagation.
[0097] By repeating steps (1)-(5) until the network converges, the model training of the linearity processing device for the contour of the residential area extraction result of the embodiment of the present application can be completed.
[0098] It should be noted that although Figure 1 and Figure 5 The above-mentioned method and device for processing the linearity of the contour of the residential area extraction result are introduced as an example, but those skilled in the art will understand that the present application should not be limited thereto. In fact, the user can flexibly set the structure and parameters of each network layer in the device according to personal preferences and / or actual application scenarios, as long as the three processes of DSM data overlay, edge feature enhancement and contour constraint can be added to the network model.
[0099] Furthermore, according to another aspect of the present application, a device 200 for processing linearity of a residential area extraction result contour is also provided. Figure 6 The linearity processing device 200 for processing the linearity of the contour of the residential area extraction result of the embodiment of the present application includes a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned linearity processing methods for processing the linearity of the contour of the residential area extraction result when executing the executable instructions.
[0100] Here, it should be noted that the number of processors 210 may be one or more, and they may be GPUs. Meanwhile, in the linearity processing device 200 for the contour of the residential area extraction result of the embodiment of the present application, an input device 230 and an output device 240 may also be included. The processor 210, the memory 220, the input device 230 and the output device 240 may be connected via a bus or in other ways, which are not specifically limited here.
[0101] The memory 220 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the method for processing the linearity of the contour of the residential area extraction result of the embodiment of the present application. The processor 210 executes various functional applications and data processing of the device 200 for processing the linearity of the contour of the residential area extraction result by running the software programs or modules stored in the memory 220.
[0102] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include display devices such as display screens.
[0103] According to another aspect of the present application, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, any of the above-mentioned methods for processing the linearity of the contour of the residential extraction result is implemented.
[0104] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for processing the linearity of the contour of residential area extraction results, characterized in that: include: Acquire an original image, and superimpose DSM data consistent with the area in the original image onto the original image to obtain an input image; Performing edge feature enhancement processing on the input image to obtain a first feature map after edge enhancement, and using a semantic segmentation network to perform feature extraction on the input image to obtain a corresponding second feature map; Connecting and combining the first feature map and the second feature map to obtain a corresponding output feature map; Performing contour constraints on the output feature map using a contour constraint loss function, and obtaining a residential area extraction result through the constrained output feature map; Wherein, when the first feature map and the second feature map are connected and combined, 1*1 convolution is used for the connection and combination; When edge feature enhancement processing is performed on the input image, a Laplacian operator template is used, including: Using a Laplacian operator template to operate on the input image; The normalization layer is configured to use ReLu and Tanh activation functions to normalize the input image after the Laplacian operator operation; A convolutional layer, configured to perform feature enhancement on the normalized input feature data and output the first feature map; Considering that the directional derivative or gradient indicates the direction of the edge, when adding the contour constraint to the loss function of the semantic segmentation network, the directional derivative is used to calculate the loss to constrain the contour characteristics when extracting the residential area; refer to the formula: In the above formula (3), O∈{0,1} W×H represents the true value label, W×H represents the image size, and They represent the directional derivatives of the network inference result image in the row direction and column direction respectively, and Then they represent the directional derivatives of the true value label image in the row direction and column direction respectively, and ||*||1 is the 1 norm; Represents the inconsistency between the two images in terms of directional derivatives; during the training phase, by making the joint loss function Minimize, get the optimal model, the joint loss function is as follows: in, is the original loss function of the basic network, α and β are the weighted coefficients of the two types of losses determined by experiments; Superimposed on the loss function of any basic semantic segmentation network, the calculation formula is as follows: Among them, O∈{0,1} W×H represents the true value label, y x Represents the value of the network prediction result Y at position x.
2. The method according to claim 1, characterized in that Overlaying DSM data consistent with the area in the original image onto the original image, comprising: The DSM data is collected based on the original image, and after normalization processing is performed on the DSM data, the normalized DSM data is superimposed on the original image; The resolution of the collected DSM data is consistent with the resolution of the original image.
3. A device for processing the linearity of the contour of residential area extraction results, characterized in that: It includes data overlay module, edge enhancement processing module, semantic segmentation module, connection combination module and contour constraint module; The data superposition module is configured to obtain an original image, and superimpose the DSM data consistent with the area in the original image onto the original image to obtain an input image; The edge enhancement processing module is configured to perform edge feature enhancement processing on the input image to obtain a first feature map after edge enhancement; The semantic segmentation module is configured to extract features from the input image using a semantic segmentation network to obtain a corresponding second feature map; The connection and combination module is configured to connect and combine the first feature map and the second feature map to obtain a corresponding output feature map; The contour constraint module is configured to constrain the contour of the output feature map using a contour constraint loss function, and obtain a residential area extraction result through the constrained output feature map; The edge enhancement processing module includes a Laplacian processing layer, a normalization layer and a convolution layer which are cascaded layer by layer; The Laplacian processing layer is configured to use a Laplacian operator template to operate on the input image; The normalization layer is configured to use ReLu and Tanh activation functions to normalize the input image after the Laplacian operator operation; The convolution layer is configured to perform feature enhancement on the normalized input feature data and then output the first feature map; Wherein, when the first feature map and the second feature map are connected and combined, 1*1 convolution is used for the connection and combination; Considering that the directional derivative or gradient indicates the direction of the edge, when adding the contour constraint to the loss function of the semantic segmentation network, the directional derivative is used to calculate the loss to constrain the contour characteristics when extracting the residential area; refer to the formula: In the above formula (3), O∈{0,1} W×H represents the true value label, W×H represents the image size, and They represent the directional derivatives of the network inference result image in the row direction and column direction respectively, and Then they represent the directional derivatives of the true value label image in the row direction and column direction respectively, and ||*||1 is the 1 norm; Represents the inconsistency between the two images in terms of directional derivatives; during the training phase, by making the joint loss function The optimal model is obtained by minimizing the loss function. The joint loss function is as follows: in, is the original loss function of the basic network, α and β are the weighted coefficients of the two types of losses determined by experiments; Superimposed on the loss function of any basic semantic segmentation network, the calculation formula is as follows: Among them, O∈{0,1} W×H represents the true value label, y x Represents the value of the network prediction result Y at position x.
4. A device for processing the linearity of the contour of residential area extraction results, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 2 when executing the executable instructions.
5. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 2 is implemented.
