A method and apparatus for vectorizing floor plans, a storage medium, and an electronic device.

CN121744458BActive Publication Date: 2026-05-26QINGDAO HAIER TECH +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO HAIER TECH
Filing Date
2026-02-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

但是,基于网络检测的方法把墙、门窗等元素作为独立的元素分别处理,处理时间变慢的同时,割裂了房间元素之间的联系,最终矢量化结果可能存在违背相互之间的几何关系

Benefits of technology

[0016]在本申请实施例中,确定目标区域内的墙、门、窗等建筑元素的关键点热图和建筑元素之间的连接关系图;根据墙的关键点热图和连接关系图确定目标区域内的目标墙线,并根据门的关键点热图和窗的关键点热图确定目标区域内的预选门关键点和预选窗关键点;分别将预选门关键点映射和预选窗关键点映射至目标墙线上,并根据预选门关键点与目标墙线之间的第一映射关系和预选窗关键点与目标墙线之间的第二映射关系确定目标区域内的目标门线和目标窗线;根据目标墙线、目标门线和目标窗线生成目标区域的矢量化户型图。也就是说,本申请实施例在确定目标墙线之后,可以根据预选门关键点与目标墙线之间的第一映射关系和预选窗关键点与目标墙线之间的第二映射关系确定目标门线和目标窗线。通过本申请实施例,可以使得目标墙线、目标门线和目标窗线之间存在关联性,解决相关技术中将房间内的墙、门、窗等元素作为独立的元素分别进行处理,导致割裂了墙、门、窗等元素之间的联系的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121744458B_ABST
    Figure CN121744458B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, storage medium, and electronic device for vectorizing floor plans, relating to the field of smart home technology. The method includes: determining a key point heatmap of building elements within a target area and a connection relationship diagram between building elements, including walls, doors, and windows; determining target wall lines within the target area based on the wall key point heatmap and connection relationship diagram, and determining pre-selected door key points and pre-selected window key points within the target area based on the door key point heatmap and window key point heatmap; mapping the pre-selected door key points and pre-selected window key points onto the target wall lines, and determining target door lines and target window lines within the target area based on a first mapping relationship and a second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall lines; and generating a vectorized floor plan of the target area based on the target wall lines, target door lines, and target window lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart home technology, and more specifically, to a method and apparatus for vectorizing floor plans, a storage medium, and an electronic device. Background Technology

[0002] After floor plans are drawn using computer-aided design (CAD) software, they are often rasterized into images for easy transmission. However, when redesigning or displaying them using software, it is often necessary to restore their structured information, that is, to transform the floor plan into a combination of elements such as wall lines, door and window elements. This process is called floor plan vectorization.

[0003] With the development of deep learning technology, many methods combining deep networks with vectorization have emerged. For example, network-based detection methods use networks to detect wall objects, door and window objects, and then vectorize these objects; for instance, binarizing wall objects and extracting the centerline as wall line segments. However, network-based detection methods treat walls, doors, and windows as independent elements, which slows down processing time and severs the connections between room elements. The final vectorized result may violate the geometric relationships between them.

[0004] Therefore, the related technologies treat elements such as walls, doors, and windows in a room as independent elements and process them separately, which leads to the problem of severing the connection between elements such as walls, doors, and windows.

[0005] There is no effective solution yet to address the problem that some related technologies treat elements such as walls, doors, and windows in a room as independent elements, thus severing the connection between these elements. Summary of the Invention

[0006] This application provides a method and apparatus, storage medium and electronic device for vectorizing floor plans, to at least solve the problem in related technologies where elements such as walls, doors and windows in a room are treated as independent elements and processed separately, resulting in the severing of the connection between elements such as walls, doors and windows.

[0007] According to one embodiment of this application, a method for vectorizing a floor plan is provided, comprising: determining a key point heatmap of building elements within a target area and a connection relationship diagram between the building elements, wherein the building elements include at least one of the following: walls, doors, and windows; determining target wall lines within the target area based on the wall key point heatmap and the connection relationship diagram, and determining pre-selected door key points and pre-selected window key points within the target area based on the door key point heatmap and the window key point heatmap; mapping the pre-selected door key points and the pre-selected window key points to the target wall lines respectively, and determining target door lines and target window lines within the target area based on a first mapping relationship and a second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall lines; generating a vectorized floor plan of the target area based on the target wall lines, the target door lines, and the target window lines; and determining target wall lines within the target area based on the wall key point heatmap and the connection relationship diagram. The method includes: extracting pre-selected wall key points based on the key point heatmap of the wall, and determining a first brightness value corresponding to the pre-selected wall key points based on the key point heatmap of the wall, wherein the first brightness value is used to indicate a first probability that the pre-selected wall key point is a target wall key point; determining target wall key points among the pre-selected wall key points whose first brightness value is greater than or equal to a first brightness threshold; determining a first pre-selected wall line of the target area based on the target wall key points; determining a first area corresponding to the first pre-selected wall line based on the connection relationship diagram, and determining the number of first strongly connected pixels in the first area based on the connection relationship diagram, wherein the first strongly connected pixels are pixels in the first area whose brightness value is greater than or equal to a second brightness threshold; determining a first ratio of the number of first strongly connected pixels in the first area to the total number of pixels contained in the first area; determining a second pre-selected wall line among the first pre-selected wall lines based on a first size relationship between the first ratio and a first preset ratio; and vectorizing the second pre-selected wall line to determine the target wall line.

[0008] In one exemplary embodiment, vectorizing the second pre-selected wall line to determine the target wall line includes: if the second pre-selected wall line contains curves and / or polylines, performing geometric correction on the curves and / or polylines, and determining the geometrically corrected curves and / or polylines as the target wall line, wherein the geometric correction is used to straighten the curves and / or polylines; and if the second pre-selected wall line contains a plurality of third pre-selected wall lines where the first distance between each endpoint is less than or equal to a distance threshold, and / or the angle between the wall lines is less than or equal to an angle threshold. In the case of a wall line, the multiple third pre-selected wall lines are merged into segments, and the wall line generated after the segment merging is determined as the target wall line; if it is determined that there are multiple fourth pre-selected wall lines that intersect and have the same direction among the second pre-selected wall lines, the other fourth pre-selected wall lines among the multiple fourth pre-selected wall lines except for any one of the fourth pre-selected wall lines are deleted, and any one of the fourth pre-selected wall lines is determined as the target wall line; if it is determined that there is a broken wall line among the second pre-selected wall lines, the broken wall line is repaired into segments, and the broken wall line after the segment repair is determined as the target wall line.

[0009] In an exemplary embodiment, determining the target door line and target window line within the target area according to a first mapping relationship and a second mapping relationship includes: determining a first number of pre-selected door key points mapped to each target wall line according to the first mapping relationship, and determining a second number of pre-selected window key points mapped to each target wall line according to the second mapping relationship; determining whether the first number is even, and determining whether the second number is even; if the first number is even, determining pre-selected door lines according to the connection diagram and the first mapping relationship, and if the second number is even, determining pre-selected window lines according to the connection diagram and the second mapping relationship; and vectorizing the pre-selected door lines and the pre-selected window lines respectively to determine the target door line and the target window line.

[0010] In an exemplary embodiment, after determining whether the first quantity is even and whether the second quantity is even, the method further includes: if the first quantity is determined to be odd, adding a first feature point according to the first mapping relationship and the connection relationship diagram, and determining the preselected gate line according to the first feature point, the connection relationship diagram, and the preselected gate key point; if the second quantity is determined to be odd, adding a second feature point according to the second mapping relationship and the connection relationship diagram, and determining the preselected window line according to the second feature point, the connection relationship diagram, and the preselected window key point.

[0011] In an exemplary embodiment, determining a key point heatmap of building elements within a target area and a connection relationship diagram between the building elements includes: acquiring a rasterized floor plan of the target area; and outputting the rasterized floor plan to a target recognition network, so that the target recognition network outputs the key point heatmap of the building elements and the connection relationship diagram, wherein the target recognition network includes at least one of the following: a skeleton recognition network and a key point recognition network.

[0012] According to another embodiment of this application, a vectorization device for floor plans is also provided, comprising: a first determining module, configured to determine a key point heatmap of building elements within a target area and a connection relationship diagram between the building elements, wherein the building elements include at least one of the following: walls, doors, and windows; a second determining module, configured to determine a target wall line within the target area based on the key point heatmap of the walls and the connection relationship diagram, and to determine pre-selected door key points and pre-selected window key points within the target area based on the key point heatmaps of the doors and windows; a mapping module, configured to map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and to determine a target door line and a target window line within the target area based on a first mapping relationship and a second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line; and a generating module, configured to generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line.

[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the above-described method for vectorizing the floor plan when it is run.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described method for vectorizing the floor plan through the computer program.

[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program, wherein the computer program is executed by a processor using the above-described method for vectorizing floor plans.

[0016] In this embodiment, key point heatmaps of building elements such as walls, doors, and windows within the target area and connection relationship diagrams between these elements are determined. Target wall lines within the target area are determined based on the wall key point heatmaps and connection relationship diagrams, and pre-selected door key points and pre-selected window key points within the target area are determined based on the door and window key point heatmaps. The pre-selected door key points and pre-selected window key points are mapped onto the target wall lines, and target door lines and target window lines within the target area are determined based on a first mapping relationship between the pre-selected door key points and the target wall lines, and a second mapping relationship between the pre-selected window key points and the target wall lines. A vectorized floor plan of the target area is generated based on the target wall lines, target door lines, and target window lines. In other words, after determining the target wall lines, this embodiment can determine the target door lines and target window lines based on the first mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship between the pre-selected window key points and the target wall lines. Through the embodiments of this application, the target wall line, target door line, and target window line can be correlated, solving the problem in related technologies that treat elements such as walls, doors, and windows in a room as independent elements, resulting in the severing of the connection between elements such as walls, doors, and windows. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the hardware environment for a method of vectorizing a floor plan according to an embodiment of this application;

[0020] Figure 2 This is a flowchart of a method for vectorizing a floor plan according to an embodiment of this application;

[0021] Figure 3 This is a heat map of key points of the wall according to an embodiment of this application;

[0022] Figure 4 This is a connection diagram according to an embodiment of this application;

[0023] Figure 5 This is a flowchart of a key-point-based floor plan vectorization processing method according to an optional embodiment of this application;

[0024] Figure 6This is a flowchart of a vectorized wall line according to an optional embodiment of this application;

[0025] Figure 7 This is a flowchart of vectorized door / window lines according to an optional embodiment of this application;

[0026] Figure 8 This is a structural block diagram of a floor plan vectorization device according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] According to one aspect of the embodiments of this application, a method for vectorizing floor plans is provided. This method for vectorizing floor plans is widely used in whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, Figure 1 This is a schematic diagram of the hardware environment for a method of vectorizing a floor plan according to an embodiment of this application. In this embodiment, the above-mentioned method of vectorizing the floor plan can be applied to a terminal device, and the terminal device can be applied to, for example... Figure 1 The hardware environment shown consists of home appliance 102 and server 104. Figure 1As shown, server 104 is connected to home appliance 102 via a network and can be used to provide services (such as application services) to nodes or clients installed on nodes. A database can be set up on the server or independently to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently to provide data processing services for server 104.

[0030] The aforementioned networks may include, but are not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. Home appliances 102 may not be limited to smart air conditioners, smart range hoods, smart refrigerators, smart ovens, smart stoves, smart washing machines, smart water heaters, smart washing equipment, smart dishwashers, smart projectors, smart TVs, smart clothes racks, smart curtains, smart audio-visual equipment, smart sockets, smart speakers, smart speakers, smart fresh air systems, smart kitchen and bathroom equipment, smart bathroom fixtures, smart robot vacuum cleaners, smart window cleaning robots, smart mopping robots, smart air purifiers, smart steam ovens, smart microwave ovens, smart water heaters, smart air purifiers, smart water dispensers, smart door locks, etc.

[0031] This embodiment provides a method for vectorizing floor plans, which is applied to the aforementioned terminal device. Figure 2 This is a flowchart of a method for vectorizing a floor plan according to an embodiment of this application. The process includes the following steps:

[0032] Step S202: Determine the key point heat map of the building elements within the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, window;

[0033] Step S204: Determine the target wall line within the target area based on the key point heat map of the wall and the connection relationship diagram, and determine the pre-selected door key points and pre-selected window key points within the target area based on the key point heat map of the door and the key point heat map of the window.

[0034] in, Figure 3 This is a heat map of key points of the wall according to an embodiment of this application. Figure 4 This is a connection diagram according to an embodiment of this application. For example... Figure 3 As shown, it can be based on Figure 3 Key heatmap of the wall and Figure 4 The connection diagram is used to determine the target wall line.

[0035] Step S206: Map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and determine the target door line and target window line in the target area according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line;

[0036] Step S208: Generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line.

[0037] Through the above steps, key point heatmaps of architectural elements such as walls, doors, and windows within the target area and connection relationship diagrams between architectural elements are determined. Target wall lines within the target area are determined based on the wall key point heatmaps and connection relationship diagrams, and pre-selected door key points and pre-selected window key points within the target area are determined based on the door and window key point heatmaps. The pre-selected door key points and pre-selected window key points are mapped onto the target wall lines, and target door lines and target window lines within the target area are determined based on the first mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship between the pre-selected window key points and the target wall lines. A vectorized floor plan of the target area is generated based on the target wall lines, target door lines, and target window lines. In other words, after determining the target wall lines, this embodiment of the application can determine the target door lines and target window lines based on the first mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship between the pre-selected window key points and the target wall lines. Through the embodiments of this application, the target wall line, target door line, and target window line can be correlated, solving the problem in related technologies that treat elements such as walls, doors, and windows in a room as independent elements, resulting in the severing of the connection between elements such as walls, doors, and windows.

[0038] Optionally, step S204 above, determining the target wall line within the target area based on the wall's key point heatmap and the connection relationship diagram, includes: extracting pre-selected wall key points based on the wall's key point heatmap, and determining a first brightness value corresponding to the pre-selected wall key points based on the wall's key point heatmap, wherein the first brightness value is used to indicate a first probability that the pre-selected wall key point is a target wall key point; determining target wall key points among the pre-selected wall key points whose first brightness value is greater than or equal to a first brightness threshold; determining a first pre-selected wall line within the target area based on the target wall key points; determining a first area corresponding to the first pre-selected wall line based on the connection relationship diagram, and determining the number of first strongly connected pixels within the first area based on the connection relationship diagram, wherein the first strongly connected pixels are pixels within the first area whose brightness value is greater than or equal to a second brightness threshold; determining a first ratio between the number of first strongly connected pixels within the first area and the total number of pixels contained in the first area; determining a second pre-selected wall line among the first pre-selected wall lines based on a first size relationship between the first ratio and a first preset ratio; and vectorizing the second pre-selected wall line to determine the target wall line.

[0039] Understandably, the specific process of extracting pre-selected wall key points from the key point heatmap and ultimately generating the target wall line can be as follows:

[0040] 1) Keypoint Heatmap Analysis and Pre-selected Wall Keypoint Extraction: Correlation between Brightness Value and Probability: The brightness value of each pixel on the keypoint heatmap reflects the probability that the location is an endpoint of a wall line. For example, a pixel with a brightness value of 200 is more likely to be an endpoint of a wall line than a pixel with a brightness value of 50. Target Wall Keypoint Filtering: A brightness threshold, such as 150, is set to filter target wall keypoints. Only pixels with a brightness value greater than or equal to this threshold are considered high-probability target wall keypoints.

[0041] 2) Determination of the first pre-selected wall lines: Pixel connection analysis: Based on the key points of the target wall, attempt to construct possible wall lines. For example, starting from one wall endpoint, find another point with a high brightness value and within a reasonable distance. These two points may form a pair of endpoints of the wall line; First pre-selected wall lines: By connecting adjacent key points of the target wall, a series of first pre-selected wall lines are formed.

[0042] 3) Connection graph analysis and wall line optimization: Determining connection strength: The brightness value on the connection graph indicates the connection strength between two pixels. For a pre-selected wall line, the strongly connected pixels in its influence area can be identified, that is, the pixels with a brightness value higher than the second brightness threshold (e.g., 180); Pixel number ratio calculation: Calculate the ratio of the number of strongly connected pixels in the first area (the direct influence area of ​​the pre-selected wall line) to the total number of pixels in that area.

[0043] 4) Determine the target wall line: Ratio-based decision: If the first ratio (the ratio of strongly connected pixels to the total number of pixels) is greater than or equal to a preset ratio threshold (e.g., 80%), it indicates that there is sufficient evidence to support the vectorization of this pre-selected wall line. If the ratio is low, additional analysis is required or the line segment should be ignored; Vectorization processing: The pre-selected wall lines that have passed the above analysis and verification are vectorized to convert them into precise geometric line segments, ultimately obtaining the target wall line.

[0044] The vectorization process for the second pre-selected wall line to determine the target wall line includes: if the second pre-selected wall line contains curves and / or polylines, performing geometric correction on the curves and / or polylines, and determining the geometrically corrected curves and / or polylines as the target wall line, wherein the geometric correction is used to straighten the curves and / or polylines; and if the second pre-selected wall line contains multiple third pre-selected wall lines where the first distance between each endpoint is less than or equal to a distance threshold, and / or the angle between the wall lines is less than or equal to an angle threshold. In the following cases, the multiple third pre-selected wall lines are merged into segments, and the resulting wall line is determined as the target wall line; if it is determined that there are multiple fourth pre-selected wall lines that intersect and have the same direction among the second pre-selected wall lines, the other fourth pre-selected wall lines except for any one of the multiple fourth pre-selected wall lines are deleted, and any one of the fourth pre-selected wall lines is determined as the target wall line; if it is determined that there is a broken wall line among the second pre-selected wall lines, the broken wall line is repaired into segments, and the repaired broken wall line is determined as the target wall line.

[0045] Understandably, when processing the second pre-selected wall lines to determine the final target wall lines, various situations will arise requiring correction and optimization. These include steps such as geometric correction, segment merging, redundancy removal, and segment repair. Specifically:

[0046] Geometric correction: For example, when recognizing certain floor plans, due to limitations in image quality, drawing style, or recognition algorithms, slight curves or broken lines may appear in the pre-selected wall lines, such as non-right-angle corners or slightly curved walls, which do not exist in actual buildings. In this case, a geometric correction step can be used to straighten these curves or broken lines, ensuring that the wall lines appear as right angles or straight lines, conforming to the actual structure of the building. For example, if a segment of the pre-selected wall line forms a slightly curved line, the correction algorithm will transform it into a straight line through fitting or segmentation.

[0047] Line segment merging: For example, during the recognition process, the same wall may be divided into multiple pre-selected wall lines. The distance between each line segment is very small, or the angle between them is negligible, but they should actually be merged into a continuous wall line. In this case, a distance threshold and an angle threshold can be set to merge multiple third pre-selected wall lines that meet the conditions (distance less than the threshold or angle less than the threshold) to generate a unified wall line.

[0048] Redundancy Removal: For example, in some cases, two or more fourth pre-selected wall lines may intersect at the same location on the floor plan, but their directions are consistent. In reality, only one line segment representing the wall location should be retained. When intersecting wall lines with consistent directions are identified, one of them is retained as the target wall line, and other overlapping or redundant wall lines are deleted. This ensures the clarity and accuracy of the vectorized floor plan, avoiding the repeated representation of walls at the same location.

[0049] Line segment repair: For example, wall lines in the original image may appear broken due to the recognition process or image quality issues, such as a wall line abruptly ending somewhere in the image. In this case, the break can be automatically repaired by analyzing the connection relationships between the two ends of the broken wall line or nearby feature points, generating a complete wall line.

[0050] In summary, the key point heatmaps and connectivity graphs generated by deep learning can capture the complex structure of wall lines in floor plan drawings, improve the accuracy of key point detection, and reduce false alarms and false negatives.

[0051] Optionally, step S206 above, which determines the target door line and target window line within the target area based on the first mapping relationship and the second mapping relationship, includes: determining a first number of pre-selected door key points mapped to each target wall line based on the first mapping relationship, and determining a second number of pre-selected window key points mapped to each target wall line based on the second mapping relationship; determining whether the first number is even, and determining whether the second number is even; if the first number is even, determining pre-selected door lines based on the connection diagram and the first mapping relationship, and if the second number is even, determining pre-selected window lines based on the connection diagram and the second mapping relationship; and performing vectorization processing on the pre-selected door lines and the pre-selected window lines respectively to determine the target door line and the target window line.

[0052] Understandably, the process of determining the target door line and target window line includes:

[0053] Mapping Relationship Determination and Quantitative Analysis: From the key point heatmap and connection diagram, it is determined that each target wall line may map a certain number of pre-selected door key points and pre-selected window key points. The number of pre-selected door key points and pre-selected window key points mapped to each target wall line is checked to ensure that they are even numbers. That is, in actual floor plans, doors and windows usually appear in pairs, and each opening has two key points (such as diagonal points).

[0054] Pre-selected door lines are determined as follows: If the number of pre-selected door key points mapped to the wall line is even, a connection diagram is used to analyze the connection patterns of these key points. For example, suppose wall line A is mapped to 4 pre-selected door key points. The connection diagram shows that there are strong connections between these points, indicating that they are likely to belong to different parts of the same door / window element. Therefore, the two point pairs with the strongest connections can be identified, thus generating the pre-selected door lines.

[0055] Pre-selected window line determination: A similar strategy is adopted for key points of the pre-selected window. If the number of key points of the pre-selected window mapped on the target wall line is even, the point pairs most likely to belong to the same window are found by analyzing the connection diagram, and then they are connected to form the pre-selected window line.

[0056] Door line vectorization: The generated pre-selected door lines are vectorized, including merging, correcting and standardizing the dimensions of the line segments, to ensure that each door line accurately reflects the actual size and position of the door.

[0057] Window line vectorization: The pre-selected window line is vectorized to accurately represent the window size and installation position, ensuring its correct relationship with the wall.

[0058] Wherein, after determining whether the first quantity is even and whether the second quantity is even, the method further includes: if the first quantity is determined to be odd, adding a first feature point according to the first mapping relationship and the connection relationship diagram, and determining the preselected gate line according to the first feature point, the connection relationship diagram and the preselected gate key point; if the second quantity is determined to be odd, adding a second feature point according to the second mapping relationship and the connection relationship diagram, and determining the preselected window line according to the second feature point, the connection relationship diagram and the preselected window key point.

[0059] Understandably, when the number of identified key points for pre-selected doors or windows is odd, it means that at least one endpoint has not been correctly detected, which directly leads to the inability to accurately construct door or window lines. To address this issue, a first mapping relationship and a connection relationship graph are used to add missing feature points, thereby determining the pre-selected door and window lines. Specifically:

[0060] Supplementing feature points for doors and windows: For example, consider a floor plan where the algorithm initially detects 3 feature points for doors and windows (an odd number), meaning one feature point is missing. For instance, for a door, the algorithm initially detects one endpoint on each side and a point in the middle, but the endpoint on the other side is missing.

[0061] At this point, the following operations can be performed:

[0062] Based on the first mapping relationship and the connection relationship diagram, add the first feature point to complete the gate line.

[0063] The connectivity graph reflects the potential connection strength between different feature points. It can be used to find strong connection clues in the neighborhood of missing feature points and infer the approximate location of the missing feature points.

[0064] For example, for a door, if the top and bottom endpoints on the left have been detected, but only one point on the right has been detected, the location of the missing endpoint can be estimated by observing the connection strength between the right point and other points on the wall line in the connection relationship diagram, and feature points can be added based on this to ensure the integrity of the door and window line segments.

[0065] Determine the pre-selected door lines and pre-selected window lines: Once the missing feature points are supplemented, the pre-selected door lines and pre-selected window lines can be determined based on the complete feature point set, the connection diagram, and the key points of the pre-selected doors and windows.

[0066] Optionally, the determination of the key point heat map of the building elements and the connection relationship diagram between the building elements in step S202 above includes: obtaining a rasterized floor plan of the target area; outputting the rasterized floor plan to a target recognition network so that the target recognition network outputs the key point heat map of the building elements and the connection relationship diagram, wherein the target recognition network includes at least one of the following: a skeleton recognition network and a key point recognition network.

[0067] Understandably, by inputting a rasterized floor plan into a pre-trained target recognition network or a specially customized skeleton recognition network and key point recognition network, key point heatmaps and connection relationship graphs can be extracted from the rasterized floor plan.

[0068] To better understand the process of the above-mentioned vectorization method of floor plan, the implementation process of the above-mentioned network connection will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.

[0069] Traditional methods for vectorizing floor plans typically employ heuristics to locate semantic graphic symbols within the plan or utilize image processing techniques to extract elements. Common methods include using image processing techniques such as binarization, morphological operations, and Hough transform to eliminate noise and directly extract lines from the image, converting them into straight lines for wall lines. Template matching is also used to determine the locations of doors and windows. However, traditional floor plan vectorization methods are often limited to simple layouts and clean images. Furthermore, the types of walls, doors, and windows in the floor plan cannot vary too much; otherwise, manual parameter tuning or threshold settings are required, severely limiting their versatility.

[0070] Related technologies also include floor plan vectorization solutions: using a segmentation network to divide the image into different regions, obtaining the boundary polygons of the regions, which are the wall lines, doors, windows, and other elements of the floor plan, are then detected using a detection network. However, the vectorization method based on region segmentation networks is a top-down approach, first obtaining the room regions, and then extracting wall line information from these regions. Therefore, the wall lines obtained by this vectorization method are polygon estimates of the segmented regions, which may be affected by the smoothness of the region boundaries after segmentation, resulting in multiple wall lines. Furthermore, due to the influence of noise on the segmentation results, the extracted line segments often have breakage or adhesion issues.

[0071] Related technologies also include floor plan vectorization solutions: using a skeleton recognition network framework to obtain key points of walls, doors, and windows in the floor plan, and using connection relationships to form line segments, which are the corresponding wall lines or door / window lines. However, while the skeleton recognition network key point vectorization method can extract very accurate key point information and has better generalization than detection and segmentation networks, the accuracy of obtaining wall lines and door / window positions through simple post-processing is greatly affected by the accuracy of feature point detection. For example, if the feature point positions of the two endpoints of the same wall line are offset, a tilted wall line will be obtained; for relatively short objects such as doors and windows, insufficient detection of feature points will result in loss.

[0072] To address the aforementioned issues, an optional embodiment of this application proposes a method for vectorizing floor plans based on key points. Figure 5 This is a flowchart of a key-point-based floor plan vectorization processing method according to an optional embodiment of this application, such as... Figure 5 As shown:

[0073] Step S501: Determine the key point heat map and connection relationship diagram of the walls, doors and windows in the floor plan.

[0074] A keypoint heatmap of walls, doors, and windows in a floor plan is obtained using a deep skeletonization or keypoint recognition network. The keypoint heatmap is an image in which the brightness value of a pixel is higher if the pixel is more likely to be a keypoint. A Gaussian distribution of brightness values ​​is formed at and near the endpoints of walls / doors and windows. The connectivity graph is similar to the nearest-field map in a deep skeletonization network; pixels with connections to their neighbors have high brightness values. Pixels between the endpoints of typical floor plan elements identified by the network will have relatively high brightness values ​​in the connectivity graph.

[0075] Step S502, vectorize the wall lines.

[0076] Figure 6 This is a flowchart of vectorized wall lines according to an optional embodiment of this application, such as... Figure 6 As shown:

[0077] Step S601: Extract key points and their influence range from the key point heatmap.

[0078] Step S602: Enumerate all possible line segments composed of key point pairs;

[0079] Step S603: Count the number of pixels at the location of the line segment and the number of pixels with strong connections in the vicinity on the connection graph;

[0080] Step S604: Determine the relationship between the difference between the total length of the line segment and the length occupied by the strong connection point and the threshold.

[0081] For each pair of key points and line segments, perform steps S602-S604.

[0082] If the difference is determined to be greater than or equal to the threshold, proceed to step S605; if the difference is determined to be less than the threshold, proceed to step S602.

[0083] Step S605: Identify all possible wall line segments.

[0084] Step S606: If two line segments are in the same direction and their endpoints are close enough, then merge the line segments.

[0085] Step S607: If two line segments intersect and have the same direction, delete one of them;

[0086] Step S608: Standardize the direction of the line segments. Adjust the wall line segments to horizontal and vertical straight lines according to the influence range of the key points.

[0087] The horizontal and vertical straight lines are determined as the final wall lines.

[0088] Step S503, vectorize the door / window.

[0089] Figure 7This is a flowchart of vectorized door / window lines according to an optional embodiment of this application, such as... Figure 7 As shown:

[0090] Step S701: Determine the different types of doors and windows;

[0091] Step S702: Extract key points and influence domains from the key point heatmap based on the door and window types;

[0092] Step S703: Calculate the number of key feature points on different types of wall lines;

[0093] The classification of wall line segments includes: horizontal wall lines and vertical wall lines.

[0094] Step S704: Determine whether the number of feature points is even;

[0095] If the number is determined to be even, proceed to step S705; if the number is determined to be not even, proceed to step S706.

[0096] Step S705: Map feature points onto wall line segments as candidate line segments;

[0097] Step S706: Supplement feature points by connecting relationship graph;

[0098] Step S707: Determine the door line segment / window line segment for each type based on the supplementary feature points and the detected feature points;

[0099] Step S708: Remove the line segments whose door and window positions have been detected;

[0100] Step S709: Filter short line segments and merge line segments that are close in distance;

[0101] Step S710: Determine the door / window line segments after filtering.

[0102] Step S711: Update the detected door / window mask image (mask image, used to represent a binary or grayscale image of a specific region in the image) based on the finally obtained door / window line segments.

[0103] Step S504 yields wall line segments, door line segments, and window line segments.

[0104] In summary, the embodiments of this application utilize a method and system for vectorizing floor plans based on key point maps and potential connection relationships obtained through deep learning networks or machine learning methods. This includes the vectorization of wall lines and door / window structures. When vectorizing opening elements such as doors and windows, the position of the wall lines is considered, and the vectorization of opening elements is achieved through feature point-projection. The vectorization of opening elements such as doors and windows does not solely rely on feature point detection; when feature points are insufficient, the position of feature points is inferred using a connection graph, thereby obtaining the position of doors and windows. In other words, the door and window vectorization in this application is based on the vectorized position of the wall lines, introducing projection transformation to ensure consistency between the final vector results of door and window opening elements and the wall line positions. This aligns with the physical meaning of door and window opening elements on the wall in the floor plan, resulting in more accurate vectorization results.

[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0106] Figure 8 This is a structural block diagram of a floor plan vectorization device according to an embodiment of this application; as shown below. Figure 8 As shown, it includes:

[0107] The first determining module 82 is used to determine the key point heat map of building elements within the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, and window;

[0108] The second determining module 84 is used to determine the target wall line in the target area based on the key point heat map of the wall and the connection relationship diagram, and to determine the pre-selected door key points and pre-selected window key points in the target area based on the key point heat map of the door and the key point heat map of the window.

[0109] The mapping module 86 is used to map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and to determine the target door line and target window line in the target area according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line;

[0110] The generation module 88 is used to generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line.

[0111] Using the aforementioned device, key point heatmaps of architectural elements such as walls, doors, and windows within the target area and connection relationship diagrams between these elements are determined. Target wall lines within the target area are determined based on the wall's key point heatmap and connection relationship diagram, and pre-selected door key points and pre-selected window key points within the target area are determined based on the door's key point heatmap and window's key point heatmap. The pre-selected door key points and pre-selected window key points are mapped onto the target wall lines, and target door lines and target window lines within the target area are determined based on the first mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship between the pre-selected window key points and the target wall lines. A vectorized floor plan of the target area is generated based on the target wall lines, target door lines, and target window lines. In other words, after determining the target wall lines, this embodiment of the application can determine the target door lines and target window lines based on the first mapping relationship between the pre-selected door key points and the target wall lines, and the second mapping relationship between the pre-selected window key points and the target wall lines. Through the embodiments of this application, the target wall line, target door line, and target window line can be correlated, solving the problem in related technologies that treat elements such as walls, doors, and windows in a room as independent elements, resulting in the severing of the connection between elements such as walls, doors, and windows.

[0112] In an exemplary embodiment, the second determining module 84 is further configured to extract pre-selected wall key points based on the key point heatmap of the wall, and determine a first brightness value corresponding to the pre-selected wall key points based on the key point heatmap of the wall, wherein the first brightness value is used to indicate a first probability that the pre-selected wall key point is a target wall key point; determine a target wall key point among the pre-selected wall key points whose first brightness value is greater than or equal to a first brightness threshold; determine a first pre-selected wall line of the target area based on the target wall key point; and determine the target wall line based on the connection relationship diagram and the first pre-selected wall line.

[0113] In an exemplary embodiment, the second determining module 84 is further configured to: determine a first region corresponding to the first pre-selected wall line according to the connection relationship diagram; determine the number of first strongly connected pixels in the first region according to the connection relationship diagram, wherein the first strongly connected pixels are pixels in the first region whose brightness value is greater than or equal to a second brightness threshold; determine a first ratio of the number of first strongly connected pixels in the first region to the total number of pixels contained in the first region; determine a second pre-selected wall line in the first pre-selected wall line according to a first size relationship between the first ratio and a first preset ratio; and perform vectorization processing on the second pre-selected wall line to determine the target wall line.

[0114] In an exemplary embodiment, the second determining module 84 is further configured to: 1) Perform geometric correction on the curves and / or broken lines if the second pre-selected wall lines contain curves and / or broken lines, and determine the geometrically corrected curves and / or broken lines as the target wall lines, wherein the geometric correction is used to straighten the curves and / or broken lines; 2) Merge the segments of the multiple third pre-selected wall lines if the first distance between each endpoint of the second pre-selected wall lines is less than or equal to a distance threshold, and / or the angle between the wall lines is less than or equal to an angle threshold, and determine the wall line generated after segment merging as the target wall lines; 3) Delete the other fourth pre-selected wall lines except for any one of the multiple fourth pre-selected wall lines if the second pre-selected wall lines intersect and have the same direction, and determine any one of the fourth pre-selected wall lines as the target wall lines; 4) Repair the broken wall lines if the second pre-selected wall lines contain broken wall lines, and determine the repaired broken wall lines as the target wall lines.

[0115] In an exemplary embodiment, the mapping module 86 is further configured to: determine a first number of preselected door key points mapped to each target wall line according to the first mapping relationship; and determine a second number of preselected window key points mapped to each target wall line according to the second mapping relationship; determine whether the first number is even; and determine whether the second number is even; if the first number is even, determine preselected door lines according to the connection diagram and the first mapping relationship; and if the second number is even, determine preselected window lines according to the connection diagram and the second mapping relationship; and perform vectorization processing on the preselected door lines and the preselected window lines respectively to determine the target door lines and the target window lines.

[0116] In an exemplary embodiment, the mapping module 86 is further configured to, when the first quantity is determined to be odd, add a first feature point according to the first mapping relationship and the connection relationship diagram, and determine the preselected gate line according to the first feature point, the connection relationship diagram and the preselected gate key point; when the second quantity is determined to be odd, add a second feature point according to the second mapping relationship and the connection relationship diagram, and determine the preselected window line according to the second feature point, the connection relationship diagram and the preselected window key point.

[0117] In an exemplary embodiment, the first determining module 82 is further configured to acquire a rasterized floor plan of the target area; and output the rasterized floor plan to a target recognition network, so that the target recognition network outputs a key point heatmap of the building elements and the connection relationship diagram, wherein the target recognition network includes at least one of the following: a skeleton recognition network and a key point recognition network.

[0118] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0119] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0120] S1, determine the key point heat map of the building elements in the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, window;

[0121] S2, determine the target wall line within the target area based on the key point heat map of the wall and the connection relationship diagram, and determine the pre-selected door key points and pre-selected window key points within the target area based on the key point heat map of the door and the key point heat map of the window;

[0122] S3, map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and determine the target door line and target window line in the target area according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line;

[0123] S4. Generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line.

[0124] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0125] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0126] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0127] S1, determine the key point heat map of the building elements in the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, window;

[0128] S2, determine the target wall line within the target area based on the key point heat map of the wall and the connection relationship diagram, and determine the pre-selected door key points and pre-selected window key points within the target area based on the key point heat map of the door and the key point heat map of the window;

[0129] S3, map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and determine the target door line and target window line in the target area according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line;

[0130] S4. Generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line.

[0131] Embodiments of this application also provide a computer program product, including a computer program that is executed by a processor through the steps of any of the above method embodiments.

[0132] Optionally, in this embodiment, the above-described computer program product can be executed by a processor using the following steps:

[0133] S1, determine the key point heat map of the building elements in the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, window;

[0134] S2, determine the target wall line within the target area based on the key point heat map of the wall and the connection relationship diagram, and determine the pre-selected door key points and pre-selected window key points within the target area based on the key point heat map of the door and the key point heat map of the window;

[0135] S3, map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and determine the target door line and target window line in the target area according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line;

[0136] S4. Generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line.

[0137] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0138] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0139] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0140] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A vectorization method of a house type drawing, characterized in that, include: Determine the key point heatmap of building elements within the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, and window; The target wall line within the target area is determined based on the key point heat map of the wall and the connection relationship diagram, and the pre-selected door key points and pre-selected window key points within the target area are determined based on the key point heat map of the door and the key point heat map of the window. The pre-selected door key points and the pre-selected window key points are respectively mapped to the target wall line, and the target door line and target window line in the target area are determined according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line; Generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line; The determination of the target wall line within the target area based on the key point heat map of the wall and the connection relationship diagram includes: Based on the key point heat map of the wall, pre-selected wall key points are extracted, and a first brightness value corresponding to the pre-selected wall key points is determined based on the key point heat map of the wall, wherein the first brightness value is used to indicate the first probability that the pre-selected wall key point is a target wall key point; Among the pre-selected wall key points, identify target wall key points whose first brightness value is greater than or equal to the first brightness threshold. Determine the first pre-selected wall line of the target area based on the key points of the target wall; The first region corresponding to the first pre-selected wall line is determined according to the connection relationship diagram, and the number of first strongly connected pixels in the first region is determined according to the connection relationship diagram, wherein the first strongly connected pixels are pixels in the first region whose brightness value is greater than or equal to the second brightness threshold. Determine a first ratio between the number of first strongly connected pixels in the first region and the total number of pixels contained in the first region; A second pre-selected wall line is determined from the first pre-selected wall lines based on a first size relationship between the first ratio and the first preset ratio. The second pre-selected wall line is vectorized to determine the target wall line.

2. The vectorization method of house type drawing according to claim 1, characterized in that, Vectorizing the second pre-selected wall line to determine the target wall line includes: If the second pre-selected wall line contains a curve and / or a broken line, the curve and / or broken line are geometrically corrected, and the geometrically corrected curve and / or broken line is determined as the target wall line, wherein the geometric correction is used to straighten the curve and / or broken line; If it is determined that there are multiple third pre-selected wall lines in the second pre-selected wall lines where the first distance between each endpoint is less than or equal to a distance threshold, and / or the angle between the wall lines is less than or equal to an angle threshold, the multiple third pre-selected wall lines are merged into segments, and the wall line generated after the segment merging is determined as the target wall line; If it is determined that there are multiple fourth pre-selected wall lines that intersect and are in the same direction among the second pre-selected wall lines, delete the other fourth pre-selected wall lines among the multiple fourth pre-selected wall lines except for any one of the fourth pre-selected wall lines, and determine the any one of the fourth pre-selected wall lines as the target wall line; If a broken wall line is found in the second pre-selected wall line, the broken wall line is repaired by segment repair, and the repaired broken wall line is determined as the target wall line.

3. The vectorization method of a house type drawing according to claim 1, characterized in that, Determining the target gate line and target window line within the target area based on the first mapping relationship and the second mapping relationship includes: A first number of preselected door key points mapped to each target wall line is determined according to the first mapping relationship, and a second number of preselected window key points mapped to each target wall line is determined according to the second mapping relationship; Determine whether the first quantity is even, and determine whether the second quantity is even; If the first quantity is determined to be even, a preselected gate line is determined according to the connection diagram and the first mapping relationship; and if the second quantity is determined to be even, a preselected window line is determined according to the connection diagram and the second mapping relationship. The pre-selected gate line and the pre-selected window line are vectorized respectively to determine the target gate line and the target window line.

4. The vectorization method of house type drawing according to claim 3, characterized in that, After determining whether the first quantity is even and whether the second quantity is even, the method further includes: If the first quantity is determined to be odd, a first feature point is added according to the first mapping relationship and the connection relationship diagram, and the preselected door line is determined according to the first feature point, the connection relationship diagram and the preselected door key point; If the second quantity is determined to be odd, a second feature point is added according to the second mapping relationship and the connection relationship diagram, and the preselected window line is determined according to the second feature point, the connection relationship diagram and the preselected window key point.

5. The vectorization method of house type drawing according to claim 1, characterized in that, Determine the key point heatmap of building elements within the target area and the connection relationship diagram between the building elements, including: Obtain a rasterized floor plan of the target area; The rasterized floor plan is output to the target recognition network so that the target recognition network outputs the key point heat map of the building elements and the connection relationship diagram, wherein the target recognition network includes at least one of the following: skeleton recognition network and key point recognition network.

6. A vectorization device of a house type drawing, characterized by, include: The first determining module is used to determine the key point heat map of building elements within the target area and the connection relationship diagram between the building elements, wherein the building elements include at least one of the following: wall, door, and window; The second determining module is used to determine the target wall line within the target area based on the key point heat map of the wall and the connection relationship diagram, and to determine the pre-selected door key points and pre-selected window key points within the target area based on the key point heat map of the door and the key point heat map of the window. The mapping module is used to map the pre-selected door key points and the pre-selected window key points to the target wall line respectively, and to determine the target door line and target window line within the target area according to the first mapping relationship and the second mapping relationship, wherein the first mapping relationship is the mapping relationship between the pre-selected door key points and the target wall line, and the second mapping relationship is the mapping relationship between the pre-selected window key points and the target wall line; The generation module is used to generate a vectorized floor plan of the target area based on the target wall line, the target door line, and the target window line; The second determining module is further configured to: extract pre-selected wall key points based on the key point heatmap of the wall; determine a first brightness value corresponding to the pre-selected wall key points based on the key point heatmap of the wall, wherein the first brightness value is used to indicate a first probability that the pre-selected wall key point is a target wall key point; determine target wall key points among the pre-selected wall key points whose first brightness value is greater than or equal to a first brightness threshold; determine a first pre-selected wall line of the target area based on the target wall key points; determine a first area corresponding to the first pre-selected wall line based on the connection relationship diagram; determine the number of first strongly connected pixels in the first area based on the connection relationship diagram, wherein the first strongly connected pixels are pixels in the first area whose brightness value is greater than or equal to a second brightness threshold; determine a first ratio of the number of first strongly connected pixels in the first area to the total number of pixels contained in the first area; determine a second pre-selected wall line among the first pre-selected wall lines based on a first size relationship between the first ratio and a first preset ratio; and perform vectorization processing on the second pre-selected wall line to determine the target wall line.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method as described in any one of claims 1 to 5.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method as described in any one of claims 1 to 5 through the computer program.