A Defect Detection Method for Power Equipment Based on Infrared Image Based on Improved YOLOv5 Algorithm
By improving the YOLOv5 algorithm and combining transfer learning, data augmentation, and the Triplet attention mechanism, the problems of occlusion and insufficient feature extraction in infrared image detection of power equipment are solved, achieving efficient and accurate defect detection of power equipment, which is suitable for real-time monitoring of substations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies for infrared image defect detection of power equipment suffer from problems such as occlusion, inaccurate classification, and insufficient feature extraction, resulting in low efficiency and accuracy in defect diagnosis. Furthermore, traditional methods are not robust enough to adapt to complex field environments.
An improved YOLOv5 algorithm is adopted, and infrared images of power equipment are processed through transfer learning and data augmentation techniques. Combined with the Triplet attention mechanism and the improved loss function DIOU_NMS, a highly robust defect detection model for infrared images of power equipment is constructed. Tesseract OCR is used for temperature extraction and fault diagnosis.
It improves the accuracy and robustness of infrared image defect detection for power equipment, is applicable to complex environments, enables early detection of equipment defects, enhances the sensitivity and applicability of detection, and is suitable for real-time monitoring of equipment thermal defects in substation scenarios.
Smart Images

Figure CN116091424B_ABST
Abstract
Description
Technical Field
[0001] This invention provides a method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm, belonging to the field of power equipment defect detection technology. Background Technology
[0002] Electricity is currently the world's most important energy source, and efficient and rapid defect detection of power equipment is a crucial means of ensuring the safety of power transmission. With the increasing demands for intelligence, automation, and security in my country's power system, researching a more accurate and rapid method for automatic detection and evaluation of the condition of power equipment has become a hot topic in recent years, in order to adapt to the development trend of clean and low-carbon energy conversion and the deep integration of information technology.
[0003] Online monitoring and degradation diagnosis of external insulation devices in power systems are crucial for maintaining safe and stable operation. During power grid operation, factors such as insulation damage, contact surface oxidation and corrosion, and insufficient design current carrying capacity lead to deterioration and overheating of power supply components, resulting in abnormal temperature distribution. Infrared thermal imaging methods obtain thermal images of the temperature rise distribution of the measured object based on the difference between the response and the radiation in the field of view of the measured object, i.e., the relative change in the response radiation. Based on the abnormal distribution of the temperature rise curve, it is possible to determine whether the measured equipment has degradation defects. This method is widely used in power systems due to its advantages of safety, efficiency, and intuitiveness. Current infrared operation and maintenance strategies are typically used for on-site data acquisition and for back-end technicians to perform empirical fault diagnosis and assess the operating status of power equipment based on differences in temperature rise. With the widespread application of intelligent equipment such as helicopters, drones, and robots in line inspections, significant progress has been made in acquiring information data about power equipment. However, the lack of accurate and effective evaluation mechanisms and diagnostic models for intelligent detection and analysis of infrared image defects in power equipment hinders the development of infrared operation and maintenance.
[0004] Traditional object detection methods, depending on the specific application scenario, mainly include frame difference, temporal difference, optical flow, and background subtraction methods. However, these methods have poor robustness and are often affected by adverse external environments and changes in system scheduling. With the development of computer vision technology, the advantages of convolutional neural networks have gradually become apparent, and the introduction of computer vision into power equipment detection systems can effectively solve the aforementioned problems.
[0005] The YOLO algorithm is a type of deep learning algorithm that achieves high accuracy while detecting targets quickly, enabling rapid target category prediction and recognition, making it more suitable for real-time field applications. Real-time inspection of 10kV power distribution lines using drones can quickly and accurately pinpoint target locations and determine the presence of thermal defects in power equipment, promptly transmitting this information to maintenance center professionals. Summary of the Invention
[0006] To address the issues of low efficiency and accuracy in defect diagnosis caused by occlusion, inaccurate classification, and insufficient feature extraction in infrared images of 10kV power equipment distribution lines, this invention proposes a defect detection method for power equipment based on an improved YOLOv5 algorithm using infrared images.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: a method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm, comprising the following steps:
[0008] S1: Establish an infrared image dataset of power equipment and perform preprocessing;
[0009] S2: Establish a visible light image dataset of power equipment, and pre-train the original YOLOv5 model using the visible light image dataset. Apply the pre-trained original YOLOv5 model to the learning of infrared images of power equipment using the transfer learning method.
[0010] S3: Construct an improved YOLOv5 model. Input the preprocessed infrared image dataset of power equipment and the weight information of the original YOLOv5 model after transfer learning into the improved YOLOv5 model to identify defects in the infrared images of power equipment.
[0011] S4: Determine whether the temperature of the power equipment in the infrared image reaches the specified temperature standard. If the temperature does not reach the specified temperature standard, output the result that the equipment is normal. If the temperature reaches the specified temperature standard, output the result that the equipment has a defect.
[0012] The preprocessing in step S1 includes data augmentation and contrast enhancement. Data augmentation includes flipping, scaling, rotating, and cropping the training set, and using Gamma transformation to enhance the contrast of the image.
[0013] The steps in step S2 of pre-training the original YOLOv5 model using a visible light image dataset are as follows:
[0014] The weight parameters of the original YOLOv5 model are initialized. The visible light image dataset of power equipment is input into the network. After a series of convolution, activation, pooling and fully connected layers, the receptive field of the image is continuously increased. The first three convolutional layers of the network are transferred, and the pre-trained YOLOv5 model is extracted.
[0015] The steps in step S2, where the pre-trained original YOLOv5 model is applied to the learning of infrared images of power equipment using transfer learning, are as follows:
[0016] By saving the weights of the fully connected layers after transfer learning, a new classifier model is obtained. By saving the power equipment feature parameters learned through transfer learning, the power equipment detection of YOLOv5 through transfer learning is finally realized.
[0017] The improved YOLOv5 in step S3 is an improvement on YOLOv5s. First, a target detection model for power equipment infrared images is constructed by pre-training the model through transfer learning. In the infrared image target detection model, a Triplet attention mechanism is added after the original Focus module in the backbone. In the prediction result processing stage, a weighted NMS operation is used to select the optimal target box from the many target boxes that appear, and the anchor box is adaptively selected.
[0018] The Triplet attention mechanism consists of three parallel branches. Two branches are responsible for capturing cross-channel interactions between channel C and spatial dimensions W / H. The remaining branch is similar to the channel attention weight calculation in traditional CBAM. Finally, the outputs of the three branches are averaged and aggregated.
[0019] Step S4 specifically employs a temperature extraction and fault diagnosis method based on Tesseract OCR to determine the equipment temperature in the infrared image of the power equipment. For the input infrared image, it is first converted to grayscale and various marked areas in the image are discarded. Within the obtained area, the temperature of the brightest point is read as the actual temperature of the equipment. Based on the correspondence between image grayscale and the thermal radiation of the object, the image temperature field is directly detected using colorimetry.
[0020] The specific steps of the temperature extraction and fault diagnosis method based on TesseractOCR are as follows:
[0021] In the acquired infrared images of power equipment, the temperature range and the position of the colorimetric bars are concentrated within the target detection frame, and the corresponding digital area is extracted.
[0022] The TesseractOCR recognition plugin was used to identify the captured local image when extracting temperature values;
[0023] For each image, the processing is performed on the grayscale image, and the grayscale values at the top and bottom of the color bar are read as the extreme values of the temperature range in the image.
[0024] The results of the above steps and the temperature values identified by OCR are combined into a tuple, and then a linear function is fitted using numerical methods. Based on the fitted function, the actual temperature represented by the gray value of any pixel can be obtained.
[0025] The advantages of this invention over the prior art are as follows:
[0026] (1) Excellent image preprocessing effect. This invention performs data augmentation processing on infrared images of power equipment and uses data augmentation technology to process the training set, that is, to perform operations such as flipping, scaling, rotating, and cropping on the training set before inputting it into the model. This fully explores and utilizes the information in the dataset, avoiding problems such as overfitting due to the small number of samples in the infrared image dataset of power equipment, the model tending to memorize the training set and lose its generalization ability, resulting in poor final results. The invention also performs image contrast enhancement processing on the infrared images of power equipment, avoiding the problem that some of the collected infrared images of power equipment may be affected by external environmental factors, and that multiple devices in the infrared images overlap, resulting in unclear images that affect subsequent detection results.
[0027] (2) High sensitivity and strong applicability in defect diagnosis. Compared with existing algorithms for thermal defect diagnosis, this invention utilizes infrared information from power equipment to identify and diagnose defects, increasing effective criterion information and improving the diagnostic capability for defects with inconspicuous characteristics, enabling early detection and maintenance. This invention is applicable to the defect diagnosis of various power equipment, has strong applicability, and realizes the diagnosis of thermal defects in different types of substation equipment. It can be used for real-time monitoring of equipment thermal defects in substation scenarios.
[0028] (3) Outstanding performance advantages compared to mainstream real-time detection models. The performance of the YOLOv5 base network selected on the constructed dataset was verified. YOLOv5 outperformed other models such as SSD and YOLOv3 in terms of accuracy, recall, mAP, and prediction speed. A convolutional neural network pre-trained on a visible light power equipment dataset was applied to the learning of real power equipment infrared images using transfer learning, assisting the neural network in learning from real power equipment infrared images. Based on YOLOv5, the loss function was modified to DIOU_NMS to address issues such as occlusion, and the Triplet attention mechanism was embedded into the feature extraction network to weight and strengthen key feature information, achieving highly robust detection of defects in power equipment infrared images. The detection mAP was improved by 2.5% and 4.0% respectively, significantly improving the accuracy of equipment detection, compensating for the accuracy loss caused by parameter reduction, and only increasing the computational load slightly while still achieving good real-time performance. Attached Figure Description
[0029] The present invention will be further described below with reference to the accompanying drawings:
[0030] Figure 1 This is a flowchart of infrared defect diagnosis using the method of the present invention;
[0031] Figure 2 This is a diagram of the overall system architecture of the present invention;
[0032] Figure 3 This is a flowchart illustrating the transfer learning process of this invention.
[0033] Figure 4 This is a schematic diagram illustrating data augmentation for the present invention.
[0034] Figure 5 This is a comparison image of the present invention after contrast processing;
[0035] Figure 6 This is a schematic diagram of the structure of the improved YOLOv5 network of the present invention;
[0036] Figure 7 This is a loss curve diagram of the training process of the model in this invention. Detailed Implementation
[0037] like Figures 1 to 7 As shown, this invention provides a method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm. First, the acquired infrared images of power equipment undergo data augmentation and contrast enhancement preprocessing, and standard datasets are created by labeling power equipment such as insulators, clamps, and connectors. Second, a convolutional neural network pre-trained on a visible light power equipment dataset is applied to the learning process using real infrared images of power equipment through transfer learning. Finally, to address issues such as occlusion, the loss function is modified to DIOU_NMS, and a Triplet attention mechanism is embedded into the feature extraction network to weight and strengthen key feature information, achieving highly robust detection of defects in infrared images of power equipment.
[0038] The core steps of this invention are as follows:
[0039] Step 1: Construct a target detection model for power equipment based on infrared images using transfer learning.
[0040] Transfer learning is a method that applies existing knowledge learned in one domain to another similar target task domain. Addressing the lack of sufficient labeled data in infrared image datasets for power equipment, and considering the complex operating environment and weather conditions of power equipment in actual substations, this invention introduces a transfer learning method to assist neural networks in learning from real infrared images of power equipment.
[0041] 1.1 Establishing a visible light image dataset:
[0042] A visible light image dataset of power equipment was established using images of 10kV power distribution lines and power equipment, such as... Figure 3 The upper part shows visible light images of power equipment such as porcelain insulators, tension clamps, parallel trench clamps, cable joints, and insulation joints in power distribution lines. The training level of the YOLOv5 classifier is improved by training images with complex backgrounds and partial occlusions.
[0043] 1.2 Model Pre-training
[0044] The weight parameters of the original YOLOv5 model were initialized, and a dataset of visible light images of power equipment was input into the network. After a series of convolutional, activation, pooling, and fully connected layers, the receptive field of the image was continuously increased. Since the lower convolutional layers contain more detailed information about the power equipment images, the first three convolutional layers were transferred, and the pre-trained YOLOv5 model was then extracted.
[0045] 1.3 Implementing a YOLOv5 Infrared Image Detection Model for Power Equipment
[0046] By saving the weights of the fully connected layers after transfer learning, a new classifier model is obtained. By saving the feature parameters of the power equipment learned through transfer learning, the power equipment detection of YOLOv5 is finally realized, achieving higher recognition accuracy and detection speed. The specific flowchart is as follows. Figure 1 As shown.
[0047] Step 2: Establishing an infrared image dataset and preprocessing
[0048] 2.1 Establishing an infrared image dataset
[0049] An infrared image dataset of power equipment was established using images of 10kV power distribution lines, such as... Figure 3 The lower half shows infrared images of electrical equipment such as porcelain insulators, tension clamps, parallel groove clamps, cable joints, and insulation joints in power distribution lines.
[0050] 2.2 Data augmentation processing of infrared images of power equipment
[0051] Because the infrared image dataset of power equipment has a small number of samples, it is prone to overfitting. The model tends to memorize the training set and lose its generalization ability, resulting in poor final results. Therefore, during fine-tuning, this invention uses data augmentation technology to process the training set, that is, to perform operations such as flipping, scaling, rotating, and cropping on the training set, which is equivalent to expanding the training samples before inputting them into the model, so as to fully explore and utilize the information in the dataset. Figure 4 Demonstrating the effects of data enhancement.
[0052] The specific parameters for data augmentation are set as follows:
[0053] (b) Randomly flip left or right, with a probability of 50%;
[0054] (c) Random positive and negative rotations of less than 30°;
[0055] (d) Randomly crop less than 20% of the image area.
[0056] 2.3 Image contrast enhancement processing for infrared images of power equipment
[0057] Because some of the infrared images of power equipment are affected by external environmental factors, resulting in unclear images, and because multiple devices in the infrared images overlap, which affects the subsequent detection results to some extent, Gamma transformation is used to improve the contrast of the acquired images.
[0058] The Gamma transformation method is as follows:
[0059] S=(I+ξ) γ (1);
[0060] Where I is the input normalized grayscale image, S is the output normalized grayscale image, ζ is the compensation coefficient, and γ is a coefficient. Based on experimental comparison, this invention selects ζ = 0.1 and γ = 1.5. The enhanced infrared image is clearer, has higher contrast, and more obvious device details than the original image. The results are as follows... Figure 5 As shown.
[0061] Step 3: Network Structure Design
[0062] This invention proposes a defect detection method for power equipment based on an improved YOLOv5, wherein the network structure of the improved YOLOv5 is as follows: Figure 6 As shown, this network is an improvement on YOLOv5s. First, a target detection model for infrared images of power equipment is constructed by pre-training the model through transfer learning. In the infrared image target detection model, a Triplet attention mechanism is added after the original Focus module in the backbone. During the prediction result processing stage, a weighted NMS (non-maximum suppression) operation is used to adaptively select the optimal target box from among the numerous target boxes. To address the complex backgrounds of real power equipment images, which are often affected by environmental temperature and other factors, the detection capabilities of this network are enhanced.
[0063] 3.1 Attention Mechanism Design
[0064] The Triplet attention module aims to capture multi-dimensional interactions without diminishing the importance of dimensions, eliminating the indirect correspondence between channels and weights. This attention mechanism module primarily consists of three parallel branches. Two branches are responsible for capturing cross-channel interactions between channel C and spatial dimensions W / H, while the remaining branch performs channel attention weight calculations similar to traditional CBAM. Finally, the outputs of the three branches are averaged and aggregated. Figure 6 As shown.
[0065] 3.1.1 The first branch is the channel attention calculation branch. The input features are processed through Z-Pool, followed by a 7×7 convolution, and finally through the Sigmoid activation function to generate channel attention weights. Z-Pool performs max pooling and average pooling operations on the input features, outputting features of 2×H×W dimensions.
[0066] 3.1.2 The second branch is the channel C and spatial dimension W interactive capture branch. The input features are first transformed into H×C×W dimension features through a permutation operation, then Z pooling is performed on the H dimension, and finally transformed into C×H×W dimension features through a permutation, which facilitates element-wise addition.
[0067] 3.1.3 The third branch operation is similar.
[0068] 3.1.4 Finally, it needs to be transformed into C×H×W dimension features through another permutation to facilitate element-by-element addition. Finally, the output features of the three branches are added together to calculate a weighted average.
[0069] 3.2 Loss Function Design
[0070] In the prediction result processing stage, a weighted NMS (non-maximum suppression) operation is used to filter the numerous target boxes that appear, and the optimal target box is obtained by adaptive anchoring.
[0071] Because real-world infrared images of power equipment contain partial occlusion, and some power equipment is closely spaced, this invention uses an improved DIOU_NMS loss function instead of the slow-converging GIOU loss function. This effectively solves the problem of occlusion in the images of the power equipment to be detected. The DIOU loss calculation formula is as follows:
[0072] L DIoU =1-0.5+R DIOU (B,B gt (2);
[0073] In the formula: R DIOU (B,B gt ) are the predicted bounding box B and the target bounding box B. gt The penalty is calculated as follows:
[0074]
[0075] In the formula: b and b gt They represent B and B respectively. gt The center point, ρ represents the Euclidean distance, c is the diagonal length of the closure region (the smallest region containing the predicted box and the detection box), and d is the distance between the center points of the two boxes, specifically defined as:
[0076] d=ρ(b,b gt (4).
[0077] Step 4: Temperature Extraction and Fault Diagnosis Methods
[0078] 4.1 Temperature Extraction and Fault Diagnosis Method Based on Tesseract OCR
[0079] For the input infrared image, it is first converted to grayscale and various marker areas in the image are discarded.
[0080] Within the determined area, the temperature of the brightest point is taken as the actual temperature of the device. Based on the principle that there is a correspondence between image grayscale and the thermal radiation of an object, the temperature field of the image can be directly detected using colorimetry.
[0081] 4.1.1 In the infrared image (320×240) obtained by the present invention, the temperature range and the position of the colorimetric bar are fixed and concentrated within the target detection frame, and the corresponding digital area is cropped.
[0082] 4.1.2 The Tesseract OCR recognition plugin is used to recognize the captured local image when extracting temperature values.
[0083] 4.1.3 For each image, the processing is performed on the grayscale image, and the grayscale values at the top and bottom of the colorimeter bar are read as the extreme values of the temperature range in the image.
[0084] 4.1.5 Combine the results of the above steps with the temperature values identified by OCR into a tuple, and then perform a linear function fitting using numerical methods. The actual temperature represented by the grayscale value of any pixel can be determined based on the fitted function.
[0085] The relationship between pseudocolor and heat satisfies the conversion formula:
[0086] I = (X - 128)R / 256 + L(5);
[0087] In the formula: I represents the device heat, X represents the image brightness, R represents the range of the thermal imager, and L represents the thermal surface area of the thermal imager. Therefore, with R and L fixed, X and I have a linear relationship. Since pseudo-color and grayscale also have a linear relationship, grayscale and I also have a linear relationship, i.e.:
[0088] I0=I / (τγ) (6);
[0089] {t}℃=B / I g [(A / I0+1) / C]-273.15 (7);
[0090] In the formula: I0 is the actual calorific value, τ is the transmittance, γ is the physical emissivity (generally taken as 0.9), t is the temperature, and A, B, and C are the calibration curve constants of the thermal imager. For shortwave systems, C = 1. Based on the grayscale-temperature fitting function, this invention takes the point with the maximum grayscale value in the image after removing the text as the hot spot and calculates the corresponding temperature as the device's heating temperature.
[0091] 4.2 Diagnosis of thermal defects in power equipment
[0092] According to DL / T664—2016 "Specification for Infrared Diagnosis of Live Equipment", defect diagnosis is performed on different types of identified power equipment, mainly using surface temperature judgment, similar comparison judgment, and relative temperature difference judgment for thermal defect alarm. Defect temperatures for some equipment are shown in Tables 1 and 2.
[0093]
[0094] Table 1. Defect Surface Temperature Judgment Table;
[0095] Equipment Category Hotspot temperature (alarm threshold) porcelain bottle >80 Tension clamp >80 Parallel groove clamp >80 Cable connector >80 Insulating joint >80
[0096] Table 2. Relative Temperature Difference Judgment Table for Equipment Faults.
[0097] 4.3 Analysis of Model Detection Results
[0098] The loss curve during model training is as follows: Figure 7 As shown, the horizontal axis represents the number of training epochs of the model, and the vertical axis represents the corresponding loss value. At the beginning of training, the loss value is about 0.9. As the number of training epochs increases, the loss value gradually decreases. After 8000 training epochs, the loss value stabilizes at about 0.1, achieving a good training effect.
[0099] This invention can accurately identify and locate devices with complex backgrounds, extremely similar appearances, occlusions, and those difficult to detect by the human eye. A series of experiments were conducted using an improved YOLOv5 model, and the algorithm's performance was verified through test images. The main test metrics included precision, recall, mean average precision (mAP), and FPS.
[0100] This invention utilizes the YOLOv5 algorithm for detection and introduces a transfer learning strategy to extract features from infrared degradation images of power equipment. Based on this, a defect diagnosis model for power equipment infrared images is established. This method can quickly locate and robustly identify abnormal hot spots in the infrared images of power equipment, significantly improving the intelligence level of power grid equipment inspection while reducing manpower and material consumption in power system equipment operation and maintenance.
[0101] Regarding the specific structure of this invention, it should be noted that the connection relationships between the various component modules used in this invention are definite and achievable. Except as specifically described in the embodiments, their specific connection relationships can bring about corresponding technical effects and solve the technical problems proposed by this invention without relying on the execution of corresponding software programs. The models of the components, modules, and specific components appearing in this invention, the connection methods between them, and the conventional usage methods and expected technical effects brought about by the above technical features, unless specifically described, are all publicly disclosed content in patents, journal articles, technical manuals, technical dictionaries, and textbooks that can be obtained by those skilled in the art before the application date, or belong to conventional technology, common knowledge, and other existing technologies in this field. There is no need to elaborate, which makes the technical solution provided in this case clear, complete, and achievable, and can reproduce or obtain corresponding physical products based on this technical means.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm, characterized in that: Includes the following steps: S1: Establish an infrared image dataset of power equipment and perform preprocessing; S2: Establish a visible light image dataset of power equipment, and pre-train the original YOLOv5 model using the visible light image dataset. Apply the pre-trained original YOLOv5 model to the learning of infrared images of power equipment using the transfer learning method. The steps in step S2 of pre-training the original YOLOv5 model using a visible light image dataset are as follows: The weight parameters of the original YOLOv5 model are initialized. The visible light image dataset of power equipment is input into the network. After a series of convolution, activation, pooling and fully connected layers, the receptive field of the image is continuously increased. The first three convolutional layers of the network are transferred, and the pre-trained YOLOv5 model is extracted. The steps in step S2, where the pre-trained original YOLOv5 model is applied to the learning of infrared images of power equipment using transfer learning, are as follows: By saving the weights of the fully connected layers after transfer learning, a new classifier model is obtained. By saving the power equipment feature parameters learned through transfer learning, the power equipment detection of YOLOv5 through transfer learning is finally realized. S3: Construct an improved YOLOv5 model. Input the preprocessed infrared image dataset of power equipment and the weight information of the original YOLOv5 model after transfer learning into the improved YOLOv5 model to identify defects in the infrared images of power equipment. The improved YOLOv5 in step S3 is an improvement on YOLOv5s. First, a target detection model for power equipment infrared images is constructed by pre-training the model through transfer learning. In the infrared image target detection model, a Triplet attention mechanism is added after the original Focus module in the backbone. In the prediction result processing stage, a weighted NMS operation is used to filter the numerous target boxes that appear, and the optimal target box is obtained by adaptive anchor box. The Triplet attention mechanism consists of three parallel branches. Two branches are responsible for capturing cross-channel interactions between channel C and spatial dimensions W / H. The remaining branch uses the same calculation method as CBAM to calculate channel attention weights. Finally, the outputs of the three branches are averaged and aggregated. S4: Determine whether the temperature of the power equipment in the infrared image reaches the specified temperature standard. If the temperature does not reach the specified temperature standard, output the result that the equipment is normal. If the temperature reaches the specified temperature standard, output the result that the equipment has a defect.
2. The method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm according to claim 1, characterized in that: The preprocessing in step S1 includes data augmentation and contrast enhancement. Data augmentation includes flipping, scaling, rotating, and cropping the training set, and using Gamma transformation to enhance the contrast of the image.
3. The method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm according to claim 1, characterized in that: Step S4 specifically employs a temperature extraction and fault diagnosis method based on Tesseract OCR to determine the equipment temperature in the infrared image of the power equipment. For the input infrared image, it is first converted to grayscale and various marked areas in the image are discarded. Within the obtained area, the temperature of the brightest point is read as the actual temperature of the equipment. Based on the correspondence between image grayscale and the thermal radiation of the object, the image temperature field is directly detected using colorimetry.
4. The method for detecting defects in infrared images of power equipment based on an improved YOLOv5 algorithm according to claim 3, characterized in that: The specific steps of the temperature extraction and fault diagnosis method based on TesseractOCR are as follows: In the acquired infrared images of power equipment, the temperature range and the position of the colorimetric bars are concentrated within the target detection frame, and the corresponding digital area is extracted. The TesseractOCR recognition plugin was used to identify the captured local image when extracting temperature values; For each image, the processing is performed on the grayscale image, and the grayscale values at the top and bottom of the color bar are read as the extreme values of the temperature range in the image. The extreme values of the temperature range in each of the above images are combined with the temperature values recognized by OCR into a tuple. Then, a linear function is fitted using numerical methods. Based on the fitted function, the actual temperature represented by the gray value of any pixel can be obtained.
Citation Information
Patent Citations
Cable equipment temperature abnormity location and recognition method
CN108846418A
Earth surface target ground object detection method based on remote sensing image
CN115457396A