A component recognition method, device and medium based on target detection
Patent Information
- Application Number
- CN202611138573.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-09-11
AI Technical Summary
[0003]上述识别方法依赖于图块在创建时被赋予规范统一的名称,然而,由于不同设计单位对同一类构件往往采用不同的图例符号,即使同一类图块也可能因命名规范不统一而无法被正确识别,当图纸来源于多个设计单位时,难以覆盖所有图例变体,导致识别率显著下降
将用户在设计图纸中指定的待识别图块转换为图像数据,利用预先训练的目标检测模型从图像的视觉内容中识别各图块对应的目标构件类别及位置信息,并最终输出结构化识别结果,由于直接对图纸的视觉图像内容进行分析,识别过程不依赖于图块的文本名称及图层归属,有效克服了不同设计院图例符号不统一及图块命名不规范带来的识别障碍,并且,即使图块图层混乱,目标检测模型仍可通过视觉特征进行准确识别,能够处理历史遗留的、不符合制图规范的设计图纸,显著提高了构件识别结果的适用范围。
Smart Images

Figure CN122737985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of target detection technology, specifically to a component identification method, device, and medium based on target detection. Background Technology
[0002] Computer-aided design (CAD) technology has been widely applied in fields such as architectural engineering and electrical engineering. As the core graphic unit in CAD drawings representing various equipment and components, the identification and statistical analysis of blocks are crucial for quantity surveying, drawing review, and the digitization of existing drawings. Currently, mainstream block recognition schemes rely on matching and retrieving block names or layer names, that is, classifying and locating blocks by comparing their textual attributes.
[0003] The aforementioned identification methods rely on blocks being given standardized names during creation. However, different design firms often use different symbolic representations for the same type of component, and even blocks of the same type may fail to be correctly identified due to inconsistent naming conventions. When drawings originate from multiple design firms, it is difficult to cover all symbolic variations, leading to a significant decrease in the recognition rate. Furthermore, CAD drawings commonly suffer from issues such as mixed layers or blocks not being created according to specifications. In these cases, it is impossible to identify and retrieve blocks by their names. Summary of the Invention
[0004] To address the aforementioned problems, this application proposes a component recognition method based on target detection, comprising: Determine the set of target component categories to be inspected; The user-specified target block in the design drawing is converted into image data, and the image data is input into a pre-trained target detection model; The target detection model identifies the target component attribute information corresponding to each patch in the image data; the target component attribute information includes at least the target component category, and the target component category belongs to the target component category set. The target component attribute information is converted into structured recognition results and then visualized.
[0005] In one implementation of this application, before identifying the target component attribute information corresponding to each patch in the image data, the method further includes: Read the sample drawing containing the component to be labeled, and extract the sample metadata of each block in the sample drawing; the sample metadata includes at least the block name and block location information; Based on the sample metadata, construct the first block attribute library corresponding to the sample drawing; In response to the user's selection of a specified block within the annotation range in the sample drawing, based on the first block attribute library, corresponding component category annotations are added to the specified block to generate annotation sample data; The labeled sample data is used as a training set to fine-tune the preset general object detection model, resulting in a pre-trained object detection model.
[0006] In one implementation of this application, the target component attribute information includes block location information. After identifying the target component attribute information corresponding to each block in the image data, the method further includes: Extract the metadata of each block in the design drawing, and construct a second block attribute library corresponding to the design drawing based on the metadata; Based on the mapping relationship between block name and block location information in the second block attribute library, the target component attribute information is checked to determine whether the target component attribute information matches the mapping relationship. If not, the attribute information of the target component is corrected.
[0007] In one implementation of this application, the block to be identified is determined by any of the following operations: selecting a bounding box, defining a custom drawing range, or picking a pre-drawn closed space.
[0008] In one implementation of this application, after adding corresponding component category labels to the specified block, the method further includes: In response to the user's click operation on the labeled block, the labeled block is located and highlighted in the sample drawing to detect the labeling status of each block.
[0009] In one implementation of this application, identifying the target component attribute information corresponding to each patch in the image data specifically includes: Obtain the confidence threshold corresponding to the target component category of each map block; The target detection model outputs target component attribute information corresponding to each patch in the image data; the target component attribute information includes a confidence score. The confidence score of each block is compared with its corresponding confidence threshold to filter out the target component attribute information of blocks whose confidence scores are less than the confidence threshold.
[0010] In one implementation of this application, after obtaining the confidence threshold corresponding to the target component category of each block, the method further includes: Retrieve the naming format corresponding to the block name of each block in the second block attribute library; Determine the number of blocks in the second block attribute library whose naming format matches the preset naming format, and obtain the format standardization rate corresponding to the design drawing based on the proportion of the number of blocks to the total number of blocks in the second block attribute library; Based on the format standardization rate, adjust the confidence threshold corresponding to each target component category.
[0011] In one implementation of this application, adjusting the confidence threshold corresponding to each target component category based on the format standardization rate specifically includes: If the format standardization rate is lower than a preset threshold, the confidence threshold corresponding to each target component category is increased; otherwise, the confidence threshold is decreased.
[0012] This application provides a component recognition device based on target detection, the device comprising: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a component recognition method based on target detection as described in any of the preceding claims.
[0013] This application provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows: A component recognition method based on target detection, as described in any of the preceding items.
[0014] The component recognition method based on target detection proposed in this application can bring the following beneficial effects: The system converts user-specified blocks in design drawings into image data. A pre-trained object detection model then identifies the target component category and location information corresponding to each block from the visual content of the image, ultimately outputting structured recognition results. Because it directly analyzes the visual image content of the drawings, the recognition process does not rely on the text name or layer affiliation of the blocks, effectively overcoming the recognition obstacles caused by inconsistent legend symbols among different design institutes and non-standard block naming. Furthermore, even if the block layers are chaotic, the object detection model can still accurately identify them through visual features. It can handle historical design drawings that do not conform to drafting standards, significantly improving the applicability of the component recognition results. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic flowchart of a component recognition method based on target detection provided in an embodiment of this application; Figure 2 This is a schematic diagram of a structured recognition result provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a component recognition device based on target detection, provided in an embodiment of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0018] like Figure 1 As shown in the embodiment of this application, a component recognition method based on target detection is provided and applied to a CAD system, including: S101: Determine the set of target component categories to be detected.
[0019] The target component category set refers to the total number of component types identified and extracted from the drawings in this identification operation. Before identifying components in CAD design drawings, it is necessary to clarify the specific scope of the identification task, that is, to determine the target component category set to be detected. For example, in an electrical plan, the user may only focus on smoke detectors and sockets; these two types of components constitute the target component category set for the current identification task. If the user focuses on all electrical equipment, the target component category set can cover various types such as switches, sockets, transformers, and smoke detectors. The target component category set is specified by the user and serves as the basis for category selection in the subsequent target detection model inference process.
[0020] S102: Convert the blocks to be identified specified by the user in the design drawings into image data, and input the image data into a pre-trained target detection model.
[0021] In practical engineering applications, users can specify blocks within the drawing area as the blocks to be identified on the design drawings through various operation methods. After specifying the blocks to be identified, the drawing content needs to be converted from vector format to an image format that the object detection model can process. Therefore, the system uses a CAD rendering engine to render the user-specified blocks to be identified from the original Portable Document Format (PDF) into image data according to a preset scale and preset dots per inch (DPI) parameters. The preset scale is used to determine the scaling factor used during rendering, ensuring an accurate correspondence between the rendered image size and the actual drawing size; the preset DPI is used to determine the rendering resolution. The higher the DPI value, the greater the pixel density of the generated raster image, and the clearer the edge details of the blocks in the image, which is beneficial for the object detection model to extract visual features. After converting the blocks to be identified into image data, the image is cropped to remove redundant areas outside the drawing frame, and preprocessing operations such as size normalization, grayscale conversion, or contrast enhancement are performed. In addition, for large-format drawings, sliding window technology can be used to divide the large drawing into multiple overlapping image blocks. Through the rendering process described above, the vector graphics in the design drawings are converted into image data composed of pixel matrices, resolving the data format incompatibility issue between CAD vector formats and deep learning models. The rendered image data is then input into a pre-trained object detection model to trigger the subsequent component recognition process.
[0022] Optionally, the area to be identified can be determined through any of the following methods: bounding selection, custom drawing range, or picking a pre-drawn closed space. Bounding selection refers to the user dragging the mouse on the design drawing to form a rectangular selection box; the area within this rectangle is the area to be identified. Free drawing refers to drawing a closed outline along any shape on the design drawing; the area inside this outline is the area to be identified. Picking refers to clicking on a pre-drawn closed space outline in the design drawing, such as a room boundary line or a fire compartment boundary line; the area enclosed by this closed space is the area to be identified. These three methods can adapt to user habits and drawing characteristics in different engineering scenarios. Bounding selection is suitable for quickly selecting rectangular areas, free drawing is suitable for irregularly shaped areas, and picking is suitable for drawings with clearly defined spatial boundaries, thus flexibly meeting different user needs.
[0023] Object detection models can employ the YOLO object detection architecture based on deep learning, whose training process relies on a large amount of drawing image data with labeled component categories and bounding box location information. However, in the field of engineering design, different design units often use different symbolic representations for the same type of component, and even within the same design unit, there may be variations in symbolic versions across different projects. Publicly available general object detection datasets typically do not include drawing data for this specialized field, making them difficult to use directly for component recognition tasks. Therefore, it is necessary to construct a dedicated training dataset based on actual engineering drawings.
[0024] In one embodiment, sample drawings containing various components to be labeled are obtained. Sample drawings refer to design drawings collected from historical engineering projects, containing multiple symbolic styles, and their sources can cover engineering projects from multiple different design units or different periods. The system reads the sample drawings through CAD secondary development interfaces, such as the AutoCAD .NET API. The sample drawings are original vector graphics files in DWG or DXF format. By parsing the block entities in the sample drawings, sample metadata for each block can be extracted. Sample metadata refers to the inherent attribute information of the blocks directly read from the vector data, including at least the block name and block location information. The block name is the text identifier assigned to the block when it is created in the CAD system, and the block location information is the position information of each block in the drawing coordinate system, such as the insertion point coordinates. In addition, sample metadata may also include auxiliary attributes such as the block's scaling ratio and rotation angle.
[0025] After extracting the sample metadata for each block, a first block attribute library corresponding to the sample drawing is constructed based on the sample metadata. The first block attribute library uses the block name of each block in the sample drawing as the key and the block's location coordinates, dimensions, and other attribute information as the value to construct a structured mapping table. Essentially, it is a collection of mapping relationships between all block names and their location information in the sample drawing. The first block attribute library enables users to quickly index and locate the corresponding block entities in the drawing based on their block names during subsequent annotation processes, thus providing a data indexing foundation for the data annotation process.
[0026] During the annotation process, the user first selects the annotation area to be annotated on the sample drawing. Based on the user-selected annotation area, the system retrieves all blocks within that area from the first block attribute library and displays them to the user in the form of a block list. The block list contains the block name and its location information on the drawing. The user browses the block list, selects one or more specified blocks, and enters the corresponding component category name. For example, the user selects the block named "SD-001" and enters its component category as a smoke detector. Based on the user's selection and category name input, the system adds the corresponding component category annotation to the selected specified blocks. By entering the category name and checking the block name, the user can quickly perform batch annotation of multiple blocks of the same category without having to repeatedly enter the category name for each block, significantly improving the annotation efficiency of large-scale training datasets.
[0027] It should be noted that, in order to ensure the accuracy of the annotation dataset as much as possible and avoid over-annotation or omission, users can click on a list item of a specific block. The system will respond to the user's click operation on the annotated block, automatically locate and highlight the component position corresponding to the annotated block in the sample drawing, so that the user can intuitively view the annotation status of the block in the drawing and thus verify whether the block has been annotated.
[0028] After a user completes the annotation operation on a specified tile, the annotated tiles, along with their corresponding category labels and location information, are compiled into annotation sample data. This annotation sample data is then exported as a training set for subsequent model training. After obtaining the training set, the model is fine-tuned using transfer learning techniques, with the pre-trained weights of a general object detection model as initial parameters. The general object detection model refers to a YOLO model pre-trained on a large-scale general image dataset, possessing general image feature extraction capabilities. Using the generated training set, all or some of the network layer parameters of the pre-trained model are further trained and adjusted, enabling the general object detection model to learn and adapt to the visual appearance features of various components in CAD drawings, building upon its knowledge of general image features. Through this fine-tuning training, the model can accurately identify the same type of component under different legend styles. For example, regardless of whether a smoke detector is drawn as a circle, square, or a special symbol with markings in drawings from different design institutes, as long as the training data contains the corresponding legend variant, the model can correctly identify and classify it based on visual features. After fine-tuning and training convergence, a pre-trained target detection model is obtained, which can be directly used for automated detection and recognition of various components in the drawings to be identified.
[0029] In this embodiment, the target detection model is integrated into a plugin of computer-aided design software, serving as a built-in recognition module of the CAD system. Optionally, the above-described training process and the trained target detection model can be integrated into various application systems. For example, it can be deployed in a standalone intelligent drawing recognition and processing system as a professional drawing analysis tool for users; it can also be deployed on a cloud server to provide drawing recognition capabilities to users through cloud services; or it can be integrated into an enterprise-level design review and quality management system as the core recognition engine for the automated drawing review process. These various system deployment methods can meet the drawing component recognition needs in different scenarios.
[0030] S103: Using a target detection model, identify the target component attribute information corresponding to each tile in the image data; the target component attribute information includes at least the target component category, and the target component category belongs to the target component category set.
[0031] After image data is input into the object detection model, the model performs inference calculations to identify the target component attribute information corresponding to each image patch. This attribute information includes at least the target component category. When inferring from the image data, the target detection model outputs detection results covering all component categories it can identify, not just the user-preselected set of target component categories. After the model outputs all detection results, a category filtering operation is performed on all output detection results based on the user-defined target component category set. Only detection results with category labels belonging to the target component category set are retained, while detection results for other component categories not belonging to the target component category set are filtered out. For example, if the user preselects two target component category sets, "smoke detector" and "socket," and the model actually outputs four categories of detection results: smoke detector, socket, switch, and transformer, then only the detection results for smoke detector and socket are retained, while the detection results for switch and transformer are discarded. After this category filtering, the target component categories of the retained detection results all belong to the user-preselected target component category set, allowing the user to configure the recognition objects as needed and avoiding the output of redundant recognition information for a large number of irrelevant components.
[0032] In one embodiment, after the target component attribute information corresponding to each block is identified by the target detection model, in order to further improve the accuracy of the identification results, this embodiment of the application performs cross-comparison and verification of the target component attribute information by means of the complementary relationship between the block metadata in the design drawings and the visual recognition results.
[0033] Specifically, metadata for each block in the design drawing is extracted. Here, the design drawing refers to the drawing to be identified input by the current user, not the sample drawing used in the training phase. The metadata is of the same type as the sample metadata extracted from the sample drawing in the training phase, and includes at least the block name in the CAD system and the block's position information in the drawing coordinate system. The above metadata can be read directly from the vector data of the current design drawing through the CAD secondary development interface.
[0034] After extracting the metadata of each block in the current design drawing, a second block attribute library corresponding to the design drawing needs to be constructed based on the metadata. The second block attribute library is constructed in the same way as the first block attribute library constructed during the training phase; both use the block name as the key and the block location information as the value, and are constructed according to the mapping relationship between the block name and the block location information. However, the first block attribute library serves the sample drawings in the training phase to generate labeled sample data, while the second block attribute library serves the drawings to be recognized in the current recognition phase to cross-validate the visual recognition results. Both are constructed in the same way, but they are at different stages of the process and serve different objects.
[0035] After obtaining the second tile attribute library, the target component attribute information output by the target detection model is checked item by item according to the mapping relationship between tile names and tile location information in the second tile attribute library. The purpose of the check is to determine whether each detection result in the target component attribute information matches the above mapping relationship. That is, each detection result output by the target detection model contains the target component category and tile location information. Using the tile location information as an index, the tile name recorded at the same location is searched in the second tile attribute library, and then the tile name is compared with the target component category output by the target detection model. If the two correspond to the same type of component, the detection result is determined to match the mapping relationship, indicating that the detection result has high reliability. For example, the name recorded at this location in the second tile attribute library is "SD-001", while the model outputs the category as "smoke detector". The two are semantically consistent. Conversely, if the information expressed by the two is inconsistent, the detection result is determined to not match the mapping relationship, indicating that the detection result may be incorrect. For detection results found to be mismatched after check, the target component attribute information is corrected. The correction can be done manually. First, mark the corresponding test results as pending verification and prompt the user to manually confirm the component category at that location. Then, correct the target component attribute information based on the user's manual verification results and update the corrected category to the target component attribute information.
[0036] By using the cross-comparison and correction mechanism between the second tile attribute library and the visual recognition results, the complementary relationship between the two independent information sources in the same drawing can be used to verify and correct the visual recognition results of the target detection model, thereby effectively reducing the possible misidentification caused by a single information source and improving the accuracy and reliability of the final recognition results.
[0037] In one embodiment, the target component attribute information output by the object detection model also includes a confidence score for each tile. Because different component categories differ in terms of the complexity of legend symbols, the pixel area they occupy in the drawing, and the salience of visual features, the confidence level of the object detection model varies for each category. If a uniform confidence threshold is used to filter the recognition results for all components, it may affect the accuracy of the model's detection results. Therefore, each target component category is configured with a corresponding confidence threshold, allowing each type of component to maintain a balance between precision and recall under its own confidence distribution characteristics.
[0038] Therefore, after identifying the target component attribute information corresponding to each patch in the image data through the target detection model, the confidence threshold corresponding to the target component category to which each patch belongs in the detection results is obtained. Then, the confidence score of each patch is compared with its corresponding confidence threshold. If the confidence score is greater than or equal to the confidence threshold, the detection result is determined to be reliable and retained; if the confidence score is less than the confidence threshold, the confidence of the detection result is determined to be too low and it is screened out.
[0039] The above-mentioned screening mechanism based on category-independent confidence thresholds enables different component categories to adopt judgment criteria suitable for their own confidence distribution characteristics, so that each category can achieve a better balance between precision and recall under its own confidence score distribution conditions, avoiding the screening imbalance caused by a uniform confidence threshold for each category.
[0040] In one embodiment, the visual feature differences of different component categories in the same design drawing determine the need for a category-independent confidence threshold. However, even for the same component category, the confidence level of the recognition results may exhibit systematic deviations across different design drawings due to the degree of naming standardization within the drawings themselves. In drawings with a high degree of design standardization, blocks are assigned names with uniform rules during creation, and the string format between different block names has a high degree of consistency. This standardization is not only reflected in the text attributes but also often reflects the overall high quality of the drawing production. Therefore, the model's confidence level for component recognition in this type of drawing is generally high. Conversely, in drawings with a low degree of design standardization, block names may be meaningless characters such as default "Block 1" or "Block 2," or exhibit chaotic naming formats due to different sources. These drawings are usually accompanied by problems such as non-standard block drawing and numerous legend variations, which increases the difficulty of feature extraction during visual recognition and results in an overall low confidence level. Therefore, after obtaining the confidence threshold corresponding to the target component category of each block, it is necessary to further evaluate the naming standardization of the current design drawings and adjust the confidence threshold of each category accordingly so that the recognition strategy can adapt to the quality characteristics of the current drawings.
[0041] Specifically, the naming format corresponding to the block name of each block in the second block attribute library is obtained. The naming format refers to the naming rules of the block name, such as whether the block name contains a uniform prefix or suffix, whether it conforms to specific character combination rules, and whether it follows a preset numbering system. Based on this, one or more preset naming formats are pre-defined as the standard naming format. The block name of each block in the second block attribute library is matched one by one with the preset naming format. The number of blocks whose naming formats match the preset naming formats is counted, and the proportion of the number of matching blocks to the total number of blocks in the second block attribute library is calculated. The calculation result is used as the format standardization rate corresponding to the current design drawing. The format standardization rate is used to characterize the degree of naming standardization of the design drawing. The higher the format standardization rate, the more likely that the vast majority of blocks in the drawing follow a uniform naming format, the higher the standardization of the drawing, and the generally higher the overall visual recognition confidence level of the model on this type of drawing. Conversely, the lower the format standardization rate, the more likely that the block naming format in the drawing is chaotic, the poor standardization of the drawing's production, and the generally lower the overall visual recognition confidence level of the model on this type of drawing.
[0042] After obtaining the format standardization rate corresponding to the current design drawing, the confidence thresholds for each target component category are adjusted based on this rate. When the format standardization rate is lower than the preset threshold, it indicates that the naming conventions of the blocks in the current design drawing are relatively low. The model faces increased difficulty in visual feature extraction on this type of drawing, resulting in a lower overall confidence level. Therefore, it is necessary to reduce the recognition sensitivity to control the false detection rate. This means increasing the overall confidence threshold for each target component category so that only detections with high model confidence can pass the screening, thus ensuring the accuracy of the output results. Conversely, when the format standardization rate is higher than the preset threshold, it indicates that the naming conventions of the blocks in the current design drawing are relatively high, the overall quality of the drawing is good, and the overall confidence level of the model's visual recognition on this type of drawing is relatively high. Therefore, the confidence thresholds for each target component category can be lowered, allowing the model to output more correctly detected components and reduce missed detections.
[0043] By adjusting the confidence threshold through the format standardization rate, the actual naming standardization of the current design drawings is dynamically adapted to the output detection results. This allows for adaptive adjustment of the recognition strategy under different drawing quality conditions, thereby improving the accuracy of component detection results.
[0044] S104: Convert the target component attribute information into structured recognition results and visualize them.
[0045] The target component attribute information output by the target detection model needs to be converted into structured recognition results and displayed to users in an intuitive and visual way for easy viewing. For example... Figure 2 The diagram illustrates a structured identification result. Based on the category labels of each target component, the quantity of components in each category within the selected range is statistically analyzed to generate classification statistics. Specifically, the total quantity of each type of component, such as smoke detectors, sockets, and switches, in the current design drawings is counted. This statistical result can be directly used for applications such as quantity calculation and equipment and material procurement planning. Simultaneously, the attribute information of the target components corresponding to each block is organized into a structured data table, with each row corresponding to a detected block. After generating and statistically analyzing the structured data table, the identification and statistical results are presented to the user in an intuitive visualization.
[0046] The above are embodiments of the methods proposed in this application. Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0047] Figure 3 This is a schematic diagram of a component recognition device based on target detection, provided as an embodiment of this application. Figure 3 As shown, it includes: At least one processor; and, At least one processor-communication-connected memory; wherein, The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform a component recognition method based on object detection as described in any of the preceding claims.
[0048] This application provides a non-volatile computer storage medium storing computer-executable instructions, which are configured as follows: A component recognition method based on target detection, as described in any of the preceding items.
[0049] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0050] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A component recognition method based on target detection, characterized in that, The method includes: Determine the set of target component categories to be inspected; The user-specified target block in the design drawing is converted into image data, and the image data is input into a pre-trained target detection model; The target detection model identifies the target component attribute information corresponding to each patch in the image data; the target component attribute information includes at least the target component category, and the target component category belongs to the target component category set. The target component attribute information is converted into structured recognition results and then visualized.
2. The component recognition method based on target detection according to claim 1, characterized in that, Before identifying the target component attribute information corresponding to each patch in the image data, the method further includes: Read the sample drawing containing the component to be labeled, and extract the sample metadata of each block in the sample drawing; the sample metadata includes at least the block name and block location information; Based on the sample metadata, construct the first block attribute library corresponding to the sample drawing; In response to the user's selection of a specified block within the annotation range in the sample drawing, based on the first block attribute library, corresponding component category annotations are added to the specified block to generate annotation sample data; The labeled sample data is used as a training set to fine-tune the preset general object detection model, resulting in a pre-trained object detection model.
3. The component recognition method based on target detection according to claim 2, characterized in that, The target component attribute information includes tile location information. After identifying the target component attribute information corresponding to each tile in the image data, the method further includes: Extract the metadata of each block in the design drawing, and construct a second block attribute library corresponding to the design drawing based on the metadata; Based on the mapping relationship between block name and block location information in the second block attribute library, the target component attribute information is checked to determine whether the target component attribute information matches the mapping relationship. If not, the attribute information of the target component is corrected.
4. The component recognition method based on target detection according to claim 1, characterized in that, The block to be identified is determined by any of the following methods: box selection, custom drawing range, or picking a pre-drawn closed space.
5. The component recognition method based on target detection according to claim 2, characterized in that, After adding the corresponding component category label to the specified block, the method further includes: In response to the user's click operation on the labeled block, the labeled block is located and highlighted in the sample drawing to detect the labeling status of each block.
6. The component recognition method based on target detection according to claim 1, characterized in that, Identifying the target component attribute information corresponding to each patch in the image data specifically includes: Obtain the confidence threshold corresponding to the target component category of each map block; The target detection model outputs target component attribute information corresponding to each patch in the image data; the target component attribute information includes a confidence score. The confidence score of each block is compared with its corresponding confidence threshold to filter out the target component attribute information of blocks whose confidence scores are less than the confidence threshold.
7. A component recognition method based on target detection according to claim 6, characterized in that, After obtaining the confidence threshold corresponding to the target component category of each tile, the method further includes: Retrieve the naming format corresponding to the block name of each block in the second block attribute library; Determine the number of blocks in the second block attribute library whose naming format matches the preset naming format, and obtain the format standardization rate corresponding to the design drawing based on the proportion of the number of blocks to the total number of blocks in the second block attribute library; Based on the format standardization rate, adjust the confidence threshold corresponding to each target component category.
8. The component recognition method based on target detection according to claim 7, characterized in that, Based on the format standardization rate, adjust the confidence threshold corresponding to each target component category, specifically including: If the format standardization rate is lower than a preset threshold, the confidence threshold corresponding to each target component category is increased; otherwise, the confidence threshold is decreased.
9. A component recognition device based on target detection, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a component recognition method based on target detection as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: A component recognition method based on target detection as described in any one of claims 1-8.