A method and system for detecting defects in transmission line insulators by integrating transfer learning
Through the two-level object detection model TST R-CNN, a fusion transfer learning two-level object detection model, using the Faster R-CNN algorithm and the lightweight network mobilenet-V2 and CBAM attention module, the problem of low insulator defect detection accuracy in drone images is solved, and efficient and accurate insulator defect recognition is achieved.
Patent Information
- Application Number
- CN202210829669.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-07-14
AI Technical Summary
In the insulator images taken by drones, the background interference is strong and the body size is different, resulting in low detection accuracy and low efficiency of insulator defects, especially in complex background conditions.
The two-level object detection model TST R-CNN, which integrates transfer learning, is adopted to construct normal and defective insulator data sets, and transfer learning is performed using the Faster R-CNN algorithm. The insulator area is first positioned and then the local image is cropped for defect detection. Combined with the lightweight network mobilenet-V2 and CBAM attention module, it reduces background interference and improves detection accuracy.
It effectively improves the accuracy and speed of insulator defect detection, reduces the interference of complex background on detection, solves the problem of small sample data volume, and realizes efficient insulator defect identification.
Smart Images

Figure CN115205256B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of insulator detection, and in particular to a method and system for detecting defects in transmission line insulators integrating transfer learning. Background Art
[0002] Transmission line inspection is crucial for ensuring the safe, uninterrupted, and reliable operation of power systems. Insulators, a crucial component in transmission lines, primarily provide support and insulation for conductors. As glass-ceramic components, they operate in harsh environments for extended periods. Exposure to dirt, moisture, and electric fields can cause current leakage on the insulator surface, resulting in dry zones. Air breakdown in these dry zones can cause arcing, which can erode the glass sheds. Deeper erosion can lead to spontaneous explosion. Insulators age over time, gradually degrading their performance and eventually losing their insulating properties. Other defects include dropped strings, rust, contamination, flashover, or electrical corrosion. Once a fault occurs, it poses a significant threat to the safety and reliability of transmission lines. Therefore, accurately and efficiently verifying the integrity of insulators is crucial.
[0003] Traditional power safety inspections rely primarily on manual field surveys. Since most high-voltage overhead lines are located in complex natural terrain, specialized personnel must conduct inspections from high altitudes. This manual inspection method is not only subject to significant environmental and climatic constraints, posing a high risk, but also involves numerous overhead transmission lines and a wide variety of insulator types. Relying solely on manual inspections is labor-intensive, risky, and inefficient. Prolonged overhead work can also reduce detection accuracy due to fatigue. To address these issues and make power inspections more efficient, automated, and intelligent, the recent emergence of drone inspections has gradually replaced manual inspections. These drones are simple to operate and have low environmental requirements. They not only reduce labor costs, improve energy inspection efficiency, but also ensure safety.
[0004] However, the high-definition images of insulators captured by drones are numerous, and the insulators in the images are often interfering with the background and vary in size. Manually processing these images to determine whether the insulators are in good condition takes a long time. Therefore, automated processing of image data to improve the accuracy and efficiency of insulator inspections has become a key factor in increasing power inspection efficiency.
[0005] In order to identify defective insulators from images collected by drones, research at home and abroad has mainly gone through two stages based on traditional image processing technology and deep learning technology.
[0006] Traditional image detection algorithms generally use methods such as graphic segmentation and machine learning to extract the features of a given image, establish a corresponding mathematical model, and then use the mathematical model and the extracted image features to train an image feature classifier to detect and locate insulators.
[0007] Yang Huijin et al. used the LBP (Local Binary Pattern) operator to extract features from a given image, then used the Adaboost algorithm to classify the features. Finally, they used OTUS threshold segmentation to detect crack defects. Xu Xiangjun et al. used edge detection operators to detect edge features of insulators in images, and then used Gaussian scale-space decomposition and insulator shape features to detect the insulators. Zhong Chao et al. first preprocessed the image using partial differential equations and then proposed a detection algorithm based on insulator contours by analyzing the insulator shape features. Zhao used SURF (Speeded Up Robust Features) to extract features from inspection images, then used the correlation coefficient IFS for feature classification. Insulator detection was achieved by comparing the shape feature values of each category and the minimum bounding rectangle. Zhao et al. proposed an insulator location algorithm based on insulator shape features that combined azimuth detection and prior knowledge. Wu Yang et al. proposed two insulator detection algorithms based on the AdaBoost cascade classifier: one that combined target suggestion Bing and the other that combined 3D insulator models and sketch extraction. Zhai et al. integrated adaptive learning with saliency features and adaptive morphology to address the structural and deformation issues of insulators, proposing a fault detection algorithm based on saliency features and adaptive morphology. Shang Junping et al. used OTUS to segment images to extract insulator moment invariant features. They then employed a machine learning algorithm to precisely locate the insulators. Finally, they combined the Euclidean distance between adjacent insulator segments to analyze the location of self-rupture defects. Cheng et al. used edge detection operators to extract features and then combined them with insulator spatial features to detect self-explosion defects. However, traditional detection methods rely on manually extracted features, resulting in a series of drawbacks such as low accuracy and poor generalization.
[0008] As deep learning algorithms become a research hotspot, the development of deep learning in the field of image processing has gradually matured.
[0009] Xian et al. proposed a two-stage cascaded network based on a CNN (Convolutional Neural Network): the first stage locates insulators, followed by the second stage to detect insulator defects. Li et al. combined the Faster R-CNN network with a U-Net to locate and detect insulator defects in drone-captured images. Pan Zhe et al. proposed a detection network based on the MFIDN. This algorithm utilizes a multi-scale prediction structure and a weakly supervised, fine-grained MFINF network for insulator detection. Li Junfeng et al. combined the AlexNet with a random forest classifier to detect power equipment. Du Liqun et al. used a VGG-16-based SSD network to fine-tune the network model and generate adaptive default boxes for insulator detection. Liu Yepeng et al. improved the SSD detection model to detect insulators, introducing an FPN structure at the bottom layer of the image to enhance feature extraction and improve detection accuracy. However, these deep learning algorithms suffer from large parameter counts, weak generalization capabilities, and limited computational performance, resulting in poor detection performance in complex backgrounds. Summary of the Invention
[0010] The purpose of the present invention is to provide a method and system for detecting defects in transmission line insulators by integrating transfer learning, so as to improve the detection accuracy of insulator defects.
[0011] To achieve the above object, the present invention provides the following solutions:
[0012] A method for detecting defects in transmission line insulators by integrating transfer learning, the method comprising:
[0013] Constructing a normal insulator dataset and a defective insulator dataset; the normal insulator dataset includes normal insulator images and annotations of the normal insulators; the defective insulator dataset includes defective insulator images and annotations of the defective insulators;
[0014] The first Faster R-CNN network is trained using the normal insulator dataset, and the insulator detection weights of the trained first Faster R-CNN network are transferred to the second Faster R-CNN network to obtain the Faster R-CNN migration network.
[0015] The defective insulator dataset was used to train the Faster R-CNN migration network to obtain an insulator detection model.
[0016] Each defective insulator image in the defective insulator dataset is input into the insulator detection model, the insulator in the insulator image is located, and multiple insulator images with insulator annotation boxes are output;
[0017] In each insulator image with an insulator annotation frame, cropping is performed along the annotation frame, and defective parts of the cropped insulator are marked;
[0018] A defect dataset consisting of multiple cropped insulator images and labeled defective parts was used to train the third Faster R-CNN network to obtain a defect detection model.
[0019] According to the image of the insulator with defects to be detected, the insulator detection model and the defect detection model are used in sequence to obtain the defect image of the insulator.
[0020] Optionally, the step of cropping each insulator image with an insulator labeled frame along the labeled frame further includes:
[0021] Call the imgaug image enhancement library to enhance the number of insulator images obtained by cropping.
[0022] Optionally, the third Faster R-CNN network replaces the backbone network of the Faster R-CNN network with mobilenet-V2, and adds an attention module CBAM between the pooling layer and the fully connected layer of the Faster R-CNN network.
[0023] Optionally, the losses of the first Faster R-CNN network, the second Faster R-CNN network, and the third Faster R-CNN network all include RPN loss and Faster RCNN loss, and the RPN loss and Fast RCNN loss both include classification loss and regression loss.
[0024] A transmission line insulator defect detection system integrating transfer learning, the system comprising:
[0025] A data set construction module is used to construct a normal insulator data set and a defective insulator data set; the normal insulator data set includes normal insulator images and annotations of normal insulators; the defective insulator data set includes defective insulator images and annotations of defective insulators;
[0026] A first training module is used to train a first Faster R-CNN network using a normal insulator dataset, and migrate the insulator detection weights of the trained first Faster R-CNN network to a second Faster R-CNN network to obtain a Faster R-CNN migration network;
[0027] The second training module is used to train the Faster R-CNN migration network using the defective insulator dataset to obtain an insulator detection model;
[0028] The insulator positioning module is used to input each defective insulator image in the defective insulator dataset into the insulator detection model, locate the insulator in the insulator image, and output multiple insulator images with insulator annotation boxes;
[0029] An insulator cropping module is used to crop each insulator image along the insulator annotation frame and mark the defective part of the cropped insulator;
[0030] A third training module is used to train a third Faster R-CNN network using a defect dataset consisting of multiple cropped insulator images and annotations of defective parts to obtain a defect detection model;
[0031] The defect detection module is used to obtain a defect image of the insulator by sequentially using the insulator detection model and the defect detection model according to the image of the insulator with defects to be detected.
[0032] Optionally, the system further includes:
[0033] The enhancement module is used to call the imgaug image enhancement library to enhance the number of insulator images obtained by cropping.
[0034] Optionally, the third Faster R-CNN network replaces the backbone network of the Faster R-CNN network with mobilenet-V2, and adds an attention module CBAM between the pooling layer and the fully connected layer of the Faster R-CNN network.
[0035] Optionally, the losses of the first Faster R-CNN network, the second Faster R-CNN network, and the third Faster R-CNN network all include RPN loss and Fast RCNN loss, and the RPN loss and Fast RCNN loss both include classification loss and regression loss.
[0036] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0037] The present invention discloses a method and system for detecting insulator defects on power transmission lines that incorporates transfer learning. The method first constructs a dataset of normal and defective insulators. The method then uses the normal insulator dataset to train a first Faster R-CNN network. The model is then transferred to images of defective insulators with a smaller sample size. The insulators are located and their regions are cropped. Finally, the Faster R-CNN model is used, using the local insulator images as input, to train insulator defect detection weights to achieve defect classification and location. Using the Faster R-CNN algorithm as the baseline model, the present invention proposes a two-stage target detection model that incorporates transfer learning. This model effectively addresses the issue of poor detection performance in complex backgrounds and improves the accuracy of insulator defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 A flow chart of a method for detecting defects in transmission line insulators using transfer learning provided by an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of a transmission line insulator defect detection method integrating transfer learning provided by an embodiment of the present invention;
[0041] Figure 3 A schematic diagram showing similarities between sample sets in the source domain and the target domain provided by an embodiment of the present invention;
[0042] Figure 4 This is a flowchart of the Faster R-CNN algorithm provided by an embodiment of the present invention;
[0043] Figure 5 A network structure diagram of the RPN provided in an embodiment of the present invention;
[0044] Figure 6 Add a schematic diagram of the CBAM attention mechanism provided by an embodiment of the present invention;
[0045] Figure 7 A schematic diagram of the intersection-over-union ratio provided in an embodiment of the present invention;
[0046] Figure 8 A schematic diagram of bounding box regression provided by an embodiment of the present invention;
[0047] Figure 9This is a diagram showing the detection effect of the TST R-CNN algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.
[0049] The purpose of the present invention is to provide a method and system for detecting defects in transmission line insulators by integrating transfer learning, so as to improve the detection accuracy of insulator defects.
[0050] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0051] The embodiment of the present invention provides a method for detecting defects in transmission line insulators by integrating transfer learning. Figure 1-Figure 2 As shown, the method includes the following steps:
[0052] Step S1, constructing a normal insulator dataset and a defective insulator dataset; the normal insulator dataset includes normal insulator images and annotations of normal insulators; the defective insulator dataset includes defective insulator images and annotations of defective insulators.
[0053] Dataset Preparation: A dataset was constructed using images captured by drones during transmission line inspections. The labelimg tool was used to annotate insulators for training and testing. The quality of the data labels can also affect model training. During labeling, the drawn bounding boxes should be close to the edges of the objects being inspected and individually labeled. Strictly adhere to the labeling rules during the process. After labeling, the data was saved as an .xml file. The file contains information such as the image name, image location, and the name and location of the annotated bounding box.
[0054] The dataset used in the model training process includes 600 normal insulator images from the public insulator dataset (CPLID) and 350 self-labeled defective insulator images. The dataset is in PASCAL VOC format and annotated using the Label Img tool. The insulator images are labeled as "Insulator" and the defective images as "damaged" and "missing."
[0055] Transfer learning refers to training a set of model weights on one dataset and then migrating them to another dataset for use. During deep learning model training, data collection is costly, often leading to insufficient labeled data and insufficient sample size to meet the platform's training requirements. This makes it difficult to train weights with high adaptability and strong generalization capabilities. Transfer learning can effectively address this issue. The transfer problem involves the transfer of knowledge, and the learning subject can be divided into an experienced source domain and an inexperienced target domain, including the data and the probability distribution corresponding to that data.
[0056] According to different learning methods, transfer learning can be divided into sample-based, feature-based, model-based and relationship-based transfer. In this paper, we use sample-based transfer. Since the sample sets of the source domain and the target domain are similar, such as Figure 3 As shown in the figure, some feature data and information overlap, so knowledge learned from one dataset can be applied to another task. Specifically, the training process involves first training and weighing the weights of samples in the source domain, and then transferring them to the target domain for detection of similar samples.
[0057] Due to the self-explosion and damage defects of insulators, there are problems such as small targets and difficulty in feature extraction. At the same time, during the detection process, the existing target detection model will be interfered by the complex image background and small sample data volume. To address the above problems, the present invention uses the Faster R-CNN algorithm as the basic model and proposes a two-stage target detection model TST R-CNN (Two-stage transfer Region-CNN) that integrates transfer learning. The structure is as follows Figure 2 shown. Figure 2 In the figure, feature maps represent feature maps, Proposals represent proposed boxes, ROI Pooling represents pooling layers, and FC layers represent fully connected layers.
[0058] In the first stage, the insulator detection weights were trained on a public insulator dataset with a sufficient number of samples, using the Faster R-CNN network as the basic algorithm in the training process; the model was then migrated to insulator defect images with a smaller number of samples to locate the insulators and crop the insulator areas.
[0059] In the second stage, the Faster R-CNN model uses local insulator images as input to train insulator defect detection weights for defect classification and location. The proposed model effectively reduces interference from complex insulator image backgrounds by cropping them, focusing limited attention on the insulator body. This allows for rapid acquisition of the most effective information, uncovering the characteristics of the defect target and improving detection accuracy.
[0060] The first stage corresponds to the following steps S2, S3 and S4, and the second stage corresponds to the following steps S5 and S6.
[0061] Step S2: Use the normal insulator dataset to train a first Faster R-CNN network, and migrate the insulator detection weights of the trained first Faster R-CNN network to a second Faster R-CNN network to obtain a Faster R-CNN migration network.
[0062] Step S3: Use the defective insulator dataset to train the Faster R-CNN migration network to obtain an insulator detection model.
[0063] Step S4: input each defective insulator image in the defective insulator dataset into the insulator detection model, locate the insulator in the insulator image, and output multiple insulator images with insulator annotation boxes.
[0064] Step S5 : cropping each insulator image with an insulator marking frame along the marking frame, and marking defective parts of the cropped insulator.
[0065] Step S6: Using the defect dataset consisting of multiple cropped insulators and labeled defective parts to train a third Faster R-CNN network to obtain a defect detection model.
[0066] The algorithm flow of the first Faster R-CNN network and the second Faster R-CNN network in the first stage is as follows Figure 4 As shown. The network structure of RPN in Faster R-CNN network is as follows Figure 5 shown. Figure 4 In the example, Classifier represents the classifier, cls_logits represents the classification prediction score result, and box_pred represents the parameter value of the prediction box. Figure 5 In the figure, 2K scores indicates that the data dimension of the classification prediction score result is 2K, 4K coordinates indicates that the data dimension of the parameter value of the prediction box is 4K, and anchor box indicates the prediction box generated by the RPN structure.
[0067] The third Faster R-CNN network structure in the second stage is as follows Figure 6 As shown. The third Faster R-CNN network is lightweight designed:
[0068] 1) Replace the backbone network of the TST R-CNN model with mobilenet-V2
[0069] MobileNet v2 was proposed by the Google team in 2018. Compared to MobileNet V1, it has higher accuracy and a smaller model. The main structures in the network are: Inverted Residuals (inverted residual structure) and LinearBottlenecks (the last layer of the structure uses a linear layer).
[0070] 2) Add attention module CBAM
[0071] CBAM consists of two independent submodules, the Channel Attention Module (CAM) and the Spatial Attention Module (SAM), which perform channel and spatial attention respectively. This not only saves parameters and computing power, but also ensures that it can be integrated into the existing network architecture as a plug-and-play module. Figure 6 The addition of the CBAM attention mechanism can effectively learn to utilize the information of the target area and aggregate features from it, thereby improving the detection accuracy of insulator defects.
[0072] The network performance evaluation indicators for both the first and second phases include:
[0073] (1) Intersection and Union
[0074] The concept of intersection of union (IOU) comes from sets in mathematics. When describing the relationship between two sets A and B, the intersection of the sets is used to represent the common elements contained. In the detection task, the intersection of union (IOU) is used to describe the degree of repetition between two boxes, such as Figure 7 As shown, the upper left is the marked true bounding box B, and the lower right is the predicted bounding box A. The formula for intersection over union is shown in formula (3-1):
[0075]
[0076] Combining the formula, we can see that IOU is the ratio of the intersection and union of the predicted box A and the ground-truth labeled box B. In object detection algorithms, a threshold N is manually set. If IOU > N, the predicted box is classified as foreground, otherwise it is classified as background. Properly setting the IOU threshold helps improve detection accuracy.
[0077] (2) Bounding Box Regression
[0078] In the target detection algorithm, the bounding box regression operation is used to correct the predicted bounding box position, such as Figure 8 In the example, the outermost window G represents the actual bounding box position, and the innermost window P represents the predicted box position. In this case, due to the small IOU, the insulator is not fully predicted and may even be classified as background. In this case, the predicted box needs to be fine-tuned to make it closer to the actual box position. The adjusted box is shown as G' in the figure.
[0079] For a window, (x, y, w, h) is generally used to represent the center coordinates and width and height of the window respectively. The regression operation is generally divided into translation and scaling. The relationship between the bounding box parameters after fine-tuning the prediction box G' and the prediction box before P is:
[0080] G' x =P w d x (P)+P x (3-2)
[0081] G' y =P h d y (P)+P y (3-3)
[0082] G' w =P w exp(d w (P)) (3-4)
[0083] G' h =P h exp(d h (P)) (3-5)
[0084] Among them, P x , P y , P w , P h Represents the x, y coordinates, width and height of the center point of the candidate box respectively; G' x , G' y , G' w , G' h Represent the x, y coordinates, width and height of the center point of the final prediction box respectively. Therefore, the bounding box regression problem of the prediction box is transformed into d* (P)(* represents (x,y,w,h)) is the problem to be solved. It is the product of the feature and the weight parameter, so the least squares method or gradient descent method is used to solve it, and the weight w * The expression is:
[0085]
[0086] Among them, (t x ,t v ) represents the translation amount, (t w ,t h ) refers to the zoom amount.
[0087] t x =(G x -P x ) / P w (3-7)
[0088] t y =(G y -P y ) / P h (3-8)
[0089] t w =log(G w / P w ) (3-9)
[0090] t h =log(G h / P h ) (3-10)
[0091] contrast is the actual offset of the predicted box, and the loss function is defined as:
[0092]
[0093] The weight parameter when the actual offset is closest to the predicted offset is obtained through (3-6) to (3-11), and we get Then, we get the fine-tuned prediction frame from (3-2) to (3-5), completing the entire bounding box regression process. represents the weight parameter in the optimization process, λ represents the balance coefficient, which is used to balance the classification loss and the bounding box regression loss. In formulas (3-7) to (3-10), G represents the true value corresponding to the i-th anchor box, and N represents the number of predicted boxes. x , G y , G w , G hRepresents the x, y coordinates, width and height of the center point of the image annotation box respectively.
[0094] (3) Loss function calculation
[0095] The TST R-CNN algorithm consists of two stages of Faster R-CNN. The losses are mainly divided into RPN loss and Fast RCNN loss. Both loss types include classification loss (cls loss) and regression loss (bbox regression loss). The loss function of RPN is defined as shown in Equation (3-12), and the loss function of Fast RCNN is similar.
[0096]
[0097] Among them, P i Indicates the probability that the i-th anchor is predicted to be the true label; P * i It is 1 for positive samples and 0 for negative samples; t i Represents the bounding box regression parameters for predicting the i-th anchor; t * i N represents the bounding box regression parameters of the true target bounding box corresponding to the i-th anchor; cls Indicates the amount of small batch data; N reg Indicates the number of anchor positions.
[0098] For the classification loss of a single sample, according to the cross entropy loss function, it is defined as follows:
[0099]
[0100] Correspondingly, the regression loss is defined as:
[0101]
[0102] in, The function is defined as follows:
[0103]
[0104] For formula (3-14), t i =[t x , t y , t w , t h ]as well as The calculation method of each parameter is:
[0105] t x =(xx a ) / w a(3-16)
[0106] t v =(yy a ) / h a (3-17)
[0107] t w =log(w / w a ) (3-18)
[0108] t h =log(h / h a ) (3-19)
[0109]
[0110] Among them, (x, y, w, h), (x a ,y a , w a , h a ), (x * ,y * ,w * ,h * ) correspond to the center coordinates and width and height of the predicted box, anchor box, and actual bounding box, respectively.
[0111] Step S7 : according to the image of the insulator with defects to be detected, the insulator detection model and the defect detection model are sequentially used to obtain a defect image of the insulator.
[0112] The detection effect of TST R-CNN algorithm is as follows Figure 9 Experimental results confirm that this method significantly reduces the number of model parameters, improves the speed and accuracy of insulator defect location detection, and enhances the algorithm's deployment capabilities. Using a two-stage detection network (TST R-CNN) based on Faster R-CNN, the algorithm first crops the insulator's local location and then trains the defect detection weights, significantly reducing the interference of complex backgrounds on defect detection.
[0113] This paper proposes a two-stage detection network, TST R-CNN, based on Faster R-CNN. The backbone of the TST R-CNN model is replaced with Mobilenet-V2, and a CBAM attention mechanism is added. The insulator's local position is first cropped, and then the defect detection weights are trained. The main features of this paper include:
[0114] (1) Images of normal insulators and images of defective insulators collected by drone inspections were collected and used as datasets for the two training phases. The datasets were annotated using the Label Img tool, and an insulator dataset in the PASCAL VOC format was established. The datasets were then divided according to training requirements. During the second phase of training, the imgaug image enhancement library was used to enhance the sample dataset to address the issue of insufficient local insulator images, ensuring the reliability of the second phase training data.
[0115] (2) In order to meet the accuracy requirements, the TST R-CNN target detection model proposed in this paper greatly reduces the interference of complex background on defect detection by cropping the local image of the insulator and then training the defect detection weights, thus solving the problem of small sample data volume.
[0116] (3) The backbone network of the TST R-CNN model is replaced with the lightweight network Mobilenet-V2, and the CBAM attention mechanism is added to learn and utilize target information and aggregate features from it, thereby improving the detection accuracy and speed of insulator defects.
[0117] This paper proposes a method for detecting transmission line insulator defects that incorporates transfer learning. Using the Faster R-CNN algorithm as the baseline model, the paper proposes a two-stage target detection model, TST R-CNN (Two-Stage Transfer R-CNN), that incorporates transfer learning. This model effectively addresses the issues of complex image backgrounds and small sample data volumes. To address the insufficient number of local insulator images, the imgaug image enhancement library is used to enhance the sample dataset, alleviating the problem of insufficient training on small datasets. The addition of the CBAM attention mechanism effectively learns and utilizes information from the target area, aggregating features from it and improving the accuracy of insulator defect detection.
[0118] An embodiment of the present invention further provides a transmission line insulator defect detection system integrating transfer learning, the system comprising:
[0119] A data set construction module is used to construct a normal insulator data set and a defective insulator data set; the normal insulator data set includes normal insulator images and annotations of normal insulators; the defective insulator data set includes defective insulator images and annotations of defective insulators;
[0120] A first training module is used to train a first Faster R-CNN network using a normal insulator dataset, and migrate the insulator detection weights of the trained first Faster R-CNN network to a second Faster R-CNN network to obtain a Faster R-CNN migration network;
[0121] The second training module is used to train the Faster R-CNN migration network using the defective insulator dataset to obtain an insulator detection model;
[0122] The insulator positioning module is used to input each defective insulator image in the defective insulator dataset into the insulator detection model, locate the insulator in the insulator image, and output multiple insulator images with insulator annotation boxes;
[0123] An insulator cropping module is used to crop each insulator image along the insulator annotation frame and mark the defective part of the cropped insulator;
[0124] A third training module is used to train a third Faster R-CNN network using a defect dataset consisting of multiple cropped insulator images and annotations of defective parts to obtain a defect detection model;
[0125] The defect detection module is used to obtain a defect image of the insulator by sequentially using the insulator detection model and the defect detection model according to the image of the insulator with defects to be detected.
[0126] The system also includes an enhancement module, which is used to call the imgaug image enhancement library to enhance the number of the insulator image obtained by cropping.
[0127] The third Faster R-CNN network replaces the backbone network of the Faster R-CNN network with mobilenet-V2, and adds an attention module CBAM between the pooling layer and the fully connected layer of the Faster R-CNN network.
[0128] The losses of the first Faster R-CNN network, the second Faster R-CNN network, and the third Faster R-CNN network all include RPN loss and Fast RCNN loss, and the RPN loss and Fast RCNN loss both include classification loss and regression loss.
[0129] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0130] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims
1. A method for detecting defects in transmission line insulators by integrating transfer learning, characterized in that: The method comprises: Constructing a normal insulator dataset and a defective insulator dataset; the normal insulator dataset includes normal insulator images and annotations of the normal insulators; the defective insulator dataset includes defective insulator images and annotations of the defective insulators; The first Faster R-CNN network is trained using the normal insulator dataset, and the insulator detection weights of the trained first Faster R-CNN network are transferred to the second Faster R-CNN network to obtain a Faster R-CNN migration network. The defective insulator dataset was used to train the Faster R-CNN migration network to obtain an insulator detection model. Each defective insulator image in the defective insulator dataset is input into the insulator detection model, the insulator in the insulator image is located, and multiple insulator images with insulator annotation boxes are output; In each insulator image with an insulator annotation frame, cropping is performed along the annotation frame, and defective parts of the cropped insulator are marked; A defect dataset consisting of multiple cropped insulator images and annotations of defective parts was used to train the third Faster R-CNN network to obtain a defect detection model. According to the image of the insulator with defects to be detected, the insulator detection model and the defect detection model are used in sequence to obtain the defect image of the insulator.
2. The method according to claim 1, characterized in that The step of cropping each insulator image with an insulator labeling frame along the labeling frame further includes: Call the imgaug image enhancement library to enhance the number of insulator images obtained by cropping.
3. The method according to claim 1, characterized in that The third Faster R-CNN network replaces the backbone network of the Faster R-CNN network with mobilenet-V2, and adds an attention module CBAM between the pooling layer and the fully connected layer of the Faster R-CNN network.
4. The method according to claim 1, wherein The losses of the first Faster R-CNN network, the second Faster R-CNN network, and the third Faster R-CNN network all include RPN loss and Fast RCNN loss, and the RPN loss and Fast RCNN loss both include classification loss and regression loss.
5. A transmission line insulator defect detection system integrating transfer learning, characterized in that: The system comprises: A data set construction module is used to construct a normal insulator data set and a defective insulator data set; the normal insulator data set includes normal insulator images and annotations of normal insulators; the defective insulator data set includes defective insulator images and annotations of defective insulators; A first training module is used to train a first Faster R-CNN network using a normal insulator dataset, and migrate the insulator detection weights of the trained first Faster R-CNN network to a second Faster R-CNN network to obtain a Faster R-CNN migration network; The second training module is used to train the Faster R-CNN migration network using the defective insulator dataset to obtain an insulator detection model; The insulator positioning module is used to input each defective insulator image in the defective insulator dataset into the insulator detection model, locate the insulator in the insulator image, and output multiple insulator images with insulator annotation boxes; An insulator cropping module is used to crop each insulator image along the insulator annotation frame and mark the defective part of the cropped insulator; A third training module is used to train a third Faster R-CNN network using a defect dataset consisting of multiple cropped insulator images and annotations of defective parts to obtain a defect detection model; The defect detection module is used to obtain a defect image of the insulator by sequentially using the insulator detection model and the defect detection model according to the image of the insulator with defects to be detected.
6. The system according to claim 5, characterized in that The system further comprises: The enhancement module is used to call the imgaug image enhancement library to enhance the number of insulator images obtained by cropping.
7. The system according to claim 5, characterized in that The third Faster R-CNN network replaces the backbone network of the Faster R-CNN network with mobilenet-V2, and adds an attention module CBAM between the pooling layer and the fully connected layer of the Faster R-CNN network.
8. The system according to claim 5, wherein: The losses of the first Faster R-CNN network, the second Faster R-CNN network, and the third Faster R-CNN network all include RPN loss and Fast RCNN loss, and the RPN loss and Fast RCNN loss both include classification loss and regression loss.