CN111860641A - Power grid image identification method, electronic device and storage medium - Google Patents

Power grid image identification method, electronic device and storage medium Download PDF

Info

Publication number
CN111860641A
CN111860641A CN202010694444.5A CN202010694444A CN111860641A CN 111860641 A CN111860641 A CN 111860641A CN 202010694444 A CN202010694444 A CN 202010694444A CN 111860641 A CN111860641 A CN 111860641A
Authority
CN
China
Prior art keywords
power grid
grid image
image
preset
recognition
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.)
Withdrawn
Application number
CN202010694444.5A
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.)
Dongguan University of Technology
Original Assignee
Dongguan University of Technology
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 Dongguan University of Technology filed Critical Dongguan University of Technology
Priority to CN202010694444.5A priority Critical patent/CN111860641A/en
Publication of CN111860641A publication Critical patent/CN111860641A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to image recognition and provides a power grid image recognition method, an electronic device and a storage medium. Inputting the power grid image to be recognized into a type recognition model to obtain a first recognition result, judging whether the first recognition result meets a first preset condition, if so, obtaining a fault recognition model corresponding to the power grid image type of the power grid image to be recognized based on a preset mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, judging whether a second confidence coefficient in the second recognition result is greater than a second preset threshold value, feeding the second recognition result back to a user side when judging that the second confidence coefficient is greater than or equal to the second preset threshold value, and sending the power grid image to be recognized to a preset user side when judging that the second confidence coefficient is less than the second preset threshold value. The invention can improve the accuracy of power grid image identification.

Description

Power grid image identification method, electronic device and storage medium
Technical Field
The present invention relates to the field of image recognition, and in particular, to a power grid image recognition method, an electronic device, and a storage medium.
Background
The power line coverage in the power grid system is wide, the terrain of the passing area is complex, the natural environment is severe, and the power department needs to spend huge manpower and material resources to inspect the lines, equipment and components of the power grid every year so as to master the operation condition and timely eliminate the potential hidden danger of the power grid system.
Most of power grid lines, equipment and the like are in complex natural environments, so that the accuracy rate of directly carrying out fault identification on power grid images shot by an unmanned aerial vehicle by utilizing the existing image identification technology is very low. Therefore, how to perform efficient intelligent recognition on the image of the power grid system becomes a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention provides a power grid image recognition method, an electronic device and a storage medium, and aims to solve the technical problem of low accuracy of power grid image recognition in the prior art.
In order to achieve the above object, the present invention provides a power grid image recognition method, including:
receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request;
Inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized;
judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not;
and when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
Preferably, the method further comprises:
and when the first identification result does not meet the first preset condition, performing image transformation on the to-be-identified power grid image to obtain a transformed to-be-identified power grid image, inputting the transformed to-be-identified power grid image into the type identification model to obtain an identification result of the transformed to-be-identified power grid image, and taking the power grid image type in the identification result as the power grid image type of the to-be-identified power grid image.
Preferably, the performing of the image transformation process on the power grid image to be identified includes:
extracting high-dimensional vectors of the power grid image to be identified, respectively matching the high-dimensional vectors with a preset low-dimensional vector library, and if the corresponding low-dimensional vectors are matched, generating a matched sample as a feature vector after the power grid image to be identified is transformed;
and if the corresponding low-dimensional vector is not matched, selecting a preset low-dimensional vector in the low-dimensional vector library as the feature vector after the power grid image to be identified is transformed.
Preferably, the fault identification model is obtained by training an SSD model, and the specific training process includes:
acquiring a first preset number of power grid normal images and corresponding power grid fault images, and cutting each power grid image to generate a cut image set;
dividing the cut image set into a training set and a verification set based on a preset proportion;
training an SSD model by using each cutting image set in the training set to generate a fault recognition model, and verifying the accuracy of the generated fault recognition model by using each cutting image set in the verification set;
when the accuracy is greater than or equal to a preset threshold, finishing training, when the accuracy is smaller than the preset threshold, adding a second preset number of power grid normal images and corresponding power grid fault images, cutting the added power grid images, and then returning the process of dividing the cut image set into a training set and a verification set.
Preferably, the cutting each grid image to generate a cut image set includes:
cutting each power grid normal image and the corresponding power grid fault image into a target sample image with a first preset size;
and respectively cutting each target sample image along the directions of the x axis and the y axis by preset step length to obtain a plurality of corresponding cut images with a second preset size, wherein the plurality of cut images corresponding to each target sample image are used as a cut image set.
To achieve the above object, the present invention also provides an electronic device, including: the power grid image recognition program is executed by the processor, and the following steps are realized:
receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request;
inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized;
judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not;
And when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
Preferably, when executed by the processor, the power grid image recognition program further implements the following steps:
and when the first identification result does not meet the first preset condition, performing image transformation on the to-be-identified power grid image to obtain a transformed to-be-identified power grid image, inputting the transformed to-be-identified power grid image into the type identification model to obtain an identification result of the transformed to-be-identified power grid image, and taking the power grid image type in the identification result as the power grid image type of the to-be-identified power grid image.
Preferably, the performing of the image transformation process on the power grid image to be identified includes:
extracting high-dimensional vectors of the power grid image to be identified, respectively matching the high-dimensional vectors with a preset low-dimensional vector library, and if the corresponding low-dimensional vectors are matched, generating a matched sample as a feature vector after the power grid image to be identified is transformed;
And if the corresponding low-dimensional vector is not matched, selecting a preset low-dimensional vector in the low-dimensional vector library as the feature vector after the power grid image to be identified is transformed.
Preferably, the fault identification model is obtained by training an SSD model, and the specific training process includes:
acquiring a first preset number of power grid normal images and corresponding power grid fault images, and cutting each power grid image to generate a cut image set;
dividing the cut image set into a training set and a verification set based on a preset proportion;
training an SSD model by using each cutting image set in the training set to generate a fault recognition model, and verifying the accuracy of the generated fault recognition model by using each cutting image set in the verification set;
when the accuracy is greater than or equal to a preset threshold, finishing training, when the accuracy is smaller than the preset threshold, adding a second preset number of power grid normal images and corresponding power grid fault images, cutting the added power grid images, and then returning the process of dividing the cut image set into a training set and a verification set.
In order to achieve the above object, the present invention further provides a computer readable storage medium, which includes a power grid image recognition program, and when the power grid image recognition program is executed by a processor, the power grid image recognition program implements any step of the power grid image recognition method as described above.
According to the power grid image identification method, the electronic device and the storage medium, the type (such as a line, equipment or a component) of the power grid image is identified through the type identification model, when the obtained confidence value meets the preset condition, the fault identification model corresponding to the type is obtained according to the mapping relation, whether the power grid image to be inspected has a fault or not is identified, the condition that the identification efficiency is low due to the fact that a single model directly identifies the fault of the power grid image is avoided, and the accuracy of power grid image identification is improved.
Drawings
FIG. 1 is a diagram of an electronic device according to a preferred embodiment of the present invention;
FIG. 2 is a block diagram of a preferred embodiment of the grid image recognition process of FIG. 1;
FIG. 3 is a flow chart of a preferred embodiment of the grid image recognition method of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a schematic diagram of an electronic device 1 according to a preferred embodiment of the invention is shown.
The electronic device 1 includes but is not limited to: memory 11, processor 12, display 13, and network interface 14. The electronic device 1 is connected to a network through a network interface 14 to obtain raw data. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System for mobile communications (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or a communication network.
The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic apparatus 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided in the electronic apparatus 1. Of course, the memory 11 may also comprise both an internal memory unit of the electronic apparatus 1 and an external memory device thereof. In this embodiment, the memory 11 is generally used for storing an operating system installed in the electronic device 1 and various types of application software, such as a program code of the power grid image recognition program 10. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally used for controlling the overall operation of the electronic device 1, such as performing data interaction or communication related control and processing. In this embodiment, the processor 12 is configured to run the program code stored in the memory 11 or process data, for example, run the program code of the power grid image recognition program 10.
The display 13 may be referred to as a display screen or display unit. In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-emitting diode (OLED) touch screen, or the like. The display 13 is used for displaying information processed in the electronic device 1 and for displaying a visual work interface, for example, results of data statistics.
The network interface 14 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), the network interface 14 typically being used for establishing a communication connection between the electronic apparatus 1 and other electronic devices.
Fig. 1 shows only the electronic device 1 with the components 11-14 and the grid image recognition program 10, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the electronic device 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface.
The electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described in detail herein.
In the above embodiment, the processor 12, when executing the power grid image recognition program 10 stored in the memory 11, may implement the following steps:
receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request;
inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized;
judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not;
And when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
The storage device may be the memory 11 of the electronic apparatus 1, or may be another storage device communicatively connected to the electronic apparatus 1.
For detailed description of the above steps, please refer to the following description of fig. 2 regarding a program module diagram of an embodiment of the grid image recognition program 10 and fig. 3 regarding a flowchart of an embodiment of the grid image recognition method.
In other embodiments, the grid image recognition program 10 may be divided into a plurality of modules, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
Referring to fig. 2, a block diagram of an embodiment of the grid image recognition program 10 in fig. 1 is shown. In this embodiment, the grid image recognition program 10 may be divided into: a receiving module 110, a first identifying module 120, a second identifying module 130 and a feedback module 140.
The receiving module 110 is configured to receive a power grid image identification request sent by a user, analyze the request, and obtain a to-be-identified power grid image carried in the request.
In this embodiment, an identification request of a power grid image sent by a user end is received, and the request is analyzed to obtain a power grid image to be identified carried in the request, where it should be noted that the power grid image in this embodiment may refer to a line image, an equipment image, or a certain component image of a power grid system or an electric power system, and the obtained power grid image may be a power grid image obtained when an unmanned aerial vehicle patrols the power grid. The request may include the power grid image to be identified, and may also include a storage path and a unique identifier of the power grid image to be identified. That is to say, the power grid image to be identified may be entered by the user at the time of submitting the identification request, or may be acquired from an address specified by the request after the user submits the identification request.
The first recognition module 120 is configured to input the to-be-recognized power grid image into a pre-trained type recognition model to obtain a first recognition result, where the first recognition result includes a power grid image type of the to-be-recognized power grid image and a first confidence value.
In this embodiment, the power grid image to be recognized is input into a pre-trained type recognition model, so as to obtain a first recognition result, where the first recognition result includes the power grid image type of the power grid image to be recognized and a first confidence value. The type recognition model is a multi-classifier model, and can be obtained through convolutional neural network training, and the type of the power grid image to be recognized can be obtained by inputting the power grid image to be recognized into the type recognition model, for example, the power grid image is a component image. Due to the influence of factors such as the illumination environment and the like, deviation may occur in the type identification result of the power grid image to be identified, and therefore, whether the confidence coefficient in the identification result of the power grid image meets the preset condition or not can be judged.
In an embodiment, when it is determined that the first recognition result does not satisfy the first preset condition, performing image transformation on the to-be-recognized power grid image to obtain a transformed to-be-recognized power grid image, inputting the transformed to-be-recognized power grid image into the type recognition model to obtain a recognition result of the transformed to-be-recognized power grid image, and taking a power grid image type in the recognition result as a power grid image type of the to-be-recognized power grid image. The first preset condition may be that the first confidence value is greater than 0.9, and when it is determined that the first recognition result does not satisfy the first preset condition, it indicates that a large error may exist in the recognition result, so that the conversion processing may be performed on the to-be-recognized power grid image, the to-be-recognized power grid image after the conversion processing is input into the type recognition model, the recognition result of the to-be-recognized power grid image after the conversion processing is obtained, and the power grid image type in the recognition result is used as the power grid image type of the to-be-recognized power grid image.
Further, the performing image transformation processing on the power grid image to be identified comprises:
extracting high-dimensional vectors of the power grid image to be identified, respectively matching the high-dimensional vectors with a preset low-dimensional vector library, and if the corresponding low-dimensional vectors are matched, generating a matched sample as a feature vector after the power grid image to be identified is transformed;
and if the corresponding low-dimensional vector is not matched, selecting a preset low-dimensional vector in the low-dimensional vector library as the feature vector after the power grid image to be identified is transformed.
The power grid image to be identified is subjected to image transformation processing, data of the same power grid image to be identified are expanded, the transformed area to be identified is input into the identification model, different identification results are further screened and compared, the optimal result is obtained and serves as an output result, and the accuracy of the output result of the type identification model can be improved.
The second recognition module 130 is configured to determine whether the first recognition result meets a first preset condition based on the first confidence value, obtain, when it is determined that the first recognition result meets the first preset condition, a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relationship between the power grid image type and the fault recognition model, input the power grid image to be recognized into the fault recognition model, obtain a second recognition result, and determine whether a second confidence in the second recognition result is greater than a second preset threshold.
In this embodiment, whether the first recognition result meets a first preset condition is judged based on the first confidence value, when the first recognition result meets the first preset condition is judged, it is indicated that the accuracy of the power grid image type recognition is high, at this time, a fault recognition model corresponding to the power grid image type of the power grid image to be recognized is obtained from a preset database based on a pre-configured mapping relationship between the power grid image type and the fault recognition model, the database stores the fault recognition models corresponding to the power grid images of various types, the power grid image to be recognized is input into the fault recognition model to obtain a second recognition result, and then whether a second confidence in the second recognition result is greater than a second preset threshold is judged.
In one embodiment, the fault identification model is obtained by SSD model training, and the specific training process includes:
acquiring a first preset number (5 thousands) of power grid normal images and corresponding power grid fault images, and cutting each power grid image to generate a cut image set;
dividing the cut image set into a training set and a verification set based on a preset proportion;
training an SSD model by using each cutting image set in the training set to generate a fault recognition model, and verifying the accuracy of the generated fault recognition model by using each cutting image set in the verification set;
When the accuracy is greater than or equal to a preset threshold, finishing training, when the accuracy is smaller than the preset threshold, adding a second preset number of power grid normal images and corresponding power grid fault images, cutting the added power grid images, and then returning the process of dividing the cut image set into a training set and a verification set.
Further, the cutting processing of each grid image to generate a cut image set includes:
cutting each power grid normal image and the corresponding power grid fault image into a target sample image with a first preset size;
and respectively cutting each target sample image along the directions of the x axis and the y axis by preset step length to obtain a plurality of corresponding cut images with a second preset size, wherein the plurality of cut images corresponding to each target sample image are used as a cut image set. For example, a 2048 × 2048 pixel-sized grid image is cropped to 299 × 299 pixel-sized target images, an origin is set at the lower left corner of the target images, the left boundary of the target images is taken as the Y axis, the lower boundary of the target images is taken as the X axis, and if the cropping is performed with the step size of 32 pixels, 9 cropped images of 224 × 224 pixels can be obtained for each target image.
The feedback module 140 is configured to feed back the second recognition result to the user side when it is determined that the second confidence value is greater than or equal to a second preset threshold, and send the to-be-recognized power grid image to a preset user side when it is determined that the second confidence value is less than the second preset threshold.
In this embodiment, when the second confidence value is greater than or equal to a second preset threshold (e.g., 0.95), which indicates that the accuracy of the identification result is high, the second identification result may be directly fed back to the user terminal, when the second confidence value is smaller than the second preset threshold, the to-be-identified power grid image is sent to the preset user terminal, the preset user terminal is a user terminal that is manually checked and identified, and when the second confidence value is smaller than the second preset threshold, whether the power grid image has a fault is further checked manually. The type of the power grid image (such as a line, equipment or a component) is identified through the type identification model, after the type of the power grid image is obtained, the fault identification model corresponding to the type is obtained according to the mapping relation, whether the power grid image to be inspected has a fault or not is identified, and the condition that the identification efficiency is low due to the fact that a single model directly identifies the fault of the power grid image is avoided.
In addition, the invention also provides a power grid image identification method. Fig. 3 is a schematic method flow diagram of an embodiment of the power grid image recognition method according to the present invention. When the processor 12 of the electronic device 1 executes the grid image recognition program 10 stored in the memory 11, the following steps of the grid image recognition method are implemented:
step S10: receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request.
In this embodiment, an identification request of a power grid image sent by a user end is received, and the request is analyzed to obtain a power grid image to be identified carried in the request, where it should be noted that the power grid image in this embodiment may refer to a line image, an equipment image, or a certain component image of a power grid system or an electric power system, and the obtained power grid image may be a power grid image obtained when an unmanned aerial vehicle patrols the power grid. The request may include the power grid image to be identified, and may also include a storage path and a unique identifier of the power grid image to be identified. That is to say, the power grid image to be identified may be entered by the user at the time of submitting the identification request, or may be acquired from an address specified by the request after the user submits the identification request.
Step S20: and inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized.
In this embodiment, the power grid image to be recognized is input into a pre-trained type recognition model, so as to obtain a first recognition result, where the first recognition result includes the power grid image type of the power grid image to be recognized and a first confidence value. The type recognition model is a multi-classifier model, and can be obtained through convolutional neural network training, and the type of the power grid image to be recognized can be obtained by inputting the power grid image to be recognized into the type recognition model, for example, the power grid image is a component image. Due to the influence of factors such as the illumination environment and the like, deviation may occur in the type identification result of the power grid image to be identified, and therefore, whether the confidence coefficient in the identification result of the power grid image meets the preset condition or not can be judged.
In an embodiment, when it is determined that the first recognition result does not satisfy the first preset condition, performing image transformation on the to-be-recognized power grid image to obtain a transformed to-be-recognized power grid image, inputting the transformed to-be-recognized power grid image into the type recognition model to obtain a recognition result of the transformed to-be-recognized power grid image, and taking a power grid image type in the recognition result as a power grid image type of the to-be-recognized power grid image. The first preset condition may be that the first confidence value is greater than 0.9, and when it is determined that the first recognition result does not satisfy the first preset condition, it indicates that a large error may exist in the recognition result, so that the conversion processing may be performed on the to-be-recognized power grid image, the to-be-recognized power grid image after the conversion processing is input into the type recognition model, the recognition result of the to-be-recognized power grid image after the conversion processing is obtained, and the power grid image type in the recognition result is used as the power grid image type of the to-be-recognized power grid image.
Further, the performing image transformation processing on the power grid image to be identified comprises:
extracting high-dimensional vectors of the power grid image to be identified, respectively matching the high-dimensional vectors with a preset low-dimensional vector library, and if the corresponding low-dimensional vectors are matched, generating a matched sample as a feature vector after the power grid image to be identified is transformed;
and if the corresponding low-dimensional vector is not matched, selecting a preset low-dimensional vector in the low-dimensional vector library as the feature vector after the power grid image to be identified is transformed.
The power grid image to be identified is subjected to image transformation processing, data of the same power grid image to be identified are expanded, the transformed area to be identified is input into the identification model, different identification results are further screened and compared, the optimal result is obtained and serves as an output result, and the accuracy of the output result of the type identification model can be improved.
Step S30: and judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a preset mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not.
In this embodiment, whether the first recognition result meets a first preset condition is judged based on the first confidence value, when the first recognition result meets the first preset condition is judged, it is indicated that the accuracy of the power grid image type recognition is high, at this time, a fault recognition model corresponding to the power grid image type of the power grid image to be recognized is obtained from a preset database based on a pre-configured mapping relationship between the power grid image type and the fault recognition model, the database stores the fault recognition models corresponding to the power grid images of various types, the power grid image to be recognized is input into the fault recognition model to obtain a second recognition result, and then whether a second confidence in the second recognition result is greater than a second preset threshold is judged.
In one embodiment, the fault identification model is obtained by SSD model training, and the specific training process includes:
acquiring a first preset number (5 thousands) of power grid normal images and corresponding power grid fault images, and cutting each power grid image to generate a cut image set;
dividing the cut image set into a training set and a verification set based on a preset proportion;
training an SSD model by using each cutting image set in the training set to generate a fault recognition model, and verifying the accuracy of the generated fault recognition model by using each cutting image set in the verification set;
When the accuracy is greater than or equal to a preset threshold, finishing training, when the accuracy is smaller than the preset threshold, adding a second preset number of power grid normal images and corresponding power grid fault images, cutting the added power grid images, and then returning the process of dividing the cut image set into a training set and a verification set.
Further, the cutting processing of each grid image to generate a cut image set includes:
cutting each power grid normal image and the corresponding power grid fault image into a target sample image with a first preset size;
and respectively cutting each target sample image along the directions of the x axis and the y axis by preset step length to obtain a plurality of corresponding cut images with a second preset size, wherein the plurality of cut images corresponding to each target sample image are used as a cut image set. For example, a 2048 × 2048 pixel-sized grid image is cropped to 299 × 299 pixel-sized target images, an origin is set at the lower left corner of the target images, the left boundary of the target images is taken as the Y axis, the lower boundary of the target images is taken as the X axis, and if the cropping is performed with the step size of 32 pixels, 9 cropped images of 224 × 224 pixels can be obtained for each target image.
Step S40: and when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
In this embodiment, when the second confidence value is greater than or equal to a second preset threshold (e.g., 0.95), which indicates that the accuracy of the identification result is high, the second identification result may be directly fed back to the user terminal, when the second confidence value is smaller than the second preset threshold, the to-be-identified power grid image is sent to the preset user terminal, the preset user terminal is a user terminal that is manually checked and identified, and when the second confidence value is smaller than the second preset threshold, whether the power grid image has a fault is further checked manually. The type of the power grid image (such as a line, equipment or a component) is identified through the type identification model, after the type of the power grid image is obtained, the fault identification model corresponding to the type is obtained according to the mapping relation, whether the power grid image to be inspected has a fault or not is identified, and the condition that the identification efficiency is low due to the fact that a single model directly identifies the fault of the power grid image is avoided.
Furthermore, the embodiment of the present invention also provides a computer-readable storage medium, which may be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer readable storage medium includes a power grid image recognition program 10, and when executed by a processor, the power grid image recognition program 10 implements the following operations:
receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request;
inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized;
judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not;
And when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the above-mentioned grid image recognition method, and will not be described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention essentially or contributing to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, an electronic device, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A power grid image identification method is applied to an electronic device, and is characterized by comprising the following steps:
Receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request;
inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized;
judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not;
and when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
2. The grid image recognition method according to claim 1, wherein the method further comprises:
and when the first identification result does not meet the first preset condition, performing image transformation on the to-be-identified power grid image to obtain a transformed to-be-identified power grid image, inputting the transformed to-be-identified power grid image into the type identification model to obtain an identification result of the transformed to-be-identified power grid image, and taking the power grid image type in the identification result as the power grid image type of the to-be-identified power grid image.
3. The power grid image recognition method according to claim 2, wherein the performing of the image transformation process on the power grid image to be recognized includes:
extracting high-dimensional vectors of the power grid image to be identified, respectively matching the high-dimensional vectors with a preset low-dimensional vector library, and if the corresponding low-dimensional vectors are matched, generating a matched sample as a feature vector after the power grid image to be identified is transformed;
and if the corresponding low-dimensional vector is not matched, selecting a preset low-dimensional vector in the low-dimensional vector library as the feature vector after the power grid image to be identified is transformed.
4. The power grid image recognition method according to claim 1, wherein the fault recognition model is obtained by SSD model training, and the specific training process includes:
acquiring a first preset number of power grid normal images and corresponding power grid fault images, and cutting each power grid image to generate a cut image set;
dividing the cut image set into a training set and a verification set based on a preset proportion;
training an SSD model by using each cutting image set in the training set to generate a fault recognition model, and verifying the accuracy of the generated fault recognition model by using each cutting image set in the verification set;
when the accuracy is greater than or equal to a preset threshold, finishing training, when the accuracy is smaller than the preset threshold, adding a second preset number of power grid normal images and corresponding power grid fault images, cutting the added power grid images, and then returning the process of dividing the cut image set into a training set and a verification set.
5. The grid image recognition method according to claim 4, wherein the cropping each grid image to generate a cropped image set comprises:
Cutting each power grid normal image and the corresponding power grid fault image into a target sample image with a first preset size;
and respectively cutting each target sample image along the directions of the x axis and the y axis by preset step length to obtain a plurality of corresponding cut images with a second preset size, wherein the plurality of cut images corresponding to each target sample image are used as a cut image set.
6. An electronic device, comprising a memory and a processor, wherein a grid image recognition program is stored in the memory, and the grid image recognition program is executed by the processor, and the following steps are implemented:
receiving a power grid image identification request sent by a user side, analyzing the request, and acquiring a power grid image to be identified carried in the request;
inputting the power grid image to be recognized into a pre-trained type recognition model to obtain a first recognition result, wherein the first recognition result comprises the power grid image type and a first confidence value of the power grid image to be recognized;
judging whether the first recognition result meets a first preset condition or not based on the first confidence value, when the first recognition result meets the first preset condition, acquiring a fault recognition model corresponding to the power grid image type of the power grid image to be recognized from a preset database based on a pre-configured mapping relation between the power grid image type and the fault recognition model, inputting the power grid image to be recognized into the fault recognition model to obtain a second recognition result, and judging whether a second confidence in the second recognition result is greater than a second preset threshold or not;
And when the second confidence value is judged to be larger than or equal to a second preset threshold value, feeding back the second recognition result to the user side, and when the second confidence value is judged to be smaller than the second preset threshold value, sending the power grid image to be recognized to a preset user side.
7. The electronic device of claim 6, wherein the grid image recognition program, when executed by the processor, further performs the steps of:
and when the first identification result does not meet the first preset condition, performing image transformation on the to-be-identified power grid image to obtain a transformed to-be-identified power grid image, inputting the transformed to-be-identified power grid image into the type identification model to obtain an identification result of the transformed to-be-identified power grid image, and taking the power grid image type in the identification result as the power grid image type of the to-be-identified power grid image.
8. The electronic device of claim 7, wherein the performing image transformation processing on the to-be-identified grid image comprises:
extracting high-dimensional vectors of the power grid image to be identified, respectively matching the high-dimensional vectors with a preset low-dimensional vector library, and if the corresponding low-dimensional vectors are matched, generating a matched sample as a feature vector after the power grid image to be identified is transformed;
And if the corresponding low-dimensional vector is not matched, selecting a preset low-dimensional vector in the low-dimensional vector library as the feature vector after the power grid image to be identified is transformed.
9. The electronic device of claim 6, wherein the fault recognition model is trained by an SSD model, and the specific training process comprises:
acquiring a first preset number of power grid normal images and corresponding power grid fault images, and cutting each power grid image to generate a cut image set;
dividing the cut image set into a training set and a verification set based on a preset proportion;
training an SSD model by using each cutting image set in the training set to generate a fault recognition model, and verifying the accuracy of the generated fault recognition model by using each cutting image set in the verification set;
when the accuracy is greater than or equal to a preset threshold, finishing training, when the accuracy is smaller than the preset threshold, adding a second preset number of power grid normal images and corresponding power grid fault images, cutting the added power grid images, and then returning the process of dividing the cut image set into a training set and a verification set.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a grid image recognition program, which when executed by a processor implements the steps of the grid image recognition method according to any one of claims 1 to 5.
CN202010694444.5A 2020-07-17 2020-07-17 Power grid image identification method, electronic device and storage medium Withdrawn CN111860641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010694444.5A CN111860641A (en) 2020-07-17 2020-07-17 Power grid image identification method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010694444.5A CN111860641A (en) 2020-07-17 2020-07-17 Power grid image identification method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN111860641A true CN111860641A (en) 2020-10-30

Family

ID=73000576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010694444.5A Withdrawn CN111860641A (en) 2020-07-17 2020-07-17 Power grid image identification method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111860641A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819183A (en) * 2021-01-29 2021-05-18 广州中科智巡科技有限公司 Algorithm and system for intelligently distinguishing heating defects of power transmission and distribution line
CN113392730A (en) * 2021-05-31 2021-09-14 国网福建省电力有限公司 Power distribution network equipment image identification method and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819183A (en) * 2021-01-29 2021-05-18 广州中科智巡科技有限公司 Algorithm and system for intelligently distinguishing heating defects of power transmission and distribution line
CN113392730A (en) * 2021-05-31 2021-09-14 国网福建省电力有限公司 Power distribution network equipment image identification method and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110502608B (en) Man-machine conversation method and man-machine conversation device based on knowledge graph
CN109992601B (en) To-do information pushing method and device and computer equipment
CN111538942B (en) Expression processing method, electronic device and storage medium
CN111695439A (en) Image structured data extraction method, electronic device and storage medium
CN110647451A (en) Application program abnormity analysis method and generation method
CN112559354A (en) Front-end code specification detection method and device, computer equipment and storage medium
CN110780965B (en) Vision-based process automation method, equipment and readable storage medium
CN111860641A (en) Power grid image identification method, electronic device and storage medium
CN111258799A (en) Error reporting information processing method, electronic device and computer readable storage medium
CN110458184B (en) Optical character recognition assistance method, device, computer equipment and storage medium
CN113761012A (en) Analysis visualization method of remote sensing data, server and storage medium
CN116975010B (en) Electronic material library sharing method and system
CN116245074A (en) Chip verification method, device and storage medium
CN111459812A (en) Interface test case generation method, electronic device and storage medium
CN112181835A (en) Automatic testing method and device, computer equipment and storage medium
CN111400435B (en) Mail alarm convergence method, device, computer equipment and storage medium
KR102170930B1 (en) Car damage picture angle correction method, electronic device and readable storage medium
CN114241499A (en) Table picture identification method, device and equipment and readable storage medium
CN112416648A (en) Data verification method and device
CN111414519A (en) Information processing method, device, computer system and readable storage medium
CN110442663B (en) Raster data batch clipping method and device and computer readable storage medium
CN115455271A (en) Label generating method, device and equipment based on search query words and storage medium
CN110717521B (en) Intelligent service implementation method and device and computer readable storage medium
CN111343502B (en) Video processing method, electronic device and computer readable storage medium
CN109284097B (en) Method, device, system and storage medium for realizing complex data analysis

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20201030

WW01 Invention patent application withdrawn after publication