Strong exposure complex lightning discharge image identification method and system
By improving the YOLOv8n architecture, the dynamic snake convolution module, CBAM attention mechanism and CIoU loss function are introduced, which solves the accuracy and robustness of lightning discharge image recognition under strong exposure and complex backgrounds, and achieves more efficient lightning monitoring and disaster warning support.
Patent Information
- Application Number
- CN202411931313.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-02
AI Technical Summary
When the prior art deals with lightning discharge images with strong exposure and complex backgrounds, the recognition accuracy and robustness have great limitations, making it difficult to effectively extract image information.
By constructing a lightning discharge image dataset containing different light intensity, background environment and lightning discharge types, the YOLOv8n architecture is improved, and the dynamic snake convolution module, CBAM attention mechanism and CIoU loss function are introduced to improve the recognition ability of neural network models.
It significantly improves the recognition accuracy, robustness, reliability and sensitivity of strong exposure complex lightning discharge images, and provides more accurate lightning monitoring and disaster warning support.
Smart Images

Figure CN119919804A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lightning image recognition, and in particular to a method and system for recognizing strongly exposed complex lightning discharge images. Background Art
[0002] With the continuous development of meteorological monitoring technology and power systems, lightning monitoring and analysis have become increasingly important in the fields of disaster prevention and reduction, lightning protection, etc. As an intuitive record of the lightning discharge process, lightning images can provide valuable first-hand data for the study of the spatiotemporal distribution and development laws of lightning occurrence. In lightning monitoring of key infrastructure such as wind farms and transmission lines, efficient and accurate acquisition of lightning discharge image information and intelligent identification of lightning types are of great significance to ensure the normal operation of the power system.
[0003] However, lightning images usually have extremely high exposure and complex background environments, and the discharge process is rapid and instantaneous, which leads to certain difficulties for traditional image recognition methods in processing images. For example, in lightning images under strong exposure, lightning discharge phenomena are often mixed with factors such as changes in ambient light and cloud movement, making it difficult to extract image information. At the same time, due to the high randomness of lightning discharge paths and morphologies, existing image recognition algorithms, whether traditional edge detection and threshold segmentation algorithms or existing deep learning-based target detection methods, have great limitations in recognition accuracy and robustness when faced with complex discharge paths, interlaced light interference, and different lightning events. Summary of the invention
[0004] The present invention aims to solve the technical problems in the related art at least to a certain extent. To this end, the first purpose of the present invention is to provide a method for recognizing strongly exposed complex lightning discharge images, which can effectively improve the recognition accuracy, robustness, reliability and sensitivity of strongly exposed complex lightning discharge images, and can provide more accurate technical support for the fields of lightning monitoring, disaster warning, etc.
[0005] The second object of the present invention is to provide a strong exposure complex lightning discharge image recognition system.
[0006] To achieve the above object, the present invention is implemented through the following technical solutions:
[0007] A method for recognizing a strong exposure complex lightning discharge image, comprising:
[0008] Constructing a lightning discharge image dataset, dividing the lightning discharge image dataset into a training set and a test set, wherein the lightning discharge image dataset includes lightning discharge images with different light intensities, different background environments and multiple lightning discharge types;
[0009] An improved neural network model for identifying lightning discharge types was constructed based on the YOLOv8n architecture;
[0010] The training set is used to train the neural network model, the test set is used to verify the trained and tuned neural network model, and the trained and verified neural network model is deployed in a lightning monitoring system to achieve automatic recognition and analysis of lightning discharge images.
[0011] Preferably, before dividing the lightning discharge image data set, the method further includes:
[0012] Image preprocessing is performed on the lightning discharge images in the lightning discharge image data set, and lightning discharge type annotation is performed on the preprocessed lightning discharge images.
[0013] Preferably, the YOLOv8n architecture includes a backbone network, a neck network and a head network. The neural network model for identifying lightning discharge types is obtained by improving and constructing the YOLOv8n architecture, including:
[0014] A dynamic snake convolution module is introduced to improve the C2f module in the backbone network to enhance the ability of the neural network model to capture curved and bifurcated paths in lightning discharge images.
[0015] Preferably, the neural network model for identifying lightning discharge types is constructed based on the improved YOLOv8n architecture, and further includes:
[0016] In the neck network, the CBAM attention mechanism is used to enhance the neural network model's attention to key areas in lightning discharge images.
[0017] Preferably, the neural network model for identifying lightning discharge types is constructed based on the improved YOLOv8n architecture, and further includes:
[0018] In the head network, the CIoU loss function is used to optimize the target box regression to ensure accurate recognition of lightning discharge types.
[0019] Preferably, a dynamic snake convolution module is introduced to improve the C2f module in the backbone network, including:
[0020] The dynamic snake convolution module is fused with the C2f module to obtain a fused module, and the last connected C2f module in the backbone network is replaced with the fused module to achieve C2f module improvement in the backbone network.
[0021] Preferably, in the neck network, a CBAM attention mechanism is used to enhance the attention of the neural network model to key areas in the lightning discharge image, including:
[0022] After the SPPF layer of the backbone network, the CBAM attention mechanism module is connected, and in the neck network, the CBAM attention mechanism module is respectively connected to the Upsample module and the Concat module; the CBAM attention mechanism module includes two independent sub-modules: the channel attention mechanism and the spatial attention mechanism.
[0023] Preferably, the head network includes a Detect module, and the Detect module uses a CIoU loss function to optimize the target box regression when guiding the regression operation to ensure accurate identification of the lightning discharge type.
[0024] Preferably, when constructing the lightning discharge image data set, the method further includes:
[0025] Artificial lightning induction test images and lightning strike simulation test images are used to expand the lightning discharge image dataset to ensure that the lightning discharge image dataset includes multiple lightning discharge types, including single ground-to-ground lightning, multiple ground-to-ground lightning and cloud-to-cloud lightning.
[0026] To achieve the above object, the second aspect of the present invention provides a strong exposure complex lightning discharge image recognition system, comprising:
[0027] A first construction module is used to construct a lightning discharge image dataset and divide the lightning discharge image dataset into a training set and a test set, wherein the lightning discharge image dataset includes lightning discharge images with different light intensities, different background environments and multiple lightning discharge types;
[0028] The second building module is used to improve and build a neural network model for identifying lightning discharge types based on the YOLOv8n architecture;
[0029] A training module, used to train the neural network model using the training set;
[0030] A verification test module, used to perform verification test on the trained and tuned neural network model using the test set;
[0031] The module is used to deploy the trained and verified neural network model into the lightning monitoring system to realize the automatic recognition and analysis of lightning discharge images.
[0032] The present invention has at least the following technical effects:
[0033] The present invention introduces a dynamic serpentine convolution module to improve the C2f structure, which can adapt to the tortuous discharge path in the lightning discharge image and enhance the ability to accurately identify the lightning discharge path; the present invention adopts the CBAM attention mechanism to enhance the model's attention to the key areas of the lightning discharge image, and significantly suppresses the interference of background noise and objects under strong exposure; the present invention introduces the CIoU loss function to optimize the target box regression, and further improves the recognition accuracy and robustness; the model constructed by the present invention is lightweight as a whole and has a high recognition accuracy, and can be embedded in mobile devices for lightning monitoring.
[0034] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The figure is a flow chart of a method for recognizing a strong-exposure complex lightning discharge image according to an embodiment of the present invention.
[0036] Figure 2 Schematic diagram of the specific architecture of YOLOv8n according to an embodiment of the present invention.
[0037] Figure 3 Schematic diagram of the components of the YOLOv8n architecture according to an embodiment of the present invention.
[0038] Figure 4 Schematic diagram of the dynamic serpentine convolution according to an embodiment of the present invention.
[0039] Figure 5 Schematic diagram of the improved Yolov8n network architecture of an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The present embodiment is described in detail below, and examples of the embodiment are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0041] The strongly exposed complex lightning discharge image recognition method and system of this embodiment will be described below with reference to the accompanying drawings.
[0042] Figure 1 FIG. 1 is a flow chart of a method for recognizing a strong exposure complex lightning discharge image according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0043] Step S101: constructing a lightning discharge image dataset, dividing the lightning discharge image dataset into a training set and a test set, wherein the lightning discharge image dataset includes lightning discharge images of different light intensities, different background environments and multiple lightning discharge types.
[0044] In this embodiment, real lightning discharge image data can be collected to ensure that the lightning discharge image data set contains images of different light intensities, different background environments, and multiple lightning discharge types. Image preprocessing techniques, including image denoising, enhancement, grayscale, etc., can be used to preprocess lightning discharge images to ensure data quality and diversity, and the preprocessed images are annotated to mark the lightning discharge types, and then divided to generate training sets and test sets to ensure the representativeness and comprehensiveness of the lightning discharge image data set.
[0045] Specifically, transmission line inspection cameras can be used to collect real lightning discharge images, which can be shot using a variety of exposure modes to ensure that the lightning discharge images cover lightning discharge conditions in different geographical areas, under different meteorological conditions, and with different shooting settings. Artificial lightning induction test images and lightning strike simulation test images can be combined to expand the lightning discharge image dataset to ensure that the lightning discharge image dataset has a variety of lightning forms, namely, lightning discharge types, including single-ground lightning, multiple-ground lightning, and cloud lightning.
[0046] Furthermore, the lightning discharge image obtained in the above steps is grayed and normalized to facilitate subsequent model input. In addition, the lightning discharge image is denoised using median filtering to highlight the characteristics of the lightning discharge image, and data enhancement is performed by rotating, translating, scaling and cropping the image.
[0047] After the above preprocessing operation, the preprocessed lightning discharge image is manually labeled using LabelImg (image annotation tool), and the lightning discharge image data set is segmented according to the training set: test set = 7:3.
[0048] Step S102: A neural network model for identifying lightning discharge types is constructed based on the improved YOLOv8n architecture.
[0049] In this embodiment, the YOLOv8n (a target detection model) architecture uses a smaller network and a more efficient computing method to ensure that it can run in a low-power environment, so that it is more suitable for power transmission line visualization tasks. Its specific architecture and components are as follows: Figure 2 and Figure 3 shown. Figure 2In the YOLOv8n architecture, the Backbone, Neck and Head networks are composed of a backbone network, a Neck network and a Head network. The backbone network includes multiple interconnected Conv layers, a C2f module (double convolution cross-stage partial bottleneck module) and a SPPF layer (spatial pyramid pooling module); the Neck network includes multiple Upsample modules, a Concat module, a C2f module and a Conv layer, i.e., a Convolution module. The Head network includes multiple Detect modules. Figure 3 The composition of each module is given in , for example, the C2f module includes a Conv layer, a Split module (segmentation module), a Bottleneck module (residual block) and a Concat module.
[0050] In this embodiment, a neural network model for identifying lightning discharge types is constructed based on the YOLOv8n architecture, including: introducing a dynamic snake convolution module to improve the C2f module in the backbone network to enhance the neural network model's ability to capture curved and bifurcated paths in lightning discharge images.
[0051] Specifically, the dynamic snake convolution module can be fused with the C2f module to obtain the C2f-Dysnake module, i.e., the fused module. Then, the last connected C2f module in the backbone network is replaced with the C2f-Dysnake module to improve the C2f module in the backbone network. The C2f-Dysnake module takes the dynamic snake convolution module as the core, draws on the idea of deformable convolution, stretches the square convolution in the x-axis and y-axis directions to fit the strip, and can better and more accurately capture the dendritic dynamic structure of lightning. The principle diagram of the dynamic snake convolution is shown in the figure below. Figure 4 As shown, Figure 4 The Convolution operation is a convolution operation, and the Offset operation is an offset operation. These operations can be used to implement dynamic snake convolution.
[0052] In one embodiment of the present invention, a neural network model for identifying lightning discharge types is constructed based on an improved YOLOv8n architecture, and also includes: in the neck network, a CBAM attention mechanism is used to enhance the neural network model's attention to key areas in the lightning discharge image, thereby reducing background noise and object interference under strong exposure.
[0053] Specifically, the CBAM (convolutional attention module) attention mechanism module can be connected after the SPPF layer of the backbone network, and the CBAM attention mechanism module can be connected to the Upsample module and the Concat module in the neck network respectively for upsampling and splicing. The CBAM attention mechanism module contains two independent submodules, namely the channel attention mechanism submodule and the spatial attention mechanism submodule. Among them, the channel attention mechanism submodule can make the model focus on channels with more information, such as information in strongly exposed areas, by learning the importance weights of feature maps of different channels. The spatial attention mechanism submodule can enhance the features of important areas. Combining the results of the two, the recognition ability of lightning discharge images can be further improved.
[0054] In one embodiment of the present invention, a neural network model for identifying lightning discharge types is constructed based on an improved YOLOv8n architecture, and further includes: in the head network, a CIoU loss function is used to optimize the target box regression to ensure accurate identification of the lightning discharge type.
[0055] As mentioned above, the head network includes multiple Detect modules, wherein the Detect module can use the CIoU loss function to optimize the target box regression when guiding the regression operation. Since the CIoU loss function (bounding box loss function) introduces the consideration of the center distance and aspect ratio of the bounding box on the basis of the traditional IoU (intersection over union), it is conducive to improving the accuracy of target positioning, thereby ensuring the accurate identification of the lightning discharge type.
[0056] After the above improvements, all the improved modules are coupled to form an improved Yolov8n network structure, such as Figure 5 shown.
[0057] Step S103: Use the training set to train the neural network model, use the test set to verify the trained and tuned neural network model, and deploy the trained and verified neural network model to the lightning monitoring system to achieve automatic recognition and analysis of lightning discharge images.
[0058] Specifically, the improved YOLOv8n model can be trained using the training set. First, the model is pre-trained and basic target detection training is performed using a standard data set; then, transfer learning and fine-tuning are performed on lightning discharge image data, and network parameters are adjusted to optimize the detection accuracy and training efficiency of the improved YOLOv8n model.
[0059] Furthermore, the improved YOLOv8n model after training and tuning was finally tested using the test set to evaluate its application effect in real lightning images. Then, the trained and verified model was deployed to the lightning monitoring system for automatic recognition and analysis of real-time lightning discharge images.
[0060] Furthermore, the present invention also provides a strong exposure complex lightning discharge image recognition system, including: a first building module, a second building module, a training module, a verification test module and a setting module, wherein the first building module, the second building module, and the verification test module are respectively connected to the training module, and the setting module is connected to the verification test module.
[0061] In this embodiment, the first construction module is used to construct a lightning discharge image data set, and divide the lightning discharge image data set into a training set and a test set. The lightning discharge image data set includes lightning discharge images with different light intensities, different background environments and multiple lightning discharge types; the second construction module is used to improve and construct a neural network model for identifying lightning discharge types based on the YOLOv8n architecture; the training module is used to train the neural network model using the training set; the verification test module is used to verify and test the trained and tuned neural network model using the test set; the setting module is used to deploy the trained and verified tested neural network model to the lightning monitoring system, so as to realize automatic recognition and analysis of lightning discharge images.
[0062] It should be noted that the specific implementation of the strongly exposed complex lightning discharge image recognition system of this embodiment can refer to the specific implementation of the strongly exposed complex lightning discharge image recognition method mentioned above, and will not be repeated here to avoid redundancy.
[0063] In summary, the present invention provides a method and system for recognizing complex lightning discharge images with strong exposure based on an improved YOLOv8n architecture. Among them, the method improves the C2f structure by introducing a dynamic snake convolution module to adapt to the tortuous discharge path in the lightning image, thereby enhancing the ability to accurately recognize the lightning discharge path; the CBAM attention mechanism is used to enhance the improved model's attention to the key areas of the lightning discharge image, significantly suppressing the interference of background noise and objects under strong exposure; finally, the target box regression is optimized by introducing the CIoU loss function, further improving the recognition accuracy and robustness. Therefore, the present invention can effectively improve the recognition accuracy, robustness, reliability and sensitivity of complex lightning discharge images with strong exposure, and provide more accurate technical support for the fields of lightning monitoring, disaster warning, etc.
[0064] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0065] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A method for recognizing strong exposure complex lightning discharge images, characterized in that: include: Constructing a lightning discharge image dataset, dividing the lightning discharge image dataset into a training set and a test set, wherein the lightning discharge image dataset includes lightning discharge images with different light intensities, different background environments and multiple lightning discharge types; An improved neural network model for identifying lightning discharge types was constructed based on the YOLOv8n architecture; The training set is used to train the neural network model, the test set is used to verify the trained and tuned neural network model, and the trained and verified neural network model is deployed in a lightning monitoring system to achieve automatic recognition and analysis of lightning discharge images.
2. The method for recognizing highly exposed complex lightning discharge images according to claim 1, characterized in that: Before dividing the lightning discharge image data set, the method further includes: Image preprocessing is performed on the lightning discharge images in the lightning discharge image data set, and lightning discharge type annotation is performed on the preprocessed lightning discharge images.
3. The method for recognizing strong exposure complex lightning discharge images according to claim 1, characterized in that: The YOLOv8n architecture includes a backbone network, a neck network and a head network. The neural network model for identifying lightning discharge types is obtained by improving and constructing the YOLOv8n architecture, including: A dynamic snake convolution module is introduced to improve the C2f module in the backbone network to enhance the ability of the neural network model to capture curved and bifurcated paths in lightning discharge images.
4. The method for recognizing highly exposed complex lightning discharge images according to claim 3, characterized in that: The neural network model for identifying lightning discharge types is improved based on the YOLOv8n architecture, and also includes: In the neck network, the CBAM attention mechanism is used to enhance the neural network model's attention to key areas in lightning discharge images.
5. The method for recognizing strong exposure complex lightning discharge images according to claim 4, characterized in that: The neural network model for identifying lightning discharge types is improved based on the YOLOv8n architecture, and also includes: In the head network, the CIoU loss function is used to optimize the target box regression to ensure accurate recognition of lightning discharge types.
6. The method for recognizing strong exposure complex lightning discharge images according to claim 3, characterized in that: The dynamic snake convolution module is introduced to improve the C2f module in the backbone network, including: The dynamic snake convolution module is fused with the C2f module to obtain a fused module, and the last connected C2f module in the backbone network is replaced with the fused module to achieve C2f module improvement in the backbone network.
7. The method for recognizing strong exposure complex lightning discharge images according to claim 4, characterized in that: In the neck network, the CBAM attention mechanism is used to enhance the neural network model's attention to key areas in lightning discharge images, including: After the SPPF layer of the backbone network, the CBAM attention mechanism module is connected, and in the neck network, the CBAM attention mechanism module is respectively connected to the Upsample module and the Concat module; the CBAM attention mechanism module includes two independent sub-modules: the channel attention mechanism and the spatial attention mechanism.
8. The method for recognizing strong exposure complex lightning discharge images according to claim 5, characterized in that: The head network includes a Detect module, which uses a CIoU loss function to optimize the target box regression when guiding the regression operation to ensure accurate identification of the lightning discharge type.
9. The method for recognizing a strong exposure complex lightning discharge image according to any one of claims 1 to 8, characterized in that: When constructing the lightning discharge image data set, the method further includes: Artificial lightning induction test images and lightning strike simulation test images are used to expand the lightning discharge image dataset to ensure that the lightning discharge image dataset includes multiple lightning discharge types, including single ground-to-ground lightning, multiple ground-to-ground lightning and cloud-to-cloud lightning.
10. A strong exposure complex lightning discharge image recognition system, characterized in that: include: A first construction module is used to construct a lightning discharge image dataset and divide the lightning discharge image dataset into a training set and a test set, wherein the lightning discharge image dataset includes lightning discharge images with different light intensities, different background environments and multiple lightning discharge types; The second building module is used to improve and build a neural network model for identifying lightning discharge types based on the YOLOv8n architecture; A training module, used to train the neural network model using the training set; A verification test module, used to perform verification test on the trained and tuned neural network model using the test set; The module is used to deploy the trained and verified neural network model into the lightning monitoring system to realize the automatic recognition and analysis of lightning discharge images.
Citation Information
Patent Citations
Steel surface defect detection algorithm based on improved YOLOv8 model
CN117745697A
YOLOv8-based field snail huai detection method
CN118334705A
Steel surface defect detection method based on improved YOLOv8
CN118469964A
Defect detection method and device for photovoltaic panel
CN118537311A
Separation and identification method for multi-source hybrid ultra-high frequency partial discharge diagram
WO2023213332A1