Method for evaluating urban space boundary recognition accuracy, medium and program product

Through confusion matrix analysis and graph matching index evaluation of urban spatial boundaries, the problem of high cost and low efficiency of traditional manual methods is solved, and the accuracy evaluation and model optimization of urban spatial boundary recognition are achieved.

CN120409949APending Publication Date: 2025-08-01SOUTHEAST UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510562270.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Traditional urban space boundary analysis relies on high cost and low efficiency of manual methods, and the existing technology based on machine learning lacks effective accuracy evaluation methods.

Method used

The overall and local accuracy of urban spatial boundaries is evaluated through confusion matrix analysis and graph matching indexes (intersection ratio, Housedorf distance, turn function distance), and local optimization is performed using the analytical model.

Benefits of technology

The accuracy evaluation of urban spatial boundary recognition is achieved, the optimization effect and accuracy of the analytical model is improved, the shortcomings of single indicator evaluation are made up for, and a comprehensive evaluation system is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409949A_ABST
    Figure CN120409949A_ABST
Patent Text Reader

Abstract

The invention discloses a method for evaluating urban space boundary recognition accuracy, a medium and a program product. The method comprises the steps of obtaining a coordinate point set created based on a research area range; obtaining a reference set and a prediction set; a preset evaluation step is repeatedly executed, an overall analysis accuracy evaluation result is obtained, and the evaluation step comprises the steps that the intersection-to-union ratio is calculated based on the reference set and the prediction set, and then the matching relation of polygons in the reference set and the prediction set is judged; for the uniquely matched polygon pair, calculating a Hausdorff distance and a turning function distance; the number of the polygon under the non-unique matching condition and the number of the polygon under the unique matching condition with the intersection-to-union ratio smaller than a set threshold value are fed back to the analytical model, so that the analytical model is locally optimized; and respectively marking polygons in the reference set and the prediction set in the coordinate point set to obtain a first list and a second list, and carrying out confusion matrix analysis to obtain an overall analysis accuracy evaluation result. According to the invention, overall and local evaluation can be carried out on urban space boundary analysis accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the cross - technical field of urban design and computer vision, and particularly relates to a method, a medium and a program product for evaluating the recognition accuracy of urban spatial boundaries. Background Art

[0002] Urban space refers to the space within a city composed of natural environment and social activities, including all areas for residents' daily life and social activities. Urban space not only includes buildings and infrastructure, but also public places such as streets, parks, and squares. These spaces can accommodate different social functions, such as residence, work, leisure, transportation, and cultural exchange. The characteristics of urban space are its diversity and functionality, and different regions carry different social activities. For example, residential areas, commercial areas, cultural areas, industrial areas, etc., all exist in different forms and functions. Urban public spaces such as parks and squares are open and public, and anyone can enter and use them.

[0003] Traditional analysis of urban spatial boundaries relies on subjective judgment by artificial methods, which has problems of high cost and low efficiency. Therefore, in the prior art, analysis models based on artificial intelligence technologies and algorithms such as machine learning are proposed to achieve automated and fine - grained analysis of urban spatial boundaries, facilitating urban planning and urban public management. And the development of the analysis model necessarily generates the need for evaluating the analysis accuracy. Therefore, there is an urgent need to provide a method, a medium and a program product for evaluating the recognition accuracy of urban spatial boundaries. Summary of the Invention

[0004] In view of the above problems, the present invention proposes a method, a medium and a program product for evaluating the recognition accuracy of urban spatial boundaries, and conducts overall and local evaluations on the accuracy of urban spatial boundary analysis through confusion matrix analysis and three graphic matching degree indicators (Intersection over Union, Hausdorff distance, and turning function distance).

[0005] In order to achieve the above technical objectives and reach the above technical effects, the present invention is realized through the following technical solutions:

[0006] In the first aspect, the present invention provides a method for evaluating the recognition accuracy of urban spatial boundaries, including:

[0007] Obtaining a coordinate point set created based on the research area range;

[0008] Obtaining a reference set and a prediction set, where the reference set includes a number of polygons corresponding to each urban space manually labeled, and the prediction set includes a number of polygons corresponding to each urban space predicted by an analysis model;

[0009] Repeatedly execute the preset evaluation steps to obtain the overall parsing accuracy evaluation result, and the evaluation steps include:

[0010] Calculate the intersection over union based on the reference set and the prediction set, and then determine the matching relationship of the polygons in the reference set and the prediction set;

[0011] For the uniquely matched polygon pairs, calculate the Hausdorff distance and the turning function distance;

[0012] Feed back the numbers of the polygons in the case of non-unique matching and the numbers of the polygons in the case of unique matching with an intersection over union less than the set threshold to the parsing model so that the parsing model performs local optimization;

[0013] Mark the polygons in the reference set and the prediction set in the coordinate point set respectively to obtain a first list and a second list, and perform confusion matrix analysis to obtain the overall parsing accuracy evaluation result.

[0014] Combined with the first aspect, optionally, the method for generating the coordinate point set includes:

[0015] Taking the circumscribed rectangle of the research area boundary as the range, setting a fixed step size, generating an equidistant node graph structure, and screening out the points belonging to the inside of the research area boundary to form a coordinate point set; several urban spaces are included in the research area.

[0016] Combined with the first aspect, optionally, the methods for generating the first list and the second list are the same, and both include:

[0017] Unify the coordinate systems of the coordinate point set, the reference set, and the prediction set;

[0018] Add a field ID to each point in the coordinate point set, and the initial value of the field ID is 0, indicating that it does not belong to the urban space under study;

[0019] For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the reference set. If so, assign its ID as 1, indicating that the point belongs to the urban space under study, and output the ID order of each point in the coordinate point set to obtain the first list;

[0020] For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the prediction set. If so, assign its ID as 1, indicating that the point belongs to the urban space under study, and output the ID order of each point in the coordinate point set to obtain the second list.

[0021] Combined with the first aspect, optionally, the method for obtaining the overall parsing accuracy evaluation result includes:

[0022] Create a confusion matrix based on the first list and the second list;

[0023] Analyze the confusion matrix to obtain an overall parsing accuracy evaluation result, where the overall parsing accuracy evaluation result is the F1-Score.

[0024] In combination with the first aspect, optionally, for the uniquely matched polygon pairs, calculate the Hausdorff distance and the turning function distance, specifically including:

[0025] Discretize the boundaries of the uniquely matched polygon pairs to obtain the original boundary point set;

[0026] In combination with the coordinate point set, convert the original boundary point set into the internal point set of the urban space indicated by the polygon pairs;

[0027] Based on the internal point set, calculate the Hausdorff distance;

[0028] Convert the data structure of the original boundary point set to generate a new boundary point set;

[0029] Based on the new boundary point set, calculate the turning function distance.

[0030] In combination with the first aspect, optionally, the calculation formula for the Hausdorff distance is:

[0031] ;

[0032] Where:

[0033] ;

[0034] ;

[0035] In the formula, and respectively represent the two internal point sets corresponding to the two polygons in the polygon pair, represents the internal point set and the internal point set The Hausdorff distance between them, represents the directed Hausdorff distance from the internal point set to the internal point set The directed Hausdorff distance, represents the directed Hausdorff distance from the internal point set to the internal point set The directed Hausdorff distance, represents taking the maximum value, represents taking the minimum value, and respectively represent the points in the internal point set and the internal point set in.

[0036] In combination with the first aspect, optionally, the calculation method of the turning function distance includes:

[0037] For the new boundary point set, calculate the turning angle between adjacent vectors. The calculation formula for the turning angle is:

[0038] ;

[0039] Where:

[0040] ;

[0041] In the formula, is the vector in the new boundary point set pointing from the th point to the th point, is the vector in the new boundary point set pointing from the th point to the th point, is the th point in the new boundary point set, is the th point in the new boundary point set; is the angle between the vector and , calculated by the vector angle formula. The vector angle formula is:

[0042] ;

[0043] Based on the turning angles between adjacent vectors, obtain a sequence of turning angles;

[0044] If the lengths of the turning angle sequences corresponding to the reference set and the prediction set are different, fill the shorter turning angle sequence with 0 to make the lengths of the two turning angle sequences the same;

[0045] Use the Euclidean distance to calculate the difference between the two turning angle sequences, that is, the turning function distance. The calculation formula for the turning function distance is:

[0046] ;

[0047] Where, and are the two sequences of turning angles respectively, represents the 2-norm of the vector, and are the th turning angles in the two sequences of turning angles, is the length of the filled turning angle sequence.

[0048] In combination with the first aspect, optionally, during the local optimization process of the parsing model, the net optimization number and the optimization rate are used to evaluate the optimization effect;

[0049] The net optimization number is the sum of the optimization numbers of all polygons in the reference set; the optimization rate = net optimization number / total number of polygons in the reference set;

[0050] For each polygon in the reference set, there are four cases for the two parsing results before and after the optimization of the parsing model:

[0051] Case 1: If it is a non-unique match before optimization and a unique match after optimization, it is considered that the optimization effect of the parsing model is improved, and the optimization number is +1;

[0052] Case 2: If it is a unique match before optimization and a non-unique match after optimization, it is considered that the optimization effect of the parsing model has declined, and the optimization number is -1;

[0053] Case 3: If it is a non-unique match both before and after optimization, it is considered that the optimization effect of the parsing model remains unchanged, and the optimization number is 0;

[0054] Case 4: If it is a unique match both before and after optimization, if the value of the intersection over union increases, the optimization number is +1; if the value of the intersection over union decreases, the optimization number is -1; if the value of the intersection over union remains unchanged, the optimization number is 0; if the value of the Hausdorff distance decreases, the optimization number is +1; if the value of the Hausdorff distance increases, the optimization number is -1; if the value of the Hausdorff distance remains unchanged, the optimization number is 0; if the value of the turning function distance decreases, the optimization number is +1; if the value of the turning function distance increases, the optimization number is -1; if the value of the turning function distance remains unchanged, the optimization number is 0.

[0055] In the second aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method for evaluating the accuracy of urban spatial boundary recognition described in any item of the first aspect.

[0056] In the third aspect, the present invention provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, it implements the method for evaluating the accuracy of urban spatial boundary recognition described in any item of the first aspect.

[0057] Compared with the prior art, the beneficial effects of the present invention are:

[0058] The present invention proposes a method, medium and program product for evaluating the accuracy of urban spatial boundary recognition, and comprehensively and locally evaluates the accuracy of urban spatial boundary parsing through confusion matrix analysis and three graphic matching degree indexes (intersection over union, Hausdorff distance and turning function distance).

[0059] In existing research, the Intersection over Union (IOU) metric is mainly used to evaluate the overlap degree of two graphics. In the present invention, in addition to using the IOU metric to evaluate the overlap degree of polygon pairs, the IOU metric is also cleverly used to achieve the matching of polygons in the reference set and the prediction set. After polygon matching, the Hausdorff Distance (HD) metric and the Turning Function Distance (TFD) metric can be calculated for the uniquely matched polygon pairs. For polygons in the case of non-unique matching and uniquely matched polygons with an IOU lower than the set threshold, their numbers are fed back to the parsing model to indicate the local areas with poor parsing effects, which can make the optimization of the model more directional.

[0060] In the present invention, the HD and TFD metrics are introduced to evaluate the optimization effect of the parsing model. Specifically, the HD and TFD metrics respectively evaluate the maximum deviation degree and shape similarity of polygon pairs. For each pair of uniquely matched polygons, the above metrics can be calculated, and the optimization effect of each local area can be evaluated through the change of the metric values before and after optimization, which is represented by the optimization number. By calculating the net optimization number obtained from the optimization numbers of all polygons in the reference set, the optimization effect of the parsing model can be evaluated.

[0061] In the present invention, an equidistant node graph structure is also proposed to assist the evaluation process. Specifically, an equidistant node graph structure - a coordinate point set created on the research area is introduced, which has two main functions. One is to serve as an equidistant point set on the research area for marking the reference set and the recognition set, so as to generate an ID list and create a confusion matrix as an input parameter; the other is to assist in converting the boundary point set of the polygon into an internal point set for calculating the HD metric of the matching polygon pairs. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings, where:

[0063] Figure 1 is a schematic flowchart of a method for evaluating the accuracy of urban spatial boundary recognition according to an embodiment of the present invention;

[0064] Figure 2 is a partial schematic diagram of a coordinate point set according to an embodiment of the present invention;

[0065] Figure 3 is the basic information of a confusion matrix according to an embodiment of the present invention;

[0066] Figure 4 is the overall statistical information according to an embodiment of the present invention;

[0067] Figure 5Classification statistical information of an embodiment of the present invention;

[0068] Figure 6 Confusion matrix diagram of an embodiment of the present invention;

[0069] Figure 7 Row-normalized confusion matrix diagram of an embodiment of the present invention;

[0070] Figure 8 Column-normalized confusion matrix diagram of an embodiment of the present invention;

[0071] Figure 9 Schematic diagram of partial polygon matching results of an embodiment of the present invention;

[0072] Figure 10 Schematic diagram of partial unique matching polygon pairs of an embodiment of the present invention;

[0073] Figure 11 Schematic diagram of the turning function distance of matching polygon pairs of an embodiment of the present invention;

[0074] Figure 12 Schematic diagram of the Hausdorff distance of matching polygon pairs of an embodiment of the present invention;

[0075] Figure 13 Schematic diagram of optimized classification statistical information of an embodiment of the present invention;

[0076] [[ID=�5]] Figure 14 Local optimization effect test diagram of an embodiment of the present invention;

[0077] Figure 15 Local parsing effect display diagram of an embodiment of the present invention. Detailed implementation manners

[0078] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0079] In addition, if the descriptions such as "first" and "second" are involved in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be construed as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between the various embodiments may be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0080] Embodiment 1

[0081] An embodiment of the present invention provides a method for evaluating the accuracy of urban spatial boundary recognition, including the following steps:

[0082] (1) Obtain a set of coordinate points created based on the research area range; several urban spaces are included in the research area;

[0083] (2) Obtain a reference set and a prediction set, where the reference set includes several polygons corresponding to each urban space manually marked, and the prediction set includes several polygons corresponding to each urban space predicted by an analysis model;

[0084] (3) Repeatedly execute a preset evaluation step to obtain an overall analysis accuracy evaluation result, and the evaluation step includes:

[0085] (3.1) Calculate the intersection over union based on the reference set and the prediction set, and then determine the matching relationship of the polygons in the reference set and the prediction set;

[0086] (3.2) For the uniquely matched polygon pairs, calculate the Hausdorff distance and the turning function distance;

[0087] (3.3) Feed back the numbers of the polygons in the case of non-uniquely matched and the numbers of the polygons in the case of uniquely matched with an intersection over union less than the set threshold to the analysis model, so that the analysis model performs local optimization;

[0088] (3.4) Mark the polygons in the reference set and the prediction set in the coordinate point set respectively to obtain a first list and a second list, and perform a confusion matrix analysis to obtain an overall analysis accuracy evaluation result.

[0089] In a specific implementation manner of the embodiment of the present invention, the method for generating the coordinate point set includes:

[0090] Taking the circumscribed rectangle of the research area boundary as the range, setting a fixed step size, generating an equidistant node graph structure, and screening out the points belonging to the inside of the research area boundary to form a coordinate point set. In the specific implementation process, the step size can be set according to actual needs, and no specific limitation is made in the present invention.

[0091] In a specific implementation manner of the embodiment of the present invention, the generation methods of the first list and the second list are the same, and both include:

[0092] Unifying the coordinate systems of the coordinate point set, the reference set, and the prediction set to eliminate offset errors;

[0093] Adding a field ID to each point in the coordinate point set, and the initial value of the field ID is 0, indicating that it does not belong to the studied urban space;

[0094] For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the reference set. If so, assign its ID to 1, indicating that the point belongs to the studied urban space, and output the IDs of each point in the coordinate point set in order to obtain the first list;

[0095] For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the prediction set. If so, assign its ID to 1, indicating that the point belongs to the studied urban space, and output the IDs of each point in the coordinate point set in order to obtain the second list.

[0096] In a specific implementation manner of the embodiment of the present invention, the method for obtaining the overall parsing accuracy evaluation result includes:

[0097] Creating a confusion matrix based on the first list and the second list;

[0098] Analyzing the confusion matrix to obtain the overall parsing accuracy evaluation result, and the overall parsing accuracy evaluation result is F1-Score.

[0099] In a specific implementation manner of the embodiment of the present invention, calculating the Hausdorff distance and the turning function distance for the uniquely matched polygon pair specifically includes:

[0100] Discretizing the boundaries of the uniquely matched polygon pair to obtain the original boundary point set;

[0101] Combining the coordinate point set, converting the original boundary point set into an internal point set of the urban space indicated by the polygon pair;

[0102] Calculating the Hausdorff distance based on the internal point set;

[0103] Converting the data structure of the original boundary point set to generate a new boundary point set;

[0104] Based on the new boundary point set, the turning function distance is calculated.

[0105] In a specific implementation manner of the embodiment of the present invention, the calculation formula of the Hausdorff distance is:

[0106] ;

[0107] Where:

[0108] ;

[0109] ;

[0110] In the formula, and respectively represent two internal point sets corresponding to two polygons in a polygon pair, represents the internal point set and the internal point set is the Hausdorff distance between them, represents the directed Hausdorff distance from the internal point set to the internal point set ; represents the directed Hausdorff distance from the internal point set to the internal point set ; represents taking the maximum value, represents taking the minimum value, , respectively represent points in the internal point set and the internal point set .

[0111] In a specific implementation manner of the embodiment of the present invention, the calculation method of the turning function distance includes:

[0112] For the new boundary point set, calculate the turning angle between adjacent vectors. The calculation formula of the turning angle is:

[0113] ;

[0114] Where:

[0115] ;

[0116] In the formula, is the vector from the -th point to the -th point in the new boundary point set, is the vector from the -th point to the -th point in the new boundary point set, is the th point in the new boundary point set, is the th point in the new boundary point set; is the included angle between the vector and , calculated by the vector included angle formula, and the vector included angle formula is:

[0117] ;

[0118] Based on the turning angles between adjacent vectors, a turning angle sequence is obtained;

[0119] If the lengths of the turning angle sequences corresponding to the reference set and the prediction set are different, the shorter turning angle sequence is padded with 0s to make the lengths of the two turning angle sequences the same;

[0120] The Euclidean distance is used to calculate the difference between the two turning angle sequences, that is, the turning function distance, and the calculation formula of the turning function distance is:

[0121] ;

[0122] Among them, and are the two turning angle sequences respectively, represents the 2-norm of the vector, and are the th turning angles in the two turning angle sequences, is the length of the padded turning angle sequence.

[0123] In a specific implementation manner of the embodiment of the present invention, during the local optimization process of the parsing model, the net optimization number and the optimization rate are used to evaluate the optimization effect; the net optimization number is the sum of the optimization numbers of all polygons in the reference set; the optimization rate = net optimization number / the total number of polygons in the reference set;

[0124] For each polygon in the reference set, there are four cases for the two parsing results before and after the parsing model optimization:

[0125] Case 1: If it is a non-unique match before optimization and a unique match after optimization, it is considered that the optimization effect of the parsing model is improved, and the optimization number is +1;

[0126] Case 2: If it is a unique match before optimization and a non-unique match after optimization, it is considered that the optimization effect of the parsing model has decreased, and the optimization number is -1;

[0127] Case 3: If it is a non-unique match both before and after optimization, it is considered that the optimization effect of the parsing model remains unchanged, and the optimization number is 0;

[0128] Case 4: Both before and after optimization are unique matches. If the value of the intersection over union increases, the optimization number is +1; if the value of the intersection over union decreases, the optimization number is -1; if the value of the intersection over union remains unchanged, the optimization number is 0; if the value of the Hausdorff distance decreases, the optimization number is +1; if the value of the Hausdorff distance increases, the optimization number is -1; if the value of the Hausdorff distance remains unchanged, the optimization number is 0; if the value of the turning function distance decreases, the optimization number is +1; if the value of the turning function distance increases, the optimization number is -1; if the value of the turning function distance remains unchanged, the optimization number is 0.

[0129] In the specific implementation process, the method for evaluating the accuracy of urban space boundary recognition in the embodiments of the present invention can be divided into two parts: overall parsing accuracy evaluation and local parsing accuracy evaluation.

[0130] (1) The overall parsing accuracy evaluation is achieved by relying on confusion matrix analysis. Confusion matrix analysis can evaluate the overall parsing accuracy, but it can only verify the accuracy of the area size corresponding to the parsed polygon, and it cannot well reflect the shape contour and structural information of the parsed area. Furthermore, it is difficult to determine whether the shape structure of the parsed graph (i.e., the polygon in the prediction set) fits the actual situation, and thus it is impossible to more accurately evaluate the parsing accuracy.

[0131] In the fields of computer vision such as image parsing, object detection, and shape matching, there are various evaluation metrics for measuring the accuracy of the parsing results (i.e., the polygons in the prediction set). Area overlap metrics (such as Dice coefficient, Jaccard index) are mainly used to evaluate the similarity of area coverage; boundary distance metrics (such as Hausdorff distance, average Hausdorff distance) are used to quantify the spatial deviation between boundaries; shape similarity metrics (such as turning function distance, shape context) focus on the matching degree of contour structures; in addition, there are also position accuracy metrics (such as center point distance) and topological consistency metrics, etc. The present invention selects three representative metrics: intersection over union (IOU), Hausdorff distance (HD), and turning function distance (TFD). The basis for their selection is that IOU, as a fundamental metric, can effectively reflect the global accuracy of area overlap; HD compensates for the deficiency of IOU in terms of sensitivity to spatial position and can capture the maximum boundary deviation; while TFD is specifically used to evaluate the shape structure characteristics. These three metrics construct a complete evaluation system from three complementary dimensions of area coverage, spatial position, and shape structure, avoiding both the limitations of a single metric and the computational redundancy caused by too many metrics, meeting the requirements of comprehensiveness and efficiency in evaluation.

[0132] IOU is used to measure the overlap degree between two figures, and calculate the intersection over union (i.e., the ratio of the intersection to the union) of the parsing result (i.e., the polygons in the prediction set) and the ground truth result (i.e., the polygons in the reference set). IOU is widely used in practical applications, but it can only reflect the overlap degree between figures and cannot consider the similarity of figure shapes and the deviation of positions. HD can measure the maximum distance between two figures and reflect the deviation degree of positions between figures. TFD focuses on the similarity between figure boundaries and is mainly used to measure the matching degree in shape and contour between the two, helping to evaluate the similarity degree of figures. The introduction of these metrics is to make up for the deficiencies of confusion matrix analysis. By introducing HD and TFD, the limitations of IOU can be supplemented from different perspectives, and the deviation degree and similarity degree between figures can be measured respectively. The core idea of evaluating the local parsing accuracy through the figure matching metrics (IOU, HD, TFD) is to transform the parsed urban space boundaries into figures (polygons) for processing and analysis, and comprehensively evaluate the figure matching degree from three different dimensions.

[0133] Specifically, the overall parsing accuracy evaluation includes the following steps:

[0134] Step A: Create a coordinate point set in python based on the research area.

[0135] Step B: Read the Shapefile (.shp) files of the reference set and the prediction set respectively.

[0136] Step C: Mark the urban spaces indicated in the reference set and the prediction set in the coordinate point set respectively. The urban space can be an urban public space area or other areas.

[0137] Step D: Obtain two marked coordinate point sets, which respectively correspond to the reference set and the prediction set.

[0138] Step E: Conduct a confusion matrix analysis on the two marked coordinate point sets.

[0139] Step F: Evaluate the overall parsing accuracy based on the analysis results.

[0140] Among them, Step A specifically includes the following sub-steps:

[0141] In python, with the circumscribed rectangle of the research area boundary as the range and a step size of 10m, generate an equidistant node graph structure, screen the points belonging to the inside of the research area boundary to form a point set and save it as a Shapefile file, which is called the coordinate point set.

[0142] As a further technical solution of the present invention, Step B includes the steps:

[0143] In the embodiments of the present invention, both the reference set and the prediction set are stored as Shapefile files, that is, polygon sets. The reference set refers to the actual urban public space area manually labeled, and the prediction set refers to the urban public space area predicted by the parsing model. In Python, the corresponding Shapefile file is read using the GeoPandas library to obtain the polygon set representing the boundary of the indicated urban public space area.

[0144] Step C specifically includes the following sub-steps:

[0145] The following operations are performed on the reference set and the prediction set respectively: read the coordinate point set and the polygon set in the reference set or the prediction set, unify the coordinate system, add a field "ID" to each point in the coordinate point set, and the initial value of the field "ID" is 0, indicating that the point does not belong to the urban public space area under study. For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the reference set or the prediction set. If so, assign its ID as 1, indicating that the point belongs to the urban public space area under study.

[0146] Step D specifically includes the following sub-steps:

[0147] Output the field "ID" of the point set in order as a list, and two ID lists y_actu (i.e., the first list, that is, Figure 1 the reference list in Figure 1 ) and y_pred (i.e., the second list, that is,

[0148] the prediction list in

[0148] ) can be obtained, representing the actual and predicted situations respectively. Each list is a sequence composed of 0 and 1. Step E specifically includes the following sub-steps:

[0149] The confusion matrix is a tool in machine learning for evaluating the performance of classification models. It helps us understand the performance of the model in various predictions. Through the confusion matrix, we can intuitively see the comparison between the model prediction results and the actual labels.

[0150] In the embodiments of the present invention, the label is the ID, which is used to indicate whether a point belongs to the urban space area under study, that is, a binary classification problem. Creating a confusion matrix requires passing in the label vectors of the actual labels and the predicted labels, that is, the two ID lists y_actu and y_pred output in the previous step. After creating the confusion matrix object, analyze the confusion matrix. The process of confusion matrix analysis includes printing the confusion matrix (the original and row-normalized ones), calculating statistical information, and plotting the confusion matrix graph to achieve data visualization.

[0151] Step F specifically includes the following sub-steps:

[0152] The evaluation of the overall parsing accuracy relies on the statistical information calculated in the confusion matrix analysis (including overall statistics and classification statistics). The most important of these is the F1-Score, which is the weighted harmonic mean of precision and recall, and is used to measure the comprehensive performance of the model in classification tasks. The closer the value of the F1-Score is to 1, the better the performance of the model, and the better it can balance precision and recall. Other performance indicators such as the precision PPV and recall TPR also have great reference significance.

[0153] The local parsing accuracy evaluation includes the following steps:

[0154] Step a: Perform polygon matching with the help of the graphical matching metric IOU.

[0155] Step b: Calculate the graphical matching metrics HD and TFD for the uniquely matched polygon pairs.

[0156] Step c: Evaluate the local parsing effect based on the graphical matching metrics.

[0157] Step d: Feed back the numbers of the polygons with non-unique matches (zero matches and multiple matches) and the polygons with an IOU less than the set threshold in step a to the parsing model.

[0158] Step e: Repeat steps a and b for the parsing results of the optimized parsing model, re-evaluate the parsing accuracy of each part, and compare the changes in the graphical matching metrics before and after optimization to test the local optimization effect.

[0159] Step f: Re-evaluate the overall parsing effect after testing the local optimization effect, and link the local optimization and the overall optimization.

[0160] Among them, step a includes the following sub-steps:

[0161] Since the calculation object of the graphical matching metric is a pair of polygons whose similarity needs to be evaluated, it is necessary to retrieve the polygons in the prediction set that match each polygon in the reference set. The prerequisite for matching is that the two polygons intersect, so the intersection over union (IOU) is introduced, which is the ratio of the intersection area to the union area of the two geometric figures. Obviously, two polygons with an IOU of zero must not match. Therefore, for a specific polygon in the reference set, objects with a non-zero IOU can be retrieved in the prediction set, and they are regarded as "matching". It can be seen that a polygon in the reference set may "match" zero, one, or multiple polygons in the prediction set, which are called zero match, unique match, and multiple match situations.

[0162] Step b includes the following sub-steps:

[0163] Confusion matrix analysis can only evaluate the "area accuracy" of parsing and cannot reflect whether the shape structure characteristics of the parsed urban space boundary are similar to the actual situation. Therefore, after reading the relevant literature, it was decided to innovatively introduce two other graphic matching degree indicators - HD and TFD to characterize the "structural accuracy" of parsing. The Hausdorff distance (HD) is an indicator that measures the deviation between graphics through the maximum degree of mismatch between two point sets and is commonly used in shape matching and image analysis. The calculation object is a two-dimensional point set (unordered array), such as A = numpy.array([[1, 1], [2, 2], [3, 3]]). In the context of the embodiments of the present invention, the calculation object is the internal point set of the area indicated by the matching polygon pair in step a. In python, the.shp file is read using the Geopandas (gpd) library and loaded into a GeoDataFrame (gdf) object. The geometry field in the gdf object stores the boundary point set (list data structure) after discretization of the polygon boundary curve. Again, with the help of the coordinate point set, the boundary point set of the polygon is converted into an internal point set. The calculation of HD uses the KDTree method. The KD tree is a data structure that can efficiently perform nearest neighbor queries in large data sets to achieve accelerated operation of HD. The turning function distance (TFD) is used to measure the similarity between two curves, and the calculation object is the curve. Therefore, the shape similarity between graphics can be characterized by calculating the TFD of the boundary curves of the two graphics. By using the np.array() function of the NumPy package to convert the polygon boundary point set (i.e., the boundary point set) into an array, a new boundary point set, which is the discretized form of the boundary curve, can be obtained, meeting the requirements for the data structure of TFD calculation.

[0164] The following gives the calculation formulas for HD and TFD:

[0165] Calculate HD:

[0166] First, define the directed Hausdorff distance: from the internal point set to the internal point set the directed Hausdorff distance is:

[0167]

[0168] That is, for each point a in the internal point set A, calculate the minimum distance (infimum inf) to all points in the internal point set B, and then take the maximum value (supremum sup) of these minimum distances. Similarly, the directed Hausdorff distance from the internal point set B to the internal point set A is:

[0169]

[0170] Finally, the Hausdorff distance is the maximum value of the above two directed distances:

[0171]

[0172] In the embodiments of the present invention, a KD tree is used to accelerate the nearest neighbor search, that is, two KD trees are generated according to the internal point set A and the internal point set B to accelerate the calculation.

[0173] Calculate TFD:

[0174] First, for the new boundary point set, calculate the turning angles between adjacent vectors:

[0175]

[0176] Where:

[0177] ;

[0178] In the formula, is the vector in the new boundary point set pointing from the th point to the th point, is the vector in the new boundary point set pointing from the th point to the th point, is the th point in the new boundary point set, is the th point in the new boundary point set; is the angle between the vector and and is calculated by the vector angle formula, and the vector angle formula is:

[0179] ;

[0180] Based on the turning angles between adjacent vectors, a turning angle sequence is obtained.

[0181] Then, fill the turning angle sequence: If the lengths of the two turning angle sequences are different, fill the shorter sequence with 0 to make the lengths of the two turning angle sequences the same;

[0182] Finally, perform TFD calculation: Calculate the difference between the two turning angle sequences using the Euclidean distance:

[0183]

[0184] Where, and are the two turning angle sequences respectively, represents the 2-norm of the vector, and are the th turning angles in the two turning angle sequences, is the length of the filled turning angle sequence.

[0185] The specific steps of step c include the following sub-steps:

[0186] After calculating the uniquely matched polygon pairs in step a according to step b, the HD, TFD, and IOU of the matched polygon pairs can be obtained. IOU is used for the intuitive evaluation of the matching and parsing accuracy of polygon pairs, and HD and TFD are used for the evaluation of the shape structure similarity of the matched polygon pairs. Based on the above data, the local parsing accuracy of the parsing model can be evaluated.

[0187] The specific steps of step d include the following sub-steps:

[0188] For the non-uniquely matched polygons (zero match or multiple matches) in step a, it indicates that there are defects in the parsing model in this local area; for the matched polygon pairs with IOU less than the set threshold in step a, it indicates that there is room for improvement in the parsing model in this local area. For the above problems, feedback can be given to the parsing model: the numbers of the non-uniquely matched or IOU less than the set threshold polygons are fed back to the parsing model for its specific analysis of local problems.

[0189] The specific steps of step e include the following sub-steps:

[0190] Repeat the above steps for the parsing results of the optimized parsing model, and recalculate the graphic matching degree indexes of each local polygon pair to evaluate the parsing accuracy and optimization effect - if the IOU of a certain matched polygon pair increases and the values of HD and TFD decrease, it indicates that the optimization of the parsing model is effective in this local area. In order to intuitively evaluate the optimization effect, the net optimization number and the optimization rate are decided to be introduced.

[0191] For each polygon in the reference set, there are four situations for the parsing results before and after optimization:

[0192] Situation 1: It was non-uniquely matched before optimization and becomes uniquely matched after optimization, which is considered an improvement in the optimization effect of the parsing model or a positive optimization (the optimization number is +1);

[0193] Situation 2: It was uniquely matched before optimization but becomes non-uniquely matched after optimization, which is considered a decrease in the local parsing effect of the parsing model or a negative optimization (the optimization number is -1);

[0194] Situation 3: It was non-uniquely matched both before and after optimization, which is considered that the change in the local parsing effect of the parsing model is negligible (the optimization number is 0);

[0195] Case 4: Unique matching both before and after optimization - For IOU, if the value increases, it is positive optimization (optimization number is +1); if the value decreases, it is negative optimization (optimization number is -1); if the value remains unchanged (optimization number is 0). For HD and TFD, it is the opposite. If the value decreases, it is positive optimization, and the rest is the same. Let's define the net optimization number as the sum of the optimization numbers of all polygons in the reference set. If the net optimization number is positive, it can be considered that more local areas have received positive optimization, indicating that the optimization of the parsing model has improved the parsing accuracy of more local areas. Optimization rate = net optimization number / total number of polygons in the reference set.

[0196] Step f described above includes the steps:

[0197] After the iterative optimization of the parsing model, re - conduct the confusion matrix analysis on the overall parsing result. If the value of F1 - Score increases, it can be considered that the iterative optimization of the parsing model has improved the overall parsing accuracy.

[0198] The following will elaborate on the method for evaluating the accuracy of urban spatial boundary recognition in the embodiments of the present invention in conjunction with a specific embodiment.

[0199] The flowchart of the method for evaluating the accuracy of urban spatial boundary recognition in the embodiments of the present invention is as Figure 1 shown. Select the urban public space of the street type as the urban spatial category under study, and evaluate the accuracy of the parsing result of the boundary of the urban public space of the street type.

[0200] In this embodiment, the reference set and the prediction set are directly obtained from the Shapefile file storing the polygon set. The creation steps of the coordinate point set are as follows (implemented in python code): Make the circumscribed rectangle of the research area (such as Gulou District, Nanjing City). Generate an equidistant node graph structure at intervals of 10m within the rectangle, and screen out the points within the research area (including the boundary) to form a point set, which is the coordinate point set. The functions of this point set are similar to a coordinate system or a reference system, and mainly have two functions: One is to assist the confusion matrix analysis as the global point set of the research area - the reference set and the prediction set are respectively marked with urban public spaces on the coordinate point set. The other is to assist the calculation of HD as a tool for converting the boundary point set into an internal point set - for the matching polygon pairs, read the boundary point set of the polygon, and screen out all the points within or on the boundary in the coordinate point set to form the internal point set of the polygon.

[0201] Figures 2 - 6 is the attached drawing for evaluating the overall parsing effect.

[0202] Figure 2It is a partial schematic diagram of a coordinate point set. Save the coordinate point set created in python as a Shapefile file "path name\grid_nodes.shp". Reading this file with ArcGIS Pro can visually display the coordinate point set. The gray area in the figure is the urban spatial area indicated by the reference set. Figure 2 It can intuitively display the shape and effect of the coordinate point set.

[0203] As Figure 3 shown, it shows the basic information of the confusion matrix, including the original confusion matrix and the row-normalized confusion matrix. For binary classification problems: there are four possible situations for sample points - actually belonging to class 1 (public space) but predicted as class 0 (not belonging to public space); actually belonging to class 1 and predicted as class 1; actually belonging to class 0 and predicted as class 0; actually belonging to class 0 but predicted as class 1. The data in the original confusion matrix represents the number of sample points in the corresponding situation, while the row-normalized confusion matrix represents probabilities (the data on the diagonal represents the recall rate of the corresponding class).

[0204] Figure 4 and Figure 5 show the overall and classification statistical information of the confusion matrix analysis. The specific implementation is as follows: First, create a confusion matrix object cm through the ConfusionMatrix function of the pycm library, then obtain the overall and classification statistical information through the cm.stat(summary=True) method, and finally use print() to print and output the statistical information.

[0205] As Figure 4 shown, it shows the overall statistical information. Among them, the more important ones are F1 Macro (macro-average F1 score, that is, the mean of F1 scores of all classes); PPV Macro (macro-average positive predictive value or precision rate, that is, the mean of precision rates of all classes); TPR Macro (macro-average true positive rate or recall rate, that is, the mean of recall rates of all classes).

[0206] As Figure 5 shown, it shows the classification statistical information. Among them, the more important ones are F1, precision rate PPV, and recall rate TPR for each class (referring to classes 0 and 1). Among them, the precision rate of a certain class represents the frequency of actually belonging to this class among the predictions for this class; while the recall rate represents the frequency of being predicted as this class among those actually belonging to this class; F1 represents the harmonic mean of the precision rate and the recall rate. Obviously, the embodiments of the present invention are more concerned about the performance of the parsing model on class 1 (public space). For class 1: F1 = 0.59437, PPV = 0.68134, TPR = 0.52708, and the above three important indicators are highlighted in the figure.

[0207] As Figure 6As shown, it is the original confusion matrix diagram. The original confusion matrix diagram can obtain the actual and predicted distributions of each category (the numbers represent the specific number of sample points). However, the unnormalized confusion matrix cannot intuitively obtain the accuracy and recall rate. Therefore, the original confusion matrix is row-normalized (the diagonal data represents the recall rate of the corresponding category) and column-normalized (the diagonal data represents the accuracy of the corresponding category) respectively, and then a plot diagram is drawn for the normalized confusion matrix, as Figure 7 Figure 8 shown. According to the depth of the color blocks, the parsing effect can be judged, but the data therein is limited by precision, and the accurate data can be viewed in Figure 5 . Therefore, on the normalized confusion matrix diagram, the parsing effect can be evaluated more intuitively.

[0208] Figures 9 - 12 are the attached drawings for evaluating the local parsing effect.

[0209] As Figure 9 shown, it is a partial display of the polygon matching results. It can be seen that there are cases of zero matching, unique matching, and multiple matching. When displaying the matching results, the IOU data of the matching polygon pairs is output, which is convenient for intuitively judging the local parsing effect. For polygons with unique matching and a small IOU (such as less than 0.4), feedback is given. The number behind the polygon is the FID of the polygon in the Shapefile file. For non-uniquely matched polygons, their numbers are recorded and fed back to the parsing model.

[0210] Figure 10 shown shows the numbers of some uniquely matched polygon pairs in their respective sets. The number pairs of the uniquely matched polygon pairs are stored in a list data structure for the calculation of the next graphic matching degree index.

[0211] Figure 11 and Figure 12 shown show the graphic matching degree indexes HD and TFD of the uniquely matched polygon pairs. At this time, only the indexes (numbers) of the reference polygons are retained, that is, the graphic matching degree indexes can be queried according to the indexes of the polygons in the reference set, and the local optimization effect of the model can be evaluated by comparing the numerical changes before and after optimization.

[0212] Figure 13 and Figure 14 [[ID=**30**]]achieve the inspection of the parsing optimization effect.

[0213] As Figure 13 shown, after optimization, the F1 of category 1 = 0.60452, PPV = 0.69050, and TPR = 0.53758. There is an improvement of about 1 - 2% compared with the original data. It shows that the optimization of the parsing model has improved the overall parsing accuracy.

[0214] AsFigure 14 As shown, the concepts of net optimization number and optimization rate are introduced for three image matching degree indicators. For each polygon in the reference set, there are four cases for the parsing results before and after optimization: non-unique matching before optimization and unique matching after optimization, which is considered an improvement in the optimization effect of the parsing model (optimization number is +1); unique matching before optimization but non-unique matching after optimization, which is considered a decline in the optimization effect of the parsing model or negative optimization (optimization number is -1); non-unique matching both before and after optimization, which is considered that the change in the optimization effect of the parsing model is negligible (optimization number is 0); unique matching both before and after optimization - for IOU, if the value increases, it is positive optimization (optimization number is +1), if the value decreases, it is negative optimization (optimization number is -1), and if the value remains unchanged (optimization number is 0); for HD and TFD, it is the opposite, if the value decreases, it is positive optimization, and the rest is the same. Let's define the net optimization number as the sum of the optimization numbers of all polygons in the reference set. If the net optimization number is positive, it can be considered that more local areas have been positively optimized. It shows that the optimization of the parsing model has improved the parsing accuracy of more local areas. Optimization rate = net optimization number / total number of polygons in the reference set. As shown in the data in the figure, all three image matching degree indicators indicate that local optimization is effective, and the optimization of the TFD indicator is the most obvious.

[0215] As Figure 15 shown, the dark area is the prediction set before optimization, and the light area is the prediction set after optimization. Since the parsing object is the urban public space of street type within Gulou District, straightening the parsing boundary is more in line with the actual situation (the shape similarity is improved), so the optimization effect of the TFD indicator is the most obvious.

[0216] Example 2

[0217] Based on the same inventive concept as in Example 1, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method for evaluating the accuracy of urban space boundary recognition described in any one of Example 1.

[0218] Example 3

[0219] Based on the same inventive concept as in Example 1, an embodiment of the present invention provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, it implements the method for evaluating the accuracy of urban space boundary recognition described in any one of Example 1.

[0220] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0221] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0222] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0223] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0224] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope protected by the present invention and the claims. All of these are within the protection scope of the present invention.

[0225] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and all these changes and improvements fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for evaluating the accuracy of urban spatial boundary recognition, characterized in that Including: Obtain a set of coordinate points created based on the research area range; Obtain a reference set and a prediction set. The reference set includes several polygons corresponding to each urban space manually annotated, and the prediction set includes several polygons corresponding to each urban space predicted by an analytical model; Repeatedly execute a preset evaluation step to obtain an overall analytical accuracy evaluation result. The evaluation step includes: Calculate the intersection over union based on the reference set and the prediction set, and then determine the matching relationship of the polygons in the reference set and the prediction set; For uniquely matched polygon pairs, calculate the Hausdorff distance and the turning function distance; Feed back the numbers of the polygons in the case of non-unique matching and the numbers of the polygons in the case of unique matching with an intersection over union less than the set threshold to the analytical model so that the analytical model performs local optimization; Mark the polygons in the reference set and the prediction set in the coordinate point set respectively to obtain a first list and a second list, and perform confusion matrix analysis to obtain an overall analytical accuracy evaluation result.

2. The method for evaluating the accuracy of urban spatial boundary recognition according to claim 1, characterized in that The generation method of the coordinate point set includes: Taking the circumscribed rectangle of the research area boundary as the range, setting a fixed step size, generating an equidistant node graph structure, and screening out the points belonging to the inside of the research area boundary to form a coordinate point set; several urban spaces are included in the research area.

3. A method for evaluating the accuracy of urban spatial boundary recognition according to claim 1, characterized in that, The generation methods of the first list and the second list are the same, and both include: Unify the coordinate systems of the coordinate point set, the reference set, and the prediction set; Add a field ID to each point in the coordinate point set, and the initial value of the field ID is 0, indicating that it does not belong to the studied urban space; For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the reference set. If so, assign its ID as 1, indicating that the point belongs to the studied urban space, and output the IDs of each point in the coordinate point set in order to obtain a first list; For each point in the coordinate point set, check whether it is inside or on the boundary of the polygon in the prediction set. If so, assign its ID as 1, indicating that the point belongs to the studied urban space, and output the IDs of each point in the coordinate point set in order to obtain a second list.

4. A method for evaluating the accuracy of urban spatial boundary recognition according to claim 3, characterized in that: The method for obtaining the overall analytical accuracy evaluation result includes: Create a confusion matrix based on the first list and the second list; Analyze the confusion matrix to obtain an overall analytical accuracy evaluation result, and the overall analytical accuracy evaluation result is F1-Score.

5. A method for evaluating the accuracy of urban spatial boundary recognition according to claim 1, characterized in that: The calculation of the Hausdorff distance and the turning function distance for uniquely matched polygon pairs specifically includes: Discretize the boundaries of the uniquely matched polygon pairs to obtain an original boundary point set; Combined with the coordinate point set, convert the original boundary point set into an internal point set of the urban space indicated by the polygon pair; Calculate the Hausdorff distance based on the internal point set; Convert the data structure of the original boundary point set to generate a new boundary point set; Calculate the turning function distance based on the new boundary point set.

6. A method for evaluating the accuracy of urban spatial boundary recognition according to claim 5, characterized in that: The calculation formula of the Hausdorff distance is: ; Where: ; ; Wherein, and respectively represent two sets of internal points corresponding to two polygons in a polygon pair, represents the set of internal points and the set of internal points is the Hausdorff distance between them, represents the directed Hausdorff distance from the set of internal points to the set of internal points is the directed Hausdorff distance from the set of internal points to the set of internal points to the set of internal points is the directed Hausdorff distance, represents taking the maximum value, represents taking the minimum value, and respectively represent points in the set of internal points and the set of internal points respectively.

7. A method for evaluating the accuracy of urban spatial boundary recognition according to claim 5, characterized in that The calculation method of the turning function distance includes: For the new boundary point set, calculate the turning angle between adjacent vectors, and the calculation formula of the turning angle is: ; Wherein: ; Wherein, is the vector in the new boundary point set pointing from the -th point to the -th point, is the vector in the new boundary point set pointing from the -th point to the -th point, is the -th point in the new boundary point set, is the -th point in the new boundary point set; is the included angle between the vector and , calculated by the vector included angle formula, and the vector included angle formula is: ; A turning angle sequence is obtained based on the turning angles between adjacent vectors; If the lengths of the turning angle sequences corresponding to the reference set and the prediction set are different, the shorter turning angle sequence is padded with 0s to make the lengths of the two turning angle sequences consistent; The Euclidean distance is used to calculate the difference between the two turning angle sequences, that is, the turning function distance, and the calculation formula of the turning function distance is: ; Among them, and are two sequences of turning angles respectively, represents the 2-norm of the vector, and are the th turning angles in the two sequences of turning angles, is the length of the padded sequence of turning angles.

8. A method for evaluating the accuracy of urban spatial boundary recognition according to claim 5, characterized in that During the local optimization process of the parsing model, the net optimization number and the optimization rate are used to evaluate the optimization effect; The net optimization number is the sum of the optimization numbers of all polygons in the reference set; the optimization rate = net optimization number / total number of polygons in the reference set; For each polygon in the reference set, there are four cases for the parsing results before and after the parsing model optimization: Case 1: If it is a non-unique match before optimization and a unique match after optimization, it is considered that the optimization effect of the parsing model is improved, and the optimization number is +1; Case 2: If it is a unique match before optimization and a non-unique match after optimization, it is considered that the optimization effect of the parsing model has deteriorated, and the optimization number is -1; Case 3: If it is a non-unique match before and after optimization, it is considered that the optimization effect of the parsing model remains unchanged, and the optimization number is 0; Case 4: If it is a unique match before and after optimization, if the value of the intersection over union increases, the optimization number is +1; if the value of the intersection over union decreases, the optimization number is -1; if the value of the intersection over union remains unchanged, the optimization number is 0; if the value of the Hausdorff distance decreases, the optimization number is +1; if the value of the Hausdorff distance increases, the optimization number is -1; if the value of the Hausdorff distance remains unchanged, the optimization number is 0; if the value of the turning function distance decreases, the optimization number is +1; if the value of the turning function distance increases, the optimization number is -1; if the value of the turning function distance remains unchanged, the optimization number is 0.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the method for evaluating the accuracy of urban spatial boundary recognition according to any one of claims 1 to 8.

10. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by a processor, it implements the method for evaluating the accuracy of urban spatial boundary recognition according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • A calculation method for accurate Hausdorff distance between point set data of any kind

    CN106126919A

  • Building mapping precision calculation method and system based on contour matching

    CN117649532A

  • Method and system for identifying fine impurities in wine bottle

    CN119379592A

  • Photovoltaic pose recognition method based on improved YOLOv8n algorithm model

    CN119540352A