Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present 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.
In the description of the present invention, it should be noted that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention provides a power grid fault inspection method, as shown in fig. 1, comprising the following steps:
step S11: and controlling the image acquisition equipment to patrol the target area according to a first preset route, and acquiring a first optical image in the patrol process, wherein the first optical image comprises an object to be detected.
In an optional embodiment, the target area includes a plurality of objects to be detected, which need to detect whether a fault occurs, and the image to be detected includes, but is not limited to, a tower, a power transmission line, and the like.
In an optional embodiment, the image acquisition device may be an aircraft with an image acquisition function, such as an unmanned aerial vehicle, and since the method provided by the embodiment of the present invention is used for detecting a power grid fault, the coverage area of the object to be detected is wide, the target area is large, and the image of each object to be detected in the target area can be rapidly acquired by the unmanned aerial vehicle.
In an alternative embodiment, the first optical image may be a video image or a set of optical images taken consecutively.
In an optional embodiment, the first preset route may be preset before the image acquisition device starts to acquire the image, may be generated by the image acquisition device according to the distribution of the objects to be detected in the target area during the acquisition process, and may be obtained by adjusting a preset path according to the distribution of the objects to be detected during the image acquisition process by the image acquisition device.
In an optional embodiment, when the image acquisition device inspects the target area according to the first preset route, the image acquisition device acquires an image by keeping a certain distance and angle with the object to be detected.
Step S12: and adopting a preset prior knowledge base to judge the fault of the object to be detected in the first optical image to obtain a first fault identification result, wherein the preset prior knowledge base comprises Gaussian mixture models of the objects to be detected.
The gaussian mixture model is a generative model that assumes that the samples obey a gaussian mixture distribution. When a gaussian model is established for a tower, it is assumed that there are k different types of towers in the sample, i.e., the model targets k clusters. Its parameters are only k μ and σ. Only the Gaussian mixture model is used, and the assumption that the data in the samples are subjected to Gaussian mixture distribution is applied, so that the data dependence on modeling of a small number of tower samples is reduced.
In an optional embodiment, if the first fault identification result determines that the object to be detected has a fault, the first fault identification result further includes a fault type and a confidence of the object to be detected.
In an optional embodiment, when the fault is determined, if it is detected that the object to be detected has the fault, the method provided in the embodiment of the present invention further includes determining, by combining with the GPS information, the world coordinate of the object to be detected having the fault.
Step S13: and controlling the image acquisition equipment to patrol the target area according to a second preset route, acquiring a second optical image in the patrol process, wherein the first preset route and the second preset route are opposite in direction, and when the first optical image and the second optical image are acquired, the horizontal inclination angles of the image acquisition equipment are different.
In an alternative embodiment, the first optical image is a plan view and the second optical pattern is a 45 ° side view.
In an alternative embodiment, the image capture device acquires the first optical image and the second optical image at the same frame rate.
In an alternative embodiment, the first predetermined route and the second predetermined route have the same passing path and opposite directions.
In an alternative embodiment, the second optical image may be a video image or a set of optical images taken consecutively.
In an optional embodiment, in the process of acquiring the first optical image, the image acquisition device simultaneously starts a route memory function, records a first preset route actually traveled in the process of acquiring the first optical image, and acquires the second optical image in the process of returning according to the original route of the first preset route, so that the same object to be detected contained in the first optical image and the second optical image is ensured, and the same position of the image to be detected in the first optical image and the second optical image is ensured, so that the efficiency is higher when the fault identification is carried out on the fusion image obtained by fusing the first optical image and the second optical image subsequently, and the identification result is more accurate.
Step S14: and fusing the first optical image and the second optical image to obtain a fused image, and performing fault discrimination on the object to be detected in the fused image by adopting a preset prior knowledge base to obtain a second fault recognition result.
In an alternative embodiment, the first optical image and the second optical image are fused to obtain a plan view and a 45 ° side view of the same image to be detected.
In an alternative embodiment, the gaussian mixture model used in performing step S12 is a plane gaussian mixture model, and the gaussian mixture model used in performing step S14 is obtained by performing quadratic modeling based on the plane gaussian mixture model.
In the embodiment of the invention, the angles when the first optical image is acquired and the second optical image is acquired are different, so that the second fault identification results obtained according to the first optical image and the second optical image are fused to realize complementation, and a more accurate fault identification result can be obtained.
Step S15: and obtaining a fault identification result according to the first fault identification result and the second fault identification result.
In an optional embodiment, the manner of determining the fault result may be that when any one of the first fault identification result and the second fault identification result determines that the object to be detected has a fault, it is determined that the object to be detected has a fault, and when both the first fault identification result and the second fault identification result determine that the object to be detected does not have a fault, it is determined that the object to be detected does not have a fault.
The power grid fault inspection method provided by the embodiment of the invention adopts the preset prior knowledge base to judge the fault of the object to be detected in the first optical image and the second optical image, the preset prior knowledge base comprises the Gaussian mixture model of each object to be detected, and because the dependency on the sample is lower when the Gaussian mixture model is established, the image to be detected with the fault can be accurately identified after the prior knowledge base is established by a small number of samples in the early stage, and in the method provided by the embodiment of the invention, the target area is inspected according to the first preset route and the second preset route respectively to obtain the first optical image and the second optical image, the first fault identification result is obtained by using the first optical image, the second fault identification result is obtained by using the second optical image for secondary verification, the fault identification result is finally obtained, and the directions of the first optical image and the second optical image are different, the horizontal inclination angles are different, so that the fault identification result obtained by combining the first optical image and the second optical image is more accurate.
In an alternative embodiment, the first predetermined route is determined by:
firstly, a height map of a target area is obtained, and three-dimensional modeling is carried out on the target area based on the height map to form a virtual environment of the target area.
In an alternative embodiment, a satellite map may be used to obtain a height map of the target area.
In an alternative embodiment, the target area is modeled three-dimensionally by a HeightMap, which is a gray scale map with gray scale values of 0-255, with the gray scale value of an image point reflecting the height of the point in the original relief.
And then, determining a power transmission network topological structure in the target area according to the virtual environment, and determining an initial route according to the power transmission network topological structure.
In an alternative embodiment, when determining the topology of the transmission network, points in the topology of the transmission network are determined, which are significantly different from surrounding features in a grey scale map due to the fact that the height of the main grid tower base is about 80-120 meters. The specific expression may be an abnormal point of a continuous value-taking image on the height map, and therefore, the height difference between the point and the surrounding area can be obtained through conversion, and the point is inferred to be a tower footing, namely, a point in a graph structure. After determining the points in the graph structure, edges of the graph structure are determined according to expert knowledge, thereby forming the power transmission network topology.
In an alternative embodiment, the initial route determined from the grid topology can pass through every point in the grid topology.
And finally, optimizing the initial route by utilizing reinforcement learning to obtain a first preset route. When the image acquisition equipment acquires the first optical image according to the first preset line, the image acquisition equipment moves at a certain distance and angle with the line to be detected in the target area.
In an optional embodiment, in step S12, the method for determining a fault of the object to be detected in the first optical image by using a preset prior knowledge base to obtain a first fault identification result specifically includes:
firstly, preprocessing a first optical image to obtain a denoising line characteristic space image.
In an alternative embodiment, the preprocessing of the first optical image includes extracting line features of the first optical image, forming connected contours, and performing background filtering on the first optical image to distinguish foreground and background scenes, and for example, distinguishing foreground and background scenes of a picture by a machine learning algorithm, and setting the background scene as empty.
And then, analyzing the de-noising line characteristic space image to obtain at least one candidate frame, wherein the candidate frame comprises the object to be detected.
In an alternative embodiment, the candidate frames of different types of objects to be detected are calculated in different ways.
In an optional embodiment, the method for obtaining the candidate box includes: and determining the area with the pixel density larger than the preset value in the denoising line feature space image as a candidate frame, and exemplarily, if the object to be detected is a tower, determining the candidate frame by using the method.
In an optional embodiment, the method for obtaining the candidate box includes: and fitting each pixel point in the de-noising line characteristic space image, and determining an external rectangle of a curve obtained by fitting as a candidate frame.
And finally, carrying out fault discrimination on the object to be detected in the candidate frame by adopting a preset prior knowledge base to obtain a first fault recognition result.
In an optional embodiment, besides the gaussian mixture model, the prior knowledge base further includes other various fault discrimination models, for different objects to be detected, different fault discrimination models are used for fault recognition, when the objects to be detected are subjected to fault recognition, the objects to be detected are firstly classified, the models of the objects to be detected in the prior knowledge base are judged, if the models corresponding to the objects to be detected are gaussian mixture models, the models are distinguished according to the probability of the gaussian mixture models, a first fault recognition result is obtained, and for towers, illustratively, the mixed gaussian models are used for fault recognition; if the model corresponding to the object to be detected is a rule model, training a classifier according to rules so as to obtain a first fault identification result, and exemplarily, for the power transmission line, performing fault identification by using the rule model.
In an optional embodiment, the step S14 of adopting a preset prior knowledge base to perform fault determination on the object to be detected in the fusion image specifically includes:
firstly, the second optical image is preprocessed to obtain a denoising line feature space image, and for details, reference is made to the description of preprocessing the first optical image in the above embodiment, which is not described herein again.
Then, the de-noised line feature space image is analyzed to obtain at least one candidate frame, where the candidate frame includes the object to be detected, and the detailed content refers to the description of determining the candidate frame in the first optical image in the above embodiment, which is not described herein again.
Finally, a preset priori knowledge base is adopted to perform fault discrimination on the object to be detected in the candidate frame to obtain a second fault recognition result, and for details, reference is made to the description of the embodiment for recognizing the fault of the object to be detected in the first optical image, and details are not repeated here.
In an optional embodiment, the step of preprocessing the first optical image to obtain a denoised line feature space image specifically includes:
firstly, mapping pixel points in a first optical image to a line feature space to obtain a connected edge profile of each object to be detected.
In an optional embodiment, after the pixel points in the first optical image are mapped to the line feature space, an edge profile is obtained, and in order to prevent the line feature pixel points from being broken and discontinuous, corresponding line segments are connected together through a preset rule to form a communicated edge profile.
And then, based on the connected edge profile, removing the environmental background noise in the optical image by adopting a preset image filtering algorithm to obtain a denoising line characteristic space image.
In an optional embodiment, the step of preprocessing the second optical image to obtain a denoised line feature space image specifically includes:
firstly, mapping pixel points in the second optical image to a line feature space to obtain a connected edge contour of each object to be detected, for details, refer to the description of obtaining the connected edge contour according to the first optical image in the above embodiment, and no further description is given here.
And then, based on the connected edge profile, removing the environmental background noise in the optical image by adopting a preset image filtering algorithm to obtain a denoising line characteristic space image.
In an optional embodiment, the step of constructing the predetermined a priori knowledge base includes:
firstly, acquiring known images which are acquired at a plurality of angles and contain an object to be detected;
secondly, the known image is preprocessed to obtain a de-noised feature space image of the known image, and details of the steps for obtaining the de-noised feature space image of the first optical image in the above embodiment are included, which are not described herein again.
And then, carrying out plane map Gaussian mixture model modeling on the denoising feature space image of the known image at different angles to respectively obtain a first Gaussian mixture model of each angle. In an optional embodiment, when fault recognition is performed on the object to be detected in the first optical image and the second optical image, fault recognition is performed through the first gaussian mixture model.
And finally, performing secondary modeling fusion on the plane graph Gaussian mixture models of all angles to obtain second Gaussian mixture models of all objects to be detected. In an optional embodiment, when fault identification is performed based on the first optical image or the second optical image, fault identification is performed by using a first gaussian mixture model, and when fault identification is performed based on a fused image obtained by fusing the first optical image and the second optical image, fault identification is performed by using a second gaussian mixture model.
In an optional embodiment, during secondary modeling, the same object to be detected and pictures at different angles are mapped into clusters in two models, and the two clusters are regarded as the type of the object to be detected, so that the corresponding relation between different model clusters and clusters is completed, and fusion is realized.
In an optional embodiment, the preset prior knowledge base further includes a rule model of the object to be detected, and the step of constructing the preset prior knowledge base further includes:
firstly, acquiring a known image containing an object to be detected;
then, the known image is preprocessed to obtain a de-noised feature space image of the known image, and details of the steps of obtaining the de-noised feature space image of the first optical image in the above embodiment are included, which are not described herein again.
And finally, generalizing the denoising characteristic space image of the known image to obtain a regular model of the object to be detected.
In an alternative embodiment, the rule model may be established for the power line. Aiming at different power transmission lines, simulating the radian of the power transmission line by using a plurality of different natural profiles, recording parameters of the power transmission line, and regarding the power transmission line as a rule, namely considering that the type of the power transmission line should obey the style of the profile, thereby obtaining a rule model of the power transmission line.
An embodiment of the present invention provides a power grid fault inspection device, as shown in fig. 2, including:
the first inspection module 21 is configured to control the image acquisition device to inspect the target area according to a first preset route, and acquire a first optical image in the inspection process, where the first optical image includes an object to be detected, and details of the first optical image refer to the description of step S11 in the foregoing embodiment, and are not described herein again.
The first fault identifying module 22 is configured to perform fault discrimination on the object to be detected in the first optical image by using a preset prior knowledge base to obtain a first fault identifying result, where the preset prior knowledge base includes a gaussian mixture model of each object to be detected, and the detailed content refers to the description of step S12 in the foregoing embodiment, and is not described herein again.
The second inspection module 23 is configured to control the image acquisition device to inspect the target area according to a second preset route, and acquire a second optical image in the inspection process, where the first preset route and the second preset route are opposite in direction, and when the first optical image and the second optical image are acquired, the horizontal tilt angles of the image acquisition device are different, for details, refer to the description of step S13 in the foregoing embodiment, and are not described herein again.
The second fault identifying module 24 is configured to fuse the first optical image and the second optical image to obtain a fused image, and perform fault discrimination on the object to be detected in the fused image by using a preset prior knowledge base to obtain a second fault identifying result, where details are described in the above embodiment in relation to step S14, and are not described herein again.
The fault determining module 25 is configured to obtain a fault identification result according to the first fault identification result and the second fault identification result, refer to the description of step S15 in the foregoing embodiment for details, which are not described herein again.
An embodiment of the present invention provides a computer device, as shown in fig. 3, the computer device mainly includes one or more processors 31 and a memory 32, and one processor 31 is taken as an example in fig. 3.
The computer device may further include: an input device 33 and an output device 34.
The processor 31, the memory 32, the input device 33 and the output device 34 may be connected by a bus or other means, and fig. 3 illustrates the connection by a bus as an example.
The processor 31 may be a Central Processing Unit (CPU). The Processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the power grid fault inspection device, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 optionally includes a memory remotely located from the processor 31, and these remote memories may be connected to the grid fault inspection device via a network. The input device 33 may receive user input of a calculation request (or other numeric or alphanumeric information) and generate key signal inputs relating to the grid fault inspection device. The output device 34 may include a display device such as a display screen for outputting the calculation result.
The embodiment of the invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can execute the power grid fault inspection method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.