CN116884027A - Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm - Google Patents

Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm Download PDF

Info

Publication number
CN116884027A
CN116884027A CN202310720436.7A CN202310720436A CN116884027A CN 116884027 A CN116884027 A CN 116884027A CN 202310720436 A CN202310720436 A CN 202310720436A CN 116884027 A CN116884027 A CN 116884027A
Authority
CN
China
Prior art keywords
image
distribution network
element symbol
vector design
vector
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
CN202310720436.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.)
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangzhou Power Supply Bureau of Guangdong Power Grid 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 Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority to CN202310720436.7A priority Critical patent/CN116884027A/en
Publication of CN116884027A publication Critical patent/CN116884027A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/146Aligning or centring of the image pick-up or image-field
    • G06V30/147Determination of region of interest
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/15Cutting or merging image elements, e.g. region growing, watershed or clustering-based techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/1801Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections
    • G06V30/18019Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections by matching or filtering
    • G06V30/18038Biologically-inspired filters, e.g. difference of Gaussians [DoG], Gabor filters
    • G06V30/18048Biologically-inspired filters, e.g. difference of Gaussians [DoG], Gabor filters with interaction between the responses of different filters, e.g. cortical complex cells
    • G06V30/18057Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/19007Matching; Proximity measures
    • G06V30/19093Proximity measures, i.e. similarity or distance measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19107Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/1918Fusion techniques, i.e. combining data from various sources, e.g. sensor fusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/416Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The application relates to an electric element symbol identification method of a distribution network engineering drawing based on an improved detection algorithm. The method comprises the following steps: acquiring a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model, inputting the design image of the distribution network engineering vector into the data redundancy image segmentation model to obtain each vector design segmentation image; inputting each vector design segmentation image into an electrical element symbol recognition model to obtain each electrical element symbol recognition result; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image. By adopting the method, the auditing efficiency of the electrical element symbols in the design drawing can be improved.

Description

Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm
Technical Field
The application relates to the technical field of artificial intelligence, in particular to an electric element symbol identification method, an electric element symbol identification device, a computer device, a storage medium and a computer program product of a distribution network engineering drawing based on an improved detection algorithm.
Background
With the development of computer technology, computer aided design technology has emerged, and because electrical engineering technology is complex and has a wide range of applications with special properties, it is also necessary to apply software technology with comprehensive functions and specialization in designing electrical components to perform design pattern. The computer aided design can meet a plurality of requirements of an electrical engineering design drawing, so that the computer aided design has been widely applied to electrical engineering and automation thereof, and takes the dominant place in the design field.
However, in the traditional technology, the computer aided design drawings are inspected in a manual inspection mode, and as the number of projects increases, the computer aided design drawings to be inspected are gradually accumulated, and the single computer aided design drawing has more inspection contents, and the computer aided design drawings generally convey the accurate geometry, rich semantics and knowledge in the specific field of product design; the method comprises the steps of finding and identifying the electrical element symbols from a computer aided design drawing, wherein a manual auditing mode is adopted to cause the condition of false detection and false detection, so that the auditing efficiency of the electrical element symbols in the computer aided design drawing cannot meet the requirement.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, computer readable storage medium, and computer program product for identifying electrical component symbols of a distribution network engineering drawing based on an improved detection algorithm that can improve the auditing efficiency of the electrical component symbols in a computer aided design drawing.
In a first aspect, the application provides a method for identifying electrical element symbols of a distribution network engineering drawing based on an improved detection algorithm. The method comprises the following steps: acquiring a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into the electric element symbol recognition model to obtain each electric element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
In a second aspect, the application further provides an electric element symbol recognition device of the distribution network engineering drawing based on the improved detection algorithm. The device comprises: the design image acquisition module is used for acquiring a distribution network engineering vector design image corresponding to the distribution network engineering; the distribution network engineering vector design image comprises a design image size value; the design image segmentation module is used for inputting the vector design image of the distribution network project into the data redundancy image segmentation model of the distribution network project under the condition that the size value of the design image is larger than the image input size value of the electric appliance element symbol recognition model of the distribution network project, so as to obtain each vector design segmentation image; the element symbol recognition module is used for inputting each vector design segmentation image into the electrical element symbol recognition model to obtain each electrical element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; the element symbol determining module is used for taking an electric element symbol recognition result with the element symbol similarity larger than a similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of: acquiring a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into the electric element symbol recognition model to obtain each electric element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: acquiring a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into the electric element symbol recognition model to obtain each electric element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of: acquiring a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into the electric element symbol recognition model to obtain each electric element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
The above-mentioned electric element symbol identification method, apparatus, computer device, storage medium and computer program product of a distribution network engineering drawing based on improved detection algorithm, through obtaining the distribution network engineering vector design image corresponding to the distribution network engineering; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into an electrical element symbol recognition model to obtain each electrical element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electric element symbol and the corresponding standard electric element symbol image.
The feature extraction layer of the electrical element symbol recognition model YOLOv3 is replaced by the lightweight MobileNet v3 neural network, and the FPN feature pyramid network with a 'bottom-up' path is adopted for feature extraction results, so that shallow feature images with more detail information can be conveniently called, the shallow feature images are downsampled and combined with deep feature images in the calculation process, the detail information of deep features is enriched, the detail information of the deep features is enhanced, the auditing efficiency of electrical element symbols in a computer aided design drawing can be improved, and finally, the more accurate and faster recognition and extraction of electrical element symbols of a distribution network engineering drawing can be realized.
Drawings
FIG. 1 is an application environment diagram of a method for identifying electrical element symbols of a distribution network engineering drawing based on an improved detection algorithm in one embodiment;
FIG. 2 is a flow chart of a method for identifying electrical component symbols of a distribution network engineering drawing based on an improved detection algorithm in one embodiment;
FIG. 3 is a flow diagram of a method for obtaining a segmented image for each vector design in one embodiment;
FIG. 4 is a flow chart of a method for obtaining a segmented image for each vector design in another embodiment;
FIG. 5 is a flow chart of a method for obtaining identification results of each electrical component symbol in one embodiment;
FIG. 6 is a flow chart of a method for obtaining a partial electrical component symbol recognition result in one embodiment;
FIG. 7 is a flow chart of a training method for the identification model of the electrical component symbol in one embodiment;
FIG. 8 is a diagram of a redundant split scheme in one embodiment;
FIG. 9 is a network architecture diagram of an improved feature pyramid network in one embodiment;
FIG. 10 is a logic diagram of an implementation of a method for identifying electrical component symbols of a distribution network engineering drawing based on an improved detection algorithm in one embodiment;
FIG. 11 is a block diagram of an electrical component symbol recognition device of a distribution network engineering drawing based on an improved detection algorithm in one embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The electrical element symbol identification method of the distribution network engineering drawing based on the improved detection algorithm provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 obtains a distribution network engineering vector design image corresponding to the distribution network engineering through the terminal 102; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into an electrical element symbol recognition model to obtain each electrical element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electric element symbol and the corresponding standard electric element symbol image. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, there is provided a method for identifying electrical element symbols of a distribution network engineering drawing based on an improved detection algorithm, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step 202, obtaining a distribution network engineering vector design image corresponding to a distribution network engineering.
The distribution network engineering can be a newly built or modified engineering project of 10kV and below lines and all equipment cables, lines, switch rooms, high-voltage rooms, low-voltage rooms, transformers and other equipment built by a power grid company.
The distribution network engineering vector design image can be an image corresponding to a vector design drawing for distribution network engineering construction. The vector design drawing may be an electrical CAD drawing.
Specifically, the server 104 responds to an operation instruction of the terminal 102, and obtains a distribution network engineering vector design image corresponding to the distribution network engineering from the terminal 102, wherein the distribution network engineering vector design image comprises a design image size value; and then, the obtained distribution network engineering vector design image is stored in a storage unit, and when the server needs to process the distribution network engineering vector design image, volatile storage resources are called from the storage unit for the CPU to calculate. The distribution network engineering vector design image can be a single vector design image input to the central processing unit, or can be a plurality of vector design images input to the central processing unit at the same time.
And 204, under the condition that the size value of the design image is larger than the image input size value of the electric appliance element symbol identification model of the distribution network project, inputting the vector design image of the distribution network project into the data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image.
The design image size value may be the size of the distribution network engineering vector design image, including the size values of two dimensions, namely a width dimension and a height dimension.
The electrical element symbol recognition model can be a neural network model for recognizing each electrical element symbol in the distribution network engineering vector design image.
Wherein the image input size value may be a maximum size that the electrical component symbol recognition model allows to input an image, including both a wide and a high dimension.
The data redundant image segmentation model can be a model for cutting a distribution network engineering vector design image according to preset conditions.
The vector design segmentation image may be a plurality of segmented images obtained by segmenting the distribution network engineering vector design image through a data redundancy image segmentation model.
Specifically, before the electric appliance element symbol recognition model recognizes each electric appliance element symbol in the distribution network engineering vector design image, the server 104 compares the width and height of the design image size value of the distribution network engineering vector design image with the width and height of the image input size value of the electric appliance element symbol recognition model, if the width and height of the design image size value are not greater than the width and height of the image input size value, the step of inputting each vector design segmentation image into the electric appliance element symbol recognition model to obtain each electric element symbol recognition result is directly executed without segmenting the distribution network engineering vector design image; if one of the width and height of the design image size values is greater than the corresponding image input size value In the case of the term, if the width of the design image size value of the design image of the distribution network engineering vector is W, the height is H, and if the width of the image input size value of the electrical component symbol recognition model is W, the height is H, the value ranges of the redundancy width and redundancy height for dividing the design image of the distribution network engineering vector must satisfy W>R w >A w ,h>R h >A h Wherein A is w For minimum value of redundant width, A h Minimum value of redundancy height, wherein R is calculated to ensure that each electric element symbol is completely divided into a vector design divided image w 、R h The size of the electric appliance element symbols is required to be larger than that of all electric appliance element symbols as much as possible, so that a K-means++ clustering algorithm is adopted to perform clustering and apply the clustering to a label clustering result, and the maximum value (A w ,A h ). Determining the number of transverse cuts C according to the width of the designed image size value and the width of the image input size value x ,C x W/W is taken as the initial value of (C) x R is as follows w Meet wC x -(C x -1)R w =w. From wC x -(C x -1)R w Obtain R by W w If R is w Satisfy w>R w >A w Output C x And R is w The method comprises the steps of carrying out a first treatment on the surface of the If not, C x =C x +1, substituting again wC x -(C x -1)R w =w until R w Satisfy w>R w >A w . Similarly, the number of longitudinal cuts C is determined according to the high design image size value and the high image input size value y ,C y Is H/H, wherein C y R is as follows h Meet hC y -(C y -1)R h =h. From hC y -(C y -1)R h Obtain R by H h If R is h Satisfy h>R h >A h Output C y And R is h The method comprises the steps of carrying out a first treatment on the surface of the If not, C y =C y +1, again substituting hC y -(C y -1)R h =h, until R h Satisfy h>R h >A h
If the distribution network engineering vector design image is segmented, determining a cutting coordinate point corresponding to each distribution network engineering segmentation image in the distribution network engineering vector design image before segmentation. Inputting the transverse cutting times and the longitudinal cutting times into a coordinate point determination formula, and calculating cutting coordinate points corresponding to each distribution network engineering segmentation image, wherein the coordinate point determination formula is as follows:
[i(w-R w ),j(h-R h )],(i∈{0,1,...,C x },j∈{0,1,...,C y })
under the condition that the transverse cutting times, the longitudinal cutting times and the cutting coordinate points can be determined, the absolute positions of the distribution network engineering segmentation images in the distribution network engineering vector design images can be determined, so that the distribution network engineering vector design images are segmented through the neural network, and the distribution network engineering segmentation images are obtained. Inputting each distribution network engineering segmented image into a neural network for image recognition to obtain segmented image recognition results corresponding to each distribution network engineering segmented image, namely an initial recognition result set S i ,i∈{0,1,...,C x C y And each segmented image recognition result comprises an image detection frame. Calculating the intersection ratio (Intersection over union, ioU) between each image detection frame using a modified non-maximum suppression algorithm when the intersection ratio between any two image detection frames is greater than the intersection ratio threshold y 1 (y 1 =0.7), the image detection frames with higher scores are reserved, that is, the repeated image detection frames are screened out, so as to obtain each duplicate removal detection frame. Because each duplicate removal detection frame, each distribution network engineering segmentation image and each vector design segmentation image have a corresponding relationship, each vector design segmentation image is determined through the duplicate removal detection frames and the corresponding relationship. FIG. 8 is a diagram illustrating a redundant split scheme in one embodiment.
And 206, inputting each vector design segmentation image into the electric element symbol recognition model to obtain each electric element symbol recognition result.
The electrical element symbol recognition result may be a recognition result obtained by performing image recognition on each electrical element symbol of the distribution network engineering vector design image.
Specifically, each of the vector design division images is input to the electric component symbol recognition model, and the same image recognition process is performed for each of the vector design division images, and therefore, description will be made here with respect to any one of the vector design division images. Inputting the vector design segmentation image into a deconvolution feature extraction layer of an electrical element symbol recognition model, wherein the electrical element symbol recognition model is an improved YOLOv3 model, and the original YOLOv is replaced by lightweight mobilenv 3 V 3, the Darknet-53 feature extraction layer is used as a deconvolution feature extraction layer, and feature extraction is carried out on the vector design segmented image through the lightweight MobileNetv3, so that each segmented image feature map corresponding to the vector design segmented image is obtained.
For multi-scale feature fusion of each segmented image feature map, the improved YOLOv3 model will use an improved feature pyramid network, i.e., a network structure of "bottom-up" and "top-down" 2 paths constructed from the original feature pyramid network, becoming 2 "bottom-up" paths constructed from the improved feature pyramid network, the improved feature pyramid network structure being shown in fig. 9.
And (3) using an improved feature pyramid network to downsample each segmented image feature map, and obtaining shallow segmented image feature maps corresponding to each segmented image feature map after downsampling. For example: and (3) performing convolution operation with the step length of 2 by using 3 multiplied by 3 on each segmented image characteristic map to realize downsampling, and performing channel alignment by using 1 multiplied by 1 on the obtained downsampling result to obtain each shallow segmented image characteristic map.
And combining each shallow layer segmentation image feature map with the corresponding segmentation image feature map by utilizing a feature image pixel point addition principle to obtain each combined segmentation feature map. For the combined theoretical basis, the following formula is satisfied:
P i =θdown(P i-1 ,size)+(1+θ)conv(C i )
Wherein P is i To merge the segmentation feature map; down (P) i-1 Size) is a downsampling function; size is the sampled output size of the downsampling function; conv (C) i ) Is a merged convolution kernel; θ is the weighting factor of any combined segmented image feature map.
And each merging and dividing feature map is provided with a corresponding electric element character prediction frame, each electric element character prediction frame gives out a prediction value, statistics is carried out through each electric element character prediction frame and each prediction value, and a part of electric element symbol recognition results corresponding to the vector design dividing image are obtained, wherein the part of electric element symbol recognition results represent a plurality of preliminarily recognized electric element symbols in the vector design dividing image. And finally, counting the recognition results corresponding to each vector design segmentation image, namely integrating the recognition results of each part of the electric element symbols to obtain the recognition results of each electric element symbol.
And step 208, using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol.
The similarity of the element symbols may be a similarity between the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
The similarity threshold may be a criterion for determining whether the similarity of the element symbols meets a requirement, and the electrical element symbol recognition result meeting the criterion may be used as the data.
The recognition electric element symbol can be the recognition result of the electric element symbol, which is compared with the standard electric element symbol image to determine the recognition result matched with the symbol of the distribution network engineering vector design image.
Specifically, each electrical element symbol recognition result recognized by the electrical element symbol recognition model is subjected to similarity comparison and matching with a standard electrical element symbol image corresponding to a pre-stored standard electrical element symbol library, so that each element symbol similarity is obtained, if the element symbol similarity reaches a set threshold, the electrical element symbol recognition result corresponding to the element symbol similarity is output as a recognition electrical element symbol, and a text description is added. Fig. 10 is a logic diagram of an implementation of a method for identifying electrical element symbols of a distribution network engineering drawing based on an improved detection algorithm in an embodiment.
In the above method for identifying electrical element symbols of distribution network engineering drawing based on improved detection algorithm, the distribution network engineering vector design image corresponding to the distribution network engineering is obtained; the distribution network engineering vector design image comprises a design image size value; under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image; inputting each vector design segmentation image into an electrical element symbol recognition model to obtain each electrical element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer; using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electric element symbol and the corresponding standard electric element symbol image.
Replacement of electrical component symbol recognition model YOLO by using lightweight MobileNetv3 neural network V 3, and the feature extraction layer adopts a FPN feature pyramid network with a 'bottom-up' path for feature extraction results, which is favorable for calling shallow feature images with more detail information, and the shallow feature images are downsampled and combined with deep feature images in the calculation process so as to enrich the detail information of deep features, strengthen the detail information of the deep features, improve the auditing efficiency of electric element symbols in a computer aided design drawing and finally realize more accurate and faster identification and extraction of the electric element symbols of a distribution network engineering drawing.
In one embodiment, as shown in fig. 3, inputting a vector design image of a distribution network engineering into a data redundancy image segmentation model of the distribution network engineering to obtain each vector design segmentation image, including:
and 302, determining the transverse cutting times and the longitudinal cutting times of the distribution network engineering vector design image according to the size value of the design image.
The transverse cutting times can be that the distribution network engineering vector design image is divided from left to right or from right to left; the number of longitudinal cuts may be from top to bottom or from bottom to top for the distribution network engineering vector design image.
Specifically, the number of lateral cuts C is determined based on the width of the design image size value and the width of the image input size value x ,C x W/W is taken as the initial value of (C) x R is as follows w Meet wC x -(C x -1)R w =w. From wC x -(C x -1)R w Obtain R by W w If R is w Satisfy w>R w >A w Output C x And R is w The method comprises the steps of carrying out a first treatment on the surface of the If not, C x =C x +1, substituting again wC x -(C x -1)R w =w until R w Satisfy w>R w >A w . Similarly, the number of longitudinal cuts C is determined according to the high design image size value and the high image input size value y ,C y Is H/H, wherein C y R is as follows h Meet hC y -(C y -1)R h =h. From hC y -(C y -1)R h Obtain R by H h If R is h Satisfy h>R h >A h Output C y And R is h The method comprises the steps of carrying out a first treatment on the surface of the If not, C y =C y +1, again substituting hC y -(C y -1)R h =h, until R h Satisfy h>R h >A h
And step 304, determining each cutting coordinate point corresponding to the distribution network engineering vector design image according to the transverse cutting times and the longitudinal cutting times.
The cutting coordinate point may be a coordinate of an upper left corner of a split image obtained by splitting the distribution network engineering vector design image, as a reference point.
Specifically, if the distribution network engineering vector design image is segmented, a cutting coordinate point corresponding to each distribution network engineering segmentation image needs to be determined in the distribution network engineering vector design image before segmentation. Inputting the transverse cutting times and the longitudinal cutting times into a coordinate point determination formula, and calculating cutting coordinate points corresponding to each distribution network engineering segmentation image, wherein the coordinate point determination formula is as follows:
[i(w-R w ),j(h-R h )],(i∈{0,1,...,C x },j∈{0,1,...,C y })
And 306, cutting the distribution network engineering vector design image according to the transverse cutting times, the longitudinal cutting times and the cutting coordinate points to obtain each distribution network engineering segmentation image corresponding to the distribution network engineering vector design image.
The distribution network engineering segmentation image may be each sub-image obtained by segmenting the distribution network engineering vector design image.
Specifically, under the condition that the transverse cutting times, the longitudinal cutting times and the cutting coordinate points can be determined, the absolute positions of the distribution network engineering segmentation images in the distribution network engineering vector design image can be determined, so that the distribution network engineering vector design image is segmented through a neural network, and each distribution network engineering segmentation image is obtained.
And step 308, repeatedly detecting the split images of the distribution network engineering to obtain the split images of the vector design.
Specifically, each distribution network engineering segmentation image is respectively input into a neural network for image recognition, so as to obtain segmentation image recognition results corresponding to each distribution network engineering segmentation image, namely an initial recognition result set S i ,i∈{0,1,...,C x C y And each segmented image recognition result comprises an image detection frame. Calculating the intersection ratio (Intersection over union, ioU) between each image detection frame using a modified non-maximum suppression algorithm when the intersection ratio between any two image detection frames is greater than the intersection ratio threshold y 1 (y 1 =0.7), the image detection frames with higher scores are reserved, that is, the repeated image detection frames are screened out, so as to obtain each duplicate removal detection frame. Because each duplicate removal detection frame, each distribution network engineering segmentation image and the vector design segmentation image have corresponding relations, the duplicate removal detection is carried outAnd measuring the frame and the corresponding relation, and determining each vector design segmentation image.
In this embodiment, through a data redundancy image cutting algorithm, under the condition that network input is not changed and the original proportion of images is not changed, an input image is cut into a plurality of sub-images, and preprocessing and de-duplication processing are performed on input data, so that it is ensured that any one target element is at least completely present in one sub-image, and the recognition accuracy of detecting electric element symbols can be improved.
In one embodiment, as shown in fig. 4, performing repeatability detection on each distribution network engineering segmented image to obtain each vector design segmented image, including:
and step 402, carrying out image recognition on each distribution network engineering segmented image to obtain each segmented image recognition result.
The segmented image recognition result may be a result obtained by performing image recognition on the segmented image of the distribution network engineering.
Specifically, each distribution network engineering segmentation image is respectively input into a neural network for image recognition, so as to obtain segmentation image recognition results corresponding to each distribution network engineering segmentation image, namely an initial recognition result set S i ,i∈{0,1,...,C x C y And each segmented image recognition result comprises an image detection frame.
And step 404, removing the image detection frames which do not meet the cross ratio threshold value in the image detection frames to obtain duplicate removal detection frames.
Wherein the cross-over threshold value can be a standard for judging whether the cross-over ratio between the image detection frames meets the service requirement, and is generally the cross-over threshold value y 1 (y 1 =0.7)。
The deduplication detection frame may be an image detection frame with an overlap ratio greater than an overlap ratio threshold, or the content of the image detection frame may be considered to be not repeated with the content of other image detection frames.
Specifically, the intersection ratio (Intersection over union, ioU) between each image detection frame is calculated as the intersection between any two image detection frames using a modified non-maximum suppression algorithmThe ratio is greater than the cross ratio threshold y 1 (y 1 =0.7), the image detection frames with higher scores are reserved, that is, the repeated image detection frames are screened out, so as to obtain each duplicate removal detection frame.
Step 406, determining each vector design segmentation image according to each de-duplication detection frame.
Specifically, since each duplication elimination detection frame, each distribution network engineering division image, and the vector design division image have a correspondence, each vector design division image is determined by the duplication elimination detection frame and the correspondence.
In this embodiment, by using the repeated image detection frame screened by the improved non-maximum suppression algorithm, the neighborhood correlation coefficients can be introduced from the non-maximum suppression (NMS) aspect of the Canny operator to 4 pixel points around the gradient direction to interpolate, and the interpolation is used as a comparison point to realize the non-maximum suppression process.
In one embodiment, as shown in fig. 5, inputting each vector design division image into the electrical component symbol recognition model to obtain each electrical component symbol recognition result includes:
step 502, inputting the vector design segmented image to a separate convolution feature extraction layer for any vector design segmented image to obtain each segmented image feature map corresponding to the vector design segmented image.
Wherein the separate convolution feature extraction layer may be a lightweight mobilenv 3 neural network of the modified YOLOv3 model.
The segmented image feature map may be a feature image capable of expressing information of the vector-designed segmented image.
Specifically, the vector design segmentation image is input into a deconvolution feature extraction layer of an electrical element symbol recognition model, wherein the electrical element symbol recognition model is an improved YOLOv3 model, and the original YOLOv is replaced by lightweight mobilenv 3 V 3 as a deconvolution feature extraction layer, feature extraction is carried out on the vector design segmentation image through lightweight MobileNetv3And obtaining each segmented image feature map corresponding to the vector design segmented image.
And step 504, carrying out multi-scale feature fusion on each segmented image feature map to obtain a part of electric element symbol recognition result corresponding to the vector design segmented image.
The multi-scale feature fusion can be an operation of feature fusion under images of different sizes.
The partial electric element symbol recognition result may be a recognition result for one divided image feature map, the recognition result including a plurality of electric element symbols that are preliminarily recognized.
Specifically, an improved feature pyramid network is used for downsampling each segmented image feature map, and shallow segmented image feature maps corresponding to each segmented image feature map are obtained after downsampling. For example: and (3) performing convolution operation with the step length of 2 by using 3 multiplied by 3 on each segmented image characteristic map to realize downsampling, and performing channel alignment by using 1 multiplied by 1 on the obtained downsampling result to obtain each shallow segmented image characteristic map.
And combining each shallow layer segmentation image feature map with the corresponding segmentation image feature map by utilizing a feature image pixel point addition principle to obtain each combined segmentation feature map. For the combined theoretical basis, the following formula is satisfied:
P i =θdown(P i-1 ,size)+(1+θ)conv(C i )
wherein P is i To merge the segmentation feature map; down (P) i-1 Size) is a downsampling function; size is the sampled output size of the downsampling function; conv (C) i ) Is a merged convolution kernel; θ is the weighting factor of any combined segmented image feature map.
And each merging and dividing feature map is provided with a corresponding electric element character prediction frame, each electric element character prediction frame gives out a prediction value, statistics is carried out through each electric element character prediction frame and each prediction value, and a part of electric element symbol recognition results corresponding to the vector design dividing image are obtained, wherein the part of electric element symbol recognition results represent a plurality of preliminarily recognized electric element symbols in the vector design dividing image.
And step 506, integrating the identification results of the partial electric element symbols corresponding to the vector design segmentation images to obtain the identification results of the electric element symbols.
Specifically, the recognition results corresponding to the vector design segmentation images are counted, namely, the recognition results of the electric element symbols of all parts are integrated, and the recognition results of the electric element symbols are obtained.
In this embodiment, the improved YOLOv3 neural network combining the lightweight MobileNetv3 separate convolution feature extraction layer with 2 'bottom-up' paths has a new feature pyramid network, so that the detail information of deep features can be enriched, the detail information of the deep features is enhanced, and the recognition accuracy of the network is improved.
In one embodiment, as shown in fig. 6, performing multi-scale feature fusion on feature graphs of each split image to obtain a recognition result of a part of electrical element symbols corresponding to the split image of the vector design, including:
step 602, downsampling each segmented image feature map to obtain shallow segmented image feature maps corresponding to each segmented image feature map.
The shallow segmentation image feature map may be a shallow feature map with electrical element symbol information, obtained using a modified feature pyramid network.
Specifically, an improved feature pyramid network is used for downsampling each segmented image feature map, and shallow segmented image feature maps corresponding to each segmented image feature map are obtained after downsampling. For example: and (3) performing convolution operation with the step length of 2 by using 3 multiplied by 3 on each segmented image characteristic map to realize downsampling, and performing channel alignment by using 1 multiplied by 1 on the obtained downsampling result to obtain each shallow segmented image characteristic map.
Step 604, merging each shallow segmented image feature map with the corresponding segmented image feature map according to the feature map pixel point addition principle, so as to obtain each merged segmented feature map.
The characteristic image pixel point addition principle can be a pixel point addition algorithm.
The merging of the segmented feature map may be a result of merging the shallow segmented image feature map and the segmented image feature map.
Specifically, by utilizing the characteristic image pixel point addition principle, each shallow layer segmentation image characteristic image is respectively combined with the corresponding segmentation image characteristic image to obtain each combined segmentation characteristic image. For the combined theoretical basis, the following formula is satisfied:
P i =θdown(P i-1 ,size)+(1+θ)conv(C i )
wherein P is i To merge the segmentation feature map; down (P) i-1 Size) is a downsampling function; size is the sampled output size of the downsampling function; conv (C) i ) Is a merged convolution kernel; θ is the weighting factor of any combined segmented image feature map.
Step 606, determining a part of the recognition result of the electric element symbol according to each merging and splitting feature diagram.
Specifically, each merging and splitting feature map is provided with a corresponding electric element character prediction frame, each electric element character prediction frame gives out a prediction value, statistics is carried out through each electric element character prediction frame and each prediction value, and a partial electric element symbol recognition result corresponding to the vector design splitting image is obtained, wherein the partial electric element symbol recognition result represents a plurality of preliminarily recognized electric element symbols in the vector design splitting image. And finally, counting the recognition results corresponding to each vector design segmentation image, namely integrating the recognition results of each part of the electric element symbols to obtain the recognition results of each electric element symbol.
In the embodiment, a new feature pyramid network is constructed by using 2 paths from bottom to top, so that deep features are fused with shallow features through downsampling, semantic information of the deep features is enriched, and the recognition accuracy of the network can be improved.
In one embodiment, according to the principle of feature image pixel point addition, combining each shallow layer segmentation image feature map with a corresponding segmentation image feature map to obtain an expression corresponding to each step of combining the segmentation feature maps, wherein the expression corresponding to each step is as follows:
P i =θdown(P i-1 ,size)+(1+θ)conv(C i )
wherein P is i To merge the segmentation feature map; down (P) i-1 Size) is a downsampling function; size is the sampled output size of the downsampling function; conv (C) i ) Is a merged convolution kernel; θ is the weighting factor of any combined segmented image feature map.
In this embodiment, by combining each shallow segmented image feature map and the corresponding segmented image feature map by adding pixel points, multiple images of the same scene can be averaged, so as to reduce the influence of noise.
In one embodiment, as shown in fig. 7, the method further comprises:
step 702, obtaining a training sample vector design image corresponding to a distribution network project.
The training sample vector design image can be an image which is the same type as the distribution network engineering vector design image and is used for training the artificial intelligent model.
Specifically, the server 104 responds to an operation instruction of the terminal 102 to obtain training sample vector design images corresponding to the distribution network engineering from the terminal 102, wherein the training sample vector design images include electrical symbol images of each sample, then the obtained training sample vector design images are stored in a storage unit, and when the server needs to process the training sample vector design images, volatile storage resources are called from the storage unit for calculation by a central processing unit. The training sample vector design image may be a single image input to the central processing unit, or may be multiple images simultaneously input to the central processing unit.
And step 704, carrying out gray scale processing on the training sample vector design image to obtain a vector design gray scale sample image.
The vector design gray sample image may be a training sample vector design image subjected to gray processing.
Specifically, after the training sample vector design image is built, the training sample vector design image needs to be preprocessed, so that interference of irrelevant factors on model training is avoided. Since only the morphological characteristics of the symbol need be considered, and not the color characteristics thereof, in identifying the electrical symbol, interference of the color characteristics is eliminated. Therefore, firstly, converting a color image of a training sample vector design image into a gray image through gray processing, then denoising the original training sample vector design image in a binarization mode, setting a threshold value C=155, setting all pixel points with gray values smaller than the threshold value to be 0, setting all pixel points with gray values larger than the threshold value to be 255, and obtaining the vector design gray sample image.
And 706, labeling each sample electrical symbol image in the vector design gray sample image to obtain a labeled vector gray sample image.
Wherein the labeling vector gray sample image may be a vector design gray sample image with labeling data.
Specifically, each sample electrical symbol image in the vector design gray sample image is marked by using a sample marking tool to obtain a marked vector gray sample image, wherein the marked vector gray sample image can solve the problem that the original anchor frame in the improved YOLOv3 is set according to the public data set VOC Pascal and is not suitable for the data of the electrical symbol aimed in the vector design gray sample image.
Step 708, clustering the labeling parameters of the electrical symbols of each sample of the labeling vector gray sample image to obtain a clustered vector gray sample image.
The clustering vector gray sample image may be an image obtained by performing clustering processing on the electrical symbol labeling parameters of each sample.
Specifically, the size of an anchor frame in a network is determined by adopting a method of clustering electrical symbol labeling parameters of each sample by a K-means++ clustering algorithm, the K-means++ clustering algorithm is optimized in the selection of a clustering center, the randomness of a clustering result is reduced, and the selection method comprises the following steps:
(1) Randomly selecting 1 data point from the electrical symbol labeling parameters of each sample as a first initial clustering center C 1
(2) Calculating the electrical sign marking parameter (x) of any other sample i ,y i ) And cluster center (x) i ,y i ) The Euclidean distance D (x) and the probability P (x) that each sample electrical symbol labeling parameter is selected as the clustering center are calculated according to the formula
And selecting the point with the highest probability as the next clustering center.
(3) Repeating the step (2) until 9 initial cluster centers are selected.
(4) The process after the initial clustering center is selected is consistent with a K-means clustering algorithm, the electrical symbol marking parameters of each sample are distributed to the nearest clustering center to be divided into initial clusters, the centroid of each cluster is recalculated to be used as a new clustering center, and iteration is continued until the clusters are not changed any more or the maximum iteration times are reached, and vector gray sample images are clustered.
And 710, inputting the clustered vector gray sample image into an electric element symbol recognition model to be trained to obtain recognition results of all training electric element symbols.
Specifically, before the cluster vector gray sample image is input to the electric appliance element symbol recognition model to be trained, if the designed image size value of the cluster vector gray sample image is larger than the image input size value of the electric appliance element symbol recognition model to be trained of the distribution network engineering, the cluster vector gray sample image is input to the data redundant image segmentation model of the distribution network engineering, and each cluster vector gray sample segmentation image is obtained;
And inputting the clustering vector gray sample segmentation images into the electric appliance element symbol recognition model to be trained to obtain the recognition result of each training electric element symbol.
And step 712, training the electric appliance element symbol recognition model to be trained according to the recognition result of each training electric element symbol to obtain the electric appliance element symbol recognition model.
Specifically, calculating a model loss value of the electric appliance element symbol recognition model to be trained according to each training electric element symbol recognition result and each electric element symbol in the training sample vector design image, adjusting model parameters of the electric appliance element symbol recognition model to be trained according to the model loss value, and returning to execute the step of acquiring the training sample vector design image corresponding to the distribution network engineering until the model loss value of the electric appliance element symbol recognition model to be trained is smaller than a preset numerical value, so as to obtain the electric appliance element symbol recognition model.
In the embodiment, the size of the anchor frame in the network is determined by using a method of clustering the training set labels by using a K-means++ clustering algorithm, and the K-means++ clustering algorithm is optimized in the selection of a clustering center, so that the randomness of a clustering result is reduced, and the recognition accuracy of the electrical element symbol recognition model is higher and the generalization capability of the model is stronger.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an electrical element symbol recognition device based on the improved detection algorithm for realizing the electrical element symbol recognition method based on the improved detection algorithm for the distribution network engineering drawing. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the electrical element symbol recognition device provided in the following embodiment of one or more distribution network engineering drawings based on the improved detection algorithm may be referred to the limitation in the above description of the electrical element symbol recognition method of the distribution network engineering drawings based on the improved detection algorithm, which is not repeated herein.
In one embodiment, as shown in fig. 11, there is provided an electrical component symbol recognition apparatus of a distribution network engineering drawing based on an improved detection algorithm, including: a design image acquisition module 1102, a design image segmentation module 1104, a component symbol identification module 1106, and a component symbol determination module 1108, wherein:
a design image obtaining module 1102, configured to obtain a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value;
the design image segmentation module 1104 is configured to input a design image of a distribution network engineering vector to a data redundancy image segmentation model of the distribution network engineering to obtain each vector design segmentation image when the size value of the design image is greater than the image input size value of the electrical component symbol recognition model of the distribution network engineering;
the element symbol recognition module 1106 is configured to input each vector design segmentation image to an electrical element symbol recognition model to obtain each electrical element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer;
a component symbol determining module 1108, configured to take, as each identified electrical component symbol, an electrical component symbol identification result with a component symbol similarity greater than a similarity threshold; the similarity of the element symbols is the matching degree of the identification result of each electric element symbol and the corresponding standard electric element symbol image.
In one embodiment, the design image segmentation module 1104 is further configured to determine the number of transverse cuts and the number of longitudinal cuts of the design image of the distribution network engineering vector according to the size value of the design image; determining each cutting coordinate point corresponding to the distribution network engineering vector design image according to the transverse cutting times and the longitudinal cutting times; cutting the distribution network engineering vector design image according to the transverse cutting times, the longitudinal cutting times and the cutting coordinate points to obtain each distribution network engineering segmentation image corresponding to the distribution network engineering vector design image; and repeatedly detecting the split images of the distribution network engineering to obtain the split images of the vector design.
In one embodiment, the image segmentation module 1104 is further configured to perform image recognition on each of the segmented images of the distribution network engineering to obtain each of the segmented image recognition results; each segmented image recognition result includes an image detection frame; removing the image detection frames which do not meet the cross ratio threshold value in the image detection frames to obtain duplicate removal detection frames; and determining each vector design segmentation image according to each de-duplication detection frame.
In one embodiment, the element symbol identifying module 1106 is further configured to input the vector design segmented image to the separate convolution feature extraction layer for any vector design segmented image, so as to obtain each segmented image feature map corresponding to the vector design segmented image; carrying out multi-scale feature fusion on each segmented image feature map to obtain a part of electric element symbol recognition result corresponding to the vector design segmented image; and integrating the identification results of the partial electric element symbols corresponding to each vector design segmentation image to obtain the identification results of each electric element symbol.
In one embodiment, the element symbol identifying module 1106 is further configured to downsample each of the segmented image feature maps to obtain shallow segmented image feature maps corresponding to each of the segmented image feature maps; combining each shallow layer segmentation image feature map with the corresponding segmentation image feature map according to the feature image pixel point addition principle to obtain each combined segmentation feature map; and determining a part of electric element symbol recognition results according to the merging and dividing feature diagrams.
In one embodiment, the element symbol identifying module 1106 is further configured to combine each shallow segmented image feature map with a corresponding segmented image feature map according to a feature image pixel point addition principle, to obtain each combined segmented feature map, where the corresponding expression is:
P i =θdown(P i-1 ,size)+(1+θ)conv(C i )
wherein P is i To merge the segmentation feature map; down (P) i-1 Size) is a downsampling function; size is the sampled output size of the downsampling function; conv (C) i ) Is a merged convolution kernel; θ is the weighting factor of any combined segmented image feature map.
In one embodiment, the design image acquisition module 1102, the design image segmentation module 1104, the element symbol identification module 1106 and the element symbol determination module 1108 are all further configured to acquire a training sample vector design image corresponding to the distribution network engineering; the training sample vector design image comprises various sample electrical symbol images; carrying out gray processing on the training sample vector design image to obtain a vector design gray sample image; labeling each sample electrical symbol image in the vector design gray sample image to obtain a labeled vector gray sample image; the labeling vector gray scale sample image comprises electric symbol labeling parameters of each sample; clustering the labeling parameters of the electrical symbols of each sample of the labeling vector gray sample image to obtain a clustering vector gray sample image; inputting the clustered vector gray sample image into an electric element symbol recognition model to be trained to obtain recognition results of all training electric element symbols; and training the electric appliance element symbol recognition model to be trained according to the recognition result of each training electric element symbol to obtain the electric appliance element symbol recognition model.
The above-mentioned various modules in the electrical element symbol recognition device of the distribution network engineering drawing based on the improved detection algorithm can be implemented in whole or in part by software, hardware and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 12. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing server data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method for identifying electrical component symbols of a distribution network engineering drawing based on an improved detection algorithm.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
The user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. An electrical element symbol identification method of a distribution network engineering drawing based on an improved detection algorithm is characterized by comprising the following steps:
acquiring a distribution network engineering vector design image corresponding to a distribution network engineering; the distribution network engineering vector design image comprises a design image size value;
under the condition that the size value of the design image is larger than the image input size value of the electrical element symbol recognition model of the distribution network project, inputting the vector design image of the distribution network project into a data redundancy image segmentation model of the distribution network project to obtain each vector design segmentation image;
Inputting each vector design segmentation image into the electric element symbol recognition model to obtain each electric element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer;
using the recognition result of the electric element symbol with the similarity of the element symbol being greater than the similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
2. The method of claim 1, wherein said inputting the distribution network engineering vector design image into the data redundancy image segmentation model of the distribution network engineering to obtain each vector design segmentation image comprises:
according to the size value of the design image, determining the transverse cutting times and the longitudinal cutting times of the design image of the distribution network engineering vector;
determining each cutting coordinate point corresponding to the distribution network engineering vector design image according to the transverse cutting times and the longitudinal cutting times;
cutting the distribution network engineering vector design image according to the transverse cutting times, the longitudinal cutting times and the cutting coordinate points to obtain each distribution network engineering segmentation image corresponding to the distribution network engineering vector design image;
And repeatedly detecting each distribution network engineering segmentation image to obtain each vector design segmentation image.
3. The method of claim 2, wherein performing the repetitive detection on each of the distribution network engineering segmented images to obtain each of the vector design segmented images comprises:
carrying out image recognition on each distribution network engineering segmented image to obtain each segmented image recognition result; each segmented image recognition result comprises an image detection frame;
removing the image detection frames which do not meet the cross ratio threshold value in the image detection frames to obtain duplicate removal detection frames;
and determining each vector design segmentation image according to each de-duplication detection frame.
4. The method of claim 1, wherein inputting each of the vector design segmentation images into the electrical component symbol recognition model to obtain each electrical component symbol recognition result comprises:
inputting the vector design segmentation image into the separation convolution feature extraction layer aiming at any vector design segmentation image to obtain each segmentation image feature map corresponding to the vector design segmentation image;
performing multi-scale feature fusion on each segmented image feature map to obtain a part of electric element symbol recognition result corresponding to the vector design segmented image;
And integrating the partial electric element symbol recognition results corresponding to the vector design segmentation images to obtain the electric element symbol recognition results.
5. The method of claim 4, wherein the performing multi-scale feature fusion on each of the segmented image feature maps to obtain a partial electrical element symbol recognition result corresponding to the vector design segmented image includes:
downsampling each segmented image feature map to obtain shallow segmented image feature maps corresponding to each segmented image feature map;
combining each shallow segmented image feature map with a corresponding segmented image feature map according to a feature image pixel point addition principle to obtain each combined segmented feature map;
and determining the identification result of the part of electric element symbols according to each merging and dividing feature diagram.
6. The method according to claim 5, wherein the step of merging each shallow segmented image feature map with a corresponding segmented image feature map according to a feature map pixel point addition principle to obtain each merged segmented feature map includes the following expression:
P i =θdown(P i-1 ,size)+(1+θ)conv(C i )
wherein the P is i Segmenting the feature map for the merge; said down (P i-1 Size) is a downsampling function; the size is the sampling output size of the downsampling function; said conv (C) i ) Is the convolution kernel of the merging; and the theta is a weight factor of any one of the combined segmented image feature graphs.
7. The method according to claim 1, wherein the method further comprises:
acquiring a training sample vector design image corresponding to the distribution network engineering; the training sample vector design image comprises various sample electrical symbol images;
carrying out gray processing on the training sample vector design image to obtain a vector design gray sample image;
labeling each sample electrical symbol image in the vector design gray sample image to obtain a labeled vector gray sample image; the labeling vector gray scale sample image comprises electric symbol labeling parameters of each sample;
clustering the labeling parameters of the electrical symbols of each sample of the labeling vector gray sample image to obtain a clustering vector gray sample image;
inputting the clustering vector gray sample image into an electric appliance element symbol recognition model to be trained to obtain recognition results of all training electric element symbols;
and training the electric element symbol recognition model to be trained according to the training electric element symbol recognition results to obtain the electric element symbol recognition model.
8. An electrical component symbol recognition device of a distribution network engineering drawing based on an improved detection algorithm, which is characterized by comprising:
the design image acquisition module is used for acquiring a distribution network engineering vector design image corresponding to the distribution network engineering; the distribution network engineering vector design image comprises a design image size value;
the design image segmentation module is used for inputting the vector design image of the distribution network project into the data redundancy image segmentation model of the distribution network project under the condition that the size value of the design image is larger than the image input size value of the electric appliance element symbol recognition model of the distribution network project, so as to obtain each vector design segmentation image;
the element symbol recognition module is used for inputting each vector design segmentation image into the electrical element symbol recognition model to obtain each electrical element symbol recognition result; the electrical element symbol recognition model comprises a separation convolution feature extraction layer;
the element symbol determining module is used for taking an electric element symbol recognition result with the element symbol similarity larger than a similarity threshold value as each recognition electric element symbol; the similarity of the element symbols is the matching degree of the identification result of each electrical element symbol and the corresponding standard electrical element symbol image.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310720436.7A 2023-06-16 2023-06-16 Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm Pending CN116884027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310720436.7A CN116884027A (en) 2023-06-16 2023-06-16 Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310720436.7A CN116884027A (en) 2023-06-16 2023-06-16 Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm

Publications (1)

Publication Number Publication Date
CN116884027A true CN116884027A (en) 2023-10-13

Family

ID=88268883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310720436.7A Pending CN116884027A (en) 2023-06-16 2023-06-16 Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm

Country Status (1)

Country Link
CN (1) CN116884027A (en)

Similar Documents

Publication Publication Date Title
TWI821671B (en) A method and device for positioning text areas
WO2019075130A1 (en) Image processing method and processing device
Wang et al. Background-driven salient object detection
WO2022105125A1 (en) Image segmentation method and apparatus, computer device, and storage medium
US10769784B2 (en) Image analyzing method and electrical device
CN113239818B (en) Table cross-modal information extraction method based on segmentation and graph convolution neural network
CN112861575A (en) Pedestrian structuring method, device, equipment and storage medium
CN110852327A (en) Image processing method, image processing device, electronic equipment and storage medium
CN112529068B (en) Multi-view image classification method, system, computer equipment and storage medium
CN113869138A (en) Multi-scale target detection method and device and computer readable storage medium
CN111192279B (en) Object segmentation method based on edge detection, electronic terminal and storage medium
CN112418256A (en) Classification, model training and information searching method, system and equipment
CN111340139B (en) Method and device for judging complexity of image content
CN117058554A (en) Power equipment target detection method, model training method and device
CN114511862B (en) Form identification method and device and electronic equipment
CN112785601B (en) Image segmentation method, system, medium and electronic terminal
CN116884027A (en) Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm
CN115116080A (en) Table analysis method and device, electronic equipment and storage medium
CN111178409B (en) Image matching and recognition system based on big data matrix stability analysis
CN107766863B (en) Image characterization method and server
Karambakhsh et al. SparseVoxNet: 3-D Object Recognition With Sparsely Aggregation of 3-D Dense Blocks
CN116468960B (en) Video image analysis and retrieval method and system
Maihami et al. Color Features and Color Spaces Applications to the Automatic Image Annotation
CN108830313B (en) Symbiotic mode image mining method
CN112287136A (en) Image feature index library establishing method and similar image determining method

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