House plan processing method and system, electronic equipment and program product
By segmenting instances and constructing undirected graph structures from 2D floor plans, the problem of feature extraction and 3D reconstruction of floor plans in non-residential scenarios is solved, achieving efficient and accurate floor plan recognition and 3D modeling.
Patent Information
- Application Number
- CN202511035477.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-12-12
AI Technical Summary
Existing technologies have weak feature extraction capabilities for floor plans in non-residential scenarios, cannot correct accumulated errors, and have incomplete topological structures, resulting in low efficiency and high cost of 3D reconstruction.
By segmenting two-dimensional floor plans into instances, calculating the minimum bounding rectangle and centerline, generating an undirected graph structure, integrating geometric information, constructing a structured topological model, supporting the reconstruction of complex structures such as slanted walls, and optimizing the model through online learning.
It improves the accuracy and applicability of floor plan recognition and 3D reconstruction, reduces the false recognition rate and the missed recognition rate, and enhances the adaptability and robustness to complex floor plan structures.
Smart Images

Figure CN121120975A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a house type drawing processing method and system, electronic equipment and program product. BACKGROUND
[0002] In the field of architectural design and real estate, house type drawings are an intuitive expression of two-dimensional layout, which is crucial for space planning, decoration design and virtual display. However, traditional three-dimensional modeling methods rely on manual measurement and computer-aided design (CAD) tools for reconstruction, which is not only inefficient and costly, but also difficult to implement on a large scale. Although computer vision and deep learning have made progress in image recognition and segmentation, they perform poorly in non-residential scenarios, resulting in weak feature extraction, uncorrectable error accumulation and incomplete topological structure. SUMMARY
[0003] The embodiments of the present application provide a house type drawing processing method, system, electronic equipment and computer program product to alleviate or solve one or more technical problems in the prior art.
[0004] In a first aspect, the embodiments of the present application provide a house type drawing processing method applied to a house type drawing processing server, which comprises: performing instance segmentation processing on a target two-dimensional house type drawing to identify a plurality of mask pixel regions of target instances, wherein the target instances include at least one of a wall, a door and a window; for each identified target instance, calculating a minimum bounding rectangle corresponding to the mask pixel region thereof, wherein the minimum bounding rectangle is used to represent the outer contour line of the target instance, and the width of the minimum bounding rectangle is used to represent the thickness of the target instance; extracting the center line of the minimum bounding rectangle of each target instance respectively to obtain a first line segment set; generating a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure includes a plurality of vertices and a plurality of connecting edges, each connecting edge is connected between two vertices and is used to represent an independent wall; adding first geometric information and second geometric information in the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information includes the center point information and the length information of the minimum bounding rectangle corresponding to the target instance of the door or window instance type, the first geometric information includes the width information of the minimum bounding rectangle corresponding to the target instance of the wall instance type, the target undirected graph structure is used to represent the structured topological information of the target objects in the target two-dimensional house type drawing, and the target objects include at least one of the wall, the door and the window.
[0005] In a second aspect, the embodiments of the present application provide a house type drawing processing method, applied to a house type drawing processing server, and the method comprises: obtaining a target two-dimensional house type drawing; inputting the target two-dimensional house type drawing into a pre-trained house type drawing processing model, wherein the house type drawing processing model is configured to: perform instance segmentation processing on the target two-dimensional house type drawing to identify a plurality of mask pixel regions of target instances, wherein the target instances comprise at least one of a wall, a door, and a window; for each identified target instance, calculate a minimum bounding rectangle corresponding to the mask pixel region of the target instance, wherein the minimum bounding rectangle is used to represent an outer contour line of the target instance, and a width of the minimum bounding rectangle is used to represent a thickness of the target instance; extract a center line of the minimum bounding rectangle of each target instance respectively to obtain a first line segment set; generate a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure comprises a plurality of vertices and a plurality of connection edges, each connection edge is connected between two vertices and is used to represent an independent wall; add first geometric information and second geometric information in the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information comprises center point information and length information of the minimum bounding rectangle corresponding to the target instance of which the instance type is a door or a window, the second geometric information comprises width information of the minimum bounding rectangle corresponding to the target instance of which the instance type is a wall, the target undirected graph structure is used to represent structured topological information of target objects in the target two-dimensional house type drawing, and the target objects comprise at least one of a wall, a door, and a window; and obtaining the target undirected graph structure.
[0006] In a third aspect, the embodiments of the present application provide a house type drawing processing system, which comprises: a house type drawing processing client, configured to perform scale registration of an initial two-dimensional house type drawing in a three-dimensional coordinate system to generate a target two-dimensional house type drawing, and send a house type drawing processing request to a house type drawing processing server, wherein the house type drawing processing request is used to request the house type drawing processing server to generate a target undirected graph structure corresponding to the target two-dimensional house type drawing; the house type drawing processing server, configured to respond to the house type drawing processing request, implement the method of the first aspect or the second aspect, and return the target undirected graph structure to the house type drawing processing client; and the house type drawing processing client is further configured to perform scale registration of the target undirected graph structure in a two-dimensional coordinate system to generate a three-dimensional house type drawing corresponding to the target two-dimensional house type drawing, and display the three-dimensional house type drawing.
[0007] In a fourth aspect, the embodiments of the present application provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method of any one of the embodiments of the present application when executing the computer program.
[0008] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the method of any of the embodiments of the present application.
[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program. The computer program is executed by a processor to implement the method of any of the embodiments of the present application.
[0010] According to the technical scheme of the embodiments of the present application, by extracting structured topological information from a two-dimensional house plan, high-precision identification and geometric modeling of target instances such as walls, doors and windows are realized. Specifically, first, instance segmentation is performed on the target two-dimensional house plan to obtain the mask pixel area of each target instance. Then, the minimum circumscribed rectangle is used to replace the traditional axis-aligned bounding box, which improves the fitting accuracy of irregular or inclined wall contours and enhances the robustness of geometric expression. Further, the center line is extracted to form a line segment set, and a directed graph structure is constructed accordingly, so as to more accurately reflect the connection relationship and overall topological logic between walls. Finally, the geometric information such as the center point, length of doors and windows and wall thickness is fused in the graph structure to generate a unified target directed graph structure as the structured vector expression of the house plan, which can support the topological reconstruction of special structures such as inclined walls and arc-shaped glass curtain walls, effectively solving the problems of poor generalization, rigid geometric processing and incomplete topological structure of related technologies in non-residential scenes, and significantly improving the accuracy and applicability of house plan identification and three-dimensional reconstruction.
[0011] The above description is only a summary of the technical scheme of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0012] In the drawings, like reference numerals refer to same or similar components throughout the several views, unless otherwise specified. These drawings are not necessarily to scale. It should be understood that these drawings only depict some embodiments in accordance with the present application and should not be considered as limiting the scope of the present application.
[0013] Figure 1 An architectural diagram of a house plan processing system provided by an embodiment of the present application is shown.
[0014] Figure 2 An architectural diagram of a house plan processing system provided by an embodiment of the present application is shown.
[0015] Figure 3 A flowchart of a house plan processing method provided by an embodiment of the present application is shown.
[0016] Figure 4 An exemplary schematic diagram showing a target two-dimensional house plan.
[0017] Figure 5 An exemplary schematic diagram showing the minimum bounding rectangle in the example of the present application.
[0018] Figure 6 An exemplary schematic diagram showing the second set of line segments in the example of the present application.
[0019] Figure 7 An exemplary schematic diagram showing a candidate undirected graph structure in the example of the present application.
[0020] Figure 8 An exemplary schematic diagram showing a three-dimensional house plan in the example of the present application.
[0021] Figure 9 A flowchart showing the processing method of a house plan provided by the embodiments of the present application.
[0022] Figure 10 An exemplary schematic diagram showing a target two-dimensional house plan.
[0023] Figure 11 An exemplary schematic diagram showing a three-dimensional house plan constructed for Figure 10 An exemplary schematic diagram showing a three-dimensional house plan constructed for
[0024] Figure 12 An exemplary schematic diagram showing a three-dimensional house plan constructed for Figure 13 An exemplary application example diagram of the technical solutions of the embodiments of the present application.
[0025] Figure 14 A block diagram of an electronic device provided by the embodiments of the present application is shown. DETAILED DESCRIPTION
[0026] In the following, only some exemplary embodiments are simply described. As can be realized by those skilled in the art, the described embodiments can be modified in various different ways without departing from the concept or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature rather than limiting.
[0027] In order to facilitate understanding of the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies can be combined with the technical solutions of the embodiments of the present application in any manner as optional solutions, and all of them belong to the protection scope of the embodiments of the present application.
[0028] In recent years, with the development of computer vision and deep learning technology, especially in the field of image recognition and segmentation, significant progress has been made, such as Mask Region-based Convolutional Neural Network (Mask R-CNN) segmentation technology, Open Source Computer Vision Library (OpenCV) technology. The development of these technologies provides new possibilities for automatically extracting structured spatial information (such as the geometric relationship of walls, doors and windows) from non-standardized house type drawings and generating three-dimensional models. However, there are still many challenges in how to efficiently and accurately complete this process.
[0029] Firstly, in terms of understanding and segmentation of complex images, house type drawings often contain noise (such as annotated text, furniture symbols) and diverse drawing styles, therefore, the algorithm is easily disturbed in the accurate segmentation of walls, doors and windows, as well as the generation of Mask and classification, leading to contour extraction errors. Secondly, in the process of geometric structure standardization reconstruction, the segmented binary mask needs to be converted into geometric parameters with engineering significance (such as wall thickness, center line). However, existing methods lack robustness in processing such as fitting of the circumscribed rectangle of irregular contours and merging of collinear line segments, affecting the accuracy of the topological structure. Furthermore, the automatic construction of the geometric topological structure of the wall from discrete vector line segments requires solving key problems such as collinear merging and short line segment filtering, and traditional image processing algorithms are difficult to balance geometric accuracy and topological logic.
[0030] The related art has the following disadvantages in the scheme of generating a three-dimensional space model from a house type picture.(1) The model generalization ability is insufficient due to the training data bias, that is, the model performs poorly in non-residential scenarios due to the data domain difference. The existing house type identification technology is mainly based on residential plan training, and the house type structure of residential and non-residential (such as park, office, and industrial plant) is significantly different. For example, the house type result of non-residential usually has a large area of long wall, non-standard door and window layout, etc., which makes the model weak in feature extraction ability for non-residential scenarios, and is prone to misidentification (such as misjudging equipment as doors and windows) or missing identification (long wall fracture) and other problems.(2) The error cannot be continuously optimized due to the lack of a closed loop, that is, the error accumulation cannot be corrected due to the lack of a dynamic optimization mechanism. The related technology relies on a static model, and the user cannot interactively correct the identification result. The error result cannot be fed back to the system, and the model iteration needs to be manually re-labeled data, which is high in cost and long in cycle, and is difficult to adapt to the diversified needs of the park scene.(3) The topology structure is incomplete due to the limitation of the post-processing algorithm, that is, the geometric processing rigidity is difficult to adapt to the complex non-residential house type structure. The related technology is prone to topology fracture or redundant vertices in the post-processing algorithm (such as center line based on the outer bounding box for line segment merging), which affects the three-dimensional reconstruction accuracy.
[0031] To overcome the above shortcomings, the embodiments of the present application aim to provide a method capable of efficiently and accurately extracting structured space information from a two-dimensional house type picture and generating a three-dimensional model. By improving instance segmentation, line segment post-processing algorithm, geometric structure reconstruction, and dynamic optimization mechanism, the above problems are solved or alleviated, thereby improving the robustness and application range of the system.
[0032] For ease of understanding, first, the system architecture of the technical scheme of the present application is introduced in combination with Figure 1 and Figure 2 .
[0033] Figure 1 The architecture diagram of the house type picture processing system provided by the embodiments of the present application is shown. As shown in Figure 1 , the house type picture processing system includes a house type picture processing client and a house type picture processing server.
[0034] The house type diagram processing client can be hardware such as a mobile phone, a personal computer, a tablet computer, a wearable device, and the like. The house type diagram processing client can also be an application (APP) or a software module deployed on an electronic device. Through a user interface provided by the house type diagram processing client, a user can select or input an initial two-dimensional house type diagram. The initial two-dimensional house type diagram can be a two-dimensional house type diagram of a residential building or a two-dimensional house type diagram of a non-residential building, including but not limited to a two-dimensional house type diagram of a park, a two-dimensional house type diagram of an office, a two-dimensional house type diagram of an industrial plant, and the like.
[0035] The house type diagram processing client can perform scale registration of the initial two-dimensional house type diagram in a three-dimensional coordinate system to generate a target two-dimensional house type diagram. For example, based on a registration scale value, coordinate values of the initial two-dimensional house type diagram are adjusted, so that the generated target two-dimensional house type diagram can be accurately converted with a spatial coordinate system of a three-dimensional scene. Further, the house type diagram processing client sends a house type diagram processing request to a house type diagram processing server. The house type diagram processing request is used to request the house type diagram processing server to generate a target undirected graph structure corresponding to the target two-dimensional house type diagram. The target undirected graph structure is used to represent structured topological information of a target object in the target two-dimensional house type diagram, and the target object includes at least one of a wall, a door, and a window.
[0036] The house type diagram processing server can be deployed on one or more subjects, which can be an application, a service, an instance, a functional module in a software form, a virtual machine, a container, or a cloud server, or a hardware device or a hardware chip having a data processing function, and the like. The house type diagram processing server responds to the house type diagram processing request and generates a target undirected graph structure by implementing the house type diagram processing method provided in the present application, and returns the target undirected graph structure to the house type diagram processing client.
[0037] The house type diagram processing client performs scale registration of the target undirected graph structure in a two-dimensional coordinate system to generate a three-dimensional house type diagram corresponding to the target two-dimensional house type diagram, and displays the three-dimensional house type diagram. Illustratively, the house type diagram processing client receives data results of the target undirected graph structure, and adjusts coordinate values of the target undirected graph structure by applying the aforementioned registration scale value. The three-dimensional house type diagram is constructed based on the structured topological information in the target undirected graph structure. For example, the structured topological information includes a plurality of vertices and a plurality of connection edges, each connection edge is connected between two vertices and is used to represent an independent wall; and further includes geometric information of doors and windows, such as center point information and length information of the doors and windows. The house type diagram processing client takes the vertices as vertices of the walls and takes the connection edges as the walls to construct a three-dimensional wall model. Then, according to the center point information and the length information of the doors and windows, door cuboids and window cuboids are generated and embedded into the three-dimensional wall model at corresponding positions to generate a three-dimensional house type diagram corresponding to the initial two-dimensional house type diagram. Further, the house type diagram processing client displays the three-dimensional house type diagram to the user.
[0038] Figure 2 This diagram illustrates the architecture of the floor plan processing system provided in an embodiment of this application. Figure 2 As shown, the floor plan processing system includes: a floor plan processing client and a floor plan processing server, wherein the floor plan processing client can be... Figure 1 The floor plan processing client and the floor plan processing server in the system specifically include the floor plan processing server and the model processing server.
[0039] The floor plan processing server and the model processing server can be deployed on one or more entities, which can be applications, services, instances, functional modules in software form, virtual machines, containers or cloud servers, or hardware devices or hardware chips with data processing functions.
[0040] The model processing server is used to train the floor plan processing model, and the floor plan processing server is used to deploy the pre-trained floor plan processing model. For example, the training data for the floor plan processing model includes residential two-dimensional floor plans and non-residential two-dimensional floor plans. During application, the model processing server updates the floor plan processing model, that is, it adjusts the model parameters of the floor plan processing model and sends the updated model parameters to the floor plan processing server, causing the floor plan processing server to update the floor plan processing model.
[0041] The floor plan processing server responds to the floor plan processing request by inputting the target 2D floor plan into the floor plan processing model. The floor plan processing model implements the floor plan processing method provided in this embodiment of the application to generate the target undirected graph structure. The floor plan processing server obtains the target undirected graph structure output by the floor plan processing model and returns the target undirected graph structure to the floor plan processing client.
[0042] The floor plan processing client performs 2D coordinate system registration on the target undirected graph structure, generates a 3D floor plan corresponding to the target 2D floor plan, and displays the 3D floor plan. See details below. Figure 1 Related descriptions.
[0043] Users can edit the 3D floor plans displayed by the floor plan processing client, for example, correcting the recognition results of walls, doors, and windows in the 3D floor plan. The floor plan processing client uses the edited 3D floor plan as the mask identifier data for the target 2D floor plan, and compares it with the target 2D floor plan. Figure 1 The data is sent to the model processing server. The model processing server adds the target 2D floor plan and mask identifier data to the training data and updates the floor plan processing model, that is, adjusts the model parameters of the floor plan processing model and sends the updated model parameters (such as weight parameters) to the floor plan processing server, so that the floor plan processing server updates the floor plan processing model.
[0044] It should be noted that the application scenarios or application examples provided in the embodiments of the present application are for the convenience of understanding, and the application of the technical solutions in the embodiments of the present application is not specifically limited. In addition, the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0045] The technical solutions of the present application and how the technical solutions of the present application solve the foregoing technical problems will be described in detail below with specific embodiments. Several specific embodiments listed can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described in detail below with reference to the drawings.
[0046] Figure 3 A flowchart of a processing method of a house type drawing provided by an embodiment of the present application is shown. The method can be applied to a house type drawing processing server, for example, executed by the house type drawing processing server shown in Figure 1 As shown in Figure 3 The method can include steps S301 to S305.
[0047] Step S301: performing instance segmentation processing on a target two-dimensional house type drawing to identify a plurality of mask pixel regions of target instances, wherein the target instances include at least one of a wall, a door and a window.
[0048] Figure 4 An exemplary schematic diagram of a target two-dimensional house type drawing is shown. The target two-dimensional house type drawing can be an original two-dimensional house type drawing or a two-dimensional house type drawing after scale configuration by a house type drawing processing client.
[0049] Exemplarily, a deep learning model (such as Mask R-CNN) can be used to perform pixel-level identification and classification on a plurality of target objects (including at least one of a wall, a door and a window) in the target two-dimensional house type drawing, and output a binary mask image corresponding to each target instance, i.e. a mask pixel region. The mask pixel region of each target instance represents the specific position and shape of the corresponding target object in the image space.
[0050] Step S302: for each identified target instance, calculating a minimum circumscribed rectangle corresponding to the mask pixel region thereof, wherein the minimum circumscribed rectangle is used to represent the outer contour line of the target instance, and the width of the minimum circumscribed rectangle is used to represent the thickness of the target instance.
[0051] After obtaining the mask pixel region of each target instance, the system further performs geometric analysis thereon, calculates the minimum circumscribed rectangle of each mask pixel region, and takes the minimum circumscribed rectangle as the outer contour line of the target instance, and the width of the minimum circumscribed rectangle is used to represent the thickness of the target instance. Figure 5 An exemplary schematic diagram of the minimum circumscribed rectangles calculated in the embodiments of the present application is shown. As shown in Figure 5 each rectangle is a minimum circumscribed rectangle, that is, each rectangle represents the outer contour line of a target instance, and the width of each rectangle represents the thickness of the corresponding target instance.
[0052] Each target instance corresponds to an instance type, that is, the type of the target object corresponding thereto, such as a wall, a door, or a window. Exemplarily, for a target instance of which the instance type is a door or a target instance of which the instance type is a window, the instance data thereof is backed up, then the instance type is modified to a wall, and further, for the mask pixel region of which the instance type is a wall, the minimum circumscribed rectangle thereof is calculated. In this way, the system only needs to calculate the minimum circumscribed rectangle for the target instance of which the instance type is a wall, and the minimum circumscribed rectangle obtained is taken as the outer contour line of the wall, and the width of the minimum circumscribed rectangle obtained is taken as the thickness of the wall, so that the algorithm complexity in the process of constructing the geometric topology structure of the wall can be reduced.
[0053] The outer bounding box commonly used in the related art does not consider the actual shape of the object, but only cares about the maximum range thereof in the coordinate system, and thus may contain a large amount of non-target region, leading to misidentification or missed identification of the wall. In the embodiments of the present application, the minimum circumscribed rectangle refers to a rectangle that can completely contain the mask pixel region and has the minimum area, which can be a rectangle of any angle and does not necessarily align with the coordinate axis. Therefore, for a wall of irregular shape or with obvious inclination, the minimum circumscribed rectangle can provide a more accurate boundary description and has higher geometric adaptability and topological consistency, and can avoid misidentification or missed identification of the irregular wall.
[0054] Step S303: Extract the center line of each minimum circumscribed rectangle of each target instance to obtain a first line segment set.
[0055] For each minimum circumscribed rectangle, the center line thereof is extracted, so as to construct a first line segment set. Specifically, for a rectangular structure, the center line is defined as a straight line segment connecting the midpoints of the long sides of the rectangle. By extracting the center line of the minimum circumscribed rectangle of all walls, the system generates a set of line segments, denoted as a first line segment set. The line segment set retains the main direction and length information of the wall, and can more accurately reflect the trend of the wall and the mutual connection relationship.
[0056] Step S304: generating a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure comprises a plurality of vertices and a plurality of connection edges, each connection edge is connected between two vertices and is used to represent an independent wall.
[0057] Exemplarily, according to the end point connection relationship between the line segments, the two end points of each line segment are mapped as vertices in the graph, and the line segment itself is taken as a connection edge connecting the two vertices, thereby constructing a preliminary undirected graph structure, referred to as a candidate undirected graph structure. Unlike the modeling manner in the related art which relies on fixed rules or simple geometric features, the embodiment of the present application can more naturally and accurately express the connection relationship and geometric topology logic between the walls by means of the undirected graph structure, and significantly improves the spatial structured expression capability of the house type drawing.
[0058] In an implementation, in step S304, the following can be included: performing a line segment post-processing operation on the first line segment set to obtain a second line segment set; generating an initial undirected graph structure based on the second line segment set, and performing a graph structure post-processing operation on the initial undirected graph structure to obtain the candidate undirected graph structure.
[0059] By Figure 5 It can be seen that the target instances such as walls, doors and windows are separated from each other. For the geometric topology structure of the house type drawing, these discrete instances must be spliced and assembled, so the first line segment set obtained by extracting the rectangular center lines needs to be subjected to alignment, merging and splicing and other line segment post-processing operations to generate a second line segment set, as shown in Figure 6 . Figure 6 Each line segment in the color in
[0060] Then, the initial undirected graph structure is generated based on the second line segment set. The alignment, merging and splicing and other graph structure post-processing operations are performed on the undirected graph structure to generate the candidate undirected graph structure, as shown in Figure 7 . By sequentially performing the post-processing optimization on the line segment set and the graph structure, the accuracy and completeness of the wall geometric topology structure can be improved.
[0061] Step S305: adding the first geometric information and the second geometric information in the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information comprises the center point information and the length information of the minimum circumscribed rectangle corresponding to the target instance with the instance type of door or window, the first geometric information comprises the width information of the minimum circumscribed rectangle corresponding to the target instance with the instance type of wall, and the target undirected graph structure is used to represent the structured topology information of the target object in the target two-dimensional house type drawing, and the target object comprises at least one of the wall, the door and the window.
[0062] Exemplarily, the first geometric information can be obtained based on the door or window instance data backed up in step S302, and the center point information of the minimum bounding rectangle of the door or window represents the position of the door or window. The second geometric information is the thickness information of the wall. The target undirected graph structure is used to represent the structured topological information of the target objects in the target two-dimensional house plan, that is, the vector geometric structure of the target two-dimensional house plan.
[0063] The first geometric information can be sent to the house plan processing client as processing result data together with the target undirected graph structure.
[0064] According to the house plan processing method provided in the embodiments of the present application, the high-precision recognition and geometric modeling of the target instances such as walls, doors and windows are realized by extracting the structured topological information from the two-dimensional house plan. Specifically, first, the instance segmentation is performed on the target two-dimensional house plan to obtain the mask pixel region of each target instance; then, the minimum bounding rectangle is used to replace the traditional axis-aligned bounding box, which improves the fitting precision of the contour of irregular or inclined walls and enhances the robustness of the geometric expression; further, the center line is extracted to form a line segment set, and the undirected graph structure is constructed according to the line segment set, so as to more accurately reflect the connection relationship and overall topological logic between walls; finally, the geometric information such as the center point, length of the door and window and the thickness of the wall is fused in the graph structure to generate a unified target undirected graph structure as the structured vector expression of the house plan, which can support the topological reconstruction of special structures such as inclined walls and arc-shaped glass curtain walls, effectively solves the problems such as poor generalization, strong geometric processing rigidity and incomplete topological structure of related technologies in non-residential scenes, and significantly improves the accuracy and applicability of the house plan recognition and three-dimensional reconstruction.
[0065] In an implementation manner, the line segment post-processing operation described in the foregoing can include: traversing each line segment in the first line segment set, merging the line segments that are collinear and have adjacent end points, where the adjacent end points refer to the distance between the end points of the two line segments being less than a preset threshold; traversing the end points of each line segment in the first line segment set, in the case that the distance between any two end points is less than a preset threshold, extending the corresponding line segment in the direction of the line segment corresponding to the two end points, and taking the intersection point of the extended lines as a new end point to realize the connection processing between the line segments; traversing each line segment after the connection processing, inserting a new end point at the intersection point of the intersecting line segments to truncate the line segment into a plurality of sub-line segments, and adding the plurality of sub-line segments to the first line segment set to obtain a second line segment set.
[0066] For example, there are three line segments A, B and C in the first line segment set, where A and B are collinear but the end points are not directly connected, and the distance between their end points is 1 cm, which is less than the preset threshold 2 cm, so A and B are merged into one line segment. Then, consider the end point distance of line segments B and C is also 1 cm, extend B and C until they intersect, and connect the two with the intersection point as the new end point. Finally, if the connected line segment intersects with another line segment D, then the two line segments are broken at the intersection point, generating multiple sub-line segments and adding them to the first line segment set to form the second line segment set.
[0067] This line segment post-processing operation can effectively optimize the continuity and integrity of the wall center line, so that the disconnected or misaligned wall caused by measurement error or inaccurate image segmentation can be correctly connected and aligned. By merging line segments with collinear end points, extending to connect adjacent end points, and inserting new end points to cut off intersecting line segments, not only the consistency and accuracy of the floor plan geometry are improved, but also the ability of subsequent spatial structured expression based on the undirected graph model is enhanced, which helps to improve the authenticity and reliability of the three-dimensional reconstruction result.
[0068] In an embodiment, the line segment post-processing operation described above can include: converting the second line segment set into an initial undirected graph structure according to the end point connection relationship between the line segments in the second line segment set, where the end points of each line segment are used as vertices in the initial undirected graph structure, and the line segments are used as connection edges connecting two vertices in the initial undirected graph structure; performing horizontal alignment processing and vertical alignment processing on the connection edges in the initial undirected graph structure, merging collinear connection edges, and removing connection edges with a length less than a preset threshold to obtain a candidate undirected graph structure.
[0069] In the initial undirected graph structure, there are several connection edges, some of which are close to the horizontal or vertical direction, but due to image recognition errors, their angles are slightly deviated. The initial undirected graph structure is processed for horizontal and vertical alignment. That is, the connection edge close to the horizontal direction is directly adjusted to be horizontal, for example, a connection edge with an angle of 5° with the horizontal line is adjusted to be strictly horizontal, and the position of the node connected to it is moved accordingly. Similarly, the connection edge close to the vertical direction is adjusted to be completely vertical by adjusting the position of its vertex. After processing, all connection edges are traversed again, and collinear and continuous edges are merged into one edge, and short line segments with a length less than a certain threshold (such as the preset threshold described above) are removed, thereby obtaining a more regular and topologically clear candidate undirected graph structure.
[0070] The line segment post-processing operation effectively improves the standardization and consistency of the wall trend in the house type drawing by geometric alignment optimization of the connecting edges, and reduces the topological confusion caused by recognition errors. Merging collinear edges and removing short edges further simplifies the graph structure, improves the efficiency and accuracy of subsequent spatial analysis and three-dimensional modeling, and enhances the robustness and engineering usability of the structured expression of the house type drawing.
[0071] Further, the house type drawing processing client performs scale registration of the target undirected graph structure in a two-dimensional coordinate system, generates a three-dimensional house type drawing corresponding to the target two-dimensional house type drawing, and displays the three-dimensional house type drawing, as shown in Figure 8
[0072] Figure 9 A flowchart of a house type drawing processing method provided by an embodiment of the present application is shown. The method can be applied to a house type drawing processing server, for example, executed by a house type drawing processing server as shown in Figure 2 As shown in Figure 9 The method can include the following steps:
[0073] Step S901: Obtain a target two-dimensional house type drawing.
[0074] Step S902: Input the target two-dimensional house type drawing into a pre-trained house type drawing processing model, wherein the house type drawing processing model is used to implement the method of steps S301 to S305 to generate a target undirected graph structure.
[0075] Step S903: Obtain the target undirected graph structure.
[0076] The house type drawing processing model generates the target undirected graph structure by executing the method of steps S301 to S305, and the specific implementation and technical effects can be referred to the description above, which will not be repeated here.
[0077] The training data of the house type drawing processing model includes house type drawings and labeled data of house type drawings, wherein the house type drawings include residential two-dimensional house type drawings and non-residential two-dimensional house type drawings. Based on these training data, the house type drawing processing model is iteratively trained. Each iteration can use a house type drawing as a target two-dimensional house type drawing, execute the method of steps S301 to S305 by the house type drawing processing model to generate an undirected graph structure, and adjust the model parameters of the house type drawing processing model through the generated undirected graph structure and its corresponding labeled data.
[0078] Through targeted enhancement and training optimization of non-residential data, the recognition robustness of long walls, irregular walls, or non-standard doors and windows can be improved, and field adaptive modeling can be realized. Figure 10 An exemplary schematic diagram showing a target two-dimensional house plan can be seen, which is a complex office area large-area house plan. According to the technical solution of the embodiment of the present application, a three-dimensional house plan can be generated for such a large-area complex house plan structure, as shown in Figure 11 In actual application, for the data sets of park two-dimensional house plan, office area two-dimensional house plan, industrial plant two-dimensional house plan, etc., according to the technical solution of the embodiment of the present application, the wall segmentation mean average precision (MAP) can be improved by more than 20%, and the long wall breaking rate can be reduced by 60%.
[0079] Exemplarily, the house plan processing model is provided with an online learning mechanism, which can automatically update the model at a preset time interval and release the house plan processing model in gray, reducing the cost of manual intervention, and ensuring that the system becomes more accurate in real scenarios through continuous learning mechanism.
[0080] In an implementation, the method of the embodiment of the present application can further include: the house plan processing server sends a target undirected graph structure to the house plan processing client, wherein the house plan processing client is used to generate a three-dimensional house plan corresponding to the target two-dimensional house plan from the target undirected graph structure, and display the three-dimensional house plan for user editing; the model processing server obtains the edited three-dimensional house plan, and adjusts the model parameters of the house plan processing model by using the target undirected graph structure and the edited three-dimensional house plan.
[0081] Exemplarily, the user can edit the three-dimensional house plan displayed by the house plan processing client, for example, correct the recognition results of walls, doors and windows in the three-dimensional house plan. The house plan processing client sends the edited three-dimensional house plan as mask identification data of the target two-dimensional house Figure 1 to the model processing server. The model processing server adds the target two-dimensional house plan and the mask identification data to the training data, and updates the house plan processing model, that is, adjusts the model parameters of the house plan processing model, and sends the updated model parameters (such as weight parameters, etc.) to the house plan processing server, so that the house plan processing server updates the house plan processing model.
[0082] In the technical solution of the embodiment of the present application, by providing a visual editing tool, the user can manually adjust the wall connection relationship or supplement the missed recognition of doors and windows, and the correction result is synchronized to the three-dimensional house plan in real time, and the user's correction result is automatically fed back to the training data set of the house plan processing model, driving the house plan processing model to dynamically optimize, forming a closed-loop logic of misrecognition / missed recognition→user correction→data backflow→model retraining→production environment update→reduction of future errors.
[0083] Figure 12and Figure 13 An application example of the technical solutions of the embodiments of the present application is shown, and specific reference can be made to the corresponding description in the foregoing, which will not be described here again. In this example, a full-process solution of "high-precision recognition-user interaction correction-model self-evolution" can be constructed for the special needs of a park or an office scenario.
[0084] Corresponding to the application scenarios and methods of the method provided by the embodiments of the present application, the embodiments of the present application also provide a processing device for a house type drawing, which is applied to a house type drawing processing server. The device comprises: a segmentation processing module, configured to perform instance segmentation processing on a target two-dimensional house type drawing to identify a mask pixel region of a plurality of target instances, wherein the target instances comprise at least one of a wall, a door and a window; a minimum circumscribed rectangle determination module, configured to calculate, for each identified target instance, a minimum circumscribed rectangle corresponding to the mask pixel region of the target instance, wherein the minimum circumscribed rectangle is used to represent an outer contour line of the target instance, and a width of the minimum circumscribed rectangle is used to represent a thickness of the target instance; a first line segment set determination module, configured to extract a center line of the minimum circumscribed rectangle of each target instance to obtain a first line segment set; a candidate undirected graph structure construction module, configured to generate a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure comprises a plurality of vertices and a plurality of connection edges, each connection edge is connected between two vertices and is used to represent an independent wall; and a target undirected graph structure generation module, configured to add first geometric information and second geometric information in the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information comprises center point information and length information of the minimum circumscribed rectangle corresponding to the target instance of which the instance type is a door or a window, and the second geometric information comprises width information of the minimum circumscribed rectangle corresponding to the target instance of which the instance type is a wall, and the target undirected graph structure is used to represent structured topological information of a target object in the target two-dimensional house type drawing, the target object comprising at least one of a wall, a door and a window.
[0085] In an implementation, the candidate undirected graph structure construction module is specifically configured to: perform a line segment post-processing operation on the first line segment set to obtain a second line segment set; generate an initial undirected graph structure based on the second line segment set, and perform a graph structure post-processing operation on the initial undirected graph structure to obtain the candidate undirected graph structure.
[0086] In an embodiment, the candidate undirected graph structure constructing module is specifically configured to: traverse each line segment in the first line segment set, and merge line segments that are collinear and have adjacent end points, where the adjacent end points refer to a distance between end points of two line segments being less than a preset threshold; traverse end points of each line segment in the first line segment set, and in a case where a distance between any two end points is less than the preset threshold, extend the corresponding line segment in a direction of the line segment corresponding to the two end points, and take an intersection of the extended line segments as a new end point to implement connection processing between the line segments; traverse each line segment after the connection processing, insert a new end point at an intersection of intersecting line segments to truncate the line segments into a plurality of sub-line segments, add the plurality of sub-line segments to the first line segment set, and obtain the second line segment set.
[0087] In an embodiment, the candidate undirected graph structure constructing module is specifically configured to: convert the second line segment set into the initial undirected graph structure according to an end point connection relationship between line segments in the second line segment set, where an end point of each line segment is taken as a vertex in the initial undirected graph structure, and the line segment is taken as a connection edge connecting two vertices in the initial undirected graph structure; perform transverse alignment processing and longitudinal alignment processing on the connection edges in the initial undirected graph structure, merge collinear connection edges, and remove connection edges with a length less than a preset threshold to obtain the candidate undirected graph structure.
[0088] Corresponding to the application scenarios and methods of the method provided in the embodiments of the present application, the embodiments of the present application further provide a house type drawing processing apparatus applied to a house type drawing processing server, the apparatus comprising: a target two-dimensional house type drawing acquisition module configured to acquire a target two-dimensional house type drawing; a target two-dimensional house type drawing input module configured to input the target two-dimensional house type drawing into a pre-trained house type drawing processing model, wherein the house type drawing processing model is configured to: perform instance segmentation processing on the target two-dimensional house type drawing to identify mask pixel regions of a plurality of target instances, wherein the target instances comprise at least one of a wall, a door and a window; for each identified target instance, calculate a minimum circumscribed rectangle corresponding to the mask pixel region of the target instance, wherein the minimum circumscribed rectangle is used to represent an outer contour line of the target instance, and a width of the minimum circumscribed rectangle is used to represent a thickness of the target instance; extract a center line of the minimum circumscribed rectangle of each target instance respectively to obtain a first line segment set; generate a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure comprises a plurality of vertices and a plurality of connection edges, each connection edge is connected between two vertices and is used to represent an independent wall; add first geometric information and second geometric information in the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information comprises center point information and length information of the minimum circumscribed rectangle corresponding to a target instance of which the instance type is a door or a window, the second geometric information comprises width information of the minimum circumscribed rectangle corresponding to a target instance of which the instance type is a wall, the target undirected graph structure is used to represent structured topological information of target objects in the target two-dimensional house type drawing, and the target objects comprise at least one of a wall, a door and a window; and a target undirected graph structure acquisition module configured to acquire the target undirected graph structure.
[0089] In an implementation manner, the apparatus further comprises an editing processing module configured to, after sending the target undirected graph structure to the house type processing client, send the target undirected graph structure to the house type processing client, wherein the house type processing client is configured to generate a three-dimensional house type drawing corresponding to the target two-dimensional house type drawing based on the target undirected graph structure, and display the three-dimensional house type drawing for a user to edit; acquire an edited three-dimensional house type drawing; and adjust model parameters of the house type drawing processing model based on the target undirected graph structure and the edited three-dimensional house type drawing.
[0090] In an implementation manner, the training data of the house type drawing processing model comprises residential two-dimensional house type drawings and non-residential two-dimensional house type drawings.
[0091] The functions of each module in the apparatuses in the embodiments of the present application can be referred to the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.
[0092] Figure 14A schematic block diagram of an example electronic device 1400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0093] like Figure 14 As shown, device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 1402 or a computer program loaded from storage unit 1408 into random access memory (RAM) 1403. RAM 1403 may also store various programs and data required for the operation of device 1400. The computing unit 1401, ROM 1402, and RAM 1403 are interconnected via a bus 1404. An input / output (I / O) interface 1405 is also connected to bus 1404.
[0094] Multiple components in device 1400 are connected to I / O interface 1405, including: input unit 1406, such as a keyboard, mouse, etc.; output unit 1407, such as various types of displays, speakers, etc.; storage unit 1408, such as a disk, optical disk, etc.; and communication unit 1409, such as a network card, modem, wireless transceiver, etc. Communication unit 1409 allows device 1400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0095] The computing unit 1401 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1401 performs various methods and processes described above, such as the methods described above. For example, in some embodiments, the methods of the present embodiments can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit (Storage) 1408. In some embodiments, portions or all of the computer program can be loaded and / or installed onto the device 1400 via the ROM (Read-Only Memory) 1402 and / or the communication unit (Communication) 1409. When the computer program is loaded onto the RAM (Random Access Memory) 1403 and executed by the computing unit 1401, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 1401 can be configured, by way of other any appropriate means, such as by way of firmware, to perform the methods of the present embodiments.
[0096] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field-Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application-Specific Standard Part (ASSP), a System on Chip (SoC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0097] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as part of a separate software package, and partially on a remote machine or server.
[0098] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0099] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0100] The systems and techniques described herein can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet. The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The servers can be cloud servers, servers of a distributed system, or servers combined with a blockchain. The embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method provided in the embodiments of the present application.
[0101] The embodiments of the present application provide a computer program product, which includes a computer program, and the program is executed by a processor to implement the method provided in the embodiments of the present application. In the above embodiments, the method can be implemented by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, the method can be implemented in the form of a computer program product, in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the computer program instructions produce the processes or functions according to the present application, in whole or in part.
[0102] The embodiments of the present application also provide a chip, which includes a processor, and the processor is configured to call and run instructions stored in a memory, so that a communication device installed with the chip executes the method provided in the embodiments of the present application.
[0103] The embodiments of the present application also provide a chip, which includes an input interface, an output interface, a processor and a memory, and the input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is configured to execute code in the memory, and when the code is executed, the processor is configured to execute the method provided in the embodiments of the present application.
[0104] In the description of the application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, different embodiments or examples described in the specification and the features of different embodiments or examples can be combined and combined by those skilled in the art without contradiction and under the circumstances.
[0105] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0106] Any process or method described in the flowchart or otherwise described herein can be understood as representing code modules, segments or portions of code that include one or more executable instructions for implementing specific logic functions or steps. And the scope of the preferred embodiments of the application includes additional implementations in which the functions can be performed in an order different from that shown or discussed, including functions performed in substantially simultaneous manner or in reverse order according to the functions involved.
[0107] The above is only an exemplary embodiment of the application, but the protection scope of the application is not limited thereto, and any skilled person in the art can easily think of various changes or replacements within the technical scope disclosed in the application, which should be covered within the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.
Claims
1. A house type drawing processing method applied to a house type drawing processing server, characterized in that, The method comprises: performing instance segmentation processing on a target two-dimensional house plan to identify a plurality of mask pixel regions of target instances, wherein the target instances include at least one of a wall, a door, and a window; for each identified target instance, calculating a minimum circumscribed rectangle corresponding to the mask pixel region of the target instance, wherein the minimum circumscribed rectangle is used to represent an outer contour line of the target instance, and the width of the minimum circumscribed rectangle is used to represent the thickness of the target instance; extracting a center line of the minimum circumscribed rectangle of each target instance respectively to obtain a first line segment set; generating a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure includes a plurality of vertices and a plurality of connecting edges, each connecting edge is connected between two vertices and is used to represent an independent wall; adding first geometric information and second geometric information in the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information includes center point information and length information of the minimum circumscribed rectangle corresponding to the target instance of the instance type of door or window, the first geometric information includes width information of the minimum circumscribed rectangle corresponding to the target instance of the instance type of wall, and the target undirected graph structure is used to represent structured topological information of target objects in the target two-dimensional house plan, the target objects including at least one of a wall, a door, and a window.
2. The method of claim 1, wherein, The generating of the candidate undirected graph structure based on the first line segment set comprises: performing line segment post-processing operation on the first line segment set to obtain a second line segment set; generating an initial undirected graph structure based on the second line segment set, and performing graph structure post-processing operation on the initial undirected graph structure to obtain the candidate undirected graph structure.
3. The method of claim 2, wherein, The performing of the line segment post-processing operation on the first line segment set to obtain the second line segment set comprises: traversing each line segment in the first line segment set, and merging line segments that are collinear and have adjacent end points, wherein the adjacent end points refer to a distance between end points of two line segments being less than a preset threshold value; traversing end points of each line segment in the first line segment set, and in a case where a distance between any two end points is less than the preset threshold value, extending the corresponding line segment in a direction of the line segment corresponding to the two end points, and taking an intersection point of the extended line segments as a new end point to realize connection processing between the line segments; traversing each line segment after the connection processing, inserting a new end point at an intersection point of intersecting line segments to truncate the line segments into a plurality of sub-line segments, and adding the plurality of sub-line segments to the first line segment set to obtain the second line segment set.
4. The method of claim 2, wherein, The generating of the candidate undirected graph structure based on the second line segment set comprises: converting the second line segment set into the initial undirected graph structure according to an end point connection relationship between the line segments in the second line segment set, wherein an end point of each line segment is taken as a vertex in the initial undirected graph structure, and the line segment is taken as a connecting edge connecting two vertices in the initial undirected graph structure; The method comprises:
5. A house type drawing processing method applied to a house type drawing processing server, and characterized in that, The method comprises: Obtaining a target two-dimensional house plan; Inputting the target two-dimensional house plan into a pre-trained house plan processing model, wherein the house plan processing model is configured to: perform instance segmentation processing on the target two-dimensional house plan to identify mask pixel regions of a plurality of target instances, wherein the target instances include at least one of a wall, a door, and a window; for each identified target instance, calculate a minimum bounding rectangle corresponding to the mask pixel region of the target instance, wherein the minimum bounding rectangle represents the outer contour line of the target instance, and the width of the minimum bounding rectangle represents the thickness of the target instance; extract the centerline of the minimum bounding rectangle of each target instance to obtain a first line segment set; generate a candidate undirected graph structure based on the first line segment set, wherein the candidate undirected graph structure includes a plurality of vertices and a plurality of connection edges, each connection edge connects between two vertices and represents an independent wall; add first geometric information and second geometric information to the candidate undirected graph structure to generate a target undirected graph structure, wherein the first geometric information includes center point information and length information of the minimum bounding rectangle corresponding to the target instance of the instance type of door or window, the first geometric information includes width information of the minimum bounding rectangle corresponding to the target instance of the instance type of wall, the target undirected graph structure represents the structured topological information of target objects in the target two-dimensional house plan, and the target objects include at least one of a wall, a door, and a window; Obtaining the target undirected graph structure.
6. The method of claim 5, wherein, After obtaining the target undirected graph structure, the method further comprises: sending the target undirected graph structure to a house plan processing client, wherein the house plan processing client is configured to generate a three-dimensional house plan corresponding to the target two-dimensional house plan based on the target undirected graph structure, and display the three-dimensional house plan for user editing; Obtaining an edited three-dimensional house plan; Adjusting the model parameters of the house plan processing model based on the target undirected graph structure and the edited three-dimensional house plan.
7. The method of claim 5 or 6, wherein, The training data of the house plan processing model includes residential two-dimensional house plans and non-residential two-dimensional house plans.
8. A house plan processing system, comprising: a house plan processing client configured to perform scale registration of an initial two-dimensional house plan in a three-dimensional coordinate system to generate a target two-dimensional house plan, and send a house plan processing request to a house plan processing server, wherein the house plan processing request is configured to request the house plan processing server to generate a target undirected graph structure corresponding to the target two-dimensional house plan; the house plan processing server is configured to respond to the house plan processing request and implement the method of any one of claims 1 to 7, and return the target undirected graph structure to the house plan processing client; The house type drawing processing client is further configured to perform scale registration of the target undirected graph structure in a two-dimensional coordinate system, generate a three-dimensional house type drawing corresponding to the target two-dimensional house type drawing, and display the three-dimensional house type drawing. 9.An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1 to 7. 10.A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 7.