Edge detection method for safety protection tool for live working of 10kV distribution network

By training on the Huawei Cloud ModelArt platform and deploying the model on Huawei Ascend inference chip edge devices, the problem of lack of real-time detection in the 10kV distribution network live operation scenario was solved, and real-time detection of safety protection equipment for the 10kV distribution network live operation was achieved. Detection improves the safety protection level of workers.

CN118628825APending Publication Date: 2024-09-10ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID NINGXIA ELECTRIC POWER COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410806969.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing technology lacks a real-time detection method for the protective equipment of workers in the live operation scenario of the 10kV distribution network.

Method used

An edge detection method for safety protection equipment for live operations in the 10kV distribution network is adopted. Model training is performed on the Huawei Cloud ModelArt platform, and the heterogeneous computing architecture CANN platform is used to convert the model into a model suitable for edge devices, and inference based on Huawei Ascend The chip is deployed on the edge device to realize real-time detection of safety protection equipment for live operations in the 10kV distribution network.

Benefits of technology

It realizes real-time detection of safety protection equipment for live operations in the 10kV distribution network, improves the safety protection level of workers, and ensures real-time protection in live operation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628825A
    Figure CN118628825A
Patent Text Reader

Abstract

The invention discloses a 10kV distribution network hot-line work safety protection tool edge detection method, and relates to the field of insulation equipment edge detection, and the method comprises the steps: S1, carrying out model training through employing a 10kV distribution network hot-line work personal protection data set; s2, carrying out model conversion on the trained model, and converting the model into a model suitable for edge equipment; and S3, deploying the converted model on edge equipment, and realizing real-time reasoning of the 10kV distribution network hot-line work safety protection appliance. According to the invention, by deploying the model on the edge equipment, real-time detection of the 10kV distribution network hot-line work safety protection appliance is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of insulation equipment edge detection, and in particular to a method for edge detection of safety protection equipment for live working in a 10kV distribution network. Background Art

[0002] The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.

[0003] According to publicly published papers at home and abroad, authorized related patent information and target detection models, and relevant literature on 10kV safety protection devices, the current 10kV distribution network live working scenarios are mainly aimed at equipment (equipment) research and development, and there is no public literature on real-time detection of protective equipment for workers in working scenarios. Summary of the invention

[0004] The purpose of the present invention is to provide a method for detecting the edge of safety protection equipment for live working in a 10kV distribution network in view of the problems existing in the prior art, thereby solving the above problems.

[0005] The technical solution of the present invention is as follows:

[0006] A method for detecting the edge of safety protection equipment for live working in a 10kV distribution network, comprising:

[0007] Step S1: Use the 10kV distribution network live working personal protection data set to perform model training;

[0008] Step S2: convert the trained model into a model suitable for edge devices;

[0009] Step S3: Deploy the converted model on the edge device to realize real-time reasoning of safety protection equipment for live working in 10kV distribution network.

[0010] Furthermore, the step S1 comprises:

[0011] Perform model training on the Huawei Cloud ModelArt platform.

[0012] Furthermore, the step S2 comprises:

[0013] Model conversion is performed using the CANN platform, a heterogeneous computing architecture launched by Huawei for AI scenarios.

[0014] Furthermore, the step S3 comprises:

[0015] Step S31: Initialize device resources to ensure that subsequent edge devices can correctly load the model;

[0016] Step S32: pre-processing the image data sent to the model for inference;

[0017] Step S33: perform model reasoning and generate model reasoning results;

[0018] Step S34: post-processing the model inference results;

[0019] Step S35: Draw a frame on the image, mark the category and confidence level according to the processed results, save the image, and realize real-time reasoning of the edge device.

[0020] Furthermore, the step S1 specifically includes the following sub-steps:

[0021] Step S11: Select the image and specification on the Huawei Cloud ModelArt platform;

[0022] Step S12: Import the 10kV distribution network live working personal protection data set and model source code into the Huawei Cloud ModelArt platform;

[0023] Step S13: configure parameters;

[0024] Step S14: Start model training and obtain a model in .pt format;

[0025] Step S15: In the training environment, the .pt format needs to be converted to the .onnx format to prepare for subsequent edge device deployment.

[0026] Furthermore, the edge device is an edge platform Atlas 200IDK A2 (4G, 8T) developer kit based on Huawei's Ascend inference chip Ascend310 chip.

[0027] Furthermore, the model conversion includes:

[0028] Use the model conversion tool ATC in the heterogeneous computing architecture CANN platform to convert the .onnx format model into the .om format.

[0029] Furthermore, the model is a YOLOv5s model, and its structure is divided into Backbone, Neck and head parts; the Backbone part completes feature extraction through a series of convolutions; the Neck part performs a feature fusion process; the Head part has three detection heads that can respectively complete the detection of small, medium and large-scale targets, and the output results include classification information, judgment of background and foreground, and coordinate information.

[0030] Furthermore, the CIoU loss function is used for model training; the overall model loss Loss is composed of the classification loss L class , positioning loss L loc and confidence loss L confThese three parts are weighted summed and the calculation formula is as follows:

[0031] Loss = λ1L class +λ2L loc +λ3L conf

[0032] Where: λ1, λ2 and λ3 are balance coefficients.

[0033] Furthermore, the classification loss L class The calculation formula is as follows:

[0034]

[0035] K ij =Sigmoid(Ci j )

[0036] Where: O ij ∈{0, 1}, indicating whether there is a j-th type of target in the i-th predicted target box; C ij is the predicted value, K ij C ij The target probability obtained by the Sigmoid function; N pos is the number of positive samples;

[0037] The positioning loss L loc The calculation formula is as follows:

[0038] L loc =1-CIoU

[0039]

[0040] Where: IoU represents the intersection-over-union ratio between the predicted box and the real box; p 2 (b,b g t) represents the Euclidean distance between the center coordinates of the predicted box and the real box; c represents the diagonal distance of the minimum closure area that can contain both the predicted box and the real box; α is the weight parameter; v is the parameter for measuring the consistency of the aspect ratio; w gt 、h gt Represent the width and height of the real box respectively; w and h represent the width and height of the predicted box respectively;

[0041] The confidence loss L conf The calculation formula is as follows:

[0042]

[0043] k i =Sigmoid(c i )

[0044] Where: Oi ∈[0,1], represents the intersection-over-union ratio between the predicted target box and the real box; C i is the predicted result value, K i C i The prediction confidence obtained by the Sigmoid function; N is the total number of samples.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] A method for edge detection of safety protection equipment for live working in 10kV distribution network is proposed. By deploying a model on an edge device, real-time detection of safety protection equipment for live working in 10kV distribution network is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of an edge detection method for safety protection equipment for live working in a 10kV distribution network;

[0048] Figure 2 This is the YOLOv5 model structure diagram;

[0049] Figure 3 ModelArt-model training flow chart;

[0050] Figure 4 Adaptation flow chart for CANN-model;

[0051] Figure 5 Provide a roadmap for model transformation;

[0052] Figure 6 This is the overall flow chart of edge detection;

[0053] Figure 7 This is the data pre-processing flow chart;

[0054] Figure 8 This is the flowchart of post-processing of inference results. DETAILED DESCRIPTION

[0055] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0056] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.

[0057] Embodiment 1

[0058] See also Figure 1 , a 10kV distribution network live working safety protection equipment (insulating helmet, insulating shawl, insulating gloves) edge detection method specifically includes the following steps:

[0059] Step S1: Use the 10kV distribution network live working personal protection data set (insulating helmet, insulating shawl, insulating gloves) to train the model;

[0060] Step S2: convert the trained model into a model suitable for edge devices;

[0061] Step S3: Deploy the converted model on the edge device to realize real-time reasoning of safety protection equipment for live working in 10kV distribution network.

[0062] In this implementation, specifically, the edge device is an edge platform Atlas 200IDK A2 (4G, 8T) developer kit based on Huawei Ascend inference chip Ascend310 chip;

[0063] The model is the YOLOv5s model. As the classic version of the YOLO series, YOLOv5 is a single-stage target detection algorithm that achieves target positioning and classification by directly regressing the relative position of the candidate box, and using the anchor box to accurately predict the position and size of the bounding box. The model has been deeply optimized in data preprocessing, feature extraction, and feature fusion, which significantly improves the detection accuracy. Therefore, it has been selected by many scholars as the preferred model for target detection. The model is designed to provide a balanced solution between speed and accuracy;

[0064] Its structure is as Figure 2As shown in the figure, it is divided into Backbone, Neck and Head parts; the Backbone part completes feature extraction through a series of convolutions; the Neck part performs feature fusion process, using the "FPN (Feature Pyramid Networks) + PAN (Path Aggregation Network)" method; the Head part has three detection heads that can respectively complete the detection of small, medium and large-scale targets, and the output results include classification information, judgment of background and foreground, and coordinate information.

[0065] In this embodiment, specifically, Figure 3 As shown, the step S1 includes:

[0066] Perform model training on the Huawei Cloud ModelArt platform.

[0067] In this embodiment, specifically, step S1 includes the following sub-steps:

[0068] Step S11: On the Huawei Cloud ModelArt platform, select the image and specification, as shown in Table 1;

[0069] Table 1 Resource selection

[0070]

[0071] Step S12: Import the 10kV distribution network live working personal protection data set and model source code into the Huawei Cloud ModelArt platform;

[0072] Step S13: configure parameters;

[0073] That is, after entering the cloud environment, import the dataset and YOLOv5s source code for model training, with a training batch size of 64 and a training round size of 400. Keep the rest of the parameters as default.

[0074] At the same time, the CIoU loss function is used for model training; the loss function is used to calculate the difference between the model prediction value and the true value. The model in this embodiment uses the CIoU loss function to measure the rectangular box loss, and the overall model loss Loss is composed of the classification loss L class , positioning loss L loc and confidence loss L conf These three parts are weighted summed and the calculation formula is as follows:

[0075] Loss = λ1L class +λ2L loc +λ3L conf

[0076] Where: λ1, λ2 and λ3 are balance coefficients;

[0077] The classification loss L class The calculation formula is as follows:

[0078]

[0079] K ij =Sigmoid(C ij )

[0080] Where: O ij ∈{0, 1}, indicating whether there is a j-th type of target in the i-th predicted target box; C ij is the predicted value, K ij C ij The target probability obtained by the Sigmoid function; N pos is the number of positive samples;

[0081] The positioning loss L loc The calculation formula is as follows:

[0082] L loc =1-CIoU

[0083]

[0084] Where: IoU represents the intersection-over-union ratio between the predicted box and the real box; p 2 (b,b g t) represents the Euclidean distance between the center coordinates of the predicted box and the real box; c represents the diagonal distance of the minimum closure area that can contain both the predicted box and the real box; α is the weight parameter; v is the parameter for measuring the consistency of the aspect ratio; w gt 、h gt Represent the width and height of the real box respectively; w and h represent the width and height of the predicted box respectively;

[0085] The confidence loss L conf The calculation formula is as follows:

[0086]

[0087] k i =Sigmoid(c i )

[0088] Where: O i ∈[0,1], represents the intersection-over-union ratio between the predicted target box and the real box; C i is the predicted result value, K i C i The prediction confidence obtained by the Sigmoid function; N is the total number of samples;

[0089] Step S14: Start model training and obtain a model in .pt format; that is, after the training, the YOLOv5s model mAP0.5 reaches 0.887, and the model memory size is 13.7MB. The performance results of the model on the validation set are shown in Table 2;

[0090] Table 2 Model validation results

[0091]

[0092] Step S15: In the training environment, the .pt format needs to be converted to the .onnx format to prepare for the subsequent edge device deployment; that is, the model format after model training is in the .pt format. In the training environment, the .pt format needs to be converted to the .onnx format to prepare for the subsequent edge device deployment. The running command is: python export.py --weights [model path] --simplify.

[0093] In this embodiment, please refer to Figure 4 , the step S2 comprises:

[0094] Use the CANN (Compute Architecture for Neural Networks) platform, a heterogeneous computing architecture launched by Huawei for AI scenarios, to convert the model. That is, use the ATC model conversion tool in the CANN platform to convert the .onnx format model to the .om format.

[0095] It should be noted that when the AI ​​model in .onnx format trained by the Pytorch AI framework is deployed on the Huawei Ascend310 inference chip, it needs to be converted to .onnx → .om format by the model conversion tool ATC in the CANN platform;

[0096] CANN (Compute Architecture for Neural Networks) is a heterogeneous computing architecture launched by Huawei for AI scenarios. It supports multiple AI frameworks and serves AI processors and programming. It plays a key role in connecting the upper and lower levels and is a key platform for improving the computing efficiency of Ascend AI processors. At the same time, it provides efficient and easy-to-use programming interfaces for diverse application scenarios, supporting users to quickly build AI applications and services based on the Ascend platform.

[0097] Ascend Tensor Compiler (ATC) is a model conversion tool for the heterogeneous computing architecture CANN system. It can convert the network model of the open source framework and the single operator description file (json format) defined by Ascend IR into an offline model in the .om format supported by the Ascend AI processor. During the model conversion process, ATC will perform specific operations such as operator scheduling optimization, weight data rearrangement, and memory usage optimization to further tune the original deep learning model to meet the high performance requirements in the deployment scenario, so that it can be efficiently executed on the Ascend AI processor.

[0098] In this example, see Figure 5 , the model conversion route of the present invention is: ONNX→ONNX Parser→Unified Intermediate Graph IR Graph→Graph Optmizer→Offline Model (.om)→Execute Reasoning;

[0099] The command to perform model conversion is:

[0100] atc --output=. / YOLOv5s --soc_version=Ascend310B4 --framework=5 --model=. / YOLOv5s.onnx to get the YOLOv5s.om model.

[0101] In this embodiment, please refer to Figure 6 , the step S3 comprises:

[0102] Step S31: Initialize device resources to ensure that subsequent edge devices can correctly load the model; the resources required by the edge devices are shown in Table 3;

[0103] Table 3 Resources required at the edge

[0104]

[0105] Step S32: The image data to be fed into the model inference is pre-processed (the model inference requires the image size to be 640*640 and the data format to be NCHW), such as Figure 7 As shown;

[0106] Step S33: perform model reasoning and generate model reasoning results;

[0107] Step S34: Post-process the model inference results (remove redundant frames), such as Figure 8 As shown;

[0108] Step S35: Draw a frame on the image, mark the category and confidence level according to the processed results, save the image, and realize real-time reasoning of the edge device.

[0109] After the trained model is deployed on the edge device, its mAP@0.5 will decrease and the model memory size will increase due to model conversion, but it is still within a controllable range. The detection performance mAP@0.5 of key targets (insulating helmets, insulating capes, and insulating gloves) reaches 0.876, and the detection speed reaches about 18ms, which can achieve real-time detection.

[0110] Table 4 Edge side experimental results

[0111]

[0112] The above-mentioned embodiments only express the specific implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the protection scope of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the technical solution concept of the present application, and these all belong to the protection scope of the present application.

[0113] This background section is provided to generally present the context of the invention, and the work of the presently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither explicitly nor implicitly admitted to be prior art to the present invention.

Claims

1. A method for detecting the edge of safety protection equipment for live working in a 10kV distribution network, characterized in that: include: Step S1: Use the 10kV distribution network live working personal protection data set to perform model training; Step S2: convert the trained model into a model suitable for edge devices; Step S3: Deploy the converted model on the edge device to realize real-time reasoning of safety protection equipment for live working in 10kV distribution network.

2. The method for edge detection of safety protection equipment for live working in a 10kV distribution network according to claim 1 is characterized in that: The step S1 comprises: Perform model training on the Huawei Cloud ModelArt platform.

3. A 10kV distribution network live working safety protection equipment edge detection method according to claim 2, characterized in that: The step S2 comprises: Model conversion is performed using the CANN platform, a heterogeneous computing architecture launched by Huawei for AI scenarios.

4. A 10kV distribution network live working safety protection equipment edge detection method according to claim 3, characterized in that: The step S3 comprises: Step S31: Initialize device resources to ensure that subsequent edge devices can correctly load the model; Step S32: pre-processing the image data sent to the model for inference; Step S33: perform model reasoning and generate model reasoning results; Step S34: post-processing the model inference results; Step S35: Draw a frame on the image, mark the category and confidence level according to the processed results, save the image, and realize real-time reasoning of the edge device.

5. A 10kV distribution network live working safety protection equipment edge detection method according to claim 4, characterized in that: The step S1 specifically includes the following sub-steps: Step S11: Select the image and specification on the Huawei Cloud ModelArt platform; Step S12: Import the 10kV distribution network live working personal protection data set and model source code into the Huawei Cloud ModelArt platform; Step S13: configure parameters; Step S14: Start model training and obtain a model in .pt format; Step S15: In the training environment, the .pt format needs to be converted to the .onnx format to prepare for subsequent edge device deployment.

6. A 10kV distribution network live working safety protection equipment edge detection method according to claim 5, characterized in that: The edge device is the edge platform Atlas 200I DKA2 (4G, 8T) developer kit based on Huawei's Ascend inference chip Ascend310 chip.

7. A 10kV distribution network live working safety protection equipment edge detection method according to claim 6, characterized in that: The model transformation includes: Use the model conversion tool ATC in the heterogeneous computing architecture CANN platform to convert the .onnx format model into the .om format.

8. The method for edge detection of safety protection equipment for live working in a 10kV distribution network according to claim 7, characterized in that: The model is a YOLOv5s model, and its structure is divided into Backbone, Neck and Head parts; the Backbone part completes feature extraction through a series of convolutions; the Neck part performs feature fusion process; The head part has three detection heads that can respectively complete the detection of small, medium and large-scale targets. The output results include classification information, judgment of background and foreground, and coordinate information.

9. A method for detecting the edge of safety protection equipment for live working in a 10kV distribution network according to claim 8, characterized in that: The CIoU loss function is used for model training; the overall model loss Loss is composed of the classification loss L class , positioning loss L loc and confidence loss L conf These three parts are weighted summed and the calculation formula is as follows: Loss=λ1L class +λ2L loc +λ3L conf Where: λ1, λ2 and λ3 are balance coefficients.

10. A method for detecting the edge of safety protection equipment for live working in a 10kV distribution network according to claim 9, characterized in that: The classification loss L class The calculation formula is as follows6 K ij =Sigmoid(C ij ) Where: O ij ∈{0, 1}, indicating whether there is a j-th type of target in the i-th predicted target box; C ij is the predicted value, K ij C ij The target probability obtained by the Sigmoid function; N pos is the number of positive samples; The positioning loss L loc The calculation formula is as follows: L loc =1-CIoU Where: 10U represents the intersection-over-union ratio of the predicted box and the true box; p 2 (b,b gt ) represents the Euclidean distance between the center coordinates of the predicted box and the real box; c represents the diagonal distance of the minimum closure area that can contain both the predicted box and the real box; α is the weight parameter; v is the parameter for measuring the consistency of the aspect ratio; w gt 、h gt Represent the width and height of the real box respectively; w and h represent the width and height of the predicted box respectively; The confidence loss L conf The calculation formula is as follows: k i =Sigmoid(c i ) Where: O i ∈[0, 1], represents the intersection-over-combination ratio between the predicted target box and the real box; C i is the predicted result value, K i C i The prediction confidence obtained by the Sigmoid function; N is the total number of samples.