Power transmission channel hidden danger detection method and device, electronic equipment and storage medium
By building an improved hidden danger detection model, and using convolution parameters and image feature parameters to automatically detect the transmission channel, the problems of low manual inspection efficiency and low accuracy are solved, the efficiency and accuracy of grid hidden danger detection are improved, and the efficiency and accuracy of grid hidden danger detection are enhanced. Safety of the power grid.
Patent Information
- Application Number
- CN202411108717.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, the detection of hidden dangers in the power grid depends on manual inspection, which has problems such as high work intensity, low efficiency and low accuracy, making it difficult to quickly locate and promptly inspect the hidden dangers in the power grid.
By preprocessing the sample images of the transmission channel, a hidden danger detection model is built, including an improved target backbone network and a target head network, and using convolution parameters and image feature parameters to improve, the hidden danger detection model is trained to automatically detect whether there is an image in the presence of a picture. Hidden danger.
It improves the efficiency and accuracy of hidden danger detection, enhances the safety and reliability of power grid transmission, and reduces the cost and false detection rate of manual inspection.
Smart Images

Figure CN119067637A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for detecting hidden dangers in a power transmission channel. Background Art
[0002] With the increasing demand for electricity in modern society and the increasing scale and complexity of power grids, the safety of transmission channels, as an important part of the power grid system, affects the stable operation of the entire distribution system. Therefore, hidden danger detection of each transmission channel in the distribution system is an effective way to prevent transmission failures in the distribution system caused by hidden dangers.
[0003] Most of the existing methods for detecting hidden dangers in power grids rely on manual inspections. When the staff determines that there are hidden dangers at the current distribution location based on subjective experience during the inspection, they will promptly inspect and repair the hidden dangers. Although manual inspections can reduce the incidence of hidden dangers to a certain extent, manual inspections have problems such as high workload, low efficiency, and low detection accuracy due to missed detections and false detections. Therefore, how to quickly identify the hidden dangers that may exist in the distribution system so as to conduct timely inspections is a key issue that needs to be solved urgently. Summary of the invention
[0004] The present application provides a method, device, electronic device and storage medium for detecting hidden dangers in a power transmission channel, which can quickly locate hidden dangers that may exist in a power grid system and improve the efficiency and accuracy of hidden danger detection.
[0005] In a first aspect, the present application provides a method for detecting hidden dangers in a power transmission channel, comprising:
[0006] Preprocess the sample images of the power transmission channel to obtain a target data set; train the model to be trained according to the target data set to obtain a hidden danger detection model, the model to be trained includes a target backbone network and a target head network, the target backbone network is obtained by improving the convolution parameters, and the target head network is obtained by improving the image feature parameters; input the image to be tested into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel.
[0007] Optionally, the preprocessing of the sample images of the transmission channel to obtain the target data set includes: acquiring a historical video stream at the distribution network site, determining images containing distribution hazards in the historical video stream as sample images of the transmission channel, the sample images including N pieces; marking hazard information in the N sample images, the hazard information including hazard type and hazard location; and determining the sample images marked with the hazard type and the hazard location as the target data set.
[0008] Optionally, the training of the model to be trained according to the target data set to obtain the hidden danger detection model includes: constructing a hidden danger loss function, wherein the hidden danger loss function is obtained by a hidden danger anchor box loss sub-function and a hidden danger anchor box loss coefficient; training the model to be trained according to the target data set, and obtaining the hidden danger detection model when the output value of the hidden danger loss function converges.
[0009] Optionally, the hidden danger anchor box loss sub-function is obtained in the following manner: obtaining the predicted center coordinates of the prediction box in the predicted hidden danger, and obtaining the target center coordinates of the target box in the target hidden danger; obtaining size information of a preset box formed by the prediction box and the target box, the size information including a preset box length and a preset box height; constructing the hidden danger anchor box loss sub-function according to the predicted center coordinates, the target center coordinates, the preset box length and the preset box height.
[0010] Optionally, the image feature parameters include at least image level parameters, image size parameters and image channel parameters; improving the image feature parameters to obtain a target head network includes: acquiring image perception parameters, the image perception parameters include at least scale perception parameters, space perception parameters and task perception parameters; based on the scale perception parameters, the space perception parameters and the task perception parameters, improving the image level parameters, the image size parameters and the image channel parameters to obtain the target head network.
[0011] Optionally, the step of inputting the image to be tested into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel includes: when the hidden danger detection result is that a power distribution hidden danger is included, outputting the hidden danger position and hidden danger type of the power distribution hidden danger in the image to be tested; when the hidden danger detection result is that no power distribution hidden danger is included, obtaining the next frame of image, taking the next frame of image as the image to be tested, and executing the operation of inputting the image to be tested into the hidden danger detection model.
[0012] In a second aspect, the present application provides a hidden danger detection device for a power transmission channel, the device comprising:
[0013] A data processing module, used for preprocessing sample images of the power transmission channel to obtain a target data set;
[0014] A model training module, used to train a to-be-trained model according to the target data set to obtain a hidden danger detection model, wherein the to-be-trained model includes a target backbone network and a target head network, wherein the target backbone network is obtained by improving convolution parameters, and the target head network is obtained by improving image feature parameters;
[0015] The hidden danger detection module is used to input the image to be tested into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel.
[0016] In a third aspect, the present application further provides an electronic device, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the hidden danger detection method for the power transmission channel described in any embodiment of the present application.
[0020] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hidden danger detection method for a power transmission channel described in any embodiment of the present application when executed.
[0021] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the hidden danger detection method for a power transmission channel described in any embodiment of the present application.
[0022] The hidden danger detection scheme for the power transmission channel provided in the embodiment of the present application first pre-processes the sample image of the power transmission channel to obtain the target data set; then trains the model to be trained according to the target data set to obtain the hidden danger detection model, the model to be trained includes a target backbone network and a target head network, the target backbone network is obtained by improving the convolution parameters, and the target head network is obtained by improving the image feature parameters; finally, the image to be tested is input into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel. This scheme constructs a hidden danger detection model for the hidden dangers of the power transmission channel, so that the hidden danger detection model can automatically detect whether the image to be tested contains hidden dangers, thereby improving the hidden danger detection efficiency; at the same time, the hidden danger detection model in this scheme is obtained by improving the convolution parameters in the target backbone network in the training model and the image feature parameters in the target head network, which can improve the accuracy of hidden dangers and improve the safety and reliability of power grid transmission.
[0023] It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the hidden danger detection device of the power transmission channel, or may be packaged separately from the processor of the hidden danger detection device of the power transmission channel, and this application does not limit this.
[0024] The description of the second, third and fourth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third and fourth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.
[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description.
[0026] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, and usage scenarios of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 It is a flow chart of a hidden danger detection method for a power transmission channel provided in an embodiment of the present application;
[0029] Figure 2 It is a structural schematic diagram of a hidden danger detection device for a power transmission channel provided in an embodiment of the present application;
[0030] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the present application will be clearly and completely described below in conjunction with the drawings in the present embodiment. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0034] Figure 1 A flow chart of a hidden danger detection method for a power transmission channel provided in an embodiment of the present application, which can be applied to the situation of quickly troubleshooting safety hidden dangers at a distribution network site, and the method can be executed by a hidden danger device for a power transmission channel, which can be implemented in the form of hardware and / or software and integrated in an electronic device that executes the method. Preferably, the electronic device in the embodiment of the present application can be a server, or a computer device, etc.
[0035] refer to Figure 1 The hidden danger method of the power transmission channel of this embodiment includes but is not limited to the following steps:
[0036] S110 , preprocessing sample images of the power transmission channel to obtain a target data set.
[0037] The sample images of the transmission channel can be obtained by analyzing the monitoring video of the distribution network site. The monitoring video of the distribution network site can be obtained by a drone or a monitoring camera deployed at the distribution network site. The purpose of this embodiment is to train a hidden danger detection model based on the sample images corresponding to all the transmission channels in the distribution system, so that in actual application, according to the image transmitted by the visual device configured at the transmission channel, it can be determined whether there is a distribution hidden danger at the current transmission channel, so that when it is determined that there is a hidden danger, an early warning is issued, so that maintenance personnel can perform timely maintenance to avoid transmission failures caused by untreated hidden dangers.
[0038] Therefore, before obtaining the sample image of the power transmission channel, this embodiment needs to summarize the types of common potential hazards in advance, such as the power transmission channel being accidentally touched by illegal construction machinery, the power transmission channel being damaged by falling trees or electric poles due to bad weather, and the power transmission channel being damaged by other obstacles, etc. The specific possible potential hazard types are not limited here. In this embodiment, frame extraction can be performed on the video stream data on site to obtain multiple frame images, so that the frame images containing the above-listed hazards can be used as sample images.
[0039] In this embodiment, images with power distribution hazards in power transmission channels within a historical period are determined as sample images.
[0040] Specifically, the above step S110 can be implemented by the following steps:
[0041] a) Obtain the historical video stream of the distribution network site, and determine the images containing distribution hidden dangers in the historical video stream as sample images of the transmission channel.
[0042] The historical video stream is data collected on the distribution network site during the historical time period. The current historical video stream can be data within one month, three months, or six months. The selection of a specific historical time period is not limited here, as long as enough sample images can be collected from the historical video stream.
[0043] A 1-second video stream may contain 25 frames of images. Therefore, a large number of frame images contained in the historical video stream need to be screened and processed, so that images containing power distribution hazards can be determined as sample images of the power transmission channel.
[0044] The sample images in this embodiment are used to train the model. Therefore, in order to improve the model training accuracy, the sample images in this embodiment include N, and the power distribution hidden dangers contained in the N sample images can be hidden dangers of different geographical locations, different natural environments and different types. For example, they can be various types of hidden dangers that can be generated under natural conditions such as urban environments, rural environments, tunnel environments, forest environments and hillside environments, so as to improve the model's ability to identify hidden dangers in complex environments.
[0045] b) Marking the hidden danger information in the N sample images, where the hidden danger information includes the hidden danger type and the hidden danger location.
[0046] In the current step, the purpose of marking the hidden danger information in the sample image is to enable the model to extract features of the hidden danger contour in the marked sample image, so that the model can perform corresponding learning based on the identified current hidden danger contour features and the marked hidden danger type and hidden danger location, for subsequent output of the hidden danger detection results of the transmission channel.
[0047] c) Determine the sample images with the hidden danger types and hidden danger locations marked as the target data set.
[0048] The labeled sample images contained in the target data set are used for training, testing, and verification of the training model. Optionally, the labeled sample images contained in the target data set can be set as 70% of the total number of images as a training set, 10% as a verification set, and 20% as a test set, etc., to train and test the model.
[0049] S120. Train the model to be trained according to the target data set to obtain a hidden danger detection model.
[0050] In this embodiment, the model to be trained can be implemented by the YOLOv8 model. The purpose of selecting the YOLOv8 model is that the detection principle of the YOLOv8 model includes two parts: feature extraction and target detection. Therefore, compared with the traditional target detection model, the YOLOv8 model has a higher focus on detecting targets in the image, thereby improving the detection accuracy and detection speed.
[0051] Furthermore, in order to enable more accurate and rapid identification of hidden dangers in transmission channels in the field of distribution networks, and to improve the accuracy of identifying hidden danger targets outside transmission line channels of small distribution networks under complex background environments, the hidden danger detection model provided in this embodiment needs to improve the relevant parameters in the training model before training, so that the hidden danger detection model obtained by training in this embodiment is more suitable for the application scenario provided in this embodiment.
[0052] Specifically, the model to be trained provided in this embodiment includes a target backbone network and a target head network, wherein the target backbone network is obtained by improving convolution parameters, and the target head network is obtained by improving image feature parameters. The target head network is spliced after the target backbone network.
[0053] The target backbone network in this embodiment is obtained by improving the convolution parameters in the initial model; the target head network is obtained by improving the image feature parameters in the initial model. The current initial model is a YOLOv8 model. The target backbone network can effectively reduce the number of parameters and calculations of the model, while improving the efficiency and accuracy of feature extraction; the target head network can be used to improve the efficiency of identifying hidden dangers, etc.
[0054] Since there are often high-rise buildings, trees, hillsides, etc. in the transmission line channel, these complex scenes bring great interference to the hidden danger detection. The detection effect of target occlusion and multi-scale external force damage hidden danger targets is not very ideal. In order to enhance the model's ability to extract key features of construction machinery, this embodiment improves the convolution parameters to obtain the target backbone network as follows: First, perform a 1×(2d-1) convolution operation on the input feature map F, and then perform a (2d-1)×1 convolution operation on the result to obtain the output of the deep convolution Next, the output of the depthwise convolution conduct The convolution operation is performed to obtain the convolution result, and then the convolution result is further The convolution operation gets Z C (Z C It is done by combining the convolution kernel of size k×d with the input feature map F C After convolution, the output of the depthwise convolution is obtained).
[0055] Specifically, the above description can be expressed by the following formula:
[0056]
[0057]
[0058] A C =W 1×1 *Z C (3)
[0059]
[0060] Among them, in the above, given an input feature map Where C is the number of input channels, H and W represent the height and width of the feature map respectively; represents a weight matrix of shape 1×(2d-1); Represents a weight matrix of shape (2d-1)×1; Represents the shape The weight matrix of Represents the shape The weight matrix W 1×1 Represents a weight matrix with a shape of 1×1. 1×1 and Z C Perform a 1×1 convolution operation to obtain the attention map A C Finally, for the attention map A C And the input feature map F C Performing element-wise multiplication, we get is the output of the target backbone network.
[0061] In this embodiment, by improving the convolution parameters in the target backbone network, the results after splicing through three pooling layers are input into the convolution module, and by using pooling kernels of different sizes to capture the multi-scale information of the input image and reduce the number of channels, it helps to improve the perception and feature expression capabilities of the model.
[0062] Another preferred implementation is to integrate a head detection module in the detection stage of the YOLOv8 model. This design addresses the problem that the traditional detection head ignores context information and multi-scale features when making independent predictions, thereby focusing on key hidden danger target information on complex background images. Based on this, the solution provided in this embodiment improves the image feature parameters to obtain the target head network, which can be implemented in the following way:
[0063] Image perception parameters are obtained, and the image perception parameters include at least scale perception parameters, space perception parameters, and task perception parameters; based on the scale perception parameters, space perception parameters, and task perception parameters, image level parameters, image size parameters, and image channel parameters are improved to obtain a target head network.
[0064] Given a three-dimensional feature tensor F∈R at the detection layer L×S×C ,The attention calculation formula is as follows:
[0065] W(F)=π C (π S (π L (F)·F)·F)·F (5)
[0066] Among them, the above F represents an input three-dimensional tensor L×S×C, where L represents the image level parameter of the feature map, S represents the image size parameter of the feature map (the current size parameter can be height and width), C represents the image channel parameter of the feature map, and π L (·) represents the scale-aware parameter, π S (·) represents the spatial perception parameter π C (·) points represent task perception parameters. Through the improved target head network, the model's detection performance for complex scenes and small targets is improved by integrating the three attention mechanisms of scale, space and task.
[0067] Optionally, the solution provided in this embodiment can also introduce a lightweight Slim-neck feature fusion structure into the target neck network on the basis of the above-mentioned improvements to the target backbone network and the target head network, so as to integrate contextual semantic information and fine-grained features and enhance the detection capability of hidden dangers of external damage to small targets.
[0068] Optionally, since the purpose of this application is to achieve higher accuracy at a faster running speed, the YOLOX-tiny network model can be selected as the model to be trained. Darknet-53 can be used as the initial backbone network of the YOLOX-tiny network model.
[0069] Specifically, in the solution provided in this embodiment, the above step S120 can be implemented in the following manner:
[0070] Construct a hidden danger loss function; train the model to be trained according to the target data set, and obtain a hidden danger detection model when the output value of the hidden danger loss function converges.
[0071] The hidden danger loss function L in this embodiment WIoU It is obtained by the hidden danger anchor box loss sub-function and the hidden danger anchor box loss coefficient, which can be specifically expressed by the following formula:
[0072] L WIoU =R WIoU L IoU (6)
[0073] Among them, R WIoU represents the hidden danger anchor box loss sub-function, L IoU represents the hidden danger anchor frame loss coefficient. IoU =1-IoU; IoU is an indicator to measure the degree of overlap between the predicted bounding box and the true bounding box. In this embodiment, the hidden danger detection model is optimized and trained by the hidden danger loss function to improve the model convergence speed and optimize the bounding box regression accuracy.
[0074] In a preferred embodiment, the hidden danger anchor box loss sub-function in this embodiment can be obtained by the following method:
[0075] Obtain the predicted center coordinates of the predicted box in the predicted hidden danger, and obtain the target center coordinates of the target box in the target hidden danger; obtain the size information of the preset box formed by the predicted box and the target box, the size information includes the preset box length and the preset box height; construct the hidden danger anchor box loss subfunction according to the predicted center coordinates, the target center coordinates, the preset box length and the preset box height.
[0076] Specifically, the hidden danger anchor box loss sub-function can be expressed by the following formula:
[0077]
[0078] Among them, the above (x, y) represents the prediction center coordinates of the prediction box, (x gt ,y gt ) represents the target center coordinates of the target frame; W g and H gRepresents the height and width of the preset box formed by the prediction box and the target box respectively; * indicates that W of the preset box g and H g Separate from gradient calculation to reduce adverse effects on model training
[0079] In this embodiment, by balancing the penalty between low-quality anchor frames and high-quality anchor frames, a dynamic non-monotonic focus mechanism is used to mask the impact of low-quality examples, effectively balancing the processing of anchor frames of different qualities. This improvement allows the model to focus more on improving the prediction accuracy of medium-quality anchor frames during training, reducing the interference of low-quality examples, and thus improving the detection performance of the model as a whole.
[0080] Furthermore, when the output value of the calculated hidden danger loss function converges, it indicates that the hidden danger detection model training is completed.
[0081] Optionally, this embodiment can also verify the performance advantages of the hidden danger detection model by designing ablation experiments. Specifically, a simulation experiment can be conducted on a distribution network transmission line channel external damage dataset based on the hidden danger detection model, and a series of ablation experiments can be carried out. By gradually introducing each key improvement strategy and evaluating their impact on the model performance, the improved model is finally verified to have significant performance advantages in the distribution network transmission channel anti-external damage detection task.
[0082] S130: Input the image to be tested into a hidden danger detection model to obtain hidden danger detection results of the power transmission channel.
[0083] After the hidden danger detection model is obtained through training based on the above step S120, the hidden danger detection model is applied in the current step. The specific application method is that the real-time video stream data sent from the distribution network site can be processed to obtain real-time frame images, so that each real-time frame image is input into the hidden danger detection model in turn as an image to be tested based on a time sequence, so as to detect whether each real-time frame image contains hidden dangers about the transmission channel, and obtain hidden danger detection results, so as to improve the efficiency of hidden danger detection in the transmission channel and reduce the cost of manual detection.
[0084] Specifically, the hidden danger detection result of the image to be tested includes the inclusion of power distribution hidden dangers or the exclusion of power distribution hidden dangers. Then, when the hidden danger detection model determines that the current image to be tested contains power distribution hidden dangers, the hidden danger location and hidden danger type of the power distribution hidden danger in the image to be tested can be further output, so that early warning information can be generated according to the hidden danger location and hidden danger type, and the early warning information can be sent to the corresponding management personnel.
[0085] Specifically, the hidden danger location can be located in the geographical area where the hidden danger occurs, as well as the point position of the transmission channel, so that the early warning information can be sent to the management personnel in the corresponding jurisdiction according to the geographical area location. The management personnel can quickly locate the hidden danger according to the point position of the transmission channel; the management personnel can also determine the maintenance tools required for maintenance according to the type of hidden danger, so as to achieve the purpose of rapid maintenance.
[0086] When the current image to be tested does not contain any power distribution hidden dangers, it indicates that the power transmission channel in the current image is complete and safe power transmission can be carried out. Then, the next frame image in the real-time video stream is obtained, and the next frame image is used as the image to be tested to perform the operation of inputting the image to be tested into the hidden danger detection model provided in this embodiment.
[0087] The hidden danger detection method for the power transmission channel provided in this embodiment first pre-processes the sample image of the power transmission channel to obtain the target data set; then trains the training model according to the target data set to obtain the hidden danger detection model, the training model includes the target backbone network and the target head network, the target backbone network is obtained by improving the convolution parameters, and the target head network is obtained by improving the image feature parameters; finally, the image to be tested is input into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel. This scheme constructs a hidden danger detection model for the hidden dangers of the power transmission channel, so that the hidden danger detection model can automatically detect whether the image to be tested contains hidden dangers, thereby improving the hidden danger detection efficiency; at the same time, the hidden danger detection model in this scheme is obtained by improving the convolution parameters in the target backbone network in the training model and the image feature parameters in the target head network, which can improve the accuracy of hidden dangers and improve the safety and reliability of power transmission.
[0088] Figure 2 1 is a schematic diagram of a structure of a hidden danger detection device for a power transmission channel provided in an embodiment of the present application. The device is suitable for executing a hidden danger detection method for a power transmission channel provided in an embodiment of the present application. Figure 2 As shown, the device may specifically include: a data processing module 210, a model training module 220 and a hidden danger detection module 230, wherein:
[0089] A data processing module 210 is used to pre-process the sample images of the power transmission channel to obtain a target data set;
[0090] A model training module 220 is used to train a to-be-trained model according to the target data set to obtain a hidden danger detection model, wherein the to-be-trained model includes a target backbone network and a target head network, wherein the target backbone network is obtained by improving convolution parameters, and the target head network is obtained by improving image feature parameters;
[0091] The hidden danger detection module 230 is used to input the image to be detected into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel.
[0092] The hidden danger detection device for the power transmission channel provided in this embodiment first pre-processes the sample image of the power transmission channel to obtain the target data set; then trains the training model according to the target data set to obtain the hidden danger detection model, the training model includes the target backbone network and the target head network, the target backbone network is obtained by improving the convolution parameters, and the target head network is obtained by improving the image feature parameters; finally, the image to be tested is input into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel. This scheme constructs a hidden danger detection model for the hidden dangers of the power transmission channel, so that the hidden danger detection model can automatically detect whether the image to be tested contains hidden dangers, thereby improving the hidden danger detection efficiency; at the same time, the hidden danger detection model in this scheme is obtained by improving the convolution parameters in the target backbone network in the training model and the image feature parameters in the target head network, which can improve the accuracy of hidden dangers and improve the safety and reliability of power transmission.
[0093] In one embodiment, the data processing module 210 includes an image determination unit, a hidden danger marking unit, and a data set determination unit, wherein:
[0094] An image determination unit, configured to obtain a historical video stream at a power distribution network site, and determine an image containing a power distribution hazard in the historical video stream as a sample image of the power transmission channel, wherein the sample image includes N pieces;
[0095] A hidden danger marking unit, used to mark hidden danger information in the N sample images, wherein the hidden danger information includes hidden danger type and hidden danger location;
[0096] The data set determining unit is used to determine the sample image marked with the hidden danger type and the hidden danger position as the target data set.
[0097] In one embodiment, the model training module 220 includes a function construction unit and a model training unit, wherein:
[0098] A function construction unit, used to construct a hidden danger loss function, wherein the hidden danger loss function is obtained by a hidden danger anchor box loss sub-function and a hidden danger anchor box loss coefficient;
[0099] A model training unit is used to train the model to be trained according to the target data set, and obtain the hidden danger detection model when the output value of the hidden danger loss function converges.
[0100] In one embodiment, the function construction unit is specifically used to obtain the predicted center coordinates of the prediction box in the predicted hidden danger, and to obtain the target center coordinates of the target box in the target hidden danger; to obtain the size information of the preset box formed by the prediction box and the target box, and the size information includes the preset box length and the preset box height; and to construct the hidden danger anchor box loss sub-function according to the predicted center coordinates, the target center coordinates, the preset box length and the preset box height.
[0101] In one embodiment, the image feature parameters include at least image level parameters, image size parameters and image channel parameters, and the device further includes a network improvement module, wherein:
[0102] The network improvement module is used to obtain image perception parameters, which include at least scale perception parameters, space perception parameters and task perception parameters; based on the scale perception parameters, the space perception parameters and the task perception parameters, the image level parameters, the image size parameters and the image channel parameters are improved to obtain the target head network.
[0103] In one embodiment, the hidden danger detection module 230 is specifically used to output the hidden danger location and hidden danger type of the power distribution hidden danger in the image to be tested when the hidden danger detection result shows that the power distribution hidden danger is included; when the hidden danger detection result shows that the power distribution hidden danger is not included, the next frame image is obtained, the next frame image is used as the image to be tested, and the operation of inputting the image to be tested into the hidden danger detection model is performed.
[0104] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0105] An embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the hidden danger detection method for the power transmission channel described in any embodiment of the present application.
[0106] An embodiment of the present application further provides a computer-readable medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hidden danger detection method for a power transmission channel described in any embodiment of the present application when executed.
[0107] Reference below Figure 3 , Figure 3 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and shows a schematic diagram of the structure of a computer system 500 suitable for implementing the electronic device in an embodiment of the present application. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0108] like Figure 3 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0109] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0110] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present application are executed.
[0111] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, etc., or any suitable combination of the above.
[0112] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] The modules and / or units involved in the embodiments described in the present application may be implemented by software or by hardware. The modules and / or units described may also be arranged in a processor, for example, it may be described as: a processor includes a data processing module, a model training module and a hidden danger detection module. The names of these modules do not constitute a limitation on the modules themselves in some cases.
[0114] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: preprocessing sample images of the power transmission channel to obtain a target data set; training a model to be trained according to the target data set to obtain a hidden danger detection model, the model to be trained includes a target backbone network and a target head network, the target backbone network is obtained by improving convolution parameters, and the target head network is obtained by improving image feature parameters; inputting the image to be tested into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel.
[0115] According to the technical solution of this embodiment, by constructing a hidden danger detection model for the hidden dangers of the transmission channel, the hidden danger detection model can automatically detect whether the image to be tested contains hidden dangers, thereby improving the hidden danger detection efficiency; at the same time, the hidden danger detection model in this solution is obtained by improving the convolution parameters in the target backbone network in the training model and the image feature parameters in the target head network, which can improve the accuracy of hidden dangers and improve the safety and reliability of power grid transmission.
[0116] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for detecting hidden dangers in a power transmission channel, characterized in that: include: Preprocessing sample images of the power transmission channel to obtain a target data set; Training a model to be trained according to the target data set to obtain a hidden danger detection model, wherein the model to be trained includes a target backbone network and a target head network, wherein the target backbone network is obtained by improving convolution parameters, and the target head network is obtained by improving image feature parameters; The image to be tested is input into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel.
2. The method for detecting hidden dangers in a power transmission channel according to claim 1, characterized in that: The preprocessing of the sample images of the power transmission channel to obtain the target data set includes: Acquire a historical video stream at a power distribution network site, and determine an image containing a power distribution hidden danger in the historical video stream as a sample image of the power transmission channel, wherein the sample image includes N pieces; Marking hidden danger information in the N sample images, wherein the hidden danger information includes hidden danger type and hidden danger location; The sample images marked with the hidden danger type and the hidden danger position are determined as the target data set.
3. The method for detecting hidden dangers in a power transmission channel according to claim 1, characterized in that: The step of training the model to be trained according to the target data set to obtain a hidden danger detection model includes: Constructing a hidden danger loss function, wherein the hidden danger loss function is obtained by a hidden danger anchor box loss sub-function and a hidden danger anchor box loss coefficient; The model to be trained is trained according to the target data set, and the hidden danger detection model is obtained when the output value of the hidden danger loss function converges.
4. The method for detecting hidden dangers in a power transmission channel according to claim 3, characterized in that: The hidden danger anchor box loss sub-function is obtained in the following way: Obtain the prediction center coordinates of the prediction box in the predicted hidden danger, and obtain the target center coordinates of the target box in the target hidden danger; Acquire size information of a preset frame formed by the prediction frame and the target frame, the size information including a preset frame length and a preset frame height; The hidden danger anchor box loss sub-function is constructed according to the predicted center coordinates, the target center coordinates, the preset box length and the preset box height.
5. The method for detecting hidden dangers in a power transmission channel according to claim 1, characterized in that: The image feature parameters at least include image level parameters, image size parameters and image channel parameters; improving the image feature parameters to obtain a target head network includes: Acquiring image perception parameters, wherein the image perception parameters at least include scale perception parameters, space perception parameters, and task perception parameters; Based on the scale perception parameter, the space perception parameter and the task perception parameter, the image level parameter, the image size parameter and the image channel parameter are improved to obtain the target head network.
6. The method for detecting hidden dangers in a power transmission channel according to claim 1, characterized in that: The step of inputting the image to be tested into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel includes: When the hidden danger detection result shows that the hidden danger includes power distribution hidden danger, the hidden danger position and hidden danger type of the power distribution hidden danger in the image to be detected are output; When the hidden danger detection result shows that there is no power distribution hidden danger, the next frame of image is acquired, and the next frame of image is used as the image to be tested, and the operation of inputting the image to be tested into the hidden danger detection model is performed.
7. A hidden danger detection device for a power transmission channel, characterized in that: include: A data processing module, used for preprocessing sample images of the power transmission channel to obtain a target data set; A model training module, used to train a to-be-trained model according to the target data set to obtain a hidden danger detection model, wherein the to-be-trained model includes a target backbone network and a target head network, wherein the target backbone network is obtained by improving convolution parameters, and the target head network is obtained by improving image feature parameters; The hidden danger detection module is used to input the image to be tested into the hidden danger detection model to obtain the hidden danger detection result of the power transmission channel.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the hidden danger detection method for a power transmission channel according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the hidden danger detection method for a power transmission channel as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for detecting hidden dangers in a power transmission channel according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Power transmission channel hidden danger target detection method and device, electronic equipment and storage medium
CN121190742A
