Noise-suppression-based photovoltaic cell defect detection method

By adding a three-axis coordinate attention module and a domain discriminator to the YOLOv5 model, the domain offset problem of the photovoltaic cell defect detection model on different production lines was solved, improving the detection accuracy and speed, and realizing multi-line adaptation and real-time detection.

CN116452550BActive Publication Date: 2026-02-06HEBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310431996.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-02-06
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

Existing deep learning-based photovoltaic cell defect detection methods suffer from domain offset issues on different production lines, resulting in significant differences in detection performance. Furthermore, existing models cannot meet the speed and accuracy requirements of the quality inspection process.

Method used

A three-axis attention module is added to the YOLOv5 model to enhance defect detection capabilities, and a domain discriminator is introduced for adversarial training. Combined with model structure optimization to adapt to multiple production lines, the three-axis attention module adds attention mechanisms in three dimensions: channel and two-dimensional space, to suppress background interference and improve detection accuracy. In the training phase, a domain discriminator is introduced for domain adaptation learning to reduce the cost of manual annotation.

Benefits of technology

It improves the detection capability of tiny and weak defects in photovoltaic cells, reduces the rate of missed detection and false detection, enhances the model's adaptability to different production lines, meets the real-time requirements of quality inspection, and achieves a detection speed of 100 FPS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116452550B_ABST
    Figure CN116452550B_ABST
Patent Text Reader

Abstract

The application is a noise suppression-based photovoltaic cell defect detection method, which first collects photovoltaic cell EL images from multiple production lines to construct a data set; then, a three-axis coordinate attention module is added between the SPPF module and the last CBL module of the YOLOv5 model backbone network to obtain a defect detection model; finally, the defect detection model is trained using labeled images and part of the unlabeled images in the data set, and the remaining unlabeled images are used to test the model; a domain discriminator is introduced for adversarial training in the training stage, the domain discriminator is located after the CSP1_2 module of the defect detection model backbone network, the features extracted from the CSP1_2 module from the labeled images and the unlabeled images are all input into the domain discriminator to predict the domain to which the image belongs; at the same time, the features extracted from the CSP1_2 module from the labeled images continue the subsequent operation. The method improves the detection capability of small and weak defects in the photovoltaic cell, the model has the ability of field adaptation and deep feature learning, and enhances the ability of the model to adapt to other production line data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of photovoltaic cell defect detection, and specifically relates to a photovoltaic cell defect detection method based on noise suppression. BACKGROUND

[0002] Photovoltaic cells are prone to various types of defects, such as broken grids, hidden cracks, open welds, black spots and scratches, during production, manufacturing and transportation. These defects not only reduce the photoelectric conversion efficiency of photovoltaic cells, but also shorten the service life of the cells, and in severe cases, can even cause fires and cause significant economic losses. Therefore, quality inspection is a necessary link in the production process of photovoltaic cells, and is of great significance to improving the power generation efficiency and prolonging the service life of the cells and ensuring the stability of the photovoltaic power generation system.

[0003] The target detection method based on deep learning is widely used in photovoltaic cell defect detection. This method requires that the training set and test set data are independent and identically distributed. Due to the differences in background, brightness, contrast and resolution of photovoltaic cell images collected from different production lines, domain shift, also known as offset noise, is formed between the training data and the test data. Therefore, the training set and the test set cannot meet the independent and identically distributed condition, resulting in large differences in the detection effect of the trained model for images from different production lines. Although the most direct solution is to annotate the domain offset data and retrain the model, the model obtained in this way has good detection effect on the production line to which the training data belongs, but cannot achieve satisfactory effect on other production lines, and annotating data requires a lot of manpower and material resources. In addition, the photovoltaic cell quality inspection link has high requirements for the detection speed of the model, and the existing detection model cannot meet the requirements in terms of accuracy and detection speed on the domain offset test set. SUMMARY

[0004] In view of the deficiencies of the prior art, the technical problem to be solved by the present application is to provide a photovoltaic cell defect detection method based on noise suppression.

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

[0006] A photovoltaic cell defect detection method based on noise suppression, characterized in that the method comprises the following steps:

[0007] Step 1: Collect EL images of photovoltaic cells from multiple production lines to construct a data set, which includes labeled images and unlabeled images;

[0008] Second step, a three-axis coordinate attention module is added between the SPPF module and the last CBL module of the YOLOv5 model backbone network to obtain a defect detection model; the three-axis coordinate attention module adopts an attention mechanism in three dimensions of channels and two-dimensional space, and enhances the detection ability of the defect detection model for small and weak defects;

[0009] Third step, training and testing of the defect detection model;

[0010] The defect detection model is trained using labeled images and part of the unlabeled images in the dataset, and the remaining unlabeled images are used to test the trained defect detection model; in the training stage, a domain discriminator is introduced for adversarial training, the domain discriminator is located after the CSP1_2 module of the defect detection model backbone network, and the features extracted from the CSP1_2 module from the labeled images and the unlabeled images are all input into the domain discriminator to predict the domain to which the image belongs; at the same time, the features extracted from the CSP1_2 module from the labeled images continue to perform subsequent operations of the defect detection model.

[0011] Fourth step, collect the images to be detected from the production line, normalize and input into the tested defect detection model for defect detection.

[0012] Further, the three-axis coordinate attention module includes a max pooling layer, an average pooling layer, a shared fully connected layer and an activation layer; the input of the three-axis coordinate attention module is respectively input into the max pooling layer and the average pooling layer, the outputs of the two pooling layers are respectively input into the shared fully connected layer and then are point-added, the features obtained by the point-adding operation are input into the activation layer, and then are point-multiplied with the input of the three-axis coordinate attention module to obtain a channel attention feature map; the channel attention feature map is input into the max pooling layer in the height dimension and the average pooling layer in the width dimension, and the outputs of the two pooling layers are input into the activation layer and then are point-multiplied with the channel attention feature map to obtain the output of the three-axis coordinate attention module.

[0013] Further, the domain discriminator includes a downsampling operation, a CBL module, a fully connected layer and a gradient reversal layer; the input of the domain discriminator is input into the downsampling operation, then is sequentially input into four CBL modules and two fully connected layers, and then is input into the gradient reversal layer for gradient backpropagation.

[0014] Further, in the third step, in the testing stage, each CBL module in the trained defect detection model includes a fusion layer and an activation layer, and the fusion layer is obtained by fusing a convolution layer and a normalization layer.

[0015] Further, in the first step, defect images and defect-free images are collected from one production line, and the defect images are labeled; the images collected from the remaining production lines are used as unlabeled images; the defect types include open weld, black spot, hidden crack, broken grid and scratch.

[0016] Compared with the prior art, the present application has the following beneficial effects:

[0017] 1. The defect detection model of the present application embeds a three-axis coordinate attention module, which adds attention mechanisms in three dimensions of channels and two-dimensional space, respectively, so that the network increases the attention ability to the foreground and suppresses the background interference, emphasizes meaningful features and suppresses unnecessary feature representations in the background, improves the extraction ability of the model to small features, and further improves the detection ability of small and weak defects in photovoltaic cells, improves the detection accuracy, and reduces the missed detection and false detection rate.

[0018] 2. A domain discriminator is introduced in the model training stage, which is used to distinguish the production line to which the input image belongs, which is equivalent to embedding field adaptive learning representation in the model, so that the model has the ability of field adaptation and deep feature learning, and enhances the adaptability of the model to other production line data, so that one model is applicable to multiple production lines, without the need to train separate models for different production lines, reducing the cost of manual labeling.

[0019] 3. To ensure that the detection speed of the trained defect detection model meets the real-time requirement of the production line quality inspection, the convolutional layers and normalization layers of each CBL module in the trained defect detection model are fused, the three layers of the CBL module are changed into two layers, and the features only need to pass through two layers of calculation in the CBL module, which improves the detection speed of the model. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 The structure diagram of the defect detection model in the training stage;

[0021] Figure 2 The structure diagram of the CBL module, the CSP1_x module and the CSP2_1 module;

[0022] Figure 3 The structure diagram of the residual module;

[0023] Figure 4 The structure diagram of the TA module and the SPPF module;

[0024] Figure 5 The structure diagram of the domain discriminator;

[0025] Figure 6 The structure diagram of the defect detection model in the test stage;

[0026] Figure 7 The original test image;

[0027] Figure 8 The attention map obtained by the TA module;

[0028] Figure 9A detection result map of the defect detection model. DETAILED DESCRIPTION

[0029] The technical solutions of the present application will be described in detail below in combination with the drawings and specific embodiments, but the protection scope of the present application is not limited thereto.

[0030] The present application provides a photovoltaic cell defect detection method based on noise suppression (referred to as method), comprising the following steps:

[0031] Step 1: Construct a photovoltaic cell dataset;

[0032] Collect photovoltaic cell images from multiple production lines through electroluminescence imaging technology; in this embodiment, 2520 images are collected from the first production line, including 1410 defect images and 1110 non-defect images, and the defect images are labeled; 1401 and 5750 images are collected from the other two production lines respectively, which are used as unlabeled images; the labeled images collected from the first production line and part of the images collected from the other two production lines are used as the training set, and the unlabeled images collected from the first production line and the remaining images collected from the other two production lines are used as the test set; the defect types include five types: open welding, black spot, hidden crack, broken grid and scratch.

[0033] Step 2, based on the target detection algorithm YOLOv5, construct a defect detection model;

[0034] For example Figure 1As shown, the defect detection model includes three parts of a backbone network, a feature fusion part, and a classification regression part; wherein the backbone network includes six CBL modules, two CSP1_1 modules, one CSP1_2 module, a CSP1_3 module, an SPPF module, and a TA module; one CSP1_1 module is located between the second CBL module and the third CBL module, the CSP1_2 module is located between the third CBL module and the fourth CBL module, the CSP1_3 module is located between the fourth CBL module and the fifth CBL module, the other CSP1_1 module, the SPPF module, and the TA module are connected in series between the fifth CBL module and the sixth CBL module. The feature fusion part includes four CSP2_1 modules and six CBL modules; the output of the sixth CBL module of the backbone network is spliced (Concat) with the output of the CSP1_3 module after being upsampled (Upsample), and then sequentially passes through the first CSP2_1 module and the first CBL module, the output of the first CBL module is spliced with the output of the CSP1_2 module after being upsampled, and then sequentially passes through the second CSP2_1 module, the second CBL module, and the third CBL module, the output of the third CBL module is spliced with the output of the first CBL module, and then sequentially passes through the third CSP2_1 module, the fourth CBL module, and the fifth CBL module, the output of the fifth CBL module is spliced with the output of the sixth CBL module of the backbone network, and then sequentially passes through the fourth CSP2_1 module and the sixth CBL module; the feature fusion part outputs three feature maps of different scales in total, which are the outputs of the second CBL module, the fourth CBL module, and the sixth CBL module respectively. The classification regression part includes three convolution layers (CONV), and the three feature maps output by the feature fusion part pass through the convolution layers respectively to obtain three feature maps with sizes of 76*76*255, 38*38*255, and 19*19*255 pixels, i.e., detection results.

[0035] As Figure 2As shown, the CBL module is sequentially connected by a convolutional layer, a normalization layer (BN) and an activation layer (Leakyrelu). The CSP1_1 module, the CSP1_2 module and the CSP1_3 module are collectively referred to as the CSP1_x module, the CSP1_x module includes a CBL module, a residual module (Res unit), a convolutional layer, a normalization layer and an activation layer, the input of the CSP1_x module is processed by a CBL module, x residual modules and a convolutional layer, and then spliced with the feature obtained by convolution of the input of the CSP1_x module, the spliced feature is sequentially processed by a normalization layer and an activation layer to obtain the output of the CSP1_x module. The CSP2_1 module includes a CBL module, a convolutional layer, a normalization layer and an activation layer, the input of the CSP2_1 module is processed by a CBL module and a convolutional layer, and then spliced with the feature obtained by convolution of the input of the CSP2_1 module, the spliced feature is sequentially processed by a normalization layer and an activation layer to obtain the output of the CSP2_1 module.

[0036] As shown in Figure 3 The residual module is processed by two CBL modules, and then point-added with the input of the residual module (Add) to obtain the output of the residual module; the channel number, width and height of the input and output feature maps of the residual module are consistent, so the residual module does not change the size and channel number of the feature map.

[0037] As shown in Figure 4As shown, the TA module is a three-axis coordinate attention module, which adopts an attention mechanism in three dimensions of channel and two-dimensional space; the TA module includes a max pooling layer (MaxPool), an average pooling layer (AvgPool), a shared fully connected layer (Shared MLP), and an activation layer (Leaky relu); the input of the TA module is subjected to the max pooling layer and the average pooling layer, respectively; the outputs of the two pooling layers are subjected to the shared fully connected layer and then subjected to a point addition operation (Add); the features obtained through the point addition operation are subjected to the activation layer and then subjected to a point multiplication operation (Mul) with the input of the TA module, to obtain a channel attention feature map; the channel attention feature map is subjected to the max pooling layer in the height dimension and the average pooling layer in the width dimension; the outputs of the two pooling layers are subjected to the activation layer and then subjected to a point multiplication operation with the channel attention feature map, to obtain the output of the TA module; the TA module effectively represents and aggregates feature information, and compresses the channel dimension and the spatial dimension of the input feature map in a max pooling and average pooling manner; the TA module enhances the extraction capability of the network for small target features by increasing the attention capability for the foreground and suppressing the background interference, and thus enhances the detection capability of the model for micro and weak defects in the photovoltaic cell.

[0038] Step 3, training and testing of the defect detection model;

[0039] 3.1) Model parameter initialization

[0040] The Kaiming initialization method is used to initialize all weight values, bias values and batch normalization scale factor values of the model; the batch parameter (batch_size) of the model is set to 8, the maximum iteration number (epoch) is set to 300, the fixed step attenuation strategy is used for training of the model, the initial learning rate is 0.0002, the step-down step is 50 epcho, and the step-down factor is 0.00002;

[0041] 3.2) Preprocessing of the training set

[0042] The images in the training set are preprocessed through size cropping, data enhancement and normalization; the preprocessed training set includes labeled images collected from a production line and unlabeled images from the other two production lines;

[0043] 3.3) Training of the defect detection model

[0044] As Figure 2 shown, the pre-processed training set completed in step 3.2) is input into the initialized defect detection model, and the defect detection model is trained, and a domain discriminator (DD) is introduced in the training process to make the domain discriminator and the defect detection model perform adversarial training; the domain discriminator is a binary classification network, which is used to predict the domain (i.e. production line) to which the labeled image and the unlabeled image belong; the domain discriminator is located after the CSP1_2 module of the backbone network of the defect detection model, on the one hand, the output of the CSP1_2 module, i.e. the features extracted from the labeled image and the unlabeled image, are all input into the domain discriminator, the domain discriminator predicts the domain to which the image belongs according to the input features, and calculates the domain discrimination loss according to the prediction result and the real domain; on the other hand, the features extracted from the labeled image by the CSP1_2 module are input into the fourth CBL module, and the detection result is obtained after subsequent operations; the detection loss is calculated according to the detection result and the real label; the domain discrimination loss and the detection loss are back propagated by using the SGD optimizer to optimize the model parameters until the loss value converges, and the training of the defect detection model is completed;

[0045] As Figure 5 shown, the domain discriminator includes a downsampling operation, a CBL module, a fully connected layer and a gradient reversal layer (GRL); after the input of the domain discriminator is subjected to the downsampling operation, it is sequentially subjected to four CBL modules and two fully connected layers, and then enters the gradient reversal layer to reverse the back propagation gradient.

[0046] 3.4) Test of defect detection model

[0047] As Figure 6 shown, the model in the model testing stage is different from that in the training stage, in order to further improve the detection speed of the model, the convolution layer and the normalization layer of each CBL module in the defect detection model are fused to obtain a C B BL module, so that the features only need to pass through two layers of calculation;

[0048] The calculation formula of the convolution layer is as follows:

[0049] x i =w*x i-1 +b

[0050] Wherein, x i , x i-1 both represent neural units, and w and b represent the weight coefficient and the bias of the convolution layer, respectively.

[0051] The calculation formula of the normalization layer is as follows:

[0052]

[0053] Wherein, yi represents the output of the normalization layer, and mu and sigma represent the mean and variance respectively, and epsilon is the minimum correction term; and gamma and beta are learnable parameters, representing an affine transformation.

[0054] The calculation formula of the convolution layer and the normalization layer after fusion is:

[0055] y i = w new · x i + b new

[0056]

[0057]

[0058] wherein w new and b new are new weight coefficients and bias;

[0059] The test set obtained in the first step is input into the trained defect detection model to obtain a tested defect detection model.

[0060] In the fourth step, the photovoltaic cell image to be detected is obtained from the production line, the image is subjected to size normalization processing, and then input into the tested defect detection model for defect detection, and the defects on the photovoltaic cell image to be detected are classified and positioned.

[0061] Table 1 is a comparison of the detection results of the method of the present application and common target detection models, and Table 2 is the ablation experiment results of the method of the present application.

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

[0063]

[0064] Table 2 Ablation experiment results

[0065]

[0066] The detection results show that the missing detection rate of the defect detection model of the present application is 2.1%, the false detection rate is 3.8%, and the overkill is 4.3%, all of which are lower than those of common target detection models, the detection speed is 100FPS, the detection accuracy and speed both meet the requirements of production line detection, and the effectiveness of the method of the present application is verified.

[0067] The unmentioned parts of the present application are applicable to the prior art.

Claims

1. A noise-suppression-based photovoltaic cell defect detection method, characterized by, The method comprises the following steps: Step 1: Collecting photovoltaic cell EL images from multiple production lines to construct a dataset, which includes labeled images and unlabeled images; Step 2: Adding a three-axis coordinate attention module between the SPPF module and the last CBL module of the YOLOv5 model backbone network to obtain a defect detection model; the three-axis coordinate attention module adopts an attention mechanism in three dimensions of channel and two-dimensional space to enhance the detection capability of the defect detection model for small and weak defects; Step 3: Training and testing the defect detection model; The labeled images and part of the unlabeled images in the dataset are used to train the defect detection model, and the remaining unlabeled images are used to test the trained defect detection model; a domain discriminator is introduced for adversarial training in the training stage, which is located after the CSP1_2 module of the defect detection model backbone network, and the features extracted from the CSP1_2 module from the labeled images and the unlabeled images are all input into the domain discriminator to predict the domain of the images, i.e., the production line; at the same time, the features extracted from the labeled images by the CSP1_2 module continue to perform subsequent operations of the defect detection model; Step 4: Collecting images to be detected from the production line, normalizing and inputting them into the tested defect detection model for defect detection.

2. The noise-suppression-based photovoltaic cell defect detection method of claim 1, wherein, The three-axis coordinate attention module includes a max-pooling layer, an average-pooling layer, a shared fully connected layer and an activation layer; the input of the three-axis coordinate attention module is respectively processed by the max-pooling layer and the average-pooling layer, the outputs of the two pooling layers are respectively processed by the shared fully connected layer and then subjected to point addition operation, the features obtained by the point addition operation are processed by the activation layer and then subjected to point multiplication operation with the input of the three-axis coordinate attention module to obtain a channel attention feature map; the channel attention feature map is processed by a max-pooling layer in the height dimension and by an average-pooling layer in the width dimension, the outputs of the two pooling layers are processed by an activation layer and then subjected to point multiplication operation with the channel attention feature map to obtain the output of the three-axis coordinate attention module.

3. The noise-suppression-based photovoltaic cell defect detection method according to claim 1 or 2, characterized in that, The domain discriminator includes a downsampling operation, a CBL module, a fully connected layer and a gradient reversal layer; the input of the domain discriminator is processed by the downsampling operation, then sequentially processed by four CBL modules and two fully connected layers, and finally processed by the gradient reversal layer for gradient backpropagation.

4. The noise-suppression-based photovoltaic cell defect detection method of claim 1, wherein, In the testing stage in Step 3, each CBL module in the trained defect detection model includes a fusion layer and an activation layer, and the fusion layer is obtained by fusing a convolution layer and a normalization layer.

5. The noise-suppression-based photovoltaic cell defect detection method of claim 1, wherein, In Step 1, defect images and defect-free images are collected from one production line, and the defect images are labeled; the images collected from the remaining production lines are used as unlabeled images; the defect types include open weld, black spot, hidden crack, broken grid and scratch.

Citation Information

Patent Citations

  • Electronic component surface defect detection method based on YOLOv5 convolutional neural network

    CN114663382A

  • Improved yolov5-based unmanned aerial vehicle target detection method

    CN115439766A