CN115049607A - Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection - Google Patents

Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection Download PDF

Info

Publication number
CN115049607A
CN115049607A CN202210654558.6A CN202210654558A CN115049607A CN 115049607 A CN115049607 A CN 115049607A CN 202210654558 A CN202210654558 A CN 202210654558A CN 115049607 A CN115049607 A CN 115049607A
Authority
CN
China
Prior art keywords
network
detection
yolox
body unit
insulation board
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210654558.6A
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.)
Sichuan University of Science and Engineering
Original Assignee
Sichuan University of Science and Engineering
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 Sichuan University of Science and Engineering filed Critical Sichuan University of Science and Engineering
Priority to CN202210654558.6A priority Critical patent/CN115049607A/en
Publication of CN115049607A publication Critical patent/CN115049607A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • 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/20081Training; Learning
    • 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/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Testing Of Short-Circuits, Discontinuities, Leakage, Or Incorrect Line Connections (AREA)
  • Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)

Abstract

The invention discloses an insulating plate defect identification method based on YOLOx _ s enhanced target feature detection, which comprises the following steps: s1, collecting the surface image of the insulating plate, preprocessing the surface image and constructing a data set; s2, constructing and training an insulation board defect detection network based on a YOLOx _ S network by using a data set; and S3, inputting the surface image of the insulation board to be detected into the trained insulation board defect detection network, and obtaining the insulation board defect identification result containing the defect type and position. The detection system integrates key technologies such as deep learning, target detection, attention mechanism, light weight and Transformer architecture, intelligently detects the surface defects of the insulating partition plate, realizes automatic, intelligent and informatization detection of the basic electric power safety tool-the insulating partition plate, replaces the traditional manual visual method, reduces manpower and material resources, improves the efficiency by more than several times, and greatly improves the detection precision.

Description

Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection
Technical Field
The invention belongs to the technical field of target identification, and particularly relates to an insulation board defect identification method based on YOLOx _ s enhanced target feature detection.
Background
At present, electricity is an indispensable power source in human life, so that the pressure of a power grid company on electricity operation and work is huge, including maintenance of normal operation of electricity, overhaul and maintenance of electrical equipment and the like. The electric power safety tool is a basic tool for ensuring normal operation of electric power, and the insulating partition plate belongs to one of basic electric power safety tools and is protection operation isolation equipment resistant to high voltage breakdown. In power construction operations, the same isolation protection is often used for transformers, section switches, and the like. The lightning arrester is also used for isolating electrified equipment on the angle iron cross arm, such as replacement of a drop fuse, and shielding adjacent phases during lightning arrester so as to limit the moving range of people and improve the insulation level of the adjacent phases. The insulating partition plate can also be arranged between the movable contact and the fixed contact of the disconnecting link which are pulled open so as to prevent the disconnecting link from mistakenly transmitting power after falling down by itself. Some work with insufficient safety distance needs to install an insulating partition plate between the disconnecting link and a base positioned below the disconnecting link, so that the personal safety of operators is protected. Therefore, the small insulating baffle plate not only effectively isolates the live equipment, but also provides safety guarantee for operators. And the method can also effectively provide favorable conditions for areas which are inconvenient for carrying out hot-line work, and expand the work items of the hot-line work.
Acceptable insulating spacers should be smooth and flat, not allow for impurities, pits, and other obvious defects, and allow for only minor scratches. The surface defects are caused for the surface of the insulating separator by defects of impurities, pits, or scratches due to improper processing or handling during factory manufacturing and during transportation. In addition, the defects of sol and voltage breakdown are caused under the high-temperature and high-pressure environment in the using process of the electric power operation field. Therefore, the accurate detection of the surface defects of the insulating partition plates can effectively prevent the defective products from flowing out and the high-quality products from being used, the defective insulating partition plates are found and replaced in time, the safety of electric power operating personnel is guaranteed, the normal operation of a power grid is guaranteed, and the full-period intelligent service life management of the insulating partition plates is realized.
The defect detection technology belongs to the field of target detection, in which deep learning is widely researched due to strong feature extraction capability and good characterization capability of an original image, and therefore, target detection networks such as fast RCNN, YOLO and SSD based on the deep learning are developed, wherein the YOLO series network has the characteristics of high real-time performance and simple structure, and can realize good detection effect. The Yolox is a high-performance Yolox network, the performance of the Yolox network exceeds Yolov4 and Yolov5 on a coco data set, the original Yolox network has high detection precision, but when the Yolox network is applied to the detection task of the surface defects of the insulating partition, the problem of insufficient detection capability on the detection of small targets such as impurities and pits still exists, and the detection capability on medium and large targets needs to be continuously enhanced. The existing detection method of the insulating partition plates is a manual visual method, and the defects of a plurality of insulating partition plates are detected one by one through naked eyes of a quality inspector, however, the method is easily influenced by human spiritual power and fatigue degree, so that missing detection or wrong detection is caused, the working efficiency is low, and economic loss and potential safety hazards are brought to factories and power companies.
Disclosure of Invention
In view of the above defects in the prior art, the insulating board defect identification method based on the YOLOx _ s enhanced target feature detection provided by the invention solves the problem of the existing insulating board detection method that the detection capability of the small target defect is insufficient, and further enhances the detection capability of the medium and large targets.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that: an insulation board defect identification method based on YOLOx _ s enhanced target feature detection comprises the following steps:
s1, collecting the surface image of the insulating plate, preprocessing the surface image and constructing a data set;
s2, constructing and training an insulation board defect detection network based on a YOLOx _ S network by using a data set;
in the insulation board defect detection network, an RFB _ S module and an attention mechanism CBAM module are arranged on the output scale of small target detection, and a CoT module is arranged on the output scale of medium and large target detection;
and S3, inputting the surface images of the insulating plates to be detected into a trained insulating plate defect detection network, and obtaining an insulating plate defect identification result containing defect types and positions.
Further, the insulation board defect detection network in step S2 is a network structure formed based on YOLOx _ S, and includes a backbone network, a feature fusion network, a small target output scale network, and a medium-large target output scale network;
the trunk network comprises an input layer, a Focus layer, a Conv2D _ BN _ SiLU layer, a first Resblock body unit, a second Resblock body unit, a first CoT _ Res body unit and a second Cot _ Res body unit which are sequentially connected;
the output ends of the first Resblock body unit and the second Resblock body unit are also connected with a small target output scale network through an RFB _ S module and an attention mechanism CBAM module which are connected in sequence;
the output ends of the first CoT _ Res body unit and the second CoT _ Res body unit are also connected with the medium and large target output scale network;
a CoT module is arranged in a CSP residual error structure in the medium and large target output scale network;
the feature fusion network performs up-down sampling feature extraction operation on different output scales of the small target output scale network and the medium and large target output scale network, and performs feature fusion on the same scale after the up-down sampling feature extraction operation.
Further, the output scales of the first Resblock body unit, the second Resblock body unit, the first CoT _ Res body unit, and the second CoT _ Res body unit are 104 × 104, 52 × 52,26 × 26, and 13, respectively.
Further, the convolution operation in the process of fusing the up-sampling features in the small target output scale network and the medium and large target output scale network is a deep separable convolution operation.
Further, the expression of the depth separable convolution operation is:
F dsc =H*W*N(K 2 +C)
in the formula, H and W are input height and width; k is the convolution kernel size; n is the number of convolution kernels and C is the number of channels.
Further, in the feature fusion process in the small target output scale network and the medium and large target output scale network, the feature fusion from the output features in the medium and large target output scale network to the output features in the small target output scale network includes 2 times and 4 times of up-sampling, and the feature fusion from the small target output scale network to the medium and large target output scale network includes 2 times and 4 times of down-sampling.
Further, in step S2, training the insulation board defect detection network by using a momentum random gradient descent method and an Adam optimization algorithm;
wherein, the expression of the momentum random gradient descent method is as follows:
Figure BDA0003688806770000041
Figure BDA0003688806770000042
in the formula, theta n The value of the nth time is updated for the gradient iteration,
Figure BDA0003688806770000043
for the derivation of the nth gradient, λ is a momentum parameter, and the value range is [0-1 ]]That is, the degree of the last gradient direction is kept, J (θ) is a loss function value, and α is a learning rate;
the expression of the Adam optimization algorithm is:
Figure BDA0003688806770000044
Figure BDA0003688806770000045
v t * =v t /(1-β 1 t )
s t * =s t /(1-β 2 t )
Figure BDA0003688806770000046
in the formula, v t Is the exponentially decaying average of the historical gradient, beta 1 And beta 2 All of which are the momentum coefficients,
Figure BDA0003688806770000047
representing the gradient of the loss function with respect to theta at the t-th time, s t Is the exponentially decaying average of the historical squared gradient, v t * Is to v t Deviation correction value of(s) t * Is a pair of s t Deviation correction value of beta 1 t Momentum value of exponential decay mean value, beta, for initial offset correction 2 t The average value of the exponential decay of the historical square gradient during the initial deviation correction is a momentum value, and epsilon is a minimum value to prevent the denominator from being zero.
Further, the classification loss function in the insulation board defect detection network is as follows:
Figure BDA0003688806770000051
BCE(p,y)=BCE(p t )=-log(p t )
FL(p t )=-α t (1-p t ) γ log(p t )
wherein p is a predicted output value, p t To define the log function for p, y is the actual value, BCE (-) is a dichotomized cross entropy loss function, γ is the modulation coefficient, α is t The positive and negative sample weight parameters are used for controlling the sharing weight of the positive and negative samples to the total loss; FL (. cndot.) is the Focal loss function.
The invention has the beneficial effects that:
(1) the invention establishes an insulation board defect detection network based on improved YOLOx _ s aiming at the surface defects of the insulation board based on a deep learning target detection algorithm, intelligently trains an insulation board surface defect data set based on the detection network, then stores parameters when the network performance reaches the best, namely the insulation board defect detection network based on the improved YOLOx _ s, and finally inputs a test set to carry out network performance test. The method enhances the detection capability of the tiny target of the insulating partition plate, is not only suitable for defect detection during the production of the insulating partition plate and ensures that high-quality products flow into the market, but also suitable for the surface defect detection of the insulating partition plate on the electric power operation site, and can find and replace the defects in time and ensure the construction safety of electric power operation personnel and the normal operation of a power grid.
(2) The detection system integrates key technologies such as deep learning, target detection, attention mechanism, light weight, Transformer architecture and the like, can intelligently detect the surface defects of the insulating partition plate based on the improved YOLOx _ s, realizes automatic, intelligent and informatization detection of the insulating partition plate serving as a basic electric power safety tool, replaces the traditional manual visual method, reduces manpower, material resources and the like, improves the efficiency by more than several times, and improves the detection precision by one order of magnitude.
Drawings
Fig. 1 is a flowchart of an insulating board defect identification method based on YOLOx _ s enhanced target feature detection provided by the invention.
Fig. 2 is a schematic diagram of a fault detection network of the insulating board provided by the invention.
Fig. 3 is a schematic diagram of the RFB _ S module on a small target output scale provided by the present invention.
FIG. 4 is a schematic diagram of the CBRM module of the present invention for attention on a small target output scale.
FIG. 5 is a schematic diagram of a CoT module provided by the present invention.
FIG. 6 is a residual error structure unit provided by the present invention, wherein (a) is a ResNet residual error structure unit; (b) is the residual structural unit of the Cot module.
Fig. 7 is a schematic diagram of a conventional convolution method provided by the present invention.
FIG. 8 is a schematic diagram of the depth separable convolution scheme provided by the present invention, wherein (a) Depthwise convolution; (b) poitwise convolution.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 1, an embodiment of the present invention provides an insulating board defect identification method based on YOLOx _ s enhanced target feature detection, including the following steps:
s1, collecting the surface image of the insulating plate, preprocessing the surface image and constructing a data set;
s2, constructing and training an insulation board defect detection network based on a YOLOx _ S network by using a data set;
in the insulation board defect detection network, an RFB _ S module and an attention mechanism CBAM module are arranged on the output scale of small target detection, and a CoT module is arranged on the output scale of medium and large target detection;
and S3, inputting the surface image of the insulation board to be detected into the trained insulation board defect detection network, and obtaining the insulation board defect identification result containing the defect type and position.
Step S1 of the embodiment of the present invention includes the following contents:
1) unifying the specifications of the surface images of the insulating partition boards, setting the self-made and collected data pictures to be 640 x 640 in size, and then inputting the data pictures into a network for training, verifying, testing and other operations;
2) setting a data set as a training set, a verification set and a test set, wherein the proportion of the training set to the verification set to the test set is 8:2, and the proportion of the training set to the verification set is 8: 2;
3) because the deep learning model requires a large number of data sets to be trained, it has a good effect, and therefore, in this embodiment, data enhancement processing, i.e., data expansion, needs to be performed on the data sets, and only data enhancement operation is performed on the training sets. The data enhancement technology is used for expanding fewer data sets, the high-quality data sets with large quantity can enable network convergence to be faster, performance training is better, and the data enhancement technology mainly comprises the operations of turning, cutting, brightness conversion and the like on pictures.
The insulation board defect detection network in step S2 of this embodiment is a network structure formed based on YOLOx _ S, and as shown in fig. 2, includes a backbone network, a feature fusion network, a small target output scale network, and a medium-large target output scale network;
the backbone network comprises an input layer, a Focus layer, a Conv2D _ BN _ SiLU layer, a first Resblock body unit, a second Resblock body unit, a first CoT _ Res body unit and a second Cot _ Res body unit which are sequentially connected;
the output ends of the first Resblock body unit and the second Resblock body unit are also connected with a small target output scale network through an RFB _ S module and an attention mechanism CBAM module which are connected in sequence;
the output ends of the first CoT _ Res body unit and the second CoT _ Res body unit are also connected with the medium and large target output scale network;
a CoT module is arranged in a CSP residual error structure in the medium and large target output scale network;
the feature fusion network performs up-down sampling feature extraction operation on different output scales of the small target output scale network and the medium and large target output scale network, and performs feature fusion on the same scale after the up-down sampling feature extraction operation.
In the embodiment of the present invention, the existing YOLOx network has three dimensional outputs, taking 832 × 832 image size as an example, the final outputs 52 × 52,26 × 26, and 13 × 13 are used to detect small, medium, and large targets respectively, and since the defect of insulating spacer pits and impurities occupies about 8 to 20 pixels, a characteristic dimensional output of 104 × 104 is added to the main network to detect the defect of the small target. Therefore, the output scales of the first Resblock body unit, the second Resblock body unit, the first CoT _ Res body unit and the second CoT _ Res body unit in the insulating board defect detection network are 104 × 104, 52 × 52,26 × 26 and 13 × 13, respectively. Because the detection difficulty of small targets and tiny targets is greater, the problem that the feature extraction of the two types of targets is insufficient compared with that of medium-large targets exists, therefore, an RFB _ S (redundant field Block) module and an Attention mechanism CBAM (focused Block attachment module) module are connected to the scale output of 104, 104 and 52, and are used for enhancing the feature extraction effect; wherein, the RFB _ S module is shown in FIG. 3, and the attention mechanism CBAM module is shown in FIG. 4.
The design inspiration of the RFB _ S module in this embodiment is from a receptive field structure of human vision, and by reference to the inclusion structure, a hole convolution is added on the basis of the inclusion structure, so that the receptive field is effectively increased, and richer feature information is obtained. The hole convolution is a convolution idea proposed for reducing image resolution and losing information by down-sampling in the image semantic segmentation problem, and a 3 × 3 convolution kernel originally has a 5 × 5 (scaled rate 2) or more receptive field under the same parameter and calculation amount by adding holes to expand the receptive field, so that the down-sampling is not needed.
The core focus of the attention mechanism in this embodiment is to let the network pay attention to the places where it needs more attention, and in general, the attention mechanism can be divided into a channel attention mechanism, a spatial attention mechanism, and a combination of the two mechanisms. The attention mechanism CBAM module is a combination of a channel attention mechanism and a space attention mechanism, and can achieve better effects compared with the attention mechanism of an SE module which only focuses on channels.
In the embodiment of the invention, in order to further improve the detection capability of the large and medium targets, a CoT module is introduced in the embodiment of the invention, and the CoT module firstly adopts 3 × 3 convolution on the key (K) to model static context information, then concat the key after query (Q) and context information modeling, and then uses two continuous 1 × 1 convolutions to self-pay attention, generates an attention matrix, and then multiplies a feature mapping value (V) to generate a dynamic context. The static and dynamic context information is finally fused into an output. As the module needs to obtain rich context information to help realize the overall identification and positioning of the target, the relevance of the context information of the medium and large targets is strong, and a larger effect can be played, and the relevance of the context information of the small targets is not strong, so that negative effects are likely to be brought. Therefore, the invention adds the CoT module to the scale responsible for detecting the medium and large targets, and specifically, the CSP residual structural layers at 26 × 26 and 13 × 13 in the YOLOx network replace the conventional 3 × 3 convolution, the CoT module is shown in fig. 5, and the resulting CoT _ Res module after replacement is shown in fig. 6.
In the embodiment of the present invention, since an output scale is added, stronger feature fusion is required to obtain richer feature information, in the process of feature fusion in the small target output scale network and the medium and large target output scale network in the network structure provided in this embodiment, feature fusion from the output feature in the medium and large target output scale network to the output feature in the small target output scale network includes 2 times and 4 times of up-sampling, and feature fusion from the small target output scale network to the medium and large target output scale network includes 2 times and 4 times of down-sampling. Specifically, 4 times upsampling is performed on the output of 13 × 13 to perform feature fusion with the output connection of 52 × 52, and similarly, 4 times upsampling is performed on the output of 26 × 26 to perform feature fusion with the output connection of 104 × 104; similarly, the output of 104 × 104 after the first layer feature fusion is subjected to 4-fold down-sampling and connected to the output of 26 × 26 after the first layer feature fusion, and similarly, the output of 52 × 52 is subjected to 4-fold down-sampling and connected to the output of 13 × 13, thereby further enhancing the feature fusion.
In the embodiment of the invention, the convolution operation in the process of fusing the up-sampling features in the small target output scale network and the medium and large target output scale network is the deep separable convolution operation, so that the parameter quantity and the calculated quantity of the network are reduced, and the calculating speed is improved.
In the embodiment of the present invention, a depth separable convolution is adopted to form a lightweight network structure, a conventional convolution manner is shown in fig. 7, a depth separable convolution manner is shown in fig. 8, and the calculation amounts of the two types of convolution are:
F normal =H*W*K 2 *N*C
F dsc =H*W*N(K 2 +C)
in the formula, H and W are input height and width; k is the convolution kernel size; n is the number of convolution kernels and C is the number of channels.
Thereby can seeIn the depth separable convolution operation provided by the embodiment of the invention, the calculated amount is reduced to the original (K) when the same effect as the conventional convolution mode is achieved 2 +C)/(K 2 C) times.
In step S2 of the embodiment of the invention, the insulating plate defect detection network is trained by a momentum random gradient descent method and an Adam optimization algorithm; because the random gradient descent method is easy to fall into the limitation of a local optimal value, the momentum idea is introduced, namely the gradient direction updated last time is kept, and when the next update is carried out, the next gradient direction is combined with the last gradient direction to carry out parameter update, namely the momentum gradient descent method. The value of the momentum term gamma determines the direction information of partial update on the reservation, and the value interval is [0, 1%]Initially, 0.5 may be taken, increasing with iteration. The Adam algorithm is a combination of the momentum gradient descent method and the RMSprop algorithm, and is not only required to keep the exponential decay mean v of the historical gradient t Also, an average s of the exponentially decaying historical squared gradients is stored t In addition to the initial iteration v t And s t The Adam algorithm also introduces bias corrections towards the zero problem, thereby obtaining better statistics at the early stages of training.
Wherein, the expression of the momentum random gradient descent method is as follows:
Figure BDA0003688806770000101
Figure BDA0003688806770000102
in the formula, theta n The value of the nth time is updated for the gradient iteration,
Figure BDA0003688806770000103
lambda is a momentum parameter for the derivation of the nth gradient, and the value range is [0-1 ]]That is, the degree of the last gradient direction is kept, J (θ) is a loss function value, and α is a learning rate;
the expression of the Adam optimization algorithm is as follows:
Figure BDA0003688806770000111
Figure BDA0003688806770000112
v t * =v t /(1-β 1 t )
s t * =s t /(1-β 2 t )
Figure BDA0003688806770000113
in the formula, v t Is an exponentially decaying average of historical gradients, beta 1 And beta 2 All of which are the momentum coefficients,
Figure BDA0003688806770000114
representing the gradient of the loss function with respect to theta at the t-th time, s t Is the exponentially decaying average of the historical squared gradient, v t * Is to v t Deviation correction value of(s) t * Is a pair of s t Deviation correction value of beta 1 t Momentum value of exponential decay mean value, beta, for initial offset correction 2 t The average value of the exponential decay of the historical square gradient during the initial deviation correction is a momentum value, and epsilon is a minimum value to prevent the denominator from being zero.
In the embodiment of the invention, in the task of detecting the defect of the insulating partition, the defect of the picture is used as a positive sample, and the other and background are used as negative samples, and if a reference network of YOLOv4, v5 is adopted, obviously, since most of the prior frames belong to the negative samples, the direction of the loss function value is dominated by the negative samples, which is very unfavorable for the detection effect. The anchor-free idea adopted by YOLOx alleviates the negative influence, but the imbalance between the samples which are easy to classify and the samples which are difficult to classify exists, so that the samples which are easy to classify lead to the direction of the loss function value, and the samples which are difficult to classify need to be detected more accurately to improve the detection accuracy of the network. Therefore, the classification loss function in the insulation board defect detection network in the invention is a Focal loss function, and the expression thereof is as follows:
Figure BDA0003688806770000115
BCE(p,y)=BCE(p t )=-log(p t )
FL(p t )=-α t (1-p t ) γ log(p t )
wherein p is a predicted output value, p t To define a log function for p, y is the actual value, BCE (-) is a binary cross-entropy loss function, γ is the modulation factor, α is t The positive and negative sample weight parameters are used for controlling the sharing weight of the positive and negative samples to the total loss; FL (. cndot.) is the Focal loss function.
In the embodiment of the invention, the performance verification result of the network is obtained by inputting the data in the verification set into the network and taking the mAP value, the recall rate and the precision rate of the verification set as evaluation indexes, and then the network structure is optimized to obtain a more accurate identification result, wherein the recall rate and the precision value calculation formula are as follows:
Figure BDA0003688806770000121
Figure BDA0003688806770000122
in the formula, TP is a true positive sample, FP is an erroneous positive sample, and FN is an erroneous negative sample.
The defect identification by using the trained network in the embodiment of the invention comprises the following contents:
(1) and inputting the test set to test the network performance, and marking and displaying the defect position and category by using the static marking box of the test set.
(2) And detecting the real-time performance of the camera, namely placing the real object of the insulation partition plate of the test set under the camera, changing a network into a video detection mode, and marking and displaying the position and the category of the defect by using a dynamic marking frame.

Claims (8)

1. An insulation board defect identification method based on YOLOx _ s enhanced target feature detection is characterized by comprising the following steps:
s1, collecting the surface image of the insulating plate, preprocessing the surface image and constructing a data set;
s2, constructing and training an insulation board defect detection network based on a YOLOx _ S network by using a data set;
in the insulation board defect detection network, an RFB _ S module and an attention mechanism CBAM module are arranged on the output scale of small target detection, and a CoT module is arranged on the output scale of medium and large target detection;
and S3, inputting the surface image of the insulation board to be detected into the trained insulation board defect detection network, and obtaining the insulation board defect identification result containing the defect type and position.
2. The insulation board defect identification method based on YOLOx _ S enhanced target feature detection as claimed in claim 1, wherein the insulation board defect detection network in step S2 is a network structure based on YOLOx _ S formation, and comprises a backbone network, a feature fusion network, a small target output scale network and a medium and large target output scale network;
the backbone network comprises an input layer, a Focus layer, a Conv2D _ BN _ SiLU layer, a first Resblock body unit, a second Resblock body unit, a first CoT _ Res body unit and a second Cot _ Res body unit which are sequentially connected;
the output ends of the first Resblock body unit and the second Resblock body unit are connected with a small target output scale network through an RFB _ S module and an attention system CBAM module which are connected in sequence;
the output ends of the first CoT _ Res body unit and the second CoT _ Res body unit are also connected with the medium and large target output scale network;
a CoT module is arranged in a CSP residual error structure in the medium and large target output scale network;
the feature fusion network performs up-down sampling feature extraction operation on different output scales of the small target output scale network and the medium and large target output scale network, and performs feature fusion on the same scale after the up-down sampling feature extraction operation.
3. The YOLOx _ s-based enhanced target feature detection-based insulating board defect identification method according to claim 2, wherein the output scales of the first Resblock body unit, the second Resblock body unit, the first CoT _ Res body unit and the second CoT _ Res body unit are 104 × 104, 52 × 52,26 × 26 and 13, respectively.
4. The insulating board defect identification method based on YOLOx _ s enhanced target feature detection as claimed in claim 2, wherein the convolution operation in the process of fusing the up-sampling features in the small target output scale network and the medium and large target output scale network is a deep separable convolution operation.
5. The method of insulating board defect identification based on YOLOx _ s enhanced target feature detection of claim 4, wherein the expression of the depth separable convolution operation is:
F dsc =H*W*N(K 2 +C)
in the formula, H and W are input height and width; k is the convolution kernel size; n is the number of convolution kernels and C is the number of channels.
6. The insulating board defect identification method based on YOLOx _ s enhanced target feature detection as claimed in claim 4, wherein in the feature fusion process in the small target output scale network and the medium and large target output scale network, the feature fusion from the output features in the medium and large target output scale network to the output features in the small target output scale network comprises 2-fold and 4-fold up-sampling, and the feature fusion from the small target output scale network to the medium and large target output scale network output features comprises 2-fold and 4-fold down-sampling.
7. The insulating board defect identification method based on YOLOx _ S enhanced target feature detection as claimed in claim 1, wherein in step S2, the insulating board defect detection network is trained by a momentum random gradient descent method and an Adam optimization algorithm;
wherein, the expression of the momentum random gradient descent method is as follows:
Figure FDA0003688806760000021
Figure FDA0003688806760000022
in the formula, theta n The value of the nth time is updated for the gradient iteration,
Figure FDA0003688806760000023
lambda is a momentum parameter for the derivation of the nth gradient, and the value range is [0-1 ]]That is, the degree of the last gradient direction is kept, J (θ) is a loss function value, and α is a learning rate;
the expression of the Adam optimization algorithm is:
Figure FDA0003688806760000031
Figure FDA0003688806760000032
Figure FDA0003688806760000033
Figure FDA0003688806760000034
Figure FDA0003688806760000035
in the formula, v t Is an exponentially decaying average of historical gradients, beta 1 And beta 2 All of which are the momentum coefficients,
Figure FDA0003688806760000036
representing the gradient of the loss function with respect to theta at the t-th time, s t Is the exponentially decaying average of the historical squared gradient, v t * Is pair v t Deviation correction value of(s) t * Is a pair of s t Deviation correction value of beta 1 t Momentum value of exponential decay mean value, beta, for initial offset correction 2 t The epsilon is a minimum value which is a momentum value of an exponential decay average value of a historical square gradient during initial deviation correction, and prevents the denominator from being zero.
8. The method of claim 1, wherein the classification loss function in the insulation board defect detection network is:
Figure FDA0003688806760000037
BCE(p,y)=BCE(p t )=-log(p t )
FL(p t )=-α t (1-p t ) γ log(p t )
wherein p is the predicted output value, p t To define the log function for p, y is the actual value, BCE (-) is a dichotomized cross entropy loss function, γ is the modulation coefficient, α is t The positive and negative sample weight parameters are used for controlling the sharing weight of the positive and negative samples to the total loss; FL (. cndot.) is the Focal loss function.
CN202210654558.6A 2022-06-10 2022-06-10 Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection Pending CN115049607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210654558.6A CN115049607A (en) 2022-06-10 2022-06-10 Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210654558.6A CN115049607A (en) 2022-06-10 2022-06-10 Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection

Publications (1)

Publication Number Publication Date
CN115049607A true CN115049607A (en) 2022-09-13

Family

ID=83161932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210654558.6A Pending CN115049607A (en) 2022-06-10 2022-06-10 Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection

Country Status (1)

Country Link
CN (1) CN115049607A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116205895A (en) * 2023-03-16 2023-06-02 四川轻化工大学 Transformer oil leakage detection method based on improved YOLOv5
CN117173794A (en) * 2023-11-03 2023-12-05 广州英码信息科技有限公司 Pedestrian re-identification method suitable for edge equipment deployment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116205895A (en) * 2023-03-16 2023-06-02 四川轻化工大学 Transformer oil leakage detection method based on improved YOLOv5
CN116205895B (en) * 2023-03-16 2024-04-02 四川轻化工大学 Transformer oil leakage detection method based on improved YOLOv5
CN117173794A (en) * 2023-11-03 2023-12-05 广州英码信息科技有限公司 Pedestrian re-identification method suitable for edge equipment deployment
CN117173794B (en) * 2023-11-03 2024-03-08 广州英码信息科技有限公司 Pedestrian re-identification method suitable for edge equipment deployment

Similar Documents

Publication Publication Date Title
CN110598736B (en) Power equipment infrared image fault positioning, identifying and predicting method
CN115049607A (en) Insulating plate defect identification method based on YOLOx _ s enhanced target feature detection
CN109859163A (en) A kind of LCD defect inspection method based on feature pyramid convolutional neural networks
CN112734692A (en) Transformer equipment defect identification method and device
CN111598843A (en) Power transformer respirator target defect detection method based on deep learning
CN109635928A (en) A kind of voltage sag reason recognition methods based on deep learning Model Fusion
CN112116573A (en) High-precision infrared image anomaly detection method and system
CN106600447A (en) Transformer station inspection robot centralized monitoring system big data cloud analysis method
CN114021741A (en) Photovoltaic cell panel inspection method based on deep learning
CN114387538A (en) Substation operation site safety identification method based on YooloX network
CN106228172A (en) damaged insulator image extraction method based on cluster analysis
CN112734732B (en) Railway tunnel cable leakage clamp detection method based on improved SSD algorithm
CN117788950A (en) Pavement disease detection method based on improved YOLOv8 model
CN116342542A (en) Lightweight neural network-based steel product surface defect detection method
Wei Power grid facility thermal fault diagnosis via object detection with synthetic infrared imagery
CN117764547A (en) Photovoltaic string fault diagnosis method and system
CN115035108A (en) Insulator defect detection method based on deep learning
CN113837178A (en) Deep learning-based automatic positioning and unified segmentation method for meter of transformer substation
CN115100546A (en) Mobile-based small target defect identification method and system for power equipment
CN116205832A (en) Metal surface defect detection method based on STM R-CNN
Tang et al. Fault diagnosis of the external insulation infrared images based on Mask Region convolutional neural network and perceptual hash joint algorithm
Sheng et al. A YOLOX-Based Detection Method of Triple-Cascade Feature Level Fusion for Power System External Defects
CN112508905A (en) Hardware rust image detection method and computer readable storage medium
CN112132088A (en) Inspection point location missing inspection identification method
Luo et al. SOLOv2-cable: A Power Cable Segmentation Algorithm in Complex Scenarios

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