A method for detecting hot spot defects in photovoltaic power stations based on feature perception

By integrating the feature perception method of AFNF module and FPA module, the problems of real-time and accuracy in thermal spot defect detection in photovoltaic power stations are solved, and efficient and accurate thermal spot defect detection is achieved.

CN116664549BActive Publication Date: 2025-08-15HEBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310781895.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-08-15
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high-quality detection of hot spot defects in photovoltaic power plants while ensuring real-time detection, especially because the hot spot defect area is small and susceptible to complex background interference, the traditional methods are inefficient, low accuracy and high cost.

Method used

The thermal spot defect detection method of photovoltaic power stations is adopted based on feature perception, and the self-designed AFNF module and FPA module are fused. Through feature extraction, fusion and regression modules, adaptive fusion and attention adjustment of features of different scales are achieved, thereby improving detection accuracy and speed.

Benefits of technology

Real-time detection of thermal spot defects in photovoltaic power stations is achieved, with a detection speed of 17.5 milliseconds per frame, an accuracy rate of 92.7%, and a recall rate of 97.7%, effectively avoiding missed inspections and missed inspections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116664549B_ABST
    Figure CN116664549B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting hot spot defects in photovoltaic power stations based on feature perception. This method uses a defect detection model that integrates a self-designed AFNF module and FPA module. The AFNF module can adaptively integrate information of different scales between shallow and deep layers based on the correlation between features, extracting bidirectional contextual feature information of small targets, which can more effectively highlight the characteristics of small defects and improve the model's detection effect for small defects. The FPA module enables the network to achieve better training results while capturing more structural information and feature representations of small defects. A fully connected layer is then used to model each channel, adaptively reweighting channel features to improve feature utilization, highlighting the target defect characteristics while suppressing background information. This method has high precision and recall rates for hot spot defect detection and can effectively avoid missed detections and false detections.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of hot spot defect detection in photovoltaic power stations, and specifically relates to a hot spot defect detection method in photovoltaic power stations based on feature perception. Background Art

[0002] Photovoltaic power generation, with its low pollution, low energy consumption, and low cost, has become a crucial option for the green energy transition. However, due to the complex terrain of solar power plants, manual inspections are difficult and require long inspection cycles. This results in extremely low inspection efficiency and difficulty ensuring quality. Some defects degrade and age over time, seriously impacting the efficiency and service life of modules. Some defects generate heat, creating hot spots, which can even cause fires, leading to significant economic losses and severe environmental pollution. Hot spot defects are a key defect that seriously impacts the normal operation of photovoltaic power plants. Hot spot defects are primarily caused by: 1) shadows cast by blades or dust; 2) damage to the tempered glass; 3) diode or solder faults in the junction box; 4) internal battery pack failure; and 5) fuse burnout or short circuit. Hot spot defects reduce the efficiency of photovoltaic systems, shorten the life of photovoltaic modules, and can even cause fires. Therefore, timely and accurate identification of hot spot defects is crucial for improving the operational safety of photovoltaic power plants and minimizing downtime.

[0003] Large-scale ground-based photovoltaic power plants are often built in suburban areas or remote hilly or desert regions. These locations are geographically unsuitable for manual inspections. However, drone-based infrared imaging is widely used for PV power plant inspections due to its ease of observation and simple operation. Traditional drone inspections of PV power plants involve drones taking real-time images from high altitude, transmitting them to a computer, and then manually inspecting the images for possible hot spot defects with the naked eye. However, due to the small proportion of hot spot defects in the overall image and human subjectivity, this detection method is inefficient, inaccurate, and labor-intensive. Traditional image processing methods, which require manual feature design and are slow, cannot meet the requirements of real-time detection and are therefore unsuitable for drone inspections of PV power plants. Deep learning-based object detection can be divided into one-stage and two-stage methods. One-stage methods offer the advantage of speed but generally suffer from low accuracy, while two-stage methods offer high accuracy but are slower. Since hot spot defects are small in area and are minute defects, their characteristics are easily lost during network deepening, and they are easily interfered by complex backgrounds. Therefore, how to achieve high-quality defect detection of hot spot defects in photovoltaic power stations while ensuring real-time detection is currently a difficult problem and has very important research value. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes a feature-based detection method for hot spot defects in photovoltaic power plants. This method utilizes a defect detection model that incorporates a self-designed AFNF module and FPA module. This method achieves superior detection accuracy to existing defect detection methods and, with appropriate hardware configuration, offers rapid detection speed, enabling real-time monitoring and detection of hot spot defects in photovoltaic power plants.

[0005] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0006] A method for detecting hot spot defects in photovoltaic power plants based on feature perception is designed, which is characterized by the following steps:

[0007] Step 1: Build a dataset

[0008] 1-1) Obtaining an original image set of images of a photovoltaic power station with hot spot defects, performing data augmentation on each image in the original image set, and then performing size normalization on all images to obtain a training image set; the number of images in the training image set is no less than 500;

[0009] 1-2) Manually label the PV power plant images with hot spot defects in the training image set using LabelImg software. The labeled information includes the center coordinates, border length, border width, and category label "hotspot" of the hot spot defect area box;

[0010] Step 2: Build a hot spot defect detection model for photovoltaic power stations based on feature perception;

[0011] The defect detection model consists of three parts: a feature extraction module, a feature fusion module, and a classification and regression module. The feature extraction module adopts the CSPDarknet53 structure, including the CBM module, CSP1 module, CSP2 module, the first CSP8 module, the second CSP8 module, the CSP4 module, the first CBL module, the SPP module, and the second CBL module. The above nine modules are connected in sequence, with input data from the CBM module, and the output of the previous module serving as the input of the next module. Among them, the output feature of the CSP2 module is recorded as C2, the output feature of the first CSP8 module is recorded as C3, the output feature of the second CSP8 module is recorded as C4, and the output feature of the second CBL module is recorded as C5. The four features C2, C3, C4, and C5 are sent to the feature fusion module for feature fusion.

[0012] The feature fusion module includes multiple CBL modules and multiple AFNF modules; for the four input features C2, C3, C4, and C5, the feature fusion part first processes the C4 feature after the CBL module No. 4 and then performs a downsample operation on the feature and the C5 feature, and sends them to the AFNF module No. 1 for processing to obtain the enhanced feature N5; then the feature of the C4 feature processed by the CBL module No. 3, the feature of the C3 feature processed by the CBL module No. 2 and then performs a downsample operation on the feature, and the feature of the N5 feature processed by the CBL module No. 5 and then performs an upsample operation on the feature, and send them to the AFNF module No. 2 for processing to obtain the enhanced feature N4; then the feature of the C3 feature processed by the CBL module No. 2, the feature of the C2 feature processed by the CBL module No. 1 and then performs a downsample operation on the feature, and the feature of the N4 feature processed by the CBL module No. 6 and then performs an upsample operation on the feature, and send them to the AFNF module No. 3 for processing to obtain the enhanced feature N3;

[0013] The classification and regression module consists of three branches, which process the three enhanced features N3, N4, and N5 respectively and output detection results at three different scales. Each branch of the classification and regression module includes the FPA module, CBL module, Conv module, and Predict module connected in sequence. The Predict module outputs the detection results of the classification and regression module.

[0014] The basic structure of the CSP1 module, CSP2 module, first CSP8 module, second CSP8 module, and CSP4 module is the same, all consisting of CBM modules, Resunit modules, and Concat modules. The difference lies in the number of Resunit modules. The number of Resunit modules in the CSP1 module, CSP2 module, and CSP4 module is 1, 2, and 4, respectively, and the number of Resunit modules in the first CSP8 module and the second CSP8 module is 8. The five modules are represented by the general formula CSPX, where X = 1, 2, 4, and 8. The CSPX module includes 5 CBM modules, X Resunit modules, and one Concat module. The input of the CSPX module is first processed by the first CBM module, and the obtained result is then processed by two branches. The first branch is a structure in which the second CBM module, X Resunit modules, and the third CBM module are connected in sequence. The second branch is composed of the fourth CBM module. The outputs of the two branches are processed by the Concat module and then by the fifth CBM module to obtain the output of the CSPX module.

[0015] The Resunit module includes two CBM modules and a residual edge. The input M1 of the Resunit module is processed by the two CBM modules in sequence to obtain M2; M1 is then added to M2 through the residual edge to obtain the output of the Resunit module;

[0016] The structures of the CBL module in the feature extraction module, the CBL module in the feature fusion module, and the CBL module in the classification and regression module are the same, which are all structures of convolutional layers, normalization layers, and activation layers connected in sequence, but the parameters are not shared;

[0017] The CBM modules in the defect detection model all have the same structure, which consists of a convolutional layer, a normalization layer, and an activation layer connected in sequence, but the parameters are not shared;

[0018] The SPP module consists of four branches, three of which are maximum pooling layers with window sizes of 5×5, 9×9, and 13×13. The outputs of the three branches are then concat-operated with the residual edges to obtain the output of the SPP module.

[0019] The structures of multiple AFNF modules in the feature fusion module are the same, but the parameters are not shared. The AFNF module first performs a Concat operation on the n input features of the same scale. For the obtained result A1, the shape of A1 is nC×H×W. First, after the global maximum pooling operation, two 1×1 Conv operations, and a Simoid operation are connected in sequence, A2 is obtained. The shape of A2 is nC×1×1; then A1 and A2 are multiplied to obtain A3, and the shape of A3 is nC×H×W. A3 is then split into n features of shape C×H×W, and then the n features are added to obtain the output features of the AFNF module. The shape of the output features is C×H×W; for AFNF module No. 1, n is 2; for AFNF module No. 2 and AFNF module No. 3, n is 3;

[0020] The FPA module first performs three different GAP operations on the input feature F with a shape of C×H×W to obtain primary features with shapes of 4×4×C, 2×2×C, and 1×1×C. The three primary features are then reshaped to obtain intermediate features with shapes of 16C×1×1, 4C×1×1, and 1C×1×1. The three intermediate features are then concat-operated to obtain a feature H with a shape of 21C×1×1. After that, feature H is processed by two different fully connected layers to obtain features U and I, where the shape of feature U is C×1×1 and feature I is the channel weight coefficient. Feature U is multiplied by the input feature F and then added to the input feature F to obtain a feature P with a shape of C×H×W. Feature P is then multiplied by feature I to obtain the output feature O of the FPA module, and the shape of the output feature O is C×H×W.

[0021] After the three enhanced features output by the feature fusion module are input into the classification and regression module, they are first processed by the FPA module, CBL module, and Conv module of a branch respectively. The Conv module consists of a 2D convolution layer, a BN layer, and an activation function. After being processed by the corresponding Conv module, the three branches output the final features respectively. Each final feature is then input into the Predict module of the corresponding branch. The Predict module decodes the channel feature parameters on the final feature to obtain the predicted box information, whether it contains defects, and the type of defects.

[0022] The detection results output by the Predict modules of the three branches of the classification and regression modules are ranked by scores and filtered using non-maximum suppression to obtain the final prediction box information, category label, and confidence level of the corresponding prediction box of the hot spot defect;

[0023] Step 3: Train the defect detection model

[0024] 3-1) Parameter settings

[0025] We used Ubuntu 22.04 and Pytorch 1.9.0 as the deep learning framework. We used stochastic gradient descent to update the network model training parameters, set the weight decay value to 0.0001, the initial learning rate to 0.01, and an exponentially decayed learning rate with a decay exponent of 0.9. We also set the batch size to 64 and the iteration period to 300. We also used random assignment to initialize the network model training parameters.

[0026] 3-2) Training of defect detection model

[0027] The training image set in step 1-2) is input into the defect detection model with completed parameter setting in batches for training, and the training loss of a batch of images is calculated; the training loss is the average of the defect coordinate loss, the target confidence loss and the classification loss, where the defect coordinate loss function adopts CIoU loss, and the target confidence loss function and the classification loss function both adopt BCEWithLogitsLoss; according to the training loss, the stochastic gradient descent method is used to update the training parameters of the model once along the gradient direction of the parameters to complete the training of a batch of images; the training parameters of the model when the previous batch of images is trained are used as the initial parameters for the next batch of images, and according to the training loss of the batch of images, the training parameters of the model are updated again by back propagation, and the iteration is continued until the loss converges, thereby completing the training of the defect detection model;

[0028] Step 4: Hot spot defect detection in photovoltaic power stations

[0029] A size normalization operation is performed to make the photovoltaic power station image to be inspected the same size as the image in the training image set in step 1-1), and then it is input into the defect detection model trained in the third step to obtain the hot spot defect detection result of the photovoltaic power station image.

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

[0031] 1. The defect detection model used in the detection method of the present invention integrates a self-designed neighboring feature adaptive fusion module (AFNF module). In the feature fusion part, the neighboring feature adaptive fusion module is used to fuse features of different scales to replace the current mainstream PAFPN connection method. PAFPN directly adds and fuses features, resulting in limited information enhancement and introducing redundant information. The AFNF module can adaptively integrate information of different scales between shallow and deep layers according to the correlation between features, extract bidirectional context feature information of small targets, so as to solve the problem of loss of some feature information and reduce the generation of redundant information. It can more effectively highlight the characteristics of small defects and improve the detection effect of the model for small defects.

[0032] 2. The defect detection model used in the present invention's detection method incorporates a self-designed feature-aware attention module (FPA module). The FPA module first adaptively pools the input feature map into three scales: 4×4, 2×2, and 1×1 through global average pooling (GAP). The information at these three scales is then concatenated. This maintains the advantages of global average pooling regularization, prevents overfitting, and enables better network training results, while also capturing more structural information and feature representations of minor defects. A fully connected layer is then used to model each channel, adaptively reweighting channel features to improve feature utilization, highlighting the target defect features while suppressing background information.

[0033] 3. The detection speed of the detection method of the present invention is 17.5 milliseconds per image, which can meet the requirements of real-time detection. The detection method of the present invention has been experimentally verified on a photovoltaic power station hot spot defect dataset containing 5064 images. The method has an accuracy rate of 92.7% for hot spot defects and a recall rate of 97.7%, which is better than other detection methods and can effectively avoid missed detections and false detections. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a schematic diagram of the structure and principle of a defect detection model of an embodiment of a method for detecting hot spot defects in photovoltaic power stations based on feature perception of the present invention.

[0035] Figure 2 This is a schematic diagram of the structure and principle of the CBM module of the defect detection model of an embodiment of a photovoltaic power station hot spot defect detection method based on feature perception of the present invention.

[0036] Figure 3 This is a schematic diagram of the structure and principle of the CSPX module of the defect detection model of an embodiment of a photovoltaic power station hot spot defect detection method based on feature perception of the present invention.

[0037] Figure 4 This is a schematic diagram of the structure and principle of the Resunit module of the defect detection model of an embodiment of a photovoltaic power station hot spot defect detection method based on feature perception of the present invention.

[0038] Figure 5 This is a schematic diagram of the structure and principle of the CBL module of the defect detection model of an embodiment of a photovoltaic power station hot spot defect detection method based on feature perception of the present invention.

[0039] Figure 6 This is a schematic diagram of the structure and principle of the SPP module of the defect detection model of an embodiment of a photovoltaic power station hot spot defect detection method based on feature perception of the present invention.

[0040] Figure 7A schematic diagram of the structure and principle of the AFNF module of the defect detection model of an embodiment of a feature-based hot spot defect detection method for photovoltaic power stations is provided.

[0041] Figure 8 A schematic diagram of the structure and principle of the FPA module of a defect detection model for an embodiment of a feature-based hot spot defect detection method for a photovoltaic power station is provided. DETAILED DESCRIPTION

[0042] Specific embodiments are given below in conjunction with the accompanying drawings. The specific embodiments are only used to illustrate the technical solutions of the present invention in detail and are not intended to limit the scope of protection of the present application.

[0043] The present invention provides a method for detecting hot spot defects in photovoltaic power stations based on feature perception, comprising the following steps:

[0044] Step 1: Build a dataset

[0045] 1-3) Obtain a set of original images of photovoltaic power plants with hot spot defects, perform data augmentation on each image in the original image set by rotating, flipping, cropping, etc., and then normalize all images to a size of 640×512 pixels after normalization to obtain a training image set. Methods for obtaining the original image set include, but are not limited to, photographing the photovoltaic power plant from a high altitude of 30 meters using a light unmanned aerial vehicle (UAV) equipped with a digital infrared thermal imaging camera, and then transferring the images captured by the UAV to a computer. The number of images in the training image set is no less than 500. Separately, a test image set is obtained using the same method. The test image set contains images of photovoltaic power plants with hot spot defects and images of photovoltaic power plants without hot spot defects. The number of images of photovoltaic power plants with hot spot defects in the test image set is no more than the number of images in the training image set, and the number of images of photovoltaic power plants without hot spot defects in the test image set is no less than four times the number of images of photovoltaic power plants with hot spot defects.

[0046] 1-4) Manually annotate the PV power station images with hot spot defects in the training image set using LabelImg software. The annotated information includes the center coordinates, border length, border width, and category label "hotspot" of the hot spot defect area box. The annotations are saved as an XML file in PASCAL VOC format. Simultaneously, the same annotation operation is performed on the PV power station images with hot spot defects in the test image set. In this embodiment, the training image set contains 784 images for training, and the test image set contains 780 defective images and 3500 non-defective images for testing.

[0047] Step 2: Build a feature-aware hot spot defect detection model for photovoltaic power stations (referred to as the defect detection model).

[0048] refer to Figure 1 The defect detection model consists of three parts: a feature extraction module, a feature fusion module, and a classification and regression module. The feature extraction module adopts the CSPDarknet53 structure and includes the CBM module, CSP1 module, CSP2 module, the first CSP8 module, the second CSP8 module, the CSP4 module, the first CBL module, the SPP module, and the second CBL module. These nine modules are connected in sequence, with input data from the CBM module, and the output of the previous module serving as the input for the next module. The output feature of the CSP2 module is denoted as C2, the output feature of the first CSP8 module is denoted as C3, the output feature of the second CSP8 module is denoted as C4, and the output feature of the second CBL module is denoted as C5. The four features C2, C3, C4, and C5 are fed into the feature fusion module for feature fusion.

[0049] The feature fusion module includes multiple CBL modules and multiple AFNF modules; for the four input features C2, C3, C4, and C5, the feature fusion part first processes the C4 feature after being processed by the No. 4 CBL module and then performing a downsample operation, and the C5 feature is sent to the No. 1 AFNF module for processing to obtain the enhanced feature N5; then the feature obtained by processing the C4 feature by the No. 3 CBL module, the feature obtained by processing the C3 feature by the No. 2 CBL module and then performing a downsample operation, and the feature obtained by processing the N5 feature by the No. 5 CBL module and then performing an upsample operation are sent to the No. 2 AFNF module for processing to obtain the enhanced feature N4; then the feature obtained by processing the C3 feature by the No. 2 CBL module, the feature obtained by processing the C2 feature by the No. 1 CBL module and then performing a downsample operation, and the feature obtained by processing the N4 feature by the No. 6 CBL module and then performing an upsample operation are sent to the No. 3 AFNF module for processing to obtain the enhanced feature N3.

[0050] The classification and regression module consists of three branches, which process the three enhanced features N3, N4, and N5 respectively and output detection results at three different scales. Each branch of the classification and regression module includes the FPA module, CBL module, Conv module, and Predict module connected in sequence. The Predict module outputs the detection results of the classification and regression module.

[0051] The CSP1 module, CSP2 module, first CSP8 module, second CSP8 module, and CSP4 module have the same basic structure, all consisting of CBM modules, Resunit modules, and Concat modules. The difference lies in the number of Resunit modules. The number of Resunit modules in the CSP1 module, CSP2 module, and CSP4 module is 1, 2, and 4, respectively, and the number of Resunit modules in the first CSP8 module and the second CSP8 module is 8. These five modules are represented by the general formula CSPX, where X = 1, 2, 4, and 8. The CSPX module includes 5 CBM modules, X Resunit modules, and a Concat module. The input of the CSPX module is first processed by the first CBM module, and the obtained result is then processed by two branches. The first branch is a structure in which the second CBM module, X Resunit modules, and the third CBM module are connected in sequence. The second branch is composed of the fourth CBM module. The outputs of the two branches are processed by the Concat module and then by the fifth CBM module to obtain the output of the CSPX module. Figure 3 ; The CSPX module increases the depth of the network through the residual structure while enabling better optimization of the network.

[0052] The Resunit module includes two CBM modules and a residual edge. The input M1 of the Resunit module is processed by the two CBM modules in sequence to obtain M2; M1 is then added to M2 through the residual edge to obtain the output of the Resunit module. Figure 4 ;

[0053] The CBL module in the feature extraction module, the CBL module in the feature fusion module, and the CBL module in the classification and regression module all have the same structure, which is a sequentially connected convolutional layer (Conv), normalization layer (BN) and activation layer (Leakly ReLU) structure, but the parameters are not shared, see Figure 5 ;

[0054] The CBM modules in the defect detection model all have the same structure, which is a sequentially connected convolutional layer (Conv), normalization layer (BN) and activation layer (Mish, i.e., Mish activation function layer), but the parameters are not shared. Figure 2 .

[0055] The SPP module consists of four branches, three of which are maximum pooling layers with window sizes of 5×5, 9×9, and 13×13. The outputs of the three branches are then concat-operated with the residual edges to obtain the output of the SPP module. Figure 6 The SPP module obtains different receptive fields by using maximum pooling of different windows, making the algorithm adaptable to images of different resolutions.

[0056] In order to integrate multi-scale contextual information, FPN and PAN fuse features of different scales through top-down and top-down pathways. However, due to the gap in semantic information between different scales, this direct addition fusion method leads to limited information enhancement and introduces redundant information.

[0057] The AFNF module is an adaptive fusion module for neighboring features. It extracts bidirectional contextual features of small objects between shallow and deep layers to address the loss of some feature information while reducing the generation of redundant information. Before entering the AFNF module, neighboring features are first upsampled or downsampled to bring features of different scales to the same scale.

[0058] The structures of multiple AFNF modules in the feature fusion module are the same, but the parameters are not shared. The AFNF module first performs a Concat operation on the n input features of the same scale (the shape is C×H×W, and the number of input features in this embodiment is 2 or 3). For the obtained result A1, the shape of A1 is nC×H×W. First, after the global maximum pooling (GMP) operation, two 1×1 Conv operations, and a Simoid operation are connected in sequence, A2 is obtained. The shape of A2 is nC×1×1; then A1 and A2 are multiplied to obtain A3, the shape of A3 is nC×H×W, and then A3 is split into n features of the shape of C×H×W. Then, the n features are added to obtain the output feature of the AFNF module. The shape of the output feature is C×H×W, see Figure 7 The global maximum pooling operation can effectively capture rich contextual information and extract the features of small objects. For AFNF module 1, n is 2; for AFNF module 2 and AFNF module 3, n is 3.

[0059] To further enhance feature representations at different scales and suppress interference from complex backgrounds, the FPA module adaptively adjusts multi-scale features. The global average pooling (GAP) operation aggregates global information within each channel. Similar to structural regularization, the GAP operation prevents overfitting. Because directly using the GAP operation can lose feature representations and structural information of small defects, the FPA module employs a spatial pyramid structure, adaptively pooling the input feature map to three scales: 4×4, 2×2, and 1×1. The 1×1 scale maintains the structural regularization benefits of global average pooling, while the 4×4 scale captures more structural information and feature representations of small defects. The 2×2 scale balances the effects of capturing structural information and structural regularization. Concatenating the information from the three scales maintains the regularization benefits of global average pooling, prevents overfitting, and achieves better network training results, while also capturing more structural information and feature representations of small defects. After concatenating the three outputs of the spatial pyramid, a fully connected layer (FC) is applied. This FC layer models the relationships between channels, suppressing complex background while enhancing the feature representation of small defects.

[0060] The FPA module first performs three different GAP operations on the input feature F with a shape of C×H×W to obtain primary features with shapes of 4×4×C, 2×2×C, and 1×1×C. The three primary features are then reshaped to obtain intermediate features with shapes of 16C×1×1, 4C×1×1, and 1C×1×1. The three intermediate features are then concat-operated to obtain a feature H with a shape of 21C×1×1. After that, feature H is processed by two different fully connected layers (FC) to obtain features U and I, where the shape of feature U is C×1×1 and feature I is the channel weight coefficient. Feature U is multiplied by the input feature F and then added to the input feature F to obtain a feature P with a shape of C×H×W. Feature P is then multiplied by feature I to obtain the output feature O of the FPA module. The shape of the output feature O is C×H×W, see Figure 8 .

[0061] The three enhanced features (N3 (20, 20, 1024), N4 (40, 40, 512), and N5 (80, 80, 256)) output by the feature fusion module are input into the classification and regression module, and are first processed by a branch of FPA module, CBL module, and Conv module respectively. The Conv module consists of a 2D convolution layer, a BN layer, and an activation function. After processing by the corresponding Conv module, the three branches output final features with shapes of (20, 20, 18), (40, 40, 18), and (80, 80, 18), respectively; then each final feature is input into the Predict module of the corresponding branch. The Predict module decodes the channel feature parameters on the final feature to obtain the predicted box information, whether it contains defects, and the type of defects.

[0062] The specific process of the Predict module of the classification and regression module decoding the channel feature parameters on the final feature is as follows: the number of channels of each final feature is 18, which is adjusted and split into 3*(4+1+1), where 3 represents that each feature point on each feature layer contains three prior frames, and 4 represents the regression parameters of each feature point. The prior frame of each feature point is adjusted by the regression parameters to obtain the predicted frame, and then the predicted frame is decoded to obtain the position of the predicted frame on the original image, that is, the predicted frame information, including the center coordinates, border length and border width of the hot spot defect; the first 1 represents whether the feature point contains defects, and the second 1 represents the type of defects contained in the feature point. The defect type is the category label hotspot.

[0063] The detection results output by the three branches of the classification and regression modules are sorted by scores and screened by non-maximum suppression. Score screening is to screen out the prediction boxes whose scores meet the confidence level, and non-maximum suppression is to screen out the boxes with the largest scores of the same type in a certain area, so as to obtain the final prediction box information of the hot spot defect (including the center coordinates, border length and border width of the hot spot defect), category label and the confidence level of the corresponding prediction box.

[0064] Step 3: Train the defect detection model

[0065] 3-1) Parameter settings

[0066] We used an Ubuntu 22.04 system and the Pytorch 1.9.0 deep learning framework for training on two NVIDIA GeForce RTX3090Ti GPUs. We used stochastic gradient descent (SGD) to update the network model training parameters, setting the weight decay value to 0.0001, the initial learning rate to 0.01, and an exponentially decayed learning rate with a decay exponent of 0.9. The batch size was set to 64 and the iteration period was 300. We used random assignment to initialize the network model training parameters.

[0067] 3-2) Training of defect detection model

[0068] The training image set in step 1-2) is input into the defect detection model with completed parameter setting in batches for training, and the training loss of a batch of images is calculated; the training loss is the average of the defect coordinate loss, target confidence loss and classification loss, among which the defect coordinate loss function adopts CIoU loss, and the target confidence loss function and the classification loss function both adopt BCEWithLogitsLoss (binary cross entropy loss with log); according to the training loss, the stochastic gradient descent (SGD) method is used to update the training parameters of the model once along the gradient direction of the parameters to complete the training of a batch of images; the training parameters of the model when the previous batch of images is trained are used as the initial parameters for the next batch of images, and based on the training loss of the batch of images, the training parameters of the model are updated again by back propagation, and the iteration is continued until the loss converges to complete the training of the defect detection model.

[0069] The test image set in step 1-2) is input into the trained defect detection model to obtain the detection results of the images in the test image set. All the detection results are counted, and different detection models are used to compare on the same data set to test the detection effect of the defect detection model designed by the present invention. The comparison results are detailed in Table 1.

[0070] Table 1 Comparison of detection results of different detection models

[0071]

[0072] As can be seen from the table, the recall rate, precision rate, and F1 score of the method of the present invention are all higher than those of the Cascade RCNN model, RetinaNet model, and YOLOv7 model. Higher recall rate and detection rate mean lower missed detections and false detections. At the same time, the AP50 and MIOU indicators are also greater than those of the other three models, indicating that the network can locate defects more accurately, verifying the effectiveness of the present invention.

[0073] Step 4: Hot spot defect detection in photovoltaic power stations

[0074] A size normalization operation is performed to make the photovoltaic power station image to be inspected the same size as the image in the training image set in step 1-1), and then it is input into the defect detection model trained in the third step to obtain the hot spot defect detection result of the photovoltaic power station image.

[0075] Any matters not described in the present invention are applicable to the prior art.

Claims

1. A method for detecting hot spot defects in photovoltaic power stations based on feature perception, characterized in that: The method comprises the following steps: Step 1: Build a dataset 1-1) Obtaining an original image set of images of a photovoltaic power station with hot spot defects, performing data augmentation on each image in the original image set, and then performing size normalization on all images to obtain a training image set; the number of images in the training image set is no less than 500; 1-2) Manually label the PV power plant images with hot spot defects in the training image set using LabelImg software. The labeled information includes the center coordinates, border length, border width, and category label "hotspot" of the hot spot defect area box; Step 2: Build a hot spot defect detection model for photovoltaic power stations based on feature perception; The defect detection model consists of three parts: a feature extraction module, a feature fusion module, and a classification and regression module. The feature extraction module adopts the CSPDarknet53 structure, including the CBM module, CSP1 module, CSP2 module, the first CSP8 module, the second CSP8 module, the CSP4 module, the first CBL module, the SPP module, and the second CBL module. The above nine modules are connected in sequence, with input data from the CBM module, and the output of the previous module serving as the input of the next module. Among them, the output feature of the CSP2 module is recorded as C2, the output feature of the first CSP8 module is recorded as C3, the output feature of the second CSP8 module is recorded as C4, and the output feature of the second CBL module is recorded as C5. The four features C2, C3, C4, and C5 are sent to the feature fusion module for feature fusion. The feature fusion module includes multiple CBL modules and multiple AFNF modules; for the four input features C2, C3, C4, and C5, the feature fusion part first processes the C4 feature after the CBL module No. 4 and then performs a downsample operation on the feature and the C5 feature, and sends them to the AFNF module No. 1 for processing to obtain the enhanced feature N5; then the feature of the C4 feature processed by the CBL module No. 3, the feature of the C3 feature processed by the CBL module No. 2 and then performs a downsample operation on the feature, and the feature of the N5 feature processed by the CBL module No. 5 and then performs an upsample operation on the feature, and send them to the AFNF module No. 2 for processing to obtain the enhanced feature N4; then the feature of the C3 feature processed by the CBL module No. 2, the feature of the C2 feature processed by the CBL module No. 1 and then performs a downsample operation on the feature, and the feature of the N4 feature processed by the CBL module No. 6 and then performs an upsample operation on the feature, and send them to the AFNF module No. 3 for processing to obtain the enhanced feature N3; The classification and regression module consists of three branches, which process the three enhanced features N3, N4, and N5 respectively and output detection results at three different scales. Each branch of the classification and regression module includes the FPA module, CBL module, Conv module, and Predict module connected in sequence. The Predict module outputs the detection results of the classification and regression module. The basic structure of the CSP1 module, CSP2 module, first CSP8 module, second CSP8 module, and CSP4 module is the same, all consisting of CBM modules, Resunit modules, and Concat modules. The difference lies in the number of Resunit modules. The number of Resunit modules in the CSP1 module, CSP2 module, and CSP4 module is 1, 2, and 4, respectively, and the number of Resunit modules in the first CSP8 module and the second CSP8 module is 8. The five modules are represented by the general formula CSPX, where X = 1, 2, 4, and 8. The CSPX module includes 5 CBM modules, X Resunit modules, and one Concat module. The input of the CSPX module is first processed by the first CBM module, and the obtained result is then processed by two branches. The first branch is a structure in which the second CBM module, X Resunit modules, and the third CBM module are connected in sequence. The second branch is composed of the fourth CBM module. The outputs of the two branches are processed by the Concat module and then by the fifth CBM module to obtain the output of the CSPX module. The Resunit module includes two CBM modules and a residual edge. The input M1 of the Resunit module is processed by the two CBM modules in sequence to obtain M2; M1 is then added to M2 through the residual edge to obtain the output of the Resunit module; The structures of the CBL module in the feature extraction module, the CBL module in the feature fusion module, and the CBL module in the classification and regression module are the same, which are all structures of convolutional layers, normalization layers, and activation layers connected in sequence, but the parameters are not shared; The CBM modules in the defect detection model all have the same structure, which consists of a convolutional layer, a normalization layer, and an activation layer connected in sequence, but the parameters are not shared; The SPP module consists of four branches, three of which are maximum pooling layers with window sizes of 5×5, 9×9, and 13×13. The outputs of the three branches are then concat-operated with the residual edges to obtain the output of the SPP module. The structures of multiple AFNF modules in the feature fusion module are the same, but the parameters are not shared. The AFNF module first performs a Concat operation on the n input features of the same scale. For the obtained result A1, the shape of A1 is nC×H×W. First, after the global maximum pooling operation, two 1×1 Conv operations, and a Sigmoid operation are connected in sequence, A2 is obtained. The shape of A2 is nC×1×1; then A1 and A2 are multiplied to obtain A3, and the shape of A3 is nC×H×W. A3 is then split into n features of the shape of C×H×W, and then the n features are added to obtain the output features of the AFNF module. The shape of the output features is C×H×W; for AFNF module No. 1, n is 2; for AFNF module No. 2 and AFNF module No. 3, n is 3; The FPA module first performs three different GAP operations on the input feature F with a shape of C×H×W to obtain primary features with shapes of 4×4×C, 2×2×C, and 1×1×C. The three primary features are then reshaped to obtain intermediate features with shapes of 16C×1×1, 4C×1×1, and 1C×1×1. The three intermediate features are then concat-operated to obtain a feature H with a shape of 21C×1×1. After that, feature H is processed by two different fully connected layers to obtain features U and I, where the shape of feature U is C×1×1 and feature I is the channel weight coefficient. Feature U is multiplied by the input feature F and then added to the input feature F to obtain a feature P with a shape of C×H×W. Feature P is then multiplied by feature I to obtain the output feature O of the FPA module, and the shape of the output feature O is C×H×W. After the three enhanced features output by the feature fusion module are input into the classification and regression module, they are first processed by the FPA module, CBL module, and Conv module of a branch respectively. The Conv module consists of a 2D convolution layer, a BN layer, and an activation function. After being processed by the corresponding Conv module, the three branches output the final features respectively. Each final feature is then input into the Predict module of the corresponding branch. The Predict module decodes the channel feature parameters on the final feature to obtain the predicted box information, whether it contains defects, and the type of defects. The detection results output by the Predict modules of the three branches of the classification and regression modules are ranked by scores and filtered using non-maximum suppression to obtain the final prediction box information, category label, and confidence level of the corresponding prediction box of the hot spot defect; Step 3: Train the defect detection model 3-1) Parameter settings We used Ubuntu 22.04 and Pytorch 1.9.0 as the deep learning framework. We used stochastic gradient descent to update the network model training parameters, set the weight decay value to 0.0001, the initial learning rate to 0.01, and an exponentially decayed learning rate with a decay exponent of 0.

9. We also set the batch size to 64 and the iteration period to 300. We also used random assignment to initialize the network model training parameters. 3-2) Training of defect detection model The training image set in step 1-2) is input into the defect detection model with completed parameter setting in batches for training, and the training loss of a batch of images is calculated; the training loss is the average of the defect coordinate loss, the target confidence loss and the classification loss, where the defect coordinate loss function adopts CIoU loss, and the target confidence loss function and the classification loss function both adopt BCEWithLogitsLoss; according to the training loss, the stochastic gradient descent method is used to update the training parameters of the model once along the gradient direction of the parameters to complete the training of a batch of images; the training parameters of the model when the previous batch of images is trained are used as the initial parameters for the next batch of images, and according to the training loss of the batch of images, the training parameters of the model are updated again by back propagation, and the iteration is continued until the loss converges, thereby completing the training of the defect detection model; Step 4: Hot spot defect detection in photovoltaic power stations A size normalization operation is performed to make the photovoltaic power station image to be inspected the same size as the image in the training image set in step 1-1), and then it is input into the defect detection model trained in the third step to obtain the hot spot defect detection result of the photovoltaic power station image.

2. The method for detecting hot spot defects in photovoltaic power plants based on feature perception according to claim 1, characterized in that: In step 1-1), data enhancement methods include rotation, flipping, and cropping.

3. The method for detecting hot spot defects in photovoltaic power plants based on feature perception according to claim 1, characterized in that: In step 1-1), the image size after size normalization is 640×512 pixels.

4. The method for detecting hot spot defects in photovoltaic power plants based on feature perception according to claim 1, characterized in that: In the second step, the shapes of the three enhanced features output by the feature fusion module are (20, 20, 1024), (40, 40, 512), and (80, 80, 256).

5. The method for detecting hot spot defects in photovoltaic power stations based on feature perception according to claim 1, characterized in that: In the second step, the shapes of the final features output by the Conv modules of the three branches of the classification and regression modules are (20, 20, 18), (40, 40, 18), and (80, 80, 18), respectively.

6. The method for detecting hot spot defects in photovoltaic power plants based on feature perception according to claim 1, characterized in that: In the second step, the Predict module of the classification and regression module decodes the channel feature parameters on the final feature. The specific process is as follows: the number of channels of each final feature is 18, which is adjusted to 3*(4+1+1), where 3 represents that each feature point on each feature layer contains three prior frames, and 4 represents the regression parameters of each feature point. The prior frame of each feature point is adjusted by the regression parameters to obtain the prediction frame, and then the prediction frame is decoded to obtain the position of the prediction frame on the original image, that is, the prediction frame information, including the center coordinates, border length and border width of the hot spot defect; the first 1 represents whether the feature point contains defects, and the second 1 represents the type of defects contained in the feature point. The defect type is the category label hotspot.

Citation Information

Patent Citations

  • Photovoltaic panel infrared image hot spot detection method and system based on YOLOv5

    CN114299033A

  • Defect detection method based on joint optimization and mixed attention feature fusion

    CN115294038A