No-damage detection method for surface abnormity of photovoltaic module
The attention-based detection model with CNN and pixel-level segmentation addresses precision and efficiency challenges in solar panel defect detection, improving automation and intelligence in solar panel production.
Patent Information
- Application Number
- CN202510496682.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-15
AI Technical Summary
The existing photovoltaic panel defect detection technology has the problem of difficult to balance detection accuracy and efficiency, and the defect positioning accuracy is insufficient, making it difficult to achieve efficient and accurate defect identification and positioning.
The attention mechanism detection model based on convolutional neural network is adopted, combined with pixel-level classifiers and connectivity domain analysis algorithms, and the potential defect area is quickly identified, and the defect location and size are accurately determined through the mapping relationship between pixel coordinates and actual size, and the defect severity and category are judged based on preset thresholds.
It realizes the rapid and accurate identification and positioning of photovoltaic panel defects, improves detection efficiency and accuracy, and improves the automation and intelligence level of photovoltaic panel production.
Smart Images

Figure CN120318209A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic panel detection, and particularly to a method for non-destructive detection of surface abnormalities of photovoltaic modules. Background Art
[0002] In the image recognition of surface defects of photovoltaic panels, there is a technical contradiction: how to improve the detection efficiency while ensuring the detection accuracy. Currently, the mainstream approach is to determine the severity of defects by manually setting thresholds, but this method has problems such as strong subjectivity and low efficiency. If the threshold is set too high, some minor defects will be missed; if the threshold is set too low, over-detection will occur, increasing the workload of subsequent manual re-inspection.
[0003] In addition, there are also technical challenges in defect localization. Due to the complex surface structure of photovoltaic panels and diverse types of defects, a single feature matching or region segmentation method is difficult to meet the accuracy requirements of localization. Moreover, the sizes of photovoltaic panels vary, and how to convert the actual position and size of defects based on pixel coordinates is also a difficult problem to overcome.
[0004] In summary, in the detection of surface defects of photovoltaic panels, how to balance the contradiction between detection accuracy and efficiency, and how to achieve high-precision defect localization are two major challenges facing technicians. This requires comprehensively applying various image processing and analysis algorithms based on in-depth analysis of the causes and characteristics of photovoltaic panel defects, and continuously optimizing and improving the detection scheme to ultimately achieve accurate identification and localization of surface defects of photovoltaic panels. Summary of the Invention
[0005] The purpose of the present invention is to propose a method for non-destructive detection of surface abnormalities of photovoltaic modules to solve the problems existing in the above-mentioned prior art, which can quickly and accurately identify defects on photovoltaic panels, improve the detection efficiency and accuracy, provide strong support for production quality control, and effectively improve the automation and intelligence levels of photovoltaic panel production.
[0006] To achieve the above purpose, the present invention provides the following solution:
[0007] A method for non-destructive detection of surface abnormalities of photovoltaic modules includes:
[0008] Identifying potential defect regions of a photovoltaic panel image to be detected based on a detection model with a preset attention mechanism; wherein, the detection model is constructed based on a convolutional neural network model;
[0009] Segmenting the potential defect regions to divide into defect regions and non-defect regions;
[0010] Based on the mapping relationship between pixel coordinates and the actual size of the photovoltaic panel, calculating the actual position and size of the defects in the defect regions;
[0011] Judge the severity and classify the defect categories of the defects in the defect area.
[0012] Optionally, based on a detection model with a preset attention mechanism, identifying potential defect areas in the photovoltaic panel image to be detected includes:
[0013] Input the photovoltaic panel image to be detected into the detection model, extract multi-scale features of the photovoltaic panel image through a convolutional neural network model, and use the attention mechanism to learn the significant features in the photovoltaic panel image. According to the learned significant features, generate an attention map;
[0014] Perform threshold processing on the attention map, and define the area with attention weights greater than the preset threshold as the potential defect area.
[0015] Optionally, segment the potential defect area to divide the defect area and the non-defect area, including:
[0016] Input the image of the potential defect area into a pixel-level classifier to perform pixel-level defect area segmentation on the potential defect area, and divide the defect area and the non-defect area.
[0017] Optionally, based on the mapping relationship between pixel coordinates and the actual size of the photovoltaic panel, calculate the actual position and size of the defects in the defect area, including:
[0018] Obtain the size information of the photovoltaic panel, establish the mapping relationship between the pixel coordinate system and the actual size coordinate system, and determine the conversion function and parameters between the two coordinate systems;
[0019] Obtain the mask image of the defect area, perform binarization processing on the mask image to obtain a binarized image containing only the defect area;
[0020] Use the connected component analysis algorithm to process the binarized image and label each connected component, where one connected component corresponds to one defect area;
[0021] For each connected component, obtain the range of the corresponding pixel coordinates, and the range of the pixel coordinates is the upper left and lower right coordinates of the minimum bounding rectangle of the defect area in the photovoltaic panel image;
[0022] According to the mapping relationship, convert the pixel coordinate range of each defect area into the coordinate range in the actual size to obtain the actual position of the defect on the photovoltaic panel;
[0023] By calculating the width and height of the bounding rectangle of each defect area and performing conversion according to the mapping relationship, obtain the actual size of each defect;
[0024] Determine whether each defective area exceeds the edge of the photovoltaic panel, and correct the defective areas that exceed the edge;
[0025] Output the position and size information of all defects on the photovoltaic panel.
[0026] An undamaged detection system for surface anomalies of a photovoltaic module, the system includes: an identification module, a segmentation module, a mapping module and a discrimination module;
[0027] The identification module is used to identify potential defective areas of the photovoltaic panel image to be detected based on a detection model with a preset attention mechanism; wherein, the detection model is constructed based on a convolutional neural network model;
[0028] The segmentation module is used to segment the potential defective areas, and divide the defective areas and non-defective areas;
[0029] The mapping module is used to convert the actual position and size of the defect in the defective area based on the mapping relationship between pixel coordinates and the actual size of the photovoltaic panel;
[0030] The discrimination module is used to judge the severity and classify the defect categories of the defects in the defective area.
[0031] Optionally, the identification module includes: an extraction unit, a generation unit and a definition unit;
[0032] The extraction unit is used to input the photovoltaic panel image to be detected into the detection model, and extract multi-scale features of the photovoltaic panel image through the convolutional neural network model;
[0033] The generation unit is used to learn the significant features in the photovoltaic panel image by using the attention mechanism, and generate an attention map according to the learned significant features;
[0034] The definition unit is used to perform threshold processing on the attention map, and define the area with attention weight greater than the preset threshold as the potential defective area.
[0035] Optionally, the segmentation module inputs the image of the potential defective area into a pixel-level classifier to perform pixel-level defective area segmentation on the potential defective area, and divide the defective area and non-defective area.
[0036] Optionally, the mapping module includes: a construction unit, a binarization processing unit, a marking unit, an acquisition unit, a conversion unit, a calculation unit, a correction unit and an output unit;
[0037] The construction unit is used to obtain the size information of the photovoltaic panel, establish the mapping relationship between the pixel coordinate system and the actual size coordinate system, and determine the conversion function and parameters between the two coordinate systems;
[0038] The binarization processing unit is used to obtain a mask image of the defect area, perform binarization processing on the mask image, and obtain a binarized image containing only the defect area;
[0039] The marking unit is used to process the binarized image by using a connected component analysis algorithm to mark each connected component, where one connected component corresponds to one defect area;
[0040] The obtaining unit is used to obtain the range of corresponding pixel coordinates for each connected component, and the range of pixel coordinates is the upper left corner and lower right corner coordinates of the minimum circumscribed rectangle of the defect area in the photovoltaic panel image;
[0041] The conversion unit is used to convert the range of pixel coordinates of each defect area into the range of coordinates in the actual size according to the mapping relationship, and obtain the actual position of the defect on the photovoltaic panel;
[0042] The calculation unit is used to calculate the width and height of the circumscribed rectangle of each defect area, and perform conversion according to the mapping relationship to obtain the actual size of each defect;
[0043] The correction unit is used to judge whether each defect area exceeds the edge of the photovoltaic panel, and correct the defect area that exceeds the edge;
[0044] The output unit is used to output the position and size information of all defects on the photovoltaic panel.
[0045] The beneficial effects of the present invention are as follows:
[0046] The present invention first uses an attention mechanism to quickly locate suspicious defect areas, and then uses a pixel-level classifier for fine segmentation to obtain defect areas; then, by establishing a mapping relationship between pixel coordinates and actual sizes, combined with a preset threshold to judge the severity of defects, and further use texture features to classify and identify defect types. The present invention can quickly and accurately identify photovoltaic panel defects, improve the detection efficiency and accuracy, provide strong support for production quality control, and effectively improve the automation and intelligence level of photovoltaic panel production. Description of the Drawings
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0048] Figure 1Schematic diagram of the process of a method for detecting surface anomalies without damage to a photovoltaic module according to an embodiment of the present invention. Specific implementation manners
[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0050] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0051] As Figure 1 shown, this embodiment proposes a method for detecting surface anomalies without damage to a photovoltaic module, including:
[0052] S1. Based on a detection model with a preset attention mechanism, identify the potential defect areas in the photovoltaic panel image to be detected; wherein, the detection model is constructed based on a convolutional neural network model;
[0053] S2. Segment the potential defect areas to divide the defect areas and non-defect areas;
[0054] S3. Based on the mapping relationship between the pixel coordinates and the actual size of the photovoltaic panel, calculate the actual position and size of the defects in the defect areas;
[0055] S4. Judge the severity of the defects in the defect areas and classify the defect categories.
[0056] Further, S1 includes:
[0057] Input the photovoltaic panel image to be detected into the detection model, extract multi-scale features of the photovoltaic panel image through the convolutional neural network model, and use the attention mechanism to learn the significant features in the photovoltaic panel image. According to the learned significant features, generate an attention map;
[0058] Perform threshold processing on the attention map, and define the areas with attention weights greater than the preset threshold as potential defect areas.
[0059] Specifically, in this embodiment, first, a photovoltaic panel image to be detected is obtained and input into a pre-constructed detection framework based on the attention mechanism for processing. This detection framework uses ResNet-50 as the backbone network, and extracts multi-scale features of the photovoltaic panel image through a convolutional neural network, including shallow texture features and deep semantic features. At the same time, a combination of channel attention mechanism and spatial attention mechanism is used to learn the significant features in the photovoltaic panel image. Among them, the channel attention mechanism adaptively adjusts the weights of different feature channels to highlight the feature responses related to defects; the spatial attention mechanism generates a spatial attention map to highlight the potential defect areas in the image. According to the learned significant features, an attention map highlighting the potential defect areas is generated, where the areas with attention weights higher than 7 indicate the positions of defects. Threshold processing is performed on the attention map, and the areas with attention weights greater than 7 are determined as suspicious defect areas.
[0060] Further, S2 includes:
[0061] The image of the potential defect area is input into a pixel-level classifier to perform pixel-level defect area segmentation on the potential defect area, and divide the defect area and the non-defect area.
[0062] Specifically, in this embodiment, for the located suspicious area, a deep learning-based image segmentation algorithm is used to perform pixel-level defect area segmentation on the photovoltaic panel image to obtain a fine defect area mask map. The segmentation algorithm uses a convolutional neural network to perform semantic segmentation on the image to accurately divide the defect and non-defect areas.
[0063] Further, S3 includes:
[0064] Obtain the size information of the photovoltaic panel, establish the mapping relationship between the pixel coordinate system and the actual size coordinate system, and determine the conversion function and parameters between the two coordinate systems;
[0065] Obtain the mask map of the defect area, perform binarization processing on the mask map to obtain a binarized image containing only the defect area;
[0066] Use the connected component analysis algorithm to process the binarized image and label each connected component, where one connected component corresponds to one defect area;
[0067] For each connected component, obtain the range of the corresponding pixel coordinates, and the range of the pixel coordinates is the upper left and lower right coordinates of the minimum bounding rectangle of the defect area in the photovoltaic panel image;
[0068] According to the mapping relationship, convert the pixel coordinate range of each defect area into the coordinate range in the actual size to obtain the actual position of the defect on the photovoltaic panel;
[0069] By calculating the width and height of the circumscribed rectangle of each defect area and performing conversion according to the mapping relationship, the actual size of each defect is obtained;
[0070] Determine whether each defect area exceeds the edge of the photovoltaic panel, and correct the defect areas that exceed the edge;
[0071] Output the position and size information of all defects on the photovoltaic panel.
[0072] Specifically, in this embodiment, first, obtain the actual size information of the photovoltaic panel. Assume that the length of the photovoltaic panel is 1500 mm and the width is 1000 mm. Establish the mapping relationship between the pixel coordinate system and the actual size coordinate system through the calibration algorithm, and use the perspective transformation matrix to convert the pixel coordinates into actual size coordinates. Specifically, select 4 reference points in the photovoltaic panel image, measure their actual size coordinates, and then fit the 8 parameters of the perspective transformation matrix by the least squares method. Obtain the mask image of the defect area of the photovoltaic panel, perform binaryzation processing on it, adaptively calculate the binarization threshold using the Otsu threshold method, set the pixels with gray values greater than the threshold to 1, and the rest of the pixels to 0. Use the connected component analysis algorithm with two-pass scanning to process the binary image, mark the connected components with 8-neighborhood, and count the number of pixels and the coordinates of the circumscribed rectangle of each connected component. For each connected component, obtain the upper-left coordinate (x1, y1) and the lower-right coordinate (x2, y2) of its circumscribed rectangle, convert the pixel coordinates into actual size coordinates (X1, Y1) and (X2, Y2) according to the perspective transformation matrix, and calculate the actual position of the defect area on the photovoltaic panel. Through the width W = X2 - X1 and height H = Y2 - Y1 of the circumscribed rectangle, obtain the actual size of the defect area. Determine whether each defect area exceeds the edge of the photovoltaic panel, that is, check whether the rectangle coordinates satisfy 0 ≤ X1 < X2 ≤ 1500 and 0 ≤ Y1 < Y2 ≤ 1000. For the defect areas that exceed the edge, truncate them to the range within the photovoltaic panel. Finally, output the center position coordinates, width, height and other information of each defect area for subsequent defect classification and statistical analysis.
[0073] Furthermore, S4 for judging the severity of the defect includes: if the area of the segmented defect area is greater than the preset area threshold, it is determined as a serious defect, otherwise it is determined as a minor defect. The preset area threshold is determined according to the specifications and quality standards of the photovoltaic panel, and a reasonable value can be obtained through statistical analysis of historical data. According to the severity of the defect, grade the quality of the photovoltaic panel; output the defect detection results and quality grading results of the photovoltaic panel, and store the results in the database.
[0074] Further, this embodiment may further set step S5. Based on the segmentation of the defect area, a texture feature extraction and classification algorithm is further used to identify different types of defects. By training a multi-classifier model, the texture features of the defect area are classified to obtain the specific categories of defects, such as scratches, stains, and damages.
[0075] This embodiment also proposes a non-destructive detection system for surface anomalies of photovoltaic modules, including: an identification module, a segmentation module, a mapping module, and a discrimination module;
[0076] The identification module is used to identify potential defect areas of the photovoltaic panel image to be detected based on a detection model with a preset attention mechanism; wherein, the detection model is constructed based on a convolutional neural network model;
[0077] The segmentation module is used to segment the potential defect area and divide it into a defect area and a non-defect area;
[0078] The mapping module is used to calculate the actual position and size of the defect in the defect area based on the mapping relationship between pixel coordinates and the actual size of the photovoltaic panel;
[0079] The discrimination module is used to judge the severity and classify the categories of defects in the defect area.
[0080] Further, the identification module includes: an extraction unit, a generation unit, and a definition unit;
[0081] The extraction unit is used to input the photovoltaic panel image to be detected into the detection model and extract multi-scale features of the photovoltaic panel image through the convolutional neural network model;
[0082] The generation unit is used to learn the significant features in the photovoltaic panel image using the attention mechanism and generate an attention map according to the learned significant features;
[0083] The definition unit is used to perform threshold processing on the attention map and define the area with attention weights greater than the preset threshold as the potential defect area.
[0084] Further, the segmentation module inputs the image of the potential defect area into a pixel-level classifier to perform pixel-level defect area segmentation on the potential defect area and divide it into a defect area and a non-defect area.
[0085] Further, the mapping module includes: a construction unit, a binarization processing unit, a marking unit, an acquisition unit, a conversion unit, a calculation unit, a correction unit, and an output unit;
[0086] The construction unit is used to obtain the size information of the photovoltaic panel, establish the mapping relationship between the pixel coordinate system and the actual size coordinate system, and determine the conversion function and parameters between the two coordinate systems;
[0087] A binarization processing unit, configured to obtain a mask image of the defective area, perform binarization processing on the mask image, and obtain a binarized image containing only the defective area;
[0088] A marking unit, configured to process the binarized image by using a connected component analysis algorithm to mark each connected component, where one connected component corresponds to one defective area;
[0089] An obtaining unit, configured to, for each connected component, obtain the range of corresponding pixel coordinates, where the range of pixel coordinates is the upper left corner and the lower right corner coordinates of the minimum bounding rectangle of the defective area in the photovoltaic panel image;
[0090] A conversion unit, configured to convert the range of pixel coordinates of each defective area into the range of coordinates in the actual size according to the mapping relationship, and obtain the actual position of the defect on the photovoltaic panel;
[0091] A calculation unit, configured to calculate the width and height of the bounding rectangle of each defective area, and perform conversion according to the mapping relationship to obtain the actual size of each defect;
[0092] A correction unit, configured to determine whether each defective area exceeds the edge of the photovoltaic panel, and correct the defective area that exceeds the edge;
[0093] An output unit, configured to output the position and size information of all defects on the photovoltaic panel.
[0094] The above embodiments are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solution of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for detecting surface abnormalities of a photovoltaic module without damage, characterized in that Including: A detection model based on a preset attention mechanism to identify potential defect regions in a photovoltaic panel image to be detected; wherein, the detection model is constructed based on a convolutional neural network model; Segment the potential defect regions to divide into defect regions and non-defect regions; Based on the mapping relationship between pixel coordinates and the actual size of the photovoltaic panel, calculate the actual position and size of the defects in the defect regions; Judge the severity level and classify the defect categories of the defects in the defect regions.
2. The method for detecting the absence of damage on the surface of a photovoltaic module according to claim 1, wherein A detection model based on a preset attention mechanism to identify potential defect regions in a photovoltaic panel image to be detected includes: Input the photovoltaic panel image to be detected into the detection model, extract multi-scale features of the photovoltaic panel image through the convolutional neural network model, and use the attention mechanism to learn the significant features in the photovoltaic panel image. According to the learned significant features, generate an attention map; Perform threshold processing on the attention map, and define the regions with attention weights greater than the preset threshold as the potential defect regions.
3. The method for detecting surface abnormalities without damage of a photovoltaic module according to claim 1, wherein Segment the potential defect regions to divide into defect regions and non-defect regions includes: Input the image of the potential defect regions into a pixel-level classifier to perform pixel-level defect region segmentation on the potential defect regions to divide into defect regions and non-defect regions.
4. The method for detecting the surface abnormality and non-damage of a photovoltaic module according to claim 1, wherein, Based on the mapping relationship between pixel coordinates and the actual size of the photovoltaic panel, calculate the actual position and size of the defects in the defect regions includes: Obtain the size information of the photovoltaic panel, establish the mapping relationship between the pixel coordinate system and the actual size coordinate system, and determine the conversion function and parameters between the two coordinate systems; Obtain the mask image of the defect regions, perform binarization processing on the mask image to obtain a binarized image containing only the defect regions; Use the connected component analysis algorithm to process the binarized image and mark each connected component, where one connected component corresponds to one defect region; For each connected component, obtain the range of the corresponding pixel coordinates, and the range of the pixel coordinates is the upper left and lower right coordinates of the minimum bounding rectangle of the defect region in the photovoltaic panel image; According to the mapping relationship, convert the pixel coordinate range of each defect region into the coordinate range in the actual size to obtain the actual position of the defect on the photovoltaic panel; By calculating the width and height of the bounding rectangle of each defect region and performing conversion according to the mapping relationship, obtain the actual size of each defect; Judge whether each defect region exceeds the edge of the photovoltaic panel, and correct the defect regions that exceed the edge; Output the position and size information of all defects on the photovoltaic panel.
5. A surface anomaly non-destructive detection system for a photovoltaic module, characterized in that, For implementing the photovoltaic module surface anomaly non-destructive detection method as described in any one of claims 1-4, the system includes: an identification module, a segmentation module, a mapping module, and a discrimination module; The identification module is used to identify potential defect regions in a photovoltaic panel image to be detected based on a detection model with a preset attention mechanism; wherein, the detection model is constructed based on a convolutional neural network model; The segmentation module is used to segment the potential defect regions to divide into defect regions and non-defect regions; The mapping module is used to calculate the actual position and size of the defect in the defect area based on the mapping relationship between the pixel coordinates and the actual size of the photovoltaic panel; The discrimination module is used to judge the severity and classify the defect category of the defect in the defect area.
6. The photovoltaic module surface anomaly non-damage detection system according to claim 5, wherein, The recognition module includes: an extraction unit, a generation unit, and a definition unit; The extraction unit is used to input the photovoltaic panel image to be detected into the detection model, and extract multi-scale features of the photovoltaic panel image through a convolutional neural network model; The generation unit is used to learn the significant features in the photovoltaic panel image by using the attention mechanism, and generate an attention map according to the learned significant features; The definition unit is used to perform threshold processing on the attention map, and define the area with attention weight greater than the preset threshold as the potential defect area.
7. The photovoltaic module surface anomaly non-damage detection system according to claim 5, characterized in that, The segmentation module inputs the image of the potential defect area into a pixel-level classifier, and performs pixel-level defect area segmentation on the potential defect area to divide the defect area and the non-defect area.
8. The photovoltaic module surface anomaly non-damage detection system according to claim 5, characterized in that The mapping module includes: a construction unit, a binarization processing unit, a marking unit, an acquisition unit, a conversion unit, a calculation unit, a correction unit, and an output unit; The construction unit is used to obtain the size information of the photovoltaic panel, establish the mapping relationship between the pixel coordinate system and the actual size coordinate system, and determine the conversion function and parameters between the two coordinate systems; The binarization processing unit is used to obtain the mask image of the defect area, and perform binarization processing on the mask image to obtain a binarized image containing only the defect area; The marking unit is used to process the binarized image by using the connected component analysis algorithm, and mark each connected component, where one connected component corresponds to one defect area; The acquisition unit is used to obtain the range of the corresponding pixel coordinates for each connected component, and the range of the pixel coordinates is the upper left and lower right coordinates of the minimum bounding rectangle of the defect area in the photovoltaic panel image; The conversion unit is used to convert the range of the pixel coordinates of each defect area into the coordinate range in the actual size according to the mapping relationship, and obtain the actual position of the defect on the photovoltaic panel; The calculation unit is used to calculate the width and height of the bounding rectangle of each defect area, and perform conversion according to the mapping relationship to obtain the actual size of each defect; The correction unit is used to judge whether each defect area exceeds the edge of the photovoltaic panel, and correct the defect area that exceeds the edge; The output unit is used to output the position and size information of all the defects on the photovoltaic panel.