Door and window identification method and device in drawings, electronic equipment and storage medium

By identifying the bounding boxes and types of door and window components in architectural drawings and extracting graphic features using a pre-trained recognition model, the problem of low recognition efficiency in existing architectural drawings is solved, and efficient recognition of drawing details is achieved.

CN114550187BActive Publication Date: 2025-11-11WANYI TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210080535.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-11-11
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

Existing technologies fail to fully utilize drawing information during architectural drawing recognition, resulting in low efficiency in architectural object recognition, especially in the insufficient recognition of drawing details.

Method used

By acquiring the drawings to be identified, determining the bounding boxes and types of door and window components, calculating the intersection-union ratio, extracting graphic features using a pre-trained recognition model, judging whether the graphic element information meets the preset door and window features, determining the target graphic element information, and then identifying the door and window information.

Benefits of technology

It improves the efficiency of identifying door and window components, enabling quick and accurate determination of the enclosure and type of doors and windows from drawings, and enhancing the ability to identify details in drawings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114550187B_ABST
    Figure CN114550187B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, electronic device, and storage medium for identifying doors and windows in drawings, applied in the field of drawing processing technology. The method includes: acquiring a drawing to be identified; determining the bounding boxes and door / window types of door / window components in the drawing; determining target element information belonging to the door / window components within the bounding boxes; and determining door / window information within each bounding box based on the target element information and the door / window types. This addresses the problem in existing technologies where the lack of detailed identification in architectural drawings leads to low efficiency in identifying architectural objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of drawing processing technology, and in particular to a method, device, electronic device and storage medium for identifying doors and windows in drawings. Background Technology

[0002] With the rapid development of urban construction and computer technology, using computers to complete building design has become a common practice, and the design has gradually shifted from two-dimensional architectural drawings to three-dimensional architectural models.

[0003] However, existing technologies fail to fully utilize the information contained in architectural drawings during the identification process, resulting in too few objects to be identified and a lack of attention to detail in the drawings, leading to low efficiency in identifying architectural objects. Summary of the Invention

[0004] This application provides a method, device, electronic device, and storage medium for identifying doors and windows in drawings, in order to solve the problem that the prior art does not identify the details of architectural drawings, resulting in low identification efficiency of architectural objects.

[0005] In a first aspect, embodiments of this application provide a method for identifying doors and windows in drawings, including:

[0006] Obtain the drawing to be identified;

[0007] Determine the bounding box and door / window type of the door / window components in the drawing to be identified;

[0008] Determine the target element information belonging to the door and window components within the bounding box;

[0009] Based on the target primitive information and the door / window type, determine the door / window information in each bounding box.

[0010] Optionally, determining the target element information belonging to the door / window component within the bounding box includes:

[0011] Calculate the intersection-union ratio (IoU) between each primitive information within the bounding box and the bounding box;

[0012] The primitive information whose intersection-union ratio is greater than a preset ratio is determined to be the target primitive information.

[0013] Optionally, when the door / window type is a door, determining the door / window information in each bounding box based on the target primitive information and the door / window type includes:

[0014] Identify the arc-shaped primitive in the target primitive information and use the arc-shaped primitive as the gate arc;

[0015] Determine the line primitives connected to the arc-shaped primitives;

[0016] If the line graphic elements can form a closed polygon, then the closed polygon is determined to be a door panel;

[0017] The door arc and the door panel are determined to be door information in the door and window information.

[0018] Optionally, determining the bounding box and door / window type of the door / window components in the drawing to be identified includes:

[0019] The drawing to be identified is input into a pre-trained recognition model, and the graphic features in the drawing to be identified are extracted by the recognition model. Based on the graphic features, the bounding box and door / window type of the door / window components are determined.

[0020] Optionally, the pre-training process of the recognition model includes:

[0021] Obtain a training sample set, wherein the training sample set includes at least two training samples and the actual results of each training sample, and the actual results include the pre-labeled door and window ranges of the training samples and the door and window types within each door and window range;

[0022] Perform the following training process for each training sample in the training sample set:

[0023] The training samples are input into an initial neural network model, and features are extracted from the training samples based on the initial neural network model to obtain sample features. The output results of the training samples are obtained based on the sample features.

[0024] The loss function value is calculated based on the output result and the actual result. The parameters in the initial neural network model are updated based on the loss function value. The next training sample is obtained from the training sample set. The training process is repeated until the loss function is less than a preset value. The trained initial neural network model is then used as the recognition model.

[0025] Optionally, after determining the bounding box of the door and window components and the door and window type in the drawing to be identified, the method further includes:

[0026] Obtain the preset door and window features corresponding to the door and window type;

[0027] Determine whether the graphic element information within the bounding box satisfies the preset door and window features;

[0028] If so, perform the step of determining the target element information belonging to the door and window component in the bounding box;

[0029] If not, it is determined that the enclosure box and the door / window type identification are incorrect.

[0030] Optionally, the preset door and window features include a first preset number of rectangular frames and a second preset number of arrows. The step of determining whether the graphic elements within the bounding box possess the preset door and window features includes:

[0031] Determine the line primitives within the bounding box;

[0032] Based on the line drawing elements, determine the rectangle and arrow within the bounding box;

[0033] Determine the first number of the rectangles and the second number of the arrows;

[0034] The actual door and window type is determined based on the first quantity and the second quantity;

[0035] Determine whether the first quantity is consistent with the first preset quantity, and whether the second quantity is consistent with the second preset quantity;

[0036] If so, determine that the graphic element information within the bounding box satisfies the preset door and window features;

[0037] If not, it is determined that the graphic element information within the bounding box does not satisfy the preset door and window features.

[0038] Secondly, embodiments of this application provide a device for identifying doors and windows in drawings, including:

[0039] The acquisition module is used to acquire the drawing to be recognized;

[0040] The first determining module is used to determine the bounding box and door / window type of the door / window components in the drawing to be identified;

[0041] The second determining module is used to determine the target graphic element information belonging to the door and window components in the bounding box;

[0042] The third determining module is used to determine the door and window information in each bounding box based on the target primitive information and the door and window type.

[0043] Thirdly, embodiments of this application provide an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0044] The memory is used to store computer programs;

[0045] The processor is used to execute the program stored in the memory to implement the method for identifying doors and windows in drawings as described in the first aspect.

[0046] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for identifying doors and windows in drawings as described in the first aspect.

[0047] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains a drawing to be identified; determines the bounding box and door / window type of the door / window components in the drawing to be identified; determines the target element information belonging to the door / window components in the bounding box; and determines the door / window information in each bounding box based on the target element information and the door / window type. Thus, after obtaining the drawing to be identified, the bounding box and door / window type of the door / window components can be directly determined from the drawing, and the door / window information can be further determined based on the target element information and door / window type in the bounding box, thereby making the identification of door / window components more convenient and improving identification efficiency. Attached Figure Description

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

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention 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.

[0050] Figure 1 An application scenario diagram of the door and window identification method provided in the drawings according to an embodiment of this application;

[0051] Figure 2 A flowchart illustrating a method for identifying doors and windows in drawings provided in an embodiment of this application;

[0052] Figure 3 A flowchart illustrating a method for identifying doors and windows in drawings provided in an embodiment of this application;

[0053] Figure 4 A flowchart illustrating a method for identifying doors and windows in drawings provided for another embodiment of this application;

[0054] Figure 5 A structural diagram of a door and window identification device provided in an embodiment of this application;

[0055] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be subject to the following interpretations.

[0058] Bounding box is an algorithm for finding the optimal bounding space of a discrete point set. The basic idea is to approximate complex geometric objects with a slightly larger and simpler geometric body (called a bounding box).

[0059] Intersection-over-Union (IoU) is a concept used in object detection. It represents the overlap ratio between the generated candidate bounding boxes and the original ground truth bounding boxes; that is, the ratio of their intersection to their union. Ideally, they should overlap completely, meaning the ratio is 1.

[0060] According to one embodiment of this application, a method for identifying doors and windows in drawings is provided. Optionally, in this embodiment, the above-described method for identifying doors and windows in drawings can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 101 and server 102. For example... Figure 1 As shown, server 102 is connected to terminal 101 via a network and can be used to provide services (such as video services, application services, etc.) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 102. The network mentioned above includes, but is not limited to, wide area network, metropolitan area network or local area network. Terminal 101 is not limited to PC, mobile phone, tablet computer, etc.

[0061] The method for identifying doors and windows in drawings according to embodiments of this application can be executed by server 102, terminal 101, or jointly by server 102 and terminal 101. Specifically, the method for identifying doors and windows in drawings according to embodiments of this application can be executed by terminal 101, or by a client installed on it.

[0062] Taking the method for identifying doors and windows in drawings according to an embodiment of this application as an example, Figure 2 This is a flowchart illustrating an optional method for identifying doors and windows in drawings according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:

[0063] One embodiment of this application provides a method for identifying doors and windows in drawings. This method can be applied to any type of electronic device, such as terminals and servers. Figure 1 As shown, the methods for identifying doors and windows in this drawing include:

[0064] Step 201: Obtain the drawing to be identified.

[0065] In some embodiments, the drawing to be identified may be uploaded to a server by the terminal after the designer has completed the design and when the architectural drawing needs to be identified; alternatively, it may be obtained from a database by relevant personnel when identifying the architectural drawing. The database stores multiple architectural drawings to be identified, and relevant personnel can select one for identification based on its drawing name.

[0066] For example, the architectural drawings to be identified may be, but are not limited to, drawings for projects such as airports, train stations, bus stations, office buildings, residential buildings, hospitals, museums, tourist attractions, churches, schools, parks, etc.

[0067] Step 202: Determine the bounding box and door / window type of the door / window components in the drawing to be identified.

[0068] In some embodiments, after obtaining the drawing to be identified, the bounding box and door / window type in the drawing can be determined by the name of the drawing, the layer name, and the graphic element information in the drawing.

[0069] Typically, during the design process, designers may annotate the types of doors and windows and the layer information or element information of door and window components according to the actual situation. This allows them to determine the bounding box of the door and window components and the types of doors and windows after obtaining the drawing to be identified.

[0070] The bounding box can be the smallest area that includes door and window components. This reduces interference from non-door and window components.

[0071] Door and window types include door types and window types. Door types can be hinged doors, airtight doors, elevator doors, sliding doors, etc., while window types can be louvered windows, ordinary windows, etc.

[0072] In another alternative embodiment, determining the bounding box and door / window type of the door / window components in the drawing to be identified includes:

[0073] The drawing to be identified is input into a pre-trained recognition model, and the graphic features in the drawing to be identified are extracted by the recognition model. Based on the graphic features, the bounding box and door / window type of the door / window components are determined.

[0074] In some embodiments, to facilitate the determination of bounding boxes and door / window types, a pre-trained recognition model can be used. This pre-trained model identifies the drawing to be recognized, extracts graphic features from the drawing, and then determines the bounding boxes and door / window types based on these features. Thus, by training the recognition model, the process of identifying the bounding boxes and door / window types can be performed quickly, thereby improving the efficiency of door / window information recognition.

[0075] Furthermore, the pre-training process of the recognition model includes:

[0076] Obtain a training sample set, wherein the training sample set includes at least two training samples and the actual results of each training sample, and the actual results include the pre-labeled door and window ranges of the training samples and the door and window types within each door and window range;

[0077] Perform the following training process for each training sample in the training sample set:

[0078] The training samples are input into an initial neural network model. Feature extraction is performed on the training samples based on the initial neural network model to obtain sample features. The output result of the training samples is obtained based on the sample features. A loss function value is calculated based on the output result and the true result. The parameters in the initial neural network model are updated based on the loss function value. The next training sample is obtained from the training sample set. The training process is repeated until the loss function is less than a preset value. The trained initial neural network model is then used as the recognition model.

[0079] In an optional embodiment, after determining the bounding box and door / window type of the door / window components in the drawing to be identified, the method further includes:

[0080] Obtain the preset door and window features corresponding to the door and window type; determine whether the graphic element information within the bounding box satisfies the preset door and window features; if yes, execute the step of determining the target graphic element information belonging to the door and window component in the bounding box; if no, determine that the bounding box and the door and window type are incorrectly identified.

[0081] In some embodiments, after determining the bounding box and the door / window type, the graphic elements within the bounding box can be judged to meet the preset door / window features corresponding to the door / window type. If they do not meet the preset features, the identified door / window type is determined to be incorrect, and subsequent steps are not performed. The identification is then performed again.

[0082] Among them, the preset door and window features can be the graphic features of the elements when different types of doors and windows are constructed, and can be the number of graphic features.

[0083] In an optional embodiment, the preset door and window features include a first preset number of rectangular frames and a second preset number of arrows. The step of determining whether the graphic elements within the bounding box possess the preset door and window features includes:

[0084] Identify the line elements within the bounding box; based on the line elements, determine the rectangles and arrows within the bounding box; determine a first number of rectangles and a second number of arrows; determine the actual door / window type based on the first and second numbers; determine whether the first number matches the first preset number and whether the second number matches the second preset number; if yes, determine that the element information within the bounding box satisfies the preset door / window characteristics; if no, determine that the element information within the bounding box does not satisfy the preset door / window characteristics.

[0085] The actual door and window type is the type of door and window determined by identifying the drawings to be identified.

[0086] For example, if the determined door and window type is a double-hinged door, the preset door and window features corresponding to the double-hinged door include two rectangular frames and an arrow in each rectangular frame. Based on the elements in the determined bounding box, the rectangular frames and arrows in the bounding box are first determined, and then the number of the two is used to determine whether the preset door and window features corresponding to the double-hinged door are satisfied. If there is only one rectangular frame in the bounding box, it is determined that the identified bounding box and the door and window type are incorrectly identified.

[0087] Step 203: Determine the target graphic element information belonging to the door and window components in the bounding box.

[0088] In some embodiments, since the bounding box contains not only door and window components but also non-door and window components (such as wall components), it is necessary to first determine the target component information belonging to the door and window components within the bounding box when determining door and window information.

[0089] In an optional embodiment, determining the target element information belonging to the door / window component within the bounding box includes:

[0090] Calculate the intersection-union ratio (IUGR) between each primitive information within the bounding box and the bounding box; determine the primitive information whose IUGR is greater than a preset ratio as the target primitive information.

[0091] In some embodiments, the elements within the bounding box include not only elements of door and window components but also elements of non-door and window components. Therefore, the overlap rate between each element and the bounding box can be determined by calculating the intersection-union ratio of each element with the bounding box, and the element information with an intersection-union ratio greater than a preset ratio value can be determined as the target element information of door and window components.

[0092] The preset ratio value can be set according to the actual situation. For example, it can be set to a ratio value greater than 0.8.

[0093] Step 204: Determine the door and window information in each bounding box based on the target element information and the door and window type.

[0094] In some embodiments, after determining the target primitive information and the door / window type, the door / window information within each bounding box can be determined based on the target primitive information and the door / window type.

[0095] In an optional embodiment, when the door / window type is "door," determining the door / window information in each bounding box based on the target primitive information and the door / window type includes:

[0096] Identify the arc-shaped graphic element in the target graphic element information and use the arc-shaped graphic element as the door arc; identify the line graphic element connected to the arc-shaped graphic element; if the line graphic element can form a closed polygon, identify the closed polygon as the door panel; identify the door arc and the door panel as the door information in the door and window information.

[0097] In some embodiments, different types of doors and windows have different primitive types. For example, when the door / window type is a door, it typically includes a door arch and a door panel. Based on this, by identifying the target primitive information within each bounding box, the arc-shaped primitives are determined, and by judging whether the line primitives in the target primitive information can form a quadrilateral, the quadrilateral formed is determined to be a door panel. By identifying the aforementioned door arch and door panel, the door information within the bounding box is determined.

[0098] When determining whether a line element can form a closed polygon, for any line element, it can be determined whether the line element intersects with two line elements and whether the line element is parallel to a line element. If so, the shape formed by the line elements is determined to be a parallelogram.

[0099] For details, see Figure 3 The identification method includes:

[0100] Step 1: Collect different types of drawings and label the door and window components.

[0101] The information marked includes the type of drawing (e.g., above-ground floor plan, underground floor plan), the type of door (e.g., hinged door, airtight door, elevator door, sliding door), and the type of window (e.g., louvered window, ordinary window).

[0102] Step 2: Initial Model Selection. The initial model can be YOLOv5, YOLOv4, Cascade R-CNN, etc. By comparing the training effects of different models, YOLOv5 is selected.

[0103] When training the model, multiple doors with similar features can be trained as a type. For example, single swing doors and double swing doors can be trained as a unified swing door type.

[0104] Step 3: Use the trained model to detect and recognize the drawings.

[0105] The identification results include the bounding box of door and window components and the door and window type.

[0106] Step 4: Verify the door and window results obtained from the model detection and filter them according to the business characteristics of the door and window components themselves.

[0107] Specifically, verification can be performed based on the following business characteristics. For example: Hinged doors: must contain a door panel and a door arch; Elevator doors: must be located near the elevator car; Sliding doors: must include a door panel and an arrow. See below for details. Figure 4 Venetian blinds: The window frame is a rectangular frame with many linear patterns, while a regular window is a single rectangular frame.

[0108] Step 5: Obtain precise door and window components.

[0109] Calculate the intersection-union ratio of the door and window bounding box and each graphic element, filter out the graphic elements with a ratio greater than the preset ratio as the graphic element information contained in each door and window, and then identify the various basic attributes of the door based on these graphic element information, such as door panel, door arch, door opening, threshold line, window opening and other information.

[0110] Based on the same concept, this application provides a device for identifying doors and windows in drawings. The specific implementation of this device can be found in the description of the method embodiments section; repeated details will not be repeated here. Figure 5 As shown, the device mainly includes:

[0111] Module 501 is used to acquire the drawing to be identified;

[0112] The first determining module 502 is used to determine the bounding box and door / window type of the door / window components in the drawing to be identified;

[0113] The second determining module 503 is used to determine the target graphic element information belonging to the door and window components in the bounding box;

[0114] The third determining module 504 is used to determine the door and window information in each bounding box based on the target graphic element information and the door and window type.

[0115] Based on the same concept, this application also provides an electronic device, such as... Figure 6 As shown, the electronic device mainly includes a processor 601, a memory 602, and a communication bus 603. The processor 601 and the memory 602 communicate with each other via the communication bus 603. The memory 602 stores programs that can be executed by the processor 601. The processor 601 executes the programs stored in the memory 602 to achieve the following steps:

[0116] Obtain the drawing to be identified;

[0117] Determine the bounding box and door / window type of the door / window components in the drawing to be identified;

[0118] Determine the target element information belonging to the door and window components within the bounding box;

[0119] Based on the target primitive information and the door / window type, determine the door / window information in each bounding box.

[0120] The communication bus 603 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 603 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0121] The memory 602 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor 601.

[0122] The processor 601 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., or a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0123] In another embodiment of this application, a computer-readable storage medium is provided, which stores a computer program that, when run on a computer, causes the computer to perform the method for identifying doors and windows in drawings as described in the above embodiments.

[0124] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape, etc.), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0125] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0126] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for identifying doors and windows in drawings, characterized in that, include: Obtain the drawing to be identified; Determine the bounding box and door / window type of the door / window components in the drawing to be identified; Determine the target element information belonging to the door and window components within the bounding box; Based on the target primitive information and the door and window type, determine the door and window information in each bounding box; The step of determining the target graphic element information belonging to the door and window components within the bounding box includes: Calculate the intersection-union ratio (IoU) between each primitive information within the bounding box and the bounding box; The primitive information whose intersection-union ratio is greater than a preset ratio is identified as the target primitive information; When the door / window type is a door, determining the door / window information in each bounding box based on the target primitive information and the door / window type includes: Identify the arc-shaped primitive in the target primitive information and use the arc-shaped primitive as the gate arc; Determine the line primitives connected to the arc-shaped primitives; If the line graphic elements can form a closed polygon, then the closed polygon is determined to be a door panel; The door arc and the door panel are identified as door information in the door and window information. After determining the bounding box and door / window type of the door / window components in the drawing to be identified, the method further includes: Obtain the preset door and window features corresponding to the door and window type; Determine whether the graphic element information within the bounding box satisfies the preset door and window features; If so, perform the step of determining the target element information belonging to the door and window component in the bounding box; If not, it is determined that the enclosure box and the door / window type identification are incorrect; The preset door and window features include a first preset number of rectangular frames and a second preset number of arrows. Determining whether the graphic elements within the bounding box possess the preset door and window features includes: Determine the line primitives within the bounding box; Based on the line drawing elements, determine the rectangle and arrow within the bounding box; Determine the first number of the rectangles and the second number of the arrows; The actual door and window type is determined based on the first quantity and the second quantity; Determine whether the first quantity is consistent with the first preset quantity, and whether the second quantity is consistent with the second preset quantity; If so, determine that the graphic element information within the bounding box satisfies the preset door and window features; If not, it is determined that the graphic element information within the bounding box does not satisfy the preset door and window features.

2. The method for identifying doors and windows in drawings according to claim 1, characterized in that, Determining the bounding box and door / window type of the door / window components in the drawing to be identified includes: The drawing to be identified is input into a pre-trained recognition model, and the graphic features in the drawing to be identified are extracted by the recognition model. Based on the graphic features, the bounding box and door / window type of the door / window components are determined.

3. The method for identifying doors and windows in drawings according to claim 2, characterized in that, The pre-training process of the recognition model includes: Obtain a training sample set, wherein the training sample set includes at least two training samples and the actual results of each training sample, and the actual results include the pre-labeled door and window ranges of the training samples and the door and window types within each door and window range; Perform the following training process for each training sample in the training sample set: The training samples are input into an initial neural network model, and features are extracted from the training samples based on the initial neural network model to obtain sample features. The output results of the training samples are obtained based on the sample features. The loss function value is calculated based on the output result and the actual result. The parameters in the initial neural network model are updated based on the loss function value. The next training sample is obtained from the training sample set. The training process is repeated until the loss function is less than a preset value. The trained initial neural network model is then used as the recognition model.

4. A device for identifying doors and windows in drawings, characterized in that, include: The acquisition module is used to acquire the drawing to be recognized; The first determining module is used to determine the bounding box and door / window type of the door / window components in the drawing to be identified; The second determining module is used to determine the target graphic element information belonging to the door and window components in the bounding box; The third determining module is used to determine the door and window information in each bounding box based on the target primitive information and the door and window type; The step of determining the target graphic element information belonging to the door and window components within the bounding box includes: Calculate the intersection-union ratio (IoU) between each primitive information within the bounding box and the bounding box; The primitive information whose intersection-union ratio is greater than a preset ratio is identified as the target primitive information; When the door / window type is a door, determining the door / window information in each bounding box based on the target primitive information and the door / window type includes: Identify the arc-shaped primitive in the target primitive information and use the arc-shaped primitive as the gate arc; Determine the line primitives connected to the arc-shaped primitives; If the line graphic elements can form a closed polygon, then the closed polygon is determined to be a door panel; The door arc and the door panel are identified as door information in the door and window information. After determining the bounding box and door / window type of the door / window components in the drawing to be identified, the method further includes: Obtain the preset door and window features corresponding to the door and window type; Determine whether the graphic element information within the bounding box satisfies the preset door and window features; If so, perform the step of determining the target element information belonging to the door and window component in the bounding box; If not, it is determined that the enclosure box and the door / window type identification are incorrect; The preset door and window features include a first preset number of rectangular frames and a second preset number of arrows. Determining whether the graphic elements within the bounding box possess the preset door and window features includes: Determine the line primitives within the bounding box; Based on the line drawing elements, determine the rectangle and arrow within the bounding box; Determine the first number of the rectangles and the second number of the arrows; The actual door and window type is determined based on the first quantity and the second quantity; Determine whether the first quantity is consistent with the first preset quantity, and whether the second quantity is consistent with the second preset quantity; If so, determine that the graphic element information within the bounding box satisfies the preset door and window features; If not, it is determined that the graphic element information within the bounding box does not satisfy the preset door and window features.

5. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the method for identifying doors and windows in drawings as described in any one of claims 1-3.

6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for identifying doors and windows in drawings as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Vertical graph identification method for converting architectural drawing into three-dimensional BIM model

    CN109993827A