CN115995086A - Identification method, equipment and storage medium for terminal strip drawing short-link primitive - Google Patents

Identification method, equipment and storage medium for terminal strip drawing short-link primitive Download PDF

Info

Publication number
CN115995086A
CN115995086A CN202211184805.7A CN202211184805A CN115995086A CN 115995086 A CN115995086 A CN 115995086A CN 202211184805 A CN202211184805 A CN 202211184805A CN 115995086 A CN115995086 A CN 115995086A
Authority
CN
China
Prior art keywords
terminal strip
terminal
short
area
row
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211184805.7A
Other languages
Chinese (zh)
Inventor
陈中
褚雪汝
谭林林
韩柳
李铁成
刘清泉
肖智宏
吴聪颖
闫培丽
冯腾
刘文轩
杜娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office
Southeast University
Electric Power Research Institute of State Grid Hebei Electric Power Co Ltd
Original Assignee
State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office
Southeast University
Electric Power Research Institute of State Grid Hebei Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office, Southeast University, Electric Power Research Institute of State Grid Hebei Electric Power Co Ltd filed Critical State Grid Economic And Technological Research Institute Co LtdB412 State Grid Office
Priority to CN202211184805.7A priority Critical patent/CN115995086A/en
Publication of CN115995086A publication Critical patent/CN115995086A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a method, equipment and storage medium for identifying a terminal strip drawing short-link primitive, and relates to the field of power grid automation system application. The identification method of the terminal strip drawing short-connection picture primitive identifies a terminal strip area in the terminal strip drawing; dividing a region containing two or more terminal rows; separating the divided terminal strip region into a terminal strip table region and a terminal strip connecting line region; identifying and outputting a table row relationship in the terminal row table area; cutting the terminal row table once every ten rows; taking the cut ten-row terminal row table diagram as a training set, dividing the short connecting sheet into head, body, tail parts, taking the short connecting sheet as a training set label, and training a dlp-yolov5 model; the method solves the problems that the prior method has higher requirement on the form of the primitive, is difficult to identify correctly with slight pixel variation, and has no robustness. And aiming at the problem that the short link patch is a small target primitive with changeable forms, no better solution exists at present.

Description

Identification method, equipment and storage medium for terminal strip drawing short-link primitive
Technical Field
The invention relates to the technical field of power grid automation system application, in particular to a method, equipment and storage medium for identifying short-link primitives of a terminal strip drawing.
Background
The wiring drawing of the electrical plant is used as the construction layout of the power plant and the transformer substation, an important engineering basis for maintaining and expanding, and is a valuable document asset of the power enterprise. The maintenance, modification and updating work of the traditional paper station wiring diagram mainly depends on the experience of on-site power dispatching personnel. Under the digital information environment, the big data analysis and computer image processing technology provides a new idea for the traditional drawing archive management mode: the drawings are digitized. The traditional method for detecting and identifying engineering drawings is mostly realized based on vector data format data sets, geometric primitives in the graphics are identified by adopting vectorization algorithms such as refinement, contour matching, zero-joint graphics, hough (Hough) transformation, orthogonal direction search and the like, and then element identification is constructed according to geometric constraints and topological relations. However, the drawing vectorization technology has great limitation in terms of noise pixel processing and curve image recognition, has poor robustness of feature extraction and is difficult to represent topological relations among various vectors. Therefore, the traditional drawing vectorization recognition technology is difficult to be applied to the terminal board wiring diagram of the electric station with higher image resolution, most of target graphic elements are small targets and various graphic element forms.
At present, a template matching method is mostly used for detecting drawing primitive symbols, but the method has higher requirements on primitive morphology, is difficult to identify correctly with slight pixel fluctuation, and has no robustness. And no better solution exists at present for identifying small target graphic elements with changeable shapes of short connection sheets.
Disclosure of Invention
(one) solving the technical problems
Aiming at the defects of the prior art, the invention provides a method, equipment and a storage medium for identifying the short-link primitive of the terminal strip drawing, which solve the problems that the prior method has higher requirements on the morphology of the primitive, is difficult to identify correctly with slight pixel variation and has no robustness. And aiming at the problem that the short link patch is a small target primitive with changeable forms, no better solution exists at present.
(II) technical scheme
In order to achieve the above purpose, the invention is realized by the following technical scheme: a recognition method of a terminal strip drawing short-link primitive comprises the following steps:
s1: identifying a terminal strip area in a terminal strip drawing;
s2: dividing a region containing two or more terminal rows;
s3: separating the divided terminal strip region into a terminal strip table region and a terminal strip connecting line region;
s4: identifying and outputting a table row relationship in the terminal row table area;
s5: cutting the terminal row table once every ten rows;
s6: taking the cut ten-row terminal row table diagram as a training set, dividing the short connecting sheet into head, body, tail parts, taking the short connecting sheet as a training set label, and training a dlp-yolov5 model;
s7: taking the table diagram of every ten rows of cut terminal rows as input, and sending the table diagram into a dlp-yolov5 model for prediction to obtain head, body, tail coordinate information relative to the cut diagram;
s8: and (3) carrying out coordinate reduction on the coordinate information of head, body, tail relative to the cutting graph for 4 times, then recovering the head, body and tail into a complete short patch, and outputting the coordinate information of the short patch in the terminal strip drawing.
Preferably, the first training set in the terminal strip area in the identification terminal strip drawing is an electrical plant station terminal strip drawing, the tag is a terminal strip area marked by a rectangular frame, the terminal strip area comprises more than one terminal strip, and the first training set is sent to a yolov5 network for training to obtain a part-yolov5 algorithm.
Preferably, the second training set in the segmentation of the area containing two or more terminal blocks is the terminal block area identified in the step S1, the tag is a terminal block marked by an irregular curve, the second training set is sent to the yolact network for training, and an irregular edge terminal block containing only one connected area is obtained, and white pixels are added through opencv to expand into a rectangle.
Preferably, the dividing the terminal strip area into the terminal strip table area and the terminal strip connecting line area is the terminal strip expanded into rectangle in the step S2, the tag is a rectangular labeled terminal strip table and connecting line, the third training set is sent to the yolov5 network to perform training, and a table_line-yolov5 algorithm is obtained, where the table_line-yolov5 algorithm is used to correctly identify the terminal strip table area and the connecting line area.
Preferably, the cutting the terminal strip table once every ten rows specifically includes:
designing a sliding cutting algorithm, and performing sliding cutting on every ten rows of the terminal row table identified in the step S3 according to the row-column relationship obtained in the step S4.
Preferably, the step S8 specifically includes:
firstly, carrying out coordinate reduction on the identification result obtained in the step S7, and reducing the first layer into a terminal row table identified by a table_line-yolov5 algorithm to obtain the coordinate information of a head, body and tail relative to the graph; the second layer is restored to a terminal strip diagram obtained by a yolact strength segmentation algorithm to obtain the coordinate information of head, body and tail relative to the diagram; the third layer is restored to a terminal strip area identified by a part-yolov5 algorithm to obtain coordinate information of head, body and tail relative to the graph; the fourth layer is restored to the terminal strip drawing to obtain absolute coordinate information of head, body and tail; and then recovering three types of head, body and tail to obtain the coordinate information of the complete short link in the terminal strip drawing.
In still another aspect, an electrical plant is provided, and the identification method of the terminal strip drawing short-patch primitive is used for identifying the terminal strip drawing short-patch primitive.
In yet another aspect, an apparatus is provided, the apparatus comprising:
one or more processors;
a memory for storing one or more programs,
and when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the identification method of the short-link primitives of the terminal strip drawing.
In yet another aspect, a computer readable storage medium storing a computer program is provided, where the program when executed by a processor implements the method for identifying a short-link primitive of a busbar.
(III) beneficial effects
The invention relates to a method, equipment and a storage medium for identifying a short-connection primitive of a terminal strip drawing, which are characterized in that firstly, detection and extraction of a terminal strip form in the terminal strip drawing are realized through a yolov 5-yoaction-yolov 5 three-layer deep learning algorithm; secondly, judging and outputting the row-column relationship of the terminal row form through an opencv image recognition algorithm; then, through carrying out sliding window cutting according to rows on the terminal strip table, the conversion from small target detection to large target detection is realized; then dividing the short link into three parts of head, body and tail, realizing the abstract of the short link characteristics, and solving the problem of diversification of target forms; and finally, accurately outputting the position and coordinate information of the short link in the terminal strip drawing through a yolov5 target detection algorithm, coordinate reduction and short link form recovery. The invention optimizes the identification problem of small target graphic primitives in the electrical drawing, breaks through the technical bottleneck of target detection algorithm on morphological diversified target identification, can realize the identification and positioning of the short-patch graphic primitives of the terminal strip drawing of the electrical plant, and provides technical support for the digitization of the electrical plant.
Drawings
FIG. 1 is a flow chart of an identification method of the present invention;
FIG. 2 is a schematic illustration of a terminal strip used in the present invention;
FIG. 3 is a schematic diagram of a terminal strip identified by the part-yolov5 algorithm and the yolat algorithm of the present invention;
FIG. 4 is a schematic diagram of a table_line-yolov5 algorithm split terminal row table and connecting lines according to the present invention;
FIG. 5 is a schematic view of a ten-row sliding window cut terminal strip form of the present invention;
FIG. 6 is a schematic diagram of the invention for dividing short bursts into three categories, head, body, tail;
FIG. 7 is a graph of the results of the terminal strip region identified by the part-yolov5 algorithm of the present invention;
FIG. 8 is a graph of the results of a unique connected region terminal strip obtained by the yolact algorithm of the present invention;
FIG. 9 is a table_line-yolov5 algorithm-identified terminal row table and connection line region result diagram;
FIG. 10 is a graph of the result of the row and column relationship xml of the terminal strip table output by opencv;
FIG. 11 is a diagram showing the result of the coordinate reduction to the head, body, tail three types of positions of the terminal strip diagram and the position after the restoration to the short link;
fig. 12 is a graph of the result of the final output of the present invention of the coordinates information xml of the patch.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples
As shown in fig. 1-11, an embodiment of the present invention provides a method for identifying a short-link primitive of a terminal strip drawing, where the method includes the following steps:
s1, identifying a region containing a terminal strip in a terminal strip drawing by using a part-yolov5 target detection algorithm; it should be noted that, at present, no more suitable method is found to identify the terminal strip region of the terminal strip drawing, and the traditional image segmentation algorithm includes a threshold segmentation method, a watershed algorithm, a clustering algorithm and the like, but is not applicable to the identification of the drawing, and is often applied to the segmentation of contents such as photos and the like. The part-yolo algorithm is a target detection algorithm based on deep learning, and a large number of sample sets are marked and trained on a target area, namely a terminal strip area, so that the terminal strip area in a drawing for dividing the terminal strip can be accurately identified, and the method is suitable for image segmentation without obvious color contrast or area color block division and obvious foreground and background division of the drawing.
S2, dividing the area containing two or more terminal rows in S1 by using a yolact example division algorithm; it should be noted that, the method for dividing two or more terminal strip regions includes the conventional method, namely, an image contour detection algorithm, wherein the contour detection algorithm is to find the largest circumscribed rectangular frame of all connected patterns, and the added terminal strip region comprises a terminal strip region and an independent form region, wherein the terminal strip region is connected with the form region through a connecting line, and the terminal strip region and the independent form region are separated by the method, and the specific method is as follows: if the terminal strip region comprises two rectangular frames which are nested together, cutting smaller rectangular frames to realize the division of the terminal strip region. However, the application scene of the method is limited, and if the region to be segmented comprises two or more connecting lines and a single-communication region of the table region and the regions are nested in a concave-convex manner, the detected maximum circumscribed rectangular frame is overlapped and cannot be separated when the contour detection is performed. If the yolact algorithm is used for marking and training, the target can be extracted strictly according to the edge of the communication area, judgment by additional conditions is not needed, and the method is suitable for all terminal strip area conditions and has robustness.
S3, using a table_line-yolov5 algorithm to separate the terminal strip after the S2 segmentation into a terminal strip table area and a terminal strip connecting line area; it should be noted that, at present, it is not found that the other algorithms can segment the connected connection line area and the form area, because for the image processing algorithm, the characteristics of the image to be identified are not clear, such as color, front background, pixels, etc., and if the image is identified through contour detection, the two are connected, and cannot be separated. Only through labeling training on the target 1, the connecting line area and the target 2, the table area, a corresponding detection result is obtained, and separation and cutting are carried out according to coordinates.
S4, identifying and outputting a table row-column relationship of the terminal strip table area in the S3 by using opencv; it should be noted that, the recognition of the table row-column relationship needs to recognize the horizontal and vertical lines of the table first, and only the function calling the horizontal and vertical line detection in opencv can be recognized at present. And finally determining the row-column relationship and the cell coordinates of the table area through transverse and vertical line intersection positioning, cell construction, row relationship judgment and father-son relationship correction.
S5, designing a sliding window cutting algorithm according to rows, and cutting every ten rows of the terminal strip table in the S3; it should be noted that, the ten-row cutting is a dynamic adaptive sliding window cutting, and the step size and the width of each cutting window are determined by row and column information of the table, so that the window size and the step size can be adaptively adjusted. The traditional sliding window cutting is a static sliding window cutting, and a fixed cutting window and a fixed step size are selected. Ten-row sliding window cutting has the advantages compared with fixed window step cutting: ten rows of sliding window cutting can reserve complete short-link parts, the short-link parts to be identified can not be cut into new and scattered short-link fragments which can not be identified, and a necessary premise is created for subsequent short-link identification.
S6, taking the 10 rows of terminal row table pictures cut in the S5 as a training set, dividing the short connecting piece into three parts of head, body and tail, taking the short connecting piece as a training set label, and training a dlp-yolov5 model. It should be noted that the target detection algorithm has DBnet in addition to yolo, but DBnet is a binary target detection, only one target can be judged to be or not, and three kinds of targets cannot be detected. Meanwhile, the dlp-yolov5 model divides the short link into three detection target parts with fixed characteristics, the accuracy of the recognition result is up to 99%, and the algorithm taking the whole short link as a detection target cannot recognize the correct result because the short link is different in form and length, the characteristics cannot be learned, and the recognition cannot be performed in the table of the ten-row cutting chart, because the complete short link is not included, the recognition can only be performed in the complete table chart, and the recognition rate is extremely low.
And S7, taking the 10 rows of terminal row table pictures cut in the S5 as input, and sending the 10 rows of terminal row table pictures into a dlp-yolov5 model for prediction to obtain coordinate information of head, body and tail relative to the cutting pictures.
And S8, carrying out coordinate reduction on the coordinate result of the step S7 for 4 times, then recovering the head, body and tail into a complete short patch, and outputting the coordinate information of the short patch in the terminal strip drawing. It should be noted that 4 times means that 4 times of cutting process of the picture is required before the short link is identified, the first time of cutting is performed through part-yolo for the original picture to obtain a terminal strip area diagram of a rectangular frame style, then the second time of cutting is performed on the rectangular terminal strip area through yolac to obtain a single communicated terminal strip area (only a single table area or all the table area and the connecting line area are communicated), then the third time of cutting is performed through a table_line-yolo algorithm to obtain an independent table area and a connecting line area, finally the 4 th time of cutting is performed on the independent table area according to one area of every ten rows of tables, and the short link is identified on the cutting diagram. The coordinate reduction is the reverse process, firstly, the initial short-link coordinate detected in every ten rows of tables is reduced to a complete terminal strip table area which is not cut according to ten rows, the first coordinate reduction is performed, then the coordinate of the terminal strip table area is reduced to a single-communication terminal strip area cut by yolac, the second coordinate reduction is performed, then the coordinate of the single-communication terminal strip area is reduced to a rectangular terminal strip area cut by part-yolo, the third coordinate reduction is performed, finally the coordinate is reduced to original picture paper, and the whole coordinate reduction process is completed, wherein the total time of the coordinate reduction is required to be reduced to the initial terminal strip drawing.
Preferably, the training set in S1 is an electrical plant terminal strip drawing, and the label is a terminal strip area marked with a rectangular frame (collectively, a terminal strip table and a connecting line area), which may include more than one terminal strip (i.e., two connected areas in the terminal strip area), as shown in fig. 3 with a large rectangular frame marked with numerals. When one terminal strip region includes two connected regions, matching of the connection relationship between the terminal strip table and the connection line is affected. And sending the training set into a yolov5 network for training to obtain a part-yolov5 algorithm. The algorithm can correctly identify the terminal strip region of the terminal strip drawing, and as shown in fig. 7, the region marked by the rectangular frame is the terminal strip region identified by the part-yolov5 algorithm.
Preferably, the training set in S2 is the terminal strip area identified in S1, and the tag is the terminal strip marked by an irregular curve, as shown by the irregular shaded area and the small rectangular shaded area in fig. 3. The training set is sent to a yolact network for training, an irregular edge terminal row which only comprises one communication area can be obtained through the algorithm, and white pixels are added through opencv to expand into a rectangle. The step can ensure that one terminal strip area is provided with only one terminal strip communication area, so that the subsequent connection relation judgment is facilitated, and as shown in fig. 8, the irregular shadow part area and the small rectangular shadow area are single communication terminal strip areas identified by a yolact algorithm.
Preferably, the training set in S3 is a terminal strip extended to be rectangular in S2, and the tag is a rectangular labeled terminal strip table and a connecting line. The training set is sent to a yolov5 network for training, so as to obtain a table_line-yolov5 algorithm, the algorithm can correctly identify a terminal row table area and a connecting line area, as shown in fig. 4, each area has only one terminal row table or connecting line, the identification of row-column relations and graphic elements in the table and the judgment of connection relations of horizontal lines and vertical lines of the connecting lines are facilitated, as shown in fig. 9, the marked position of a rectangular frame is the table and the connecting line area identified by the table_line-yolov5 algorithm, and each area has only one terminal row table or connecting line.
Preferably, in the step S4, the opencv is used to identify and output the Row-column relationship of the terminal Row table obtained in the step S3, as shown in the rectangular box label in fig. 10, row_col= [1,1] represents the first column of the first Row of the table, and the columns are ordered from right to left.
Preferably, in the step S5, an algorithm of sliding cutting according to rows is designed, according to the row-column relationship obtained in the step S4, every ten rows of the terminal row table identified in the step S3 are sliding cut, the size of the sliding window is 10 rows of the length and width of the table, ten rows of cutting diagrams are obtained, and as shown in fig. 5, ten rows of cutting according to ten rows are sufficient, and less than ten rows of cutting according to actual rows are performed.
Preferably, the training set in S6 is the ten-row cutting chart obtained in S5, and the labels are three types of dividing the short link into head, body and tail, as shown in fig. 6. The reason why the types of tabs are divided into three is that the tabs are different in form, that is, the tabs are different in length, and there are tabs that occupy thirty-forty rows of the table, that is, tabs that occupy two rows, which makes it difficult for yolo to learn the characteristics of the object. Thus, the short link is divided into three types, and as can be seen from fig. 6, three small primitives of head, body and tail have fixed single characteristics, which greatly helps training and learning of yolo networks. And sending the training set into a yolov5 network for training to obtain a dlp-yolov5 model.
Preferably, in the step S7, the ten rows of cutting graphs obtained in the step S5 are sent to a dlp-yolov5 model trained in the step S6, so as to obtain coordinate information of three targets, namely a head, a body and a tail. The coordinates at this time are coordinates with respect to the ten-line cut drawing, and are not coordinates of the true terminal strip drawing.
Preferably, in S8, the coordinate reduction is performed on the recognition result obtained in S7. The first layer is restored to a terminal row table identified by a table_line-yolov5 algorithm to obtain coordinate information of head, body and tail relative to the graph; the second layer is restored to a terminal strip diagram obtained by a yolact strength segmentation algorithm to obtain the coordinate information of head, body and tail relative to the diagram; the third layer is restored to a terminal strip area identified by a part-yolov5 algorithm to obtain coordinate information of head, body and tail relative to the graph; and the fourth layer is restored to the terminal strip drawing to obtain absolute coordinate information of head, body and tail. For convenience of illustration, the area of the terminal strip table shown in fig. 11 is taken as a typical area, and as shown in fig. 11 (a), it can be seen that the small rectangular box in the unit cell is the head, body, tail position in the original terminal strip diagram. The code for coordinate reduction is as follows:
Figure BDA0003867042240000091
Figure BDA0003867042240000101
the code is then marked from top to bottom:
1. defining a coordinate reduction function, wherein the input parameters are the coordinate information of a point at the upper left corner of the layer in the upper layer and the coordinate information of the primitive in the layer;
2. calculating the upper left corner X coordinate;
3. calculating the Y coordinate of the upper left corner;
4. calculating the X coordinate of the lower right angle;
5. calculating Y coordinates of a lower right angle;
6. integrating coordinates after the primitive coordinates are restored;
7. returning coordinate information after coordinate restoration;
8. initializing coordinate information of a point at the upper left corner of the layer in the upper layer;
9. initializing coordinate information of the graphic element in the layer;
10. and calling a coordinate reduction function to output a coordinate reduction result.
And then recovering three types of head, body and tail to obtain the coordinate information of the complete short link in the terminal strip drawing. The short patch recovery code is as follows, and the main function is to read the related information of three types of head, body and tail from xml of the initial result, and then, according to the same abscissa range, two continuous heads are formed on the ordinate, and the tail is a logic of a complete short patch, as shown in fig. 11 (b), it can be seen that the rectangular frame in the unit cell is the position of the complete short patch in the terminal strip drawing. Fig. 12 shows information of the short link corresponding to the region in the final result xml. Recovering the short link:
Figure BDA0003867042240000102
/>
Figure BDA0003867042240000111
labeling the codes from top to bottom:
1. defining a blank short-link array
2. The length of the data extracted from the cyclic short patch XML is the data length of 'ID' in the data
3. Adding [ index, coordinate information ] into the short-link array
4. Sequencing from small to large according to Y coordinate of upper left corner of short connecting piece
5. Creating short patch dictionary variables
6. Initialization key= 'iconename'
7. Initialization key= 'PartID'
8. Initialization key= 'area id'
9. Initialization key= 'icondid'
10. Initialization key= 'XYXY'
11. Initialization key= 'ID'
12. Initialization key= 'id'
13. Define variable i and initialize to 0
14. All the time loops when i is smaller than the array length of the short burst
15. Defining variable j as the first element in the current element of the array of bursts, i.e. the index value of the original data burst
16. Defining the variable k as the index value of the first element in the next adjacent element of the array of bursts, namely the original data burst
17. Assigning 'shortmonneictedpiece' to the short patch dictionary variable key= 'iconename'
18. Assigning a value of key= ' part id ' in dictionary data extracted from short-patch XML to a short-patch dictionary variable key= ' part id
19. Assigning a value of key= ' area id ' in dictionary data extracted from short-patch XML to a short-patch dictionary variable key= ' area id
20. Assigning a value of key= 'icondid' in dictionary data extracted from short-patch XML to a short-patch dictionary variable key= 'icondid'
21. The dictionary variable key of the short patch is assigned with key= 'XYXY', and the coordinates of the upper left corner of the current index and the coordinates of the lower right corner of the next index of the key= 'XYXY' in dictionary data extracted from the short patch XML can restore the head and tail of the short patch into a complete short patch
22. Assigning a value of key= ' ID ' in dictionary data extracted from short-patch XML to a short-patch dictionary variable key= ' ID
23. The index jumps to the position of plus 2, the next head part
24. Looping with the length of the short patch dictionary key=' XYXY
25. The short-patch dictionary variable key= 'id' is given a value of key= 'part id' plus key= 'area id' in the short-patch dictionary variable XML.
Firstly, detecting and extracting a terminal strip form in a terminal strip drawing through a yolov5-yolact-yolov5 three-layer deep learning algorithm; secondly, judging and outputting the row-column relationship of the terminal row form through an opencv image recognition algorithm; then, through carrying out sliding window cutting according to rows on the terminal strip table, the conversion from small target detection to large target detection is realized; then dividing the short link into three parts of head, body and tail, realizing the abstract of the short link characteristics, and solving the problem of diversification of target forms; and finally, accurately outputting the position and coordinate information of the short link in the terminal strip drawing through a yolov5 target detection algorithm, coordinate reduction and short link form recovery.
As still another embodiment of the present invention, an electrical plant is provided, where the identification method of the terminal strip drawing short-patch primitive in the above embodiment is used to identify the terminal strip drawing short-patch primitive.
As still another embodiment of the present invention, there is provided an apparatus including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform a method for identifying a terminal strip drawing short patch primitive in the above embodiment.
As still another embodiment of the present invention, there is provided a computer-readable storage medium storing a computer program, wherein the program when executed by a processor implements a method for identifying a terminal strip drawing short-link primitive in the above embodiment.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. The identification method of the terminal strip drawing short-connection picture element is characterized by comprising the following steps of:
s1: identifying a terminal strip area in a terminal strip drawing;
s2: dividing a region containing two or more terminal rows;
s3: separating the divided terminal strip region into a terminal strip table region and a terminal strip connecting line region;
s4: identifying and outputting a table row relationship in the terminal row table area;
s5: cutting the terminal row table once every ten rows;
s6: taking the cut ten-row terminal row table diagram as a training set, dividing the short connecting sheet into head, body, tail parts, taking the short connecting sheet as a training set label, and training a dlp-yolov5 model;
s7: taking the table diagram of every ten rows of cut terminal rows as input, and sending the table diagram into a dlp-yolov5 model for prediction to obtain head, body, tail coordinate information relative to the cut diagram;
s8: and (3) carrying out coordinate reduction on the coordinate information of head, body, tail relative to the cutting graph for 4 times, then recovering the head, body and tail into a complete short patch, and outputting the coordinate information of the short patch in the terminal strip drawing.
2. The method for identifying the short-link primitive of the terminal strip drawing according to claim 1, wherein the method comprises the following steps: the first training set in the terminal strip area in the identification terminal strip drawing is an electrical plant station terminal strip drawing, the tag is a terminal strip area marked by a rectangular frame, the terminal strip area comprises more than one terminal strip, and the first training set is sent to a yolov5 network for training to obtain a part-yolov5 algorithm.
3. The method for identifying the short-link primitive of the terminal strip drawing according to claim 2, wherein the method comprises the following steps of: and (2) taking a second training set containing two or more terminal strip areas in segmentation as the terminal strip area identified in the step (S1), taking a terminal strip marked by an irregular curve as a label, sending the second training set into a yolact network for training to obtain an irregular edge terminal strip only containing one communication area, and adding white pixels through opencv to expand into a rectangle.
4. The method for identifying the short-tab primitives of the terminal strip drawing according to claim 3, wherein the method comprises the following steps of: and the third training set in the terminal strip table area and the terminal strip connecting line area after being separated is the terminal strip expanded into rectangle in the step S2, the label is a rectangular marked terminal strip table and connecting line, the third training set is sent to a yolov5 network for training, a table_line-yolov5 algorithm is obtained, and the table_line-yolov5 algorithm is used for correctly identifying the terminal strip table area and the terminal strip connecting line area.
5. The method for identifying the short-tab primitives of the terminal strip drawing according to claim 4, wherein the method comprises the following steps of: the cutting of the terminal row table once every ten rows is specifically as follows:
designing a sliding cutting algorithm, and performing sliding cutting on every ten rows of the terminal row table identified in the step S3 according to the row-column relationship obtained in the step S4.
6. The method for identifying the short-link primitive of the terminal strip drawing according to claim 1, wherein the method comprises the following steps: the step S8 specifically includes:
firstly, carrying out coordinate reduction on the identification result obtained in the step S7, and reducing the first layer into a terminal row table identified by a table_line-yolov5 algorithm to obtain the coordinate information of a head, body and tail relative to the graph; the second layer is restored to a terminal strip diagram obtained by a yolact strength segmentation algorithm to obtain the coordinate information of head, body and tail relative to the diagram; the third layer is restored to a terminal strip area identified by a part-yolov5 algorithm to obtain coordinate information of head, body and tail relative to the graph; the fourth layer is restored to the terminal strip drawing to obtain absolute coordinate information of head, body and tail; and then recovering three types of head, body and tail to obtain the coordinate information of the complete short link in the terminal strip drawing.
7. An apparatus, the apparatus comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform a method of identifying a terminal strip drawing shorting sheet primitive as recited in any one of claims 1-6.
8. A computer-readable storage medium storing a computer program, wherein the program when executed by a processor implements a method for identifying a terminal strip drawing short patch primitive as claimed in any one of claims 1 to 6.
CN202211184805.7A 2022-09-27 2022-09-27 Identification method, equipment and storage medium for terminal strip drawing short-link primitive Pending CN115995086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211184805.7A CN115995086A (en) 2022-09-27 2022-09-27 Identification method, equipment and storage medium for terminal strip drawing short-link primitive

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211184805.7A CN115995086A (en) 2022-09-27 2022-09-27 Identification method, equipment and storage medium for terminal strip drawing short-link primitive

Publications (1)

Publication Number Publication Date
CN115995086A true CN115995086A (en) 2023-04-21

Family

ID=85993145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211184805.7A Pending CN115995086A (en) 2022-09-27 2022-09-27 Identification method, equipment and storage medium for terminal strip drawing short-link primitive

Country Status (1)

Country Link
CN (1) CN115995086A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310765A (en) * 2023-05-23 2023-06-23 华雁智能科技(集团)股份有限公司 Electrical wiring graphic primitive identification method
CN117611710A (en) * 2023-12-07 2024-02-27 南京云阶电力科技有限公司 Terminal strip drawing vectorization method and system based on deep learning and image processing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310765A (en) * 2023-05-23 2023-06-23 华雁智能科技(集团)股份有限公司 Electrical wiring graphic primitive identification method
CN116310765B (en) * 2023-05-23 2023-09-01 华雁智能科技(集团)股份有限公司 Electrical wiring graphic primitive identification method
CN117611710A (en) * 2023-12-07 2024-02-27 南京云阶电力科技有限公司 Terminal strip drawing vectorization method and system based on deep learning and image processing

Similar Documents

Publication Publication Date Title
CN109389121B (en) Nameplate identification method and system based on deep learning
CN115995086A (en) Identification method, equipment and storage medium for terminal strip drawing short-link primitive
CN110766008A (en) Text detection method facing any direction and shape
CN109753953B (en) Method and device for positioning text in image, electronic equipment and storage medium
CN109726628A (en) A kind of recognition methods and system of form image
CN111860348A (en) Deep learning-based weak supervision power drawing OCR recognition method
CN110598698B (en) Natural scene text detection method and system based on adaptive regional suggestion network
CN111680690A (en) Character recognition method and device
CN110942004A (en) Handwriting recognition method and device based on neural network model and electronic equipment
CN111626145B (en) Simple and effective incomplete form identification and page-crossing splicing method
CN114155527A (en) Scene text recognition method and device
CN111091167A (en) Mark recognition training data synthesis method and device, electronic equipment and storage medium
CN115063802A (en) PSENet-based circular seal identification method, device and medium
CN113095267A (en) Data extraction method of statistical chart, electronic device and storage medium
CN115392188A (en) Method and device for generating editable document based on non-editable image-text images
CN109508716B (en) Image character positioning method and device
CN110633635A (en) ROI-based traffic sign board real-time detection method and system
CN113780276A (en) Text detection and identification method and system combined with text classification
CN111832497B (en) Text detection post-processing method based on geometric features
CN111079749B (en) End-to-end commodity price tag character recognition method and system with gesture correction
CN116993985A (en) Method for realizing Zero-Shot automatic cutting of safety belt based on CLIP
CN110046618B (en) License plate recognition method based on machine learning and maximum extremum stable region
CN113743159A (en) OCR method applied to power enterprises
CN116030472A (en) Text coordinate determining method and device
CN115797939A (en) Two-stage italic character recognition method and device based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination