Method, device, electronic device and storage medium for identifying components in drawings
By selecting the target recognition model from multiple initial recognition models to identify components in the drawings, the problem that a single recognition model cannot meet user needs is solved, and more efficient drawing recognition results are achieved.
Patent Information
- Application Number
- CN202111661641.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing technology uses a single recognition model to identify components in drawings, and the recognition results cannot meet user needs.
By obtaining the user's recognition requirements, a target recognition model is selected from at least two pre-trained initial recognition models, and the component to be recognized is recognized based on the target recognition model, which is trained based on different training samples.
It improves the convenience of drawing recognition and the accuracy of recognition results, meeting the recognition needs of users.
Smart Images

Figure CN114445845B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data recognition technology, and in particular to a method, device, electronic device and storage medium for identifying components in drawings. Background Art
[0002] With the rapid development of information technology, CAD electronic drawings are widely used in many fields, including architecture, design, and manufacturing. Electronic drawings typically use geometric primitives such as points, lines, and surfaces, along with text annotations, to describe the components within the drawing. After the drawing is completed, it is often necessary to identify the components within the drawing for further review or inspection.
[0003] In the related art, a single recognition model is used to identify components in drawings. However, this approach has significant limitations, and the recognition results of the recognition model for the drawings often cannot meet user needs. Summary of the Invention
[0004] The present application provides a method, device, electronic device and storage medium for identifying components in drawings, which are used to solve the problem in the prior art that a single recognition model is used to identify components in drawings. However, this method has great limitations and the recognition results of the recognition model for the drawings often cannot meet user needs.
[0005] In a first aspect, an embodiment of the present application provides a method for identifying components in a drawing, comprising:
[0006] Get the drawing to be identified;
[0007] Obtaining a user's identification requirement, wherein the identification requirement includes a category of a component to be identified;
[0008] Determining a target recognition model from at least two pre-trained initial recognition models according to the recognition requirement, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models;
[0009] The component to be identified is identified based on the target identification model to obtain a target identification result.
[0010] Optionally, the recognition requirement further includes an identification index of the category of the component to be identified, and determining a target recognition model from at least two pre-trained initial recognition models according to the recognition requirement includes:
[0011] Obtaining a recognition performance set, where the recognition performance set is obtained based on recognition results of the at least two initial recognition models;
[0012] Determining the target recognition performance that meets the recognition index in the recognition performance set;
[0013] The initial recognition model corresponding to the target recognition performance is determined as the target recognition model.
[0014] Optionally, obtaining the recognition performance set based on the recognition results of the at least two initial recognition models includes:
[0015] Obtaining recognition results of each of the initial recognition models for the same sample drawing;
[0016] Combining the recognition results to obtain at least two combined results;
[0017] Obtaining a true result corresponding to each of the recognition results;
[0018] Determining the recognition performance corresponding to each of the combined results according to the true results and the combined results;
[0019] A set of recognition performances corresponding to the at least two combination results is determined as the recognition performance set.
[0020] Optionally, the recognition result includes component classification results of components of different categories, and determining the recognition performance corresponding to each combination result based on the true result and the combination result includes:
[0021] Determining a combined classification result of each type of component classification result from the combined results;
[0022] The recognition performance is determined based on the combined classification result and the true result.
[0023] Optionally, combining the recognition results to obtain at least two combined results includes:
[0024] Grouping the recognition results to obtain at least one grouping result, wherein the grouping result includes at least one recognition result;
[0025] The recognition results in each of the grouping results are combined to obtain the at least two combined results.
[0026] Optionally, the recognition result includes a component position and a component name of the component at the component position. When the combination result includes at least two recognition results, combining the recognition results in each of the grouping results to obtain the at least two combination results includes:
[0027] Determine a target component name of the same component position in each of the recognition results, wherein the target component name is any one of the component names;
[0028] Each component position and a target component name of each component position are determined as the combination result.
[0029] Optionally, determining the target component name of the component position that is identical in each of the recognition results includes:
[0030] Determine whether the component names at the same component position in each of the grouping results are the same;
[0031] If they are not the same, any one of the component names is used as the target component name of the component position;
[0032] If they are the same, the component name is determined to be the target component name of the component position.
[0033] Optionally, the training process of the initial recognition model includes:
[0034] Obtaining a training sample set, wherein the training sample set includes at least two training samples and a true result of each training sample, the training samples being obtained by parsing sample drawings in a sample drawing set according to a target parsing method, the training samples including sample components, and the target parsing method being one of a set of preset parsing methods;
[0035] The following training process is performed on each training sample in the training sample set:
[0036] Inputting the training sample into an initial neural network model, performing feature extraction on the training sample based on the initial neural network model to obtain sample features, and obtaining an output result of the training sample according to the sample features;
[0037] A loss function value is calculated based on the output result and the true result, the parameters in the initial neural network model are updated based on the loss function value, the next training sample is obtained from the training sample set, and the training process is repeated until the loss function is less than a preset value, and the initial neural network model is used as the initial recognition model.
[0038] In a second aspect, an embodiment of the present application provides a device for identifying components in a drawing, comprising:
[0039] A first acquisition module is used to acquire a drawing to be identified;
[0040] A second acquisition module is used to obtain the user's identification requirements, wherein the identification requirements include the category of the component to be identified;
[0041] a determination module, configured to determine, according to the recognition requirement, a target recognition model from at least two pre-trained initial recognition models, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models;
[0042] The recognition module is used to recognize the component to be recognized based on the target recognition model to obtain a target recognition result.
[0043] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store a computer program;
[0044] The processor is used to execute the program stored in the memory to implement the method for identifying components in drawings described in the first aspect.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for identifying components in a drawing described in the first aspect.
[0046] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application obtains the drawing to be identified; obtains the identification requirements of the user; according to the identification requirements, the identification requirements include the category of the component to be identified, determines the target recognition model from at least two pre-trained initial recognition models, the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models; identifies the component to be identified based on the target recognition model to obtain a target recognition result. In this way, by setting at least two initial recognition models as the recognition models of the drawing to be identified, the convenience of identifying the drawing to be identified can be improved; in addition, by determining the target recognition model that meets the user's identification requirements, the drawing to be identified is identified, so that the recognition result of the drawing to be identified can meet the user's expectations and better meet the user's needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 This is an application scenario diagram of the method for identifying components in drawings provided in one embodiment of the present application;
[0050] Figure 2 A flowchart of a method for identifying components in a drawing provided in one embodiment of the present application;
[0051] Figure 3 A structural diagram of a device for identifying components in a drawing provided in one embodiment of the present application;
[0052] Figure 4 A structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0054] According to an embodiment of the present application, a method for identifying components in a drawing is provided. Optionally, in the embodiment of the present application, the method for identifying components in a drawing can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 102 shown in FIG. Figure 1 As shown, the server 102 is connected to the terminal 101 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 102. The above-mentioned network includes but is not limited to: wide area network, metropolitan area network or local area network, and the terminal 101 is not limited to PC, mobile phone, tablet computer, etc.
[0055] The method for identifying components in drawings of the embodiment of the present application can be executed by the server 102, or by the terminal 101, or by both the server 102 and the terminal 101. The method for identifying components in drawings of the embodiment of the present application can be executed by the terminal 101, or by a client installed thereon.
[0056] Taking the method for identifying components in drawings of the embodiment of the present application executed by a terminal as an example, Figure 2 is a flow chart of an optional method for identifying components in drawings according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0057] Step 201: Obtain a drawing to be identified.
[0058] In some embodiments, the drawing to be identified can be uploaded to the terminal after the designer completes the design and needs to identify the architectural drawing; or it can be obtained from the database when the relevant personnel identify the architectural drawing. The database stores multiple architectural drawings to be identified, and the relevant personnel can select one of the architectural drawings to be identified based on the drawing name.
[0059] For example, the architectural drawings to be identified may be, but are not limited to, drawings of projects such as airports, railway stations, bus stations, office buildings, residential buildings, hospitals, museums, tourist attractions, churches, schools, and parks.
[0060] Step 202: Obtain the user's identification requirements, which include the category of the component to be identified.
[0061] In some embodiments, the user may input the identification requirement he or she needs through the display interface on the terminal, so that the terminal obtains the identification requirement.
[0062] The identification requirement may be, but is not limited to, the category of the component to be identified.
[0063] Furthermore, the identification requirement may also include a category identification index of the component to be identified, wherein the identification index may be an accuracy rate exceeding a first value and / or a completeness rate exceeding a second value.
[0064] The first value and the second value can be set according to actual conditions. For example, the first value can be set to 90%, and the second value can be set to 95%.
[0065] Step 203: Determine a target recognition model from at least two pre-trained initial recognition models according to the recognition requirement, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models.
[0066] In some embodiments, the pre-trained initial recognition model is trained using different training samples. Therefore, after obtaining the drawing to be recognized, a target recognition model can be selected from at least two initial recognition models according to the user's recognition requirements.
[0067] The target recognition model is an initial recognition model that can recognize the category of the component to be recognized.
[0068] After each initial recognition model is trained, it is tested using test data to obtain the recognition performance of each initial recognition model, which may include recognition accuracy and recognition completeness.
[0069] The test data includes the real results of the components. After the test data is recognized by the initial recognition model, the recognition results and the real results can be compared to obtain the final recognition accuracy. The number of test data is certain, and the recognition rate is calculated based on the number of recognition results and the number of test data.
[0070] In an optional embodiment, the recognition requirement further includes an identification index of the category of the component to be identified. According to the recognition requirement, determining a target recognition model from at least two pre-trained initial recognition models includes:
[0071] Obtain a recognition performance set, wherein the recognition performance set is obtained based on the recognition results of the at least two initial recognition models; determine the target recognition performance that meets the recognition index in the recognition performance set; and determine that the initial recognition model corresponding to the target recognition performance is the target recognition model.
[0072] In some embodiments, after training is completed, each initial recognition model will have its own recognition performance. After obtaining the user's recognition requirements, the recognition requirements can be compared with the recognition performance in the recognition performance set to determine the target recognition performance that meets the recognition requirements, and then the corresponding initial recognition model can be determined based on the target recognition performance and used as the target recognition model.
[0073] It is understandable that the above-mentioned recognition performance may be the recognition performance determined by the recognition result of a single initial recognition model, or may be the recognition performance jointly determined by the recognition results of two or more initial recognition models.
[0074] In an optional embodiment, obtaining the recognition performance set based on the recognition results of the at least two initial recognition models includes:
[0075] Obtain recognition results of each of the initial recognition models for the same sample drawing; combine the recognition results to obtain at least two combined results; obtain a true result corresponding to each of the recognition results; determine the recognition performance corresponding to each of the combined results based on the true results and the combined results; and determine the set of recognition performances corresponding to the at least two combined results as the recognition performance set.
[0076] In some embodiments, when the recognition performance is confirmed by the recognition results of two or more initial recognition models, since each initial recognition model has its own recognition results, when determining the recognition performance of multiple initial recognition models, the recognition results of each initial recognition model can be combined to obtain the recognition performance based on the combined results and the true results.
[0077] Specifically, when the recognition performance is accuracy, the combined results can be compared with the true results. If they are consistent, the recognition is considered accurate; if they are inconsistent, the recognition is considered inaccurate. Thus, the accuracy rate is calculated by calculating the ratio of the number of accurate recognition results to the number of true results in each combined result. When the recognition performance is completeness, the completeness rate is calculated by calculating the ratio of the number of different recognition results in the combined result to the number of true results.
[0078] It is understandable that the above-mentioned recognition performance may be the recognition performance of all recognition results in the combined result, or the recognition performance of components of different categories.
[0079] Specifically, the recognition result includes component classification results of components of different categories; and determining the recognition performance corresponding to each combination result based on the true result and the combination result includes:
[0080] A combined classification result of each type of component classification result is determined from the combined results; and the recognition performance is determined according to the combined classification result and the true result.
[0081] In some embodiments, by classifying component identification categories, the recognition accuracy or recognition completeness of the combined classification results in each combination result is determined. Therefore, when the user has a demand and wants to identify a certain type of component with a high accuracy, the corresponding target initial recognition model can be determined according to the recognition performance determined in this step.
[0082] The process of obtaining the initial recognition result of each initial recognition model for the same sample drawing may be:
[0083] Each of the initial recognition results is classified to obtain at least one component classification result; and a set of the at least one component classification result is determined as the recognition result.
[0084] In an optional embodiment, the combining of the recognition results to obtain at least two combined results includes:
[0085] The recognition results are grouped to obtain at least one grouping result, wherein the grouping result includes at least one recognition result; and the recognition results in each grouping result are combined to obtain the at least two combined results.
[0086] For example, assume that there are three initial recognition models and the recognition results are X, Y, and Z. Combining X, Y, and Z yields seven possible combinations: X, Y, Z, X∪Y, X∪Z, Y∪Z, and X∪Y∪Z. Each combination corresponds to a recognition strategy.
[0087] In an optional embodiment, the recognition result includes a component position and a component name of the component at the component position. When the combination result includes at least two recognition results, combining the recognition results in each of the grouping results to obtain the at least two combination results includes:
[0088] Determine the target component name of the same component position in each recognition result, where the target component name is any one of the component names; and determine each component position and the target component name of each component position as the combination result.
[0089] In an optional embodiment, determining the target component name of the same component position in each of the recognition results includes:
[0090] Determine whether the component names of the same component position in each of the grouping results are the same; if they are not the same, use any one of the component names as the target component name of the component position; if they are the same, determine the component name as the target component name of the component position.
[0091] In some embodiments, taking any one of the component names as the target component name of the component position can be, when the component name is compared with the real name, and when the recognition accuracy of a certain initial recognition model is higher than that of other initial recognition models, the component name recognized by this initial recognition model is taken as the target component name of the component position.
[0092] In an optional embodiment, the training process of the initial recognition model includes:
[0093] Obtain a training sample set, wherein the training sample set includes at least two training samples and a true result of each training sample, the training samples are obtained by parsing sample drawings in a sample drawing set according to a target parsing method, the training samples include sample components, and the target parsing method is one of a set of preset parsing methods; perform the following training process on each training sample in the training sample set:
[0094] The training sample is input into the initial neural network model, and features of the training sample are extracted based on the initial neural network model to obtain sample features, and the output results of the training sample are obtained according to the sample features; the loss function value is calculated according to the output result and the true result, and the parameters in the initial neural network model are updated according to the loss function value, and the next training sample is obtained from the training sample set. The training process is repeated until the loss function is less than a preset value, and the initial neural network model is used as the initial recognition model.
[0095] It is understandable that different target parsing methods are used when training different initial recognition models. Specifically, the parsing methods in the preset parsing method set can be, but are not limited to, the following:
[0096] The first method is to parse the block elements in the sample drawings to obtain the text information of the block elements, and use the text information of each block element as a training sample. The text information includes the size and identifier of the block.
[0097] The second method is to crop the sample drawing according to the area where the components are located in the sample drawing, and use the cropped results as training samples.
[0098] The third method is to use the region segmentation model to segment the sample drawings and use the segmentation results as training samples.
[0099] There are many types of initial neural network models, such as a convolutional neural network model or a deep neural network model.
[0100] It is understandable that the above-mentioned initial recognition model may be obtained based on the above-mentioned training process, or may be a recognition model in the prior art that can recognize components.
[0101] Step 204: Identify the component to be identified based on the target recognition model to obtain a target recognition result.
[0102] In some embodiments, after the target recognition model is determined, the drawing to be recognized is input into the target recognition model to obtain a recognition result of the drawing to be recognized.
[0103] It is understood that when there is only one target recognition model, the recognition result of the target recognition model is used as the recognition result of the drawing to be recognized. When there are at least two target recognition models, the recognition results of the multiple target recognition models are combined, and the at least two combined results are used as the recognition result of the drawing to be recognized.
[0104] In a specific embodiment, the method for identifying components in drawings of the present application inputs various drawings into several recognition models for identification. The multiple recognition models adopt a unified calibration method for the target components during identification. Finally, a combined statistical analysis is performed based on the results of the multiple component recognition models to obtain a fusion recognition strategy for the target components based on the drawing features. Specifically, the following steps are included:
[0105] Step 1: Preprocess the drawings to be identified and extract relevant feature information of the drawings.
[0106] Information identifying drawing features such as drawing type, drawing frame name, and floor level can be extracted.
[0107] Step 2: Based on one or more target components to be identified, the drawings to be identified are input into several recognition models to identify the target components, and a component recognition result set for each target component is obtained.
[0108] For example, the target component to be identified is a door, which includes swing doors, double doors, single doors, etc. The component identification result set may include the identified component category, component name, component location (upper left and lower right points), component confidence, etc.
[0109] Step 3: Based on each type of target component, the component recognition result sets identified by different recognition models are combined to obtain multiple component recognition result sets corresponding to each type of target component under each drawing.
[0110] For example, the recognition model includes A, B, and C, and the recognized component list is X, Y, and Z. Then, by combining X, Y, and Z, we can get 7 combination results: X, Y, Z, X∪Y, X∪Z, Y∪Z, and X∪Y∪Z.
[0111] Assuming that model A recognizes a single-door component at coordinate point P1, and model B recognizes a double-door component at coordinate point P2, the combined result is the sum of the two. Assuming that model B recognizes a double-door component at coordinate point P1 (which can include a certain tolerance), the combined result is any one of them.
[0112] Step 4: Compare the multiple component recognition result sets corresponding to each type of target component with the standard recognition results of the drawing to be recognized, and obtain the precision and recognition rate of each component recognition result set for each type of component under each drawing.
[0113] For each drawing to be identified, professionals can manually calibrate the component information in the drawing to obtain a standard identification result for each drawing to be identified, and then obtain the recognition rate or precision rate of each type of component.
[0114] Step 5: Perform cluster analysis based on the characteristics of the drawings according to the recognition rates and precision rates of various target components in different combinations in several drawings, and obtain the recognition strategy of each target component based on different drawing features.
[0115] For example, cluster analysis found that for door recognition in above-ground building plans, the combination of recognition models A and B achieved the highest recognition accuracy. For door recognition in underground building plans, recognition model C achieved the highest precision.
[0116] When performing cluster analysis, different components can be clustered based on different drawing characteristics.
[0117] In the above steps, it is also possible to not limit the category of the target component to be identified, and directly identify all components in the drawing. When calculating the combination, all identified components are combined together. In step 4, the recognition rate and precision rate are calculated according to each type of component.
[0118] Refer to Table 1 below. Table 1 shows the situation of using three different schemes to identify parking spaces. It can be seen that different recognition schemes have different focuses. By integrating the three schemes, the recognition rate of a single scheme can be improved.
[0119] Table 1
[0120]
[0121] Based on the same concept, an embodiment of the present application provides a device for identifying components in drawings. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. Figure 3 As shown, the device mainly includes:
[0122] The first acquisition module 301 is used to acquire the drawing to be identified;
[0123] The second acquisition module 302 is used to obtain the user's identification requirements, wherein the identification requirements include the category of the component to be identified;
[0124] A determination module 303 is configured to determine a target recognition model from at least two pre-trained initial recognition models according to the recognition requirement, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models;
[0125] The identification module 304 is configured to identify the component to be identified based on the target identification model to obtain a target identification result.
[0126] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 4As shown, the electronic device mainly includes: a processor 401, a memory 402 and a communication bus 403, wherein the processor 401 and the memory 402 communicate with each other via the communication bus 403. The memory 402 stores a program that can be executed by the processor 401, and the processor 401 executes the program stored in the memory 402 to implement the following steps:
[0127] Get the drawing to be identified;
[0128] Obtaining a user's identification requirement, wherein the identification requirement includes a category of a component to be identified;
[0129] Determining a target recognition model from at least two pre-trained initial recognition models according to the recognition requirement, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models;
[0130] The component to be identified is identified based on the target identification model to obtain a target identification result.
[0131] The communication bus 403 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 403 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0132] The memory 402 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor 401.
[0133] The above-mentioned processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0134] In another embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program runs on a computer, the computer executes the method for identifying components in the drawings described in the above embodiment.
[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (such as a floppy disk, hard disk, tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk), etc.
[0136] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0137] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for identifying components in drawings, characterized in that: include: Get the drawing to be identified; Obtaining a user's identification requirement, wherein the identification requirement includes a category of a component to be identified; Determining a target recognition model from at least two pre-trained initial recognition models according to the recognition requirement, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models; Identifying the component to be identified based on the target recognition model to obtain a target recognition result; The identification requirement further includes an identification index of the category of the component to be identified, and determining a target recognition model from at least two pre-trained initial recognition models according to the identification requirement includes: Obtaining a recognition performance set, where the recognition performance set is obtained based on recognition results of the at least two initial recognition models; Determining a target recognition performance in the recognition performance set that meets the recognition indicator; The initial recognition model corresponding to the target recognition performance is determined as the target recognition model.
2. The method for identifying components in drawings according to claim 1, characterized in that: Obtaining the recognition performance set based on the recognition results of the at least two initial recognition models includes: Obtaining recognition results of each of the initial recognition models for the same sample drawing; Combining the recognition results to obtain at least two combined results; Obtaining a true result corresponding to each of the recognition results; Determining the recognition performance corresponding to each of the combined results according to the true results and the combined results; A set of recognition performances corresponding to the at least two combination results is determined as the recognition performance set.
3. The method for identifying components in drawings according to claim 2, characterized in that: The recognition result includes component classification results of components of different categories, and determining the recognition performance corresponding to each combination result based on the real result and the combination result includes: Determining a combined classification result of each type of component classification result from the combined results; The recognition performance is determined based on the combined classification result and the true result.
4. The method for identifying components in drawings according to claim 2, characterized in that: The combining of the recognition results to obtain at least two combined results includes: Grouping the recognition results to obtain at least one grouping result, wherein the grouping result includes at least one recognition result; The recognition results in each of the grouping results are combined to obtain the at least two combined results.
5. The method for identifying components in drawings according to claim 4, characterized in that: The recognition result includes a component position and a component name of the component at the component position. When the combination result includes at least two recognition results, combining the recognition results in each of the grouping results to obtain the at least two combination results includes: Determine a target component name of the same component position in each of the recognition results, wherein the target component name is any one of the component names; Each component position and a target component name of each component position are determined as the combination result.
6. The method for identifying components in drawings according to claim 5, characterized in that: The determining of the target component name of the component position that is identical in each of the recognition results includes: Determine whether the component names at the same component position in each of the grouping results are the same; If they are not the same, any one of the component names is used as the target component name of the component position; If they are the same, the component name is determined to be the target component name of the component position.
7. A device for identifying components in drawings, characterized in that: include: A first acquisition module is used to acquire a drawing to be identified; A second acquisition module is used to obtain the user's identification requirements, wherein the identification requirements include the category of the component to be identified; a determination module, configured to determine, according to the recognition requirement, a target recognition model from at least two pre-trained initial recognition models, wherein the at least two initial recognition models are trained based on different training samples, and the target recognition model includes at least one of the initial recognition models; an identification module, configured to identify the component to be identified based on the target identification model and obtain a target identification result; The identification requirement further includes an identification index of the category of the component to be identified, and determining a target recognition model from at least two pre-trained initial recognition models according to the identification requirement includes: Obtaining a recognition performance set, where the recognition performance set is obtained based on recognition results of the at least two initial recognition models; Determining a target recognition performance in the recognition performance set that meets the recognition indicator; The initial recognition model corresponding to the target recognition performance is determined as the target recognition model.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is configured to execute the program stored in the memory to implement the method for identifying components in a drawing as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for identifying components in a drawing according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Image recognition method and system for project drawing and related device
CN113283308A