Power transmission line lightning classification method and system

Through the combination of lightning target cropping method, Gaussian hybrid model and deep learning model EfficientNetV3, the problem of misjudgment and computing resource limitation in traditional frame difference method when detecting lightning is solved, and efficient lightning image classification and monitoring is achieved.

CN119625368APending Publication Date: 2025-03-14HAINAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411430339.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The traditional frame difference method is sensitive to lightning changes when detecting lightning, is prone to misjudgment, and has limited computing resources, making it difficult to apply and deploy on front-end devices.

Method used

Lightning target image is obtained by lightning target cropping method, background modeling is combined with Gaussian hybrid model, lightning area is extracted by threshold cutting method, and deep learning model EfficientNetV3 is used for classification reasoning.

Benefits of technology

It effectively solves the problems of lightning image scarcity and model training diversity, realizes lightning image classification in complex environments, and meets the needs of transmission line monitoring security guarantee.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625368A_ABST
    Figure CN119625368A_ABST
Patent Text Reader

Abstract

The invention discloses a power transmission line lightning classification method, which comprises the following steps: acquiring an original image, and cutting by using a lightning target cutting method to obtain a lightning target image; selecting different background images in the original image, splicing the lightning target image with the different background images, and performing first preprocessing on the spliced image to obtain a background image; modeling the background image by using a Gaussian mixture model to obtain a background model, and calculating the matching degree between each pixel of the background model and each Gaussian model distribution to obtain a foreground; judging the foreground through a threshold cutting method to obtain a lightning region, and performing second preprocessing on the lightning region to obtain a first lightning region; and inputting the first lightning region into a deep learning model for training and classification reasoning to obtain a confidence score, and marking the lightning type and the hazard level according to the confidence score to obtain a lightning classification result, thereby meeting the requirements of power transmission line monitoring safety guarantee.
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 transmission lines, and in particular to a method and system for classifying lightning in power transmission lines. Background Art

[0002] With the rapid economic development, the demand for electricity is also increasing, and the safe and stable operation of transmission lines has become particularly important. Among them, lightning is one of the main natural factors that cause transmission line failures. Therefore, the study of lightning weather on transmission lines is related to the maintenance and protection of transmission safety. With the rapid progress in the field of image processing technology and the widespread application of camera equipment in recent years, image technology has also been applied to the monitoring and prevention fields of various industries. The application of image processing methods to assist in daily disaster prevention, on-site exploration and maintenance on transmission lines can greatly reduce labor costs and accelerate the efficiency of locating and eliminating fault problems. Compared with traditional distributed sensors, image monitoring technology also has the advantages of wide monitoring range, low deployment cost, and flexible application forms. The monitoring of lightning weather phenomena based on image processing can better detect the damage and location of lightning to transmission lines and trace accidents. Generally speaking, linear lightning and strip lightning are more likely to cause damage to transmission lines. Therefore, image processing can be used to classify lightning weather and evaluate the hazard level of the results, so that maintenance personnel can grasp the on-site information of transmission lines and subsequent response measures.

[0003] There are three main problems with existing image classification methods for lightning: the traditional frame difference method for calculating the location of lightning is prone to mistaking other lighting changes for lightning, leading to false detections. In addition, frame differences have low noise resistance and are easily affected by noise from factors such as rain and snow under severe weather conditions. Lightning image datasets are scarce. Due to difficult shooting conditions, it is difficult to obtain lightning images with good diversity, so the datasets that can be produced are small and highly repetitive. Neural network technology has developed rapidly in recent years, but the calculations and debugging required for model training are very resource-intensive and time-consuming. In addition, traditional convolutional neural network models have many parameters and high memory usage, making them difficult to apply and deploy on front-end devices. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is: the present invention solves the problem that the traditional frame difference method is a method for detecting moving objects by comparing the differences between consecutive frames, but the frame difference method is sensitive to lighting changes and is prone to misjudgment, the real lightning phenomenon image data is difficult to obtain and has high repetitiveness, and the computing resources are limited.

[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 classifying lightning on a power transmission line, comprising:

[0008] Acquire an original image, and crop the original image using a lightning target cropping method to obtain a lightning target image;

[0009] Select different background images in the original image, splice the lightning target image with the different background images, and perform a first preprocessing on the spliced ​​image to obtain a background image;

[0010] The background image is modeled using a Gaussian mixture model to obtain a background model, and the matching degree between each pixel of the background model and each Gaussian model distribution is calculated to obtain a foreground;

[0011] The foreground is judged by a threshold cutting method to obtain a lightning region, and the lightning region is subjected to a second preprocessing to obtain a first lightning region;

[0012] The first lightning area is input into the deep learning model for training and classification reasoning to obtain a confidence score, and the lightning type and hazard level are labeled according to the confidence score to obtain a lightning classification result.

[0013] As a preferred solution of the power transmission line lightning classification method of the present invention, wherein: using the lightning target clipping method to clip the original image comprises:

[0014] Obtain an original image library, and select an original image containing lightning from the original image library;

[0015] Determine the location and bounding box of lightning in the original image using object detection algorithms or manual annotation;

[0016] According to the position and bounding box of the lightning in the original image, the original image is cropped to obtain an image containing the lightning target.

[0017] As a preferred solution of the power transmission line lightning classification method of the present invention, wherein: splicing the lightning target image with different background images comprises:

[0018] Select different background images from different background image libraries and combine the lightning target image with the selected background image;

[0019] Place lightning target images in random or predefined backgrounds to obtain lightning occurrences in different environments.

[0020] As a preferred solution of the power transmission line lightning classification method of the present invention, wherein: using a Gaussian mixture model to model the background image includes:

[0021] Select images without lightning as training data sets, set the number of frames of images without lightning as a first threshold, and convert each frame of the image into a grayscale image;

[0022] For each pixel position in the image, initialize the Gaussian distribution to simulate the background pixel value;

[0023] For each pixel of each frame image, the background model is updated according to the current pixel value;

[0024] The distance or similarity between the current pixel and each Gaussian distribution is the absolute value of the difference between the current pixel and the mean of each Gaussian distribution.

[0025] As a preferred solution of the power transmission line lightning classification method of the present invention, it also includes:

[0026] Using the weighted update method, the parameters of each Gaussian distribution are updated according to the pixel value as follows:

[0027]

[0028] Among them, α is the learning rate, I(x,y,t) is the pixel value of the tth frame, is the mean of the ith Gaussian distribution of the tth frame, is the square of the variance of the i-th Gaussian distribution of the t-th frame;

[0029] For each pixel, according to the weighting parameters of each Gaussian distribution, the weight is updated to obtain the fitting data of the latest observation data;

[0030] Calculate the matching degree of each pixel with each Gaussian model distribution. If it matches, it is the background.

[0031] Otherwise, it is foreground.

[0032] As a preferred solution of the method for classifying lightning on power transmission lines of the present invention, the lightning area obtained by judging the foreground by the threshold cutting method includes:

[0033] Perform a first judgment on the current pixel value, if the pixel value is greater than a second threshold, the current pixel is a foreground;

[0034] Using morphological closing operation for preprocessing, a foreground mask is obtained, and a second judgment is made on the foreground mask;

[0035] If the contour area of ​​the foreground mask is larger than the third threshold, it is lightning, and the current frame number is recorded.

[0036] As a preferred solution of the power transmission line lightning classification method of the present invention, the morphological closing operation includes:

[0037] Expand the foreground in the image, increase the area size, fill small holes or link adjacent areas to obtain the expanded foreground;

[0038] Shrink the expanded foreground to remove details or noise;

[0039] Fill the holes of the shrunk foreground and smooth the interface.

[0040] In a second aspect, the present invention provides a system for lightning classification of power transmission lines, comprising:

[0041] A cropping module, used for acquiring an original image containing lightning, and cropping the original image using a lightning target cropping method to obtain a lightning target image;

[0042] A splicing module, used for selecting different background images in the original image, splicing the lightning target image with the different background images, and performing a first preprocessing on the spliced ​​image to obtain a background image;

[0043] A modeling module is used to model the background image using a Gaussian mixture model to obtain a background model, and calculate the matching degree between each pixel of the background model and each Gaussian model distribution to obtain a foreground;

[0044] A judging module, used for judging the foreground by a threshold cutting method to obtain a lightning region, and performing a second preprocessing on the lightning region to obtain a first lightning region;

[0045] A classification reasoning module is used to input the first lightning area into the deep learning model for training and classification reasoning to obtain a confidence score, label the lightning type and hazard level according to the confidence score, and obtain a lightning classification result.

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

[0047] Memory and processor;

[0048] 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 power transmission line lightning classification method are implemented.

[0049] 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 transmission line lightning classification method.

[0050] Beneficial effects of the present invention: Compared with the existing classification method of lightning images of power transmission lines, the present invention uses image enhancement technology to expand the data set, which can effectively solve the scarcity of lightning images and the need for model training diversity. At the same time, the transfer learning method is used to accelerate the model fitting speed. Combining lightning detection with Gaussian background modeling and lightning image classification with EfficientNetV3, lightning image classification in complex environments can be achieved to meet the needs of power transmission line monitoring safety assurance. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] 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:

[0052] Figure 1 The present invention provides an overall flow chart of a method for classifying lightning in a power transmission line. DETAILED DESCRIPTION

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions 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 device or element referred to must have a specific direction, be constructed and operated in a specific direction, 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.

[0058] 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.

[0059] Example 1

[0060] Reference Figure 1 , as an embodiment of the present invention, provides a method for classifying lightning in a power transmission line, comprising:

[0061] S100: acquiring an original image, and cropping the original image using a lightning target cropping method to obtain a lightning target image;

[0062] In the embodiment of the present application, an original image library is obtained, and an original image containing lightning is selected from the original image library;

[0063] Determine the location and bounding box of lightning in the original image using object detection algorithms or manual annotation;

[0064] According to the position and bounding box of the lightning in the original image, the original image is cropped to obtain an image containing the lightning target.

[0065] Specifically, the target detection algorithm may be YOLO, SSD, etc.

[0066] It should be noted that by combining image cropping technology with target detection algorithm, lightning images can be effectively extracted from original images, which is of great significance for subsequent lightning analysis and research.

[0067] S200: Select different background images in the original image, splice the lightning target image with the different background images, and perform a first preprocessing on the spliced ​​image to obtain a background image.

[0068] In the embodiment of the present application, different background images are selected from different background image libraries, and the lightning target image is combined with the selected background image;

[0069] Place lightning target images in random or predefined backgrounds to obtain lightning occurrences in different environments.

[0070] Specifically, diverse background images are selected from a plurality of different background image libraries, and the images cover various environments and scenes.

[0071] It should be noted that the methods of lightning target cropping and background splicing were used to increase the background diversity of lightning images, so that the trained neural network model can better extract the essential characteristics of lightning.

[0072] S300: Modeling the background image using a Gaussian mixture model to obtain a background model, calculating the matching degree between each pixel of the background model and each Gaussian model distribution to obtain a foreground.

[0073] In the embodiment of the present application, images without lightning phenomena are selected as training data sets, the number of frames of images without lightning phenomena is set as a first threshold, and each frame of the image is converted into a grayscale image;

[0074] For each pixel position in the image, initialize the Gaussian distribution to simulate the background pixel value;

[0075] For each pixel of each frame image, the background model is updated according to the current pixel value;

[0076] The distance or similarity between the current pixel and each Gaussian distribution is the absolute value of the difference between the current pixel and the mean of each Gaussian distribution.

[0077] Using the weighted update method, the parameters of each Gaussian distribution are updated according to the pixel value as follows:

[0078]

[0079] Among them, α is the learning rate, I(x,y,t) is the pixel value of the tth frame, is the mean of the ith Gaussian distribution of the tth frame, is the square of the variance of the i-th Gaussian distribution of the t-th frame;

[0080] For each pixel, according to the weighting parameters of each Gaussian distribution, the weight is updated to obtain the fitting data of the latest observation data;

[0081] Calculate the matching degree of each pixel with each Gaussian model distribution. If it matches, it is the background.

[0082] Otherwise, it is foreground.

[0083] Specifically, an image without lightning phenomenon is selected for mixed Gaussian background modeling. The mixed Gaussian model can be:

[0084]

[0085] Where K is the number of Gaussian distributions, ω i is the weight of the i-th Gaussian distribution, is the probability density function of the i-th Gaussian distribution.

[0086] For each pixel in a single frame image, multiple Gaussian distributions are used to model its background value.

[0087] Specifically, a first threshold of 300-400 frames of images without lightning phenomena are selected as a training data set, and each frame of the image is converted into a grayscale image for subsequent processing;

[0088] For each pixel position (x, y) of the image, one or more Gaussian distributions are initialized to simulate its background pixel value. 3-5 Gaussian distributions are selected in the initial stage.

[0089] For each pixel (x, y) of each frame image, update its background model according to the current pixel value. For the pixel I (x, y, t) (the pixel value of the tth frame), calculate its difference with each Gaussian distribution G i (x,y) distance or similarity:

[0090] d i =|I(x,y,t)-μ i (x,y)|

[0091] Among them, μ i (x,y) is the mean of the Gaussian distribution.

[0092] For each pixel (x, y), use the weighted update method to update the parameters of each Gaussian distribution according to the pixel value, which are the mean μ and variance σ, and α is the learning rate (between 0.01 and 0.05);

[0093] For each pixel (x, y), its weight is updated to reflect the fit to the latest observed data according to the weighting parameters of each Gaussian distribution.

[0094] For each pixel (x, y), whether it belongs to the background is determined by comparing the pixel value I(x, y, t) with the threshold in the background model. The threshold is the probability density calculated based on the Gaussian distribution.

[0095] It should be noted that through accurate background modeling and pixel-level analysis, lightning and non-lightning events can be effectively distinguished, false alarms can be reduced, and images can be converted into grayscale images for processing, which reduces the amount of calculation and improves the processing speed. The model can adapt to different environmental conditions, such as lighting changes, background motion, etc., and maintain stable detection performance.

[0096] S400: The foreground is judged by a threshold cutting method to obtain a lightning region, and the lightning region is subjected to a second preprocessing to obtain a first lightning region.

[0097] In the embodiment of the present application, a first judgment is performed on the current pixel value, and if the pixel value is greater than a second threshold, the current pixel is a foreground;

[0098] Using morphological closing operation for preprocessing, a foreground mask is obtained, and a second judgment is made on the foreground mask;

[0099] If the contour area of ​​the foreground mask is larger than the third threshold, it is lightning, and the current frame number is recorded.

[0100] Specifically, the second threshold is obtained empirically, and the third threshold depends on the resolution of the image, the average size of the lightning channel, and the noise level that may exist in the image. The third threshold may be 500.

[0101] In the embodiment of the present application, the foreground in the image is expanded, the area size is increased, small holes are filled or adjacent areas are linked, and the expanded foreground is obtained;

[0102] Shrink the expanded foreground to remove details or noise;

[0103] Fill the holes of the shrunk foreground and smooth the interface.

[0104] Specifically, the dilation operation is used to expand the foreground area in the image, increase the area size, fill small holes, or connect adjacent areas;

[0105] Erosion operation: The opposite of dilation operation, used to shrink the foreground area and remove small details or noise;

[0106] Closing operation: First perform a dilation operation, then an erosion operation. The closing operation can fill the foreground and smooth the boundaries, thereby reducing noise.

[0107] It should be noted that the first judgment is made in order to filter out as many non-lightning targets as possible. By adjusting the second and third thresholds, it is possible to adapt to lightning images under different environments and conditions and improve the robustness of the algorithm. Through morphological closing operations and threshold judgments, lightning can be identified more accurately and false alarms can be reduced. Morphological closing operations help eliminate noise in images, especially for small bright spots and dark spots that are common in lightning images. When reducing noise in lightning detection, morphological closing operations can usually remove some small foreground areas or isolated pixels, making the remaining foreground mask more coherent and stable.

[0108] S500: Input the first lightning area into the deep learning model for training and classification reasoning to obtain a confidence score, label the lightning type and hazard level according to the confidence score, and obtain a lightning classification result.

[0109] Specifically, the detected lightning images are grouped into groups of 10, batch normalized and converted into tensors, and the trained deep learning model EfficientNetV3 is used for classification inference. The lightning type and hazard level are labeled according to the confidence score after inference, where linear and ribbon lightning are level 1, ball lightning is level 2, and the rest are level 3.

[0110] The EfficientNetV3 model is preferred.

[0111] It should be noted that the EfficientNet series of models have achieved excellent results in multiple visual research tasks and have been widely verified as efficient image classification and feature extraction models. Compared with other models, the EfficientNet series is particularly outstanding in the balance between resource consumption and performance, achieving efficient performance with limited computing resources.

[0112] The EfficientNet series optimizes the complexity and performance of the model by adjusting the depth, width, and resolution of the network. This strategy ensures that the model can still achieve good performance with limited resources.

[0113] EfficientNetV3 has made structural improvements to further enhance the expressiveness and adaptability of the model, making it more suitable for diverse visual tasks and data sets.

[0114] The above is a schematic scheme of a transmission line lightning classification method of this embodiment. It should be noted that the technical scheme of the transmission line lightning classification device and the technical scheme of the above transmission line lightning classification method belong to the same concept, and the details of the technical scheme of the transmission line lightning classification device not described in detail in this embodiment can be referred to the description of the technical scheme of the above transmission line lightning classification method.

[0115] The device for lightning classification of power transmission lines in this embodiment includes:

[0116] A cropping module, used for acquiring an original image containing lightning, and cropping the original image using a lightning target cropping method to obtain a lightning target image;

[0117] A splicing module, used for selecting different background images in the original image, splicing the lightning target image with the different background images, and performing a first preprocessing on the spliced ​​image to obtain a background image;

[0118] A modeling module is used to model the background image using a Gaussian mixture model to obtain a background model, and calculate the matching degree between each pixel of the background model and each Gaussian model distribution to obtain a foreground;

[0119] A judging module, used for judging the foreground by a threshold cutting method to obtain a lightning region, and performing a second preprocessing on the lightning region to obtain a first lightning region;

[0120] A classification reasoning module is used to input the first lightning area into the deep learning model for training and classification reasoning to obtain a confidence score, label the lightning type and hazard level according to the confidence score, and obtain a lightning classification result.

[0121] This embodiment also provides a computing device, which is applicable to lightning classification of power transmission lines, and includes:

[0122] 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 power transmission line lightning classification method proposed in the above embodiment.

[0123] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for classifying lightning in a power transmission line as proposed in the above embodiment is implemented.

[0124] The storage medium proposed in this embodiment and the method for implementing lightning classification of transmission lines 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.

[0125] 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's floppy disk, read-only memory (ROM), random access 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, a server, or a network device, etc.) to perform the methods of various embodiments of the present invention.

[0126] Example 2

[0127] Referring to Table 1, this embodiment is different from the first embodiment in that it provides a verification test of a transmission line lightning classification method to verify and illustrate the technical effects adopted in this method.

[0128] The accuracy and robustness of the proposed lightning classification in transmission line lightning detection is verified as an example.

[0129] Experimental steps:

[0130] 1) Dataset Collection

[0131] Lightning images: Collect lightning images that include power lines, ensuring that the dataset includes linear lightning, ball lightning, and other types of lightning;

[0132] Annotate each image with lightning type, location, and other relevant information;

[0133] Apply existing data augmentation techniques such as rotation, flipping, random cropping, and color perturbation to increase the diversity of the dataset. Use target detection or manual annotation methods to crop lightning targets from the original image and splice them with images from a diverse background image library to enhance the background diversity of the dataset and simulate lightning phenomena in different environments.

[0134] 2) Gaussian background modeling and foreground extraction

[0135] Select 300-400 frames of images without lightning for background modeling;

[0136] Selection of images without lightning: 300-400 frames of images without lightning were selected for background modeling;

[0137] Gaussian Mixture Model (GMM) modeling: Multiple Gaussian distributions are used to model the background pixel value for each pixel in the image. The background of each pixel is represented by multiple Gaussian distributions, each of which has its corresponding mean, variance and weight.

[0138] Background segmentation: Use the mixed Gaussian background model to extract the foreground, and determine whether it belongs to the foreground by comparing the pixel value with the threshold in the background model;

[0139] Threshold filtering: Pixels with values ​​greater than an empirically fixed threshold are considered foreground, and non-lightning targets are filtered out as much as possible;

[0140] Morphological operation: Use morphological closing operation to reduce noise. If the contour area of ​​the processed foreground mask is larger than the threshold (500 pixels), it is considered to be a lightning target and the corresponding frame number is recorded.

[0141] Dilation operation: expand the foreground area, fill small holes and connect broken areas;

[0142] Erosion operation: removes noise and small detail areas;

[0143] Closing operation: dilate first and then erode to maintain the integrity of the foreground area and smooth the boundaries.

[0144] 3) Model training

[0145] Model selection: Use EfficientNetV3 as the base model, train it through transfer learning, keep the pre-trained convolutional layers, remove the fully connected layers, and add a custom fully connected layer for classification.

[0146] Training settings: Batch size: Set the batch size to 64.

[0147] Learning rate: Select 0.001 as the learning rate and adopt the learning rate decay strategy.

[0148] Frozen layers: Freeze the convolutional layers at the initial stage of training, train the custom fully connected layers for 50 iterations, and then unfreeze the convolutional layers to train the full model for a total of 100 iterations.

[0149] 4) Model performance evaluation

[0150] Test set preparation: An independent test set containing lightning images similar to but not overlapping with the training set is used to ensure objectivity of the evaluation.

[0151] Evaluation Metrics:

[0152] Accuracy: The ratio of the correct lightning type detected to the total number of detections.

[0153] Recall: The ratio of the correct lightning type detected to the actual number of lightning.

[0154] Precision: The proportion of lightning types detected correctly to those predicted by the model.

[0155] F1-Score: An indicator that comprehensively considers precision and recall.

[0156] 5) Experimental results analysis

[0157] In this experiment, the performance of various different models used in the transmission line lightning classification task was evaluated, and the evaluation results are shown in Table 1.

[0158] Table 1 Comparison of precision, recall and F1-Score

[0159]

[0160]

[0161] As can be seen from the table above, by comparing the evaluation results of different models, it can be clearly seen that the proposed EfficientNetV3 model performs well in all indicators, especially in classification accuracy and recall rate. The accuracy of linear and ribbon lightning is as high as 93%, and the recall rate of ball lightning is 79%, which are higher than other comparison models. Although the accuracy of other types of lightning is relatively low, it is still higher than VGG16 and MobileNetV2.

[0162] Overall, the average accuracy of EfficientNetV3 is 87%, which is in the leading position among all models, verifying the effectiveness of the proposed lightning classification method in the task of lightning detection on power transmission lines. This result not only verifies the effectiveness of the method proposed in this study, but also provides a solid foundation for future research in related fields. Future work will focus on further optimizing the model, exploring more data enhancement methods, and performance in more complex scenarios.

[0163] 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 classifying lightning in a power transmission line, characterized in that: include: Acquire an original image, and crop the original image using a lightning target cropping method to obtain a lightning target image; Select different background images in the original image, splice the lightning target image with the different background images, and perform a first preprocessing on the spliced ​​image to obtain a background image; The background image is modeled using a Gaussian mixture model to obtain a background model, and the matching degree between each pixel of the background model and each Gaussian model distribution is calculated to obtain a foreground; The foreground is judged by a threshold cutting method to obtain a lightning region, and the lightning region is subjected to a second preprocessing to obtain a first lightning region; The first lightning area is input into the deep learning model for training and classification reasoning to obtain a confidence score, and the lightning type and hazard level are labeled according to the confidence score to obtain a lightning classification result.

2. The method for classifying lightning in a power transmission line according to claim 1, characterized in that: Cropping the original image using the lightning target cropping method includes: Obtain an original image library, and select an original image containing lightning from the original image library; Determine the location and bounding box of lightning in the original image using object detection algorithms or manual annotation; According to the position and bounding box of the lightning in the original image, the original image is cropped to obtain an image containing the lightning target.

3. The method for classifying lightning in a power transmission line according to claim 2, characterized in that: The step of stitching the lightning target image with different background images includes: Select different background images from different background image libraries and combine the lightning target image with the selected background image; Place lightning target images in random or predefined backgrounds to obtain lightning occurrences in different environments.

4. The method for classifying lightning in a power transmission line according to claim 3, characterized in that: Modeling the background image using a Gaussian mixture model includes: Select images without lightning as training data sets, set the number of frames of images without lightning as a first threshold, and convert each frame of the image into a grayscale image; For each pixel position in the image, initialize the Gaussian distribution to simulate the background pixel value; For each pixel of each frame image, the background model is updated according to the current pixel value; The distance or similarity between the current pixel and each Gaussian distribution is the absolute value of the difference between the current pixel and the mean of each Gaussian distribution.

5. The method for classifying lightning in a power transmission line according to claim 4, characterized in that: Also includes: Using the weighted update method, the parameters of each Gaussian distribution are updated according to the pixel value as follows: Among them, α is the learning rate, I(x,y,t) is the pixel value of the tth frame, is the mean of the i-th Gaussian distribution of the t-th frame, is the square of the variance of the i-th Gaussian distribution of the t-th frame; For each pixel, according to the weighting parameters of each Gaussian distribution, the weight is updated to obtain the fitting data of the latest observation data; Calculate the matching degree of each pixel with each Gaussian model distribution. If it matches, it is the background. Otherwise, it is foreground.

6. The method for classifying lightning in a power transmission line according to claim 5, characterized in that: The foreground is judged by the threshold cutting method to obtain the lightning area including: Perform a first judgment on the current pixel value, if the pixel value is greater than a second threshold, the current pixel is a foreground; Using morphological closing operation for preprocessing, a foreground mask is obtained, and a second judgment is made on the foreground mask; If the contour area of ​​the foreground mask is larger than the third threshold, it is lightning, and the current frame number is recorded.

7. The method for classifying lightning in a power transmission line according to any one of claims 2 to 6, characterized in that: Morphological closing operations include: Expand the foreground in the image, increase the area size, fill small holes or link adjacent areas to obtain the expanded foreground; Shrink the expanded foreground to remove details or noise; Fill the holes of the shrunk foreground and smooth the interface.

8. A system for a power transmission line lightning classification method, characterized in that: include: A cropping module, used for acquiring an original image containing lightning, and cropping the original image using a lightning target cropping method to obtain a lightning target image; A splicing module, used for selecting different background images in the original image, splicing the lightning target image with the different background images, and performing a first preprocessing on the spliced ​​image to obtain a background image; A modeling module is used to model the background image using a Gaussian mixture model to obtain a background model, and calculate the matching degree between each pixel of the background model and each Gaussian model distribution to obtain a foreground; A judging module, used for judging the foreground by a threshold cutting method to obtain a lightning region, and performing a second preprocessing on the lightning region to obtain a first lightning region; A classification reasoning module is used to input the first lightning area into the deep learning model for training and classification reasoning to obtain a confidence score, label the lightning type and hazard level according to the confidence score, and obtain a lightning classification result.

9. An electronic device, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Lightning rapid identification method based on image sequence brightness change information

    CN120356103A