Photovoltaic cell intelligent defect detection method based on YOLO

Through the YOLO-based intelligent defect detection method of photovoltaic cells, the YOLO-PVMODULE model and data enhancement technology is used to solve the problem of low accuracy of YOLO algorithm on the data set and the low recognition rate of small targets is low, achieving efficient and accurate photovoltaic cell defect detection.

CN119580067APending Publication Date: 2025-03-07EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411655433.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The YOLO algorithm has not high accuracy on the data set, especially on small targets, and the traditional artificial recognition battery EL is low efficiency and accuracy.

Method used

A smart defect detection method for photovoltaic cells based on YOLO is proposed. By using photovoltaic cell EL images to form an image data set, defect classification and annotation, data augmentation is performed, and model training is performed using the YOLO-PVMODULE model, including the backbone network Backbone and the head network Head, combining the CBAM attention mechanism, SPPF module and FPN module, the loss function is optimized and the NWD index is introduced.

Benefits of technology

It effectively improves the efficiency and accuracy of photovoltaic cell defect detection, solves the problem of low recognition rate of YOLO algorithm on small targets, and reduces the need for human identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580067A_ABST
    Figure CN119580067A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic cell intelligent defect detection method based on YOLO, and relates to the field of artificial intelligence target recognition. According to the method, a YOLO-PVMODULE model is mainly provided, and the YOLO-PVMODULE model comprises a backbone network Backbone and a head network Head; wherein the backbone network adopts CSPDarkNet53 as a main body structure, and is composed of a convolution module, a C3 module, a CBAM attention mechanism and an SPPF module; the head network is composed of a convolution module, an up-sampling module, a splicing module, a C3 module without a residual structure and a Detect module, semantic information is transmitted in the high-to-low direction and the low-to-high direction through an FPN module and a PAN module, and a final detection prediction result is generated from a multi-scale feature map; in addition, by replacing IOU with DIOU and adding NWD, the positioning loss in the loss function is successfully reduced. The YOLO-based photovoltaic cell intelligent defect detection method provided by the invention has good defect identification capability, and effectively improves the efficiency and accuracy of photovoltaic cell defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence target recognition, and in particular to a photovoltaic cell intelligent defect detection method based on YOLO. Background Art

[0002] In the large category of target detection, commonly used detection algorithm frameworks include Two-stage and One-stage. The Two-stage target detection framework usually generates candidate regions (which may contain pre-selected boxes of the objects to be detected), and then performs object classification and position regression through convolutional neural networks. Common Two-stage target detection algorithms include R-CNN, Fast R-CNN, Faster R-CNN, etc.; the One-stage target detection framework directly extracts features in the network to predict object classification and location without generating candidate regions. Common One-stage target detection algorithms include YOLO, SSD, etc.

[0003] As a large model for target detection, YOLO itself has the characteristics of fast speed and good real-time performance, and does not require very high computing performance. In addition, the YOLO framework is relatively mature and can integrate Faster R-CNN or other useful modules that can improve accuracy to make it have both speed and accuracy (YOLOv2 has a good effect), so that it can complete the task of photovoltaic cell EL defect detection well. Among YOLO, the YOLOv5 model is widely used in industrial detection, and its accuracy on small data sets is recognized as the highest in the entire YOLO series.

[0004] Photovoltaic EL detection, that is, electroluminescence testing, as a non-destructive detection technology widely used in the photovoltaic industry, is the battery defect identification method adopted by the present invention. During the EL detection process, a forward current higher than the short-circuit current is applied to the photovoltaic module to excite the electrons inside the module to emit infrared light, and these infrared lights can be accurately captured by the EL detector. The intensity and distribution of these infrared lights can intuitively reflect the internal structure and performance of the component, and can accurately determine whether each battery has defects, thereby ensuring the quality and performance stability of the battery. However, the traditional manual identification method is not only time-consuming and labor-intensive, but also difficult to guarantee the accuracy of identification. In view of this, there is an urgent need for an intelligent photovoltaic cell defect identification system that does not rely on manual labor to improve detection efficiency and accuracy and meet the growing quality control needs of the photovoltaic industry. Summary of the invention

[0005] The purpose of the present invention is to propose a photovoltaic cell intelligent defect detection method based on YOLO to solve the problems that the accuracy of the YOLO algorithm on the data set is not high, the overall recognition rate on small targets is low, and the efficiency and accuracy of artificial large-scale identification of battery EL are low.

[0006] To achieve the above purpose, the present invention proposes a photovoltaic cell intelligent defect detection method based on YOLO, and the specific steps are as follows:

[0007] S1, using photovoltaic cell EL images to form image datasets;

[0008] S2, classify and annotate defects on image datasets;

[0009] S3, data enhancement of image datasets through parameter adjustment, including image color hue and saturation processing, image rotation, folding, resizing, image mosaic processing, and image cropping and splicing;

[0010] S4. Use the YOLO-PVMODULE model to train the model of the image dataset to complete the identification of specific defect information and the assessment of accuracy.

[0011] Preferably, in S2, the image datasets are classified and labeled according to five categories: hidden cracks, black spots, clouds, broken fences and debris, and the labeled image datasets are divided into a training set and a validation set in a ratio of 9:1, and the data format is adjusted to a format that conforms to the YOLO input; wherein YOLO is a target detection algorithm.

[0012] Preferably, in S4, the YOLO-PVMODULE model includes a backbone network Backbone and a Head network:

[0013] The backbone network Backbone includes a convolution module, a C3 module, a CBAM attention mechanism, and a fast spatial pyramid pooling module SPPF. Its main structure adopts CSP-DarkNet53, which mainly processes and fuses feature maps, which helps to reduce the amount of calculation and improve the learning ability of the network.

[0014] Preferably, the backbone network Backbone includes five convolution modules, each of which includes a convolution layer, a BN layer and a SiLU activation function; the convolution layer is the key to feature extraction, the BN layer (batch normalization) is used to solve the gradient problem and prevent underfitting and overfitting, and the SiLU activation function enables the network to have both linear and nonlinear characteristics. Among the five convolution modules, the first convolution module uses a 6×6 convolution layer, and the remaining convolution modules use a 3×3 convolution layer.

[0015] The step size of the convolution module of the backbone network Backbone is set to 2, so that the length and width of the feature map of each convolution module are reduced to half of the original, and the input size 640 is reduced to 320, 160, 80, 40, 20.

[0016] Preferably, the backbone network Backbone includes 4 C3 modules containing three convolutional layers and residual structures, which are used for feature extraction through residual connections; the second and third C3 modules serve as output interfaces, and the fourth C3 module serves as the last output interface after passing through the SPPF module, and the corresponding outputs are 80×80, 40×40, and 20×20, respectively.

[0017] The C3 module with three convolutional layers and a residual structure consists of an initial 1×1 convolutional layer, multiple Bottleneck structures, a residual connection, and a final 1×1 convolutional layer; wherein the Bottleneck consists of three main parts: a 1×1 convolutional layer, a 3×3 convolutional layer, and another 1×1 convolutional layer.

[0018] Preferably, the CBAM attention mechanism takes into account both the characteristic information of the channel and the position information in the image, together forming a CBAM attention enhancement mechanism; the CBAM attention mechanism is added to the network layer after the 4th C3 module to suppress noise and irrelevant information, and improve the model effect through the integration of channel and spatial dimensions.

[0019] Preferably, the SPPF module uses a 5×5 maximum pooling layer Maxpool for pooling, replacing the SPP module, and completes feature fusion through multiple Maxpool layers in series rather than in parallel, thereby improving the speed of model operation.

[0020] The head network Head includes a convolution module, an upsampling module, a splicing module, a C3 module without a residual structure, and a detection module Detect.

[0021] The head network Head combines the top-down feature pyramid network module FPN to enlarge and splice smaller feature maps and the bottom-up path aggregation network module PAN to shrink and splice larger feature maps to form three detection heads, and then the three detection heads of different sizes are used for detection. The FPN module and the PAN module fuse the high-level feature maps with the low-level feature maps, which not only enhances the semantic information of the low-level feature maps, but also retains the location information of the high-level feature maps; the detection module Detect layer is used to output various information including target category, location, confidence, etc. Non-maximum suppression (NMS) is used to filter out redundant detection boxes and realize target detection.

[0022] Preferably, the head network Head combines the FPN module to expand the feature map size through the upsampling module, and uses the C3 module without residual structure to adjust the number of channels for easy splicing; combined with the PAN module, the feature map size is reduced through the convolution module, and the three C3 modules without residual structure are used to extract high-level features after splicing features and use the output feature map as the detection head for target detection.

[0023] In the FPN module, the feature map output by the backbone network is first convolved to form a new interface 1, and then the feature map output by the backbone network is upsampled, the image size is enlarged, and then it is spliced ​​with the output interface of the backbone network, and then the number of channels is adjusted through the C3 module without residual structure to form new interfaces 2 and 3; in the PAN module, the feature map is reduced again and spliced ​​with the new interface generated by FPN to form the final detection layer: 80×80, 40×40, 20×20, corresponding to the detection heads of small, medium and large detection targets respectively. The detection module Detect is composed of 3 convolutional layers.

[0024] Preferably, the feature map size is continuously scaled during the feature extraction process, and the model is adapted to target detection for images of different sizes by introducing anchor boxes. The YOLO-PVMODULE model clusters the target boxes into nine anchor boxes through the K-means clustering algorithm, and attempts to match the predicted bounding box with these predefined anchor boxes, and predicts the final target box by adjusting and learning the offset of the anchor box.

[0025] After the entire YOLO-PVMODULE model framework algorithm, the feature map will be converted into a feature vector and this is completed through the anchor frame. The anchor frame forms a feature vector 1:1, and the information includes category, location information and the probability of the target existing in the anchor frame.

[0026] Preferably, in S4, during the model training process, the YOLO-PVMODULE model adds NWD to the box loss function to address the problem of small targets in defect detection; and the YOLO-PVMODULE model uses the DIOU loss function instead of the IOU loss function to improve alignment and scale inconsistency.

[0027] Therefore, the present invention proposes a photovoltaic cell intelligent defect detection method based on YOLO, which has the following beneficial effects:

[0028] (1) The present invention solves the problem that the accuracy of the YOLO algorithm on Datasets is not high and the overall recognition rate of the algorithm on small targets is low.

[0029] (2) The present invention solves the problem of low efficiency and low accuracy in manually identifying a large number of battery ELs on a production line.

[0030] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart of the YOLO-PVMODULE model of the present invention;

[0032] Figure 2 It is the performance of each algorithm model of the present invention on the PASCAL VOC public dataset;

[0033] Figure 3 It is a comparison chart of the accuracy of YOLOv5 and YOLO-PVMODULE in Datasets. DETAILED DESCRIPTION

[0034] In order to make the technical solutions, advantages and purposes of the present invention clearer, the technical solutions of the embodiments of the present invention are clearly and completely described below. The described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of this application.

[0035] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0036] like Figure 1 As shown, the present invention provides a photovoltaic cell intelligent defect detection method based on YOLO, the steps are as follows:

[0037] (1) Use photovoltaic cell EL images to form image datasets;

[0038] This paper selects a part of public data sets and adds some private data sets to form the image data set Datasets, with a total of 1074 images.

[0039] (2) Defect classification and annotation of the image datasets. The present invention classifies defects into five categories: cracks, black spots, clouds, broken grids, and debris. The datasets are divided into a training set and a validation set at a ratio of 9:1, and the annotation format is adjusted to conform to the YOLO input format.

[0040] Labelimg is used for labeling to train and verify the accuracy of defect location, type, and probability. The labelimg labeled dataset is in voc format, and then converted into txt format by a script to meet the YOLO input dataset requirements.

[0041] (3) Data enhancement of the dataset is performed through parameter adjustment, involving image color hue, saturation, image rotation, folding and resizing, image mosaic processing, and image cropping and splicing.

[0042] There are two ways to enhance the dataset: one is to directly increase the number of images, and the other is to debug using YOLO’s own data enhancement parameters.

[0043] The second one is used in the present invention.

[0044] (4) YOLO-PVMODULE is used for model training on image datasets to identify specific defect information and assess accuracy.

[0045] Use precision, recall, and mAP50 to measure the performance of the model.

[0046] Precision measures the proportion of targets that are actually identified by the model. The formula is as follows:

[0047]

[0048] Recall measures the proportion of all actual targets that are detected. The formula is as follows:

[0049]

[0050] Among them, TP is a true positive example, that is, the target correctly identified by the model; FP is a false positive example, that is, the model mistakenly identifies a non-target as a target; FN is a false negative example, that is, the actual target missed by the model.

[0051] mAP50 represents the average accuracy of the model across all categories when the IOU threshold (i.e., the overlap between the predicted bounding box and the true bounding box) is 0.5. mAP50 combines precision and recall. The higher the mAP50 value, the higher the accuracy of the model in finding most of the correct results, and the better the overall performance.

[0052] like Figure 2-3 As shown, the present invention is improved based on YOLOv5, and the specific measures are as follows:

[0053] 1. Add the CBAM attention enhancement mechanism to the backbone network. The CBAM attention mechanism consists of a channel attention module and a spatial attention module. The input feature map is pooled at the maximum and along the channel dimension and globally averaged, and the information of each channel in the spatial dimension and the global channel is compressed. The two pooled feature maps are added after convolution, and the Sigmoid activation function is applied to obtain the weight coefficient of each channel and spatial attention. CBAM is used to suppress noise and irrelevant information, and improve the model effect by integrating the channel and spatial dimensions. In terms of effect, the CBAM module is plug-and-play and has a significant performance improvement on Datasets.

[0054] 2. YOLOv5 has three major losses: classification loss, localization loss, and confidence loss. Classification loss is used to measure whether the model can accurately classify objects in the image into the correct category. Localization loss is used to measure the difference between the bounding box predicted by the model and the true bounding box. Confidence loss is used to measure the degree to which the model predicts that the bounding box covers the object, that is, the confidence that the target exists in the predicted box. Reducing the loss can effectively improve the performance of the model. Among the three major losses, the largest performance on the Datasets dataset is the localization loss, as shown in Table 1.

[0055] Table 1 Comparison of the three major losses of the two algorithm models

[0056] YOLOv5 YOLO-PVMODOLE Classification Loss 0.0097623 0.0096967 Positioning loss 0.033888 0.01789 Confidence loss 0.0032941 0.0021832

[0057] Therefore, the present invention makes two major improvements in positioning loss:

[0058] 1. Change IOU to DIOU

[0059] IOU (intersection over union) is an important indicator to measure the overlap between the predicted box and the real box, but the IOU loss is 0 when the two boxes have no intersection at all and cannot perform gradient calculation, and it is insufficient to measure when the two boxes overlap. To solve this problem, the DIOU loss function replaces the IOU, and the formula is as follows:

[0060]

[0061] Among them, ρ 2 (b,b gt ) is the Euclidean distance between the center point of the predicted box and the real box, and c is the diagonal length of the smallest box covering the predicted box and the real box.

[0062] The DIOU loss not only considers the overlapping area between the predicted box and the true box, but also the distance between the center points of the two boxes and the size of the boxes.

[0063] As shown in the above formula, even if the two boxes do not have any intersection, the positioning loss is not 0, and the gradient calculation can be performed; similarly, when the overlap rate of the two target boxes is very high, one of the boxes will not be easily discarded due to the introduction of the center point distance, thereby achieving the purpose of optimizing the loss function and not missing two defects that are very close or even overlapping.

[0064] 2. Introducing NWD into the model

[0065] Small object detection is a very challenging problem because small objects usually only contain a few pixels in size and lack sufficient appearance information. Therefore, object detectors often have difficulty in producing satisfactory results on small objects: position deviations are very likely to occur in the detection of small objects, and the detection performance will be sharply deteriorated when used in anchor-based detectors.

[0066] In order to solve the above problems, a new evaluation metric, the Normalized Wasserstein Distance (NWD), is proposed. NWD evaluates the detection effect of small objects more accurately by modeling the bounding box as a 2D Gaussian distribution and calculating the similarity between the corresponding Gaussian distributions. NWD reduces the false negative examples FN in small target detection by more accurately evaluating the similarity between bounding boxes, thereby improving the overall detection performance. The advantage of this distance is that even if the two boxes do not overlap at all, or overlap very little, the similarity can still be measured. In addition, NWD is insensitive to the scale of the target and is more stable for small targets.

[0067] Taking mAP50 as the measurement standard, after training for 100 epochs, the optimal weight parameters performed well on the test set: the individual defect recognition accuracy was as high as 99.5% and the average defect recognition rate could reach 95%.

[0068] Therefore, the photovoltaic cell intelligent defect detection method based on YOLO proposed in the present invention has good defect recognition ability, effectively improves the efficiency and accuracy of photovoltaic cell defect detection, and solves the problem that the accuracy of the YOLO algorithm on the Datasets data set is not high and the overall recognition rate of the algorithm on small targets is low.

[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A photovoltaic cell intelligent defect detection method based on YOLO, characterized in that: The specific steps are as follows: S1, using photovoltaic cell EL images to form image datasets; S2, classify and annotate defects on image datasets; S3, data enhancement of image datasets through parameter adjustment, including image color hue and saturation processing, image rotation, folding, resizing, image mosaic processing, and image cropping and splicing; S4. Use the YOLO-PVMODULE model to perform model training on the image dataset.

2. According to claim 1, a photovoltaic cell intelligent defect detection method based on YOLO is characterized in that: In S2, the image datasets are classified and labeled according to five categories: hidden cracks, black spots, clouds, broken fences and debris, and the labeled image datasets are divided into training sets and validation sets. At the same time, the data format is adjusted to a format that conforms to the YOLO input; among them, YOLO is a target detection algorithm.

3. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 1, characterized in that: In S4, the YOLO-PVMODULE model includes a backbone network Backbone and a head network Head: The backbone network Backbone adopts CSP-DarkNet53 as its main structure, including convolution module, C3 module, CBAM attention mechanism and fast spatial pyramid pooling module SPPF; The head network Head includes a convolution module, an upsampling module, a splicing module, a C3 module without a residual structure, and a detection module Detect.

4. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 3 is characterized in that: The backbone network Backbone includes five convolution modules, each of which includes a convolution layer, a batch normalization BN layer and a SiLU activation function.

5. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 3 is characterized in that: The backbone network Backbone includes 4 C3 modules with three convolutional layers and residual structures, which are used for feature extraction through residual connections; the second and third C3 modules serve as output interfaces, and the fourth C3 module serves as the last output interface after passing through the SPPF module.

6. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 3 is characterized in that: The CBAM attention mechanism is added to the network layer after the 4th C3 module and integrates the channel dimension and the spatial dimension.

7. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 3 is characterized in that: The SPPF module uses the maximum pooling layer Maxpool for pooling, replacing the pyramid pooling module SPP, and completes feature fusion by serializing multiple Maxpool layers.

8. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 3 is characterized in that: The head network Head combines with the feature pyramid network module FPN to expand the feature map size through the upsampling module, and uses the C3 module without residual structure to adjust the number of channels for easy splicing; combined with the path aggregation network module PAN, the convolution module is used to reduce the feature map size, and three C3 modules without residual structure are used to extract high-level features after splicing features and use the output feature map as the detection head for target detection.

9. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 8, characterized in that: The size of the feature map will be continuously scaled during the feature extraction process, and the anchor frame is introduced through the K-means clustering algorithm to enable the model to meet the target detection of images of different sizes.

10. The photovoltaic cell intelligent defect detection method based on YOLO according to claim 1, characterized in that: In S4, during the model training process, the YOLO-PVMODULE model adds the normalized Wasserstein distance NWD to the box loss function; the YOLO-PVMODULE model uses the loss function DIOU instead of the loss function IOU.