Photovoltaic module hot spot detection method based on improved YOLOv5
By improving the YOLOv5 model, the problem of insufficient quality detection speed and accuracy of photovoltaic panels is solved, and an efficient and automated detection process is achieved, and product quality and detection efficiency are improved.
Patent Information
- Application Number
- CN202411611184.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
AI Technical Summary
In the existing photovoltaic power generation technology, the quality detection of photovoltaic panels relies on manual observation, and there are limitations in speed and accuracy, making it difficult to meet the efficient detection needs of large-scale production.
The thermal spot detection method of photovoltaic modules based on improved YOLOv5 is adopted, and images are collected through infrared thermal imagers, filtered and denoised and feature extraction are performed, and the improved YOLOv5 model is used for detection to achieve rapid classification and identification of photovoltaic modules.
It significantly improves the speed and accuracy of hot spot detection of photovoltaic modules, promotes the automation of the detection process, improves product quality, reduces the defective yield rate and economic losses, and reduces the work burden of manual testing.
Smart Images

Figure BDA0005130932130000021 
Figure BDA0005130932130000031 
Figure BDA0005130932130000032
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer image classification, and in particular to a photovoltaic component hot spot detection method based on improved YOLOv5. Background Art
[0002] At present, photovoltaic power generation technology has been widely used and popularized around the world, and its future development prospects are extremely optimistic. This technology is flexible and diverse, and can adapt to the needs of various scenarios, such as rooftop photovoltaic power generation systems, large photovoltaic power stations, and portable photovoltaic equipment. However, in the production and manufacturing process of solar photovoltaic panels, although strict quality control and testing measures are implemented in all links, a certain number of defective products will inevitably be produced due to factors such as equipment, raw materials and production processes. These defective products not only reduce the overall output and increase production costs, but also have a significant adverse impact on product quality.
[0003] In view of the large-scale production of solar photovoltaic panels, efficient and accurate quality inspection is particularly important. The current commonly used method is to distinguish the panels by observing their performance when powered on, but this manual inspection method has limitations in speed and accuracy. Therefore, the industry urgently needs an innovative method to significantly improve the inspection efficiency and accuracy of the results, so as to better ensure the quality and market competitiveness of photovoltaic products. Summary of the invention
[0004] In order to solve the technical problems existing in the above-mentioned prior art, the present invention provides a photovoltaic module hot spot detection method based on improved YOLOv5. The introduction of this method significantly improves the speed and accuracy of detection, and effectively promotes the automation process of the detection process.
[0005] To achieve the above purpose, the present invention provides the following technical solution: a photovoltaic module hot spot detection method based on improved YOLOv5, the method is as follows:
[0006] S1. Select the photovoltaic modules of the fault samples to be collected, use the infrared thermal imager to transfer the captured images to the computer, and obtain the original data set;
[0007] S2, filtering and denoising the infrared image;
[0008] S3, extracting the fault image features of photovoltaic modules to obtain a photovoltaic module hot spot dataset, dividing the photovoltaic module hot spot dataset into a training set, a test set and a validation set according to a preset ratio, and performing data expansion on the training set;
[0009] S4. The photovoltaic module image to be inspected is inspected by using the improved YOLOv5 model, and the defects of the image are determined according to the feature vector of the image to be inspected.
[0010] Preferably, in S1, an infrared thermal imager is used to obtain an electroluminescent image of a photovoltaic panel: the image size is 2048*2048 pixels, each sampled image is evenly divided into 8*8 specific small parts, and the pixels of each small part are 256*256.
[0011] Preferably, in S2, Gaussian filtering and bilateral filtering are used to complete denoising, and the processing process is as follows:
[0012]
[0013] In the formula, δ is the scale of Gaussian filtering; and They are the smoothing parameters for adjusting the spatial distance and grayscale value respectively.
[0014] Preferably, in S3, the photovoltaic component fault image features selected are linear hidden cracks, broken grids, black cores, thick lines and star-shaped hidden cracks of photovoltaic panels, and the image features are allocated into training set, verification set and test set in a ratio of 7:1.5:1.5; and the training set is expanded for images of linear hidden cracks, broken grids and thick line defect types through random mirroring and flipping technology.
[0015] Preferably, a convolutional neural network is used to extract photovoltaic module fault features.
[0016] Preferably, the specific improvements to the YOLOv5 model include replacing the original SPP Block with a Dilated Block composed of dilated convolutions, introducing an ECA network to enhance the model's attention to key channel information, and proposing a lightweight module based on deep separable convolutions.
[0017] Preferably, in S4, the similarity between the fault features of the photovoltaic module image and the standard features is measured by feature matching, and the detection, classification and positioning information of the photovoltaic module image fault is output.
[0018] Preferably, the similarity calculation formula is:
[0019]
[0020] In the formula, τ represents the fault feature vector extracted from the current PV module image; τcolour represents the color feature in the standard fault feature vector;
[0021] If the calculated feature similarity is higher than the threshold, the photovoltaic module image contains a fault, otherwise it is considered that the current photovoltaic module image does not have a fault.
[0022] Preferably, the geometric parameter information of the photovoltaic module image fault is calculated as follows:
[0023]
[0024] Where Dedge-max and Dedge-min are the farthest and nearest edge nodes respectively; Dedge-max-Dedge-min is the spot radius.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The present invention integrates artificial intelligence algorithms with input image data to achieve rapid classification and identification of defects in solar photovoltaic panels, significantly improves the speed and accuracy of detection, and effectively promotes the automation of the detection process. Through this method, not only the product quality is significantly improved, but also the economic losses caused by defective products are greatly reduced. In addition, it also greatly reduces the workload of manual detection and significantly reduces the dependence on human resources. DETAILED DESCRIPTION
[0027] The present invention will be described below by way of examples. Obviously, the examples described are only representative of some typical solutions, not all examples. In the same or other situations, there are other preferred embodiments.
[0028] This embodiment proposes a photovoltaic module hot spot detection method based on improved YOLOv5, and the specific method steps are as follows:
[0029] Select the photovoltaic modules of the fault samples to be collected, determine the area to be inspected, use a high-resolution infrared thermal imager to transfer the captured images to the computer to ensure that it can provide high-resolution infrared images and obtain the original data set; specifically, the photovoltaic module image size is 2048*2048 pixels. Each sampled image can be evenly divided into 8*8 specific small parts, and the pixels of each small part are 256*256.
[0030] Filtering and denoising the infrared image. During the acquisition process, the infrared image may be disturbed by various factors, such as ambient light, thermal noise, sensor noise, etc. These noises will affect the clarity and details of the image, reducing the quality and usability of the image. By filtering and denoising the infrared image, the interference of these noises can be effectively reduced, making the image clearer and truly reflecting the temperature distribution of the photovoltaic module. Filtering and denoising can improve the visibility of the fault area. There may be various types of faults on the photovoltaic module, such as hot spot cracks, pollution, etc. These fault areas are usually different from the surrounding areas in temperature, but the presence of noise makes the fault signal blurred and difficult to distinguish. By filtering and denoising the infrared image, the temperature gradient of the fault area can be highlighted, making the fault signal more obvious, which is convenient for fault identification and location.
[0031] This embodiment uses Gaussian filtering and bilateral filtering to complete denoising. Gaussian filtering and bilateral filtering are both commonly used image filtering methods that can effectively reduce noise in images. Gaussian filtering uses a Gaussian kernel function to smooth the image, and removes high-frequency noise by weighted averaging the area around each pixel, so that good image details can be maintained. Bilateral filtering considers the spatial distance of pixels and the similarity between pixel values on the basis of Gaussian filtering, and performs filtering by weighted averaging to retain details such as image edges and textures. Denoising operations usually introduce a certain amount of information loss. If only simple filtering methods such as traditional mean filtering or median filtering are used to remove noise, image details may be overly blurred or distorted, reducing image quality. Gaussian filtering and bilateral filtering can balance the contradiction between denoising and detail retention to a certain extent. The smoothing operation of Gaussian filtering can effectively reduce the impact of noise, while bilateral filtering, while denoising, maintains the detailed features of image texture and edges by considering the similarity of pixel points. Denoising is completed using Gaussian filtering and bilateral filtering, and the processing process is as follows:
[0032]
[0033] In the formula, δ is the scale of Gaussian filtering; and They are the smoothing parameters for adjusting the spatial distance and grayscale value respectively.
[0034] Extracting the features of photovoltaic module fault images, among the 12 types of photovoltaic panel defects originally included in the data set, some defects are relatively rare or less important in actual industrial applications. This example selects five most common and critical defect types for in-depth research based on industrial needs and the actual distribution of defects. These five defects are linear cracks, broken grids, black cores, thick lines, and star-shaped cracks, and a total of 4216 images are included in the analysis scope.
[0035] During further analysis, the number of samples of various defects in the data set was not evenly distributed, especially the number of samples of black core defects was significantly higher, which may cause the model to be too biased towards identifying this easier-to-detect defect during training, thereby affecting the ability to identify other more complex or difficult-to-detect defects. In order to solve this problem, the data set was re-screened and balanced. Specifically, 3,827 defect images were carefully selected from the original data set, among which the samples of black core defects were strictly restricted to reduce their number and proportion, so as to achieve a relative balance of defect categories. Next, in order to use these data more efficiently for model training and verification, these images were allocated as training sets, verification sets, and test sets in a ratio of 7:1.5:1.5. This division ensures that the training set has enough data to train the model, and that the verification set and test set have enough samples to evaluate the performance of the model. In particular, for defects such as linear cracks, broken grids, and thick lines that may be difficult to identify in images due to their small size, a variety of image enhancement techniques are used to enhance the training set. These techniques include random mirroring and flipping to increase data diversity, as well as Gaussian blur and Gaussian noise to simulate image quality degradation that may be encountered in real environments. Through these enhancement operations, the training set was successfully expanded to 3,342 images, aiming to improve the model's recognition ability and robustness to these small-sized defects.
[0036] In the field of photovoltaic module fault image analysis, choosing Convolutional Neural Network (CNN) in machine learning algorithms as a feature extraction tool is an efficient and advanced strategy. As a deep learning model, CNN is particularly good at processing image data. Its unique structure enables it to demonstrate excellent ability in automatically extracting and learning multi-level and abstract features in images. The features contained in photovoltaic module fault images include but are not limited to specific texture patterns, geometric shapes, and color anomalies, which are crucial for fault diagnosis and classification. CNN can gradually extract more and more complex and abstract feature representations from the original image through stacked convolutional layers and pooling layers. This process is automatic and does not require manual intervention to design feature extractors, thus avoiding the feature selection bias and limitations that may exist in traditional methods. Compared with traditional image feature extraction methods, the advantage of CNN is that it can capture feature information of different scales and levels in images. This ability enables CNN to show higher robustness and accuracy when dealing with the complexity and diversity of photovoltaic module fault images. In addition, as an end-to-end learning framework, CNN can directly start from the original image data, automatically optimize the network parameters through the back-propagation algorithm, and learn the feature representation that is most suitable for the current task. In the tasks of classification, detection and diagnosis of photovoltaic module fault images, the application of CNN has greatly improved the processing efficiency and accuracy. By learning on a large-scale training data set, CNN can learn the subtle and critical feature differences in fault images, and then realize the accurate identification of different types of faults. This data-driven feature learning method provides strong technical support for the intelligent maintenance and fault warning of photovoltaic modules. Therefore, this embodiment uses a convolutional neural network to extract the fault characteristics of photovoltaic modules. The specific process is as follows:
[0037] Start: The starting point of the entire process, marking the beginning of PV module image feature extraction.
[0038] Input photovoltaic module image: Input the photovoltaic module image to be processed into the convolutional neural network.
[0039] Convolutional neural network parameter initialization: Before the convolutional neural network starts processing images, its parameters need to be initialized. This includes setting the weights and biases of the convolution kernel (filter), as well as other related parameters. These parameters will be adjusted and optimized in subsequent iterations.
[0040] Convolution operation: Use the initialized convolution kernel to perform convolution operation on the input photovoltaic module image. The purpose of convolution operation is to extract local features in the image, such as edges, textures, etc. Different types of features can be extracted through different convolution kernels.
[0041] Pooling operation: Pooling operation is performed on the feature map after convolution operation. The purpose of pooling operation is to reduce the dimension of feature map and reduce the amount of calculation while retaining important feature information. Common pooling operations include maximum pooling and average pooling.
[0042] Has the maximum number of iterations been reached? : In convolutional neural networks, multiple iterations are usually required to optimize parameters. Each iteration performs a forward propagation and a backpropagation to update the weights and biases of the convolution kernel. After each iteration, it is checked whether the preset maximum number of iterations has been reached. If not, it continues to the next iteration; if it has been reached, it proceeds to the next step.
[0043] Weight and bias update: After reaching the maximum number of iterations, the weight and bias of the convolution kernel are updated according to the gradient information calculated by the back-propagation algorithm. This step is a key step in the neural network training process. By continuously updating the parameters, the neural network can better adapt to the input data.
[0044] Photovoltaic module feature output: After multiple iterations and parameter updates, the convolutional neural network will output the extracted photovoltaic module features. These features can be used for subsequent fault detection, classification, and location tasks.
[0045] End: The end point of the entire process, marking the completion of PV module image feature extraction.
[0046] It is also important to note that in the application scenario of hot spot detection of photovoltaic modules, when the infrared hot spot image is input into the YOLOv5 network, the processing flow first performs preliminary hot spot feature extraction through the CSPDarknet structure containing the SPP (Spatial Pyramid Pooling) module. Subsequently, these features are further enhanced and fused through the Feature Pyramid Network (FPN) to capture hot spot information at different scales. Finally, these enhanced features are sent to the YOLO Head for hot spot classification and location.
[0047] However, in order to cope with the unique challenges of different scale targets in photovoltaic module hot spot detection, the present invention makes targeted adjustments and optimizations to the YOLOv5 network structure. Specific improvement measures include:
[0048] (1) Introducing Dilated Block: To address the performance limitations of the original YOLOv5 model in detecting small target hot spots, the Dilated Block composed of dilated convolution is used to replace the original SPP Block. This change effectively reduces the information loss caused by the pooling operation, expands the network's receptive field, and thus improves the model's ability to detect hot spots of different scales.
[0049] In the hot spot detection task, the original hot spot feature layer is limited by the singleness of its receptive field scale and mainly focuses on the detection of large hot spots, which significantly restricts the detection effect of small hot spots. Since the actual size of hot spots varies, the detection algorithm must have the ability to handle hot spots of various scales. In order to make up for this deficiency and enrich the receptive field scale of the network, especially to enhance the detection ability of small hot spots and hot spots of other sizes, the present invention proposes to use a dilated convolution module (Dilated Block) to replace the original SPP (Spatial Pyramid Pooling) module. The SPP module expands the receptive field of the network by superimposing maximum pooling operations of multiple sizes, but this pooling operation is often accompanied by the loss of edge information. In contrast, dilated convolution (also called expanded convolution or dilated convolution) can effectively expand the receptive field of the network while reducing information loss without increasing the number of parameters and computational complexity. In the design of the Dilated Block, the present invention uses a dilated convolution based on a residual structure to further optimize the expansion of the receptive field. The residual structure stacks the original receptive field scale and the receptive field scale enlarged by the dilated convolution, thus avoiding the problem of original scale information loss that may be caused by traditional dilated convolution when enlarging the receptive field.
[0050] Specifically, the Dilated Block consists of two main components: a projection layer and a residual module. Its detailed structure is as follows: the projection layer first uses a 1×1 convolution (the convolution operation of this layer is accompanied by BN normalization and SiLU activation function) to reduce the number of channels to half of the original number, and then further refines the contextual semantic information through a 3×3 convolution layer. The residual module is built on residual learning and contains three convolution layers: the first 1×1 convolution is used to reduce the channel dimension to one-fourth of the original; the second 3×3 dilated convolution is used to expand the receptive field; and the last 1×1 convolution is used to restore the channel dimension. The feature maps output by these three convolution layers are stacked with the original feature maps, thereby achieving the expansion of the receptive field and the retention of the original information. In addition, in order to further enhance the richness of the multi-scale receptive field, the residual module is repeated four times, and the dilated convolution used each time has a different expansion rate (2, 4, 6, and 8, respectively). Finally, the channel dimension is restored through a 1×1 convolution layer, and the generated multi-scale receptive field feature map can effectively improve the model's detection performance for hot spots of different sizes, especially the detection accuracy of small hot spots.
[0051] (2) Integrated ECA (Efficient Channel Attention) network: In the multi-scale detection process, the ECA network is introduced to enhance the model's attention to key channel information. By adaptively adjusting the importance of different channels, the ECA network can help the model capture the characteristic information of hot spots more accurately, further improving the performance of hot spot detection.
[0052] (3) Design of Lightweight Block: Since the YOLOv5-L model has a large number of parameters, which is not conducive to lightweight deployment in practical applications, this paper proposes a lightweight module (LightweightBlock) based on deep separable convolution. This module effectively reduces the number of model parameters while maintaining a high detection speed, meeting the needs of hot spot detection in resource-constrained environments.
[0053] Specifically, the YOLOv5 series of models construct their deep feature extraction networks by stacking different numbers of residual blocks, among which the YOLOv5-L model adopts a residual block configuration ratio of 3:9:9:3. In order to reduce the complexity of the model, this study first adjusted the number of residual blocks to 3:3:9:3. This change directly led to a significant reduction in the number of model parameters, specifically reducing about 5×10^6 parameters, and unexpectedly brought about an average precision (AP) improvement of about 0.2%, indicating that in certain cases, reducing model complexity may help improve generalization capabilities. Furthermore, in response to the problem of intensive calculations within the residual block, the Lightweight block introduces a depth-separable convolution as an alternative to replace the original 3×3 ordinary convolution. Traditional 3×3 convolutions generate a large amount of computation and model parameters when performing calculations between spatial regions and channels at the same time. The depthwise separable convolution decomposes this process into two steps: first, a 3×3 depthwise convolution is used to independently calculate the spatial region of each channel, avoiding direct interaction between channels and thus reducing the amount of calculation; then, the information between channels is fused through a 1×1 point-by-point convolution. Compared with the 3×3 convolution, this process reduces the amount of calculation by about 9 times, greatly reducing the model parameters and computational complexity. Through the above two optimization measures - adjusting the number of residual blocks and introducing depthwise separable convolution, the final model parameters are reduced to 94×10^6, and the detection speed is increased from the original 25 frames / second to 31 frames / second, while maintaining almost the same detection accuracy. This result shows that the design of the Lightweight block effectively realizes the lightweight of the YOLOv5-L model, improving its deployment efficiency and performance in practical applications.
[0054] The photovoltaic module image to be inspected is inspected through the improved YOLOv5 model, and the defects of the image are judged according to the feature vector of the image to be inspected.
[0055] Based on the above-extracted photovoltaic module fault features, feature matching is used to measure the similarity between the current image features and the standard features. By measuring the similarity between the current photovoltaic module image fault features and the standard features through feature matching, tasks such as fault detection, classification and location can be achieved. By comparing image features, images with similar fault features can be identified to guide corresponding maintenance or replacement measures. In addition, feature matching can also be used for fault prediction and monitoring. By comparing with historical data, potential fault conditions can be discovered and warned in a timely manner. The similarity calculation formula is:
[0056]
[0057] If the calculated feature similarity is higher than the threshold, the photovoltaic module image contains a fault, otherwise it is considered that the current photovoltaic module image does not have a fault.
[0058] On this basis, the geometric parameters and location information of the fault in the image are determined, where the diagnosis result of the geometric parameters is:
[0059]
[0060] Where Dedge-max and Dedge-min are the farthest and nearest edge nodes respectively; Dedge-max-Dedge-min is the spot radius, which determines the diagnostic result of the fault location in the image, and finally outputs the diagnostic result of the PV module fault image in a visual form.
[0061] The applicant declares that the present invention uses the above examples to illustrate the detailed method of the present invention, but the present invention is not limited to the above detailed method, that is, it does not mean that the present invention must rely on the above detailed method to be implemented. Those skilled in the art should understand that any improvement of the present invention, equivalent transformation of the raw materials of the present invention, addition of auxiliary components, selection of specific conditions and methods, etc., all fall within the protection scope and disclosure scope of the present invention.
Claims
1. A photovoltaic module hot spot detection method based on improved YOLOv5, characterized in that: Here’s how: S1. Select the photovoltaic modules whose fault samples are to be collected, determine the area to be inspected, and use an infrared thermal imager to transfer the captured images to a computer to obtain an original data set; S2, filtering and denoising the infrared image; S3, extracting the fault image features of photovoltaic modules to obtain a photovoltaic module hot spot dataset, dividing the photovoltaic module hot spot dataset into a training set, a test set and a validation set according to a preset ratio, and performing data expansion on the training set; S4. The photovoltaic module image to be inspected is inspected by using the improved YOLOv5 model, and the defects of the image are determined according to the feature vector of the image to be inspected.
2. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 1, characterized in that: In S1, an infrared thermal imager is used to obtain electroluminescent images of photovoltaic panels: the image size is 2048*2048 pixels, and each sampled image is evenly divided into 8*8 specific small parts, and the pixels of each small part are 256*256.
3. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 1, characterized in that: In S2, Gaussian filtering and bilateral filtering are used to complete denoising. The processing process is as follows: In the formula, δ is the scale of Gaussian filtering; and They are the smoothing parameters for adjusting the spatial distance and grayscale value respectively.
4. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 1, characterized in that: In S3, the fault image features of photovoltaic modules are linear cracks, broken grids, black cores, thick lines and star-shaped cracks of photovoltaic panels, and the image features are allocated into training set, validation set and test set in a ratio of 7:1.5:1.5; and the training set is expanded by random mirroring and flipping technology for images of linear cracks, broken grids and thick lines.
5. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 4, characterized in that: Use convolutional neural network to extract photovoltaic module fault features.
6. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 5, characterized in that: Specific improvements to the YOLOv5 model include replacing the original SPPBlock with a Dilated Block composed of dilated convolutions, introducing an ECA network to enhance the model's attention to key channel information, and proposing a lightweight module based on deep separable convolutions.
7. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 1, characterized in that: In S4, the similarity between the fault features of the photovoltaic module image and the standard features is measured by feature matching, and the detection, classification and positioning information of the photovoltaic module image fault is output.
8. A photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 7, characterized in that: The similarity calculation formula is: In the formula, τ represents the fault feature vector extracted from the current PV module image; τcolour represents the color feature in the standard fault feature vector; If the calculated feature similarity is higher than the threshold, the photovoltaic module image contains a fault, otherwise it is considered that the current photovoltaic module image does not have a fault.
9. The photovoltaic module hot spot detection method based on improved YOLOv5 according to claim 7, characterized in that: The geometric parameter information of the PV module image fault is calculated as follows: In the formula, Dedge-max and Dedge-min are the farthest and nearest edge nodes respectively; Dedge-max-Dedge-min is the spot radius.
Citation Information
Cited By
High-precision and high-adaptability intelligent detection and diagnosis method and system for electronic product defects
CN120673172A