A cable joint fault detection method and system based on infrared or ultraviolet images
By improving the YOLOv7 algorithm and combining infrared or ultraviolet images, the accuracy and real-time problems of cable joint fault detection are solved, efficient identification of insulation aging and partial discharge is achieved, environmental humidity interference is reduced, and detection speed and accuracy are improved. .
Patent Information
- Application Number
- CN202311713768.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-12-14
AI Technical Summary
It is difficult to accurately detect faults in underground power cable joints with existing technology, especially temperature rise and partial discharge caused by insulation aging, which makes fault location and diagnosis difficult. In addition, infrared or ultraviolet image detection is greatly affected by environmental humidity and noise interference.
Improved YOLOv7 algorithm, combined with infrared or ultraviolet images, through image enhancement based on limited contrast adaptive histogram equalization, using lightweight network MobileOne and global attention mechanism, introducing Focal-EIoU Loss loss function to improve fault identification accuracy and detection speed.
It improves the accuracy and real-time performance of cable joint fault detection, reduces the impact of environmental humidity on infrared temperature measurement, enhances image clarity and object recognition accuracy, and enables faster and more accurate fault diagnosis.
Smart Images

Figure CN117809083B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer image processing methods, and in particular to a cable joint fault detection method and system based on infrared or ultraviolet images. Background Art
[0002] Since power cables are buried underground, with the widespread use of cables, they are damaged by their own quality problems, system capacity expansion, and external forces during the long-term operation. Buried in the soil, they are eroded by moisture in the soil for a long time, resulting in defects in the weak insulation links such as cable accessories, and eventually causing insulation breakdown and failure. In the early process, local discharge will occur due to insulation aging, and long-term discharge will eventually lead to permanent failure. Underground power cables are generally laid underground. When a fault occurs, it is very difficult to locate and diagnose the fault, which will consume a lot of manpower, material resources and financial resources to find the fault point. In addition, cables are not as directly observable as overhead lines, making the fault detection and diagnosis of cables more arduous and challenging. Since the fault location and fault diagnosis of power cables are important guarantees for the safe and stable operation of power systems, the rapid and accurate location of fault points and the effective diagnosis and identification of cable faults and fault disturbances can quickly analyze the cause of the fault, discover insulation defects and hidden dangers as soon as possible, avoid further deterioration of the fault, and significantly reduce the loss of manpower, material resources and financial resources caused by the fault.
[0003] At present, my country has always adopted the method of manual regular inspection and preventive maintenance for the power maintenance of ordinary cables. However, the erosion of cable joints by moisture in cable tunnels and the damage to cable joints by mechanical stress are slow. Although the staff regularly inspect the cables in the tunnels, they still cannot predict when the cable joints will fail. The main reason for the failure of cable joints is the aging and deterioration of insulation, which leads to temperature rise and partial discharge, and even causes fire accidents in cable tunnels in severe cases. Therefore, how to predict and warn the cable status before the cable fails is an urgent problem that people in this field need to solve.
[0004] At present, the methods for detecting the status of cable joints at home and abroad include: DC component method, dielectric loss tangent value detection method, partial discharge monitoring method, etc. In practical applications, there is stray current between the cable shielding layer and the earth, which will cause great interference to the measurement of DC components, thus affecting the monitoring results; in actual operation, the capacitive current on the cable metal sheath is much larger than the resistive current, so the obtained cable insulation dielectric loss tangent value is very small, and it is often difficult for the equipment to obtain accurate measurement values in actual measurements; in practical applications, partial discharge signal monitoring is affected by factors such as sensor performance, on-site noise, electromagnetic interference, and signal attenuation, making it difficult to collect.
[0005] In order to accurately measure and analyze the defects of cable joints in daily work, domestic and foreign experts have researched and manufactured many detection instruments (including infrared thermometers, ultraviolet imagers, etc.) for defect detection of electrical equipment, which is of great significance for inspection personnel to troubleshoot equipment defects and diagnose faults during the inspection process.
[0006] At present, the fault diagnosis technology integrated with artificial intelligence algorithms has relevant learning capabilities and real-time monitoring capabilities, thus realizing online diagnosis of cable faults. The YOLO series algorithm is one of the single-stage deep learning algorithms. Its fast, efficient and accurate detection performance has attracted widespread attention and application, and can adapt to target detection tasks in complex situations such as different scales, postures, and occlusions. Summary of the invention
[0007] In view of this, it is necessary to provide a cable joint fault detection method based on infrared or ultraviolet images to monitor the fault conditions of cable joints in real time. By improving the YOLOv7 algorithm, the cable joint faults in infrared or ultraviolet images are detected, the fault identification accuracy is improved, and the disadvantage that infrared temperature measurement is easily affected by environmental humidity is solved.
[0008] The present invention provides a cable joint fault detection method based on infrared or ultraviolet images, comprising the following steps:
[0009] (1) Collect infrared or ultraviolet image data of the cable joint as a data set using an infrared or ultraviolet imager;
[0010] (2) The collected data set is enhanced based on contrast-constrained adaptive histogram equalization, the original image is annotated using the image annotation software LabelImg, and the training set and test set are randomly divided into 3:1;
[0011] (3) Input the training set into the improved YOLOv7 model for fault diagnosis training to obtain the trained model;
[0012] (4) Use the trained improved YOLOv7 model to perform effect testing and fault diagnosis on the infrared or ultraviolet images in the test sample library, and judge the severity of the fault by comparing the overlapping fault areas of the two types of images.
[0013] Furthermore, in step (2), the enhancement of the collected data set based on limited contrast adaptive histogram equalization includes:
[0014] (2.1) Block division: Divide the input image into non-overlapping sub-blocks r of equal size k , where k = 0, 1, ..., L = 1, L is the number of sub-blocks;
[0015] (2.2) Calculate the sub-block histogram h(rk );
[0016] (2.3) Clip the histogram of each sub-block using the clipping threshold: the clipping rule is
[0017]
[0018] In the formula, h'(r k ) is the clip histogram of each sub-block; N clip is the actual clipping threshold defined; N avg is the average value of pixels to be reallocated to each histogram;
[0019]
[0020] (2.4) Pixel reallocation: For each sub-block, use the excess pixels in step (2.3) to reallocate until all the cut pixels are allocated;
[0021] (2.5) performing grayscale histogram equalization on each sub-region of the image after the above steps, so that the non-uniformly distributed histogram becomes uniformly distributed;
[0022] (2.6) The bilinear interpolation method is used to reconstruct the grayscale values of the pixels. The grayscale values of the central pixels of each sub-block are used as reference points to calculate the grayscale values of each point in the final output image.
[0023] Furthermore, the improvements of the improved YOLOv7 model to the YOLOv7 model specifically include:
[0024] Use the lightweight network MobileOne as the backbone network of YOLOv7;
[0025] Add a global attention mechanism GAM to the model neck to obtain richer cross-channel information and improve the model's feature extraction capability;
[0026] The Focal-EIoU Loss loss function is introduced to increase the convergence rate of the algorithm.
[0027] Furthermore, the core module of the lightweight network MobileOne is designed based on MobileNetV1, and its structure is basically the same as MobileNetV1. The difference is that the depth separable convolution in MobileNet is replaced by a neural network structure block. The left part constitutes a complete structure block of MobileOne, which consists of two parts, the upper part is based on depth convolution, and the lower part is based on point convolution. Act. represents the activation function; the depth convolution module consists of three branches, the leftmost branch is a 1×1 convolution; the middle branch is an over-parameterized 3×3 convolution, that is, k 3×3 convolutions; the right part is a jump connection containing a BN layer; the depth convolution is essentially a grouped convolution, and the number of groups is the same as the number of channels. The 1×1 convolution and 3×3 convolution here are both depth convolutions; the point convolution module consists of two branches, the left branch is an over-parameterized 1×1 convolution, consisting of k 1×1 convolutions, and the right part is a jump connection containing a BN layer.
[0028] Furthermore, the global attention mechanism GAM is composed of a channel attention submodule and a spatial attention submodule. This mechanism optimizes the submodules based on the sequential channel-spatial attention mechanism in CBAM.
[0029] Among them, the input feature is represented by F1, a series of intermediate operations in the GAM attention mechanism is defined as the intermediate state F2, and the output state is defined as F3. The relationship between the three is as follows:
[0030]
[0031] Furthermore, the original input feature F1 of the channel attention submodule has a dimension of C×W×H. The channel attention submodule first performs a three-dimensional channel permutation on it and saves the information in the form of W×H×C. A two-layer MLP is used. The first layer performs an encoding operation to reduce the number of channels C to C / R, and the second layer performs a decoding operation to obtain a result with the same number of channels as the input feature. Finally, the weight coefficient M is obtained by processing the result with a Sigmoid activation function. c , which can effectively expand the dependence of cross-dimensional channel space.
[0032] Furthermore, the input feature F2 of the spatial attention submodule adopts double convolution, and each convolution layer uses a 7*7 convolution kernel to achieve the effect of spatial information fusion; the channel attention submodule reduces the feature according to its importance and obtains the scaled new feature; finally, the weight coefficient M for this feature is s , the activation function Sigmoid is used for processing to obtain more accurate weight values.
[0033] Furthermore, the introduction of the Focal-EIoU Loss loss function specifically includes:
[0034] The improvement of EIoU Loss compared to CIoU Loss used in the original YOLOv7 is to split the loss function into three parts: overlapping area loss, center point distance loss and aspect ratio loss, and modify a and v in CIoU Loss. w and C h The width and height of the smallest box that contains the real box and the predicted box, EIoU Loss uses and Directly calculate the true value of the bounding box width and height to solve the optimization problem caused by the aspect ratio used by CIoU Loss and the divergence problem during training. Considering the problem of unbalanced training samples in the regression of the prediction box, the number of high-quality anchor boxes with small regression errors in the input image is far less than the number of low-quality anchor boxes with large errors. Samples with poor quality will produce excessive gradients that affect parameter optimization. By integrating the EIoU loss function and the Focal loss function, the final expression of Focal-EIoU Loss is obtained, as shown in formula (5):
[0035]
[0036] L Focal-EIoU =IoU γ L EIoU (5)
[0037] Where L IoU , L dis , L asp They represent overlap area loss, center point distance loss, and aspect ratio loss respectively.
[0038] Furthermore, the fault diagnosis in step (4) includes:
[0039] By calculating the overlap between the identified cable joint area and the heating area and the light spot area, it is possible to diagnose whether the cable joint to be detected has a fault. The overlap refers to the overlap rate between the cable joint target window generated by the YOLOv7 model and the heating area target window and the light spot area target window, that is, the intersection of the two detection frame selection areas divided by their union, which is the accuracy overlap of the fault diagnosis. For fault diagnosis, when the overlap is lower than a certain value X, it can be considered that the possibility of abnormal heating and abnormal discharge of the power equipment is small, and secondary manual diagnosis is usually required at this time; when the overlap is 0, it can be basically judged that there is no abnormal area on the cable joint, and no secondary diagnosis is required at this time; when the overlap is greater than a certain value, it can be judged that there is an abnormal area in the cable joint.
[0040] A cable joint fault detection system based on infrared or ultraviolet images comprises a processor and a memory. A computer program is stored in the memory. When the computer program is executed by the processor, the cable joint fault detection method based on infrared or ultraviolet images is implemented.
[0041] Compared with the prior art, the beneficial effects of the present invention include:
[0042] Since the imaging effect of infrared or ultraviolet imagers is affected by factors such as the emissivity of the material of the photographed object, the similarity between the background and the target, and the detection distance, the quality of infrared or ultraviolet images is lower than that of visible light images, which is mainly manifested in low contrast, poor detail resolution, and low signal-to-noise ratio. Therefore, it is necessary to first perform image enhancement based on restricted contrast adaptive histogram equalization on the infrared or ultraviolet images, which effectively improves the clarity of the object contour in the image and facilitates the subsequent data set annotation and object recognition accuracy. The number of channels of the YOLOv7 backbone network is set to be large, and its model complexity is often high. In order to reduce the model complexity and make the algorithm more suitable for completing the image detection task of the cable connector, the present invention uses a lightweight network MobileOne as the backbone network of YOLOv7 to speed up the recognition speed to meet the requirements of real-time detection. In order to reduce network information reduction and amplify the global dimensional interactive features, a GAM attention mechanism is added to the neck of the model to obtain richer cross-channel information and improve the feature extraction ability of the model. In order to increase the convergence rate of the algorithm and improve the performance and detection accuracy of the original algorithm, the Focal-EIoU Loss loss function is used instead of the CIoU Loss loss function. The GAM attention mechanism and Focal-EIoU Loss loss function further increase the accuracy of target recognition, and the MobileOne backbone network improves the detection speed. The three work together to make the overall performance superior to the original algorithm, and thus a lightweight YOLOv7 network is proposed. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a cable joint fault detection method based on infrared or ultraviolet images provided by the present invention;
[0044] Figure 2 A schematic diagram of the MobileOne neural network structure block provided by the present invention;
[0045] Figure 3 Schematic diagram of the GAM attention mechanism provided by the present invention;
[0046] Figure 4 A schematic diagram of channel attention provided by the present invention;
[0047] Figure 5 A schematic diagram of spatial attention provided by the present invention;
[0048] Figure 6 This is a fault diagnosis flow chart provided by the present invention. DETAILED DESCRIPTION
[0049] The present invention is described below in conjunction with specific implementation modes.
[0050] The embodiment of the present invention provides a cable joint fault detection method based on infrared or ultraviolet images. Figure 1 Come and see, Figure 1 The present invention provides a flow chart of a cable joint fault detection method based on infrared or ultraviolet images, comprising steps (1) to (4).
[0051] (1) Collect infrared or ultraviolet image data of the cable joint through an infrared or ultraviolet imager;
[0052] (2) The collected data set is enhanced based on contrast-constrained adaptive histogram equalization, the original image is annotated using the image annotation software LabelImg, and the training set and test set are randomly divided into 3:1;
[0053] The steps of image enhancement based on limited contrast adaptive histogram equalization include:
[0054] Block division: Divide the input image into non-overlapping sub-blocks of equal size r k (k=0, 1, ..., L=1, L is the number of sub-blocks);
[0055] Calculate the sub-block histogram h(r k );
[0056] Clip the histogram of each sub-block with the clipping threshold: the clipping rule is
[0057]
[0058] In the formula, h'(r k ) is the clip histogram of each sub-block; N clip is the actual clipping threshold defined; N avg is the average value of pixels to be reallocated to each histogram;
[0059]
[0060] Pixel redistribution: For each sub-block, use the excess pixels in step (3) to redistribute until all the cut pixels are allocated;
[0061] After the above steps, the grayscale histogram of each sub-region of the image is equalized, that is, the non-uniformly distributed histogram becomes uniformly distributed;
[0062] The bilinear interpolation method is used to reconstruct the grayscale value of the pixel point, and the grayscale value of the central pixel point of each sub-block is used as the reference point to calculate the grayscale value of each point in the final output image.
[0063] Compared with general histogram equalization, adaptive histogram equalization first calculates multiple histograms, each of which corresponds to a part of the image, and then uses them to redistribute the image brightness to improve image quality. However, it often amplifies the contrast in the near-constant area of the image because the histogram in the near-constant area is highly concentrated, causing the noise to be amplified in the near-constant area. Contrast-limited adaptive histogram equalization limits the contrast amplification, thereby reducing the problem of noise amplification. Therefore, using contrast-limited adaptive histogram equalization to enhance the image can improve the clarity of the object contours in the image and facilitate data set annotation.
[0064] (3) Input the training set into the improved YOLOv7 model for fault diagnosis training to obtain the trained model;
[0065] (4) Use the trained improved YOLOv7 model to perform effect testing and fault diagnosis on the infrared or ultraviolet images in the test sample library, and judge the severity of the fault by comparing the overlapping fault areas of the two types of images.
[0066] The improvements of the YOLOv7 model in steps (3) and (4) include:
[0067] Use the lightweight network MobileOne as the backbone network of YOLOv7;
[0068] Add the GAM attention mechanism at the neck of the model to obtain richer cross-channel information and improve the model's feature extraction capability;
[0069] The Focal-EIoU Loss loss function is introduced to increase the convergence rate of the algorithm.
[0070] Combination Figure 2 From the perspective of lightweight network, MobileOne includes:
[0071] The core module of MobileOne is designed based on MobileNetV1, and its structure is basically the same as MobileNetV1. The difference is that the depth-separable convolution in MobileNet is replaced by a neural network structure block. The left part constitutes a complete structure block of MobileOne, which consists of two parts, the upper part is based on depth convolution and the lower part is based on point convolution. Act. represents the activation function. The depth convolution module consists of three branches, the leftmost branch is a 1×1 convolution; the middle branch is an over-parameterized 3×3 convolution, that is, k 3×3 convolutions; the right part is a jump connection containing a BN layer; the depth convolution is essentially a grouped convolution, and the number of groups is the same as the number of channels. The 1×1 convolution and 3×3 convolution here are both depth convolutions; the point convolution module consists of two branches, the left branch is an over-parameterized 1×1 convolution, consisting of k 1×1 convolutions, and the right part is a jump connection containing a BN layer.
[0072] Combination Figure 3 From the above, the global attention mechanism GAM includes:
[0073] The global attention mechanism (GAM) can reduce network information reduction and amplify the interactive features of the global dimension. The global attention mechanism consists of a channel attention submodule and a spatial attention submodule. This mechanism optimizes the submodules based on the sequential channel-spatial attention mechanism in CBAM;
[0074] Among them, the input feature is represented by F1, a series of intermediate operations in the GAM attention mechanism is defined as the intermediate state F2, and the output state is defined as F3. The relationship between the three is as follows:
[0075]
[0076] Combination Figure 4 From the perspective of the channel attention submodule, the channel attention submodule includes:
[0077] The original input feature F1 has a dimension of C×W×H. The channel attention submodule first performs a three-dimensional channel permutation on it and saves the information in the form of W×H×C. Using a two-layer MLP, the first layer performs an encoding operation to reduce the number of channels C to C / R, and the second layer performs a decoding operation to obtain a result with the same number of channels as the input feature. Finally, the weight coefficient M is obtained by processing the result with a Sigmoid activation function. c , which can effectively expand the dependence of cross-dimensional channel space.
[0078] Combination Figure 5 From the above, the spatial attention submodule includes:
[0079] The input feature F2 uses double convolution, and each convolution layer uses a 7*7 convolution kernel to achieve the effect of spatial information fusion. The channel attention submodule reduces the importance of the feature and obtains the scaled new feature. Finally, the weight coefficient M for this feature s , the activation function Sigmoid is used for processing to obtain more accurate weight values.
[0080] The Focal-EIoU Loss loss function includes:
[0081] The original YOLOv7 uses CIoU as the coordinate loss function. CIoU loss takes into account three geometric factors: overlapping area, center point distance, and aspect ratio. However, in the process of object recognition and detection, the bounding box is one of the important factors that determine its accuracy. The original YOLOv7 algorithm's loss function does not take this into account. Therefore, the Focal-EIoU Loss function is introduced to replace the original loss function.
[0082] The improvement of EIoU Loss compared to CIoU Loss is that the loss function is split into three parts: overlapping area loss, center point distance loss and aspect ratio loss, and a and v in CIoU Loss are modified. w and C h The width and height of the minimum box that can contain the real box and the predicted box, EIoU Loss uses and Directly calculate the true value of the width and height of the bounding box, which solves the optimization problem caused by the aspect ratio used by CIoU Loss, and can also solve the divergence problem in the training process. In addition, considering the problem of imbalanced training samples in the regression of the prediction box, that is, the number of high-quality anchor boxes with small regression errors in the input image is far less than the number of low-quality anchor boxes with large errors, poor-quality samples will produce excessive gradients that affect parameter optimization. We also borrowed the Focal Loss that solves the imbalance of positive and negative samples, and set a larger gradient optimization for places with large deviations, so as to focus on the detection of difficult samples and reduce the impact of poor-quality samples on algorithm performance. By integrating the EIoU loss function and the Focal loss function, we get the final expression of Focal-EIoU Loss, as shown in formula (5):
[0083]
[0084] L Focal-EIoU =IoU γ L EIoU (5)
[0085] Where L IoU , L dis, L asp They represent overlap area loss, center point distance loss, and aspect ratio loss respectively.
[0086] The Focal-EIoU Loss function not only includes the beneficial properties of CIoU, but also focuses on high-quality bounding boxes, which improves the model detection accuracy and accelerates model convergence.
[0087] Combination Figure 6 From the above, the fault diagnosis in step (4) includes:
[0088] First, the coordinates of the target detection frame are extracted, and the coordinate information of each row of the cable joint, heating area, and light spot area is divided into three categories and saved in the matrix; then the coordinates of the three categories of matrices are extracted to calculate the overlap, and the coordinate files are automatically classified according to the fault type and normal situation of each type of cable joint, and finally the fault diagnosis effect is obtained.
[0089] The specific situation of the data set in this embodiment is as follows:
[0090] This paper collects 2240 infrared or ultraviolet images of cable joints in a 220kV tunnel, performs batch denoising on the collected images, enhances the collected data set based on contrast-limited adaptive histogram equalization, annotates the original images using image annotation software LabelImg, and randomly divides the training set and test set into 3:1 ratios.
[0091] Training parameters and evaluation indicators:
[0092] For training parameters, the initial learning rate is set to 0.005, the momentum term is 0.9, the weight decay regularization term is 0.0005, and the batch size is set to 8.
[0093] In order to verify the actual recognition effect of the cable joint target detection framework based on the improved YOLOv7, the accuracy, recall rate and average precision indicators are used on the test set. AP (average precision) indicator. The calculation formula is as follows:
[0094]
[0095]
[0096]
[0097] Where P is the accuracy of the network's prediction of positive samples, R is the network's retrieval effect on positive samples, TP is the number of cable joints accurately identified, FP is the number of non-cable joints misidentified as cable joints, and FN is the number of cable joints misidentified as non-cable joints.
[0098] The ablation experiment rule is used to explore the weight of the improved structure in the model performance. The above experimental results are shown in Table 1.
[0099] Table 1 Ablation experiment results of improved YOLOv7 algorithm
[0100]
[0101] As can be seen from the above table, the accuracy AP of the improved YOLOv7 algorithm is 94.66%, which is 8.05% higher than that of the original YOLOv7 model. Moreover, the addition of each module has a positive effect. It can be seen that the present invention can achieve a relatively ideal detection effect.
Claims
1. A cable joint fault detection method based on infrared or ultraviolet images, characterized in that: The steps include: (1) Collect infrared or ultraviolet image data of the cable joint as a data set by using an infrared or ultraviolet imager; (2) The collected data set is enhanced based on contrast-constrained adaptive histogram equalization, the original image is annotated using the image annotation software LabelImg, and the training set and test set are randomly divided into 3:1; (3) Input the training set into the improved YOLOv7 model for fault diagnosis training to obtain the trained model; (4) Use the trained improved YOLOv7 model to perform effect testing and fault diagnosis on the infrared or ultraviolet images in the test sample library, and judge the severity of the fault by comparing the fault overlapping areas of the two types of images; The improvements of the improved YOLOv7 model to the YOLOv7 model specifically include: Use the lightweight network MobileOne as the backbone network of YOLOv7; Add a global attention mechanism GAM to the model neck to obtain richer cross-channel information and improve the model's feature extraction capability; Introduce the Focal-EIoU Loss loss function to increase the convergence rate of the algorithm; The fault diagnosis in step (4) includes: By calculating the overlap between the identified cable joint area and the heating area and the light spot area, it is possible to diagnose whether the cable joint to be detected has a fault. The overlap refers to the overlap rate between the cable joint target window generated by the YOLOv7 model and the heating area target window and the light spot area target window, that is, the intersection of the two detection frame selection areas divided by their union, which is the accuracy overlap of the fault diagnosis. For fault diagnosis, when the overlap is lower than a certain value X, it can be considered that the possibility of abnormal heating and abnormal discharge of the power equipment is small, and secondary manual diagnosis is usually required at this time; when the overlap is 0, it can be basically judged that there is no abnormal area on the cable joint, and no secondary diagnosis is required at this time; when the overlap is greater than a certain value, it can be judged that there is an abnormal area in the cable joint.
2. The cable joint fault detection method based on infrared or ultraviolet images according to claim 1 is characterized in that: In step (2), the enhancement of the collected data set based on limited contrast adaptive histogram equalization includes: (2.1) Block division: Divide the input image into non-overlapping sub-blocks r of equal size k , where k = 0, 1, ..., L = 1, L is the number of sub-blocks; (2.2) Calculate the sub-block histogram h(r k ); (2.3) Clip the histogram of each sub-block using the clipping threshold: the clipping rule is In the formula, h'(r k ) is the clip histogram of each sub-block; N clip is the actual clipping threshold defined; N avg is the average value of pixels to be reallocated to each histogram; (2.4) Pixel reallocation: For each sub-block, use the excess pixels in step (2.3) to reallocate until all the cut pixels are allocated; (2.5) performing grayscale histogram equalization on each sub-region of the image after the above steps, so that the non-uniformly distributed histogram becomes uniformly distributed; (2.6) The bilinear interpolation method is used to reconstruct the grayscale values of the pixels. The grayscale values of the central pixels of each sub-block are used as reference points to calculate the grayscale values of each point in the final output image.
3. The cable joint fault detection method based on infrared or ultraviolet images according to claim 1 is characterized in that: The core module of the lightweight network MobileOne is designed based on MobileNetV1, and its structure is basically the same as MobileNetV1. The difference is that the depth separable convolution in MobileNet is replaced by a neural network structure block. The left part constitutes a complete structure block of MobileOne, which consists of two parts, the upper part is based on depth convolution, and the lower part is based on point convolution. Act. represents the activation function; the depth convolution module consists of three branches, the leftmost branch is a 1×1 convolution; the middle branch is an over-parameterized 3×3 convolution, that is, k 3×3 convolutions; the right part is a jump connection containing a BN layer; the depth convolution is essentially a grouped convolution, and the number of groups is the same as the number of channels. The 1×1 convolution and 3×3 convolution here are both depth convolutions; the point convolution module consists of two branches, the left branch is an over-parameterized 1×1 convolution, consisting of k 1×1 convolutions, and the right part is a jump connection containing a BN layer.
4. The cable joint fault detection method based on infrared or ultraviolet images according to claim 1 is characterized in that: The global attention mechanism GAM is composed of a channel attention submodule and a spatial attention submodule. This mechanism optimizes the submodules based on the sequential channel-spatial attention mechanism in CBAM. Among them, the input feature is represented by F1, a series of intermediate operations in the GAM attention mechanism are defined as the intermediate state F2, and the output state is defined as F3. The relationship between the three is shown in the following formula:
5. The cable joint fault detection method based on infrared or ultraviolet images according to claim 4 is characterized in that: The original input feature F1 of the channel attention submodule has a dimension of C×W×H. The channel attention submodule first performs a three-dimensional channel permutation and saves the information in the form of W×H×C. A two-layer MLP is used. The first layer performs an encoding operation to reduce the number of channels C to C / R, and the second layer performs a decoding operation to obtain a result with the same number of channels as the input feature. Finally, the weight coefficient M is obtained by processing the result with a Sigmoid activation function. c , which can effectively expand the dependence of cross-dimensional channel space.
6. The cable joint fault detection method based on infrared or ultraviolet images according to claim 4 is characterized in that: The input feature F2 of the spatial attention submodule adopts double convolution, and each convolution layer uses a 7*7 convolution kernel to achieve the effect of spatial information fusion; the channel attention submodule reduces the feature according to its importance and obtains the scaled new feature; finally, the weight coefficient M for this feature s , the activation function Sigmoid is used for processing to obtain more accurate weight values.
7. The cable joint fault detection method based on infrared or ultraviolet images according to claim 1 is characterized in that: The introduction of the Focal-EIoU Loss loss function specifically includes: The improvement of EIoU Loss compared to CIoU Loss used in the original YOLOv7 is to split the loss function into three parts: overlapping area loss, center point distance loss and aspect ratio loss, and modify a and v in CIoU Loss. w and C h The width and height of the smallest box that contains the real box and the predicted box, EIoU Loss uses and Directly calculate the true value of the bounding box width and height to solve the optimization problem caused by the aspect ratio used by CIoU Loss and the divergence problem during training. Considering the problem of unbalanced training samples in the regression of the prediction box, the number of high-quality anchor boxes with small regression errors in the input image is far less than the number of low-quality anchor boxes with large errors. Samples with poor quality will produce excessive gradients that affect parameter optimization. By integrating the EIoU loss function and the Focal loss function, the final expression of Focal-EIoU Loss is obtained, as shown in formula (5): L Focal-EIoU =IoU γ L EIoU (5) Where L IoU , L dis , L asp They represent overlap area loss, center point distance loss, and aspect ratio loss respectively.
8. A cable joint fault detection system based on infrared or ultraviolet images, characterized in that: The invention comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the cable joint fault detection method based on infrared or ultraviolet image according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Power transmission line defect detection method and system and electronic equipment
CN109785289A
Automatic inspection equipment for power grid operation
CN111948501A
