A method and device for checking defects of a power transmission line
Patent Information
- Application Number
- CN202211557899.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2042-12-06
AI Technical Summary
[0005]本发明提供了一种输电线路缺陷的校验方法和装置,解决了现有技术由无人机采集的图像数据上传到后端的服务器,再通过服务器内的深度学习目标检测模型对图像数据进行判断,当数据量较大时,无人机将数据传输到服务器需要较长的时间,无法实时对输电线路进行检测,导致输电线路检测效率较低的技术问题
[0067] Upon receiving sample image data, the system preprocesses the data to generate training data. This training data is then used to train a pre-defined teacher neural network model, generating a target teacher neural network model. The training data and the target teacher neural network model are then used to guide the training of a pre-defined student neural network model, generating a target student neural network model. When an image of a transmission line to be identified is received, it is input into the target student neural network model, generating multiple defect feature maps. Local feature values are calculated for each defect feature map using a local feature value model. The defect feature map with the largest local feature value is selected as the target feature map. The target feature map is then analyzed to determine if the transmission line to be identified has defects. This approach solves the technical problem of existing technologies that require drones to upload collected image data to a backend server, where a deep learning object detection model on the server then judges the image data. This results in low efficiency for transmission line detection when the data volume is large, as real-time detection is not possible. By using the target teacher neural network model and training data to guide the training of the student neural network, the drone can process the data in real-time without uploading the images to the backend server.
Smart Images

Figure CN115931895B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power transmission line defect identification technology, and in particular to a method and apparatus for verifying power transmission line defects. Background Technology
[0002] Transmission lines are an important component of the power system, bearing the crucial task of transmitting electrical energy. The reliable operation of transmission lines is essential for the safe and stable operation of the entire power system. The fittings installed on transmission lines are exposed to the atmosphere all year round, and are subject to physical and chemical corrosion over a long period of time, which can easily lead to defects such as loosening, dirt, rust, cracks, and damage. Therefore, regular inspections of transmission lines are necessary to ensure the safe operation of overhead transmission lines.
[0003] In existing technologies, drones are mainly used to collect on-site image data of overhead power transmission lines, and then deep learning target detection models are used to judge the on-site image data of the power transmission lines.
[0004] However, in the aforementioned existing technologies, the drone needs to upload the collected image data to the backend server, and then use the deep learning target detection model in the server to judge the image data. When the data volume is large, it takes a long time for the drone to transmit the data to the server, making it impossible to detect the power transmission line in real time, resulting in low power transmission line detection efficiency. Summary of the Invention
[0005] This invention provides a method and apparatus for verifying defects in power transmission lines, solving the technical problem of low efficiency in existing technologies where image data collected by drones is uploaded to a backend server, and then the image data is judged by a deep learning target detection model within the server. When the data volume is large, it takes a long time for the drone to transmit the data to the server, making it impossible to detect power transmission lines in real time.
[0006] The first aspect of this invention provides a method for verifying defects in transmission lines, comprising:
[0007] When sample image data is received, the sample image data is preprocessed to generate training data;
[0008] The training data is used to train a preset teacher neural network model to generate a target teacher neural network model;
[0009] The training data and the target teacher neural network model are used to train the preset student neural network model to generate the target student neural network model;
[0010] When an image of a transmission line to be identified is received, the image is input into the target student neural network model to generate multiple defect feature maps.
[0011] The local feature values of each defect feature map are calculated using a preset local feature value model, and the defect feature map with the largest local feature value is selected as the target feature map.
[0012] Based on the target feature map, determine whether the transmission line to be identified has defects.
[0013] Optionally, the training data includes training sample data and test sample data, and the step of training the teacher neural network model using the training data to generate the target teacher neural network model includes:
[0014] The training sample data is input into the teacher neural network model to generate the corresponding first prediction feature map;
[0015] Select a first standard feature map associated with the first predicted feature map from the test sample data;
[0016] Calculate the first overlap between the first predicted feature map and the first standard feature map;
[0017] Determine whether the first overlap degree is less than or equal to a preset overlap degree threshold;
[0018] If the first overlap degree is greater than the overlap degree threshold, then training is stopped and a target teacher neural network model is generated.
[0019] If the first overlap degree is less than or equal to the overlap degree threshold, the parameters of the teacher neural network model are adjusted according to the preset first gradient, and the process jumps to the step of inputting the training data into the teacher neural network model to generate the corresponding first predicted feature map.
[0020] Optionally, the step of training the student neural network model using the training data and the target teacher neural network model to generate the target student neural network model includes:
[0021] The training sample data is input into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second prediction feature map;
[0022] Select a second standard feature map associated with the second predicted feature map from the test sample data;
[0023] Calculate the second degree of overlap between the second predicted feature map and the distillation feature map;
[0024] Calculate the third overlap between the second predicted feature map and the second standard feature map;
[0025] Compare the second degree of overlap with the overlap threshold;
[0026] If the second degree of overlap is greater than the degree of overlap threshold, then the third degree of overlap is compared with the degree of overlap threshold.
[0027] If the third overlap degree is greater than the overlap degree threshold, then training is stopped and the target student neural network model is generated.
[0028] Optionally, it also includes:
[0029] If the second overlap degree is less than or equal to the overlap degree threshold, then the parameters of the student neural network model are adjusted according to the preset second gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second prediction feature map.
[0030] If the third overlap degree is less than or equal to the overlap degree threshold, then the parameters of the student neural network model are adjusted according to the first gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second prediction feature map.
[0031] Optionally, the target student neural network model includes a detection branch network and a feature pyramid network. The step of inputting the image of the transmission line to be identified into the target student neural network model to generate multiple defect feature maps when the image of the transmission line to be identified is received includes:
[0032] When an image of a transmission line to be identified is received, the image is input into the feature pyramid network to generate a corresponding convolutional feature map.
[0033] Select the coordinates of the center point of the foreground target on the convolutional feature map;
[0034] Multiple sets of foreground feature images of different sizes are extracted based on the coordinates of the center point;
[0035] The foreground feature map is input into the detection branch network to generate a defect feature map.
[0036] Optionally, the step of determining whether the transmission line to be identified is abnormal based on the target feature map includes:
[0037] Parse the target feature map to obtain the corresponding identifier features;
[0038] When the identification feature is green, the output indicates that the transmission line to be identified has no defects.
[0039] When the identification feature is red, it indicates that the transmission line to be identified has a defect.
[0040] Optionally, the step of calculating the local feature values of each defect feature map using a preset local feature value model and selecting the defect feature map with the largest local feature value as the target feature map includes:
[0041] The boundary frame of the defect feature map is extracted using a preset local feature value model;
[0042] Calculate the ratio between the boundary box diagram and the defect feature diagram, and determine the ratio as a local feature value;
[0043] The defect feature map with the largest local feature value is selected as the target feature map.
[0044] A second aspect of the present invention provides a device for verifying defects in transmission lines, comprising:
[0045] The training data acquisition module is used to preprocess the received sample image data to generate training data.
[0046] The teacher model acquisition module is used to train a preset teacher neural network model using the training data to generate a target teacher neural network model.
[0047] The student model acquisition module is used to train a preset student neural network model using the training data and the target teacher neural network model to generate a target student neural network model;
[0048] The defect feature map acquisition module is used to input the image of the transmission line to be identified into the target student neural network model when the image of the transmission line to be identified is received, and generate multiple defect feature maps.
[0049] The target feature map acquisition module is used to calculate the local feature values of each of the defect feature maps through a preset local feature value model, and select the defect feature map with the largest local feature value as the target feature map;
[0050] The data analysis module is used to determine whether there are defects in the transmission line to be identified based on the target feature map.
[0051] Optionally, the training data includes training sample data and test sample data, and the teacher model acquisition module includes:
[0052] The first predictive feature map acquisition submodule is used to input the training sample data into the teacher neural network model to generate the corresponding first predictive feature map;
[0053] The first standard feature map acquisition submodule is used to select a first standard feature map associated with the first predicted feature map from the test sample data;
[0054] The first overlap calculation submodule is used to calculate the first overlap between the first predicted feature map and the first standard feature map;
[0055] The first judgment submodule is used to determine whether the first overlap degree is less than or equal to a preset overlap degree threshold.
[0056] If the first overlap degree is greater than the overlap degree threshold, then training is stopped and a target teacher neural network model is generated.
[0057] If the first overlap degree is less than or equal to the overlap degree threshold, the parameters of the teacher neural network model are adjusted according to the preset first gradient, and the process jumps to the step of inputting the training data into the teacher neural network model to generate the corresponding first predicted feature map.
[0058] Optionally, the student model acquisition module includes:
[0059] The first data acquisition submodule is used to input the training sample data into the target teacher neural network model and the student neural network model respectively, and generate a distillation feature map and a second prediction feature map.
[0060] The second standard feature map acquisition submodule is used to select a second standard feature map associated with the second predicted feature map from the test sample data;
[0061] The second overlap calculation submodule is used to calculate the second overlap between the second predicted feature map and the distillation feature map;
[0062] The third overlap calculation submodule is used to calculate the third overlap between the second predicted feature map and the second standard feature map;
[0063] The second judgment submodule is used to compare the second overlap degree with the overlap threshold.
[0064] If the second degree of overlap is greater than the degree of overlap threshold, then the third degree of overlap is compared with the degree of overlap threshold.
[0065] If the third overlap degree is greater than the overlap degree threshold, then training is stopped and the target student neural network model is generated.
[0066] As can be seen from the above technical solutions, the present invention has the following advantages:
[0067] Upon receiving sample image data, the system preprocesses the data to generate training data. This training data is then used to train a pre-defined teacher neural network model, generating a target teacher neural network model. The training data and the target teacher neural network model are then used to guide the training of a pre-defined student neural network model, generating a target student neural network model. When an image of a transmission line to be identified is received, it is input into the target student neural network model, generating multiple defect feature maps. Local feature values are calculated for each defect feature map using a local feature value model. The defect feature map with the largest local feature value is selected as the target feature map. The target feature map is then analyzed to determine if the transmission line to be identified has defects. This approach solves the technical problem of existing technologies that require drones to upload collected image data to a backend server, where a deep learning object detection model on the server then judges the image data. This results in low efficiency for transmission line detection when the data volume is large, as real-time detection is not possible. By using the target teacher neural network model and training data to guide the training of the student neural network, the drone can process the data in real-time without uploading the images to the backend server. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 A flowchart illustrating the steps of a method for verifying defects in transmission lines according to Embodiment 1 of the present invention;
[0070] Figure 2 The flowchart illustrates the steps of a method for verifying defects in transmission lines according to Embodiment 2 of the present invention.
[0071] Figure 3 This is a structural block diagram of a transmission line defect verification device provided in Embodiment 3 of the present invention. Detailed Implementation
[0072] This invention provides a method and apparatus for verifying defects in power transmission lines, which addresses the technical problem in existing technologies where image data collected by drones is uploaded to a backend server, and then the image data is judged by a deep learning target detection model within the server. When the data volume is large, it takes a long time for the drone to transmit the data to the server, making it impossible to detect power transmission lines in real time, resulting in low efficiency in power transmission line detection.
[0073] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0074] Please see Figure 1 , Figure 1 The flowchart illustrates the steps of a method for verifying defects in power transmission lines according to Embodiment 1 of the present invention.
[0075] This invention provides a method for verifying defects in power transmission lines, comprising:
[0076] Step 101: When sample image data is received, perform data preprocessing on the sample image data to generate training data.
[0077] Sample image data refers to image data collected and captured by drones during power transmission line inspections.
[0078] Data preprocessing refers to labeling normal and defective hardware in the sample image data using a labeling tool. The labeling information includes category name and location information Xmin (X coordinate of the top left corner of the labeling box), Ymin (Y coordinate of the top left corner of the labeling box), Xmax (X coordinate of the bottom right corner of the labeling box), and Ymax (Y coordinate of the bottom right corner of the labeling box). The data is then saved as an XML tag file in VOC data format. Next, the labeled data is cleaned to remove data with abnormal brightness, high noise, and blurred images. The number of target samples of normal and defective hardware in the data is made to be in a 1:1 ratio. Finally, the image data is divided into training sample data and test sample data according to a 4:1 ratio.
[0079] Training data refers to both training sample data and test sample data.
[0080] In this embodiment of the invention, when receiving sample image data collected by a drone, the sample images are preprocessed to generate training sample data and test sample data.
[0081] Step 102: Train the preset teacher neural network model using training data to generate the target teacher neural network model.
[0082] The teacher neural network model refers to the pre-defined YOLOv4 model, whose structure mainly consists of the backbone network CSPDarknet, the feature pyramid network PANet, and the detection branch network.
[0083] In this embodiment of the invention, after generating training sample data and test sample data, the preset teacher neural network model is trained using the training sample data and test sample data to generate the target teacher neural network model.
[0084] It is worth mentioning that both the teacher neural network model and the student neural network model used the same target classification loss function and bounding box regression loss function during the training process.
[0085] In power transmission line defect detection tasks, defect targets often occupy a small proportion of the image, leading to a severe imbalance between foreground and background samples in the training data. To address this issue, VariflocalLoss is used for target classification loss. This weighted method effectively reduces the weight of negative sample losses, focusing the training on high-quality defect target samples. The expression is as follows:
[0086]
[0087] Where m is the confidence score of the class predicted by the network, q is the true score, q is the IoU value between the true class bounding box and the predicted bounding box, q is 0 for other classes, and the target value q for other background areas is 0. α and β are weighting factors, set to 0.75 and 2 respectively.
[0088] Bounding box regression loss L box The standard GIoU Loss is used. Unlike IoU, which only focuses on overlapping regions, GIoU considers not only overlapping regions but also other non-overlapping regions, thus better reflecting the overlap between the predicted bounding box and the ground truth bounding box. The bounding box mainly consists of two parts: the initial predicted bounding box and the fine-tuned predicted bounding box, expressed as follows:
[0089]
[0090] L box =GIoU box-init +GIoU box-refine ;
[0091] Among them, box gt To accurately annotate the bounding box, box pre Predict bounding boxes for the network. conIt is the smallest bounding rectangle of the two.
[0092] Step 103: Train the preset student neural network model using training data and the target teacher neural network model to generate the target student neural network model.
[0093] The student neural network model refers to a YOLOv4 model whose backbone network width is set to 1 / 4 of the teacher neural network width.
[0094] In this embodiment of the invention, by simultaneously inputting training data into the target teacher neural network model and the preset student neural network model, the target teacher neural network model guides the training of the student neural network model through a local and global attention-focused distillation learning method, thereby generating the target student neural network model.
[0095] It is worth mentioning that, compared to the teacher's neural network model, the student's neural network model requires an additional distillation loss L during training. Kd Distillation losses mainly consist of two parts: losses from local distillation and losses from global distillation. Local losses, L... local Including attention loss L attention With focus loss L feature It can be expressed by the following formula:
[0096]
[0097]
[0098] L local =L feature +L attention
[0099] Where c, h, and w represent the channels, height, and width of the feature map, respectively. k, i, and j are their respective indices, and M is the mask on the feature map. When pixel (i, j) is within the target bounding box, M represents the mask. i,j =1, otherwise M i,j =0, Q i,j Let Q be the scale factor of pixel (i,j). If the pixel is located within a ground truth bounding box of a target, then Q... i,j The value is equal to the reciprocal of the product of the width and height of the border; otherwise, it is a constant. Let (i,j) be the spatial attention value for pixel (i,j). Let be the channel attention value for channel k. The feature value at position (i,j) of the k-th channel pixel in the feature map output by the teacher's neural network is given. The feature value at the (i,j) position of the k-th channel pixel in the feature map of the student neural network outputs. The spatial attention values of the teacher's neural network and the student's neural network. Let L1 be the channel attention value between the teacher's neural network and the student's neural network. L1 is the mean absolute error loss. Furthermore, τ = 1.6 × 10⁻⁶. -3 μ=8×10 -4 γ = 8 × 10 -3 .
[0100] The global loss is mainly composed of the squared differences in feature layers between algorithms, as shown in the following formula:
[0101]
[0102] Among them, F t F is the feature map output by the teacher's neural network. s This represents the feature map output by the student neural network. φ(*) indicates a size adjustment operation, which adjusts the feature maps output by the teacher and student neural networks to the same size for computation. The hyperparameter λ = 8 × 10⁻⁶. -6 Therefore, the distillation loss can be expressed as L Kd =L local +L global .
[0103] Step 104: When the image of the transmission line to be identified is received, the image of the transmission line to be identified is input into the target student neural network model to generate multiple defect feature maps.
[0104] The image of the power transmission line to be identified refers to the image data of the power transmission line collected by the drone at the current moment.
[0105] In this embodiment of the invention, when an image of a power transmission line to be identified is received from a drone, the image is input into a target student neural network model to generate multiple defect feature maps.
[0106] Step 105: Calculate the local feature values of each defect feature map using the preset local feature value model, and select the defect feature map with the largest local feature value as the target feature map.
[0107] In this embodiment of the invention, after obtaining multiple defect feature maps, the local feature values of each defect feature map are calculated using a preset local feature value model, and the defect feature map with the largest local feature value is selected as the target feature map.
[0108] Step 106: Based on the target feature map, determine whether there are defects in the transmission line to be identified.
[0109] In this embodiment of the invention, after obtaining the target feature map, it is determined whether the transmission line to be identified has defects based on the identifiers in the target feature map.
[0110] In this embodiment of the invention, upon receiving sample image data, the sample image data is preprocessed to generate training data. This training data is then used to train a pre-defined teacher neural network model, generating a target teacher neural network model. The training data and the target teacher neural network model are then used to guide the training of a pre-defined student neural network model, generating a target student neural network model. When an image of a transmission line to be identified is received, the image is input into the target student neural network model, generating multiple defect feature maps. Local feature values are calculated for each defect feature map using a local feature value model. The defect feature map with the largest local feature value is selected as the target feature map. The target feature map is then analyzed to determine whether the transmission line to be identified has a defect. This solves the technical problem of existing technologies that require drones to upload collected image data to a backend server, and then use a deep learning object detection model on the server to judge the image data. When the data volume is large, this results in low efficiency for transmission line detection because it cannot be performed in real time. By guiding the training of the student neural network using the target teacher neural network model and training data, the drone can process the data in real time without uploading the data images to the backend server.
[0111] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps of a method for verifying defects in power transmission lines, as provided in Embodiment 2 of the present invention.
[0112] This invention provides a method for verifying defects in power transmission lines, comprising:
[0113] Step 201: When sample image data is received, perform data preprocessing on the sample image data to generate training data.
[0114] In this embodiment of the invention, upon receiving sample image data, training sample data and test sample data are generated by performing data preprocessing on the sample image data.
[0115] Step 202: Train the preset teacher neural network model using training data to generate the target teacher neural network model.
[0116] Furthermore, the training data includes training sample data and test sample data, and step 202 may include the following sub-steps:
[0117] S11. Input the training sample data into the teacher's neural network model to generate the corresponding first prediction feature map.
[0118] The first predicted feature map refers to the map generated by inputting training sample data into the teacher's neural network model, calculating the local feature values of each predicted feature map using a local feature value model, and selecting the map with the largest local feature value as the first predicted feature map.
[0119] In this embodiment of the invention, training sample data is input into the teacher neural network to generate a corresponding first prediction feature map.
[0120] S12. Select the first standard feature map associated with the first predicted feature map from the test sample data.
[0121] The first standard feature map refers to the test feature map in the test sample data that corresponds to the first predicted feature map.
[0122] In this embodiment of the invention, a first test feature map corresponding to the first predicted feature map is selected from the test sample data.
[0123] S13. Calculate the first overlap between the first predicted feature map and the first standard feature map.
[0124] The first overlap refers to the ratio between the first standard feature map and the first predicted feature map.
[0125] In this embodiment of the invention, the ratio between the first standard feature map and the first predicted feature map is calculated.
[0126] S14. Determine whether the first overlap degree is less than or equal to the preset overlap degree threshold.
[0127] The overlap threshold refers to the ratio between the first standard feature map and the first predicted feature map generated by the trained teacher neural network model, which is generally taken as 98%.
[0128] In this embodiment of the invention, it is determined whether the first overlap degree is less than or equal to 98%.
[0129] S15. If the first overlap degree is greater than the overlap degree threshold, stop training and generate the target teacher neural network model.
[0130] In this embodiment of the invention, when the first overlap is greater than 98%, training is stopped and a target teacher neural network model is generated.
[0131] S16. If the first overlap degree is less than or equal to the overlap degree threshold, then adjust the parameters of the teacher neural network model according to the preset first gradient, and jump to the step of inputting the training data into the teacher neural network model to generate the corresponding first predicted feature map.
[0132] In this embodiment of the invention, when the first overlap is less than or equal to 98%, the parameters of the teacher neural network model are adjusted according to the preset first gradient, and the process jumps to the step of inputting training data into the teacher neural network model to generate the corresponding first predicted feature map.
[0133] Step 203: Train the preset student neural network model using training data and the target teacher neural network model to generate the target student neural network model.
[0134] Furthermore, step 203 may include the following sub-steps:
[0135] S21. Input the training sample data into the target teacher neural network model and the student neural network model respectively to generate distillation feature map and second prediction feature map.
[0136] Distillation feature map refers to the process of inputting training sample data into multiple predicted feature maps generated by the target teacher neural network model, calculating the local feature values of each predicted feature map, and selecting the predicted feature map with the largest local feature value as the distillation feature map.
[0137] The second predictive feature map refers to the multiple predictive feature maps generated by inputting training sample data into the student neural network model, and selecting the predictive feature map with the largest local feature value as the second predictive feature map by calculating the local feature values of each predictive feature map.
[0138] In this embodiment of the invention, training sample data is input into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second predicted feature map.
[0139] S22. Select a second standard feature map that is associated with the second predicted feature map from the test sample data.
[0140] The second standard feature map refers to the test feature map in the test sample data that corresponds to the second predicted feature map.
[0141] In this embodiment of the invention, a second standard feature map corresponding to the second predicted feature map is selected from the test sample data.
[0142] S23. Calculate the second overlap between the second predicted feature map and the distillation feature map.
[0143] The second overlap refers to the ratio between the distillation feature map and the second predicted feature map.
[0144] In this embodiment of the invention, the ratio between the distillation feature map and the second predicted feature map is calculated.
[0145] S24. Calculate the third overlap between the second predicted feature map and the second standard feature map.
[0146] The third overlap refers to the ratio between the second standard feature map and the second predicted feature map.
[0147] In this embodiment of the invention, the ratio between the second standard feature map and the second predicted feature map is defined.
[0148] S25. Compare the second degree of overlap with the degree of overlap threshold.
[0149] In this embodiment of the invention, it is determined whether the second overlap degree is less than or equal to 98%.
[0150] S26. If the second degree of overlap is greater than the degree of overlap threshold, then compare the third degree of overlap with the degree of overlap threshold.
[0151] In this embodiment of the invention, when the second overlap is greater than 98%, it is determined whether the third overlap is less than or equal to 98%.
[0152] S27. If the third overlap degree is greater than the overlap degree threshold, stop training and generate the target student neural network model.
[0153] In this embodiment of the invention, when the third overlap is greater than 98%, training is stopped and a target student neural network model is generated.
[0154] S28. If the second overlap degree is less than or equal to the overlap degree threshold, then adjust the parameters of the student neural network model according to the preset second gradient, and jump to execute the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate the distillation feature map and the second prediction feature map.
[0155] In this embodiment of the invention, when the second overlap is less than or equal to 98%, the parameters of the student neural network model are adjusted according to the preset second gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second predicted feature map.
[0156] S29. If the third overlap degree is less than or equal to the overlap degree threshold, then adjust the parameters of the student neural network model according to the first gradient, and jump to execute the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate the distillation feature map and the second prediction feature map.
[0157] In this embodiment of the invention, when the third overlap is less than or equal to 98%, the parameters of the student neural network model are adjusted according to the first gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate the distillation feature map and the second prediction feature map.
[0158] In one example of the present invention, the target student neural network model can also be tested using a simulated edge computing platform. The target student neural network model is tested using training data, and a precision P is employed. A Recall rate R A mAP (mean Average Precision), FPS (Frames Per Second), and FLOPs (Floating Point Operations) are used as performance metrics for model testing. The formulas for precision and recall are as follows:
[0159]
[0160]
[0161] Where, x TP,A x is the target correctly identified in class A; FP,A x is the target in class A that was incorrectly identified as a positive example; FN,A P is a positive example that was not correctly identified in class A; A R represents the percentage of correctly identified targets out of all targets identified as category A. A This represents the percentage of correctly identified targets out of all targets in the image belonging 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 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.
[0162] Step 204: When the image of the transmission line to be identified is received, the image of the transmission line to be identified is input into the target student neural network model to generate multiple defect feature maps.
[0163] Furthermore, the target student neural network model includes a detection branch network and a feature pyramid network, and step 204 may include the following sub-steps:
[0164] S31. When an image of a transmission line to be identified is received, the image is input into the feature pyramid network to generate the corresponding convolutional feature map.
[0165] In this embodiment of the invention, when an image of a power transmission line to be identified is received, the image is input into a feature pyramid network, and the corresponding convolutional feature map is output.
[0166] S32. Select the coordinates of the center point of the foreground target on the convolutional feature map.
[0167] The foreground target refers to the location of the fitting on the convolutional feature map.
[0168] In this embodiment of the invention, the center point coordinates of the foreground target are selected on the convolutional feature map.
[0169] S33. Using the center point coordinates as a reference, extract multiple sets of foreground feature images of different sizes.
[0170] S34. Input the foreground feature map into the detection branch network to generate the defect feature map.
[0171] In this embodiment of the invention, multiple sets of foreground feature maps of different sizes are extracted based on the center point coordinates, and the foreground feature maps are input into the detection branch network to generate multiple defect feature maps.
[0172] Step 205: Calculate the local feature values of each defect feature map using the preset local feature value model, and select the defect feature map with the largest local feature value as the target feature map.
[0173] Furthermore, step 205 may include the following sub-steps:
[0174] S41. Extract the boundary map of the defect feature map using a preset local feature value model.
[0175] In this embodiment of the invention, the defect feature map is input into a preset local feature value model to generate a corresponding boundary box map.
[0176] S42. Calculate the ratio between the boundary box diagram and the defect feature diagram, and determine the ratio as the local feature value.
[0177] In this embodiment of the invention, the ratio between the defect feature map and the boundary box map is calculated, and the calculated ratio is determined as a local feature value.
[0178] S43. Select the defect feature map with the largest local feature value as the target feature map.
[0179] In this embodiment of the invention, the defect feature map with the largest local feature value is selected from multiple defect feature maps as the target feature map.
[0180] Step 206: Analyze the target feature map and obtain the corresponding identifier features.
[0181] Label features refer to the label bounding boxes generated when the foreground feature map is input into the detection branch network.
[0182] In this embodiment of the invention, the target feature map is parsed to obtain the corresponding identification features on the target feature map.
[0183] Step 207: When the identification feature is green, the output indicates that there are no defects in the transmission line to be identified.
[0184] In this embodiment of the invention, if the identification feature is green, it indicates that the transmission line to be identified has no defects, and the output indicates that the transmission line to be identified has no defects.
[0185] Step 208: When the identification feature is red, the output indicates that the transmission line to be identified has a defect.
[0186] In this embodiment of the invention, if the identification feature is red, it indicates that the transmission line to be identified has a defect, and the defect of the transmission line to be identified is output.
[0187] In this embodiment of the invention, when sample image data is received, the sample image data is preprocessed to generate training data. A preset teacher neural network model is trained using the training data to generate a target teacher neural network model. Then, a preset student neural network model is trained using the training data and the target teacher neural network model to generate a target student neural network model. When an image of a transmission line to be identified is received, the image is input into the target student neural network model to generate multiple defect feature maps. Local feature values are calculated for each defect feature map using a local feature value model. The defect feature map with the largest local feature value is selected as the target feature map. The target feature map is then analyzed to determine whether the transmission line to be identified has a defect. This solves the technical problem of existing technologies that use drones to upload collected image data to a backend server, and then use a deep learning object detection model on the server to judge the image data. When the data volume is large, real-time detection of transmission lines is not possible, resulting in low efficiency in transmission line detection. By using a target teacher neural network model and training data to train the student neural network model locally and globally, a target student neural network model is generated. This target student neural network model is then used to perform real-time analysis and processing of the acquired transmission line images to be identified, thereby improving the efficiency of transmission line detection.
[0188] Please see Figure 3 , Figure 3 This is a structural block diagram of a transmission line defect verification device provided in Embodiment 3 of the present invention.
[0189] This invention provides a device for verifying defects in power transmission lines, comprising:
[0190] The training data acquisition module 301 is used to preprocess the sample image data when it receives the sample image data to generate training data.
[0191] The teacher model acquisition module 302 is used to train a preset teacher neural network model using training data to generate a target teacher neural network model;
[0192] The student model acquisition module 303 is used to train the preset student neural network model using training data and the target teacher neural network model to generate the target student neural network model;
[0193] The defect feature map acquisition module 304 is used to input the image of the transmission line to be identified into the target student neural network model when the image of the transmission line to be identified is received, and generate multiple defect feature maps.
[0194] The target feature map acquisition module 305 is used to calculate the local feature values of each defect feature map through a preset local feature value model, and select the defect feature map with the largest local feature value as the target feature map.
[0195] The data analysis module 306 is used to determine whether there are defects in the transmission line to be identified based on the target feature map.
[0196] Furthermore, the teacher model acquisition module 302 includes:
[0197] The first predictive feature map acquisition submodule is used to input training sample data into the teacher's neural network model and generate the corresponding first predictive feature map.
[0198] The first standard feature map acquisition submodule is used to select the first standard feature map associated with the first predicted feature map from the test sample data;
[0199] The first overlap calculation submodule is used to calculate the first overlap between the first predicted feature map and the standard feature map;
[0200] The first judgment submodule is used to determine whether the first overlap degree is less than or equal to the preset overlap degree threshold.
[0201] If the first degree of overlap is greater than the overlap threshold, then training is stopped and the target teacher neural network model is generated.
[0202] If the first overlap degree is less than or equal to the overlap degree threshold, the parameters of the teacher's neural network model are adjusted according to the preset first gradient, and the process jumps to the step of inputting the training data into the teacher's neural network model to generate the corresponding first predicted feature map.
[0203] Furthermore, the student model acquisition module 303 includes:
[0204] The first data acquisition submodule is used to input training sample data into the target teacher neural network model and the student neural network model respectively, and generate distillation feature map and second prediction feature map;
[0205] The second standard feature map acquisition submodule is used to select the second standard feature map associated with the second predicted feature map from the test sample data.
[0206] The second overlap calculation submodule is used to calculate the second overlap between the second predicted feature map and the distillation feature map.
[0207] The third overlap calculation submodule is used to calculate the third overlap between the second predicted feature map and the second standard feature map.
[0208] The second judgment submodule is used to compare the second overlap degree with the overlap threshold.
[0209] If the second overlap degree is less than or equal to the overlap degree threshold, the parameters of the student neural network model are adjusted according to the preset second gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate the distillation feature map and the second prediction feature map.
[0210] If the second degree of overlap is greater than the degree of overlap threshold, then compare the third degree of overlap with the degree of overlap threshold.
[0211] If the third overlap degree is greater than the overlap degree threshold, then training stops and the target student neural network model is generated.
[0212] If the third overlap degree is less than or equal to the overlap degree threshold, then adjust the parameters of the student neural network model according to the first gradient, and jump to execute the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate the distillation feature map and the second prediction feature map.
[0213] Furthermore, the defect feature map acquisition module 304 includes:
[0214] The convolutional feature map acquisition submodule is used to input the image of the transmission line to be identified into the feature pyramid network when the image of the transmission line to be identified is received, and generate the corresponding convolutional feature map.
[0215] The center point coordinate acquisition submodule is used to select the center point coordinates of the foreground target on the convolutional feature map;
[0216] The foreground feature map acquisition submodule is used to extract multiple sets of foreground feature maps of different sizes based on the center point coordinates.
[0217] The defect feature map acquisition submodule is used to input the foreground feature map into the detection branch network to generate the defect feature map.
[0218] Furthermore, the target feature map acquisition module 305 includes:
[0219] The boundary map acquisition submodule is used to extract the boundary map of the defect feature map through a preset local feature value model.
[0220] The local feature value acquisition submodule is used to calculate the ratio between the boundary box map and the defect feature map, and to determine the ratio as the local feature value.
[0221] The target feature map acquisition submodule is used to select the defect feature map with the largest local feature value as the target feature map.
[0222] Furthermore, the data analysis module 306 includes:
[0223] The identifier feature acquisition submodule is used to parse the target feature map and obtain the identifier features corresponding to the target feature map.
[0224] The identification analysis submodule is used to output that there are no defects in the transmission line to be identified when the identification feature is green.
[0225] When the identification feature is red, it indicates that the transmission line to be identified has a defect.
[0226] In this embodiment of the invention, when the training data acquisition module receives sample image data, it performs data preprocessing on the sample image data to generate training data. The teacher model acquisition module uses the training data to train a preset teacher neural network model to generate a target teacher neural network model. The student model acquisition module uses the target teacher neural network model and the training data to guide the training of a preset student neural network model to generate a target student neural network model. The defect feature map acquisition module receives the image of the transmission line to be identified and inputs it into the target student neural network model to generate multiple defect feature maps. The target feature map acquisition module calculates the local feature values of each defect feature map and selects the defect feature map with the largest local feature value as the target feature map. The data analysis module analyzes the target feature map to determine whether there is a defect in the transmission line to be identified.
[0227] 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.
[0228] In the several embodiments provided in this application, it should be understood that the disclosed apparatus 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 device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0229] 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.
[0230] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 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 the present invention.
Claims
1. A method for verifying defects in transmission lines, characterized in that, include: When sample image data is received, the sample image data is preprocessed to generate training data; The training data is used to train a preset teacher neural network model to generate a target teacher neural network model; The training data and the target teacher neural network model are used to train the preset student neural network model to generate the target student neural network model; When an image of a transmission line to be identified is received, the image is input into the target student neural network model to generate multiple defect feature maps. The local feature values of each defect feature map are calculated using a preset local feature value model, and the defect feature map with the largest local feature value is selected as the target feature map. Based on the target feature map, determine whether the transmission line to be identified has defects; The step of calculating the local feature values of each defect feature map using a preset local feature value model and selecting the defect feature map with the largest local feature value as the target feature map includes: The boundary frame of the defect feature map is extracted using a preset local feature value model; Calculate the ratio between the boundary box diagram and the defect feature diagram, and determine the ratio as a local feature value; The defect feature map with the largest local feature value is selected as the target feature map.
2. The method for verifying defects in transmission lines according to claim 1, characterized in that, The training data includes training sample data and test sample data. The step of training the teacher neural network model using the training data to generate the target teacher neural network model includes: The training sample data is input into the teacher neural network model to generate the corresponding first prediction feature map; Select a first standard feature map associated with the first predicted feature map from the test sample data; Calculate the first overlap between the first predicted feature map and the first standard feature map; Determine whether the first overlap degree is less than or equal to a preset overlap degree threshold; If the first overlap degree is greater than the overlap degree threshold, then training is stopped and a target teacher neural network model is generated. If the first overlap degree is less than or equal to the overlap degree threshold, the parameters of the teacher neural network model are adjusted according to the preset first gradient, and the process jumps to the step of inputting the training data into the teacher neural network model to generate the corresponding first predicted feature map.
3. The method for verifying defects in transmission lines according to claim 2, characterized in that, The step of training the student neural network model using the training data and the target teacher neural network model to generate the target student neural network model includes: The training sample data is input into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second prediction feature map; Select a second standard feature map associated with the second predicted feature map from the test sample data; Calculate the second degree of overlap between the second predicted feature map and the distillation feature map; Calculate the third overlap between the second predicted feature map and the second standard feature map; Compare the second degree of overlap with the overlap threshold; If the second degree of overlap is greater than the degree of overlap threshold, then the third degree of overlap is compared with the degree of overlap threshold. If the third overlap degree is greater than the overlap degree threshold, then training is stopped and the target student neural network model is generated.
4. The method for verifying defects in transmission lines according to claim 3, characterized in that, Also includes: If the second overlap degree is less than or equal to the overlap degree threshold, then the parameters of the student neural network model are adjusted according to the preset second gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second prediction feature map. If the third overlap degree is less than or equal to the overlap degree threshold, then the parameters of the student neural network model are adjusted according to the first gradient, and the process jumps to the step of inputting the training sample data into the target teacher neural network model and the student neural network model respectively to generate a distillation feature map and a second prediction feature map.
5. The method for verifying defects in transmission lines according to claim 1, characterized in that, The target student neural network model includes a detection branch network and a feature pyramid network. The step of inputting the image of the transmission line to be identified into the target student neural network model to generate multiple defect feature maps when an image of the transmission line to be identified is received includes: When an image of a transmission line to be identified is received, the image is input into the feature pyramid network to generate a corresponding convolutional feature map. Select the coordinates of the center point of the foreground target on the convolutional feature map; Multiple sets of foreground feature images of different sizes are extracted based on the coordinates of the center point; The foreground feature map is input into the detection branch network to generate a defect feature map.
6. The method for verifying defects in transmission lines according to claim 1, characterized in that, The step of determining whether the transmission line to be identified is abnormal based on the target feature map includes: Parse the target feature map to obtain the corresponding identifier features; When the identification feature is green, the output indicates that the transmission line to be identified has no defects. When the identification feature is red, it indicates that the transmission line to be identified has a defect.
7. A device for verifying defects in transmission lines, characterized in that, include: The training data acquisition module is used to preprocess the received sample image data to generate training data. The teacher model acquisition module is used to train a preset teacher neural network model using the training data to generate a target teacher neural network model. The student model acquisition module is used to train a preset student neural network model using the training data and the target teacher neural network model to generate a target student neural network model; The defect feature map acquisition module is used to input the image of the transmission line to be identified into the target student neural network model when the image of the transmission line to be identified is received, and generate multiple defect feature maps. The target feature map acquisition module is used to calculate the local feature values of each of the defect feature maps through a preset local feature value model, and select the defect feature map with the largest local feature value as the target feature map; The data analysis module is used to determine whether there are defects in the transmission line to be identified based on the target feature map. The target feature map acquisition module includes: The boundary map acquisition submodule is used to extract the boundary map of the defect feature map through a preset local feature value model; The local feature value acquisition submodule is used to calculate the ratio between the boundary box map and the defect feature map, and determine the ratio as the local feature value; The target feature map acquisition submodule is used to select the defect feature map with the largest local feature value as the target feature map.
8. The device for verifying defects in transmission lines according to claim 7, characterized in that, The training data includes training sample data and test sample data, and the teacher model acquisition module includes: The first predictive feature map acquisition submodule is used to input the training sample data into the teacher neural network model to generate the corresponding first predictive feature map; The first standard feature map acquisition submodule is used to select a first standard feature map associated with the first predicted feature map from the test sample data; The first overlap calculation submodule is used to calculate the first overlap between the first predicted feature map and the first standard feature map; The first judgment submodule is used to determine whether the first overlap degree is less than or equal to a preset overlap degree threshold. If the first overlap degree is greater than the overlap degree threshold, then training is stopped and a target teacher neural network model is generated. If the first overlap degree is less than or equal to the overlap degree threshold, the parameters of the teacher neural network model are adjusted according to the preset first gradient, and the process jumps to the step of inputting the training data into the teacher neural network model to generate the corresponding first predicted feature map.
9. The device for verifying defects in transmission lines according to claim 8, characterized in that, The student model acquisition module includes: The first data acquisition submodule is used to input the training sample data into the target teacher neural network model and the student neural network model respectively, and generate a distillation feature map and a second prediction feature map. The second standard feature map acquisition submodule is used to select a second standard feature map associated with the second predicted feature map from the test sample data; The second overlap calculation submodule is used to calculate the second overlap between the second predicted feature map and the distillation feature map; The third overlap calculation submodule is used to calculate the third overlap between the second predicted feature map and the second standard feature map; The second judgment submodule is used to compare the second overlap degree with the overlap threshold. If the second degree of overlap is greater than the degree of overlap threshold, then the third degree of overlap is compared with the degree of overlap threshold. If the third overlap degree is greater than the overlap degree threshold, then training is stopped and the target student neural network model is generated.
Citation Information
Patent Citations
Candidate target detection method based on local maximum value
CN109977952A
Power transmission channel engineering vehicle target detection method and system based on knowledge distillation
CN115131747A