Photovoltaic cell defect detection method and device based on image processing

By processing photovoltaic panel images into regions and combining gamma correction and feature extraction, an end-to-end defect detection model is constructed, which solves the problem of inaccurate photovoltaic cell defect detection results and achieves accurate detection under different lighting conditions.

CN120807535AActive Publication Date: 2025-10-17HUBEI ZHONGKENENG ENERGY TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511332201.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-10-17
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

In existing photovoltaic cell defect detection methods, the brightness adjustment operation cannot match the brightness distribution of the cell under real conditions, resulting in inaccurate defect detection results.

Method used

The photovoltaic panel image is divided into multiple cell regions, and grayscale and illumination images of each region are obtained. Illumination features are extracted using a gamma correction sub-model. Image enhancement is performed using a gamma correction and feature extraction sub-model. Defect detection is performed by combining a classification sub-model. An end-to-end defect detection model is constructed and trained using cross-entropy loss and consistency loss functions.

Benefits of technology

It enables accurate acquisition of defect detection results in photovoltaic cell areas under different lighting conditions, improving the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807535A_ABST
    Figure CN120807535A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a photovoltaic cell defect detection method and device based on image processing, and the method comprises the steps: dividing a photovoltaic cell panel image into a plurality of cell regions; and inputting the grey-scale map and the illumination map of each cell region into a defect detection model, and outputting a defect detection result of each cell region. According to the technical scheme, the defect detection result of the photovoltaic cell can be accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a photovoltaic cell defect detection method and device based on image processing. BACKGROUND

[0002] With the further aggravation of energy crisis and environmental pollution, and the rapid development of photovoltaic power generation technology, photovoltaic power stations have gradually been built in various places to utilize solar energy to solve the problem of electricity use. A large number of photovoltaic cell panels are provided in the photovoltaic power station, which can convert solar energy into electric energy, and the defects of the photovoltaic cell panels directly affect the power generation efficiency of photovoltaic power generation. Therefore, in the process of using photovoltaic cell panels for photovoltaic power generation, photovoltaic cell defect detection is needed to timely find the defective cell pieces.

[0003] At present, the patent application file with the publication number CN114021741A discloses a photovoltaic cell panel inspection method based on deep learning, which includes: preparing network input data, using an unmanned aerial vehicle to carry an imaging device to collect image data sets of photovoltaic cell panels; enhancing and expanding the training set and the test set through flipping, rotating, mirroring, and brightness adjustment operations to increase the diversity of the data; constructing a segmentation network U-Net optimized by a parallel attention mechanism; constructing a parallel attention module; training the data set constructed in step 1 using the model built; testing the images taken by the unmanned aerial vehicle using the trained network, fine-tuning the network, so that the network can extract the features of small defects such as cracks, and realize photovoltaic cell defect detection.

[0004] The above method increases the diversity of the data and uses a parallel attention module to improve the network's feature extraction of small defects such as cracks. Although the brightness adjustment operation is performed in the process of increasing the diversity of the data, the result of the brightness adjustment does not conform to the brightness distribution of the cell pieces in the real situation, which cannot guarantee the accuracy of the defect detection result, resulting in inaccurate photovoltaic cell defect detection results. SUMMARY

[0005] In order to solve the technical problem of inaccurate photovoltaic cell defect detection results, the present application provides a photovoltaic cell defect detection method and device based on image processing, which can accurately obtain the defect detection results of photovoltaic cells.

[0006] In a first aspect, the application provides a photovoltaic cell defect detection method based on image processing, the detection method comprising: dividing a photovoltaic panel image into a plurality of cell regions; inputting a grayscale image and an illumination image of each cell region into a defect detection model to output a defect detection result of each cell region; the defect detection model comprising a gamma correction sub-model, a feature extraction sub-model, and a classification sub-model; the gamma correction sub-model is used to extract features from the illumination image and regress the feature extraction result into a gamma parameter of each cell region; the gamma parameter is used to input the gamma correction of each grayscale image into the feature extraction sub-model to obtain a grayscale feature of each grayscale image; the classification sub-model maps the grayscale feature of each grayscale image to a defect detection result; the training method of the defect detection model comprises: obtaining a time sequence of the photovoltaic panel image and a defect label of each cell region; calculating the illumination complexity of each cell region in any photovoltaic panel image; obtaining a plurality of defect detection results of each cell region in the time sequence according to the defect detection model, and weighting and summing the cross-entropy loss between the defect label and the defect detection result according to the illumination complexity to construct a loss function; iteratively updating the defect detection model using the gradient descent method until the loss function is less than a preset loss or the iteration number is greater than a preset number, and the training is completed.

[0007] Due to the relative change between the illumination angle of the sun and the orientation of the photovoltaic panel, the illumination of each cell region on the panel will be different at different times. Therefore, the photovoltaic panel image is divided into a plurality of cell regions, and the grayscale image and the illumination image of each cell region are obtained. The illumination image can represent the illumination of the corresponding cell region. The grayscale image and the illumination image are used as the input of the defect detection model, which can accurately obtain the defect detection result of each cell region by comprehensively considering the illumination and grayscale features of the cell region. Further, in the defect detection model, the gamma correction sub-model is used to extract features from the illumination image. After determining the gamma parameter of the corresponding cell region according to the illumination image, the grayscale image of the cell region is gamma corrected to realize image enhancement of the grayscale image and eliminate the problem of uneven illumination. The grayscale image after image enhancement is input into the feature extraction sub-model to obtain the grayscale feature of each grayscale image. The classification sub-model maps the grayscale feature of each grayscale image to a defect detection result to accurately obtain the defect detection result of each cell region.

[0008] Preferably, the dividing the photovoltaic cell panel image into a plurality of cell regions comprises: performing a projection transformation on the photovoltaic cell panel image to obtain an orthographic view, and calculating gradient values of each pixel point in the orthographic view; drawing a gradient value curve according to the average value of the gradient values of each column, obtaining peak points of the gradient value curve, adding a perturbation value to each peak point, and calculating the sum of the absolute values of the difference between the intervals of adjacent peak points and a preset interval as a target function, taking the perturbation value corresponding to the minimum value of the target function as a target perturbation, and taking the sum of each peak point and the target perturbation as a segmentation row of the cell; and obtaining a segmentation column of the cell, and taking a rectangular region surrounded by adjacent segmentation rows and adjacent segmentation columns as a cell region.

[0009] While positioning the segmentation row by using the peak points of the gradient value curve, the absolute values of the difference between the intervals of adjacent peak points and a preset interval are considered, and the preset interval is related to the size of the cell, so that the accurate positioning of the segmentation row is realized, and the cell region in the photovoltaic cell panel image is accurately segmented.

[0010] Preferably, the photovoltaic cell panel image is an RGB image, and the method for obtaining the grayscale image and the illumination image of each cell region comprises: converting the photovoltaic cell panel image into a grayscale image, and taking the image information of any cell region as the grayscale image of the cell region; and converting the photovoltaic cell panel image into an HSV color space to obtain a luminance image, and taking the image information of any cell region in the luminance image as the illumination image of the cell region.

[0011] Preferably, the method for calculating the illumination complexity of each cell region in any photovoltaic cell panel image comprises: calculating the average luminance value in the illumination image of the cell region in the photovoltaic cell panel image , and the two-dimensional image entropy of the illumination image . The illumination complexity of the cell region is: ; The luminance reference value is the average luminance value in the illumination image of the cell region in the photovoltaic cell panel image.

[0012] The illumination complexity of the cell region is evaluated from the degree of confusion of the luminance value and the degree of deviation between the average luminance and the luminance reference value. When the degree of confusion of the luminance value in the illumination image is greater, or the average luminance is too bright or too dark, the corresponding illumination complexity is greater, so that the accurate quantification of the illumination complexity is realized.

[0013] Preferably, the gamma correction sub-model comprises a plurality of convolution layers and a full connection layer, the plurality of convolution layers are used for feature extraction on any illumination image to obtain illumination features, the illumination features are input into the full connection layer to obtain the gamma parameter corresponding to the illumination image; the feature extraction sub-model is a convolutional neural network; and the classification sub-model is a logic classification function or a Softmax classification function.​

[0014] An end-to-end defect detection model is constructed. The defect detection model can determine the gamma parameters of the grayscale image of the corresponding cell area based on the illumination map, realize adaptive enhancement of the grayscale image, and achieve defect detection results for each cell area.

[0015] Preferably, the loss function for: ; is the number of cell areas, is the number of PV panel images in the time series, Photovoltaic panel image Middle cell area The lighting complexity of Photovoltaic panel image The sum of the illumination complexity of each cell area, and Photovoltaic panel image Middle cell area Defect labels and defect detection results, is the cross entropy loss.

[0016] Greater attention is allocated to cell areas with greater lighting complexity and participates in the construction of the loss function to ensure that the defect detection model can output accurate defect detection results under conditions of greater lighting complexity.

[0017] Preferably, the training method of the defect detection model further comprises: obtaining multiple grayscale features of each cell area in the time series; the loss function for: ; ; in, is the number of cell areas, is the number of PV panel images in the time series, Photovoltaic panel image Middle cell area The lighting complexity of Photovoltaic panel image The sum of the illumination complexity of each cell area, and Photovoltaic panel image Middle cell area Defect labels and defect detection results, is the cross entropy loss, is the consistency loss; is the consistency coefficient; a photovoltaic cell panel image a photovoltaic cell panel image illumination maps of the cell regions illumination map similarity; and a photovoltaic cell panel image a photovoltaic cell panel image gray scale features of the cell regions a photovoltaic cell panel image a photovoltaic cell panel image a photovoltaic cell panel image a photovoltaic cell panel image

[0018] The defect detection results of the cell regions are constrained to be defect labels, and the consistency of the gray scale features of the cell regions under different illumination maps is constrained, so that the defect detection model can accurately extract defect features under different illumination maps, and the accuracy of the defect detection results is ensured.

[0019] Preferably, the illumination map similarity adopts a similarity calculation method based on the Euclidean distance or structural similarity.

[0020] The second aspect of the application also provides a photovoltaic cell defect detection device based on image processing, comprising a processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, a photovoltaic cell defect detection method based on image processing according to the first aspect of the application is realized.

[0021] The technical scheme of the application has the following beneficial technical effects: Due to the relative change between the illumination angle of the sun and the orientation of the photovoltaic cell panel, the illumination of each cell region on the panel will be different at different times, therefore, the photovoltaic cell panel image is divided into multiple cell regions, and the gray scale map and the illumination map of each cell region are obtained, the illumination map can represent the illumination of the corresponding cell region, and the gray scale map and the illumination map are used as the input of the defect detection model, which can accurately obtain the defect detection results of each cell region by comprehensively considering the illumination and gray scale features of the cell region.

[0022] Further, in the defect detection model, first, a gamma correction sub-model is used to extract features from the illumination map, after determining the gamma parameter of the corresponding cell region according to the illumination map, the gray scale map of the cell region is gamma corrected to realize image enhancement of the gray scale map to eliminate the problem of uneven illumination; the image-enhanced gray scale map is input into the feature extraction sub-model to obtain the gray scale features of each gray scale map, and the classification sub-model maps the gray scale features of each gray scale map to the defect detection results to accurately obtain the defect detection results of each cell region. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 is a flowchart of a photovoltaic cell defect detection method based on image processing according to an embodiment of the present application.

[0024] Figure 2 is a structural diagram of a defect detection model according to an embodiment of the present application.

[0025] Figure 3 is a flowchart of a defect detection model training method according to an embodiment of the present application.

[0026] Figure 4 is a structural block diagram of a photovoltaic cell defect detection device based on image processing according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0028] According to a first aspect of the present application, the present application provides a photovoltaic cell defect detection method based on image processing. Figure 1 is a flowchart of a photovoltaic cell defect detection method based on image processing according to an embodiment of the present application. As shown in Figure 1 , the photovoltaic cell defect detection method based on image processing includes steps S101 to S102, which will be described in detail below.

[0029] S101, divide the photovoltaic cell panel image into a plurality of cell piece regions.

[0030] In one embodiment, a large number of photovoltaic cell panels are provided in the photovoltaic power station, and one photovoltaic cell panel includes a plurality of regularly arranged cell pieces. An image acquisition device is deployed at a fixed pose inside the photovoltaic power station to acquire a photovoltaic cell panel image. Alternatively, a drone carrying an image acquisition device can be used to take a photograph of the photovoltaic cell panel to obtain a photovoltaic cell panel image, which is not limited by the present application.

[0031] Specifically, the dividing the photovoltaic panel image into a plurality of cell regions comprises: performing a projection transformation on the photovoltaic panel image to obtain an orthographic view, and calculating gradient values of each pixel point in the orthographic view; drawing a gradient value curve according to the average value of the gradient values of each column, obtaining peak points of the gradient value curve, adding a perturbation value to each peak point, and calculating the sum of the absolute values of the difference between adjacent peak points and a preset interval as a target function, taking the perturbation value corresponding to the minimum value of the target function as a target perturbation, and taking the sum of each peak point and the target perturbation as a segmentation row of the cell; obtaining a segmentation column of the cell, and taking a rectangular region surrounded by adjacent segmentation rows and adjacent segmentation columns as a cell region.

[0032] Wherein, since the orientation of the photovoltaic panel will move with the movement of the sunlight, when collecting the photovoltaic panel image, it cannot be guaranteed that the image collection device is collected at a right angle, therefore, a projection transformation method is needed to transform the collected photovoltaic panel image into an orthographic view.

[0033] Since the size of each cell on the photovoltaic panel is the same, and there is a grid line at the edge of the cell, there is a clear gradient feature at the edge of the cell, in order to avoid the influence of environmental noise such as light or dust on the peak points, while positioning the segmentation row by using the peak points of the gradient value curve, the absolute value of the difference between the interval of adjacent peak points and a preset interval is considered, the preset interval is related to the size of the cell, the accurate positioning of the segmentation row is realized, and then the cell region in the photovoltaic panel image is accurately segmented.

[0034] It should be noted that the perturbation values corresponding to each peak point are different, and the value range of the perturbation value is .

[0035] In this way, a plurality of cell regions in the photovoltaic panel image are obtained.

[0036] S102, input the gray scale image and the illumination image of each cell region into the defect detection model, and output the defect detection result of each cell region.

[0037] In one embodiment, the photovoltaic panel image is an RGB image, and the method for obtaining the gray scale image and the illumination image of each cell region comprises: converting the photovoltaic panel image into a gray scale image, and taking the image information of any cell region as the gray scale image of the cell region; converting the photovoltaic panel image into an HSV color space to obtain a luminance image, and taking the image information of any cell region in the luminance image as the illumination image of the cell region.

[0038] In the HSV color space, H represents hue, S represents saturation, and V represents luminance, and the image of the V channel is taken as the luminance image.

[0039] The gray scale image and the illumination image of each cell piece region are input into the defect detection model to obtain a defect detection result of each cell piece region in the photovoltaic cell panel image, and the defect detection result includes defects and no defects.

[0040] Please refer to Figure 2 is a structural diagram of the defect detection model according to an embodiment of the present application. The defect detection model includes a gamma correction sub-model, a feature extraction sub-model, and a classification sub-model. The gamma correction sub-model is used to extract features from the illumination image and regress the feature extraction result into a gamma parameter of each cell piece region. The gamma-corrected gray scale image according to the gamma parameter is input into the feature extraction sub-model to obtain a gray scale feature of each gray scale image. The classification sub-model maps the gray scale feature of each gray scale image to a defect detection result.

[0041] The gamma correction sub-model includes a plurality of convolution layers and a fully connected layer. The plurality of convolution layers are used to extract features from any illumination image to obtain an illumination feature. The illumination feature is input into the fully connected layer to obtain a gamma parameter corresponding to the illumination image. The feature extraction sub-model includes a plurality of convolution layers, which can adopt an existing convolution neural network structure such as ResNet or VGGNet. The classification sub-model is a logistic classification function or a Softmax classification function, which is used to perform binary classification on the gray scale feature of any gray scale image to obtain a defect detection result of the gray scale image.

[0042] The gamma correction sub-model can be used to obtain a gamma parameter corresponding to each cell piece region in the photovoltaic cell panel image. The gray scale image of the cell piece region is gamma-corrected according to the gamma parameter corresponding to the cell piece region, thereby realizing adaptive enhancement of the photovoltaic cell panel image in a region-by-region manner and eliminating the influence of uneven illumination in each cell piece region on defect detection.

[0043] Gamma correction can realize image enhancement through pixel value stretching, and the gamma parameter directly affects the effect of image enhancement. Gamma correction is a known technology to those skilled in the art, and will not be described here.

[0044] In this way, the gray scale image and the illumination image of each cell piece region in the photovoltaic cell panel image are input into the defect detection model, and the defect detection result of each cell piece region can be output.

[0045] In one embodiment, in order to ensure that the gamma correction sub-model can accurately output the gamma parameter of each cell piece region and ensure that the defect detection model can accurately output the defect detection result of each cell piece region, the defect detection model needs to be trained. Please refer to Figure 3 is a flowchart of a defect detection model training method according to an embodiment of the present application. The defect detection model training method includes steps S201 to S204, which are described in detail below.

[0046] S201, acquire a time sequence of photovoltaic panel images and defect labels of each cell region.

[0047] The photovoltaic panel image is an RGB image of any photovoltaic panel in a photovoltaic power station, the time sequence of photovoltaic panel images includes an RGB image of the photovoltaic panel at each acquisition time in a preset time period, the preset time period is 10 minutes or half an hour, and the time interval between adjacent sampling times can be artificially set, which is not limited in the present application; it is considered that the defect detection results of each cell region in the photovoltaic panel remain unchanged in the preset time period. For example, the preset time period is half an hour, the time interval between adjacent sampling times is 5 minutes, and the time sequence includes 6 photovoltaic panel images.

[0048] In the process of photovoltaic power generation, the illumination angle of the sun is constantly changing, and the angle of the photovoltaic panel also changes over time, so the brightness distribution of each cell region in the photovoltaic panel image is different at different acquisition times in the preset time period, and the defect detection results of each cell region remain unchanged in the preset time period. Therefore, only the photovoltaic panel image needs to be labeled to obtain the defect label of each cell region in each photovoltaic panel image in the time sequence; the defect label is defective or non-defective.

[0049] S202, calculate the illumination complexity of each cell region in any photovoltaic panel image.

[0050] Different illumination environments will present different brightness distributions in the cell region; the brightness distribution will drown the defect features in the grayscale image, resulting in missed detection and false detection, therefore, the illumination complexity of each cell region is evaluated to make the defect detection model focus on the cell regions with high illumination complexity in the training process.

[0051] Specifically, calculating the illumination complexity of each cell region in any photovoltaic panel image includes: calculating the average brightness value in the illumination map of the cell region in the photovoltaic panel image , and the two-dimensional image entropy of the illumination map ; the illumination complexity of the cell region is: ; is the brightness reference value.

[0052] In this way, the two-dimensional image entropy can reflect the degree of confusion of the brightness value in the illumination map, the larger the value, the more complex the brightness distribution, and when all the brightness values in the illumination map are the same, the two-dimensional image entropy is 0; the average brightness value ​The average brightness of the cell region can be reflected, and the brightness reference value is the median of the range of brightness values. When the average brightness of the cell region is too bright or too dark, that is, when the average brightness of the cell region is greater than or less than the brightness reference value, the average brightness of the cell region is greater than or less than the brightness reference value. When the average brightness of the cell region is greater than or less than the brightness reference value, the average brightness of the cell region is greater than or less than the brightness reference value.

[0053] In summary, the illumination complexity of the cell region is evaluated from the degree of confusion of the brightness value and the degree of deviation between the average brightness and the brightness reference value. The greater the illumination complexity, the greater the influence of illumination on the cell region, and the greater the difficulty of obtaining accurate defect detection results.

[0054] S203, obtaining a plurality of defect detection results of each cell region in the time sequence according to the defect detection model, and weighting and summing the cross-entropy loss between the defect label and the defect detection result according to the illumination complexity to construct a loss function.

[0055] Among them, the time sequence includes a plurality of photovoltaic panel images of a photovoltaic panel, and the cell regions in each photovoltaic panel image can be obtained, that is, one cell region corresponds to a plurality of gray scale images and a plurality of illumination images.

[0056] Obtain the gray scale image and the illumination image of any cell region in each photovoltaic panel image in the time sequence, obtain the gray scale features and the defect detection results of the cell region in each photovoltaic panel image according to the defect detection model, and thus obtain a plurality of gray scale features and a plurality of defect detection results of each cell region in the time sequence.

[0057] For example, the time sequence includes 6 photovoltaic panel images, and each photovoltaic panel image includes 10 cell regions. One cell region can obtain 6 gray scale features and 6 defect detection results.

[0058] Specifically, the loss function is: ; The number of cell regions is The number of photovoltaic panel images in the time sequence is The illumination complexity of the cell region in the photovoltaic panel image The sum of the illumination complexities of each cell region in the photovoltaic panel image The defect label and the defect detection result of the cell region in the photovoltaic panel image The cross-entropy loss. ​​​​​​

[0059] Thus, according to the illumination complexity, the attention degree is assigned to each cell region in the photovoltaic cell panel image In the photovoltaic cell panel image, the cell region with greater illumination complexity is assigned greater attention degree and participates in the construction of the loss function, so as to ensure that the defect detection model can output accurate defect detection results in the case of greater illumination complexity.

[0060] In other embodiments, a plurality of gray scale features of each cell region can also be obtained. Since the time sequence contains the gray scale maps of the same cell region under different illumination maps, and the gray scale features contain the defect features in the cell region (the classification sub-model can obtain the defect detection results according to the gray scale features, and therefore, the gray scale features contain the defect features in the cell region); in order to enable the defect detection model to accurately extract the defect features under different illumination maps and ensure that the gamma correction sub-model can output accurate gamma parameters, the consistency of the gray scale features of the cell region under different illumination maps needs to be constrained in the training process while the defect detection results are constrained by using the cross-entropy loss function.

[0061] Specifically, the loss function is: ; ; wherein, is the number of cell regions, is the number of photovoltaic cell panel images in the time sequence, is the illumination complexity of the cell region in the photovoltaic cell panel image is the sum of the illumination complexities of each cell region in the photovoltaic cell panel image and are the defect labels and defect detection results of the cell region in the photovoltaic cell panel image is the cross-entropy loss, is the consistency loss; is a consistency coefficient; is the similarity of the illumination maps of the cell region in the photovoltaic cell panel image and are the gray scale features of the cell region in the photovoltaic cell panel image ​​​​​​​​​​​for and The Euclidean distance of .

[0062] The similarity of the illumination map can be calculated using a similarity calculation method based on Euclidean distance or structural similarity, which is not limited in this application. The value of is 0.5.

[0063] Understandably, if the photovoltaic panel image and photovoltaic panel images Middle cell area The similarity of the illumination map is large, so a larger attention should be assigned to encourage the grayscale features of the same cell area under different illumination to be consistent, that is, Approaching 0.

[0064] In this way, while constraining the defect detection results of each cell area to defect labels, the grayscale features of the cell area under different illumination images are constrained to be consistent, so that the defect detection model can accurately extract defect features under different illumination images, ensuring the accuracy of the defect detection results.

[0065] S204, iteratively updating the defect detection model using the gradient descent method until the loss function is less than the preset loss, or the number of iterations is greater than the preset number, and the training is completed.

[0066] Among them, the gradient descent method updates the defect detection model in the direction of the loss function becoming smaller, and iteratively updates the defect detection model. When the loss function is less than the preset loss, or the number of iterations is greater than the preset number, it means that the defect detection model can accurately output the defect detection results of each battery cell area. The iterative update is stopped to obtain the trained defect detection model.

[0067] Among them, the preset loss is 0.01 and the preset number of times is 500.

[0068] According to the second aspect of the present application, the present application also provides a photovoltaic cell defect detection device based on image processing. Figure 4 This is a structural block diagram of a photovoltaic cell defect detection device based on image processing according to an embodiment of the present application. Figure 4 As shown, the apparatus 50 includes a processor and a memory. The memory stores computer program instructions. When executed by the processor, the computer program instructions implement the photovoltaic cell defect detection method based on image processing according to the first aspect of the present application. The apparatus also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are well known in the art and are therefore not described in detail here.

[0069] The above embodiments only express several implementation ways of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation to the patent scope of the application. It should be pointed out that for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, which all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A photovoltaic cell defect detection method based on image processing, characterized in that: The detection method includes: dividing a photovoltaic cell panel image into a plurality of cell regions; inputting a grayscale image and a light map of each cell region into a defect detection model, and outputting a defect detection result for each cell region; The defect detection model includes a gamma correction sub-model, a feature extraction sub-model, and a classification sub-model; the gamma correction sub-model is used to extract features from the illumination map and regress the feature extraction results into gamma parameters for each cell area; each grayscale image is gamma-corrected according to the gamma parameters and then input into the feature extraction sub-model to obtain the grayscale features of each grayscale image; the classification sub-model maps the grayscale features of each grayscale image into defect detection results; The training method of the defect detection model includes: obtaining a time series of photovoltaic panel images and defect labels for each cell area; calculating the illumination complexity of each cell area in any photovoltaic panel image; obtaining multiple defect detection results for each cell area in the time series based on the defect detection model, and performing a weighted summation of the cross-entropy loss between the defect labels and the defect detection results based on the illumination complexity to construct a loss function; and iteratively updating the defect detection model using a gradient descent method until the loss function is less than a preset loss or the number of iterations exceeds a preset number, completing the training.

2. The photovoltaic cell defect detection method based on image processing according to claim 1, characterized in that: The step of dividing the photovoltaic panel image into a plurality of cell regions comprises: Perform projection transformation on the photovoltaic panel image to obtain a front view, and calculate the gradient value of each pixel in the front view; A gradient value curve is drawn based on the mean gradient value of each column, and the peak points of the gradient value curve are obtained. After adding a disturbance value to each peak point, the sum of the absolute values ​​of the differences between the intervals of adjacent peak points and the preset intervals is calculated as the objective function. The disturbance value corresponding to the minimum value of the objective function is used as the target disturbance, and the sum of each peak point and the target disturbance is used as the segmentation row of the battery cell; the segmentation column of the battery cell is obtained, and the rectangular area enclosed by adjacent segmentation rows and adjacent segmentations is used as the battery cell area.

3. The photovoltaic cell defect detection method based on image processing according to claim 1, characterized in that: The photovoltaic panel image is an RGB image, and the method for obtaining the grayscale image and illumination image of each cell area includes: After converting the photovoltaic cell panel image into a grayscale image, the image information of any cell region is used as the grayscale image of the cell region; After converting the photovoltaic cell panel image into the HSV color space, a brightness image is obtained, and the image information of any cell area in the brightness image is used as the illumination map of the cell area.

4. The photovoltaic cell defect detection method based on image processing according to claim 1, characterized in that: Calculating the illumination complexity of each cell area in any photovoltaic panel image includes: Calculate photovoltaic panel images Average brightness value in the illumination map of the middle cell area , and the 2D image entropy of the illumination map ; Cell area Lighting complexity for: ; is the brightness reference value.

5. The photovoltaic cell defect detection method based on image processing according to claim 1, characterized in that: The gamma correction sub-model includes multiple convolutional layers and fully connected layers. The multiple convolutional layers are used to extract features from any illumination map to obtain illumination features, and the illumination features are input into the fully connected layer to obtain the gamma parameters corresponding to the illumination map. The feature extraction sub-model is a convolutional neural network. The classification sub-model is a logical classification function or a Softmax classification function.

6. The photovoltaic cell defect detection method based on image processing according to claim 1, characterized in that: The loss function for: ; is the number of cell areas, is the number of PV panel images in the time series, Photovoltaic panel image Middle cell area The lighting complexity of Photovoltaic panel image The sum of the illumination complexity of each cell area, and Photovoltaic panel image Middle cell area Defect labels and defect detection results, is the cross entropy loss.

7. The photovoltaic cell defect detection method based on image processing according to claim 1, characterized in that: The training method of the defect detection model further includes: Obtain multiple grayscale features of each cell area in the time series; the loss function for: ; ; in, is the number of cell areas, is the number of PV panel images in the time series, Photovoltaic panel image Middle cell area The lighting complexity of Photovoltaic panel image The sum of the illumination complexity of each cell area, and Photovoltaic panel image Middle cell area Defect labels and defect detection results, is the cross entropy loss, is the consistency loss; is the consistency coefficient; Photovoltaic panel image and photovoltaic panel images Middle cell area similarity of the lighting map; and Photovoltaic panel images and photovoltaic panel images Middle cell area Grayscale features; for and The Euclidean distance of .

8. The photovoltaic cell defect detection method based on image processing according to claim 7, characterized in that: The illumination map similarity adopts the similarity calculation method based on Euclidean distance or structural similarity.

9. A photovoltaic cell defect detection device based on image processing, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a photovoltaic cell defect detection method based on image processing according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Photovoltaic cell panel inspection method based on deep learning

    CN114021741A

  • Pipeline defect detection method and device in complex light environment

    CN114359736A

  • Defect detection method and system for photovoltaic panel

    CN116363097A

  • Plate surface defect detection system and method based on machine vision

    CN119048472A

  • Lightweight photovoltaic cell panel defect detection method based on improved YOLOv8

    CN119693712A