Method, device, equipment and medium for identifying graphic elements of power grid plant wiring diagram

Through the improved YOLOV5 target detection network, the problem of low accuracy in the recognition of graphics elements in the power grid wiring diagram was solved, especially the detection of large aspect ratio and small target graphics, achieving higher recognition accuracy and stability.

CN120472494BActive Publication Date: 2025-09-16HUAYAN INTELLIGENT TECH (GRP) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510947731.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-16
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

Traditional methods for recognizing power grid wiring diagrams rely on manual recognition, which is labor-intensive and error-prone. Existing target detection algorithms are not very accurate in identifying graphic elements, especially those with large aspect ratios and small targets.

Method used

An improved YOLOV5 target detection network is adopted, including an improved backbone network, a feature fusion network and a decoupled detection head. The accuracy of primitive recognition is improved through the spatial attention convolution module, the orthogonal convolution C3 module, the feature alignment upsampling module and the decoupled detection head.

Benefits of technology

The detection accuracy of graphics elements in power grid plant wiring diagrams is improved, especially the recognition accuracy of graphics elements with large aspect ratios and small targets, which reduces the influence of feature misalignment and enhances the stability and generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472494B_ABST
    Figure CN120472494B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a method, device, equipment, and medium for identifying graphic elements in a power grid plant wiring diagram. The method comprises: collecting the power grid plant wiring diagram, pre-processing the power grid plant wiring diagram, and obtaining an original input image; inputting the original input image into an improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network comprises an improved backbone network, an improved feature fusion network, and an improved decoupling detection head; extracting feature information of the original input image through the improved backbone network to obtain feature maps of multiple feature layers of different scales; fusing feature maps of feature layers of different scales through the improved feature fusion network to obtain multiple fused feature maps; and identifying each fused feature map through the improved decoupling detection head to obtain a graphic element recognition result. The present application proposes an improved YOLOV5 target detection network, which improves the detection accuracy of graphic elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for identifying graphic elements in a power grid plant wiring diagram. Background Art

[0002] Traditional power grid wiring diagrams require operators to manually identify and draw them with reference to design drawings, a labor-intensive and error-prone process. Automatic wiring diagram recognition, replacing manual identification, has become a hot topic in industry research. The three key components of power grid wiring diagrams that require recognition are: primitives, textual information, and connection topology. Of these three core components, primitive recognition is the primary task in automatic wiring diagram recognition and forms the foundation for subsequent connection topology identification. Primitive recognition is a typical object detection task in computer vision.

[0003] Currently, a variety of deep learning-based object detection algorithms have been proposed. However, directly using traditional object detection algorithms to solve the problem of power station wiring diagram recognition still suffers from low detection accuracy of graphic elements. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, computer equipment and readable storage medium for identifying graphic elements in a power grid plant wiring diagram.

[0005] The present invention provides the following technical solutions:

[0006] In a first aspect, the present invention provides a method for identifying graphic elements in a power grid plant wiring diagram, the method comprising:

[0007] collecting a power grid plant wiring diagram, and preprocessing the power grid plant wiring diagram to obtain an original input image;

[0008] Inputting the original input image into an improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network and an improved decoupling detection head, the improved backbone network includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules and a spatial pyramid pooling module, the improved feature fusion network includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules, multiple splicing modules and multiple feature alignment upsampling modules, and the improved decoupling detection head includes a first detection head, a second detection head and a third detection head;

[0009] Extracting feature information of the original input image through the improved backbone network to obtain multiple feature maps of feature layers at different scales;

[0010] fusing the feature maps of the feature layers at different scales through the improved feature fusion network to obtain a plurality of fused feature maps;

[0011] The improved decoupling detection head is used to identify each of the fused feature maps to obtain a primitive recognition result.

[0012] In an optional embodiment, the improved backbone network is composed of two of the spatial attention convolution modules, one of the orthogonal convolution C3 modules, one of the spatial attention convolution modules, one of the orthogonal convolution C3 modules, one of the spatial attention convolution modules, one of the orthogonal convolution C3 modules, one of the spatial attention convolution modules, one of the orthogonal convolution C3 modules, one of the spatial attention convolution modules, one of the orthogonal convolution C3 modules, and one of the spatial pyramid pooling modules in cascade;

[0013] The spatial attention convolution module is composed of a convolution layer, a batch normalization layer and a sigmoid linear unit activation function cascade in sequence, and the convolution layer includes a first convolution layer, a second convolution layer, a horizontal strip convolution layer and a vertical strip convolution layer;

[0014] The orthogonal convolution C3 module includes a main path, a slave path, a splicing module and the spatial attention convolution module. The main path is composed of a stack of the spatial attention convolution module and multiple orthogonal modules. The slave path is composed of a spatial attention convolution module. The main path and the slave path are spliced ​​through the splicing module and cascaded with a spatial attention convolution module. The orthogonal module is sequentially composed of a cascade of the first convolution layer, a horizontal strip convolution layer, a vertical strip convolution layer, a second convolution layer and an element-by-element multiplication module.

[0015] The spatial pyramid pooling module is composed of three cascaded maximum pooling layers in sequence.

[0016] In an optional embodiment, the feature information of the original input image is extracted by the improved backbone network to obtain multiple feature maps of feature layers at different scales, including:

[0017] Adjusting the size and number of channels of the original input image through the two spatial attention convolution modules to obtain a first adjusted image, and extracting feature information of the first adjusted image through the orthogonal convolution C3 module to obtain a first feature map;

[0018] Adjusting the size and number of channels of the first feature map through the spatial attention convolution module to obtain a second adjusted image, and extracting feature information of the second adjusted image through the orthogonal convolution C3 module to obtain a second feature map;

[0019] Adjusting the size and number of channels of the second feature map through the spatial attention convolution module to obtain a third adjusted image, and extracting feature information of the third adjusted image through the orthogonal convolution C3 module to obtain a third feature map;

[0020] Adjusting the size and the number of channels of the third feature map through the spatial attention convolution module to obtain a fourth adjusted image, and extracting feature information of the fourth adjusted image through the orthogonal convolution C3 module to obtain a fourth feature map;

[0021] Feature information of the fourth feature map is extracted through the spatial pyramid pooling module to obtain a fifth feature map.

[0022] In an optional embodiment, the improved feature fusion network is composed of a spatial attention convolution module, a feature alignment upsampling module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a feature alignment upsampling module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a splicing module and an orthogonal convolution C3 module in cascade;

[0023] The first spatial attention convolution module from front to back in the improved feature fusion network is respectively connected to the spatial pyramid pooling module in the improved backbone network and the fourth splicing module from front to back in the improved feature fusion network, the first splicing module from front to back in the improved feature fusion network is connected to the third orthogonal convolution C3 module from front to back in the improved backbone network, the second spatial attention convolution module from front to back in the improved feature fusion network is connected to the third splicing module from front to back in the improved feature fusion network, and the second splicing module from front to back in the improved feature fusion network is connected to the second orthogonal convolution C3 module from front to back in the improved backbone network;

[0024] The feature alignment upsampling module includes an upsampling submodule and a learnable tensor, and the upsampling submodule and the learnable tensor are combined via the element-by-element multiplication module.

[0025] In an optional embodiment, fusing the feature maps of the feature layers of different scales through the improved feature fusion network to obtain multiple fused feature maps includes:

[0026] Adjusting the size and the number of channels of the fifth feature map through the spatial attention convolution module to obtain a fifth adjusted image, and upsampling the fifth adjusted image through the feature alignment upsampling module to obtain a first upsampled image;

[0027] splicing the first upsampled image and the third feature map through the splicing module to obtain a first spliced ​​image, and extracting feature information of the first spliced ​​image through the orthogonal convolution C3 module to obtain a sixth feature map;

[0028] Adjusting the size and the number of channels of the sixth feature map through the spatial attention convolution module to obtain a sixth adjusted image, and upsampling the sixth adjusted image through the feature alignment upsampling module to obtain a second upsampled image;

[0029] splicing the second upsampled image and the second feature map through the splicing module to obtain a second spliced ​​image, and extracting feature information of the second spliced ​​image through the orthogonal convolution C3 module to obtain a seventh feature map;

[0030] Adjusting the size and the number of channels of the seventh feature map through the spatial attention convolution module to obtain a seventh adjusted image, stitching the seventh adjusted image and the sixth adjusted image through the stitching module to obtain a third stitched image, and extracting feature information of the third stitched image through the orthogonal convolution C3 module to obtain an eighth feature map;

[0031] The size and number of channels of the eighth feature map are adjusted by the spatial attention convolution module to obtain an eighth adjusted image, the eighth adjusted image and the fifth adjusted image are spliced ​​by the stitching module to obtain a fourth stitched image, and the feature information of the fourth stitched image is extracted by the orthogonal convolution C3 module to obtain a ninth feature map.

[0032] In an optional embodiment, the convolution layer further includes a third convolution layer, and the first detection head, the second detection head, and the third detection head each include one second convolution layer, an object classification branch, and a target box regression branch, the target classification branch is sequentially composed of two third convolution layers and one second convolution layer in cascade, and the target box regression branch is sequentially composed of one third convolution layer, one orthogonal module, and one second convolution layer in cascade;

[0033] The first detection head is connected to the second orthogonal convolution C3 module from front to back in the improved feature fusion network, the second detection head is connected to the third orthogonal convolution C3 module from front to back in the improved feature fusion network, and the third detection head is connected to the fourth orthogonal convolution C3 module from front to back in the improved feature fusion network.

[0034] In an optional embodiment, the identifying each of the fused feature maps by the improved decoupling detection head to obtain a primitive recognition result includes:

[0035] adjusting the number of channels of the seventh feature map through the second convolutional layer in the first detection head to obtain a ninth adjusted image, identifying primitive position information of the ninth adjusted image through the object classification branch in the first detection head, and identifying primitive category information of the ninth adjusted image through the object bounding box regression branch in the first detection head;

[0036] Adjusting the number of channels of the eighth feature map through the second convolutional layer in the second detection head to obtain a tenth adjusted image, identifying primitive position information of the tenth adjusted image through the object classification branch in the second detection head, and identifying primitive category information of the tenth adjusted image through the object bounding box regression branch in the second detection head;

[0037] The number of channels of the ninth feature map is adjusted through the second convolutional layer in the third detection head to obtain an eleventh adjusted image, the primitive position information of the eleventh adjusted image is identified through the target classification branch in the third detection head, and the primitive category information of the eleventh adjusted image is identified through the target box regression branch in the third detection head.

[0038] In a second aspect, the present invention provides a device for identifying graphic elements in a power grid plant wiring diagram, the device comprising:

[0039] An acquisition module is used to acquire a power grid plant wiring diagram, and pre-process the power grid plant wiring diagram to obtain an original input image;

[0040] An input module is used to input the original input image into an improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network and an improved decoupling detection head, the improved backbone network includes a spatial attention convolution module, an orthogonal convolution C3 module and a spatial pyramid pooling module, the improved feature fusion network includes the spatial attention convolution module, the orthogonal convolution C3 module, multiple splicing modules and a feature alignment upsampling module, and the improved decoupling detection head includes a first detection head, a second detection head and a third detection head;

[0041] An extraction module, configured to extract feature information of the original input image through the improved backbone network to obtain multiple feature maps of feature layers at different scales;

[0042] A fusion module, configured to fuse the feature maps of the feature layers of different scales through the improved feature fusion network to obtain a plurality of fused feature maps;

[0043] The recognition module is used to recognize each of the fused feature maps through the improved decoupling detection head to obtain a primitive recognition result.

[0044] In a third aspect, a computer device is provided in an embodiment of the present disclosure, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for identifying graphic elements in the power grid plant wiring diagram described in the first aspect are implemented.

[0045] In a fourth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying graphic elements of the power grid plant wiring diagram described in the first aspect are implemented.

[0046] The embodiment of the present application provides a method for recognizing graphic elements in a power grid plant wiring diagram, which improves the detection accuracy of graphic elements by proposing an improved YOLOV5 target detection network.

[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be considered as limiting the scope. A person of ordinary skill in the art can also derive other relevant drawings based on these drawings without inventive effort. Similar components are numbered similarly in the various drawings.

[0049] Figure 1 A flowchart of a method for identifying graphic elements in a power grid plant wiring diagram provided by an embodiment of the present application is shown;

[0050] Figure 2 A schematic diagram of the structure of an improved YOLOV5 target detection network provided in an embodiment of the present application is shown;

[0051] Figure 3 A schematic diagram of the structure of a spatial attention convolution module provided in an embodiment of the present application is shown;

[0052] Figure 4 A schematic diagram of the structure of an orthogonal convolution C3 module provided in an embodiment of the present application is shown;

[0053] Figure 5 A schematic structural diagram of a feature alignment upsampling module provided in an embodiment of the present application is shown;

[0054] Figure 6 A schematic structural diagram of a first detection head, a second detection head, and a third detection head provided in an embodiment of the present application is shown;

[0055] Figure 7 A structural schematic diagram of a graphic element recognition device for a power grid plant wiring diagram provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0056] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0057] Currently, a variety of deep learning-based object detection algorithms have been proposed, including single-stage algorithms like YOLO and two-stage algorithms like Faster-RCNN. However, directly using traditional object detection algorithms for substation wiring diagram recognition still presents a series of challenges. As shown in Table 1, significant image elements (such as circuit breakers, disconnect switches, and grounding switches) have large aspect ratios (greater than 3), and the vast majority of these elements occupy a very small proportion of the original image (less than 0.05), resulting in low detection accuracy.

[0058] Table 1 Statistics of the elements in a typical plant wiring diagram

[0059]

[0060] Example 1

[0061] In order to solve the above problems, Figure 1 As shown, the embodiment of the present application provides a flowchart of a method for identifying graphic elements of a power grid plant wiring diagram. The method for identifying graphic elements of a power grid plant wiring diagram provided by the embodiment of the present application includes the following steps:

[0062] Step S110 , collecting a power grid plant wiring diagram, and preprocessing the power grid plant wiring diagram to obtain an original input image.

[0063] In this embodiment, the power grid plant wiring diagram to be identified is first collected. Since the original power grid plant wiring diagram may have problems such as being too large in size and having too much noise, it is necessary to preprocess the power grid plant wiring diagram to obtain the original input image. This includes a series of preprocessing operations such as scaling, normalization, data enhancement, and removal of noise and redundant information. This embodiment will not go into details about this.

[0064] Through the image preprocessing step, data quality can be enhanced, and model performance, training stability, and generalization ability can be improved.

[0065] In step S120, the original input image is input into the improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network and an improved decoupling detection head, the improved backbone network includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules and spatial pyramid pooling modules, the improved feature fusion network includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules, multiple splicing modules and multiple feature alignment upsampling modules, and the improved decoupling detection head includes a first detection head, a second detection head and a third detection head.

[0066] Furthermore, the original input image is fed into Figure 2 The improved YOLOV5 target detection network shown is composed of Figure 2 It can be seen that the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network and an improved decoupled detection head.

[0067] like Figure 2 As shown in the figure, the improved backbone network in the first part is mainly used to extract the feature information of the original input image. It includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules and multiple spatial pyramid pooling modules. The specific structure is composed of two spatial attention convolution modules, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module and one spatial pyramid pooling module in cascade.

[0068] like Figure 3 Figure 2 shows the structure of the spatial attention convolution module, which consists of a cascade of a convolutional layer, a batch normalization layer (BatchNorm), and a sigmoid linear unit activation function. The spatial attention convolution module can adjust the downsampling factor or the number of output channels of the improved YOLOV5 object detection network by controlling parameters such as the convolution size k, convolution stride s, padding p, and the number of output channels c, thereby changing the size and number of channels of the original input image. For example, the original input image size is 640×640×3, and after passing through the first spatial attention convolution module, the size becomes 320×320×64.

[0069] This application proposes a new network structure by referring to an orthogonal large kernel strip convolution: the orthogonal convolution C3 module, such as Figure 4The figure shows a schematic diagram of the structure of the orthogonal convolution C3 module. By replacing the original YOLOV5 C3 network with the orthogonal convolution C3 module, the orthogonal convolution C3 module proposed in this application can better locate the primitives with large aspect ratios, thereby improving the detection accuracy of primitives with large aspect ratios. The orthogonal convolution C3 module includes a main path, a slave path, a splicing module, and a spatial attention convolution module. The main path is composed of a spatial attention convolution module and i orthogonal modules stacked together, where the number of i can be taken according to the depth of the network (for example, 3, 6, 9, 3 from shallow to deep). The slave path is composed of a spatial attention convolution module, and the main path and the slave path are spliced ​​through the splicing module and cascaded with a spatial attention convolution module.

[0070] like Figure 4 As shown on the right, the orthogonal module consists of a cascade of a first convolutional layer, a horizontal strip convolutional layer, a vertical strip convolutional layer, a second convolutional layer, and an element-wise multiplication module. The output of the second convolutional layer is element-wise multiplied with the input of the orthogonal module to achieve feature enhancement in both the horizontal and vertical directions.

[0071] It should be noted that the first convolutional layer, the second convolutional layer, the horizontal strip convolutional layer, and the vertical strip convolutional layer all belong to several categories of convolutional layers with different convolution kernel sizes. For example, the convolution kernel size of the first convolutional layer is 7×7, the convolution kernel size of the second convolutional layer is 1×1, the convolution kernel size of the horizontal strip convolutional layer is 1×19, and the convolution kernel size of the vertical strip convolutional layer is 19×1. The specific convolution kernel size is not limited in this embodiment.

[0072] Understandably, by Figure 4 As can be seen, the input feature image of size H×W×C is first divided into two identical parts: one part is fed into the main path, and the other into the slave path. The main path is mainly used to extract deeper feature information, while the slave path directly adjusts the input feature image before passing it on without complex transformations. The splicing module concatenates the outputs of the slave path and the main path along the channel dimension C to generate a spliced ​​feature map. The spatial attention convolution module further adjusts this spliced ​​feature map to obtain the final feature image output by the orthogonal convolution C3 module.

[0073] The spatial pyramid pooling module consists of a cascade of three Maxpool layers with pooling kernels of the same size. It is a fast cascaded spatial pooling structure with fewer FLOPs (Floating Point Operations) used in the improved backbone network. It uses max pooling for feature extraction and improves the network's receptive field.

[0074] like Figure 2As shown in the figure, the improved feature fusion network in the second part is mainly used to fuse feature maps of feature layers of different scales. It includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules and multiple feature alignment upsampling modules. The specific structure is composed of a spatial attention convolution module, a feature alignment upsampling module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a feature alignment upsampling module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a splicing module and an orthogonal convolution C3 module in cascade.

[0075] like Figure 2 As shown, the first spatial attention convolution module from front to back in the improved feature fusion network is respectively connected to the spatial pyramid pooling module in the improved backbone network and the fourth splicing module from front to back in the improved feature fusion network, the first splicing module from front to back in the improved feature fusion network is connected to the third orthogonal convolution C3 module from front to back in the improved backbone network, the second spatial attention convolution module from front to back in the improved feature fusion network is connected to the third splicing module from front to back in the improved feature fusion network, and the second splicing module from front to back in the improved feature fusion network is connected to the second orthogonal convolution C3 module from front to back in the improved backbone network.

[0076] like Figure 5 As shown in FIG, it is a structural diagram of the feature alignment upsampling module. The feature alignment upsampling module includes an upsampling submodule and a learnable tensor. The upsampling submodule and the learnable tensor are combined via an element-by-element multiplication module.

[0077] Understandably, in existing target detection models, when fusing features, the nearest neighbor interpolation method is usually used to upsample the high-level low-resolution image to match the resolution of the underlying high-resolution feature map. However, when fusing feature maps of different sizes and resolutions from different levels, using a simple upsampling method to align the resolution will lead to the problem of feature misalignment of feature maps at different levels, which in turn affects the final detection effect of the network. To improve this problem, this application introduces a learnable feature alignment upsampling module AlignUpsample. Figure 5 It can be seen that the feature image of size H×W×C is first upsampled by the nearest neighbor upsampling submodule Upsample, and then the output of the upsampling submodule and a learnable tensor w of the same size are multiplied element by element to obtain the final upsampling result. Among them, each element of the learnable tensor w is initialized to: 1 / s 2, where s is the scaling factor, i.e., the ratio of the feature map before and after sampling. The feature alignment upsampling module uses a learnable tensor w to adjust high-level, low-resolution features to align low-level, high-resolution semantic features, thus improving the problem of feature misalignment during network training.

[0078] It should be noted that the structures of the orthogonal convolution C3 module and the spatial attention convolution module in the improved feature fusion network are the same as those of the orthogonal convolution C3 module and the spatial attention convolution module in the improved backbone network, and are not described in detail in this embodiment.

[0079] like Figure 2 As shown in the figure, the improved decoupled detection head in the third part is mainly responsible for the final detection task and outputs the detection results. It includes the first detection head, the second detection head, and the third detection head. The first detection head is connected to the second orthogonal convolution C3 module from front to back in the improved feature fusion network, the second detection head is connected to the third orthogonal convolution C3 module from front to back in the improved feature fusion network, and the third detection head is connected to the fourth orthogonal convolution C3 module from front to back in the improved feature fusion network.

[0080] like Figure 6 Figure 2 shows the structures of the first, second, and third detection heads. Each of these detection heads includes a second convolutional layer, an object classification branch, and a bounding box regression branch. The object classification branch is composed of two third convolutional layers and a second convolutional layer in cascade, while the bounding box regression branch is composed of a third convolutional layer, an orthogonal module, and a second convolutional layer in cascade.

[0081] It should be noted that the third convolutional layer also belongs to a category of convolutional layers. For example, the convolution kernel size of the third convolutional layer is 3×3, and the specific convolution kernel size is not limited in this embodiment.

[0082] Understandably, by Figure 6As can be seen, the existing Yolov5 detection head uses three stacked single-coupled branch second convolutional layers (the convolution kernel can be 1×1) to adjust the three feature maps output by the improved feature fusion network layer, ultimately outputting feature maps of size H×W×(C+4+1). Here, H×W represents the size of the feature map input to the detection head, (C+4+1) represents the information contained in each anchor, and anchor represents the number of anchor boxes contained in the grid in each output feature map (usually 3). 4 and 1 represent the position coordinates (x, y, w, h) of the detection box, respectively, and 1 represents the confidence score (the confidence score indicates the probability that an object exists in this grid), and C represents the number of primitive categories to be identified. However, the existing Yolov5 detection head uses three stacked 1×1 convolutions to directly adjust the feature map. Classification and regression tasks share the same feature space, which can lead to interference between tasks (for example, the classification task affects regression accuracy).

[0083] Therefore, this application uses a decoupled YOLOv5 detection head (i.e., a first detection head, a second detection head, and a third detection head). The detection head of this application first uses a second convolutional layer (the convolution kernel can be 1×1 in size) to adjust the number of channels of the feature map output by the improved feature fusion network layer to 256. The adjusted feature map is then input into the parallel branches for target classification and target box regression. The target classification branch contains two third convolutional layers and one second convolutional layer, focusing on extracting semantic features for classification and outputting C channels (category only); the target box regression branch contains one third convolutional layer, an orthogonal module, and a second convolutional layer, focusing on learning geometric features and outputting 4+1 channels (coordinates + confidence). The detection head of this embodiment decouples the classification and regression tasks through parallel branches, reducing feature competition, improving the independent prediction capabilities of the two types of tasks, and reducing interference.

[0084] This application proposes a new orthogonal convolution C3 module to replace the original YOLOV5 C3 network. The new orthogonal convolution C3 module can better locate primitives with large aspect ratios, thereby improving the detection accuracy of primitives with large aspect ratios. By introducing a feature alignment upsampling module into the improved feature fusion network, the mutual influence between features from different levels is reduced during the fusion process, the problem of misalignment (misalignment) of features between different levels is improved, and the overall detection performance of the network for "large images with small targets" is improved. The improved decoupled detection head divides the original single-branch detection head into classification and regression branches, and embeds the orthogonal convolution C3 module in the regression branch, further improving the detection capability of primitives.

[0085] Step S130: extract feature information of the original input image through the improved backbone network to obtain multiple feature maps of feature layers of different scales.

[0086] Specifically, if Figure 2As shown, the size and number of channels of the original input image are adjusted by two spatial attention convolution modules to obtain a first adjusted image, and the feature information of the first adjusted image is extracted by the orthogonal convolution C3 module to obtain a first feature map; the size and number of channels of the first feature map are adjusted by the spatial attention convolution module to obtain a second adjusted image, and the feature information of the second adjusted image is extracted by the orthogonal convolution C3 module to obtain a second feature map; the size and number of channels of the second feature map are adjusted by the spatial attention convolution module to obtain a third adjusted image, and the feature information of the third adjusted image is extracted by the orthogonal convolution C3 module to obtain a third feature map; the size and number of channels of the third feature map are adjusted by the spatial attention convolution module to obtain a fourth adjusted image, and the feature information of the fourth adjusted image is extracted by the orthogonal convolution C3 module to obtain a fourth feature map; the feature information of the fourth feature map is obtained by the spatial pyramid pooling module.

[0087] The above method can better locate primitives with large aspect ratios and improve the detection accuracy of primitives with large aspect ratios.

[0088] Step S140: The feature maps of the feature layers at different scales are fused through the improved feature fusion network to obtain multiple fused feature maps.

[0089] Further, if Figure 2 As shown, the size and the number of channels of the fifth feature map are adjusted by the spatial attention convolution module to obtain a fifth adjusted image, and the fifth adjusted image is upsampled by the feature alignment upsampling module to obtain a first upsampled image; the first upsampled image and the third feature map are spliced ​​by the splicing module to obtain a first spliced ​​image, and the feature information of the first spliced ​​image is extracted by the orthogonal convolution C3 module to obtain a sixth feature map; the size and the number of channels of the sixth feature map are adjusted by the spatial attention convolution module to obtain a sixth adjusted image, and the sixth adjusted image is upsampled by the feature alignment upsampling module to obtain a second upsampled image; the second upsampled image and the second feature map are spliced ​​by the splicing module to obtain a second spliced ​​image. The seventh feature map is obtained by stitching the seventh adjusted image and the sixth adjusted image together, and the feature information of the third stitched image is extracted by the orthogonal convolution C3 module. The eighth feature map is obtained by stitching the eighth adjusted image and the fifth adjusted image together, and the feature information of the fourth stitched image is extracted by the orthogonal convolution C3 module. The ninth feature map is obtained by stitching the eighth adjusted image and the fifth adjusted image together, and the feature information of the fourth stitched image is extracted by the orthogonal convolution C3 module.

[0090] The above method improves the problem of feature misalignment (misalignment) between different layers and improves the network's overall detection performance for "large images and small targets".

[0091] Step S150: Recognize each fused feature map through the improved decoupling detection head to obtain a primitive recognition result.

[0092] Further, if Figure 2 As shown, the number of channels of the seventh feature map is adjusted by the second convolutional layer in the first detection head to obtain a ninth adjusted image, the object position information of the ninth adjusted image is identified by the target classification branch in the first detection head, and the object category information of the ninth adjusted image is identified by the target box regression branch in the first detection head; the number of channels of the eighth feature map is adjusted by the second convolutional layer in the second detection head to obtain a tenth adjusted image, the object position information of the tenth adjusted image is identified by the target classification branch in the second detection head, and the object category information of the tenth adjusted image is identified by the target box regression branch in the second detection head; the number of channels of the ninth feature map is adjusted by the second convolutional layer in the third detection head to obtain an eleventh adjusted image, the object position information of the eleventh adjusted image is identified by the target classification branch in the third detection head, and the object category information of the eleventh adjusted image is identified by the target box regression branch in the third detection head.

[0093] The above method further improves the detection capability of primitives through task decoupling and orthogonal constraints.

[0094] In an optional implementation, this embodiment conducted an ablation experiment based on the improved YOLOV5 target detection network. A total of 101 primary wiring diagrams of some substations of a power supply company were selected, of which 91 were used as training sets and 10 were used as test sets. The images in the dataset were manually annotated in Pascal voc format. The annotated content was the type of graphic elements and the position of electrical components in the primary wiring diagram of the power grid station. The various electrical components in the image were marked and selected using the data annotation software labelImg, and then organized into an xml file as labels for wiring diagram image training. Using mAP (mean Average Precision) as the performance indicator of the model, the experimental results on the test set are shown in Table 2:

[0095] Table 2 Test results of the improved method in this paper on the test set

[0096]

[0097] As shown in Table 2, the improved YOLOV5 target detection network proposed in this application has an effective improvement in the accuracy of the primitive recognition results on the given test set.

[0098] The embodiment of the present application provides a method for recognizing graphic elements in a power grid plant wiring diagram, which improves the detection accuracy of graphic elements by proposing an improved YOLOV5 target detection network.

[0099] Example 2

[0100] like Figure 7 FIG. 1 is a schematic diagram of a schematic diagram of a device 700 for identifying graphic elements in a power grid plant wiring diagram according to an embodiment of the present application, wherein the device includes:

[0101] The acquisition module 710 is used to acquire the power grid plant wiring diagram, pre-process the power grid plant wiring diagram, and obtain the original input image;

[0102] An input module 720 is configured to input the original input image into an improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network, and an improved decoupling detection head. The improved backbone network includes a spatial attention convolution module, an orthogonal convolution C3 module, and a spatial pyramid pooling module. The improved feature fusion network includes a spatial attention convolution module, an orthogonal convolution C3 module, and a feature alignment upsampling module. The improved decoupling detection head includes a first detection head, a second detection head, and a third detection head.

[0103] Extraction module 730, used to extract feature information of the original input image through the improved backbone network to obtain multiple feature maps of different scale feature layers;

[0104] A fusion module 740 is used to fuse feature maps of feature layers at different scales through an improved feature fusion network to obtain multiple fused feature maps;

[0105] The recognition module 750 is used to recognize each fused feature map through the improved decoupling detection head to obtain a primitive recognition result.

[0106] The graphic element recognition device for the power grid plant wiring diagram provided in the embodiment of the present application can implement each process of the graphic element recognition method for the power grid plant wiring diagram corresponding to Example 1, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0107] The embodiment of the present application provides a graphic element recognition device for a power grid plant wiring diagram, which improves the detection accuracy of graphic elements by proposing an improved YOLOV5 target detection network.

[0108] A computer device is also provided in an embodiment of the present disclosure. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the method for identifying graphic elements in the power grid plant wiring diagram in Example 1 are implemented.

[0109] A computer-readable storage medium is also provided in an embodiment of the present disclosure. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the method for identifying graphic elements in the power grid plant wiring diagram in Example 1 are implemented.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes 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 structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0111] The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for identifying graphic elements in a power grid plant wiring diagram, characterized in that: The method comprises: collecting a power grid plant wiring diagram, and preprocessing the power grid plant wiring diagram to obtain an original input image; Inputting the original input image into an improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network and an improved decoupling detection head, the improved backbone network includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules and a spatial pyramid pooling module, the improved feature fusion network includes multiple spatial attention convolution modules, multiple orthogonal convolution C3 modules, multiple splicing modules and multiple feature alignment upsampling modules, and the improved decoupling detection head includes a first detection head, a second detection head and a third detection head; Extracting feature information of the original input image through the improved backbone network to obtain multiple feature maps of feature layers at different scales; fusing the feature maps of the feature layers of different scales through the improved feature fusion network to obtain multiple fused feature maps; Recognizing each of the fused feature maps through the improved decoupling detection head to obtain a primitive recognition result; The improved backbone network is composed of two spatial attention convolution modules, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module and one spatial pyramid pooling module in cascade. The spatial attention convolution module is composed of a convolution layer, a batch normalization layer and a sigmoid linear unit activation function cascade in sequence, and the convolution layer includes a first convolution layer, a second convolution layer, a horizontal strip convolution layer and a vertical strip convolution layer; The orthogonal convolution C3 module includes a main path, a slave path, a splicing module and the spatial attention convolution module. The main path is composed of a stack of the spatial attention convolution module and multiple orthogonal modules. The slave path is composed of a spatial attention convolution module. The main path and the slave path are spliced ​​through the splicing module and cascaded with a spatial attention convolution module. The orthogonal module is sequentially composed of a cascade of the first convolution layer, a horizontal strip convolution layer, a vertical strip convolution layer, a second convolution layer and an element-by-element multiplication module. The spatial pyramid pooling module is composed of three cascaded maximum pooling layers in sequence.

2. The method for identifying graphic elements of a power grid plant wiring diagram according to claim 1, characterized in that: The feature information of the original input image is extracted by the improved backbone network to obtain multiple feature maps of feature layers at different scales, including: Adjusting the size and number of channels of the original input image through the two spatial attention convolution modules to obtain a first adjusted image, and extracting feature information of the first adjusted image through the orthogonal convolution C3 module to obtain a first feature map; Adjusting the size and number of channels of the first feature map through the spatial attention convolution module to obtain a second adjusted image, and extracting feature information of the second adjusted image through the orthogonal convolution C3 module to obtain a second feature map; Adjusting the size and number of channels of the second feature map through the spatial attention convolution module to obtain a third adjusted image, and extracting feature information of the third adjusted image through the orthogonal convolution C3 module to obtain a third feature map; Adjusting the size and the number of channels of the third feature map through the spatial attention convolution module to obtain a fourth adjusted image, and extracting feature information of the fourth adjusted image through the orthogonal convolution C3 module to obtain a fourth feature map; Feature information of the fourth feature map is extracted through the spatial pyramid pooling module to obtain a fifth feature map.

3. The method for identifying graphic elements of a power grid plant wiring diagram according to claim 2, characterized in that: The improved feature fusion network is composed of a spatial attention convolution module, a feature alignment upsampling module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a feature alignment upsampling module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a splicing module, an orthogonal convolution C3 module, a spatial attention convolution module, a splicing module and an orthogonal convolution C3 module in cascade; The first spatial attention convolution module from front to back in the improved feature fusion network is respectively connected to the spatial pyramid pooling module in the improved backbone network and the fourth splicing module from front to back in the improved feature fusion network, the first splicing module from front to back in the improved feature fusion network is connected to the third orthogonal convolution C3 module from front to back in the improved backbone network, the second spatial attention convolution module from front to back in the improved feature fusion network is connected to the third splicing module from front to back in the improved feature fusion network, and the second splicing module from front to back in the improved feature fusion network is connected to the second orthogonal convolution C3 module from front to back in the improved backbone network; The feature alignment upsampling module includes an upsampling submodule and a learnable tensor, and the upsampling submodule and the learnable tensor are combined via the element-by-element multiplication module.

4. The method for identifying graphic elements of a power grid plant wiring diagram according to claim 3, characterized in that: The improved feature fusion network is used to fuse the feature maps of the feature layers of different scales to obtain multiple fused feature maps, including: Adjusting the size and the number of channels of the fifth feature map through the spatial attention convolution module to obtain a fifth adjusted image, and upsampling the fifth adjusted image through the feature alignment upsampling module to obtain a first upsampled image; splicing the first upsampled image and the third feature map through the splicing module to obtain a first spliced ​​image, and extracting feature information of the first spliced ​​image through the orthogonal convolution C3 module to obtain a sixth feature map; Adjusting the size and the number of channels of the sixth feature map through the spatial attention convolution module to obtain a sixth adjusted image, and upsampling the sixth adjusted image through the feature alignment upsampling module to obtain a second upsampled image; splicing the second upsampled image and the second feature map through the splicing module to obtain a second spliced ​​image, and extracting feature information of the second spliced ​​image through the orthogonal convolution C3 module to obtain a seventh feature map; Adjusting the size and the number of channels of the seventh feature map through the spatial attention convolution module to obtain a seventh adjusted image, stitching the seventh adjusted image and the sixth adjusted image through the stitching module to obtain a third stitched image, and extracting feature information of the third stitched image through the orthogonal convolution C3 module to obtain an eighth feature map; The size and number of channels of the eighth feature map are adjusted by the spatial attention convolution module to obtain an eighth adjusted image, the eighth adjusted image and the fifth adjusted image are spliced ​​by the stitching module to obtain a fourth stitched image, and the feature information of the fourth stitched image is extracted by the orthogonal convolution C3 module to obtain a ninth feature map.

5. The method for identifying graphic elements of a power grid plant wiring diagram according to claim 4, characterized in that: The convolution layer further includes a third convolution layer, and the first detection head, the second detection head, and the third detection head each include one second convolution layer, an object classification branch, and a target frame regression branch. The target classification branch is sequentially composed of two third convolution layers and one second convolution layer in cascade, and the target frame regression branch is sequentially composed of one third convolution layer, one orthogonal module, and one second convolution layer in cascade; The first detection head is connected to the second orthogonal convolution C3 module from front to back in the improved feature fusion network, the second detection head is connected to the third orthogonal convolution C3 module from front to back in the improved feature fusion network, and the third detection head is connected to the fourth orthogonal convolution C3 module from front to back in the improved feature fusion network.

6. The method for identifying graphic elements of a power grid plant wiring diagram according to claim 5, characterized in that: The improved decoupling detection head is used to identify each of the fused feature maps to obtain a primitive recognition result, including: adjusting the number of channels of the seventh feature map through the second convolutional layer in the first detection head to obtain a ninth adjusted image, identifying primitive position information of the ninth adjusted image through the object classification branch in the first detection head, and identifying primitive category information of the ninth adjusted image through the object bounding box regression branch in the first detection head; Adjusting the number of channels of the eighth feature map through the second convolutional layer in the second detection head to obtain a tenth adjusted image, identifying primitive position information of the tenth adjusted image through the object classification branch in the second detection head, and identifying primitive category information of the tenth adjusted image through the object bounding box regression branch in the second detection head; The number of channels of the ninth feature map is adjusted through the second convolutional layer in the third detection head to obtain an eleventh adjusted image, the primitive position information of the eleventh adjusted image is identified through the target classification branch in the third detection head, and the primitive category information of the eleventh adjusted image is identified through the target box regression branch in the third detection head.

7. A device for identifying graphic elements in a power grid plant wiring diagram, characterized in that: The device comprises: An acquisition module is used to acquire a power grid plant wiring diagram, and pre-process the power grid plant wiring diagram to obtain an original input image; An input module is used to input the original input image into an improved YOLOV5 target detection network, wherein the improved YOLOV5 target detection network includes an improved backbone network, an improved feature fusion network and an improved decoupling detection head, the improved backbone network includes a spatial attention convolution module, an orthogonal convolution C3 module and a spatial pyramid pooling module, the improved feature fusion network includes the spatial attention convolution module, the orthogonal convolution C3 module, multiple splicing modules and a feature alignment upsampling module, and the improved decoupling detection head includes a first detection head, a second detection head and a third detection head; An extraction module, configured to extract feature information of the original input image through the improved backbone network to obtain multiple feature maps of feature layers at different scales; A fusion module, configured to fuse the feature maps of the feature layers of different scales through the improved feature fusion network to obtain a plurality of fused feature maps; A recognition module, configured to recognize each of the fused feature maps through the improved decoupling detection head to obtain a primitive recognition result; The improved backbone network is composed of two spatial attention convolution modules, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module, one spatial attention convolution module, one orthogonal convolution C3 module and one spatial pyramid pooling module in cascade. The spatial attention convolution module is composed of a convolution layer, a batch normalization layer and a sigmoid linear unit activation function cascade in sequence, and the convolution layer includes a first convolution layer, a second convolution layer, a horizontal strip convolution layer and a vertical strip convolution layer; The orthogonal convolution C3 module includes a main path, a slave path, a splicing module and the spatial attention convolution module. The main path is composed of a stack of the spatial attention convolution module and multiple orthogonal modules. The slave path is composed of a spatial attention convolution module. The main path and the slave path are spliced ​​through the splicing module and cascaded with a spatial attention convolution module. The orthogonal module is sequentially composed of a cascade of the first convolution layer, a horizontal strip convolution layer, a vertical strip convolution layer, a second convolution layer and an element-by-element multiplication module. The spatial pyramid pooling module is composed of three cascaded maximum pooling layers in sequence.

8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for identifying graphic elements of a power grid plant connection diagram according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying graphic elements of a power grid plant connection diagram according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • MRI (Magnetic Resonance Imaging) brain tumor segmentation method based on multi-scale feature fusion of improved U-Net

    CN117876399A

  • Automatic driving target detection method in night low-light environment

    CN119107623A