Door and window opening identification method, device, equipment and readable storage medium

By acquiring and analyzing the vector information of CAD door and window opening drawings, and utilizing multi-channel recall and machine learning algorithms, the door and window opening components are automatically identified and classified, thus solving the time-consuming and labor-intensive problem of manual modeling in the existing technology and achieving efficient and accurate automatic modeling.

CN114821617BActive Publication Date: 2025-09-23GLODON CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210224725.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-09
Publication Date
2025-09-23
Estimated Expiration
2042-03-09

AI Technical Summary

Technical Problem

In the existing technology, CAD drawings of door and window openings are difficult to automatically recognize, which makes modeling difficult and time-consuming.

Method used

By obtaining the vector drawing of the target wall element, detecting and classifying the door and window openings based on their attribute features, extracting layer information, and using multi-way recall and machine learning algorithms to identify the door and window opening component elements, their position and type on the vector drawing are determined, thus achieving automatic modeling.

Benefits of technology

It realizes automatic recognition of door and window openings, reduces the difficulty of modeling, saves time, and improves modeling efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821617B_ABST
    Figure CN114821617B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of target detection technology, and discloses a method, apparatus, device, and readable storage medium for identifying door and window openings. The method comprises: obtaining a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door and window opening component element; detecting and classifying the door and window opening component elements based on the attribute characteristics of the door and window opening, and determining the location information of each type of door and window opening on the vector drawing; extracting multiple layers of information from the vector drawing, identifying the door and window opening component elements based on the door and window opening characteristics of each layer of information, and obtaining candidate elements corresponding to the door and window opening component elements; and determining the target door and window opening component element in the target wall element from the candidate elements based on the characteristic information and location information of the door and window opening component elements. By implementing the present invention, automatic identification and automatic modeling of door and window openings in the vector drawing are achieved, eliminating the need for manual modeling, reducing modeling difficulty, and saving modeling time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology, and in particular to a method, device, equipment and readable storage medium for identifying door and window openings. Background Art

[0002] Door and window opening drawings in building plans are generally CAD vector drawings. Identifying door and window opening component elements requires identifying the various vector elements contained in the CAD vector drawings, such as doors, windows, door-window assemblies, bay windows, wall openings, door and window opening annotations (names, lead annotations), and non-door and window opening related elements. With the development of information technology, technicians currently use 3D modeling software for quantity calculation and modeling. However, existing technologies have difficulty automatically identifying door and window openings in CAD door and window opening drawings, requiring manual modeling, which is difficult and time-consuming. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a door and window opening recognition method, device, equipment and readable storage medium to solve the problem that door and window openings in CAD door and window opening drawings are difficult to recognize, resulting in difficult and time-consuming modeling.

[0004] According to a first aspect, an embodiment of the present invention provides a method for identifying door and window openings, comprising: obtaining a vector drawing corresponding to a target wall element, the target wall element including at least one door and window opening component element; detecting and classifying the door and window opening component elements based on attribute features of the door and window openings, and determining position information of each type of door and window openings on the vector drawing; extracting multiple layer information from the vector drawing, identifying the door and window opening component elements based on the door and window opening features of each layer information, and obtaining candidate elements corresponding to the door and window opening component elements; determining the target door and window opening component element in the target wall element from the candidate elements based on the feature information and the position information of the door and window opening component elements.

[0005] The door and window opening identification method provided by an embodiment of the present invention obtains a vector drawing corresponding to a target wall element, and detects and classifies the door and window opening component elements in the vector drawing based on the attribute characteristics of the door and window opening to determine the location information of each type of door and window opening on the vector drawing. The method then extracts the layer information of the vector drawing, identifies the door and window opening component elements based on the door and window opening features of each layer information, and obtains candidate elements corresponding to the door and window opening component elements. Based on the characteristic information and location information of the door and window opening component elements, the target door and window opening component element in the target wall element is determined from the candidate elements. This allows automatic identification of door and window openings in the vector drawing, facilitates automatic modeling based on the identified door and window openings, eliminates the need for manual modeling, reduces modeling difficulty, saves modeling time, and improves modeling efficiency.

[0006] In combination with the first aspect, in a first implementation of the first aspect, extracting multiple layer information from the vector drawing, identifying door and window opening component primitives based on the door and window opening features of each layer information, and obtaining candidate primitives corresponding to the door and window opening component primitives, includes: obtaining multiple primitive information in the vector drawing; extracting features corresponding to the multiple primitive information to obtain layer information corresponding to multiple layer categories; identifying the door and window opening features contained in each layer information; and identifying candidate primitives corresponding to the door and window opening component primitives from the layer information based on the door and window opening features.

[0007] The door and window opening recognition method provided by the embodiment of the present invention identifies the primitive features in each layer so as to perform multi-way recall based on the primitive features in each layer to obtain multiple candidate primitives containing door and window opening components, thereby ensuring the comprehensiveness and accuracy of door and window opening recognition.

[0008] In combination with the first embodiment of the first aspect, in the second embodiment of the first aspect, the identifying of candidate graphics elements corresponding to the door and window opening component graphics elements from the layer information based on the door and window opening features includes: performing multi-way recall of the component graphics elements in the respective layer information based on the door and window opening features to obtain all component graphics elements corresponding to the door and window opening features; sorting all the component graphics elements to obtain the sorting results of the component graphics elements; and determining, based on the sorting results, the candidate graphics elements corresponding to the door and window opening component graphics elements from all the component graphics elements.

[0009] The door and window opening recognition method provided by the embodiment of the present invention performs multi-way recall of component graphics in each layer information through door and window opening features to obtain all component graphics corresponding to the door and window opening features, and then sorts all component graphics. According to the sorting results of the component graphics, candidate graphics corresponding to the door and window opening component graphics are determined from all component graphics. Therefore, when the component graphics are determined, they can be further screened to obtain accurate candidate graphics, thereby ensuring the accuracy of subsequent door and window opening recognition.

[0010] In combination with the first aspect, in a third implementation of the first aspect, the determining of the target door and window hole component element in the target wall element from the candidate elements based on the characteristic information of the door and window hole component element and the position information includes: determining the target type corresponding to the door and window hole component element based on the characteristic information of the door and window hole component element; grouping the candidate elements according to the position information to obtain multiple grouping results; and determining the target door and window hole component element corresponding to the target type from each group.

[0011] In combination with the third embodiment of the first aspect, in the fourth embodiment of the first aspect, determining the target type corresponding to the door and window opening component primitive based on the characteristic information of the door and window opening component primitive includes: determining multiple types and the probabilities of each type corresponding to the door and window opening component primitive based on the characteristic information of the door and window opening component primitive; sorting the probabilities of each type to obtain the maximum type probability; and determining the type corresponding to the maximum type probability as the target type.

[0012] The door and window opening recognition method provided by the embodiment of the present invention determines multiple types and the probabilities of each type corresponding to the door and window opening component graphic element through the characteristic information of the door and window opening component graphic element, obtains the maximum type probability corresponding to each type, determines the type corresponding to the maximum type probability as the target type, and then groups the candidate graphic elements according to the position information to obtain multiple grouping results, and determines the target door and window opening component graphic element corresponding to the target type from each group, thereby ensuring the recognition accuracy of each type of door and window opening.

[0013] In combination with the third embodiment of the first aspect, in the fifth embodiment of the first aspect, determining the target door and window opening component graphic elements corresponding to the target type from each group includes: obtaining the probability values ​​of the door and window opening component graphic elements corresponding to each target type in the same group; sorting the probability values, and determining the target door and window opening component graphic elements from each group based on the sorting results of the probability values.

[0014] The door and window opening recognition method provided by the embodiment of the present invention obtains the probability values ​​of the door and window opening component graphics corresponding to each target type in the same group, thereby determining the target door and window opening component graphics that meets the current target type from each group. In this way, the candidate graphics can be further screened to obtain the final target door and window opening component graphics, further ensuring the recognition accuracy of the target door and window opening.

[0015] In combination with the first aspect, in the sixth implementation of the first aspect, the door and window opening component graphics are detected and classified based on the attribute characteristics of the door and window openings, and the position information of each type of door and window openings on the vector drawing is determined, including: obtaining a bitmap drawing corresponding to the vector drawing; detecting and classifying the door and window openings to be identified in the bitmap drawing based on a preset target detection method, and obtaining the type detection probability corresponding to the door and window openings; when the type detection probability exceeds a preset probability value, obtaining the position coordinates of the door and window openings in the bitmap drawing; based on the position coordinates and the coordinate conversion between the bitmap drawing and the vector drawing, determining the position information of each type of door and window openings on the vector drawing.

[0016] The door and window opening identification method provided by the embodiment of the present invention detects and classifies the door and window openings to be identified on the bitmap drawing corresponding to the vector drawing through a preset target detection method, and obtains the type detection probability corresponding to the door and window opening. When the type detection probability exceeds the preset probability value, the position coordinates of the door and window opening in the bitmap drawing are determined, and then converted into vector coordinate information to obtain the position information of each type of door and window opening on the vector drawing. In this way, the various graphic elements and graphic element positions contained in the vector drawing can be determined, which facilitates the subsequent accurate identification and judgment of the target door and window opening.

[0017] In combination with the first aspect or any one of the first to sixth embodiments of the first aspect, in the seventh embodiment of the first aspect, the method further includes: converting the target door and window opening component element into model data information.

[0018] The door and window opening recognition method provided by the embodiment of the present invention realizes automatic modeling of the target door and window opening component graphics by converting the target door and window opening component graphics into model data information, avoids complicated manual modeling, and improves modeling accuracy and efficiency.

[0019] According to the second aspect, an embodiment of the present invention provides a device for identifying door and window openings, including: an acquisition module for acquiring a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door and window opening component element; a classification module for detecting and classifying the door and window openings to be identified based on the attribute characteristics of the door and window openings to be identified, and determining the position information of each type of door and window opening on the vector drawing; an identification module for extracting multiple layer information from the vector drawing, identifying the door and window opening component elements based on the door and window opening characteristics of each layer information, and obtaining candidate elements corresponding to the door and window opening component elements; a determination module for determining the target door and window opening component element in the target wall element from the candidate elements based on the feature information and the position information of the door and window opening component element.

[0020] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for identifying door and window openings described in the first aspect or any embodiment of the first aspect by executing the computer instructions.

[0021] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the door and window opening recognition method described in the first aspect or any embodiment of the first aspect.

[0022] It should be noted that the corresponding beneficial effects of the door and window opening recognition device, electronic device and computer-readable storage medium provided in the embodiments of the present invention can be found in the description of the corresponding contents in the door and window opening recognition method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 is a flow chart of a method for identifying door and window openings according to an embodiment of the present invention;

[0025] Figure 2 is another flow chart of a method for identifying door and window openings according to an embodiment of the present invention;

[0026] Figure 3 is another flow chart of a method for identifying door and window openings according to an embodiment of the present invention;

[0027] Figure 4 is a target block diagram of a gate primitive according to an embodiment of the present invention;

[0028] Figure 5 is a schematic diagram of a target frame of a window primitive according to an embodiment of the present invention;

[0029] Figure 6 is a target block diagram of a door-window graphic element according to an embodiment of the present invention;

[0030] Figure 7 is a schematic diagram of a target frame of a floating window graphic element according to an embodiment of the present invention;

[0031] Figure 8 is a schematic diagram of a target frame of a wall hole graphic element according to an embodiment of the present invention;

[0032] Figure 9 is a schematic diagram showing differences in drawings of door and window openings according to an embodiment of the present invention;

[0033] Figure 10 is a schematic diagram of a wall element according to an embodiment of the present invention;

[0034] Figure 11 is a schematic diagram of a door and window opening component according to an embodiment of the present invention;

[0035] Figure 12 is a schematic diagram of executing the recognition algorithm according to an embodiment of the present invention;

[0036] Figure 13 is a schematic diagram of a verification and recognition result according to a preferred embodiment of the present invention;

[0037] Figure 14 This is a structural block diagram of a device for identifying door and window openings according to an embodiment of the present invention;

[0038] Figure 15 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0040] According to an embodiment of the present invention, an embodiment of a method for identifying door and window openings is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0041] In this embodiment, a method for identifying door and window openings is provided, which can be used in electronic devices such as mobile phones, tablet computers, and computers. Figure 1 FIG. 1 is a flow chart of a method for identifying door and window openings according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0042] S11, obtaining a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door and window opening component element.

[0043] Vector drawings are architectural drawings created based on the geometric characteristics of a 3D building model. These drawings can be composed of points or lines, generated using 3D model quantity calculation software, or imported from external storage. There are no specific restrictions on how these drawings are obtained; those skilled in the art can determine this based on their specific needs.

[0044] The target wall element is a wall entity in the building model. One or more door and window openings are defined within the target wall element. This means the target wall element includes one or more door and window opening component elements. These component elements are created by technicians when creating the wall element. These component elements can include: door elements (e.g., standard door, diagonal door, etc.), window elements (e.g., standard window, corner window, etc.), and wall hole elements (e.g., hole, hole+name, etc.).

[0045] S12, detecting and classifying the door and window opening component elements based on the attribute characteristics of the door and window openings, and determining the position information of each type of door and window opening on the vector drawing.

[0046] Different types of door and window openings have different attribute characteristics. For example, width, thickness, and height above the ground vary depending on the type of door and window opening. Electronic equipment can use target detection methods to detect the door and window opening component elements in the wall element based on the attributes it recognizes. It can then classify and locate the door and window opening component elements, and obtain the coordinate information of each type of door and window opening on the vector drawing, that is, the position of the door and window opening on the vector drawing.

[0047] S13, extracting multiple layer information from the vector drawing, identifying the door and window hole component primitives based on the door and window hole features of each layer information, and obtaining candidate primitives corresponding to the door and window hole component primitives.

[0048] Based on the characteristics of the door and window openings, the electronic device extracts relevant layer information from the vector drawing, including a wall line layer, a door and window opening geometry layer, and a door and window opening annotation layer. The electronic device can sequentially traverse each layer of information, extract the corresponding door and window opening features, and identify the door and window opening component primitives in each layer of information based on the door and window opening features, thereby obtaining multiple door and window opening entities corresponding to the door and window opening component primitives, i.e., candidate primitives corresponding to the door and window opening component primitives.

[0049] S14 , based on the feature information and position information of the door / window opening component element, determining a target door / window opening component element in the target wall element from the candidate elements.

[0050] The electronic device can analyze and predict the candidate graphics elements based on the characteristic information of the door and window opening component graphics elements, screen out the graphics elements with higher probability, and then further group and sort the screened graphics elements according to the position information of the graphics elements, and determine the target door and window opening component graphics elements from the grouped and sorted graphics element entities.

[0051] The door and window opening identification method provided in this embodiment obtains a vector drawing corresponding to a target wall element and detects and classifies the door and window opening component elements in the vector drawing based on the attribute characteristics of the door and window opening to determine the location information of each type of door and window opening on the vector drawing. The method then extracts the layer information of the vector drawing and identifies the door and window opening component elements based on the door and window opening features of each layer information to obtain candidate elements corresponding to the door and window opening component elements. Based on the characteristic information and location information of the door and window opening component elements, the target door and window opening component element in the target wall element is determined from the candidate elements. This allows automatic identification of door and window openings in the vector drawing, facilitating automatic modeling based on the identified door and window openings without the need for manual modeling, thus reducing modeling difficulty, saving modeling time, and improving modeling efficiency.

[0052] In this embodiment, a method for identifying door and window openings is provided, which can be used in electronic devices such as mobile phones, tablet computers, and computers. Figure 2 FIG. 1 is a flow chart of a method for identifying door and window openings according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0053] S21, obtaining a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door and window hole component element. Detailed descriptions refer to the corresponding descriptions of the above embodiments, which will not be repeated here.

[0054] S22: Detect and classify the door and window hole component primitives based on the attribute characteristics of the door and window holes, and determine the location information of each type of door and window hole on the vector drawing. For detailed description, please refer to the corresponding description of the above embodiment, which will not be repeated here.

[0055] S23, extracting multiple layer information from the vector drawing, identifying the door and window hole component primitives based on the door and window hole features of each layer information, and obtaining candidate primitives corresponding to the door and window hole component primitives.

[0056] Specifically, the above step S23 may include:

[0057] S231, obtaining information of multiple graphic elements in the vector drawing.

[0058] A vector drawing contains multiple graphic elements, and the graphic element information may include line elements and annotation elements. Line elements may include wall line elements and door and window opening line elements. Annotation elements may include dimension elements and name elements. The electronic device may recognize the vector drawing to extract the multiple graphic element information contained in the vector drawing.

[0059] S232: Extract features corresponding to multiple graphic element information to obtain layer information corresponding to multiple layer categories.

[0060] After identifying multiple graphic element information, the electronic device can determine the relevant layers of information such as the annotation graphic elements, target prediction boxes, wall lines, etc. corresponding to the door and window openings based on the features corresponding to the multiple graphic element information, that is, the layer information corresponding to each layer category, which may specifically include: wall line layer, door and window opening geometry layer, door and window opening annotation layer, etc.

[0061] Specifically, the electronic device groups the identified primitive information into different groups based on layer information, then traverses all layer information to extract corresponding primitive features, as shown in Table 1. The electronic device can use a machine learning model to perform offline model training on the layers based on three category labels: wall primitive line layer, door and window opening line layer, and door and window opening annotation layer. This generates a layer prediction model. The features corresponding to the multiple primitive information extracted online are then input into the layer prediction model, and the layers are determined based on this layer prediction model.

[0062] Table 1. Element feature table

[0063]

[0064]

[0065] S233: Identify the door and window opening features contained in each layer information.

[0066] The electronic device traverses all the layer information obtained, identifies the graphic element features contained in each layer information in turn, and then determines the door and window opening features that meet the door and window opening graphic element attributes.

[0067] S234: identifying candidate graphic elements corresponding to the door and window opening component graphic elements from the layer information based on the door and window opening features.

[0068] Different recall methods are determined based on different door and window opening characteristics, and multiple candidate primitives that meet the door and window opening characteristics are identified from the layer information according to the different recall methods. For example, the electronic device can cluster the door and window opening lines recommended by the layer into multiple line clusters according to a pre-set threshold, then search for the annotation information of the door and window openings, and recall the combined entities of the line clusters and the annotation information to obtain candidate primitives corresponding to the door and window opening component primitives.

[0069] Specifically, the above step S234 may include:

[0070] (1) Based on the door and window opening features, multi-way recall of component graphics in each layer information is performed to obtain all component graphics corresponding to the door and window opening features.

[0071] The electronic device performs multi-channel parallel recall of component elements in each layer information according to different recall methods, obtaining all component elements contained in all layer information. Among them, multi-channel recall includes block reference recall, Tianzheng recall, object detection recall, name recall, and layer recall.

[0072] Specifically, for block reference recall, CAD vector drawings record block reference information. Doors, windows, and door-window-linked entities are all independent entities stored as block references. Electronic devices can use this feature to reduce the difficulty of searching for door and window opening entity line clusters and annotations, achieving higher accuracy. Specifically, electronic devices can obtain all block reference entities in the CAD vector drawing and analyze whether the layer name corresponding to the block reference entity is in the door and window opening layer name whitelist. If so, the block reference entity is recalled; if the annotation entity corresponding to the block reference entity is also in the door and window opening annotation whitelist, the annotation entity is also recalled.

[0073] Specifically, for the Tian Zheng recall, CAD vector drawings, about 17% of door and window opening entities belong to Tian Zheng software entities, and the entity completely retains the line clusters and annotations of the door and window opening entities, which can effectively improve the accuracy of door and window opening recognition. Therefore, when identifying CAD vector drawings, if the line clusters and annotations are identified as door and window opening entities belonging to Tian Zheng software, the electronic device can directly recall the entity using the Tian Zheng recall method.

[0074] Specifically, for target detection recall, taking the CV target detection method as an example, due to the high accuracy and good generalization of the CV target detection method, the electronic device can recall the curve primitives and annotation primitives predicted in the target detection box.

[0075] Specifically, for name recall, the electronic device can search for the door and window hole line primitives corresponding to the name primitives based on the door and window hole name primitives recommended by each layer according to a preset threshold, and combine the searched door and window hole line primitives with the name primitives into an entity for recall.

[0076] Specifically, for layer recall, the electronic device can perform density clustering based on the door and window opening line primitives recommended by each layer according to a pre-set threshold to form line clusters corresponding to the door and window openings, and then search for the door and window opening annotation primitives determined by the line clusters, and recall the combined entity of the line clusters and the door and window opening annotation primitives.

[0077] (2) Sort all component elements to obtain the sorting results of the component elements.

[0078] Feature extraction is performed on all primitive entities obtained from multi-way recall to obtain a feature extraction table, as shown in Table 2. The electronic device can input the features in the feature extraction table into the prediction model, calculate the predicted probabilities for the categories of all component primitives, and sort all component primitives according to the calculated predicted probabilities to obtain a sorting result for the component primitives.

[0079] Table 2 Feature extraction table

[0080]

[0081]

[0082] (3) Based on the sorting results, determine the candidate elements corresponding to the door and window opening component elements from all component elements.

[0083] After obtaining the predicted probabilities of all component graphics, the electronic device can filter the component graphics with lower confidence (for example, the predicted probability is less than 90%) according to the sorting results of the predicted probabilities, and retain the component graphics with higher probability confidence, that is, the candidate graphics corresponding to the door and window opening component graphics.

[0084] S24 , based on the feature information and position information of the door / window opening component element, determine a target door / window opening component element in the target wall element from the candidate elements.

[0085] Specifically, the above step S24 may include:

[0086] S241, determining the target type corresponding to the door and window opening component primitive based on the feature information of the door and window opening component primitive.

[0087] The electronic device can determine the model label corresponding to the door and window opening component element based on its physical features (such as the feature information shown in Table 2) and use a machine learning algorithm to train the entity to obtain a category prediction model. The model label can include five category labels: door, window, door-window combination, bay window, and wall opening.

[0088] The trained category prediction model is set in an electronic device, and the entity features of the identified door and window opening component primitives are input into the category prediction model to obtain the corresponding type of each door and window opening component primitive.

[0089] Specifically, the above step S241 may include:

[0090] (1) Based on the characteristic information of the door and window opening component primitives, multiple types corresponding to the door and window opening component primitives and the probability of each type are determined.

[0091] The electronic device can input the physical features of the door and window opening component graphics it recognizes into the category prediction model, and the category prediction model can output the corresponding type and its corresponding type probability based on the input physical features, that is, the electronic device can determine the corresponding type and each type probability of each door and window opening component graphics.

[0092] (2) Sort the probabilities of each type and obtain the maximum type probability.

[0093] The electronic device sorts the multiple type probabilities corresponding to the door and window opening component graphics, for example, sorting the multiple type probabilities from large to small, or sorting the multiple type probabilities from small to large, and then determining the largest type probability based on the sorting results of the type probabilities.

[0094] (3) The type corresponding to the maximum type probability is determined as the target type.

[0095] After obtaining the maximum type probability, the electronic device uses the type corresponding to that maximum probability as the target type for the door / window opening component primitive. For example, if the electronic device determines that the multiple types corresponding to the door / window opening component primitive are 98% for door, 85% for window, 85% for bay window, 80% for door-window combination, and 70% for wall opening, the target type for the door / window opening component primitive can be determined to be door.

[0096] S242: Group the candidate graphic elements according to the position information to obtain a plurality of grouping results.

[0097] After obtaining the candidate graphic elements, the position information of each candidate graphic element in the vector drawing is obtained, and the candidate graphic elements are grouped according to the same position information to obtain multiple groups corresponding to the candidate graphic elements.

[0098] S243: Determine the target door and window opening component graphic element corresponding to the target type from each group.

[0099] Since there may be multiple repeated door and window opening component graphics elements for the same location information, after completing the grouping of candidate graphics elements, the electronic device can sort the type probabilities of the door and window opening component graphics elements in each group from high to low, and then determine the target door and window opening component graphics element corresponding to the target type from the grouped and sorted door and window opening component graphics elements.

[0100] Specifically, the above step S243 may include:

[0101] (1) Obtain the probability value of the door and window opening component element corresponding to each target type in the same group.

[0102] Each group corresponding to the door and window component primitive may contain multiple target types of door and window component primitives and their probability values. The electronic device may sequentially traverse each group and obtain the probability value of each target type of door and window component primitive in each group.

[0103] (2) Sort the probability values ​​and determine the target door and window opening component elements from each group based on the sorting results of the probability values.

[0104] The electronic device sorts the probability values ​​of the door and window opening component graphics elements of each target type, obtains the probability value sorting results of the door and window opening component graphics elements in each group, determines the door and window opening component graphics element with the highest probability value, and determines the door and window opening component graphics element with the highest probability value as the target door and window opening component graphics element.

[0105] The door and window opening recognition method provided in this embodiment identifies primitive features in each layer, so as to perform multi-way recall based on the primitive features in each layer to obtain multiple candidate primitives containing door and window opening components, thereby ensuring the comprehensiveness and accuracy of door and window opening recognition. Multi-way recall of component primitives in each layer information is performed based on the door and window opening features to obtain all component primitives corresponding to the door and window opening features. All component primitives are then sorted, and candidate primitives corresponding to the door and window opening component primitives are determined from all component primitives based on the sorted component primitives. Thus, once the component primitives are determined, they can be further screened to obtain accurate candidate primitives, ensuring the accuracy of subsequent door and window opening recognition.

[0106] By using the characteristic information of the door and window hole component primitives, multiple types and probabilities corresponding to the door and window hole component primitives are determined, and the maximum type probability corresponding to each type is obtained. The type corresponding to the maximum type probability is determined as the target type. Then, the candidate primitives are grouped according to the position information to obtain multiple grouping results. The target door and window hole component primitives corresponding to the target type are determined from each group, thereby ensuring the recognition accuracy of each type of door and window hole. By obtaining the probability values ​​of the door and window hole component primitives corresponding to each target type in the same group, the target door and window hole component primitives that meet the current target type are determined from each group. This allows the candidate primitives to be further screened to obtain the final target door and window hole component primitive, further ensuring the recognition accuracy of the target door and window hole.

[0107] In this embodiment, a method for identifying door and window openings is provided, which can be used in electronic devices such as mobile phones, tablet computers, and computers. Figure 3 FIG. 1 is a flow chart of a method for identifying door and window openings according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0108] S31, obtaining a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door and window hole component element. Detailed descriptions refer to the corresponding descriptions of the above embodiments, which will not be repeated here.

[0109] S32, detecting and classifying the door and window opening component elements based on the attribute characteristics of the door and window openings, and determining the position information of each type of door and window opening on the vector drawing.

[0110] Specifically, the above step S32 may include:

[0111] S321, obtaining a bitmap drawing corresponding to the vector drawing.

[0112] The electronic device converts the vector drawing into a bitmap drawing. Specifically, the electronic device may represent the vector drawing as a vector matrix and, using the conversion relationship between vector matrices and bitmap matrices, convert the vector matrix into a bitmap matrix to obtain a bitmap drawing corresponding to the bitmap matrix. For example, the content of the grid area of ​​a CAD drawing may be exported and converted into a PNG image.

[0113] S322 , detecting and classifying the door and window openings to be identified in the bitmap drawing based on a preset target detection method, and obtaining the type detection probability corresponding to the door and window openings.

[0114] Before identifying door and window opening elements, the electronic device can identify door and window opening components, wall elements, CAD recognition options, and CAD drawings. Door and window opening components include information such as name, width, height, and height above ground; wall elements include information such as name, wall thickness, and centerline; CAD recognition options include key information such as the door and window opening name; and CAD drawings are DWG drawings containing both vector and text information. Specifically, the electronic device can convert the input information into the data required by the CV object detection method, extract the names from the door and window opening components, and organize them into a name whitelist. This allows the door and window opening elements to identify components with the same name and search for the corresponding component attribute information. For the CAD recognition option, the provided door and window opening name configuration options can be used to determine whether the recognized text contains these key fields. If so, it is identified as the door and window opening name. Regarding wall element information extraction, walls play a key role in door and window opening recognition. The wall thickness value can be used to determine the important threshold parameters for nearby annotations and lines. If the wall thickness is missing, a default value is required, which is the average thickness of all wall elements. The CAD drawing contains text with keywords for door and window openings, and the electronic device can calculate the average height of the text to identify the parameter threshold for text clustering.

[0115] Since the identification of door and window openings is different from that of other components, the differences between different types of door and window openings are small, such as Figure 9 The primitives shown are general gate primitives ( Figure 9a) has richer geometric lines and descriptions; the door with simpler geometry ( Figure 9 b) and larger door and window panels ( Figure 9 c), it is difficult to identify; the wall hole using the lead wire method ( Figure 9 d) The scale span is large, and its recognition difficulty is also greater. Here, the electronic device can use the CV target detection method to treat the door and window hole line clusters, lead lines, and names as a whole, and use CV target detection to classify and recognize the door and window holes in the bitmap drawing area. For example, when recognizing the door element, the door's geometric line clusters and labels are all boxed, such as Figure 4 As shown; when performing window primitive recognition, select the window's geometric line cluster and annotation, as shown Figure 5 As shown; when performing door-window element recognition, select the door-window geometric line cluster and annotation, as shown Figure 6 As shown; when performing bay window primitive recognition, select the bay window's geometric line cluster and annotations, as shown Figure 7 As shown in the figure; when identifying the wall hole element, select the geometric line cluster, leader line, and annotation of the wall hole, as shown in the figure. Figure 8 shown.

[0116] Electronic devices can recognize geometric lines and names as a whole, reducing the complexity of post-processing. To mitigate the sensitivity of CV object detection methods to scale and geometric complexity, door and window openings are divided into 11 sub-object detection categories to improve overall object detection. Electronic devices can use CV object detection algorithms to perform pixel-level object detection and classification to locate door and window opening targets. Currently, four major categories and 11 sub-categories are involved, as shown in Table 3.

[0117] Table 3 Classification of door and window opening types

[0118]

[0119] Specifically, the electronic device can classify the door and window opening target box labels into four major categories and 11 minor categories. The door and window opening target box is the minimum bounding box that contains the name, ruler, and geometric lines. The CV deep learning model is used to perform multiple rounds of training on the door and window opening target box (the box of the door and window opening) to determine the optimal model as the CV target detection model. When predicting the door and window opening primitives, the electronic device can convert the CAD drawing into a PNG image (bitmap drawing) and then use the CV target detection model to predict the door and window opening primitives. The CV target detection model obtains the position, category, and probability value of the box box in the PNG image coordinates. The position of the box box in the PNG image is converted to the CAD drawing, and the corresponding category and probability value are recorded to complete the detection, classification, and positioning of the door and window openings.

[0120] S323: When the type detection probability exceeds a preset probability value, the position coordinates of the door and window openings in the bitmap drawing are obtained.

[0121] The preset probability value is a pre-set probability used to determine the type of the door / window opening graphic element. This preset probability value can be 85%, 90%, or 95%, or other values, which are not specifically limited here. The electronic device can compare the type detection probability with the preset probability value to determine whether the type detection probability exceeds the predicted probability value. If the type detection probability exceeds the preset probability value, the type corresponding to the current door / window opening graphic element is determined, and the position coordinates of the current door / window opening graphic element on the bitmap drawing are located.

[0122] S324 , determining the position information of each type of door and window opening on the vector drawing based on the position coordinates and the coordinate conversion between the bitmap drawing and the vector drawing.

[0123] The electronic device converts the bitmap coordinate system into a vector coordinate system (for example, converts the PNG coordinate system into a CAD coordinate system) through coordinate conversion, and then converts the position coordinates of the door and window opening elements in the bitmap drawing into position coordinates on the vector drawing, so as to truly locate the position of the door and window opening elements on the vector drawing.

[0124] S33: Extract multiple layers of information from the vector drawing, identify the door and window opening component primitives based on the door and window opening features of each layer of information, and obtain candidate primitives corresponding to the door and window opening component primitives. Detailed descriptions are provided in the corresponding descriptions of the above embodiments, which will not be repeated here.

[0125] S34, based on the characteristic information and position information of the door and window opening component element, determine the target door and window opening component element in the target wall element from the candidate elements. Detailed descriptions refer to the corresponding descriptions of the above embodiments, which will not be repeated here.

[0126] S35, converting the target door and window opening component graphic element into model data information.

[0127] The electronic device normalizes the attributes of the target door and window opening component primitives, such as removing invalid spaces and characters and adjusting the format to a unified model format. It then obtains attribute information such as the position, width, height, and height above the ground of the target door and window opening component primitives. The identified target door and window opening component primitives are converted and output into an intermediate model, such as converting the name, attribute information, location information, and category of the target door and window opening component primitives into an intermediate data model as data information for 3D modeling.

[0128] The door and window opening identification method provided in this embodiment detects and classifies the door and window openings to be identified on the bitmap drawings corresponding to the vector drawings using a preset target detection method, obtaining the corresponding type detection probability of the door and window openings. When the type detection probability exceeds the preset probability value, the position coordinates of the door and window openings in the bitmap drawings are determined, and then converted into vector coordinate information to obtain the position information of each type of door and window opening on the vector drawings. This can determine the various primitives contained in the vector drawings and their positions, facilitating the subsequent accurate identification and determination of the target door and window openings. By converting the target door and window opening component primitives into model data information, automatic modeling of the target door and window opening component primitives is achieved, avoiding complex manual modeling and improving modeling accuracy and efficiency.

[0129] This embodiment provides a method for door and window hole recognition and modeling implemented using the above method. The specific steps are as follows:

[0130] (1) Obtain the wall elements and door and window opening components newly created by the technicians, such as Figure 10 Wall elements shown and Figure 11 The door and window opening component elements shown;

[0131] (2) In response to the user's recognition operation, the recognition algorithm is executed, such as Figure 12 As shown. The door and window opening vector information in the vector drawing is further identified based on the recognition algorithm, and door and window opening graphic elements are created based on the vector information, and the verification report content of the door and window opening graphic elements is output;

[0132] (3) Model verification and modification: technical personnel can determine the verification and recognition results based on the verification report content, such as Figure 13 Then, according to the verification and recognition results, the errors in the door and window opening modeling are found and modified until the entire door and window opening modeling is completed.

[0133] The above method was tested using design institute labels. The current test set consists of 425 drawings, covering 309 design institutes. The recognition results are shown in Table 4.

[0134] Table 4 Recognition results

[0135] category Recall Accuracy Identification + Verification Door and window opening recognition rate 90.86% 90.31% 96.85%

[0136] According to the recognition result table, the recognition rate of door and window openings using the above method reached more than 90%. The recognition rate of door and window openings combined with manual verification reached 96.85%, achieving a relatively high recognition effect.

[0137] This embodiment also provides a door and window opening recognition device, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0138] This embodiment provides a device for identifying door and window openings, such as Figure 14 As shown, including:

[0139] The acquisition module 41 is used to acquire a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door and window hole component element. Detailed descriptions refer to the corresponding descriptions of the above method embodiments, which will not be repeated here.

[0140] The classification module 42 is used to detect and classify the door and window opening component primitives based on the attribute characteristics of the door and window openings, and determine the location information of each type of door and window opening on the vector drawing. Detailed descriptions can be found in the corresponding descriptions of the above method embodiments, which will not be repeated here.

[0141] Identification module 43 is configured to extract multiple layers of information from the vector drawing, identify the door and window opening component primitives based on the door and window opening features of each layer of information, and obtain candidate primitives corresponding to the door and window opening component primitives. For detailed descriptions, please refer to the corresponding descriptions of the above-mentioned method embodiments and will not be repeated here.

[0142] The determination module 44 is used to determine the target door and window opening component element in the target wall element from the candidate elements based on the feature information and position information of the door and window opening component element. Detailed descriptions can be found in the corresponding descriptions of the above method embodiments, which will not be repeated here.

[0143] The door and window hole recognition device provided in this embodiment obtains a vector drawing corresponding to a target wall element and detects and classifies the door and window hole component elements in the vector drawing based on the attribute characteristics of the door and window holes to determine the location information of each type of door and window hole on the vector drawing. The device then extracts the layer information of the vector drawing and recognizes the door and window hole component elements based on the door and window hole characteristics of each layer information, obtaining candidate elements corresponding to the door and window hole component elements. Based on the characteristic information and location information of the door and window hole component elements, the target door and window hole component element in the target wall element is determined from the candidate elements. This allows for automatic identification of door and window holes in the vector drawing, facilitating automatic modeling based on the identified door and window holes without the need for manual modeling, thus reducing modeling difficulty, saving modeling time, and improving modeling efficiency.

[0144] The door and window opening recognition device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0145] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0146] An embodiment of the present invention further provides an electronic device having Figure 14 The identification device of the door and window opening shown.

[0147] See also Figure 15 , Figure 15 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 15 As shown, the electronic device may include: at least one processor 501, such as a CPU (Central Processing Unit), at least one communication interface 503, a memory 504, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The communication interface 503 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a wireless interface. The memory 504 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 504 may optionally be at least one storage device located away from the aforementioned processor 501. The processor 501 may be combined with Figure 14 In the described apparatus, the memory 504 stores an application program, and the processor 501 calls the program code stored in the memory 504 to execute any of the above method steps.

[0148] The communication bus 502 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 15 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0149] The memory 504 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the memory 504 may also include a combination of the above types of memory.

[0150] The processor 501 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0151] The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0152] Optionally, the memory 504 is also used to store program instructions. The processor 501 can call the program instructions to implement the application Figures 1 to 3 The method for identifying door and window openings shown in the embodiment.

[0153] An embodiment of the present invention further provides a non-transitory computer storage medium storing computer-executable instructions capable of executing the processing method of the door and window opening identification method of any of the above-described method embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the storage medium may also include a combination of the above-described types of memory.

[0154] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for identifying door and window openings, characterized in that: include: Obtaining a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door / window opening component element, and the vector drawing is a three-dimensional vector drawing; Detecting and classifying the door and window opening component primitives based on the attribute characteristics of the door and window openings, and determining the position information of each type of door and window opening on the vector drawing; Extracting a plurality of layer information from the vector drawing, identifying door and window hole component primitives based on door and window hole features of each layer information, and obtaining candidate primitives corresponding to the door and window hole component primitives; Determining a target door and window opening component graphic element in the target wall graphic element from the candidate graphic elements based on the feature information of the door and window opening component graphic element and the position information; The extracting of a plurality of layer information from the vector drawing, identifying the door and window hole component primitives based on the door and window hole features of each layer information, and obtaining candidate primitives corresponding to the door and window hole component primitives includes: obtaining a plurality of primitive information from the vector drawing; extracting features corresponding to the plurality of primitive information to obtain layer information corresponding to a plurality of layer categories; identifying the door and window hole features contained in each layer information; and identifying candidate primitives corresponding to the door and window hole component primitives from the layer information based on the door and window hole features. Among them, the identifying of candidate graphics elements corresponding to the door and window opening component graphics elements from the layer information based on the door and window opening features includes: performing multi-way recall of the component graphics elements in the respective layer information based on the door and window opening features to obtain all component graphics elements corresponding to the door and window opening features; sorting all the component graphics elements to obtain a sorting result of the component graphics elements; and determining, based on the sorting result, the candidate graphics element corresponding to the door and window opening component graphics element from all the component graphics elements.

2. The method according to claim 1, characterized in that The determining, based on the feature information and the position information of the door and window opening component element, a target door and window opening component element in the target wall element from the candidate elements includes: Determining a target type corresponding to the door and window hole component primitive based on feature information of the door and window hole component primitive; Grouping the candidate graphic elements according to the position information to obtain multiple grouping results; The target door and window opening component graphic element corresponding to the target type is determined from each group.

3. The method according to claim 2, characterized in that The determining, based on the feature information of the door and window opening component primitive, the target type corresponding to the door and window opening component primitive includes: Determining, based on the characteristic information of the door and window hole component primitive, a plurality of types corresponding to the door and window hole component primitive and the probability of each type; Sort the type probabilities to obtain the maximum type probability; The type corresponding to the maximum type probability is determined as the target type.

4. The method according to claim 2, characterized in that The step of determining the target door and window opening component graphic element corresponding to the target type from each group includes: Obtaining probability values ​​of the door and window opening component primitives corresponding to each target type in the same group; The probability values ​​are sorted, and based on the sorting results of the probability values, the target door and window opening component primitives are determined from the respective groups.

5. The method according to claim 1, wherein The detecting and classifying the door and window opening component primitives based on the attribute features of the door and window openings, and determining the position information of each type of door and window openings on the vector drawing, includes: Obtaining a bitmap drawing corresponding to the vector drawing; Detecting and classifying the door and window openings to be identified in the bitmap drawing based on a preset target detection method to obtain the type detection probability corresponding to the door and window openings; When the type detection probability exceeds a preset probability value, obtaining the position coordinates of the door and window openings in the bitmap drawing; Based on the position coordinates and the coordinate conversion between the bitmap drawing and the vector drawing, the position information of the various types of door and window openings on the vector drawing is determined.

6. The method according to any one of claims 1 to 5, characterized in that Also includes: The target door and window opening component graphic element is converted into model data information.

7. A door and window hole recognition device, characterized in that: include: An acquisition module, configured to acquire a vector drawing corresponding to a target wall element, wherein the target wall element includes at least one door / window hole component element, and the vector drawing is a three-dimensional vector drawing; a classification module, configured to detect and classify the door and window openings to be identified based on their attribute features, and determine the position information of each type of door and window opening on the vector drawing; The identification module is used to extract multiple layer information from the vector drawing, identify door and window hole component primitives based on the door and window hole features of each layer information, and obtain candidate primitives corresponding to the door and window hole component primitives, including: obtaining multiple primitive information in the vector drawing; extracting features corresponding to the multiple primitive information to obtain layer information corresponding to multiple layer categories; identifying the door and window hole features contained in each layer information; and identifying candidate primitives corresponding to the door and window hole component primitives from the layer information based on the door and window hole features. The identifying candidate primitives corresponding to the door and window hole component primitives from the layer information based on the door and window hole features includes: performing multi-way recall on the component primitives in the each layer information based on the door and window hole features to obtain all component primitives corresponding to the door and window hole features; sorting all the component primitives to obtain a sorting result of the component primitives; and determining, based on the sorting result, the candidate primitive corresponding to the door and window hole component primitive from all the component primitives. A determination module is configured to determine a target door and window opening component graphic element in the target wall graphic element from the candidate graphic elements based on the feature information of the door and window opening component graphic element and the position information.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the door and window opening recognition method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the door and window opening recognition method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Wall model generation method and device

    CN113987652A