Matching method and device for beam area and beam mark in beam component identification process

By using the improved YOLOv5 model, regular expressions, and hierarchical clustering, accurate matching of beam regions and annotation information was achieved, solving the problem of low efficiency in beam annotation information recognition in existing technologies and improving the efficiency of architectural drawing review.

CN120853170APending Publication Date: 2025-10-28SHANGHAI BANGTU INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410518879.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies for beam annotation information recognition are inefficient, cannot achieve full automation, and lack accuracy, resulting in low efficiency in architectural drawing review.

Method used

An improved YOLOv5 model, combined with regular expressions and hierarchical clustering, is used to identify and match beam regions and annotation information. By detecting annotation lines and table information, accurate matching of beam regions and annotations is achieved.

Benefits of technology

It improves the efficiency of beam labeling information identification and matching, outputs audit results for easy manual review, accurately addresses risks in calculation content, and enhances the audit efficiency of technical personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853170A_ABST
    Figure CN120853170A_ABST
Patent Text Reader

Abstract

The invention relates to a beam area and beam mark matching method and device in the beam component recognition process, and the method comprises the steps: carrying out the matching of a first centralized mark and a beam area, and obtaining a first matching result; matching the in-situ label with the beam area to obtain a second matching result; inputting a beam construction drawing frame comprising the beam construction drawing sub-drawing frame and a second beam labeling text of the beam area into a pre-trained improved YOLOv5 model, then performing position detection on the second beam labeling text to obtain a position detection result of the second beam labeling text, and based on the position detection result, obtaining a position detection result of the second beam labeling text; matching the second beam labeling text with the beam region to obtain a third matching result; the second beam annotation text comprises a table-based second centralized annotation; and determining the first matching result, the second matching result and the third matching result as a final matching result of the beam region and the beam label, thereby improving the auditing efficiency of technicians.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of architectural drawing review technology, and in particular to a method and apparatus for matching beam regions and beam annotations during beam component identification. Background Technology

[0002] Currently, the identification of beam annotation information in structural drawings mainly relies on manual review by experienced engineers. However, this method suffers from relatively low review efficiency. Summary of the Invention

[0003] (1) Technical issues to be resolved

[0004] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method for matching beam regions and beam labels in the process of beam component identification, which solves the technical problem of low review efficiency in the prior art.

[0005] (2) Technical solution

[0006] To achieve the above objectives, the main technical solutions adopted by the present invention include:

[0007] In a first aspect, embodiments of the present invention provide a method for matching beam regions and beam annotations during beam component identification, comprising: detecting beam regions and first beam annotation text from a beam construction drawing sub-frame, wherein the first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines; matching the first centralized annotations with the beam region to obtain a first matching result; matching the in-situ annotations with the beam region to obtain a second matching result; inputting the beam construction drawing frame including the beam construction drawing sub-frame and the second beam annotation text of the beam region into a pre-trained improved YOLOv5 model to perform position detection of the second beam annotation text to obtain a position detection result of the second beam annotation text, and matching the second beam annotation text with the beam region based on the position detection result to obtain a third matching result; wherein the second beam annotation text includes second centralized annotations based on tables; and determining the first matching result, the second matching result, and the third matching result as the final matching result of the beam region and beam annotations.

[0008] In one possible embodiment, matching the first set of annotations with the beam region to obtain a first matching result includes: classifying the text contained in the first annotation text based on regular expressions to obtain all numbered texts, all section texts, all stirrup texts, all longitudinal reinforcement texts, all web reinforcement texts, and all elevation texts in the first standard text; using the common features of each numbered text and its nearest specified text in all numbered texts to determine the relative direction of each numbered text and each target annotation line corresponding to each numbered text; wherein, the specified text is at least one of section text, stirrup text, longitudinal reinforcement text, web reinforcement text, and elevation text; taking the annotation line located in the relative direction that is closest to each numbered text as its corresponding target annotation line; and matching the target annotation line with other texts in the first annotation text other than all numbered texts to obtain the first matching result.

[0009] In one possible embodiment, the relative direction of each numbered text and its adjacent designated text is determined by utilizing the common features of each numbered text and each target annotation line corresponding to each numbered text. This includes: if the starting position coordinates of the current numbered text and the starting position coordinates of the current designated text are the same, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the starting position side of the current numbered text; or, if the ending position coordinates of the current numbered text and the ending position coordinates of the current designated text are the same, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the ending position side of the current numbered text.

[0010] In one possible embodiment, matching the in-situ labels with the beam region to obtain a second matching result includes: clustering the in-situ labels using hierarchical clustering to obtain multiple clustering results; and matching each clustering result among the multiple clustering results to the nearest beam region using a distance algorithm.

[0011] In one possible embodiment, the improved YOLOv5 model includes a backbone network; the backbone network includes a Focus module, a first CBH module, a first Mobile Net v3 module, a second CBH module, a second Mobile Net v3 module, a third CBH module, a third Mobile Net v3 module, a fourth CBH module, and an SPP module connected in sequence.

[0012] Secondly, embodiments of the present invention provide a matching device for beam regions and beam annotations during beam component identification, comprising: a detection module, used to detect beam regions and first beam annotation text from a beam construction drawing sub-frame, wherein the first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines; a first matching module, used to match the first centralized annotations and the beam region to obtain a first matching result; a second matching module, used to match the in-situ annotations and the beam region to obtain a second matching result; a third matching module, used to input the beam construction drawing frame including the beam construction drawing sub-frame and the second beam annotation text of the beam region into a pre-trained improved YOLOv5 model and perform position detection of the second beam annotation text to obtain a position detection result of the second beam annotation text, and based on the position detection result, match the second beam annotation text and the beam region to obtain a third matching result; wherein the second beam annotation text includes second centralized annotations based on tables; and a determination module, used to determine the first matching result, the second matching result, and the third matching result as the final matching result of the beam region and the beam annotation.

[0013] In one possible embodiment, the first matching module is specifically configured to: classify the text contained in the first annotation text based on regular expressions to obtain all numbered texts, all cross-section texts, all stirrup texts, all longitudinal reinforcement texts, all waist reinforcement texts, and all elevation texts in the first standard text; determine the relative direction of each numbered text and each target annotation line corresponding to each numbered text by utilizing the common features of each numbered text and its adjacent specified texts; wherein, the specified text is at least one of cross-section text, stirrup text, longitudinal reinforcement text, waist reinforcement text, and elevation text; take the annotation line located in the relative direction that is closest to each numbered text as its corresponding target annotation line; and match the target annotation line with the other texts in the first annotation text except for all numbered texts to obtain a first matching result.

[0014] In one possible embodiment, the first matching module is specifically configured to: if the starting position coordinates of the current numbered text and the starting position coordinates of the currently specified text are the same, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the starting position side of the current numbered text; or, if the ending position coordinates of the current numbered text and the ending position coordinates of the currently specified text are the same, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the ending position side of the current numbered text.

[0015] In one possible embodiment, the second matching module is specifically used to: cluster the in-situ labels using hierarchical clustering to obtain multiple clustering results; and use a distance algorithm to match each clustering result among the multiple clustering results to the beam region closest to it.

[0016] In one possible embodiment, the improved YOLOv5 model includes a backbone network; the backbone network includes a Focus module, a first CBH module, a first Mobile Net v3 module, a second CBH module, a second Mobile Net v3 module, a third CBH module, a third Mobile Net v3 module, a fourth CBH module, and an SPP module connected in sequence.

[0017] (3) Beneficial effects

[0018] The beneficial effects of the present invention are:

[0019] This application proposes a method and apparatus for matching beam regions and beam annotations during beam component identification. The method involves detecting beam regions and first beam annotation text from a sub-frame of a beam construction drawing. The first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines. The first centralized annotations are matched with the beam region to obtain a first matching result. The in-situ annotations are then matched with the beam region to obtain a second matching result. The beam construction drawing frame, including the sub-frame and the second beam annotation text of the beam region, is input into a pre-trained improved YOLOv5 model for position detection of the second beam annotation text. Based on the position detection result, the second beam annotation text is matched with the beam region to obtain a third matching result. The second beam annotation text includes second centralized annotations based on tables. The first, second, and third matching results are determined as the final matching result between the beam region and the beam annotation. This method enables the identification and matching of centralized beam annotations in structural drawings, the search and matching of in-situ annotation information, and the output of review results for manual review. This accurately addresses calculation risks and improves the review efficiency of technical personnel.

[0020] To make the above-mentioned objectives, features and advantages to be achieved by the embodiments of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 The flowchart illustrates a method for matching beam regions and beam labels during beam component identification, as provided in an embodiment of this application.

[0023] Figure 2 This illustration shows a schematic diagram of a first centralized annotation based on annotation lines provided in an embodiment of this application;

[0024] Figure 3 A schematic diagram of an in-situ annotation provided in an embodiment of this application is shown;

[0025] Figure 4 A schematic diagram of an improved YOLOv5 model provided in an embodiment of this application is shown;

[0026] Figure 5 This illustration shows a partial view of a beam construction drawing sub-frame provided in an embodiment of this application;

[0027] Figure 6 The diagram shows a structural block diagram of a matching device for beam region and beam label during beam component identification, as provided in an embodiment of this application. Detailed Implementation

[0028] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] The development of AI-powered blueprint review in the construction industry is undergoing a significant transformation. As the application scenarios of AI technology continue to expand, its intelligent upgrades are gradually being implemented across various industries, including construction and real estate. In my country's infrastructure transformation, construction and real estate, as traditional industry giants, are inevitably being swept up in the wave of intelligent transformation.

[0030] Furthermore, the drawing review process typically relies on manual review by experienced engineers, but this method is inefficient and labor-intensive. Therefore, following current industry trends, automating drawing review using AI image recognition technology has become an essential measure.

[0031] Currently, intelligent review of CAD drawings is a relatively new technological field. It mainly applies image processing, machine learning, deep learning, and other related technologies to automate the review of architectural construction drawings. This intelligent review not only effectively improves review efficiency but also reduces omissions or misunderstandings that may occur during manual review. Matching beam annotation information on structural drawings is a crucial step in this process. Only by accurately obtaining beam annotation information can the structural drawings and calculation sheets be further matched, laying the foundation for subsequent standard judgment.

[0032] However, the main technical challenge currently faced lies in the diversity and complexity of the drawings. Structural drawings are usually provided by different design institutes, and due to the lack of a unified drafting standard, each design institute and its designers will draw drawings in different formats according to their own habits.

[0033] Regarding the issue of recognizing beam annotation information in structural drawings, current intelligent drawing review products on the market mainly rely on manual annotation, and cannot yet achieve fully automatic drawing recognition. The existing drawing recognition methods also have relatively low accuracy.

[0034] Based on this, this application proposes a method and apparatus for matching beam regions and beam annotations during beam component identification. By processing centralized annotation information based on annotation lines, the method identifies beam annotation lines using image-related features, confirms the annotation lines based on these features, and matches the remaining corresponding annotation text based on these lines. It also performs image recognition processing on in-situ annotation information. First, a machine learning-based clustering method is used to cluster the text information. Then, distance and location information is used to determine the attribution of the annotation information. Finally, a mapping process is performed on the centralized annotations based on tables. An improved YOLOv5 model is used to detect and recognize the tables. Then, text data is read line by line, and corresponding beam reinforcement information is assigned based on the number. This enables the identification and matching of centralized beam annotations in structural drawings, the search and matching of in-situ annotation information, and the output of review results for manual review. This accurately addresses the risks associated with calculated content and improves the review efficiency of technical personnel.

[0035] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.

[0036] To facilitate understanding of the embodiments of this application, some terms used in this application are explained below:

[0037] In structural construction drawings, concentrated beam annotation and in-situ annotation are two ways to describe the numerical values ​​and characteristics of beams. They have different uses and priorities when expressing beam information.

[0038] Centralized annotations are primarily used to express general numerical values ​​of beams, such as beam number, type code, serial number, number of spans, whether there is a cantilever, beam cross-sectional dimensions, beam stirrups, top continuous reinforcement, longitudinal structural reinforcement on the beam sides, torsional reinforcement, and elevation difference of the beam top surface. These annotations are usually located at one end or in the middle of the beam and are used to express the basic information and number of spans of the beam. The purpose of centralized annotations is to visually represent the main characteristics and values ​​of the beam on the drawings, so that construction personnel can quickly understand the design requirements and structural characteristics of the beam.

[0039] In-situ annotations are used to express specific values ​​and location information of beams, such as the top longitudinal reinforcement at beam supports, the bottom longitudinal reinforcement, and stirrups. Furthermore, in-situ annotations are typically made at specific locations on the beam to supplement or replace information not fully expressed in the centralized annotations. In-situ annotations have higher priority than centralized annotations; when there are contradictions, the values ​​in the in-situ annotations will be used first. This method is mainly used to express the specific values ​​and characteristics of the beam at a specific location to ensure that construction personnel can accurately understand and implement the beam design requirements.

[0040] See Figure 1 , Figure 1 A flowchart illustrating a method for matching beam regions and beam labels during beam member identification, as provided in an embodiment of this application, is shown. It should be understood that this matching method can be executed by a matching device for beam regions and beam labels during beam member identification, and the specific device can be configured according to actual needs; this embodiment is not limited thereto. For example, the matching device can be a computer or a server, etc. Specifically, the matching method includes:

[0041] Step S110: Detect the beam area and the first beam annotation text from the beam construction drawing sub-frame. The first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines.

[0042] It should be understood that detecting the beam area and the first beam annotation text from the beam construction drawing sub-frame can be achieved through a beam component identification method and related methods in electronic devices disclosed in application number 202311389986.1. The method in this application mainly elaborates on the specific process of "matching multiple beam areas and multiple sets of beam annotation information".

[0043] It should also be understood that the first set of annotations based on the annotation lines are the related concentrated annotations recorded near the annotation lines in the sub-frame of the beam construction drawing, such as... Figure 2 As shown.

[0044] Step S120: Match the first set of annotations with the beam area to obtain the first matching result.

[0045] It should be understood that the specific process of matching the first set of annotations with the beam area to obtain the first matching result can be set according to actual needs, and the embodiments of this application are not limited thereto.

[0046] Optionally, the text contained in the first annotation text is classified based on regular expressions to obtain all numbered texts (or numbering information), all cross-section texts (or cross-section information), all stirrup texts (or stirrup information), all longitudinal reinforcement texts (or longitudinal reinforcement information), all web reinforcement texts (or web reinforcement information), and all elevation texts (or elevation information) in the first standard text. Using the common features of each numbered text and its nearest specified text, the relative direction of each numbered text and its corresponding target annotation line is determined. The specified text is at least one of cross-section text, stirrup text, longitudinal reinforcement text, web reinforcement text, and elevation text. The annotation line closest to each numbered text in the relative direction is taken as its corresponding target annotation line. The target annotation line is matched with all other texts in the first annotation text except for all numbered texts to obtain a first matching result. The extension direction of the annotation line is perpendicular to the text direction of the numbered text.

[0047] It should be understood that designated text similar to numbered text refers to annotation text belonging to the same beam area as the numbered text, and this designated text may be located below or to the side of the numbered text.

[0048] Specifically, firstly, regular expressions are used to classify all text elements in the beam construction drawing subframe to obtain all numbered text, section text, stirrup text, longitudinal reinforcement text, web reinforcement text, and elevation text in the text elements.

[0049] Secondly, at least one text can be selected from the current section text, current stirrup text, current longitudinal reinforcement text, current web reinforcement text, and current elevation text as the current specified text. Furthermore, based on the coordinates of the current numbered text and the coordinates of the current specified text, it can be determined whether the starting coordinates of the current numbered text and the starting coordinates of the current specified text are the same, so as to achieve a preliminary determination of the direction of the target annotation line.

[0050] If the starting coordinates of the current numbered text are the same as the starting coordinates of the currently specified text, then the relative direction between the current numbered text and its corresponding target annotation line is the starting position side of the current numbered text; that is, the target annotation line is located on the starting position side of the current numbered text. Similarly, if the ending coordinates of the current numbered text are the same as the ending coordinates of the currently specified text, then the relative direction between the current numbered text and its corresponding target annotation line is the ending position side of the current numbered text; that is, the target annotation line is located on the ending position side of the current numbered text. Furthermore, after determining the relative direction of the target annotation lines, the annotation line closest to the current numbered text in that relative direction can be used as its corresponding target annotation line, thus sequentially matching the beam number to the nearest line type element in the corresponding direction.

[0051] For example, such as Figure 2 As shown, Figure 2 The diagram illustrates a first centralized annotation based on annotation lines provided in an embodiment of this application. For example... Figure 2 As shown, the starting X-coordinates of the six types of text in the annotations of this first set—number text, section text, stirrup text, longitudinal reinforcement text, web reinforcement text, and elevation text—are all consistent. Therefore, it can be determined that the target annotation line is to the left of the number text.

[0052] It should be noted here that, considering the possibility that the numbered text and the cross-sectional text may be in the same row or column, the coordinates of the numbered text and the cross-sectional text can be used to determine whether they are in the same row or column. If the X-coordinates of the numbered text and the cross-sectional text are different, and their Y-coordinates are also different, then the cross-sectional text can be used as the specified text; otherwise, it will not work.

[0053] If the starting coordinates of the current numbered text are different from the starting coordinates of the currently specified text, and the ending coordinates of the current numbered text are also different from the ending coordinates of the currently specified text, then the nearest matching line type (or label line) can be found sequentially in both directions of the text.

[0054] Furthermore, the target annotation line can be matched with other text in the first annotation text, excluding all numbered text, to obtain a first matching result. For example, the matching of these other texts can be achieved through a beam component identification method and related methods in electronic devices disclosed in application number 202311389986.1.

[0055] Therefore, considering that the current rules for writing concentrated annotations of beams in drawings require aligning the four texts—number text, stirrup text, longitudinal reinforcement text, web reinforcement text, and elevation text—on the side closest to the annotation line, the direction of the annotation line can be accurately determined through the number text and the specified text, thereby making the matching of annotation line numbers more accurate.

[0056] It should be noted that the specified text can include any one of the following: cross-section text, stirrup text, longitudinal reinforcement text, web reinforcement text, and elevation text; or it can include any two of these texts; or it can include any three of these texts; or it can include four of these texts. Furthermore, since the stirrup text has the highest probability of occurrence among the stirrup, longitudinal reinforcement, web reinforcement, and elevation texts, a combination of numbered text and stirrup text is the preferred method.

[0057] Step S130: Match the in-situ annotations with the beam area to obtain the second matching result.

[0058] It should be understood that the specific process of matching the in-situ annotations with the beam area to obtain the second matching result can be set according to actual needs, and the embodiments of this application are not limited thereto.

[0059] Optionally, hierarchical clustering is used to cluster the in-situ labels to obtain multiple clustering results; a distance algorithm is used to match each clustering result to the nearest beam region.

[0060] For example, see Figure 3 , Figure 3 A schematic diagram of an in-situ annotation provided in an embodiment of this application is shown. For example... Figure 3 As shown, in-situ annotations differ in format from centralized annotations based on annotation lines. Furthermore, in-situ annotations arrange multiple pieces of information together in an adjacent manner. Therefore, the in-situ annotation information can first be clustered. Hierarchical clustering methods from machine learning can be used to group adjacent text together.

[0061] Then, the nearest beam line is matched sequentially based on its distance. It's important to note that you cannot simply rely on distance to match each text line to the nearest beam. For example... Figure 3 As shown, 200×700 and (+0.050) in the in-situ label belong to the upper beam. If the distance is used to determine the beam to which the text belongs, it is obviously closer to the lower beam. Therefore, it is necessary to first cluster the text and then rely on the distance algorithm to match the nearest beam.

[0062] Step S140: The beam construction drawing frame, including the beam construction drawing sub-frame and the second beam annotation text of the beam region, is input into the pre-trained improved YOLOv5 model to perform position detection of the second beam annotation text, thereby obtaining the position detection result of the second beam annotation text. Based on the position detection result, the second beam annotation text and the beam region are matched to obtain a third matching result. The second beam annotation text includes a second set of annotations based on a table.

[0063] Specifically, in the beam construction drawing sub-frame, some annotation information is presented in the form of tables such as reinforcement tables. For example, this second set of annotations based on tables can be located in the lower left corner of the beam construction drawing sub-frame, and the table can record the number, floor number, beam top elevation, beam section, beam span, top longitudinal reinforcement, bottom longitudinal reinforcement, side longitudinal reinforcement, and stirrups.

[0064] Therefore, this application first requires target detection of the reinforcement table location using the improved YOLOv5 model. For example... Figure 4As shown, the improved YOLOv5 model can include a backbone network, a neck network, and a detection head network. The backbone network can be implemented using CSPDarkNet53; the neck network is mainly responsible for feature extraction from the input image, and it uses an FPN+PAN structure to perform multi-scale feature fusion on the feature maps and pass these features to the prediction layer; the detection head network is mainly responsible for multi-scale object detection on the feature maps extracted by the backbone network, and it includes convolutional layers, pooling layers, and fully connected layers.

[0065] It should be noted that the improved YOLOv5 model in this application is obtained by improving the backbone network of an existing YOLOv5 model. For example... Figure 4 As shown, the backbone network includes a Focus module, a first CBH module, a first Mobile Net v3 module, a second CBH module, a second Mobile Net v3 module, a third CBH module, a third Mobile Net v3 module, a fourth CBH module, and an SPP module connected in sequence.

[0066] Therefore, compared with the existing YOLOv5 model, by using the Mobile Net v3 module to replace the original convolutional module, the network module is characterized by fewer parameters, less computation, and shorter inference time, which can more quickly identify the detected target, and has achieved good results for the tabular data to be identified in the text.

[0067] Subsequently, after detecting the table's location information, the table information can be read line by line to obtain the required information for the beam, such as cross-section, longitudinal reinforcement, stirrups, web reinforcement, and elevation. This information is then matched sequentially to the beams in the drawing according to their assigned numbers. These numbered annotations are typically represented as annotation lines within the sub-drawing frame, such as... Figure 5 As shown.

[0068] In addition, the annotation information in the sub-drawing frame only has a number (which needs to be matched one-to-one with the reinforcement table or other centralized annotations based on the annotation line), without corresponding reinforcement information.

[0069] Through the above processing of the annotation information, the corresponding beam information can be found for all the annotation information. However, the annotation information has not yet been parsed, and some beams without annotation information still need further processing. For details, please refer to the beam component identification method and related methods in electronic devices disclosed in application number 202311389986.1.

[0070] Step S150: Determine the first matching result, the second matching result, and the third matching result as the final matching result of the beam region and the beam annotation.

[0071] Therefore, by using the above technical solution, this application can realize the identification and matching of concentrated beam annotations in structural drawings, the search and matching of in-situ annotation information, and output the review results for manual review, accurately solve the risks of calculation content, and improve the review efficiency of technical personnel.

[0072] It should be understood that the method for matching beam regions and beam labels in the above beam component identification process is merely exemplary. Those skilled in the art can make various modifications based on the above method, and the modified solutions also fall within the protection scope of this application.

[0073] See Figure 6 , Figure 6 This diagram illustrates a structural block diagram of a matching device 600 for beam region and beam labeling during beam member identification, as provided in an embodiment of this application. It should be understood that the matching device 600 is capable of performing the various steps described in the above method embodiments. The specific functions of the matching device 600 can be found in the description above; detailed descriptions are omitted here to avoid repetition. The matching device 600 includes at least one software function module that can be stored in memory or embedded in the operating system (OS) of the matching device 600 in the form of software or firmware. Specifically, the matching device 600 includes:

[0074] The detection module 610 is used to detect the beam area and the first beam annotation text from the beam construction drawing sub-frame, and the first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines;

[0075] The first matching module 620 is used to match the first set of annotations with the beam area to obtain the first matching result;

[0076] The second matching module 630 is used to match the in-situ annotations and the beam area to obtain the second matching result;

[0077] The third matching module 640 is used to input the beam construction drawing frame, which includes the beam construction drawing sub-frame and the second beam annotation text of the beam region, into the pre-trained improved YOLOv5 model to perform position detection of the second beam annotation text, so as to obtain the position detection result of the second beam annotation text. Based on the position detection result, the second beam annotation text and the beam region are matched to obtain the third matching result. The second beam annotation text includes the second set of annotations based on the table.

[0078] The determination module 650 is used to determine the first matching result, the second matching result, and the third matching result as the final matching result of the beam region and the beam annotation.

[0079] In one possible embodiment, the first matching module 620 is specifically configured to: classify the text contained in the first annotation text based on regular expressions to obtain all numbered texts, all cross-section texts, all stirrup texts, all longitudinal reinforcement texts, all waist reinforcement texts, and all elevation texts in the first standard text; determine the relative direction of each numbered text and each target annotation line corresponding to each numbered text by utilizing the common features of each numbered text and its adjacent specified texts; wherein, the specified text is at least one of cross-section text, stirrup text, longitudinal reinforcement text, waist reinforcement text, and elevation text; take the annotation line located in the relative direction that is closest to each numbered text as its corresponding target annotation line; and match the target annotation line with the other texts in the first annotation text except for all numbered texts to obtain a first matching result.

[0080] In one possible embodiment, the first matching module 620 is specifically configured to: if the starting position coordinates of the current numbered text and the starting position coordinates of the currently specified text are the same, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the starting position side of the current numbered text; or, if the ending position coordinates of the current numbered text and the ending position coordinates of the currently specified text are the same, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the ending position side of the current numbered text.

[0081] In one possible embodiment, the second matching module 630 is specifically used to: cluster the in-situ labels using hierarchical clustering to obtain multiple clustering results; and use a distance algorithm to match each clustering result among the multiple clustering results to the nearest beam region.

[0082] In one possible embodiment, the improved YOLOv5 model includes a backbone network; the backbone network includes a Focus module, a first CBH module, a first Mobile Net v3 module, a second CBH module, a second Mobile Net v3 module, a third CBH module, a third Mobile Net v3 module, a fourth CBH module, and an SPP module connected in sequence.

[0083] Since the apparatus described in the above embodiments of the present invention is an apparatus used to implement the methods of the above embodiments of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the methods described in the above embodiments of the present invention, and therefore will not be described again here. All apparatuses used in the methods of the above embodiments of the present invention fall within the scope of protection of the present invention.

[0084] This application provides a storage medium storing a computer program, which is executed by a processor to perform the methods described in the embodiments.

[0085] This application also provides a computer program product that, when run on a computer, causes the computer to perform the method described in the method embodiment.

[0086] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions.

[0088] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims that enumerate several means, several of these means may be embodied by the same hardware. The use of the terms first, second, third, etc., is merely for convenience of expression and does not indicate any order. These terms can be understood as part of the component names.

[0089] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0090] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0091] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.

Claims

1. A method for matching beam regions and beam labels during beam component identification, characterized in that, include: The beam area and the first beam annotation text are detected from the beam construction drawing sub-frame, and the first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines; The first set of annotations and the beam region are matched to obtain the first matching result; The in-situ annotations and the beam region are matched to obtain a second matching result; The beam construction drawing frame, including the beam construction drawing sub-frame and the second beam annotation text of the beam region, is input into a pre-trained improved YOLOv5 model to perform position detection of the second beam annotation text, so as to obtain the position detection result of the second beam annotation text. Based on the position detection result, the second beam annotation text and the beam region are matched to obtain a third matching result; the second beam annotation text includes a second set of annotations based on a table. The first matching result, the second matching result, and the third matching result are determined as the final matching result of the beam region and the beam label.

2. The matching method according to claim 1, characterized in that, The step of matching the first set of annotations with the beam region to obtain the first matching result includes: The text contained in the first annotation text is classified based on regular expressions to obtain all numbered text, all cross-section text, all stirrup text, all longitudinal reinforcement text, all web reinforcement text and all elevation text in the first standard text; By utilizing the common features of each numbered text and its adjacent designated texts among all the numbered texts, the relative direction of each numbered text and each target annotation line corresponding to each numbered text is determined; wherein, the designated text is at least one of the cross-section text, the stirrup text, the longitudinal reinforcement text, the waist reinforcement text, and the elevation text; The annotation line that is closest to each numbered text in the opposite direction is taken as its corresponding target annotation line; The target annotation line is matched with all other text in the first annotation text except for all the numbered text, to obtain the first matching result.

3. The matching method according to claim 2, characterized in that, The step of determining the relative direction of each numbered text and its adjacent specified text by utilizing the common features of each numbered text and each target annotation line corresponding to each numbered text includes: If the starting position coordinates of the current numbered text are the same as the starting position coordinates of the currently specified text, then the relative direction of the current numbered text and the target annotation line corresponding to the current numbered text is the starting position side of the current numbered text. Alternatively, if the end position coordinates of the current numbered text are the same as the end position coordinates of the currently specified text, then the relative direction of the target annotation line corresponding to the current numbered text is the end position side of the current numbered text.

4. The matching method according to claim 1, characterized in that, The step of matching the in-situ annotations with the beam region to obtain a second matching result includes: The in-situ labels were clustered using hierarchical clustering to obtain multiple clustering results. A distance algorithm is used to match each of the multiple clustering results to the nearest beam region.

5. The matching method according to claim 1, characterized in that, The improved YOLOv5 model includes a backbone network; the backbone network includes a Focus module, a first CBH module, a first Mobile Net v3 module, a second CBH module, a second Mobile Net v3 module, a third CBH module, a third Mobile Net v3 module, a fourth CBH module, and an SPP module connected in sequence.

6. A matching device for beam regions and beam labels during beam component identification, characterized in that, include: The detection module is used to detect the beam area and the first beam annotation text from the beam construction drawing sub-frame, and the first beam annotation text includes in-situ annotations and first centralized annotations based on annotation lines; The first matching module is used to match the first set of annotations with the beam region to obtain a first matching result; The second matching module is used to match the in-situ annotations with the beam region to obtain... Second matching result; The third matching module is used to input the beam construction drawing frame, which includes the beam construction drawing sub-frame and the second beam annotation text of the beam region, into a pre-trained improved YOLOv5 model to perform position detection of the second beam annotation text, so as to obtain the position detection result of the second beam annotation text. Based on the position detection result, the second beam annotation text and the beam region are matched to obtain a third matching result; the second beam annotation text includes a second set of annotations based on a table. The determination module is used to determine the first matching result, the second matching result, and the third matching result as the final matching result of the beam region and the beam label.

7. The matching device according to claim 6, characterized in that, The first matching module is specifically used for: classifying the text contained in the first annotation text based on regular expressions to obtain all numbered texts, all cross-section texts, all stirrup texts, all longitudinal reinforcement texts, all waist reinforcement texts, and all elevation texts in the first standard text; using the common features of each numbered text and its nearest specified text, determining the relative direction of each numbered text and each target annotation line corresponding to each numbered text; wherein, the specified text is at least one of the cross-section text, the stirrup text, the longitudinal reinforcement text, the waist reinforcement text, and the elevation text; taking the annotation line located in the relative direction that is closest to each numbered text as its corresponding target annotation line; and matching the target annotation line with other texts in the first annotation text other than the numbered texts to obtain the first matching result.

8. The matching device according to claim 7, characterized in that, The first matching module is specifically configured to: if the starting position coordinates of the current numbered text are the same as the starting position coordinates of the currently specified text, then the relative direction of the target annotation line corresponding to the current numbered text is the starting position side of the current numbered text; or, if the ending position coordinates of the current numbered text are the same as the ending position coordinates of the currently specified text, then the relative direction of the target annotation line corresponding to the current numbered text is the ending position side of the current numbered text.

9. The matching device according to claim 6, characterized in that, The second matching module is specifically used to: cluster the in-situ labels using hierarchical clustering to obtain multiple clustering results; and use a distance algorithm to match each of the multiple clustering results to the nearest beam region.

10. The matching device according to claim 5, characterized in that, The improved YOLOv5 model includes a backbone network; the backbone network includes a Focus module, a first CBH module, a first Mobile Net v3 module, a second CBH module, a second Mobile Net v3 module, a third CBH module, a third Mobile Net v3 module, a fourth CBH module, and an SPP module connected in sequence.

Citation Information

Patent Citations

  • Beam member identification method and electronic device

    CN117275031B

  • Accurate identification method for component lead labeling text in CAD water supply and drainage professional graph

    CN112989452A

  • Table image processing method and device, computer equipment and readable storage medium

    CN113837151A

  • Engineering image text detection and identification method, device and system

    CN114049648A

  • Beam member identification method and electronic equipment

    CN117275031A