A method, device and equipment for identifying lightning discharge defects of a glass insulator
By constructing an improved YOLOv4 and RCNN detection model with adaptive feature fusion, and combining it with UAV inspection images, efficient identification and localization of lightning discharge defects in glass insulators were achieved, solving the problem of low inspection efficiency in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD
- Filing Date
- 2023-03-29
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies for inspecting glass insulators on transmission lines are inefficient, time-consuming, and labor-intensive, resulting in low detection efficiency and an inability to effectively identify lightning discharge defects.
An improved YOLOv4 detection model and RCNN detection model based on adaptive feature fusion were constructed, and combined with UAV inspection images and flight path information, to achieve automatic identification of lightning discharge defects in glass insulators.
It improves the efficiency of identifying lightning discharge defects in glass insulators, reduces workload, and achieves efficient defect identification and location.
Smart Images

Figure CN116338392B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of insulator technology, and in particular to a method, apparatus and equipment for identifying lightning discharge defects in glass insulators. Background Technology
[0002] Insulators play a crucial role in the electrical insulation and mechanical support of transmission lines. High-quality insulators are essential for the safe and stable operation of transmission lines. Glass insulators, compared to other types of insulators, offer advantages such as high mechanical strength, easy testing, zero-value spontaneous breakage, and low maintenance costs, making them widely used in transmission lines. However, due to varying operating conditions, glass insulators are susceptible to varying degrees of lightning strikes, leading to a shortened lifespan and increased risk of spontaneous breakage. When the number of spontaneously broken insulators falls short of the requirements of the "Operating Regulations for Overhead Transmission Lines," it can cause transmission line tripping accidents, seriously threatening the safe and stable operation of the power grid and equipment. Therefore, taking effective preventative measures is crucial to avoiding transmission line tripping accidents caused by insulator spontaneous breakage.
[0003] The current method of manually testing insulators on power transmission lines is very inefficient. Moreover, there are tens of thousands of poles and towers in the power grid, and the annual inspection task is very heavy. Using manual on-site testing is time-consuming and labor-intensive. Summary of the Invention
[0004] This application provides a method, apparatus, and equipment for identifying lightning discharge defects in glass insulators, which solves the technical problem that the existing manual inspection of insulators on transmission lines is inefficient and time-consuming.
[0005] To achieve the above objectives, the embodiments of this application provide the following technical solutions:
[0006] A method for identifying lightning discharge defects in glass insulators includes the following steps:
[0007] An RCNN detection model and a YOLOv4 detection model are constructed. The YOLOv4 detection model is built based on an improved YOLOv4 network using adaptive feature fusion.
[0008] The inspection images and inspection route information of glass insulators on the transmission line are acquired, and the inspection images are detected using the YOLOv4 detection model to obtain the detection and recognition results.
[0009] If the detection and identification result indicates that the glass insulator has a lightning flashover defect, the location and type of the lightning flashover defect are obtained by detecting the inspection image based on the inspection route information and the RCNN detection model.
[0010] Preferably, constructing the YOLOv4 detection model includes:
[0011] Acquire first defect image data with lightning flashover defects, the first defect image data including N first defect images;
[0012] The first defect image data is trained by combining adaptive feature fusion and the PAN structure of the YOLOv4 network to obtain the YOLOv4 detection model.
[0013] Preferably, the process of training the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network includes:
[0014] The first defect image data is processed using the PAN structure of the YOLOv4 network to obtain feature maps of at least three different scales.
[0015] Adaptive feature fusion is used to perform identical scaling on each feature map to obtain feature scaled maps of the same scale, and the weights of the corresponding scales of the feature scaled maps are calculated.
[0016] An adaptive feature fusion method is used to calculate the weights corresponding to all the feature scaling maps to obtain the spatial weights of the feature mapping fusion at each scale.
[0017] Preferably, the YOLOv4 detection model uses a weight calculation formula to calculate the weights of the feature scaling map at the corresponding scale. The weight calculation formula is as follows:
[0018]
[0019]
[0020]
[0021] In the formula, α, β, and γ are the numerical values of the weights, l is the scale, i and j are the horizontal and vertical coordinates of the spatial location of the feature map, and λ is the control coefficient for the convolution kernel calculation in the YOLOv4 network.
[0022] Preferably, the YOLOv4 detection model uses a fusion calculation formula to calculate the weights of all the feature scaling maps to obtain the spatial weights of the feature mapping fusion at each scale; the fusion calculation formula is:
[0023]
[0024]
[0025]
[0026] In the formula, α, β, and γ are the numerical values of the weights, l is the scale, and i and j are the spatial coordinates of the feature map. Let be the vector of the scaled image of the a-th feature at spatial location (i, j).
[0027] Preferably, the process of training the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network includes: using a decoupling head to splice and reconstruct the data output from the convolutional layer of the YOLOv4 network to obtain the size of the feature map.
[0028] Preferably, constructing the RCNN detection model includes:
[0029] Acquire second defect image data labeled with defect category and location information, the second defect image data including N second defect images;
[0030] The second defect image data is trained using an RPN network with three cascaded detection heads to obtain an RCNN detection model that can identify the location and type of defects.
[0031] This application also provides a device for identifying lightning discharge defects in glass insulators, including: a model building module, a defect identification module, and a location type identification module;
[0032] The model building module is used to build an RCNN detection model and a YOLOv4 detection model. The YOLOv4 detection model is built based on an adaptive feature fusion improved YOLOv4 network.
[0033] The defect identification module is used to acquire inspection images and inspection route information of glass insulators on the transmission line, and to use the YOLOv4 detection model to detect the inspection images to obtain the detection and identification results.
[0034] The location type identification module is used to detect the location and type of lightning flashover defect in the glass insulator based on the detection and identification results, the inspection route information, and the RCNN detection model.
[0035] Preferably, the model building module includes a first model building module and a second model building module;
[0036] The first model building module is used to acquire first defect image data with lightning flashover defects, and to train the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network to obtain a YOLOv4 detection model.
[0037] The model building module is used to acquire second defect image data labeled with defect category and location information, and to train the second defect image data using an RPN network with three cascaded detection heads to obtain an RCNN detection model that can identify defect location and category.
[0038] The first model construction module is further configured to process the first defect image data using the PAN structure of the YOLOv4 network to obtain feature maps of at least three different scales; perform isostatic scaling on each feature map using adaptive feature fusion to obtain feature scaled maps of the same scale, and calculate the weights of the feature scaled maps according to the corresponding scales using a weight calculation formula; and perform fusion calculation on the weights corresponding to all the feature scaled maps using an adaptive feature fusion formula to obtain the spatial weights of the feature maps fused at each scale.
[0039] The weight calculation formula is as follows:
[0040]
[0041]
[0042]
[0043] The fusion calculation formula is as follows:
[0044]
[0045]
[0046]
[0047] In the formula, α, β, and γ represent the numerical values of the weights, l represents the scale, i and j represent the spatial coordinates of the feature map, and λ represents the control coefficients for kernel calculation in the YOLOv4 network. Let be the vector of the scaled image of the a-th feature at spatial location (i, j).
[0048] This application also provides a terminal device, including a processor and a memory;
[0049] The memory is used to store program code and transmit the program code to the processor;
[0050] The processor is used to execute the above-described method for identifying lightning discharge defects in glass insulators according to the instructions in the program code.
[0051] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The method, apparatus, and equipment for identifying lightning discharge defects in glass insulators include constructing an RCNN detection model and a YOLOv4 detection model; acquiring inspection images and inspection route information of glass insulators on transmission lines; using the YOLOv4 detection model to detect the inspection images and obtain the detection and identification results; if the detection and identification results indicate that the glass insulator has a lightning flashover defect, the location and type of the lightning flashover defect are obtained by using the inspection route information and the RCNN detection model to detect the inspection images. The RCNN detection model and YOLOv4 detection model constructed in this method cooperate to identify lightning flashover defects, defect types, and defect locations in glass insulators, improving the efficiency of lightning discharge defect identification for glass insulators on transmission lines and reducing workload. It solves the technical problem that the existing manual inspection of insulators on transmission lines during operation results in low detection efficiency and is time-consuming and labor-intensive. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a flowchart illustrating the steps of the method for identifying lightning discharge defects in glass insulators according to an embodiment of this application.
[0054] Figure 2 This is a flowchart illustrating the framework of the YOLOv4 detection model in the glass insulator lightning discharge defect identification method described in this application embodiment;
[0055] Figure 3 This is a framework diagram of the YOLOv4 network of the YOLOv4 detection model in the glass insulator lightning discharge defect identification method described in the embodiments of this application;
[0056] Figure 4 This is a frame diagram of a glass insulator lightning discharge defect identification device according to an embodiment of this application. Detailed Implementation
[0057] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] This application provides a method, apparatus, and equipment for identifying lightning discharge defects in glass insulators, which solves the technical problem that the current manual inspection of insulators on transmission lines is inefficient and time-consuming. This method, apparatus, and equipment are used for detecting lightning flashover front-ends of glass insulators.
[0059] Example 1:
[0060] Figure 1 This is a flowchart illustrating the steps of the method for identifying lightning discharge defects in glass insulators according to an embodiment of this application.
[0061] like Figure 1 As shown in the figure, this application provides a method for identifying lightning discharge defects in glass insulators, including the following steps:
[0062] S1. Construct the RCNN detection model and the YOLOv4 detection model. The YOLOv4 detection model is constructed based on the adaptive feature fusion improvement of the YOLOv4 network.
[0063] It should be noted that the purpose of step S1 is to construct a model for identifying lightning discharge defects in glass insulators. In this embodiment, the YOLOv4 detection model can be set on the edge computing box of the transmission line inspection, and the RCNN detection model can be set on the cloud-based high-performance computing cluster of the transmission line inspection. The cloud-based high-performance computing cluster has large memory and strong computing power, which can meet the requirements of real-time detection. The edge computing box set on the transmission line for inspection has smaller memory and relatively weaker floating-point computing power, requiring real-time adjustment of the pan-tilt unit based on the detection results. The detection model needs to have real-time detection capabilities; therefore, a small-sized detection model with real-time performance needs to be deployed. Thus, the YOLOv4 detection model for the glass insulator lightning discharge defect identification method is deployed on the edge computing box.
[0064] S2. Obtain inspection images and inspection route information of glass insulators on the transmission line, and use the YOLOv4 detection model to detect the inspection images to obtain the detection and recognition results.
[0065] It should be noted that in step S2, firstly, the inspection images of the glass insulators for which lightning discharge defects need to be identified are obtained, as well as the flight path information of the inspection images; secondly, the YOLOv4 detection model is used to detect the inspection images to obtain the detection and identification results.
[0066] In this embodiment of the application, a drone can be used to inspect the power transmission line according to the inspection flight, and the camera equipment of the drone can be used to collect inspection images.
[0067] It should be noted that the UAV receives waypoint coordinates from the camera images in real time as the inspection route information. The camera equipment can be a camera. This method for identifying lightning discharge defects in glass insulators can transmit the acquired inspection images to the RCNN detection model in the cloud via the wireless communication module of the camera equipment.
[0068] S3. If the detection and identification result indicates that the glass insulator has a lightning flashover defect, the location and type of the lightning flashover defect are obtained by detecting the inspection image based on the inspection route information and using the RCNN detection model.
[0069] It should be noted that in step S3, if the glass insulator is found to have a lightning flashover defect based on the detection and identification results of step S2, the RCNN detection model is further used to identify the type and location of the lightning flashover defect in the inspection image. This method for identifying lightning discharge defects in glass insulators achieves the identification and location determination of lightning flashover defects in glass insulators through the cooperation of the RCNN detection model and the YOLOv4 detection model.
[0070] In this embodiment of the application, the method for identifying lightning discharge defects in glass insulators also associates the detected and identified defective images with the coordinate positions on the inspection route information to generate a visual report, so that power practitioners can analyze and process the transmission line.
[0071] This application provides a method for identifying lightning discharge defects in glass insulators. The method includes constructing an RCNN detection model and a YOLOv4 detection model; acquiring inspection images and inspection route information of glass insulators on transmission lines; using the YOLOv4 detection model to detect the inspection images and obtain the detection and identification results; if the detection and identification results indicate that the glass insulator has a lightning flashover defect, the location and type of the lightning flashover defect are obtained by using the RCNN detection model to detect the inspection images based on the inspection route information. This method utilizes the RCNN and YOLOv4 detection models to collaboratively identify lightning flashover defects, defect types, and defect locations in glass insulators, improving the efficiency of lightning discharge defect identification for glass insulators on transmission lines and reducing workload. It solves the technical problem that existing manual inspections of insulators on transmission lines are inefficient and time-consuming.
[0072] In one embodiment of this application, constructing a YOLOv4 detection model includes:
[0073] Acquire first defect image data with lightning flashover defects, the first defect image data includes N first defect images;
[0074] The first defect image data was trained by combining adaptive feature fusion and the PAN structure of the YOLOv4 network to obtain the YOLOv4 detection model.
[0075] The training process for the first defect image data, which combines adaptive feature fusion with the PAN structure of the YOLOv4 network, includes:
[0076] The first defect image data is processed using the PAN structure of the YOLOv4 network to obtain feature maps of at least three different scales.
[0077] Adaptive feature fusion is used to perform identical scaling on each feature map to obtain feature scaled maps of the same scale, and the weights of the corresponding scales of the feature scaled maps are calculated.
[0078] Adaptive feature fusion is used to calculate the weights corresponding to all feature scaling maps to obtain the spatial weights of feature mapping fusion at each scale.
[0079] The YOLOv4 detection model uses a weighting formula to calculate the weights corresponding to the scale of the feature map. The weighting formula is as follows:
[0080]
[0081]
[0082]
[0083] In the formula, α, β, and γ are the values of the weights, l is the scale, i and j are the values of the horizontal and vertical coordinates of the spatial location of the feature map, and λ is the control coefficient for the convolution kernel calculation in the YOLOv4 network.
[0084] The YOLOv4 detection model uses a fusion calculation formula to calculate the weights of all feature scale maps, obtaining the spatial weights for feature map fusion at each scale; the fusion calculation formula is:
[0085]
[0086]
[0087]
[0088] In the formula, α, β, and γ are the numerical values of the weights, l is the scale, and i and j are the spatial coordinates of the feature map. Let be the vector of the scaled image of the a-th feature at spatial location (i, j).
[0089] It should be noted that, in the process of constructing the YOLOv4 detection model, this method for identifying lightning discharge defects in glass insulators uses the PAN structure of the YOLOv4 network to process the first defect image data, which generates feature maps of three different scales, where a∈[1,2,3]. These feature maps are denoted as X. 1 X 2 and X 3 If the feature map at scale a is scaled identically, a scaled feature map X of the same scale l is obtained. 1→l X 2→l X 3→l This method achieves feature maps of different scales by scaling them to the same shape and size. Then, adaptive feature fusion is used to calculate the weights of all scaled feature maps, resulting in spatial weights for feature mapping fusion at each scale. This glass insulator lightning discharge defect identification method avoids the problem of low detection accuracy caused by feature interference between different layers of the YOLOv4 network by constructing a YOLOv4 detection model based on adaptive feature fusion and a PAN structure of the YOLOv4 network.
[0090] Figure 2 This is a flowchart illustrating the framework of the YOLOv4 detection model in the method for identifying lightning discharge defects in glass insulators as described in this application.
[0091] like Figure 2As shown in the embodiments of this application, an adaptive feature fusion (ASFF) model is incorporated into the YOLOv4 detection model. ASFF fuses the feature maps of three different scales in the PAN structure of the YOLOv4 network into three feature maps of the corresponding scales, and then learns a fusion weight to understand the contribution of different feature scales to the predicted feature map, rather than the simple multi-level feature fusion method used in existing YOLOv4 models. The adaptive learning of the spatial weights for feature map fusion at each scale by the ASFF of the PAN structure of the YOLOv4 network effectively improves the detection accuracy of objects at different scales, making it more suitable for locating defect targets of various scales from inspection images.
[0092] Figure 3 This is a framework diagram of the YOLOv4 network of the YOLOv4 detection model in the glass insulator lightning discharge defect identification method described in the embodiments of this application.
[0093] In one embodiment of this application, the process of training and processing the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network includes: using a decoupling head to splice and reconstruct the data output by the convolutional layer of the YOLOv4 network to obtain the size of the feature map.
[0094] It should be noted that, as Figure 3As shown, this method for identifying lightning discharge defects in glass insulators, by employing a decoupled YOLOv4 detection model, can significantly improve detection capabilities, accelerate network convergence, and increase the speed of locating power components of various sizes during inspections. In this embodiment, if the feature size of the input first defect image data is (13, 13, 512), the convolutional layer in the YOLOv4 detection model outputs Cls_out for the category prediction of the first defect image data, Obj_out for the foreground or background judgment of the first defect image data, and Reg_out for the coordinate information of the first defect image data, the three outputs of the convolutional layer in the YOLOv4 detection model are now concatenated and fused to obtain feature information of (13, 13, 7) dimensional data; then, the concatenated feature information is reconstructed to obtain the size data of the feature map. In this context, "concatenation" refers to maintaining the alignment of the first two dimensions of the convolutional layer outputs in the YOLOv4 detection model while stacking the data in the third dimension to obtain concatenated feature information across three dimensions. "Reconstruction" involves flattening the concatenated feature information (13, 13, 7), corresponding to (length, width, number of channels) respectively, from a 2D matrix (13, 13) to a 1D vector (13*13 = 169), while keeping the number of channels unchanged. The resulting feature map has dimensions of (169, 7). This feature map size can be used for subsequent loss function calculations and network parameter updates in the YOLOv4 detection model.
[0095] In one embodiment of this application, constructing the RCNN detection model includes:
[0096] Acquire second defect image data labeled with defect category and location information. The second defect image data includes N second defect images.
[0097] The second defect image data was trained using an RPN network with three cascaded detection heads to obtain an RCNN detection model that can identify the location and type of defects.
[0098] It should be noted that the RCNN detection model uses an RPN network for the first stage of coarse detection, which aims to detect as many defect locations as possible in the second defect image data, thereby improving the recall rate of the RCNN detection model. Then, the RPN network with three cascaded detection heads is used in the second stage to gradually refine the detection results, filter out false alarms from the first stage, and improve the accuracy of the RCNN detection model. This enables the RCNN detection model to efficiently identify and locate defects caused by lightning discharge in glass insulators.
[0099] In the embodiments of this application, step 1, in constructing the RCNN detection model and the YOLOv4 detection model in the method for identifying lightning discharge defects in glass insulators, can be achieved through three steps: constructing the dataset, model training, and model testing.
[0100] Dataset Construction: Image data from multiple scenarios was collected through drone inspections of power transmission lines. A large number of images with abnormal brightness, high noise, and blurriness were manually sorted and cleaned to form the dataset. High-quality image training data is beneficial for improving the robustness of the model. Annotation tools were used to label power components and defect targets in the images. The annotation information included category name and location information Xmin (X-coordinate of the top-left corner of the annotation box), Ymin (Y-coordinate of the top-left corner of the annotation box), Xmax (X-coordinate of the bottom-right corner of the annotation box), and Ymax (Y-coordinate of the bottom-right corner of the annotation box), and saved as XML tag files in VOC data format. The image data and corresponding annotation files in the dataset were divided into training and test sets in a 4:1 ratio to complete the dataset construction.
[0101] Model Training: The model was trained using the training set in the dataset. An adaptive moment estimation optimizer was employed as the network's training optimization strategy, and the training run consisted of 100 epochs. The learning rate was dynamically adjusted starting from 0.001, and multiplied by 0.9 after each epoch update. The changes in the loss value (LOSS) of the YOLOv4 and RPN networks were observed during training. When the LOSS value did not decrease for five consecutive epochs, the model was considered to have converged, training was stopped, and the model with the best convergence performance (lowest final loss value) was obtained.
[0102] Model Testing: The trained model is tested using the test set in the dataset. Precision, recall, mAP (mean Average Precision), and FPS (Frames Per Second) are used as performance metrics for model testing. The formulas for precision and recall are as follows:
[0103]
[0104]
[0105] In the formula, x TP,A x represents the number of correctly identified targets in class A. FP,A x represents the number of targets in class A that were incorrectly identified as positive examples. FN,A P represents the number of incorrectly identified positive examples in class A; A R represents the percentage of correctly identified targets out of all targets identified as category A. AThis represents the percentage of correctly identified targets in an image that belong to category A. Confidence is the probability that a target belongs to category A. To calculate the AP, sort the detected targets in each category in the test set according to their confidence from highest to lowest, and plot the precision-recall curve for that category. The area under the precision-recall curve is taken as the AP for that category. Then, the average AP for all categories is calculated to obtain mAP, which reflects the model's average detection precision for each category. FPS refers to the model's processing speed per second, reflecting the target detection speed. FLOPs refers to the model's computational cost, used to measure the model's complexity. In R... A P A The values are above 85%, the mAP value is greater than 0.8, the FPS value of the YOLOv4 detection model is greater than 10, and the FPS value of the RCNN detection model is greater than 1.5, which means that the RCNN detection model and the YOLOv4 detection model are the optimal models.
[0106] In this embodiment, the method for identifying lightning discharge defects in glass insulators uses an optimal RCNN detection model and a YOLOv4 detection model to identify lightning discharge defects in images of inspected glass insulators, achieving good defect identification results and high efficiency. Furthermore, the YOLOv4 detection model with adaptive feature fusion (ASFF) effectively improves the detection accuracy of objects at different scales, making it more suitable for locating power components of various scales from inspection images.
[0107] Example 2:
[0108] Figure 4 This is a flowchart illustrating the framework of the glass insulator lightning discharge defect identification device described in this application embodiment.
[0109] like Figure 4 As shown, this application provides a device for identifying lightning discharge defects in glass insulators, including: a model building module 10, a defect identification module 20, and a location type identification module 30;
[0110] The model building module 10 is used to build an RCNN detection model and a YOLOv4 detection model. The YOLOv4 detection model is built based on an adaptive feature fusion improved YOLOv4 network.
[0111] The defect identification module 20 is used to acquire inspection images and inspection route information of glass insulators on the transmission line, and uses the YOLOv4 detection model to detect the inspection images to obtain the detection and identification results.
[0112] The location type identification module 30 is used to identify the lightning flashover defect in the glass insulator based on the detection and identification results. It uses the inspection route information and the RCNN detection model to detect the inspection image and obtain the location and type of the lightning flashover defect.
[0113] In this embodiment of the application, the model building module 10 includes a first model building module and a second model building module;
[0114] The first model building module is used to acquire first defect image data with lightning flashover defects, and to train the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network to obtain the YOLOv4 detection model.
[0115] The model building module is used to acquire second defect image data labeled with defect category and location information. The second defect image data is trained using an RPN network with three cascaded detection heads to obtain an RCNN detection model that can identify defect location and category.
[0116] The first model construction module is also used to process the first defect image data through the PAN structure of the YOLOv4 network to obtain feature maps of at least three different scales; to perform isostatic scaling on each feature map using adaptive feature fusion to obtain feature scaled maps of the same scale, and to calculate the weights of the feature scaled maps according to the weight calculation formula; and to perform fusion calculation on the weights corresponding to all feature scaled maps using the fusion calculation formula through adaptive feature fusion to obtain the spatial weights of the feature maps fused at each scale.
[0117] The formula for calculating the weight is:
[0118]
[0119]
[0120]
[0121] The fusion calculation formula is as follows:
[0122]
[0123]
[0124]
[0125] In the formula, α, β, and γ represent the numerical values of the weights, l represents the scale, i and j represent the spatial coordinates of the feature map, and λ represents the control coefficients for kernel calculation in the YOLOv4 network. Let be the vector of the scaled image of the a-th feature at spatial location (i, j).
[0126] It should be noted that the modules in the device of Embodiment 2 correspond to the steps in the method of Embodiment 1. The content of the method for identifying lightning discharge defects in glass insulators has been described in detail in Embodiment 1, and the content of the modules in the device will not be described in detail in this Embodiment 2.
[0127] Example 3:
[0128] This application provides a terminal device, including a processor and a memory;
[0129] Memory is used to store program code and transfer the program code to the processor;
[0130] The processor is used to execute the above-mentioned method for identifying lightning discharge defects in glass insulators according to the instructions in the program code.
[0131] It should be noted that the processor is used to execute the steps in the above-described embodiment of a method for identifying lightning discharge defects in glass insulators according to the instructions in the program code. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described system / device embodiments.
[0132] For example, a computer program can be divided into one or more modules / units, one or more of which are stored in memory and executed by a processor to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a terminal device.
[0133] Terminal devices can be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. Terminal devices may include, but are not limited to, processors and memory. Those skilled in the art will understand that this does not constitute a limitation on the terminal device, which may include more or fewer components than illustrated, or combinations of certain components, or different components. For example, a terminal device may also include input / output devices, network access devices, buses, etc.
[0134] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0135] Memory can be an internal storage unit of a terminal device, such as a hard drive or RAM. Memory can also be an external storage device, such as a plug-in hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, memory can include both internal and external storage units. Memory is used to store computer programs and other programs and data required by the terminal device. Memory can also be used for temporary storage of data that has been output or will be output.
[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0138] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0139] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0140] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0141] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for identifying lightning discharge defects in glass insulators, characterized in that, Includes the following steps: An RCNN detection model and a YOLOv4 detection model are constructed. The YOLOv4 detection model is built based on an improved YOLOv4 network using adaptive feature fusion. The inspection images and inspection route information of glass insulators on the transmission line are acquired, and the inspection images are detected using the YOLOv4 detection model to obtain the detection and recognition results. If the detection and identification result indicates that the glass insulator has a lightning flashover defect, the location and type of the lightning flashover defect are obtained by detecting the inspection image based on the inspection route information and using the RCNN detection model. Building the YOLOv4 detection model includes: Acquire first defect image data with lightning flashover defects, the first defect image data including N first defect images; The first defect image data is trained by combining adaptive feature fusion and the PAN structure of the YOLOv4 network to obtain the YOLOv4 detection model. The training process for the first defect image data, which combines adaptive feature fusion and the PAN structure of the YOLOv4 network, includes: The first defect image data is processed using the PAN structure of the YOLOv4 network to obtain feature maps of at least three different scales. Adaptive feature fusion is used to perform identical scaling on each feature map to obtain feature scaled maps of the same scale, and the weights of the corresponding scales of the feature scaled maps are calculated. Adaptive feature fusion is used to calculate the weights corresponding to all the feature scaling maps to obtain the spatial weights of the feature map fusion at each scale. The YOLOv4 detection model uses a weight calculation formula to calculate the weights of the feature scaling map at the corresponding scale. The weight calculation formula is as follows: In the formula, , where represents the weight values, l represents the scale, and i and j represent the spatial coordinates of the feature map, respectively. Calculate the control coefficients for the convolution kernels in the YOLOv4 network; The YOLOv4 detection model uses a fusion calculation formula to calculate the weights of all the feature scaling maps, obtaining the spatial weights of the feature maps fused at each scale; the fusion calculation formula is: In the formula, , where represents the weight values, l represents the scale, and i and j represent the spatial coordinates of the feature map, respectively. The vector of the scaled image of the a-th feature at spatial location (i, j).
2. The method for identifying lightning discharge defects in glass insulators according to claim 1, characterized in that, The process of training the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network includes: using a decoupling head to splice and reconstruct the data output from the convolutional layer of the YOLOv4 network to obtain the size of the feature map.
3. The method for identifying lightning discharge defects in glass insulators according to claim 1, characterized in that, Building an RCNN detection model includes: Acquire second defect image data labeled with defect category and location information, the second defect image data including N second defect images; The second defect image data is trained using an RPN network with three cascaded detection heads to obtain an RCNN detection model that can identify the location and type of defects.
4. A device for identifying lightning discharge defects in glass insulators, characterized in that, include: Model building module, defect identification module, and location type identification module; The model building module is used to build an RCNN detection model and a YOLOv4 detection model. The YOLOv4 detection model is built based on an adaptive feature fusion improved YOLOv4 network. The defect identification module is used to acquire inspection images and inspection route information of glass insulators on the transmission line, and to use the YOLOv4 detection model to detect the inspection images to obtain the detection and identification results. The location type identification module is used to detect the location and type of lightning flashover defect in the inspection image based on the inspection route information and the RCNN detection model, according to the detection and identification result indicating that the glass insulator has a lightning flashover defect. The model building module includes a first model building module and a second model building module; The first model building module is used to acquire first defect image data with lightning flashover defects, and to train the first defect image data by combining adaptive feature fusion and the PAN structure of the YOLOv4 network to obtain a YOLOv4 detection model. The model building module is used to acquire second defect image data labeled with defect category and location information, and to train the second defect image data using an RPN network with three cascaded detection heads to obtain an RCNN detection model that can identify defect location and category. The first model construction module is further configured to process the first defect image data using the PAN structure of the YOLOv4 network to obtain feature maps of at least three different scales; perform isostatic scaling on each feature map using adaptive feature fusion to obtain feature scaled maps of the same scale, and calculate the weights of the feature scaled maps according to the corresponding scales using a weight calculation formula; and perform fusion calculation on the weights corresponding to all the feature scaled maps using an adaptive feature fusion formula to obtain the spatial weights of the feature maps fused at each scale. The weight calculation formula is as follows: The fusion calculation formula is as follows: In the formula, , where represents the weight values, l represents the scale, and i and j represent the spatial coordinates of the feature map, respectively. Calculate the control coefficients for the convolution kernels in the YOLOv4 network. The vector of the scaled image of the a-th feature at spatial location (i, j).
5. A terminal device, characterized in that, Including the processor and memory; The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the glass insulator lightning discharge defect identification method as described in any one of claims 1-3 according to the instructions in the program code.