AI-based building plan parameterization recognition method
By using AI-based semantic segmentation and scale recognition technology, the coordinates of key points of components such as walls, columns, doors, and windows in architectural floor plans are extracted, solving the problem of noise interference and improving the efficiency and accuracy of 3D modeling.
Patent Information
- Application Number
- CN202211349783.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The existing technology is easily interfered by noise points during the vectorized recognition of building floor plans, resulting in recognition confusion, and lacks an efficient component key point extraction method, which affects the efficiency of three-dimensional modeling.
An AI-based semantic segmentation model is used to extract component masks from the building floor plan, eliminate gaps, obtain the coordinates of wall inflection points, and obtain the physical length of each pixel by recognizing the scale. A 3D model is then constructed by combining the key point coordinate information.
It enables intelligent and rapid extraction of key coordinate points of components in planar drawings, reducing the cost of manual identification and improving the efficiency of 3D modeling.
Smart Images

Figure CN115908900B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of architectural drawing processing, in particular to the application of deep learning images in architectural drawing processing; more particularly, it relates to an AI-based architectural plan parameterization identification method. BACKGROUND
[0002] During the planning and design process of a construction project, a large amount of data is involved and generated, which is often recorded in a fixed format on paper in the form of a plan. According to the different uses of the main content of the drawing, the architectural two-dimensional data can be divided into architectural general plan, plan, elevation, section and door and window information. Among them, the architectural plan is mainly used to represent the internal structural layout of the building, and the distribution of the main functional components and structural components in the building is indicated. The distribution of the internal load-bearing walls of the building, the specific location of the doors and windows, the size and shape of the indoor space, etc. are important basis for construction and future decoration and renovation. The architectural plan not only can fully show the spatial layout between the rooms inside the building and other structural information such as the outline of the wall and the location of the door and window, but also can reflect the shape of the room and the internal details. It is the most suitable data source for three-dimensional modeling of the building interior among the architectural two-dimensional data.
[0003] The Chinese invention application with publication date of February 25, 2022: A method and device for vectorizing an architectural house type semantic segmentation map, the method comprising: obtaining a house type drawing to be vectorized; performing semantic segmentation identification on the house type drawing to obtain a semantic segmentation map; copying the semantic segmentation map to obtain a plurality of sub-maps; for each sub-map, extracting the coordinates of the region type corresponding to the color block of different colors; the region type includes at least one of the following: door and window, room, and external wall; and saving the extracted coordinates. The semantic segmentation map is divided into three parts for identification, in order to solve the problem that the semantic segmentation map is easily disturbed by noise points during the vectorization identification process, and the identification of different pixel points is chaotic, thereby improving the processing capability for noise points and the vectorization accuracy. However, the prior art still has certain limitations. SUMMARY
[0004] In view of the limitations of the prior art, the present application proposes an AI-based architectural plan parameterization identification method. The technical solution adopted by the present application is:
[0005] An AI-based architectural plan parameterization identification method, comprising the following steps:
[0006] S1, obtaining an architectural plan to be processed;
[0007] S2, a preset semantic segmentation model is used to extract masks of components in the building plan, the components including walls, wall columns, doors and windows; and gaps between the masks are eliminated;
[0008] S3, according to the result of the step S2, corner point coordinates of the walls are obtained; after the connecting walls are segmented, the corner point coordinates of the walls are taken as references to obtain coordinates of the wall columns, the doors and the windows;
[0009] S4, a scale of the building plan is recognized to obtain a physical length corresponding to each pixel; Figure One
[0010] S5, results of the steps S3 and S4 are outputted, and parametric recognition of the building plan is completed.
[0011] Compared with the prior art, the application can only extract the required components and eliminate irrelevant interference components; after a series of post-processing operations such as gap elimination between components, wall regularization and wall cutting, the wall columns, the doors and the windows are obtained by referring to the walls; finally, the length represented by each pixel point is obtained by recognizing the scale, and the scale and the key point coordinate information of the walls, the wall columns, the doors and the windows are combined to construct a three-dimensional building model. The application can realize intelligent and rapid extraction of key coordinate points of components in a plan, reduce the cost of manual recognition of the plan and improve the efficiency of three-dimensional modeling construction.
[0012] As a preferred scheme, in the step S2, the semantic segmentation model identifies the components in the building plan by a binary classification segmentation method, superimposes the identification results to complete extraction of the components, and eliminates the gaps between the components by a closing operation.
[0013] As a preferred scheme, in the step S3, the corner point coordinates of the walls are obtained by the following method:
[0014] polygon fitting is performed on the masks of the walls to obtain wall polygons; coordinates of the wall polygons are corrected; after the correction, non-corner point coordinates of the wall polygons are removed, the connecting walls in the wall polygons are segmented, and the corner point coordinates of the walls are obtained.
[0015] Further, in the step S3, the non-corner point coordinates of the wall polygons are removed by the following method:
[0016] Filtering points with same head and tail or continuous repetition in the coordinates of the wall polygon, and counting the number of coordinate points in the contour of the wall polygon after filtering, taking the number of 1 as an edge point and the number of 2 as a connection point; traversing the coordinates of the wall polygon: retaining the connection points and points satisfying that the x and y of the front and rear coordinate points are not equal, and discarding other points, to complete the removal of the non-kink point coordinates of the wall polygon.
[0017] As a preferred scheme, in the step S3, the coordinates of the wall column are obtained by the following way:
[0018] Clustering the masks of the wall columns, performing radius search on the clustering results, obtaining the kink point coordinates of the wall associated with the wall columns, fitting the minimum circumscribed rectangle to the contour corresponding to the kink point coordinates of the wall associated with the wall columns, judging whether the area ratio of the fitted circumscribed rectangle to the contour is greater than a preset area ratio threshold, and if yes, obtaining the coordinates of the wall column according to the kink point coordinates of the wall associated with the wall column.
[0019] As a preferred scheme, in the step S3, the coordinates of the door are obtained by the following way:
[0020] Clustering the masks of the door, performing radius search on the clustering results, obtaining the kink point coordinates of the wall associated with the door, judging the orientation of the door, and obtaining the coordinates of the door in combination with the kink point coordinates of the wall associated with the door.
[0021] As a preferred scheme, in the step S3, the coordinates of the window are obtained by the following way:
[0022] Clustering the masks of the window, performing radius search on the clustering results, obtaining the kink point coordinates of the wall associated with the window, judging the orientation of the window, and obtaining the coordinates of the window in combination with the kink point coordinates of the wall associated with the window.
[0023] The application also includes the following contents:
[0024] An AI-based building plan parameterized identification system, comprising a building plan acquisition module, a mask extraction processing module and a component coordinate acquisition module connected in sequence, and further comprising a scale identification module and an output module; the scale identification module is connected with the building plan acquisition module and the output module respectively; the component coordinate acquisition module is connected with the output module; wherein:
[0025] The building plan acquisition module is used to acquire a building plan to be processed;
[0026] The mask extraction processing module is used to extract masks of components in the building plan by using a preset semantic segmentation model, the components including a wall, a wall column, a door and a window; and gaps between the masks are eliminated.
[0027] The component coordinate acquisition module is configured to acquire corner point coordinates of the wall body according to a result of the mask extraction processing module; and acquire coordinates of the wall column, the door and the window by taking the corner point coordinates of the wall body as a reference after segmenting the connecting wall body.
[0028] The scale recognition module is configured to recognize a scale of the architectural plan to obtain a physical length corresponding to one pixel. Figure One
[0029] The output module is configured to output results of the component coordinate acquisition module and the scale recognition module to complete parameterized recognition of the architectural plan.
[0030] A computer storage medium having a computer program stored thereon, the computer program being executed by a processor to implement steps of the AI-based parameterized recognition method of an architectural plan as described above.
[0031] A computer device including a storage medium, a processor and a computer program stored in the storage medium and executable by the processor, the computer program being executed by the processor to implement steps of the AI-based parameterized recognition method of an architectural plan as described above. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 A flowchart of an AI-based parameterized recognition method of an architectural plan provided for Embodiment 1 of the present application;
[0033] Figure 2 An example of an architectural plan to be processed in the present application;
[0034] Figure 3 A result of preliminary processing of an example component in the present application;
[0035] Figure 4 A polygon fitting result of an example wall body in the present application;
[0036] Figure 5 A regularized processing result of an example wall body in the present application;
[0037] Figure 6 A local comparison result of an example wall body before and after regularizing in the present application;
[0038] Figure 7 An example of a connecting wall body in the present application;
[0039] Figure 8 A segmentation result of Figure 7
[0040] Figure 9 Final parameterization results for example components in the embodiments;
[0041] Figure 10 A schematic diagram of an AI-based building plan parameterization recognition system provided for Embodiment 2 of the present application. DETAILED DESCRIPTION
[0042] The accompanying drawings are only intended to illustrate the embodiments of the present application, and cannot be understood as a limitation on the present application;
[0043] It should be clear that the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0044] The terms used in the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein means and includes any or all possible combinations of one or more associated listed items.
[0045] The following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not necessarily describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0046] In addition, in the description of the present application, "multiple" means two or more, unless otherwise specified. The association between the associated objects is described, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents a "or" relationship between the associated objects. The present application is further described below in conjunction with the drawings and embodiments.
[0047] In order to solve the limitations of the prior art, the present embodiment provides a technical solution, which is further described below in conjunction with the drawings and embodiments.
[0048] Embodiment 1
[0049] An AI-based building plan parameterization identification method, please refer to Figure 1 , comprising the following steps:
[0050] S1, obtaining a building plan to be processed;
[0051] S2, using a preset semantic segmentation model to extract the masks of the components in the building plan, the components including walls, wall columns, doors and windows; eliminating the gaps between the masks;
[0052] S3, according to the result of step S2, obtaining the coordinates of the inflection points of the walls; after segmenting the connecting walls, taking the coordinates of the inflection points of the walls as the reference, obtaining the coordinates of the wall columns, doors and windows;
[0053] S4, identifying the scale of the building plan to obtain the physical length corresponding to one pixel of the building plan; Figure One
[0054] S5, outputting the results of steps S3 and S4 to complete the parameterization identification of the building plan.
[0055] Compared with the prior art, the present application can only extract the required components and eliminate irrelevant interference components; after a series of post-processing operations such as gap elimination between components, wall regularization and wall cutting, the wall columns, doors and windows are obtained by referring to the walls. Finally, the length represented by each pixel point is obtained by identifying the scale, and the scale and the key point coordinate information of the extracted walls, wall columns, doors and windows are combined to construct a three-dimensional building model. The present application can realize the intelligent and rapid extraction of key coordinate points of components in the plan, reduce the cost of manual identification of the plan, and improve the efficiency of three-dimensional modeling construction.
[0056] The specific example of the building plan to be processed can be seen in Figure 2 .
[0057] Specifically, in step S2, the semantic segmentation technology of deep learning image processing can be used in combination with image closing operation to obtain the preliminary identification result of the components, and the specific example can be seen in Figure 3 . The components in the building plan are marked using CAD tools, and different colors represent different components. As an optional embodiment, opencv library can be used as an auxiliary tool, so the color triplet format is (B, G, R); in this embodiment, red (0, 0, 255) is used to mark the walls, gray (128, 128, 128) is used to mark the wall columns, green (0, 255, 0) is used to mark the doors, and blue (255, 0, 0) is used to mark the windows.
[0058] It is found through experiments that the effect of using binary classification (interest components and background) to segment the superposition is better than the result of multi-classification segmentation (all components are segmented at the same time).
[0059] Therefore, as a preferred embodiment, in the step S2, the semantic segmentation model identifies the components in the architectural plan by means of binary classification segmentation, superimposes the identification results, and completes the extraction of the components; and the gaps between the components are eliminated by means of closed operation.
[0060] In order to achieve the best recognition effect, as a preferred embodiment, the semantic segmentation model is trained by using a large model HRNetV2-W48 network, and the parameter size of the network is 65.8M. After data enhancement (including rotation, flipping, random cropping and restoring the original size, adjusting contrast, center cropping, adjusting brightness, adjusting contrast, etc.) is performed on the picture, 10000 pictures of 512*512 size are obtained, and the proportions of the training set, the verification set and the test set are 7:2:1. The batch size is 4, and 100 epochs are trained. The final training result is that the miou of the test set is 0.846, and the acc is 0.832. The identification results of each component are superimposed, and then the closed operation of the image is performed to obtain the preliminary identification result.
[0061] As a preferred embodiment, in the step S3, the corner coordinates of the wall are obtained by the following method:
[0062] The mask of the wall is polygon-fitted to obtain a wall polygon, and specific examples can be referred to Figure 4 ; the coordinates of the wall polygon are corrected; after the correction is completed, the non-corner coordinates of the wall polygon are removed, the connecting wall in the wall polygon is segmented, and the corner coordinates of the wall are obtained.
[0063] Specifically, the contour of the wall is obtained first, and it should be noted that the contour extraction only acts on the binary image of the wall, so the image needs to be binary processed; then the polygon representation of the wall is obtained by using the opencv tool.
[0064] In the correction, the coordinate points of each polygon are corrected individually first, and then the coordinate points of all polygons are collectively corrected. The purpose of this is to give different thresholds for individual correction and collective correction, which is better, and generally gives a larger threshold (5 in this embodiment) for individual correction and a smaller threshold (3 in this embodiment) for collective correction. The idea of individual correction and collective correction is the same, except that individual correction is for individual polygon coordinate points and collective correction is for all polygon coordinate points. The correction process needs to correct x and y coordinates respectively. The following takes x as an example to illustrate the entire correction process. First, count the number of each x, and use the dictionary statistic_dic to save the results, with x as the key and the number of x as the value, and arrange them in descending order of quantity. In addition, create a traveled_set set that is initially empty. Next, traverse statistic_dict, where the key is the reference x value. The next step is to traverse all coordinate points. If the absolute value of the difference between the x value of the coordinate point and the reference x value is less than the threshold, set the x of the coordinate to the reference x value, and add the modified x to traveled_set. After traversing statistic_dict, the correction is complete.
[0065] Due to the above wall correction, two originally unequal coordinate points may be the same, therefore, in step S3, the non-vertex coordinates of the wall polygon are removed in the following way:
[0066] Filter the points in the coordinates of the wall polygon that have the same first and last points or continuous repetition. After filtering, count the number of coordinate points in the outline of the wall polygon, and take the number 1 as the edge point and the number 2 as the connection point. Traverse the coordinates of the wall polygon: keep the connection points and points whose x and y of the previous and next coordinate points are not equal, and discard other points, to complete the removal of the non-vertex coordinates of the wall polygon.
[0067] Specifically, in step S3, only one of the points with the same first and last points is kept; one of the continuously repeated points is also kept. Then count the number of coordinate points in the outline (use a counting dictionary to save, denoted as count_dict), and the number 1 is named as the edge point and the number 2 is named as the connection point. Traverse the entire coordinate point, if it meets any of the following rules, it is kept, otherwise it is discarded. (1) The point is a connection point; (2) the x and y of the previous and next coordinate points of the point are not equal.
[0068] After the above post-processing steps are completed, the regularization of the wall is completed, Figure 4 which is converted into Figure 5 the regularization result. The local before and after comparison after regularization can be referred to Figure 6 (the dark box in the figure is Figure 4 andFigure 5 The superimposed results of the same position, light color box is the indication box of the difference between the front and back.
[0069] The above-mentioned counting dictionary according to the coordinate points has obtained the coordinates of the edge point set and the connection points. If the count of the connection points is greater than 0, the horizontal direction is traversed right and left, and the vertical direction is traversed up and down. Taking the horizontal direction right and the vertical direction up as an example, the wall segmentation process is shown below: the coordinates of the right side and the upper side in the contour are found. If the right upper coordinates constructed by the right side and the upper side do not exist in the contour, the rectangle constructed by the connection points (right, up, right up) is invalid. If the right upper coordinates exist in the contour, the constructed rectangle is logically ORed with the original contour. If the result is the contour itself, the rectangle is valid, otherwise the rectangle is invalid. If the rectangle is valid, the number of the corresponding coordinate points in the counting dictionary is reduced by 1. After traversing the connection points, the number greater than 1 in the counting dictionary is retained as the key coordinates which do not form a rectangle. The images before and after segmentation are shown in Figure 7 and Figure 8 wherein, Figure 8 The third segmentation result in the above-mentioned is the key coordinate points constituting the wall, but it is not a rectangle, but a point which is not retained after not forming a rectangle.
[0070] As a preferred embodiment, in the step S3, the coordinates of the wall column are obtained by the following way:
[0071] The mask of the wall column is clustered, the radius search is performed on the clustering result, the inflection point coordinates of the wall body associated with the wall column are obtained, the contour corresponding to the inflection point coordinates of the wall body associated with the wall column is fitted with the minimum circumscribed rectangle, whether the area ratio of the fitted circumscribed rectangle to the contour is greater than a preset area ratio threshold is judged, and if yes, the coordinates of the wall column are obtained according to the inflection point coordinates of the wall body associated with the wall column.
[0072] As a preferred embodiment, in the step S3, the coordinates of the door are obtained by the following way:
[0073] The mask of the door is clustered, the radius search is performed on the clustering result, the inflection point coordinates of the wall body associated with the door are obtained, the direction of the door is judged, and the coordinates of the door are obtained in combination with the inflection point coordinates of the wall body associated with the door.
[0074] As a preferred embodiment, in the step S3, the coordinates of the window are obtained by the following way:
[0075] The mask of the window is clustered, the radius search is performed on the clustering result, the inflection point coordinates of the wall body associated with the window are obtained, the direction of the window is judged, and the coordinates of the window are obtained in combination with the inflection point coordinates of the wall body associated with the window.
[0076] Specifically, in the process of obtaining the wall column, door and window coordinate information, the application uses a clustering and radius search method.
[0077] Optionally, the clustering method can use DBSCAN, which requires setting two parameters, search radius (eps) and minimum sample number (min_samples) contained in the radius, by setting a larger eps (20 in the application) and a smaller min_samples (1 in the application), and filtering non-core points, the final grouping result is obtained.
[0078] The radius search method needs to set the size of the radius (radius) artificially, and the value is set to 5 in the application. The coordinates of the reference component are traversed, and the coordinates of the reference component are taken as the center of the circle. The radius of the circle is constantly increased until the radius reaches the threshold value. If the circle contains the coordinates of the interest component, it means that the coordinates of the reference component are the reference points of the interest component. If the radius reaches the threshold value and still does not contain the interest component, it is considered that the reference component is irrelevant to the interest component. Taking the window on the wall as an example to illustrate this process: traverse the coordinates of the wall after cutting, take each coordinate as the center of the circle, if the circle contains the coordinates of the window, it is considered that the coordinate is the reference coordinate of the window, if the radius reaches the given threshold value, none of the circles drawn contains the window coordinates, it is considered that the coordinate is not the reference coordinate of the window.
[0079] More specifically, in the process of obtaining the wall column coordinates, i.e. combining the wall column coordinates with the wall coordinates, the radius search method can obtain the wall column reference wall coordinates. Using a similar idea of wall position correction, the x and y of the wall column are corrected respectively. Taking x as an example, the x of the coordinate within a given threshold value (5 in the application) from the x of the reference coordinate is set to the x of the reference coordinate.
[0080] In the process of obtaining the coordinates of the door, i.e. the combination of the door coordinates and the wall coordinates, the orientation of the door needs to be determined. The specific method is as follows: the maximum horizontal distance hor_dis_max and the maximum vertical distance ver_dis_max of the reference point coordinates are compared to determine whether the direction of the door is horizontal or vertical. If ver_dis_max > hor_dis_max, the door is in the vertical direction, otherwise the door is in the horizontal direction. If the door is in the horizontal direction, the vertical coordinates y1 of the coordinate point with the maximum vertical distance from any reference point and the vertical coordinates y2 of the reference point are compared. If y1 is greater than y2, the door is opened downward. In this way, the orientation of the door, i.e. left, right, up, and down, can be determined. If the door is opened to the left, the final coordinates obtained are (the maximum horizontal coordinate of the door mask, the minimum vertical coordinate of the reference coordinate) and (the maximum horizontal coordinate of the door mask, the maximum vertical coordinate of the reference coordinate). If the door is opened to the right, the final coordinates obtained are (the minimum horizontal coordinate of the door mask, the minimum vertical coordinate of the reference coordinate) and (the minimum horizontal coordinate of the door mask, the maximum vertical coordinate of the reference coordinate). If the door is opened upward, the final coordinates obtained are (the minimum horizontal coordinate of the reference coordinate, the maximum vertical coordinate of the door mask) and (the maximum horizontal coordinate of the reference coordinate, the maximum vertical coordinate of the door mask). If the door is opened downward, the final coordinates obtained are (the minimum horizontal coordinate of the reference coordinate, the minimum vertical coordinate of the door mask) and (the maximum horizontal coordinate of the reference coordinate, the minimum vertical coordinate of the door mask).
[0081] In the process of obtaining the coordinates of the window, i.e. the combination of the window and the wall coordinates, the orientation of the window needs to be determined. The specific method is as follows: find the minimum and maximum (hor_min, hor_max) in the horizontal direction and the minimum and maximum (ver_min, ver_max) in the vertical direction of the reference coordinates. If hor_max-hor_min > ver_max-ver_min, the window is in the horizontal direction, otherwise it is in the vertical direction. If it is a horizontal window, the final window coordinates obtained are (hor_min, ver_min+(ver_max-ver_min) / / 2) and (hor_max, ver_min+(ver_max-ver_min) / / 2). If it is a vertical window, the final window coordinates obtained are (hor_min+(hor_max-hor_min) / / 2, ver_min) and (hor_min+(hor_max-hor_min) / / 2, ver_max).
[0082] Figure 2 The final parameterization result of the example component in Figure 9 .
[0083] In the step S4, the corresponding inflection point under the scale number is obtained first, the corresponding picture is intercepted through the inflection point coordinates, the number is recognized by using the OCR recognition technology, and then the specific length represented by a final pixel point is obtained by dividing the distance between the inflection points:
[0084] First, the image is binarized, and the background pixel value is 0 and the line pixel value is 255. All 255 pixels are traversed in the horizontal direction. If the pixel values of the pixel points in the upward, downward, left and right directions within a certain length (5 in the application) are all 255, the point is an inflection point. All inflection points are traversed until the distance between two inflection points exceeds a threshold value (100 in the application). The image intercepted through the two inflection points is used as the input of the OCR recognition technology.
[0085] The OCR technology uses PaddleOCR trained by the Paddle team. The detection network uses a DB network, and the recognition network is CRNN. PaddleOCR provides a rich model library, which can be selected according to the needs. The model provided by PaddleOCR has been well trained and can recognize text, so there is no need for additional training.
[0086] Embodiment 2
[0087] Please refer to Figure 10 An AI-based building plan parameterization identification system, comprising, in sequence, a building plan acquisition module 1, a mask extraction processing module 2, and a component coordinate acquisition module 3, further comprising a scale recognition module 4 and an output module 5; the scale recognition module 4 is connected to the building plan acquisition module 1 and the output module 5 respectively; the component coordinate acquisition module 3 is connected to the output module 5; wherein:
[0088] The building plan acquisition module 1 is used to acquire the building plan to be processed;
[0089] The mask extraction processing module 2 is used to extract the mask of the components in the building plan by using a preset semantic segmentation model, the components including walls, wall columns, doors and windows; and the gaps between the masks are eliminated;
[0090] The component coordinate acquisition module 3 is used to acquire the inflection point coordinates of the walls according to the result of the mask extraction processing module 2; after the connecting walls are segmented, the coordinates of the wall columns, doors and windows are acquired by taking the inflection point coordinates of the walls as references;
[0091] The scale recognition module 4 is used to recognize the scale of the building plan, obtain the physical length corresponding to one pixel of the building plan Figure One
[0092] The output module 5 is configured to output the results of the component coordinate acquisition module 3 and the proportion identification module 4, and complete the parametric identification of the building plan.
[0093] Embodiment 3
[0094] A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the AI-based building plan parametric identification method according to Embodiment 1.
[0095] Embodiment 4
[0096] A computer device, comprising a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the AI-based building plan parametric identification method according to Embodiment 1.
[0097] Obviously, the above embodiments of the present application are merely exemplary for clearly illustrating the present application, and are not intended to limit the implementation modes of the present application. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, it is not necessary and also impossible to enumerate all the implementation modes. Any modification, equivalent replacement and improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the claims of the present application.
Claims
1. A parametric recognition method for architectural plan based on AI, characterized in that: The following steps are involved: S1, obtain the building plan to be processed; S2, using a preset semantic segmentation model to extract masks of components in the building plan, wherein the components include walls, pillars, doors, and windows; and eliminating gaps between the masks; S3, according to the result of step S2, obtaining the coordinates of the inflection points of the wall; after segmenting the connected walls, using the coordinates of the inflection points of the wall as a reference, obtaining the coordinates of the wall columns, doors, and windows; S4, identifying the scale of the building plan, and obtaining the physical length corresponding to one pixel of the building plan; S5, output the results of steps S3 and S4, and complete the parametric recognition of the building plan.
2. The AI-based architectural plan parameter recognition method according to claim 1 is characterized in that: In step S2, the semantic segmentation model identifies the components in the building plan by binary classification segmentation, and extracts the components after superimposing the recognition results; and eliminates the gaps between the components by closing operations.
3. The AI-based architectural plan parameter recognition method according to claim 1, characterized in that: In step S3, the coordinates of the inflection points of the wall are obtained by: Polygon fitting is performed on the mask of the wall to obtain a wall polygon; the coordinates of the wall polygon are corrected; after the correction is completed, the non-inflection point coordinates of the wall polygon are removed, and the connected walls in the wall polygon are segmented to obtain the inflection point coordinates of the wall.
4. The AI-based architectural plan parameter recognition method according to claim 3 is characterized in that: In step S3, the non-inflection point coordinates of the wall polygon are removed by: Points that are identical at the beginning and end or are continuously repeated in the coordinates of the wall polygon are filtered out. After filtering, the number of coordinate points in the outline of the wall polygon is counted, and those with a number of 1 are regarded as edge points, and those with a number of 2 are regarded as connection points. The coordinates of the wall polygon are traversed: the connection points and the points where the x and y coordinates of the preceding and following coordinate points are not equal are retained, and the other points are discarded, thereby completing the removal of non-inflection point coordinates of the wall polygon.
5. The AI-based architectural plan parameter recognition method according to claim 1, characterized in that: In step S3, the coordinates of the wall column are obtained in the following manner: Cluster the masks of the wall columns, perform radius search on the clustering results, and obtain the inflection point coordinates of the wall associated with the wall column; perform minimum circumscribed rectangle fitting on the contour corresponding to the inflection point coordinates of the wall associated with the wall column, and determine whether the area ratio of the fitted circumscribed rectangle to the contour is greater than a preset area ratio threshold. If so, obtain the coordinates of the wall column based on the inflection point coordinates of the wall associated with the wall column.
6. The AI-based architectural plan parameter recognition method according to claim 1, characterized in that: In step S3, the coordinates of the door are obtained by: Cluster the door masks and perform radius search on the clustering results to obtain the inflection point coordinates of the wall associated with the door. Determine the door's orientation and obtain the door coordinates based on the inflection point coordinates of the wall associated with the door.
7. The AI-based architectural plan parameter recognition method according to claim 1, characterized in that: In step S3, the coordinates of the window are obtained by: Cluster the window masks, perform radius search on the clustering results, and obtain the inflection point coordinates of the wall associated with the window; determine the direction of the window, and obtain the window coordinates by combining the inflection point coordinates of the wall associated with the window.
8. An AI-based parametric recognition system for architectural floor plans, characterized by: The invention comprises a building plan acquisition module (1), a mask extraction processing module (2) and a component coordinate acquisition module (3) which are connected in sequence, and also comprises a scale recognition module (4) and an output module (5); the scale recognition module (4) is respectively connected to the building plan acquisition module (1) and the output module (5); the component coordinate acquisition module (3) is connected to the output module (5); wherein: The building plan acquisition module (1) is used to acquire the building plan to be processed; The mask extraction processing module (2) is used to extract masks of components in the building plan using a preset semantic segmentation model, wherein the components include walls, wall columns, doors and windows; and eliminate gaps between the masks; The component coordinate acquisition module (3) is used to obtain the inflection point coordinates of the wall according to the result of the mask extraction processing module (2); after segmenting the connected walls, the coordinates of the inflection points of the walls are used as a reference to obtain the coordinates of the wall columns, doors and windows; The scale recognition module (4) is used to recognize the scale of the building plan and obtain the physical length corresponding to one pixel of the building plan; The output module (5) is used to output the results of the component coordinate acquisition module (3) and the scale recognition module (4), thereby completing the parametric recognition of the building plan.
9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the AI-based architectural plan parameter recognition method according to any one of claims 1 to 7 are implemented.
10. A computer device, characterized in that: The method comprises a storage medium, a processor, and a computer program stored in the storage medium and executable by the processor, wherein when the computer program is executed by the processor, the steps of the AI-based parametric recognition method for architectural floor plans are implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
House map parameterization and re-editing modeling method
CN107122528A
Construction house type semantic segmentation map vectorization method and device
CN114092491A