Lightning detection method and system for power transmission line video

By adopting a two-layer detection method in flash detection, combining threshold segmentation and neural network model, problems such as poor generalization and limited computing power in the existing technology are solved, efficient and accurate flash detection is achieved, and the intelligence level of the power monitoring system is improved.

CN119540133APending Publication Date: 2025-02-28HAINAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411371106.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing image-based flash detection methods have problems in terms of poor generalization, limited computing power of equipment, insufficient scale adaptability and single detection strategy, resulting in high false alarm rate, low detection accuracy and limited real-time performance.

Method used

Using the two-layer detection method, firstly, the candidate group images of suspected flash strikes are obtained through the initial threshold segmentation, and then these images are input into the neural network detection model for the second screening. If the detection result is greater than the first threshold, it is confirmed as flash strikes.

Benefits of technology

It significantly enhances the generalization and accuracy of video flash detection in transmission lines, reduces the computing power requirements of equipment, solves the problem of scale adaptability, realizes efficient and low error detection rate flash detection, and improves the intelligence level and operation efficiency of the power monitoring system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540133A_ABST
    Figure CN119540133A_ABST
Patent Text Reader

Abstract

The invention discloses a lightning detection method and system for a power transmission line video. The method comprises the following steps: acquiring a first video image of a power transmission line; carrying out primary threshold segmentation on the first video image of the power transmission line, and obtaining a current image suspected to strike and images before and after the current image as candidate group images; and inputting the candidate group image into a neural network detection model for second screening, and if the detection result of the current suspected strike candidate group image is greater than a first threshold value, obtaining the strike phenomenon of the power transmission line. Through a double-layer detection method fusing threshold segmentation and a neural network model, generalization and accuracy of power transmission line video strike detection are enhanced, and through optimization of a model architecture and a detection strategy, the device calculation power demand is effectively reduced, the scale adaptability problem is solved, efficient and low-false-detection-rate strike detection is realized, and the power transmission line video strike detection efficiency is improved. And the intelligent level and the operation efficiency of the power monitoring system are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a lightning detection method and system for power transmission line video. Background Art

[0002] With the rapid development of smart grids, the safety monitoring of transmission lines has become a key link in ensuring the stability of power supply. In recent years, image technology has shown great potential in the detection of lightning strikes on transmission lines due to its intuitiveness and information richness. By deploying surveillance cameras around the transmission lines to capture video images in real time, and relying on advanced image processing technology, automatic detection and early warning of lightning strikes are achieved. This technology not only broadens the monitoring scope, but also improves the real-time and accuracy of detection, providing strong support for the safe operation and maintenance of the power system.

[0003] However, current image-based lightning detection methods still face many challenges. First, traditional image processing technology relies on brightness threshold segmentation, which makes it difficult to effectively distinguish lightning from natural scenes such as the sky and clouds, resulting in a high false alarm rate. Secondly, although deep learning models have more powerful feature extraction capabilities, their computational complexity is high and they are difficult to deploy directly on front-end devices, limiting their application in real-time detection. Furthermore, long-distance shooting results in small-scale lightning images, and information is easily lost, affecting detection accuracy. Finally, existing methods are mostly based on single-frame image processing, ignoring the spatiotemporal continuity between video frames, reducing the accuracy and stability of detection. Therefore, there is an urgent need to develop more efficient and robust lightning detection technologies to cope with complex and changing monitoring environments. Summary of the invention

[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0005] In view of the above existing problems, the present invention is proposed. Therefore, the present invention provides a method for lightning detection of transmission line video to solve the problems of poor generalization, limited equipment computing power, insufficient scale adaptability and single detection strategy in lightning detection of transmission line video.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a method for detecting lightning strikes in a power transmission line video, comprising:

[0008] Acquiring a first video image of a power transmission line;

[0009] Performing initial threshold segmentation on the first video image of the power transmission line to obtain a current image suspected of lightning and images before and after it as candidate group images;

[0010] The candidate group images are input into the neural network detection model for a second screening. If the current suspected lightning candidate group image detection result is greater than the first threshold, a transmission line lightning phenomenon is obtained.

[0011] As a preferred solution of the method for lightning detection of power transmission line video of the present invention, the initial threshold segmentation of the continuous frame video image of the power transmission line includes:

[0012] Binarizing each frame of the first video image of the power transmission line to obtain a binary image;

[0013] Fitting the binary image with a rectangle, obtaining the outer contours of all binary images in the image, calculating the area of ​​the outer contours of the rectangles, and recording the coordinate information of all rectangles whose areas are greater than a second threshold;

[0014] A rectangular area is cut out from the binary image according to the rectangular coordinate information, and whether the maximum value of the histogram of the rectangular area is within a third threshold is calculated. If it is within the third threshold, the current image is recorded.

[0015] As a preferred solution of the method for lightning detection of power transmission line video of the present invention, wherein: obtaining the current image suspected of lightning and the images before and after it as the candidate group images includes:

[0016] The images before and after the current image are acquired as a group of candidate group images, the remaining images in the acquired group of candidate group images are segmented by a second threshold value, and the rectangular coordinate information in the image is associated with the frame time node and stored in groups.

[0017] As a preferred embodiment of the method for lightning detection in power transmission line video of the present invention, further screening and detecting the suspected lightning candidate group images using a neural network detection model includes:

[0018] Using a first video image of a historical power transmission line to train the neural network detection model to obtain a first threshold;

[0019] Dynamically inputting a first video image of a real-time power transmission line into a trained neural network detection model for detection to obtain a confidence result;

[0020] Store the confidence results of the same batch into the result list, and record the maximum value and the maximum value index in the result list;

[0021] The maximum value is compared with a first threshold value. If the maximum value is greater than the first threshold value, a transmission line lightning phenomenon is obtained, and the time nodes of the continuous frame videos of the transmission line in the result list are returned according to the maximum value index value.

[0022] As a preferred solution of the method for lightning detection of power transmission line video according to the present invention, it also includes:

[0023] Before inputting the candidate group into the neural network detection model for detection, pre-processing operations are performed on each candidate group image in turn.

[0024] As a preferred solution of the method for lightning detection of power transmission line video according to the present invention, the neural network detection model includes:

[0025] After obtaining the output result of the last fully connected layer of the neural network detection model, the output result is normalized using the softmax function.

[0026] As a preferred solution of the method for lightning detection of power transmission line video according to the present invention, obtaining a first video image of the power transmission line includes:

[0027] After obtaining the first video image of the transmission line, preprocessing is performed on the first video image of the transmission line, wherein the preprocessing includes grayscale processing, mean filter noise reduction and morphological closing operation;

[0028] The denoised image is subjected to a morphological closing operation, wherein the morphological closing operation includes first performing a dilation operation and then performing an erosion operation; wherein the dilation operation is used to expand the foreground object in the first video image of the transmission line, and the erosion operation is used to shrink the foreground object in the first video image of the transmission line.

[0029] In a second aspect, the present invention provides a system for lightning detection of a power transmission line video, comprising:

[0030] A data acquisition module, used to acquire a first video image of the power transmission line;

[0031] A first screening module is used to perform initial threshold segmentation on the first video image of the power transmission line to obtain a current image suspected of lightning and images before and after it as candidate group images;

[0032] The second screening module is used to input the candidate group image into the neural network detection model for a second screening. If the current suspected lightning candidate group image detection result is greater than the first threshold, a transmission line lightning phenomenon is obtained.

[0033] In a third aspect, the present invention provides a computing device, comprising:

[0034] Memory and processor;

[0035] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the lightning detection method for the power transmission line video are implemented.

[0036] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for lightning detection of transmission line video.

[0037] Compared with the prior art, the present invention has the following beneficial effects: the present invention not only significantly enhances the generalization and accuracy of lightning detection in power transmission line videos by integrating a two-layer detection method of threshold segmentation and a neural network model, but also effectively reduces the computing power requirements of the equipment by optimizing the model architecture and detection strategy, solves the scale adaptability problem, and realizes lightning detection with high efficiency and low false positive rate, which greatly improves the intelligence level and operation efficiency of the power monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0039] Figure 1 The present invention is a schematic diagram of the overall process of a method for detecting lightning strikes in a power transmission line video according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0042] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0043] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0044] At the same time, in the description of the present invention, it should be noted that the orientations or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the system or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0045] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0046] Example 1

[0047] Reference Figure 1 , as an embodiment of the present invention, provides a method for lightning detection of a power transmission line video, comprising:

[0048] S100: Acquire a first video image of a power transmission line;

[0049] It should be noted that the first video image of the transmission line is a comprehensive image record that includes the transmission line itself, the surrounding environment, weather conditions, time information, image quality, and possible abnormalities or fault conditions. In practical applications, you can choose between a continuous video stream and a discontinuous collection of small videos based on your needs. In scenarios that require real-time response and quick decision-making, a continuous video stream may be more appropriate. In scenarios where resources are limited or only periodic inspections are required, a discontinuous collection of small videos may be more economical and efficient.

[0050] Preferably, after obtaining the first video image of the transmission line, the first video image of the transmission line is preprocessed, and the preprocessing includes grayscale processing, mean filter noise reduction and morphological closing operation;

[0051] Specifically, the grayscale value is calculated by taking the weighted average of the RGB channels of the image. The conversion formula is:

[0052] Gray=0.299×R+0.587×G+0.114×B

[0053] Among them, R is the red channel value, G is the green channel value, and B is the blue channel value;

[0054] Specifically, a 3x3 median filter is used to perform noise reduction on the grayscale image to reduce the interference of noise points on the subsequent rectangular contour search. The calculation formula of the median filter is:

[0055]

[0056] Among them, x is the horizontal coordinate of the pixel and y is the vertical coordinate of the pixel

[0057] Preferably, a morphological closing operation is performed on the denoised image, and the morphological closing operation includes first performing a dilation operation and then performing an erosion operation; wherein the dilation operation is used to expand the foreground object in the first video image of the power transmission line, and the erosion operation is used to shrink the foreground object in the first video image of the power transmission line;

[0058] It should be noted that the image quality and the accuracy of subsequent analysis are improved through a carefully designed preprocessing process for the first video image of the transmission line, including grayscale processing, mean filtering noise reduction and morphological closing operations. This series of preprocessing measures not only improves the degree of automation of image analysis, but also enables more accurate identification of the status of the transmission line, changes in the surrounding environment, and potential abnormalities or faults in real-time response and regular inspection scenarios.

[0059] S102: Performing initial threshold segmentation on the continuous frame video images of the power transmission line, obtaining the current image suspected of lightning and the images before and after it as candidate group images;

[0060] Preferably, each frame of the first video image of the power transmission line is binarized to obtain a binary image;

[0061] Preferably, the binary image is fitted with a rectangle, the outer contours of all binary images in the image are obtained, the areas of the outer contours of the rectangles are calculated, and the coordinate information of all rectangles whose areas are greater than the second threshold value is recorded;

[0062] Preferably, a rectangular area is cut out from the binary image according to the rectangular coordinate information, and whether the maximum value of the histogram of the rectangular area is within a third threshold is calculated, and if it is within the third threshold, the current image is recorded;

[0063] In the embodiment of the present application, the second threshold is set to 50 confidence levels based on the test results and experience in the experimental scenario, and the third threshold is set to between [250:255];

[0064] Preferably, the images before and after the current image are obtained as a group of candidate group images, the remaining images in the obtained group of candidate group images are segmented by a second threshold value, and the rectangular coordinate information in the image is associated with the frame time node and stored in groups;

[0065] In an embodiment of the present application, a total of 5 frames, including the 2 frames before and after the current frame in the previous and next video streams, are obtained as an image group, the time node of the last frame is recorded, and the subsequent video stream image frames are continuously detected. When a group of suspected image groups is obtained, the remaining 4 frames are subjected to binary processing and threshold segmentation detection, and the area coordinate information in the image is associated with the frame time node and stored in groups.

[0066] It should be noted that, regarding the construction of the candidate group image, although the present embodiment preferably takes the current frame as the center, selects one frame forward and one frame backward, a total of five frames of images as a group of candidate group images, and records the time node of the last frame for subsequent processing, but this selection is not absolutely fixed; the number of frames included in the candidate group image can be dynamically adjusted according to the resolution, frame rate, and desired detection accuracy and real-time requirements of the transmission line monitoring video.

[0067] In another possible embodiment, in a scenario where higher detection accuracy is required but a slightly longer processing time is acceptable, the number of frames of the candidate group of images can be increased, such as selecting two or more frames before and after the current frame to more comprehensively capture and analyze image changes before and after the lightning event. On the contrary, in a scenario where higher real-time performance is required but a certain loss of accuracy is acceptable, the number of frames of the candidate group of images can be reduced, or even only the current frame and its adjacent frame can be selected; or, instead of selecting each frame continuously, some frames can be skipped as needed, and only frames at a specific interval can be selected as candidates.

[0068] It should also be noted that the present invention successfully eliminates a large number of images that are not related to lightning events by performing fine threshold screening on continuous frame video images of transmission lines, significantly reducing the data load of subsequent processing and providing a more focused and efficient input for neural network processing; this process not only accelerates the data processing speed, but also enhances the neural network's recognition accuracy of lightning events by reducing noise and interference, enabling it to quickly and accurately judge the status of transmission lines, and promptly discover and warn of potential safety hazards.

[0069] S104: Input the candidate group images into the neural network detection model for second screening. If the current suspected lightning candidate group image detection result is greater than the first threshold, a transmission line lightning phenomenon is obtained;

[0070] Preferably, before inputting the candidate group into the neural network detection model for detection, a pre-processing operation is performed on each candidate group image in turn;

[0071] Specifically, the pre-processing operation may include: based on the coordinate information of the candidate group obtained after the initial threshold segmentation, the regional images are cropped out according to the coordinate information in turn, the corresponding images are converted into vectors in batches, and the dimensions are adjusted to [n, c, w, h], where n is the number of images in a batch, c is 3, i.e., the number of channels of a single image, and w and h are the width and height of the cropped image; then, the image group data of a batch is scaled to maintain the aspect ratio so that its size can meet the input scale requirements of the neural network detection model. Maintaining the aspect ratio can prevent the target object from being deformed and retain the characteristic information of the target to a certain extent; the final inference pre-processing is to perform normalization processing on the batch data to perform model inference;

[0072] Preferably, the neural network detection model is trained using the first video image of the historical power transmission line to obtain a first threshold; the first video image of the real-time power transmission line is dynamically input into the trained neural network detection model for detection to obtain a confidence result;

[0073] Preferably, the confidence results of the same batch are stored in a result list, and the maximum value and the maximum value index value in the result list are recorded; the maximum value is compared with the first threshold value, and if the maximum value is greater than the first threshold value, a transmission line lightning phenomenon is obtained, and the time nodes of the continuous frame videos of the transmission line in the result list are returned according to the maximum value index value;

[0074] Preferably, after obtaining the output result of the last fully connected layer of the neural network detection model, the output result is normalized using a softmax function.

[0075] In neural network detection models, especially when dealing with multi-classification or binary classification tasks, the last fully connected layer usually outputs the raw scores or "logits" for each category. However, these raw scores do not directly represent the probability of each category, and they lack normalization and comparability. In order to convert these raw scores into probability distributions so that the sum of the probabilities of each category is 1 and can intuitively represent the model's confidence that the input image belongs to each category, the softmax function is usually used to normalize the output results.

[0076] The softmax function exponentially processes the original score of each category and divides it by the sum of the exponentially processed scores of all categories to ensure that the converted value is in the range (0,1) and the sum of the probabilities of all categories is 1. The advantage of this is that it not only converts the output into a probability form for easy understanding and comparison, but also enhances the interpretability of the model output. In the task of detecting lightning strikes on power transmission lines, the probability value converted by the softmax function can more clearly reflect the model's confidence in whether the current candidate group image contains lightning strikes, thereby helping us determine whether an alarm should be triggered or further processing measures should be taken. Therefore, using the softmax function to normalize the output results of the last fully connected layer of the neural network detection model is an important step to improve the quality of model output and detection accuracy.

[0077] It should be noted that in the selection of neural network detection models, there are a variety of architectures to meet the needs of different application scenarios. These models include but are not limited to convolutional neural networks (CNN), recurrent neural networks (RNN) and their variants (such as LSTM, GRU), generative adversarial networks (GAN), etc. However, in scenarios facing practical applications, such as the detection of lightning images of power transmission lines, the computing power of the equipment often becomes a limiting factor. Since the deep convolutional neural network model has huge neuron parameters and high convolution calculation costs, if it is directly applied to real-time detection, it will not only greatly consume the computing resources of the equipment, but also may affect the detection efficiency and real-time performance; therefore, the present invention adopts the MobileNetV3 model for training and detection. MobileNetV3 is a lightweight neural network model designed specifically for mobile terminals and embedded devices. It significantly reduces the computational complexity and parameter amount during model reasoning through deep separable convolution technology. MobileNetV3 also inherits the inverted residual structure of MobileNetV2. This design further improves the computational efficiency and feature expression ability of the model, so that while maintaining high-precision detection, it can effectively reduce resource consumption.

[0078] Specifically, the MobileNetV3 model is used as an example for detailed description. The MobileNetV3 model input is set as dynamic input to accept the inference of batch image data. The model of lightning detection is a binary classification, so the confidence result after conversion only needs to record the probability value of a class of lightning targets. The confidence results of the same batch are stored in a list, and the maximum value and maximum value index of the result list are calculated; in the model training and verification stage, the confidence thresholds of multiple lightning images are tested, and their performance on the verification set is observed, and a threshold that can detect real lightning events well without causing too many false alarms is selected. According to the experimental test results, the confidence threshold of the lightning image is set to 0.15, that is, the first threshold. If the maximum value in the list is greater than the first threshold, the image is considered to be the lightning phenomenon to be detected. If none of the values ​​in the group is greater than the threshold, the task does not find lightning in the group; at the same time, if there is a group that meets the conditions, the timestamp of the video frame in the list is returned according to the index value.

[0079] It should be noted that the monitoring camera of the transmission line usually uses a resolution of 1080x1920 or even higher, while the standard input size of the neural network is usually 640x640 or 320x320. If the conventional geometric scaling method is used, when facing the tree-like lightning in a small range in the distance in the original image, it is easy to reduce the feature information of the lightning detection due to the reduction of the scale, thereby affecting the accuracy of the detection result. In the present invention, the solution to the scale problem is started from two aspects. First, in terms of model training, the image data enhancement method is used to perform random cropping and random scaling on the training set to enhance the model's ability to learn features at multiple scales of the image. At the same time, the NAS (Neural Architecture Search) neural architecture search method is used to adjust the input resolution of the model to find the input scale with the best performance; second, the screen area is screened in combination with the results of the initial screening of the threshold segmentation, and multiple suspected areas in a frame of the image are connected and filtered based on the area size to remove a large number of redundant areas in the monitoring screen, and as much pixel information as possible is retained for the lightning screen of small targets.

[0080] It should also be noted that the MobileNetV3 model introduces depthwise separable convolution, which decomposes the standard convolution into two steps: depthwise convolution and pointwise convolution. This greatly reduces the amount of calculation and parameters while ensuring model performance. The use of the inverted residual structure makes the model more efficient when extracting features in low-dimensional space, which helps to achieve fast and accurate lightning image detection under limited device computing power. In addition, combined with the two-layer detection strategy adopted in the present invention, the first layer of initial threshold segmentation is used to screen suspected frame images, and then these images are sent in batches to the second layer of the MobileNetV3 model for further processing, thereby reducing unnecessary calculations while improving the applicability and detection efficiency of the algorithm, perfectly meeting the usage requirements under resource-constrained conditions.

[0081] The above is a schematic scheme of a method for detecting lightning strikes by video of a power transmission line in this embodiment. It should be noted that the technical scheme of the system for detecting lightning strikes by video of a power transmission line and the technical scheme of the method for detecting lightning strikes by video of a power transmission line belong to the same concept, and the details of the technical scheme of the system for detecting lightning strikes by video of a power transmission line in this embodiment that are not described in detail can all be found in the description of the technical scheme of the method for detecting lightning strikes by video of a power transmission line.

[0082] The lightning detection system for power transmission line video in this embodiment includes:

[0083] A data acquisition module, used to acquire a first video image of the power transmission line;

[0084] A first screening module is used to perform initial threshold segmentation on the first video image of the power transmission line to obtain a current image suspected of lightning and images before and after it as candidate group images;

[0085] The second screening module is used to input the candidate group images into the neural network detection model for a second screening. If the current suspected lightning candidate group image detection result is greater than the first threshold, a transmission line lightning phenomenon is obtained.

[0086] This embodiment further provides a computing device, which is applicable to lightning detection of power transmission line video, and includes:

[0087] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the lightning detection method for transmission line video as proposed in the above embodiment.

[0088] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for realizing lightning detection of transmission line video as proposed in the above embodiment is implemented.

[0089] The storage medium proposed in this embodiment and the method for realizing lightning detection of transmission line video proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0090] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0091] Example 2

[0092] Referring to Table 1, an embodiment of the present invention provides a method for lightning detection of a power transmission line video. In order to verify its beneficial effects, comparison results of two solutions are provided.

[0093] This embodiment designs a set of control experiments, which are a comparison experiment of using only the neural network model MobileNetV3 to perform binary classification detection of lightning strikes and a comparison experiment of adding threshold segmentation for primary screening. The experimental comparison results are shown in Table 1;

[0094] Table 1 Comparison of experimental results

[0095]

[0096] In Table 1, the experimental test set consists of 187 images with lightning and 322 images without lightning. From the comparative experimental results, it can be seen that only using the neural network model is prone to misjudgment due to the small lightning targets in the training data; after adding threshold segmentation for initial screening, it can not only reduce the small noise interference in the image, but also greatly reduce the false alarm rate of the lightning detection system, thereby improving the overall accuracy.

[0097] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for detecting lightning strikes in a power transmission line video, characterized in that: include: Acquiring a first video image of a power transmission line; Performing initial threshold segmentation on the first video image of the power transmission line to obtain a current image suspected of lightning and images before and after it as candidate group images; The candidate group images are input into the neural network detection model for a second screening. If the current suspected lightning candidate group image detection result is greater than the first threshold, a transmission line lightning phenomenon is obtained.

2. The method for detecting lightning strikes in power transmission line video according to claim 1, characterized in that: Performing initial threshold segmentation on the continuous frame video images of the transmission line includes: Binarizing each frame of the first video image of the power transmission line to obtain a binary image; Fitting the binary image with a rectangle, obtaining the outer contours of all binary images in the image, calculating the area of ​​the outer contours of the rectangles, and recording the coordinate information of all rectangles whose areas are greater than a second threshold; A rectangular area is cut out from the binary image according to the rectangular coordinate information, and whether the maximum value of the histogram of the rectangular area is within a third threshold is calculated. If it is within the third threshold, the current image is recorded.

3. The method for detecting lightning strikes in a power transmission line video according to claim 1 or 2, characterized in that: The current image suspected of lightning and the images before and after it are obtained as candidate group images including: The images before and after the current image are acquired as a group of candidate group images, the remaining images in the acquired group of candidate group images are segmented by a second threshold value, and the rectangular coordinate information in the image is associated with the frame time node and stored in groups.

4. The method for detecting lightning strikes in power transmission line video according to claim 3, characterized in that: Further screening and detecting the suspected lightning candidate group images using a neural network detection model includes: Using a first video image of a historical power transmission line to train the neural network detection model to obtain a first threshold; Dynamically inputting a first video image of a real-time power transmission line into a trained neural network detection model for detection to obtain a confidence result; Store the confidence results of the same batch into the result list, and record the maximum value and the maximum value index in the result list; The maximum value is compared with a first threshold value. If the maximum value is greater than the first threshold value, a transmission line lightning phenomenon is obtained, and the time nodes of the continuous frame videos of the transmission line in the result list are returned according to the maximum value index value.

5. The method for detecting lightning strikes in power transmission line video according to claim 4, characterized in that: Also includes, Before inputting the candidate group into the neural network detection model for detection, pre-processing operations are performed on each candidate group image in turn.

6. The method for detecting lightning strikes in power transmission line video according to claim 5, characterized in that: Neural network detection models include, After obtaining the output result of the last fully connected layer of the neural network detection model, the output result is normalized using the softmax function.

7. The method for detecting lightning strikes in power transmission line video according to claim 1, characterized in that: Acquiring a first video image of the power transmission line includes, After obtaining the first video image of the transmission line, preprocessing is performed on the first video image of the transmission line, wherein the preprocessing includes grayscale processing, mean filter noise reduction and morphological closing operation; The denoised image is subjected to a morphological closing operation, wherein the morphological closing operation includes first performing a dilation operation and then performing an erosion operation; wherein the dilation operation is used to expand the foreground object in the first video image of the transmission line, and the erosion operation is used to shrink the foreground object in the first video image of the transmission line.

8. A system for lightning detection of power transmission line video, characterized in that: include, A data acquisition module, used to acquire a first video image of the power transmission line; A first screening module is used to perform initial threshold segmentation on the first video image of the power transmission line to obtain a current image suspected of lightning and images before and after it as candidate group images; The second screening module is used to input the candidate group image into the neural network detection model for a second screening. If the current suspected lightning candidate group image detection result is greater than the first threshold, a transmission line lightning phenomenon is obtained.

9. An electronic device, comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the lightning detection method for transmission line video according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for lightning detection of power transmission line video as claimed in any one of claims 1 to 7.