A method and system for identifying defects in video images of electric power equipment
Through the combination of pre-trained initial residual neural network and particle swarm optimization algorithm, the problem of large calculation amount and low accuracy in the identification of defects in video images of power equipment is solved, fast and accurate defect identification and marking are achieved, the amount of calculation is reduced and the enhancement is enhanced The robustness.
Patent Information
- Application Number
- CN202410572037.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-10
AI Technical Summary
The existing video image defect recognition operation of power equipment has problems such as low marking operation efficiency, low accuracy, large amount of calculation of the detection model, and complex network structure.
Using the pre-trained initial residual neural network combined with the particle swarm optimization algorithm, the particle swarm optimization algorithm is used to search and determine the applicable residual network parameters, guide the residual neural network learning, and achieve rapid and accurate identification and marking of defects in power equipment video images.
It achieves rapid and accurate identification and marking of defects in video images of power equipment, reduces the amount of calculations, enhances robustness, avoids interference from the external environment, and improves maintenance efficiency.
Smart Images

Figure CN118279289B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of monitoring and maintenance of electric equipment, and in particular to a method and system for identifying video image defects of electric equipment. Background Art
[0002] The stable operation of the power system is of great significance. Once a power equipment fails, it will affect the safe and stable operation of the power system, and even cause power supply interruption, which will have an adverse impact on production and life. Intelligent monitoring systems can be used to monitor and manage smart grids and unmanned substations. Defect identification is an important process in the defect management of power equipment. During the operation of the equipment in the store, there are abnormal conditions such as oil leakage, rust, and foreign matter. The intelligent monitoring system needs to quickly and accurately detect the above defects, mark them, and take corresponding alarm measures according to the severity of the analysis results. Maintenance personnel collect the working status of power equipment through daily or special inspections and find the defects therein. If the defects cannot be discovered in a timely, accurate, and comprehensive manner, it will affect the subsequent defect management work. The current defect recognition is mainly realized by image recognition technology, among which some existing solutions adopt deep neural network models with complex structures, such as R-CNN (Region-based Convolutional Network) and YOLO (You Only Look Once). For example, the existing invention patent application document "A method for detecting defects of bolts with pins in power inspection images" with publication number CN110232687A includes the steps of building a Faster R-CNN (Faster Region-based Convolutional Network) model, training a Faster R-CNN model, detecting bolt targets with pins, and judging defects of bolts with pins. And the existing invention patent application document "A method for fast detection of transmission line defects based on YOLOv3" with publication number CN115937079A includes: building an inspection image defect detection model based on common defect images of transmission lines; building an inspection image sample library based on existing inspection image data; training the image defect detection model through the inspection image sample library, and evaluating the recognition effect. The deep neural network models used in the above-mentioned prior art can be used to perform defect recognition tasks. However, these deep neural networks usually require a large amount of computing resources for training and reasoning, with a large amount of calculation and easily affected by external conditions. In order to process large-scale image data sets and obtain highly accurate recognition results, it is necessary to design a more complex network structure and increase the depth and width of the network.
[0003] Power equipment defect recognition has high application value in power safety. When facing the problem of power equipment defect recognition, the traditional manual observation method has low detection efficiency, cannot provide timely feedback, and has high labor costs; image recognition algorithms are currently also widely used in power equipment defect detection, mainly for edge, contour and other features extraction, the aforementioned existing methods can effectively detect defect targets in the equipment, but in application, they are easily affected by external conditions such as lighting, resulting in poor target detection effect. In addition, given the complex working environment of power equipment, the accuracy of using the above complex deep neural network for power equipment video defect recognition is low.
[0004] The prior art of the electric power equipment video image defect recognition operation has technical problems such as low marking operation efficiency, low accuracy, large calculation amount of the detection model and complex network structure. Summary of the invention
[0005] The technical problem to be solved by the present invention is: how to solve the technical problems of low efficiency and accuracy of marking operation, large amount of calculation of detection model and complex network structure in the prior art of power equipment video image defect recognition operation.
[0006] The present invention adopts the following technical solution to solve the above technical problem: a method for identifying defects in video images of power equipment comprises:
[0007] S1. Pre-training an initial residual neural network to obtain a residual neural network suitable for defect classification for image classification;
[0008] S2, initializing the position and velocity of the potential solution particle swarm;
[0009] S3, calculating the fitness value of each potential solution particle in the problem potential solution particle group;
[0010] S4. According to the fitness value, the particle swarm optimization algorithm is used to perform continuous iteration operations to find the optimal solution for position and speed, and the local update optimal solution and the global update optimal solution are obtained to update the position and speed of the particles that obtain the potential solution to the problem;
[0011] S5. When the end condition of the particle swarm optimization algorithm is met, the continuous iteration operation is terminated, and the optimal position parameters and the defect coordinate position in the video image of the power equipment are output according to the position and speed of the potential solution particles of the problem;
[0012] S6. Use a particle swarm optimization algorithm to search and determine applicable residual network parameters, guide the applicable defect classification residual neural network to learn, and obtain defect classification data according to the defect coordinate position, wherein the applicable residual network parameters include: applicable learning rate, applicable regularization term coefficient, and applicable convolution kernel size.
[0013] The present invention uses a particle swarm optimization algorithm to guide residual network learning, aiming to efficiently locate the defect position in the video image of the power equipment, complete the rapid and accurate identification and marking of the defect, and more efficiently maintain the power equipment. The present invention is simple and efficient, has important practical value, and reduces the amount of calculation. At the same time, the image classification is not easily disturbed by the external environment, and the robustness of the video image acquisition conditions is effectively enhanced.
[0014] In a more specific technical solution, step S1 includes:
[0015] S11, collecting and preprocessing a set of defect images of different categories to obtain an expanded training set;
[0016] S12. Input the expanded training set into the initial residual neural network for parameter optimization training. Through reconstruction learning, the underlying error in the parameter optimization training process is transferred to the previous layer through the preset shortcut connection to obtain a residual neural network suitable for defect classification.
[0017] The present invention adopts a residual neural network-assisted intelligent algorithm model, which uses a residual neural network to classify video image areas, and calculates the specific locations of defects in the collected video images through a particle swarm optimization algorithm, thereby completing the rapid identification and positioning of electronic equipment video image defects.
[0018] The residual neural network used in the present invention is only used to classify defects in the image without locating the defects, which effectively reduces the amount of calculation.
[0019] In a more specific technical solution, step S12 includes:
[0020] S121, using the initial residual neural network to process the expanded training set to obtain and output the image difference category defect probability value:
[0021] (p 1 ,p 2 ,p 3 ,…) ;
[0022] In the formula, p 1 represents the probability value of the first type of defect, p 2 represents the probability value of the second type of defect, p 3 represents the probability value of the third type of defect;
[0023] S122, using the following logic, express the identity mapping function of the initial residual neural network :
[0024]
[0025] In the formula,x is the residual block input, F is the residual mapping function, Indicates that the input passes through the residual block i The weights obtained when the convolutional layer is Indicates that the input passes through the residual block i The weights obtained when the convolutional layer , and residual block input x The corresponding residual mapping function value.
[0026] In a more specific technical solution, step S2 includes:
[0027] S21, obtaining the position of the potential solution particle of the problem;
[0028] Located in a D In the target search space of dimension, there exists M potential solution particles of the problem, forming a potential solution particle group :
[0029]
[0030] In the formula, represents the potential solution particle of the first problem, represents the potential solution particle of the second problem, Indicates M Particles with potential solutions to the problem;
[0031] S22, using the following logic, based on the position D The dimensional vector represents the i The location of the potential solution particle of the problem:
[0032]
[0033] In the formula, Indicates location D dimensional vector, Indicates location D The first dimension component of the dimensional vector, Indicates location D The second-dimensional component of the dimensional vector, Indicates location D The first dimension of the vector D Dimensional component;
[0034] S23, using the following logic, speed D The dimensional vector represents the velocity of the potential solution particle of the problem:
[0035]
[0036] In the formula, Indicates speedD dimensional vector, Indicates speed D The first dimension component of the dimensional vector, Indicates speed D The second-dimensional component of the dimensional vector, Indicates speed D The first dimension of the vector D Dimensional component.
[0037] In a more specific technical solution, step S3 includes:
[0038] S31. The position of the potential solution particle in the problem satisfies:
[0039] a 2 >a 1. b 2 >b 1 o'clock
[0040] The image area corresponding to the position of the potential particle of the problem is input into the applicable defect classification residual neural network to classify the current image area and output the defect probability value of the image difference category, where: a 1 is the horizontal coordinate of the first particle, b 1 is the vertical coordinate of the first particle, a 2 is the horizontal coordinate of the second particle, b 2 is the ordinate of the second particle;
[0041] S32, returning the probability value of the defect of the image difference category to the particle swarm optimization algorithm to obtain the fitness function corresponding to the probability value of the defect of different categories fitness :
[0042] fitness=|1-max(P r1 ,P r2 ,P r3 ,…)|;
[0043] In the formula, P r1 express r The probability value corresponding to category 1, P r2 express r The probability value corresponding to the 2 categories, P r3 express r The probability values corresponding to the 3 categories are: max(P r1 ,P r2 ,P r3 ,…) Indicates the maximum value of the probability values of different types of defects.
[0044] In a more specific technical solution, step S4 includes:
[0045] S41, using particle swarm optimization algorithm, random initialization M The potential solution particle of the problem takes the current preset local optimal solution and the preset global optimal solution as the extreme value to perform continuous iteration operation to find the optimal solution for position and the optimal solution for speed, so as to obtain the local update optimal solution and the global update optimal solution;
[0046] S42. Update the speed and position of the potential solution particle according to the local optimal solution and the global optimal solution.
[0047] The present invention skillfully combines the residual neural network of image classification with the particle swarm intelligence algorithm, and can realize rapid and accurate recognition and marking of video image defects of power equipment.
[0048] In a more specific technical solution, step S41 includes:
[0049] S411, using the following logic to express the local update optimal solution, i The optimal position of the particle searched by the potential solution particle of the problem is:
[0050] ;
[0051] In the formula, [ p i1 , p i2 , … p iD ] indicates the i The local optimal solution corresponding to the local update optimal solution D dimensional vector, Representation of potential solution particles i The local optimal position found is Represents a local optimal solution D The first dimension component of the dimensional vector, Represents a local optimal solution D The second-dimensional component of the dimensional vector, Represents a local optimal solution D The first dimension of the vector D Dimensional component;
[0052] S412. Use the following logic to express the global updated optimal solution, which represents the optimal position of the particle swarm searched by the particle swarm of potential solutions to the problem:
[0053]
[0054] In the formula, [ pg1 ,p g2 , …p gD ] represents the global optimal solution corresponding to the optimal position searched by the group D dimensional vector, Particle swarm fusion g The global optimal position found is Represents the global optimal solution D The first dimension component of the dimensional vector, Represents the global optimal solution D The second-dimensional component of the dimensional vector, Represents the global optimal solution D The first dimension of the vector D Dimensional component.
[0055] In a more specific technical solution, in step S42, the speed and position of the potential solution particle of the problem are updated according to the following logic:
[0056]
[0057]
[0058] In the formula, t Represents the current iteration number, c 1 ,c 2 is the learning factor, w is the inertia weight, rand represents a random number in the interval [0, 1], v id (t) represents the potential solution particle of the problem i In the t In the iteration d The speed of the dimension, v id Representation of potential solution particles i In the d The speed of the dimension, v id (t+1) represents the potential solution particle of the problem i In the t+1 In the iteration d The speed of the dimension, x id (t) represents the potential solution particle of the problem i In the t In the iteration d The location of the dimension, x id Representation of potential solution particles i In the d The location of the dimension, Representation of potential solution particlesi In the t+1 In the iteration d The location of the dimension, Representation of potential solution particles i Searched d dimensional local optimal position, Particle swarm fusion g Searched d dimensional global optimal position.
[0059] Specifically, set the random number rand , which can increase the randomness of the search operation in the particle swarm search algorithm.
[0060] In a more specific technical solution, the inertia weight is adaptively adjusted using the following logic for the defect classification residual neural network: w :
[0061]
[0062] In the formula, w max represents the maximum inertia weight, w min represents the minimum inertia weight, Iter max is the maximum number of iterations.
[0063] The particle swarm optimization algorithm adopted by the present invention searches for various possible solutions in the target search space and guides the search process through individual experience and group collaboration, thereby quickly finding a better solution, and has global search capabilities and a faster convergence speed.
[0064] In a more specific technical solution, a power equipment video image defect recognition system includes:
[0065] The residual network pre-training module is used to pre-train the initial residual neural network to obtain a residual neural network suitable for defect classification for image classification;
[0066] Particle swarm initialization module, used to initialize the position and velocity of the particle swarm of potential solutions to the problem;
[0067] The particle fitness value obtaining module is used to calculate the fitness value of each potential solution particle in the problem potential solution particle group. The particle fitness value obtaining module is connected with the particle group initialization module;
[0068] The particle swarm position and speed iteration module is used to perform continuous iteration operations based on the fitness value using the particle swarm optimization algorithm to find the optimal position solution and the optimal speed solution, and process the local update optimal solution and the global update optimal solution to update the position and speed of the particles that obtain the potential solution to the problem. The particle swarm position and speed iteration module is connected with the residual network pre-training module and the particle fitness value obtaining module;
[0069] The defect coordinate acquisition module is used to end the continuous iteration operation when the end condition of the particle swarm optimization algorithm is met, and output the optimal position parameters and the defect coordinate position in the video image of the power equipment according to the position and speed of the potential solution particles of the problem. The defect coordinate acquisition module is connected with the particle swarm position and speed iteration module;
[0070] The guided learning classification module is used to search and determine the applicable residual network parameters by using the particle swarm optimization algorithm, guide the applicable defect classification residual neural network to learn, and obtain defect classification data according to the defect coordinate position, wherein the applicable residual network parameters include: applicable learning rate, applicable regularization term coefficient and applicable convolution kernel size, and the guided learning classification module is connected with the residual network pre-training module and the defect coordinate acquisition module.
[0071] Compared with the prior art, the present invention has the following advantages:
[0072] The present invention uses a particle swarm optimization algorithm to guide residual network learning, aiming to efficiently locate the defect position in the video image of the power equipment, complete the rapid and accurate identification and marking of the defect, and more efficiently maintain the power equipment. The present invention is simple and efficient, has important practical value, and reduces the amount of calculation. At the same time, the image classification is not easily disturbed by the external environment, and the robustness of the video image acquisition conditions is effectively enhanced.
[0073] The present invention adopts a residual neural network-assisted intelligent algorithm model, which uses a residual neural network to classify video image areas, and calculates the specific locations of defects in the collected video images through a particle swarm optimization algorithm, thereby completing the rapid identification and positioning of electronic equipment video image defects.
[0074] The residual neural network used in the present invention is only used to classify defects in the image without locating the defects, which effectively reduces the amount of calculation.
[0075] The present invention skillfully combines the residual neural network of image classification with the particle swarm intelligence algorithm, and can realize rapid and accurate recognition and marking of video image defects of power equipment.
[0076] The particle swarm optimization algorithm adopted by the present invention searches for various possible solutions in the target search space and guides the search process through individual experience and group collaboration, thereby quickly finding a better solution, and has global search capabilities and a faster convergence speed.
[0077] The present invention solves the technical problems of low efficiency and accuracy of marking operation, large amount of calculation of detection model and complex network structure in the prior art of video image defect recognition operation of power equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 This is a schematic diagram of the basic steps of a method for identifying defects in video images of power equipment according to Embodiment 1 of the present invention;
[0079] Figure 2 This is a schematic diagram of specific steps of pre-training an initial residual neural network according to Embodiment 1 of the present invention;
[0080] Figure 3 This is a schematic diagram of specific steps for performing parameter optimization training of an initial residual neural network according to Embodiment 1 of the present invention;
[0081] Figure 4 This is a schematic diagram of the pre-trained residual network structure of Example 1 of the present invention;
[0082] Figure 5 Schematic diagram of the residual block structure of embodiment 1 of the present invention;
[0083] Figure 6 A schematic diagram of specific steps for potential solution of particle position and velocity of the initialization problem of Example 1 of the present invention;
[0084] Figure 7 It is a schematic diagram of the position of the particle swarm and the rectangular frame of the potential solution to the problem in Example 1 of the present invention;
[0085] Figure 8 Schematic diagram of specific steps for calculating the fitness value of particles of potential solutions to a problem in Example 1 of the present invention;
[0086] Fig. 9 A schematic diagram of specific steps for updating the position and velocity of particles of a potential solution to the problem of obtaining the problem in Example 1 of the present invention;
[0087] Fig.10 This is a schematic diagram of specific steps for obtaining a local update optimal solution and a global update optimal solution according to Embodiment 1 of the present invention;
[0088] Fig.11 This is a schematic diagram of specific implementation steps of the standard particle swarm optimization algorithm of Example 1 of the present invention. DETAILED DESCRIPTION
[0089] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0090] Example 1
[0091] like Figure 1 As shown, the present invention provides a method for identifying defects in video images of electric power equipment, comprising the following basic steps:
[0092] S1. Pre-training an initial residual neural network to obtain a residual neural network suitable for defect classification for image classification;
[0093] like Figure 2 As shown, in this embodiment, the step S1 of pre-training the initial residual neural network also includes the following specific steps:
[0094] S11, collecting and preprocessing a set of defect images of different categories to obtain an expanded training set;
[0095] S12. Input the expanded training set into the initial residual neural network for parameter optimization training. Through reconstruction learning, the underlying error in the parameter optimization training process is transferred to the previous layer through the preset shortcut connection to obtain a residual neural network suitable for defect classification.
[0096] like Figure 3 As shown, in this embodiment, step S12 of performing parameter optimization training of the initial residual neural network also includes the following specific steps:
[0097] S121, using the initial residual neural network to process the expanded training set to obtain and output the image difference category defect probability value:
[0098] (p 1 ,p 2 ,p 3 ,…) ;
[0099] in, p 1 represents the probability value of the first type of defect, p 2 represents the probability value of the second type of defect, p 3 represents the probability value of the third type of defect;
[0100] S122, using the following logic, express the identity mapping function of the initial residual neural network :
[0101]
[0102] like Figure 4 and Figure 5 As shown, in this embodiment, in order to solve the gradient vanishing and degradation problems that occur during the training of deep neural networks, a residual neural network ResNet is used. The residual neural network ResNet introduces the concept of residual learning based on the convolutional neural network CNN, designs a residual block with shortcut connections, and connects multiple residual blocks end to end to construct the residual neural network ResNet.
[0103] In this embodiment, see Figure 5 , x Is the input of the residual block; F(x) is the residual mapping function; is the identity mapping function, Represents the weight obtained when the input passes through the i-th convolutional layer in the residual block.
[0104] In the residual block of this embodiment, the convolution kernel size of each convolution layer can be set to, for example, 3×3. The residual neural network ResNet fits the residual mapping function by introducing shortcut connections. F(x) , ensuring that the input vector x and residual mapping function The sizes are the same, and only the difference between input and output is learned. By reconstructing the learning process, the underlying error in the training process can be passed to the previous layer through shortcut connections, effectively solving the problem of gradient disappearance as the depth increases during deep residual network training.
[0105] In this embodiment, see Figure 4 Before performing video image defect recognition, the initial residual neural network needs to be optimized and trained; in this embodiment, a set of images with different types of defects is collected, and the defect image set is preprocessed, including zooming in, zooming out, and flipping operations to expand the defect training set; the prepared defect training set is input into the initial residual neural network, and the parameters of the initial residual neural network are optimized and trained until the initial residual neural network can accurately classify defects of different categories. In this embodiment, the output result of the residual neural network is the probability value of the image difference category defect: (p 1 ,p 2 ,p 3 ,…) .
[0106] In this embodiment, different types of defects include, but are not limited to: oil leakage, rust, and foreign matter;
[0107] S2, initializing the position and velocity of the potential solution particle swarm;
[0108] like Figure 6As shown, in this embodiment, the step S2 of initializing the position and velocity of the potential solution particle of the problem further includes the following steps:
[0109] S21, obtaining the position of the potential solution particle of the problem;
[0110] Located in a D In the target search space of dimension, there exists M potential solution particles of the problem, forming a potential solution particle group :
[0111]
[0112] In the formula, represents the potential solution particle of the first problem, represents the potential solution particle of the second problem, Indicates M Particles with potential solutions to the problem;
[0113] S22, using the following logic, based on the position D The dimensional vector represents the i The location of the potential solution particle of the problem:
[0114]
[0115] In the formula, Indicates location D dimensional vector, Indicates location D The first dimension component of the dimensional vector, Indicates location D The second-dimensional component of the dimensional vector, Indicates location D The first dimension of the vector D Dimensional component;
[0116] S23, using the following logic, speed D The dimensional vector represents the velocity of the potential solution particle of the problem:
[0117]
[0118] In the formula, Indicates speed D dimensional vector, Indicates speed D The first dimension component of the dimensional vector, Indicates speed D The second-dimensional component of the dimensional vector, Indicates speed D The first dimension of the vector D Dimensional component.
[0119] like Figure 7As shown, in this embodiment, a rectangular frame is determined according to the position of the particle, including Figure 7 The shaded area in
[0120] In this embodiment, it is assumed that D In the target search space of dimension, there are M A problem potential solution particle swarm , each potential solution particle of the problem has a position and a velocity. i The position of the potential solution particle of the problem can be D The dimension vector is represented as , No. i The speed of the potential solution particle of the problem can be expressed as D The dimension vector is represented as .
[0121] S3, calculating the fitness value of each potential solution particle in the problem potential solution particle group;
[0122] like Figure 8 As shown, in this embodiment, the step S3 of calculating the fitness value of the potential solution particle of the problem also includes the following specific steps:
[0123] S31. The position of the potential solution particle in the problem satisfies:
[0124] a 2 >a 1. b 2 >b 1 o'clock
[0125] The image area corresponding to the position of the potential particle of the problem is input into the applicable defect classification residual neural network to classify the current image area and output the defect probability value of the image difference category, where: a 1 is the horizontal coordinate of the first particle, b 1 is the vertical coordinate of the first particle, a 2 is the horizontal coordinate of the second particle, b 2 is the ordinate of the second particle;
[0126] S32, returning the probability value of the defect of the image difference category to the particle swarm optimization algorithm to obtain the fitness function corresponding to the probability value of the defect of different categories fitness :
[0127] fitness=|1-max(P r1 ,P r2 ,P r3 ,…)|;
[0128] in, Pr1 express r The probability value corresponding to category 1, P r2 express r The probability value corresponding to the 2 categories, P r3 express r The probability values corresponding to the 3 categories are: max(P r1 ,P r2 ,P r3 ,…) Indicates the maximum value of the probability values of different types of defects.
[0129] In this embodiment, when the position of the potential solution particle of the problem satisfies: a 2 >a 1. b 2 >b 1, the image area corresponding to the position of the potential particle of the problem is input into the pre-trained residual neural network. In this embodiment, the residual neural network is used to classify the image area and output the image difference category defect probability value: (p 1 ,p 2 ,p 3 ,…) ;
[0130] S4. According to the fitness value, the particle swarm optimization algorithm is used to perform continuous iteration operations to find the optimal solution for position and speed, and the local update optimal solution and the global update optimal solution are obtained to update the position and speed of the particles that obtain the potential solution to the problem;
[0131] like Fig. 9 As shown, in this embodiment, the step S4 of updating and obtaining the position and velocity of the potential solution particle of the problem also includes the following specific steps:
[0132] S41, using particle swarm optimization algorithm, random initialization M The potential solution particle of the problem takes the current preset local optimal solution and the preset global optimal solution as the extreme value to perform continuous iteration operation to find the optimal solution for position and the optimal solution for speed, so as to obtain the local update optimal solution and the global update optimal solution;
[0133] like Fig.10 As shown, in this embodiment, the step S41 of obtaining the local update optimal solution and the global update optimal solution also includes the following specific steps:
[0134] S411, using the following logic to express the local update optimal solution, i The optimal position of the particle searched by the potential solution particle of the problem is:
[0135] ;
[0136] In the formula, [ p i1 , p i2 , … p iD ] indicates the i The local optimal solution corresponding to the local update optimal solution D dimensional vector, Representation of potential solution particles i The local optimal position found is Represents a local optimal solution D The first dimension component of the dimensional vector, Represents a local optimal solution D The second-dimensional component of the dimensional vector, Represents a local optimal solution D The first dimension of the vector D Dimensional component;
[0137] S412. Use the following logic to express the global updated optimal solution, which represents the optimal position of the particle swarm searched by the particle swarm of potential solutions to the problem:
[0138]
[0139] In the formula, [p g1 , p g2 , …p gD ] Represents the global optimal solution D-dimensional vector corresponding to the optimal position searched by the group , express Particle swarm analysis of potential solutions g The global optimal position found is Represents the global optimal solution D The first dimension component of the dimensional vector, Represents the global optimal solution D The second-dimensional component of the dimensional vector, Represents the global optimal solution D The first dimension of the vector D Dimensional Component 。
[0140] S42. Update the speed and position of the potential solution particle according to the local optimal solution and the global optimal solution.
[0141] In this embodiment, the speed and position of the potential solution particle of the problem are updated according to the following logic:
[0142]
[0143]
[0144] In the formula, t Represents the current iteration number, c 1, c 2 is the learning factor, which is used to adjust the step size of the potential solution particles flying towards the individual extreme value and the global extreme value respectively. w is the inertia weight, the value range of inertia weight includes (0.4, 0.9), rand express [0, 1] A random number in the interval, v id (t) Representation of potential solution particles i In the t In the iteration d Speed of Dimension ,v id Representation of potential solution particles i In the d The speed of the dimension, v id (t+1) Representation of potential solution particles i In the t+1 In the iteration d The speed of the dimension, x id (t) Representation of potential solution particles i In the t In the iteration d The location of the dimension, x id Representation of potential solution particles i In the d The location of the dimension, Representation of potential solution particles i In the t+1 In the iteration d The location of the dimension, Representation of potential solution particles i Searched d dimensional local optimal position, Particle swarm fusion g Searched d dimensional global optimal position.
[0145] In the above formula (1) of this embodiment, the first term is the inertia part, which represents the degree of trust of the potential solution particle in its own motion state; the second term is the recognition part, which is determined based on the potential solution particle's own experience information.
[0146] In this embodiment, the problem potential solution particle updates its own speed and position after locally updating the optimal solution and globally updating the optimal solution;
[0147] In this embodiment, the defect classification residual neural network is used to adaptively adjust the inertia weight using the following logic: w :
[0148]
[0149] in, w max represents the maximum inertia weight, w min represents the minimum inertia weight, Iter max is the maximum number of iterations.
[0150] In this embodiment, the problem potential solution particle i In the d The speed value range of the speed dimension can be set as follows: v id ∈[v imin ,v imax ] , the potential solution particle of the problem i In the d The position value range of the dimension can be set as follows, for example: x id ∈[x imin ,x imax ] ;
[0151] In this embodiment, v imin Representation of potential solution particles i The minimum speed, v imax Representation of potential solution particles i Maximum speed, x imin Representation of potential solution particles i The minimum position value of v imax Representation of potential solution particles i The maximum position value of
[0152] In this embodiment, during the social updating optimization process of the problem potential solution particles, the experience information of other optimized problem potential solution particles in the problem potential solution particle group is obtained through information sharing among the problem potential solution particles.
[0153] In this embodiment, the position and speed corresponding to the best fitness function value of each potential solution particle of the problem are found, and then the position and speed corresponding to the best fitness function value in the potential solution particle group of the problem are found, and the position and speed of the potential solution particle of the problem are further updated based on the position and speed in the optimal solution of the position and the optimal solution of the speed;
[0154] In this embodiment, the particle swarm optimization algorithm is randomly initialized M particles; find the optimal solution for position and speed through continuous iteration. In each iteration, each potential solution particle updates its own speed and position according to two extreme values to guide its own flight. One extreme value is the local optimal solution of the potential solution particle of the problem, and the other extreme value is the global optimal solution. In this embodiment, the local optimal solution refers to the optimal value found by each particle so far in the iteration;
[0155] In this embodiment, the global optimal solution refers to the optimal value found by the particle swarm of potential solutions to the entire problem up to the current iteration;
[0156] S5, judging whether the end condition is met;
[0157] In this embodiment, when the end condition of the particle swarm optimization algorithm is met, the continuous iteration operation is terminated, and the optimal position parameters and the defect coordinate position in the video image of the power equipment are output according to the position and speed of the potential solution particles of the problem;
[0158] In this embodiment, it is determined whether the model has reached the maximum number of iterations, or whether the global optimal fitness function has reached the minimum limit;
[0159] S6. Use a particle swarm optimization algorithm to search and determine applicable residual network parameters, guide the applicable defect classification residual neural network to learn, and obtain defect classification data according to the defect coordinate position;
[0160] In this embodiment, the applicable residual network parameters include: an applicable learning rate, an applicable regularization term coefficient, and an applicable convolution kernel size;
[0161] In this embodiment, when the above conditions are met, the loop ends and the optimal position parameters are output, and the optimal position parameters are the defect coordinate positions found out; if the above conditions are not met, the next loop is entered until the defect position in the video image of the power equipment is located.
[0162] like Fig.11 As shown, in this embodiment, the specific implementation steps of the standard particle swarm optimization algorithm also include:
[0163] S1', the size of the potential solution particle swarm of the initialization problem;
[0164] S2', the speed and position of the potential solution particles in the randomly initialized potential solution particle swarm;
[0165] S3', for each potential solution particle in the problem potential solution particle group, evaluate the fitness value of each potential solution particle according to the objective function;
[0166] S4', update the local optimal value and global optimal value of the potential solution particles of the problem;
[0167] S5', use formula (1) and formula (2) to update the velocity and position of the potential solution particle of the problem;
[0168] S6', judging whether the end condition is met;
[0169] S7', if satisfied, terminate the particle swarm optimization algorithm process; otherwise jump to the aforementioned step S3'.
[0170] In this embodiment, a residual neural network guided by a particle swarm optimization algorithm is used. In the residual neural network, the particle swarm optimization algorithm can be used to assist in optimizing the hyperparameters of the residual neural network. Specifically, the particle swarm optimization algorithm PSO can be used to search for suitable hyperparameters, and the hyperparameters include but are not limited to: learning rate, regularization term coefficient, and convolution kernel size; the value range of the hyperparameters is obtained to improve the performance and generalization ability of the residual neural network.
[0171] In this embodiment, the particle swarm optimization algorithm PSO can construct a problem potential solution particle swarm, where each problem potential solution particle represents a set of hyperparameter values. Based on the training error of the network model as the fitness function, the speed and position of the problem potential solution particles are iteratively updated to search for the best hyperparameter combination in the target search space. When the speed and position of the problem potential solution particles are updated, the individual historical optimal solution and the global historical optimal solution are taken into account, so that the problem potential solution particles can guide and learn from each other in the target search space.
[0172] In this embodiment, the residual neural network guided by the particle swarm optimization algorithm is assisted by the intelligent algorithm to automatically optimize the hyperparameters of the residual neural network, thereby improving the performance and generalization ability of the network. It can reduce the subjectivity of manual parameter adjustment, improve the efficiency of the optimization process, and have robustness and global search capabilities. At the same time, combined with the characteristics of the residual neural network, the application performance of the algorithm in the field of image processing and classification can be further improved.
[0173] In summary, the present invention uses the particle swarm optimization algorithm to guide the residual network learning, aiming to efficiently locate the defect position in the video image of the power equipment, complete the rapid and accurate identification and marking of the defect, and more efficiently maintain the power equipment. The present invention is simple and efficient, has important practical value, and reduces the amount of calculation. At the same time, the image classification is not easily disturbed by the external environment, which effectively enhances the robustness of the video image acquisition conditions.
[0174] The present invention adopts a residual neural network-assisted intelligent algorithm model, which uses a residual neural network to classify video image areas, and calculates the specific locations of defects in the collected video images through a particle swarm optimization algorithm, thereby completing the rapid identification and positioning of electronic equipment video image defects.
[0175] The residual neural network used in the present invention is only used to classify defects in the image without locating the defects, which effectively reduces the amount of calculation.
[0176] The present invention skillfully combines the residual neural network of image classification with the particle swarm intelligence algorithm, and can realize rapid and accurate recognition and marking of video image defects of power equipment.
[0177] The particle swarm optimization algorithm adopted by the present invention searches for various possible solutions in the target search space and guides the search process through individual experience and group collaboration, thereby quickly finding a better solution, and has global search capabilities and a faster convergence speed.
[0178] The present invention solves the technical problems of low efficiency and accuracy of marking operation, large amount of calculation of detection model and complex network structure in the prior art of video image defect recognition operation of power equipment.
[0179] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying defects in video images of electric power equipment, characterized in that: The method comprises: S1. Pre-training an initial residual neural network to obtain a residual neural network suitable for defect classification for image classification; S2, initializing the position and velocity of the potential solution particle swarm; S3, calculating the fitness value of each potential solution particle in the problem potential solution particle group; Wherein, the S3 includes: S31, the position of the potential solution particle of the problem satisfies: a 2 >a 1. b 2 >b 1 o'clock The image area corresponding to the position of the potential particle of the problem is input into the applicable defect classification residual neural network to classify the current image area and output the image difference category defect probability value, wherein, a 1 is the horizontal coordinate of the first particle, b 1 is the vertical coordinate of the first particle, a 2 is the horizontal coordinate of the second particle, b 2 is the ordinate of the second particle; S32: returning the image difference category defect probability value to the particle swarm optimization algorithm to obtain the fitness function corresponding to the probability value of different categories of defects. fitness : fitness=|1-max(P r1 ,P r2 ,P r3 ,…)|; In the formula, P r1 express r The probability value corresponding to category 1, P r2 express r The probability value corresponding to the 2 categories, P r3 express r The probability values corresponding to the 3 categories are: max(P r1 ,P r2 ,P r3 ,…) The maximum value of the probability values of the different types of defects; S4, according to the fitness value, using the particle swarm optimization algorithm to perform continuous iteration operations to find the optimal position solution and the optimal speed solution, and process to obtain the local update optimal solution and the global update optimal solution to update the position and the speed of the particle with the potential solution to the problem; S5. When the end condition of the particle swarm optimization algorithm is met, the continuous iteration operation is ended, and the optimal position parameters and the defect coordinate position in the video image of the power equipment are output according to the position and speed of the potential solution particle of the problem; S6. Use the particle swarm optimization algorithm to search and determine applicable residual network parameters, guide the applicable defect classification residual neural network to learn, and obtain defect classification data according to the defect coordinate position, wherein the applicable residual network parameters include: applicable learning rate, applicable regularization term coefficient and applicable convolution kernel size.
2. A method for identifying defects in video images of electric power equipment according to claim 1, characterized in that: The S1 includes: S11, collecting and preprocessing a set of defect images of different categories to obtain an expanded training set; S12. Input the expanded training set into the initial residual neural network for parameter optimization training. Through reconstruction learning, the underlying error in the parameter optimization training process is transferred to the upper layer through a preset shortcut connection to obtain the residual neural network suitable for defect classification.
3. A method for identifying defects in video images of electric power equipment according to claim 2, characterized in that: The S12 includes: S121, using the initial residual neural network to process the expanded training set to obtain and output an image difference category defect probability value: (p1,p2,p3,…); In the formula, p1 represents the probability value of the first type of defect, p2 represents the probability value of the second type of defect, and p3 represents the probability value of the third type of defect; S122, using the following logic, to express the identity mapping function of the initial residual neural network: : In the formula, x is the residual block input, F is the residual mapping function, Indicates that the input passes through the residual block i The weights obtained when the convolutional layer is Indicates that the input passes through the residual block i The weights obtained when the convolutional layer , and residual block input x The corresponding residual mapping function value.
4. The method for identifying defects in video images of electric power equipment according to claim 1, characterized in that: The S2 includes: S21, obtaining the position of the potential solution particle of the problem; Located in a D In the target search space of dimension, there exists M potential solution particles of the problem, forming a potential solution particle group of the problem : In the formula, represents the first potential solution particle of the problem, represents the potential solution particle of the second problem, Indicates M a potential solution particle of the problem; S22, using the following logic, based on the position D The dimensional vector represents the i The positions of the particles that are potential solutions to the problem are: In the formula, Indicates the location D dimensional vector, Indicates the location D The first dimension component of the dimensional vector, Indicates the location D The second-dimensional component of the dimensional vector, Indicates the location D The first dimension of the vector D Dimensional component; S23, using the following logic, speed D The dimensional vector represents the velocity of the potential solution particle of the problem: In the formula, Indicates the speed D dimensional vector, Indicates the speed D The first dimension component of the dimensional vector, Indicates the speed D The second-dimensional component of the dimensional vector, Indicates the speed D The first dimension of the vector D Dimensional component.
5. The method for identifying defects in video images of electric power equipment according to claim 1, characterized in that: The S4 includes: S41, using the particle swarm optimization algorithm, randomly initialize M a particle of a potential solution of the problem, taking the current preset local optimal solution and the preset global optimal solution as extreme values, to perform the continuous iteration operation, to find the optimal solution of the position and the optimal solution of the speed, to obtain the local updated optimal solution and the global updated optimal solution; S42. Update the speed and the position of the potential solution particle of the problem according to the local updated optimal solution and the global updated optimal solution.
6. A method for identifying defects in video images of electric power equipment according to claim 5, characterized in that: The step S41 comprises: S411, using the following logic to express the local update optimal solution, i The optimal position of the particles searched by the potential solution particles of the problem is: ; In the formula, [ p i1 , p i2 , … p iD ] indicates the i The local optimal solution corresponding to the local updated optimal solution D dimensional vector, represents the potential solution particle of the problem i The local optimal position found is Represents the local optimal solution D The first dimension component of the dimensional vector, Represents the local optimal solution D The second-dimensional component of the dimensional vector, Represents the local optimal solution D The first dimension of the vector D Dimensional component; S412, using the following logic, to express the global updated optimal solution, indicating the optimal position of the particle swarm searched by the particle swarm of potential solutions to the problem: In the formula, [ p g1 ,p g2 , …p gD ] represents the global optimal solution corresponding to the optimal position searched by the group D dimensional vector, Particle swarm fusion g The global optimal position found is Represents the global optimal solution D The first dimension component of the dimensional vector, Represents the global optimal solution D The second-dimensional component of the dimensional vector, Represents the global optimal solution D The first dimension of the vector D Dimensional component.
7. The method for identifying defects in video images of electric power equipment according to claim 5, characterized in that: In step S42, the speed and position of the potential solution particle of the problem are updated according to the following logic: In the formula, t Represents the current iteration number, c 1 ,c 2 is the learning factor, w is the inertia weight, rand represents a random number in the interval [0, 1], v id (t) represents the potential solution particle of the problem i In the t In the iteration d The speed of the dimension, v id Representation of potential solution particles i In the d The speed of the dimension, v id (t+1) represents the potential solution particle of the problem i In the t+1 In the iteration d The speed of the dimension, x id (t) represents the potential solution particle of the problem i In the t In the iteration d The location of the dimension, x id Representation of potential solution particles i In the d The location of the dimension, represents the potential solution particle of the problem i In the t+1 In the iteration d The location of the dimension, represents the potential solution particle of the problem i Searched d dimensional local optimal position, Particle swarm fusion g Searched d dimensional global optimal position.
8. The method for identifying defects in video images of electric power equipment according to claim 7, characterized in that: For the defect classification residual neural network, the inertia weight is adaptively adjusted using the following logic: w : In the formula, w max represents the maximum inertia weight, w min represents the minimum inertia weight, Iter max is the maximum number of iterations.
9. A power equipment video image defect recognition system, characterized in that: The system comprises: The residual network pre-training module is used to pre-train the initial residual neural network to obtain a residual neural network suitable for defect classification for image classification; Particle swarm initialization module, used to initialize the position and velocity of the particle swarm of potential solutions to the problem; A particle fitness value obtaining module, used for calculating the fitness value of each potential solution particle in the problem potential solution particle group, and the particle fitness value obtaining module is connected to the particle group initial module; Wherein, the position of the potential solution particle of the problem satisfies: a 2 >a 1. b 2 >b 1 o'clock The image area corresponding to the position of the potential particle of the problem is input into the applicable defect classification residual neural network to classify the current image area and output the image difference category defect probability value, wherein, a 1 is the horizontal coordinate of the first particle, b 1 is the vertical coordinate of the first particle, a 2 is the horizontal coordinate of the second particle, b 2 is the ordinate of the second particle; The image difference category defect probability value is returned to the particle swarm optimization algorithm to process and obtain the fitness function corresponding to the probability value of different categories of defects fitness : fitness=|1-max(P r1 ,P r2 ,P r3 ,…)|; In the formula, P r1 express r The probability value corresponding to category 1, P r2 express r The probability value corresponding to the 2 categories, P r3 express r The probability values corresponding to the 3 categories are: max(P r1 ,P r2 ,P r3 ,…) The maximum value of the probability values of the different types of defects; A particle swarm position and speed iteration module is used to perform continuous iteration operations using a particle swarm optimization algorithm according to the fitness value to find the optimal position solution and the optimal speed solution, and process to obtain the local update optimal solution and the global update optimal solution to update the position and the speed of the particle with the potential solution to the problem. The particle swarm position and speed iteration module is connected to the residual network pre-training module and the particle fitness value obtaining module; A defect coordinate acquisition module, used to terminate the continuous iteration operation when the termination condition of the particle swarm optimization algorithm is met, and output the optimal position parameter and the defect coordinate position in the video image of the power equipment according to the position and speed of the potential solution particle of the problem, wherein the defect coordinate acquisition module is connected to the particle swarm position and speed iteration module; A guided learning classification module is used to search and determine applicable residual network parameters using the particle swarm optimization algorithm, guide the applicable defect classification residual neural network to learn, and obtain defect classification data according to the defect coordinate position, wherein the applicable residual network parameters include: applicable learning rate, applicable regularization term coefficient and applicable convolution kernel size, and the guided learning classification module is connected to the residual network pre-training module and the defect coordinate acquisition module.
Citation Information
Patent Citations
Method for detecting defects of bolts with pins in electric power inspection image
CN110232687A
YOLO v3-based power transmission line defect rapid detection method
CN115937079A
Method for reproducing two-dimensional defect of petroleum pipeline PSO-BP (Particle Swarm Optimization-Back-Propagation) neural network
CN102364501A
Variation particle swarm optimized BP neural network proportion integration differentiation (PID) control algorithm
CN104834215A
Photovoltaic cell appearance defect classification method based on multi-channel residual neural network
CN109376792A
