Electrical component identification method and device, storage medium and electronic equipment

By calculating the arc curvature value through the ROI layer and ROI Align unit in the deep learning model, dynamically adjusting the sampling point distribution, and combining it with electrical knowledge base verification, the accuracy problem of component identification in electrical drawings is solved and high-precision identification is achieved.

CN120689898AActive Publication Date: 2025-09-23XIAN SHUHE INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510702024.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-23
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

There are many circuit graphic symbols for different components in electrical drawings and their size distribution is special, making it difficult to accurately identify electrical components using conventional identification methods.

Method used

A deep learning model is used, including a region of interest (ROI) layer and a curvature-sensitive ROI Align unit. The sampling point distribution is dynamically adjusted by calculating the arc curvature value, enhancing the coverage of high curvature areas. It is also verified in combination with the electrical knowledge base to improve recognition accuracy.

Benefits of technology

The accuracy of electrical component identification was improved from 90% to 98.6%, the workload of manual review was reduced by 85%, and the false detection rate was reduced from 5.2% to 1.2%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689898A_ABST
    Figure CN120689898A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image recognition, in particular to an electrical component recognition method, an electrical component recognition device, a storage medium and electronic equipment. The electrical component identification method comprises the following steps: acquiring a to-be-detected image; inputting the to-be-detected image into a deep learning model to obtain an electrical component identification result output by the deep learning model; wherein the deep learning model comprises a region of interest (ROI) layer, and the ROI layer comprises a curvature calculation unit and a curvature sensitive ROI Align unit; the curvature calculation unit is used for calculating an arc curvature value in each recommendation candidate frame, and the ROI Align unit is used for determining sampling points of the recommendation candidate frames according to the arc curvature values so as to map each recommendation candidate frame into a target feature map with a fixed size based on the sampling points. According to the electrical component identification method provided by the invention, the identification accuracy of the electrical component can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image recognition, and in particular to an electrical component recognition method, an electrical component recognition device, a storage medium, and an electronic device. Background Art

[0002] In the electrical industry, there are a large number of drawings that cause difficulties in data processing, especially the consistency and accuracy of the graphic elements and table information of the electrical drawing data. Therefore, it is necessary to digitize and informationize the electrical drawings.

[0003] There are many circuit graphic symbols for different components in electrical drawings, and their size distribution is also quite special. It is difficult to accurately identify electrical components using conventional identification methods.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0005] The present disclosure aims to provide an electrical component identification method, an electrical component identification device, a storage medium, and an electronic device, aiming to improve the identification accuracy of electrical components.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a method for identifying an electrical component is provided, comprising:

[0008] Obtain the image to be detected;

[0009] Inputting the image to be detected into a deep learning model to obtain an electrical component recognition result output by the deep learning model;

[0010] In which, the deep learning model includes a region of interest (ROI) layer, and the ROI layer includes a curvature calculation unit and a curvature-sensitive ROI Align unit; the curvature calculation unit is used to calculate the arc curvature value within each recommended candidate box, and the ROI Align unit is used to determine the sampling points of the recommended candidate box according to the arc curvature value, so as to map each recommended candidate box into a target feature map of a fixed size based on the sampling points.

[0011] Optionally, calculating the arc curvature value within each recommended candidate box includes:

[0012] Extracting an edge point sequence within the recommended candidate frame;

[0013] Calculating an initial arc curvature value based on the edge point sequence;

[0014] The initial arc curvature value is normalized to obtain the arc curvature value.

[0015] Optionally, determining the sampling points of the recommended candidate box according to the arc curvature value includes:

[0016] Generating initial sampling points of the recommended candidate box based on initial grid parameters;

[0017] Calculating a curvature offset of each of the initial sampling points based on the arc curvature value to obtain a total curvature offset corresponding to the recommended candidate box;

[0018] The initial sampling point is adjusted according to the total amount of curvature offset to obtain the sampling point.

[0019] Optionally, mapping each of the recommended candidate boxes into a target feature map of a fixed size based on the sampling points includes:

[0020] Determine four pixel points adjacent to the sampling point;

[0021] Determining a curvature weight of each pixel point based on the sampling point and the position of each pixel point;

[0022] The target feature value of the sampling point is calculated according to the curvature influence factor, the curvature weight, the arc curvature value, and the initial feature value of each pixel point to obtain the target feature map.

[0023] Optionally, the deep learning model further includes:

[0024] The backbone network Backbone layer is used to extract features from the image to be detected and obtain an initial feature map;

[0025] A region proposal network (RPN) layer is used to generate a recommended candidate box based on the initial feature map;

[0026] A classifier and regression layer, configured to output the position and category of the recommended candidate box according to the target feature map;

[0027] The fully convolutional network layer (FCN) is used to predict the confidence corresponding to each category of the recommended candidate box to obtain the electrical component recognition result.

[0028] Optionally, the method further includes:

[0029] Configure the Anchor ratio parameters of the deep learning model; the Anchor ratio parameters are 1:1.5, 1:3, and 2.5:1.

[0030] Optionally, after obtaining the electrical component identification result, the method further includes:

[0031] Obtaining a low-confidence recognition result having a confidence level less than a preset threshold value among the electrical component recognition results;

[0032] The low-confidence recognition result is verified based on a preset electrical knowledge base.

[0033] According to a second aspect of the present disclosure, there is provided an electrical component identification device, comprising:

[0034] An acquisition module, used for acquiring an image to be detected;

[0035] An identification module is used to input the image to be detected into a deep learning model to obtain an electrical component identification result output by the deep learning model;

[0036] In which, the deep learning model includes a region of interest (ROI) layer, and the ROI layer includes a curvature calculation unit and a curvature-sensitive ROI Align unit; the curvature calculation unit is used to calculate the arc curvature value within each recommended candidate box, and the ROI Align unit is used to determine the sampling points of the recommended candidate box according to the arc curvature value, so as to map each recommended candidate box into a target feature map of a fixed size based on the sampling points.

[0037] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for identifying an electrical component as described in the above embodiment is implemented.

[0038] According to the fourth aspect of an embodiment of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the electrical component identification method as in the above-mentioned embodiment.

[0039] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:

[0040] In the technical solutions provided in some embodiments of the present disclosure, a deep learning model is used to identify electrical components in the image to be detected, wherein the deep learning model includes a region of interest (ROI) layer, which adds the calculation of the arc curvature value, and then dynamically adjusts the sampling point distribution according to the arc curvature value, thereby enhancing the coverage of high curvature areas and improving the accuracy of electrical component identification.

[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0043] Figure 1 A schematic diagram schematically illustrates a flow chart of an electrical component identification method in an exemplary embodiment of the present disclosure;

[0044] Figure 2 A schematic diagram schematically illustrates an image to be detected in an exemplary embodiment of the present disclosure;

[0045] Figure 3 Schematically illustrates a structural diagram of a deep learning model in an exemplary embodiment of the present disclosure;

[0046] Figure 4 A schematic diagram schematically illustrates a flow chart of a method for calculating an arc curvature value in an exemplary embodiment of the present disclosure;

[0047] Figure 5 A schematic diagram schematically illustrates a flow chart of a method for determining sampling points in an exemplary embodiment of the present disclosure;

[0048] Figure 6 A schematic diagram schematically illustrates a flow chart of a method for determining a target feature map in an exemplary embodiment of the present disclosure;

[0049] Figure 7 The following schematically shows the composition of an electrical component identification device in an exemplary embodiment of the present disclosure;

[0050] Figure 8 The following schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0051] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0052] In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present disclosure.

[0053] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0054] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0055] The implementation details of the technical solution of the embodiment of the present disclosure are described in detail below.

[0056] Figure 1 The following schematically illustrates a flow chart of an electrical component identification method in an exemplary embodiment of the present disclosure. Figure 1 As shown, the electrical component identification method includes steps S101 to S102:

[0057] Step S101, obtaining an image to be detected;

[0058] Step S102: input the image to be detected into a deep learning model to obtain an electrical component recognition result output by the deep learning model.

[0059] In the technical solutions provided in some embodiments of the present disclosure, a deep learning model is used to identify electrical components in the image to be detected, wherein the deep learning model includes a region of interest (ROI) layer, which adds the calculation of the arc curvature value, and then dynamically adjusts the sampling point distribution according to the arc curvature value, thereby enhancing the coverage of high curvature areas and improving the accuracy of electrical component identification.

[0060] Below, each step of the electrical component identification method in this exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.

[0061] In step S101, an image to be detected is acquired.

[0062] Specifically, the image to be inspected is an image including graphic element information in an electrical drawing. Figure 2 A schematic diagram schematically illustrates an image to be detected in an exemplary embodiment of the present disclosure.

[0063] In step S102, the image to be detected is input into a deep learning model to obtain an electrical component recognition result output by the deep learning model.

[0064] Figure 3 The following schematically shows a structural diagram of a deep learning model in an exemplary embodiment of the present disclosure. Figure 3 As shown, the deep learning model is Mask RCNN, and its structure is:

[0065] The backbone network Backbone layer is used to extract features from the image to be detected and obtain an initial feature map;

[0066] A region proposal network (RPN) layer is used to generate a recommended candidate box based on the initial feature map;

[0067] A region of interest (ROI) layer is used to map each of the recommended candidate boxes into a target feature map of a fixed size;

[0068] A classifier and regression layer, configured to output the position and category of the recommended candidate box according to the target feature map;

[0069] The fully convolutional network layer (FCN) is used to predict the confidence corresponding to each category of the recommended candidate box to obtain the electrical component recognition result.

[0070] Each part of the deep learning model is explained in detail below.

[0071] The backbone layer includes a preprocessing unit and a backbone network feature extraction unit. The preprocessing unit is used to convert the image to be detected into a target image of a preset size, for example, converting an image of size P*Q into an image of size M*N, and then feeding this image into the backbone network feature extraction unit. The backbone network feature extraction unit is used to extract the image features of the target image using the backbone network FPN (Feature Pyramid Network) to obtain initial feature maps. The backbone network includes 13 conv layers, 13 relu layers, and 4 pooling layers. The output initial feature maps are shared with the subsequent RPN layer and ROI layer.

[0072] The RPN layer consists of the first convolutional unit, the second convolutional unit, and the third convolutional unit. The first convolutional unit is used to perform semantic feature enhancement on the initial feature map to obtain the first feature map. The size of the first convolutional unit is 3*3, and then it is sent to the second and third convolutional units. The second convolutional unit is used to perform binary classification on the first feature map. After the softmax activation function is used, the binary classification result of whether the recommended candidate box contains an object is output. The size of the second convolutional unit is 1*1*18. The third convolutional unit is used to perform bounding box regression on the first feature map to obtain the bounding box of the recommended candidate box. The size of the third convolutional unit is 1*1*36.

[0073] The ROI layer combines information such as image scale and adds arc curvature calculation to enhance the extraction of symbolic features such as arcs. Ultimately, each proposed candidate box is mapped to a fixed-size target feature map (proposal feature maps). The ROI layer includes a curvature calculation unit and a curvature-sensitive ROI Align unit. The curvature calculation unit calculates the arc curvature value within each proposed candidate box; the ROI Align unit determines the sampling points of the proposed candidate box based on the arc curvature value, and then maps each proposed candidate box to a fixed-size target feature map based on the sampling points.

[0074] Figure 4 The following schematically illustrates a flow chart of a method for calculating the curvature value of an arc in an exemplary embodiment of the present disclosure. Figure 4 As shown, the calculation of the arc curvature value within each recommended candidate box includes:

[0075] Step S401, extracting a sequence of edge points within the recommended candidate frame;

[0076] Step S402, calculating an initial arc curvature value based on the edge point sequence;

[0077] Step S403: normalize the initial arc curvature value to obtain the arc curvature value.

[0078] Specifically, the Canny algorithm can be used to extract the edge point sequence P from the binary mask. i =(x i ,y i )}, and then the curvature is calculated using the three-point method, as follows:

[0079]

[0080] Among them, p i =(x i ,y i ) is the coordinate of the i-th point in the edge point sequence, pi+1 and p i-1 The local curvature is calculated by constructing three points for the adjacent edge point before and after the point.

[0081] Finally, the curvature is normalized to obtain the final arc curvature value, as follows:

[0082]

[0083] Among them, min(k) is the minimum k value and max(k) is the maximum k value.

[0084] Figure 5 The following schematically illustrates a flow chart of a method for determining sampling points in an exemplary embodiment of the present disclosure. Figure 5 As shown, determining the sampling points of the recommended candidate box according to the arc curvature value includes:

[0085] Step S501, generating initial sampling points of the recommended candidate box based on initial grid parameters;

[0086] Step S502: calculating the curvature offset of each of the initial sampling points based on the arc curvature value to obtain a total curvature offset corresponding to the recommended candidate box;

[0087] Step S503: Adjust the initial sampling point according to the total amount of curvature offset to obtain the sampling point.

[0088] Specifically, the basic grid is generated first, and the k×k uniform grid points G are initialized. base ={g jk} (such as a 7×7 grid), which is the initial sampling point.

[0089] Then for each grid point g jk , calculate the curvature offset, and then sum the curvature offsets of all grid points to get the total curvature offset corresponding to the recommended candidate box, as follows:

[0090]

[0091] in, g jk The curvature value of the arc at is the distance from the grid point g jk The nearest edge point p n The tangent direction at (calculated by the edge point sequence), α is a learnable parameter that is automatically adjusted by the gradient back propagation of the loss function.

[0092] Then adjust the initial sampling point as follows:

[0093] G adjusted =Gbase +ΔG (4)

[0094] In this way, the adjusted sampling points gather towards the high curvature area, sampling more densely near the arc, and maintaining a uniform distribution in the straight part.

[0095] Figure 6 A schematic diagram of a process for determining a target feature map in an exemplary embodiment of the present disclosure is shown schematically. Figure 6 As shown, mapping each of the recommended candidate boxes to a target feature map of a fixed size based on the sampling points includes:

[0096] Step S601, determining four pixel points adjacent to the sampling point;

[0097] Step S602, determining the curvature weight of each pixel point based on the sampling point and the position of each pixel point;

[0098] Step S603 , calculating the target feature value of the sampling point according to the curvature influence factor, the curvature weight, the arc curvature value, and the initial feature value of each pixel point to obtain the target feature map.

[0099] Specifically, when performing feature map interpolation, the features are aggregated and optimized. When performing feature map interpolation on each sampling point g, the curvature weight is added, and the target feature value of the point is calculated to obtain a target feature map of a fixed size, as follows:

[0100]

[0101] Where Q(g) is the four pixel points adjacent to the sampling point g, w q is the curvature weight of bilinear interpolation, which is determined by the position of the sampling point g and the pixel point, β is the curvature influence factor, and F(q) is the initial eigenvalue of the initial feature map at position q.

[0102] The classifier and regression layer is used to output the location and category of the recommended candidate box based on the target feature map. This part outputs the location (Coordinates) and specific category (Category) of the recommended candidate box based on the feature map output by the ROI pooling layer through the fully connected layer. It should be noted that the identified category may be one or more.

[0103] The fully convolutional network (FCN) layer is used to predict the confidence level for each category in the recommended candidate box to obtain the electrical component recognition result. This layer includes some basic convolution and transposed convolution. This structure predicts a score for each category of each pixel and finally uses softmax to obtain the probability of each category, which is the confidence level.

[0104] In one embodiment of the present disclosure, the method further includes: configuring the Anchor ratio parameters of the deep learning model; the Anchor ratio parameters are 1:1.5, 1:3, and 2.5:1.

[0105] Specifically, anchors are an important mechanism in RPN, used to generate recommended candidate boxes of different scales and aspect ratios. Existing Mask RCNNs typically use anchor ratios of 1:1, 1:2, and 2:1. However, electrical symbols have domain-specific size distribution characteristics. For example, switch symbols are mostly square (1:1), while busbar symbols are mostly long bars (5:1). This leads to two problems: first, small symbols are missed because the default minimum anchor size cannot match tiny symbols; second, large symbols are misdetected because long bars are easily split into multiple anchor boxes.

[0106] Therefore, in order to improve the recognition accuracy of electrical components, the Anchor ratio parameters are adjusted in this application. First, the symbol size is extracted, and the minimum enclosing rectangle of all symbols is extracted using OpenCV, and the aspect ratio is calculated, r = w / h, retaining r ≥ 1, and the inversion is handled symmetrically; then cluster analysis is performed, and K-means clustering is performed on the aspect ratio. The output cluster centers are 1:1.5, 1:3, and 2.5:1, and the Anchorr ratio parameters are set accordingly. Therefore, the size classification strategy of Anchorr in this application, S Anchor =S base ×2 i / 3 , i=0,1,2,S base The base size.

[0107] In one embodiment of the present disclosure, after obtaining the electrical component identification result, the method further includes:

[0108] Obtaining a low-confidence recognition result having a confidence level less than a preset threshold value among the electrical component recognition results;

[0109] The low-confidence recognition result is verified based on a preset electrical knowledge base.

[0110] Specifically, low-confidence recognition results can be re-verified using an electrical knowledge base. This pre-built knowledge base includes a knowledge graph of the electrical field, including symbol names, standard graphics, parameter constraints, and more, from which multiple electrical rules can be constructed.

[0111] For example, if there is a low-confidence recognition result in the electrical component identification results, that is, the electrical component is A and is connected to B, but according to the electrical rules in the electrical knowledge base, it is known that B cannot be connected to A, then the recognition result of A is wrong. At this time, a reminder message can also be generated and manual correction can be made, thus completing the confidence-rule dual verification module.

[0112] Based on the above method, on the one hand, the curvature parameter of rate modeling is added to ROI Align. The improved ROI Align can dynamically perceive geometric features and significantly improve the detection ability of complex shapes such as arcs and circles in electrical symbol recognition tasks. The parameter design takes into account both theoretical rigor and engineering practicality.

[0113] On the other hand, the anchor ratio is adjusted. Since electrical symbols have domain-specific size distribution characteristics, it can avoid missed detection of small symbols and false detection of large symbols.

[0114] On the other hand, based on the results of Mask RCNN component recognition, by constructing an electrical field knowledge base, low-confidence results are double-verified by graphic feature matching and electrical rules, realizing knowledge base-guided auxiliary error correction recognition, which can further improve the recognition accuracy of electrical components.

[0115] It should be noted that the applicant's experimental verification shows that the electrical component identification method provided by this disclosure can improve the accuracy of component recognition on electrical drawings from 90% to 98.6%, reduce the workload of manual review by 85%, and reduce the false detection rate from 5.2% to 1.2%. Furthermore, an ambiguous contactor symbol that was mistakenly identified as a circuit breaker can be corrected to a contactor through knowledge base matching.

[0116] Figure 7 The following schematically shows the composition of an electrical component identification device in an exemplary embodiment of the present disclosure. Figure 7 As shown, the electrical component identification device 700 may include an acquisition module 701 and an identification module 702.

[0117] An acquisition module 701 is used to acquire an image to be detected;

[0118] The recognition module 702 is used to input the image to be detected into a deep learning model to obtain an electrical component recognition result output by the deep learning model;

[0119] In which, the deep learning model includes a region of interest (ROI) layer, and the ROI layer includes a curvature calculation unit and a curvature-sensitive ROI Align unit; the curvature calculation unit is used to calculate the arc curvature value within each recommended candidate box, and the ROI Align unit is used to determine the sampling points of the recommended candidate box according to the arc curvature value, so as to map each recommended candidate box into a target feature map of a fixed size based on the sampling points.

[0120] According to an exemplary embodiment of the present disclosure, the recognition module is further used to extract an edge point sequence within the recommended candidate frame; calculate an initial arc curvature value based on the edge point sequence; and normalize the initial arc curvature value to obtain the arc curvature value.

[0121] According to an exemplary embodiment of the present disclosure, the recognition module is further used to generate initial sampling points of the recommended candidate box based on initial grid parameters; calculate the curvature offset of each of the initial sampling points based on the arc curvature value to obtain the total curvature offset corresponding to the recommended candidate box; and adjust the initial sampling points according to the total curvature offset to obtain the sampling points.

[0122] According to an exemplary embodiment of the present disclosure, the recognition module is further used to determine four pixel points adjacent to the sampling point; determine the curvature weight of each pixel point based on the sampling point and the position of each pixel point; and calculate the target feature value of the sampling point based on the curvature influence factor, the curvature weight of each pixel point, the arc curvature value, and the initial feature value to obtain the target feature map.

[0123] According to an exemplary embodiment of the present disclosure, the deep learning model also includes: a backbone network Backbone layer, which is used to extract features of the image to be detected and obtain an initial feature map; a regional candidate network RPN layer, which is used to generate a recommended candidate box based on the initial feature map; a classifier and regression layer, which is used to output the position and category of the recommended candidate box according to the target feature map; a fully convolutional network layer FCN layer, which is used to predict the confidence corresponding to each category of the recommended candidate box to obtain the electrical component recognition result.

[0124] According to an exemplary embodiment of the present disclosure, the recognition module is further used to configure the Anchor ratio parameters of the deep learning model; the Anchor ratio parameters are 1:1.5, 1:3, and 2.5:1.

[0125] According to an exemplary embodiment of the present disclosure, the electrical component identification device 700 further includes a verification module for obtaining a low-confidence identification result in the electrical component identification result whose confidence is less than a preset threshold; and verifying the low-confidence identification result based on a preset electrical knowledge base.

[0126] The specific details of each module in the above-mentioned electrical component identification device 700 have been described in detail in the corresponding electrical component identification method, and therefore will not be repeated here.

[0127] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0128] In an exemplary embodiment of the present disclosure, a storage medium capable of implementing the above method is also provided. This storage medium may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0129] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. Figure 8 The following schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the present disclosure.

[0130] It should be noted that Figure 8 The computer system 800 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0131] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803. Various programs and data required for system operation are also stored in the RAM 803. The CPU 801, ROM 802 and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0132] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. Removable media 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that computer programs read therefrom can be installed into the storage section 808 as needed.

[0133] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from a removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, various functions defined in the system of the present disclosure are executed.

[0134] It should be noted that the computer-readable medium shown in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, and the units described may also be provided in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0137] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device implements the methods described in the above embodiments.

[0138] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0139] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0140] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0141] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for identifying electrical components, characterized in that: include: Obtain the image to be detected; Inputting the image to be detected into a deep learning model to obtain an electrical component recognition result output by the deep learning model; The deep learning model includes a region of interest (ROI) layer, and the ROI layer includes a curvature calculation unit and a curvature-sensitive ROI Align unit; The curvature calculation unit is used to calculate the arc curvature value within each recommended candidate frame, and the ROI Align unit is used to determine the sampling points of the recommended candidate frame according to the arc curvature value, so as to map each recommended candidate frame into a target feature map of a fixed size based on the sampling points.

2. The electrical component identification method according to claim 1, characterized in that: Calculating the arc curvature value within each recommended candidate frame includes: Extracting an edge point sequence within the recommended candidate frame; Calculating an initial arc curvature value based on the edge point sequence; The initial arc curvature value is normalized to obtain the arc curvature value.

3. The electrical component identification method according to claim 2, characterized in that: The determining of the sampling points of the recommended candidate box according to the arc curvature value includes: Generating initial sampling points of the recommended candidate box based on initial grid parameters; Calculating a curvature offset of each of the initial sampling points based on the arc curvature value to obtain a total curvature offset corresponding to the recommended candidate box; The initial sampling point is adjusted according to the total amount of curvature offset to obtain the sampling point.

4. The electrical component identification method according to claim 3, characterized in that: Mapping each of the recommended candidate boxes to a target feature map of a fixed size based on the sampling points includes: Determine four pixel points adjacent to the sampling point; Determining a curvature weight of each pixel point based on the sampling point and the position of each pixel point; The target feature value of the sampling point is calculated according to the curvature influence factor, the curvature weight, the arc curvature value, and the initial feature value of each pixel point to obtain the target feature map.

5. The electrical component identification method according to claim 1, characterized in that: The deep learning model also includes: The backbone network Backbone layer is used to extract features from the image to be detected and obtain an initial feature map; A region proposal network (RPN) layer is used to generate a recommended candidate box based on the initial feature map; A classifier and regression layer, configured to output the position and category of the recommended candidate box according to the target feature map; The fully convolutional network layer (FCN) is used to predict the confidence corresponding to each category of the recommended candidate box to obtain the electrical component recognition result.

6. The electrical component identification method according to claim 5, characterized in that: The method further comprises: Configure the Anchor ratio parameters of the deep learning model; the Anchor ratio parameters are 1:1.5, 1:3, and 2.5:

1.

7. The electrical component identification method according to claim 1, characterized in that: After obtaining the electrical component identification result, the method further includes: Obtaining a low-confidence recognition result having a confidence level less than a preset threshold value among the electrical component recognition results; The low-confidence recognition result is verified based on a preset electrical knowledge base.

8. An electrical component identification device, characterized in that: include: An acquisition module, used for acquiring an image to be detected; An identification module is used to input the image to be detected into a deep learning model to obtain an electrical component identification result output by the deep learning model; The deep learning model includes a region of interest (ROI) layer, and the ROI layer includes a curvature calculation unit and a curvature-sensitive ROI Align unit; The curvature calculation unit is used to calculate the arc curvature value within each recommended candidate frame, and the ROI Align unit is used to determine the sampling points of the recommended candidate frame according to the arc curvature value, so as to map each recommended candidate frame into a target feature map of a fixed size based on the sampling points.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electrical component identification method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the electrical component identification method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • PCB component detection method based on lightweight network

    CN112102242A

  • Corner point detection-based element identification and positioning method and system, and storage medium

    CN115511966A

  • Unmanned aerial vehicle environment adaptive obstacle avoidance method and system based on 5G technology and deep learning

    CN117148853A

  • Linear object segmentation method, device, equipment, medium and program product

    CN118968065A

  • Component defect detection method and device, electronic equipment and storage medium

    CN119048431A