Defect detection method and device for photovoltaic module
By identifying and screening defects in electroluminescent images of photovoltaic modules, and using defect detection and shielding rules to form a target defect set, the problems of slow defect detection speed and missed defect detection in the prior art are solved, and efficient and accurate Defect detection.
Patent Information
- Application Number
- CN202411108523.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-22
AI Technical Summary
The existing photovoltaic module defect detection methods are slow to process and have problems of mis-checking and missed inspection, which cannot meet the needs of large-scale production.
By acquiring the electroluminescent images of photovoltaic modules and using pre-trained defect recognition models, combining defect detection rules and defect shielding rules, defect identification and screening are carried out to form a target defect set, and quickly identify and output electrophotographic photovoltaic images flaws.
It improves the accuracy and robustness of defect detection, adapts to actual production quality standards, meets large-scale production needs, and reduces the re-judgment cost of defect detection results.
Smart Images

Figure CN119006912A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of photovoltaic cell technology, and in particular, to a defect detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product for photovoltaic modules. Background Art
[0002] Photovoltaic modules are the core components of solar power systems, and their quality directly affects the efficiency and stability of the entire power system. In actual production, photovoltaic modules can be inspected for defects to ensure their performance and long-term stable operation.
[0003] However, existing defect detection solutions have slow processing speeds and problems such as false detection and missed detection, and cannot meet large-scale production needs.
[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention
[0005] The embodiments of the present application provide a defect detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product for photovoltaic modules to solve or alleviate one or more of the technical problems raised above.
[0006] One aspect of an embodiment of the present application provides a defect detection method for a photovoltaic module, the method comprising:
[0007] Acquire an electroluminescent image and defect detection rules of a photovoltaic module, wherein the defect detection rules include defect detection rules and defect shielding rules;
[0008] Inputting the electroluminescent image into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information to form a first defect set;
[0009] Based on the first defect set and the defect detection rule, remove part of the first defects from the first defect set, and determine the remaining first defects in the first defect set as second defects to form a second defect set;
[0010] Based on the second defect set and the defect masking rule, a target defect set is determined, where the target defect set includes target defects of the photovoltaic module.
[0011] Optionally, the electroluminescent image is a pre-processed image;
[0012] The preprocessing of the electroluminescent image includes:
[0013] Cutting off the black edge area in the electroluminescent image to obtain a cell area image of the photovoltaic module;
[0014] According to the specification parameters of the photovoltaic module, the battery area image is segmented to obtain a plurality of battery cell images;
[0015] Wherein, one of the cell images corresponds to one cell in the photovoltaic module.
[0016] Optionally, the electroluminescent image is input into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information, including:
[0017] Dividing the plurality of cell images into a plurality of groups to obtain a plurality of groups of cell images, each group of cell images including one or more cell images;
[0018] Inputting the plurality of groups of cell images into the defect recognition model in sequence to obtain a plurality of the first defects and corresponding defect information;
[0019] The defect information includes one or more of the following information: defect category, defect confidence, defect area, defect lateral width, defect longitudinal height, the battery cell where the defect is located, and the position of the defect in the battery cell.
[0020] Optionally, the defect detection rule includes a detection rate comparison;
[0021] Eliminating some of the first defects from the first defect set based on the first defect set and the defect detection rule includes:
[0022] determining a defect category and a defect confidence level for each of the first defects;
[0023] Determining, according to the defect category of each of the first defects, a defect detection rate corresponding to each of the first defects;
[0024] A first defect whose corresponding defect detection rate is less than a preset detection rate threshold is removed from the first defect set.
[0025] Optionally, the defect detection rule includes confidence comparison and area ratio comparison;
[0026] Eliminating some of the first defects from the first defect set based on the first defect set and the defect detection rule includes:
[0027] Determine the defect category, defect confidence and defect area ratio of each of the first defects; wherein the defect area ratio of the first defect is the ratio between the defect area of the first defect and the area of the battery cell where the first defect is located;
[0028] Determining, according to the defect category of each of the first defects, a defect confidence threshold and a defect area ratio threshold corresponding to each of the first defects;
[0029] The first defect whose defect confidence is less than the corresponding defect confidence threshold, or whose defect area ratio is less than the corresponding defect area ratio threshold, is removed from the first defect set.
[0030] Optionally, the defect detection rule includes a detection standard corresponding to a defect category;
[0031] Eliminating some of the first defects from the first defect set based on the first defect set and the defect detection rule includes:
[0032] determining a defect category of each of the first defects in the first defect set;
[0033] Determining, according to the defect category of each of the first defects in the first defect set, a detection standard corresponding to each of the first defects;
[0034] When a first defect without a corresponding detection standard appears in the first defect set, feature extraction is performed on a cell image corresponding to the cell where the first defect without a corresponding detection standard is located to obtain a feature vector;
[0035] Inputting the feature vector into a pre-trained defect classification model to obtain a classification result of the first defect without a corresponding detection standard;
[0036] When the classification result of the first defect without corresponding detection standard meets the preset standard, the first defect without corresponding detection standard is removed from the first defect set.
[0037] Optionally, determining a target defect set based on the second defect set and the defect masking rule includes:
[0038] Determine the defect category of each second defect, and match the defect category of each second defect with a preset defect shielding list to obtain a defect to be confirmed; wherein the defect to be confirmed is a second defect whose defect category matches the defect shielding list;
[0039] Obtaining the defect area, defect lateral width, defect longitudinal height and the cell where the defect is located of the defect to be confirmed, so as to determine the defect area ratio, defect lateral width ratio and defect longitudinal height ratio of the defect to be confirmed;
[0040] Compare the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed with their corresponding preset ratio thresholds respectively;
[0041] When the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed are all greater than their corresponding preset ratio thresholds, determining a preset shielding area of the battery cell where the defect to be confirmed is located, and a position of the defect to be confirmed in the battery cell;
[0042] The defects to be confirmed located in the preset shielding area are removed from the second defect set, and the remaining second defects in the second defect set are determined as the target defects to form the target defect set.
[0043] Another aspect of an embodiment of the present application provides a defect detection device for a photovoltaic module, the device comprising:
[0044] An acquisition module, used to acquire an electroluminescent image of a photovoltaic module and a defect detection rule, wherein the defect detection rule includes a defect detection rule and a defect shielding rule;
[0045] A first detection module, used for inputting the electroluminescent image into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information to form a first defect set;
[0046] a second detection module, configured to remove part of the first defects from the first defect set based on the first defect set and the defect detection rule, and determine the remaining first defects in the first defect set as second defects to form a second defect set;
[0047] The third detection module is used to determine a target defect set based on the second defect set and the defect shielding rule, where the target defect set includes target defects of the photovoltaic module.
[0048] Another aspect of an embodiment of the present application provides a computer device, including:
[0049] at least one processor; and
[0050] a memory communicatively coupled to the at least one processor;
[0051] Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
[0052] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.
[0053] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.
[0054] The above technical solution adopted in the embodiment of the present application may have the following advantages:
[0055] The electroluminescent image of the photovoltaic module is processed by a pre-trained defect recognition model to output a first defect set. The output of the defect recognition model is post-processed by pre-configured defect detection rules: using defect detection rules, some of the first defects in the first defect set are eliminated to obtain a second defect set; using defect shielding rules, some of the second defects in the second defect set are shielded to obtain a target defect set, and the target defects in the target defect set are effective defects of the photovoltaic module. It can be seen that the embodiment of the present application can quickly identify and output defects in the electroluminescent photovoltaic image through a machine learning model, and connect highly configurable defect detection rules in series to automatically screen the defects output by the model, thereby detecting effective defects of the photovoltaic module, improving the accuracy and robustness of defect detection, adapting to actual production quality standards, and meeting large-scale production needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0057] Figure 1 A flow chart of a defect detection method for a photovoltaic module according to the first embodiment of the present application is schematically shown;
[0058] Figure 2 The flowchart of preprocessing an electroluminescent image according to the first embodiment of the present application is schematically shown;
[0059] Figure 3 Schematically shows Figure 1 Flow chart of sub-steps of step S102;
[0060] Figure 4 Schematically shows Figure 1 Flow chart of sub-steps of step S104;
[0061] Figure 5 Schematically shows Figure 1 Flow chart of sub-steps of step S104;
[0062] Figure 6 Schematically shows Figure 1 Flow chart of sub-steps of step S104;
[0063] Figure 7 Schematically shows Figure 1 Flow chart of sub-steps of step S106;
[0064] Figure 8 is an application example diagram of a defect detection method for a photovoltaic module according to the first embodiment of the present application;
[0065] Fig. 9 A block diagram schematically shows a defect detection device for a photovoltaic module according to the second embodiment of the present application; and
[0066] Fig.10 The hardware architecture diagram of the computer device according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0068] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0069] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.
[0070] First, the following terms are explained:
[0071] EL: Electroluminescent. EL detection technology uses the property of semiconductor materials to emit light under the action of an electric field to detect defects, flaws or structural problems in materials or devices.
[0072] JSON (JavaScript Object Notation): A lightweight data exchange format.
[0073] Base64 encoding: Converts binary data into printable characters in the ASCII character set. Base64 decoding: Converts Base64-encoded data back to original binary data.
[0074] Machine learning: Training computers with data so that they can learn from data for prediction or decision-making. Neural networks are a type of machine learning model that simulates multiple layers of neurons to learn and process complex problems. Deep learning is a branch of machine learning that uses multiple layers of neural networks to learn and process data and is suitable for processing large-scale and complex data tasks.
[0075] XGBoost (Extreme Gradient Boosting): A machine learning algorithm based on an optimized distributed gradient boosting framework that can be used to handle tasks such as classification, regression, and sorting.
[0076] SIFT (Scale-Invariant Feature Transform): A scale-invariant feature transformation method that can identify, match, and track objects by detecting and describing key points in images. It has good scale, rotation, and brightness invariance.
[0077] SURF (Speeded Up Robust Features): A fast and robust feature extraction method. Compared with SIDT, SURF further improves the calculation speed and efficiency while ensuring the feature description capability.
[0078] HOG (Histogram of Oriented Gradients): A directional gradient histogram feature extraction method that can be used for object detection tasks. By counting and encoding the gradient direction information of the local area of the image, it can effectively capture the shape information of the image.
[0079] Adaptive algorithm: An algorithm that can automatically adjust its behavior or parameters based on input data or environmental conditions.
[0080] Edge detection algorithm: A digital image processing technique used to identify areas of significant change in an image, that is, edges in the image.
[0081] The embodiment of the present application provides a defect detection technology solution for photovoltaic modules. In this technology solution: (1) High flexibility and strong generalization ability: support free configuration of defect detection rules according to actual process quality standards, including: defect confidence threshold, defect area ratio threshold, defect category to be shielded, defect area to be shielded, shielding conditions to be shielded (defect lateral width ratio, defect longitudinal height ratio, defect area ratio, etc.); (2) High accuracy: for unquantifiable detection standards, the trained machine learning classification model (defect classification model) automatically extracts image feature information and analyzes it, and outputs OK (qualified) or NG9 (unqualified) for unclear defects with a high accuracy. (3) High degree of automation: through the configuration of defect detection rules and machine learning classification models, accurate and automatic screening of redundant output results of deep learning models (defect recognition models) is achieved, that is, the output of the model is optimized and corrected, the accuracy and robustness of defect detection is improved, and the cost of re-judgment of defect detection results is greatly reduced; (4) Accurate detection and automatic screening of defects in EL images of photovoltaic modules is achieved to fit the actual production quality standards, shield non-PV module (battery) defects caused by external factors (such as manual misjudgment), and support some unquantifiable detection needs, thereby improving the efficiency and accuracy of quality inspection links. See below for details.
[0082] The technical solutions of the present application are introduced below through multiple embodiments. It should be noted that these embodiments can be implemented in a variety of different forms and should not be construed as being limited to the embodiments described here.
[0083] Embodiment 1
[0084] Figure 1 The flowchart of the defect detection method for photovoltaic modules according to the first embodiment of the present application is schematically shown.
[0085] like Figure 1 As shown, the defect detection method for photovoltaic modules may include steps S100 to S106, wherein:
[0086] Step S100, obtaining an electroluminescent image of a photovoltaic module and defect detection rules, wherein the defect detection rules include defect detection rules and defect shielding rules.
[0087] Step S102: input the electroluminescent image into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information to form a first defect set.
[0088] Step S104: based on the first defect set and the defect detection rule, remove some of the first defects from the first defect set, and determine the remaining first defects in the first defect set as second defects to form a second defect set.
[0089] Step S106: determining a target defect set based on the second defect set and the defect shielding rule, wherein the target defect set includes target defects of the photovoltaic module.
[0090] The defect detection method for photovoltaic modules provided in this embodiment processes the electroluminescent image of the photovoltaic module through a pre-trained defect recognition model to output a first defect set. The output of the defect recognition model is post-processed through pre-configured defect detection rules: using defect detection rules, some of the first defects in the first defect set are eliminated to obtain a second defect set; using defect shielding rules, some of the second defects in the second defect set are shielded to obtain a target defect set, and the target defects in the target defect set are effective defects of the photovoltaic module. It can be seen that the embodiment of the present application can quickly identify and output defects in electroluminescent images through a machine learning model, and connect highly configurable defect detection rules in series to automatically screen the defects output by the model, thereby detecting effective defects of photovoltaic modules, improving the accuracy and robustness of defect detection, adapting to actual production quality standards, and meeting large-scale production needs.
[0091] The following combination Figure 1 , each step in steps S100 to S106 and other optional steps are described in detail.
[0092] It should be noted that the defect detection method provided in the embodiment of the present application can be applied to a single photovoltaic cell, a battery string composed of several photovoltaic cells, a photovoltaic module, etc., without limitation. The defect detection method provided in the embodiment of the present application will be exemplified below by taking a photovoltaic module as an example.
[0093] Step S100 , obtaining an electroluminescent image and defect detection rules of a photovoltaic module, wherein the defect detection rules include defect detection rules and defect shielding rules.
[0094] Electroluminescence images, also known as EL images, are used to record the luminescence phenomenon of photovoltaic modules when power is applied. Based on the luminescence pattern and luminescence intensity of the electroluminescence image, defects in photovoltaic modules can be identified and analyzed, such as surface cracks, hot spots, broken grids, and too large / small gaps between cells.
[0095] Defect detection rules are used to screen or shield defects in photovoltaic modules to ultimately determine the effective defects of photovoltaic modules. Defect detection rules may include the following information: defect categories to be detected and the corresponding defect confidence threshold, defect area ratio threshold, and defect detection rate; defect categories to be shielded, shielding conditions (such as defect area ratio threshold, defect horizontal width ratio threshold, defect vertical height ratio threshold, etc.), and shielding areas (such as upper edge height, lower edge height, left edge height, right edge height, etc.). It should be noted that defect detection rules can be freely configured according to actual conditions. For example, various thresholds can be dynamically adjusted according to production quality standards, process requirements, etc. In practical applications, defect detection rules may include defect detection rules and defect shielding rules. Among them, defect detection rules can be used to screen defects of photovoltaic modules reflected by electroluminescent images to streamline the detected defects. Defect shielding rules can be used to shield (ignore) certain defects among the detected defects to match the actual production quality standards and detection requirements.
[0096] In some embodiments, the flask framework can be built using Python language according to predetermined passwords (keys for security verification), required parameters (such as required data) and image formats (such as the format of electroluminescent images), etc., and the local area network or public network algorithm port can be opened to obtain data transmitted by front-end devices (such as electroluminescent imaging devices and human-machine interface devices). These data can be transmitted in JSON format to reduce network bandwidth occupancy and improve data transmission efficiency. The transmitted data may include: electroluminescent images of photovoltaic modules, specification parameters of photovoltaic modules, defect detection rules configured by users through human-machine interface devices, etc. After receiving the data in JSON format, the long JSON field can also be parsed into a formatted data group according to the aforementioned predetermined rules (such as passwords, required parameters, and image formats) for subsequent defect detection. Of course, the electroluminescent images and defect detection rules of photovoltaic modules can also be obtained from local, preset databases or other devices, which are not limited here.
[0097] Step S102 , input the electroluminescent image into a pre-trained defect recognition model to obtain multiple first defects and corresponding defect information to form a first defect set.
[0098] Exemplarily, the defect recognition model can be used to analyze electroluminescent images to identify defects in photovoltaic modules. The defect recognition model can be trained by electroluminescent images of a large number of photovoltaic modules with defects and electroluminescent images of photovoltaic modules without defects. The defect recognition model can be a neural network, such as: CNN (Convolutional Neural Network) DNN (Deep Neural Network) or other types of machine models. The defect recognition model can also be used to calculate the defect information corresponding to the defects it identifies. Among them, the defect information may include one or more of the following: defect category (such as hot spots, broken grids, surface cracks, etc.), defect confidence (reliability, which can be 0 to 1), defect area, defect lateral width, defect longitudinal height, defect location of the cell, and the location of the defect in the cell. In practical applications, the electroluminescent image of the photovoltaic module can be input into a pre-trained defect recognition model to output multiple first defects and corresponding defect information through the defect recognition model, thereby forming a first defect set. In this embodiment, the machine learning model can quickly identify and output defects in the electrophotovoltaic image, improve detection efficiency and stability, and record relevant data (the first defect and the corresponding defect information) to achieve digital management and monitoring, which is convenient for subsequent data analysis and summary.
[0099] In order to further optimize the detection efficiency, the input (electroluminescence image) of the defect recognition model may also be preprocessed, for example, encoding / decoding, cropping, normalization, standardization, equalization, filtering and noise reduction, enhancement, etc. Some exemplary solutions are provided below.
[0100] In an optional embodiment, if Figure 2 As shown, the preprocessing of the electroluminescent image includes:
[0101] Step S200, cutting off the black edge area in the electroluminescent image to obtain a cell area image of the photovoltaic module.
[0102] Step S202, dividing the cell region image according to the specification parameters of the photovoltaic module to obtain a plurality of cell images; wherein one cell image corresponds to one cell in the photovoltaic module.
[0103] In practical applications, invalid areas (such as black edge areas) and battery areas in electroluminescent images can be identified through edge detection, threshold segmentation, machine learning and other methods. Then, the redundant black edge invalid areas in the electroluminescent image are cut off through an adaptive algorithm to obtain a complete and effective pure battery area image. According to the specifications of the photovoltaic module (such as: the number of cells, arrangement, spacing, size, size of the photovoltaic module, longitudinal offset parameters, lateral offset parameters, etc.), the battery area image is traversed, the unit cell is segmented and stored, and the coordinates of the upper left corner and lower right corner of each cell in the photovoltaic module are recorded to establish a mapping relationship between the cell image corresponding to each cell and the battery area image.
[0104] In this embodiment, the invalid area in the electroluminescent image is cut off to reduce the interference of irrelevant information, reduce resource consumption, and further improve the accuracy of defect detection. Cutting the battery image area into multiple battery cell images can reduce the amount of data input to the model, reduce the calculation complexity, and thus speed up the model reasoning speed.
[0105] In some embodiments, the preprocessing may also include converting the format of the acquired electroluminescent image to further improve the efficiency and accuracy of defect detection, for example, performing Base64 decoding on the electroluminescent image to convert it into a binary format that is easy for the algorithm to operate.
[0106] In an optional embodiment, if Figure 3 As shown, step S102 may include:
[0107] Step S300 , dividing the plurality of cell images into a plurality of groups to obtain a plurality of groups of cell images, each group of cell images including one or more cell images.
[0108] Step S302: input the plurality of groups of cell images into the defect recognition model in sequence to obtain a plurality of the first defects and corresponding defect information.
[0109] In practical applications, in order to reduce resource consumption and improve processing efficiency, the preprocessed cell images can be divided into multiple groups to obtain multiple groups of cell images. The multiple groups of cell images are sequentially input into the defect recognition model to detect one or more defects in the cell images through the defect recognition model, and the defect information corresponding to each defect is determined. For example, the preprocessed multiple cell images can be batched in a fixed number per group (total number of cell images / 10), and input into a pre-trained neural network (defect recognition model) in batches, so that several first defects can be identified through the neural network, and the Gaussian kernel corresponding to each first defect is output. Among them, the Gaussian kernel size is associated with the size of the corresponding first defect. Based on the fact that the center point of the defect and the surrounding pixels are distributed in a Gaussian kernel, and the points in the Gaussian kernel around the center point show the attenuation of the Gaussian distribution when used as negative samples, the Gaussian kernel can be used to determine the defect information corresponding to the first defect, including: bias (the position of the defect relative to the cell), center point, defect lateral width, defect longitudinal height, defect area ratio, etc.
[0110] In this embodiment, a plurality of battery cell patterns are divided into a plurality of groups, and the battery cell patterns of the plurality of groups are sequentially input into the defect recognition model, which can reduce the computational load and improve the processing efficiency and recognition accuracy.
[0111] Step S104 , based on the first defect set and the defect detection rule, some of the first defects are eliminated from the first defect set, and the remaining first defects in the first defect set are determined as second defects to form a second defect set.
[0112] Defect detection rules can be used to screen defects in photovoltaic modules reflected by electroluminescent images to streamline the detected defects. Through defect detection rules, the output of the machine learning model can be corrected and optimized, such as eliminating some first defects, and then screening out defects that need to be detected (second defects), forming a smaller set of second defects, and improving the accuracy of defect detection.
[0113] The defect detection rules can be freely configured and adjusted according to the actual situation, for example: confidence comparison, position comparison, area ratio comparison, etc. A number of exemplary embodiments will be provided below.
[0114] In an optional embodiment, the defect detection rule may include a detection rate comparison. Figure 4 As shown, step S104 may include:
[0115] Step S400: determining the defect category and defect confidence of each of the first defects.
[0116] Step S402: determining a defect detection rate corresponding to each of the first defects according to the defect category of each of the first defects.
[0117] Step S404: remove the first defect whose corresponding defect detection rate is less than a preset detection rate threshold from the first defect set.
[0118] Exemplarily, the defect detection rules may include defect categories that need to be detected, and the defect detection rate corresponding to each defect category that needs to be detected. The first defect whose corresponding defect detection rate is less than the preset detection rate threshold is eliminated from the first defect set. Among them, the preset detection rate threshold can be configured as an extremely low value, for example: 0.001%, which is equivalent to the probability of only detecting the first defect of a certain defect category is only one in ten thousand. If a defect with an extremely low detection rate is detected, there may be a risk of false detection. In practical applications, the first defects can also be sorted according to the defect detection rate, and the first defects with a lower defect detection rate can be screened out, leaving only a fixed number of first defects, so as to reduce the data post-processing time and reduce the risk of false detection. In this embodiment, defects with extremely low detection rates are eliminated to further optimize processing efficiency.
[0119] In an optional embodiment, the defect detection rule may also include a confidence comparison. Figure 5 As shown, step S104 may also include:
[0120] Step S500, determining the defect category, defect confidence and defect area ratio of each of the first defects; wherein the defect area ratio of the first defect is the ratio between the defect area of the first defect and the area of the battery cell where the first defect is located.
[0121] Step S502: determining a defect confidence threshold and a defect area ratio threshold corresponding to each of the first defects according to the defect category of each of the first defects.
[0122] Step S504: remove the first defect whose defect confidence is less than the corresponding defect confidence threshold or whose defect area ratio is less than the corresponding defect area ratio threshold from the first defect set.
[0123] The defect confidence of the first defect is the probability that the defect recognition model predicts that the first defect exists in the photovoltaic module. The value range of the defect confidence can be 0 to 1. The greater the defect confidence, the greater the possibility that the first defect exists in the photovoltaic module, and the higher the detection accuracy. The smaller the defect confidence, the smaller the possibility that the first defect exists in the photovoltaic module, and there may be a risk of false detection. Therefore, the defect detection rule can be set to include confidence comparison, and a corresponding defect confidence threshold can be configured in advance for each defect category to optimize the output of the defect recognition model (first defect set). The defect area ratio of the first defect is the ratio between the defect area of the first defect and the area of the battery cell where the first defect is located. When the defect area ratio is small, the corresponding first defect may be a defect of noise or irrelevant information, and there is a possibility of false detection. Therefore, the defect detection rule can be set to also include area ratio comparison, and a corresponding defect area ratio threshold can be configured in advance for each defect category to further optimize the output of the defect recognition model and improve the reliability of quality inspection.
[0124] Exemplarily, defect information of each first defect in the first defect set can be obtained, including defect category, defect confidence, defect area and the battery cell where the defect is located. According to the defect category, the corresponding defect confidence threshold and defect area ratio threshold are obtained. According to the defect area and the battery cell where the defect is located, the defect area ratio of each first defect can be calculated. If the defect confidence of a first defect is lower than the corresponding defect confidence threshold, the first defect is removed from the first defect set. If the defect area ratio of a first defect is lower than the corresponding defect area ratio threshold, the first defect is removed from the first defect set. It can be seen that in this embodiment, the first defect whose defect confidence and defect area ratio are both higher than the given threshold is determined as the second defect, and enters the subsequent screening process. In this embodiment, the first defects that do not reach the given threshold are screened out based on the defect confidence and defect area ratio, which can filter noise and reduce false alarms, thereby improving the accuracy and reliability of defect detection, and optimizing resource utilization efficiency.
[0125] In an optional embodiment, the defect detection rule may further include a detection standard corresponding to the defect category.
[0126] like Figure 6 As shown, step S104 may also include:
[0127] Step S600: determining the defect category of each of the first defects in the first defect set.
[0128] Step S602: determining a detection standard corresponding to each of the first defects in the first defect set according to the defect category of each of the first defects.
[0129] Step S604: when a first defect without a corresponding detection standard appears in the first defect set, feature extraction is performed on a cell image corresponding to the cell where the first defect without a corresponding detection standard is located to obtain a feature vector.
[0130] Step S606: input the feature vector into a pre-trained defect classification model to obtain a classification result of the first defect without a corresponding detection standard.
[0131] Step S608 , when the classification result of the first defect without corresponding detection standard meets the preset standard, the first defect without corresponding detection standard is removed from the first defect set.
[0132] In practical applications, some defect categories have quantifiable detection standards, such as: cold solder joints, broken pieces, dead pieces, single hidden cracks, fork hidden cracks, strip deviation, etc. These defect categories can provide clear detection standards, such as: size range, area range, etc., which can be quickly screened through numerical comparison to shorten the post-processing process. However, some defect categories do not have quantifiable detection standards, such as: incoming material marks, dirt, pollution, concentric circles, etc. For these defect categories, defects can be screened through pre-trained classifiers. The classifier can identify the complex and irregular defects corresponding to these defect categories, reduce misjudgments and missed judgments, support some unquantifiable detection needs, and improve quality inspection efficiency and accuracy.
[0133] Exemplarily, the XGBoost classifier (defect classification model) can be trained in advance using labeled training data (i.e., EL images and their corresponding features that are known to be OK or NG). Of course, the defect classification model can also be other classifiers, such as random forests, support vector machines, naive Bayes, etc. The following is an exemplary introduction using XGBoost as an example. XGBoost uses a gradient boosting algorithm to iteratively train a series of weak classifiers (such as decision trees), and combines multiple weak classifiers into a powerful classifier through weighted mixing or simple voting. In practical applications, when a first defect that does not have a corresponding detection standard appears in the first defect set, the cell image corresponding to the cell where the first defect that does not have a corresponding detection standard is located can be obtained. Various types of feature extraction and feature vector construction are performed on the acquired cell images, including: color histogram features, texture features, SIFT features, SURF features, HOG features, etc., to refine the high-order features of the cell image and ensure the integrity of the features. The constructed feature vector is input into the pre-trained binary classification XGBoost model (defect classification model) to obtain the confidence that the cell image belongs to OK and NG. According to the OK and NG probabilities output by the defect classification model, the higher one is determined as the classification result. If the classification result is OK, it means that the first defect without corresponding detection standard does not need to be detected and can be ignored. The first defect without corresponding detection standard is removed from the first defect set. If the classification result is NG, it means that the first defect without corresponding detection standard needs to be detected, and it is determined as the second defect and enters the subsequent screening process.
[0134] In this embodiment, a machine learning classification model (defect classification model) is connected in series after a machine learning model (defect recognition model), which can achieve the matching of different inspection process standards and difficult-to-quantify inspection standards, and further improve the efficiency and accuracy of the quality inspection process.
[0135] Step S106 , based on the second defect set and the defect shielding rule, determining a target defect set, wherein the target defect set includes target defects of the photovoltaic module.
[0136] In practical applications, under the influence of process level, production quality standards, etc., some defects may not need to be detected and can be ignored. Therefore, defect shielding rules can be configured to shield (ignore) certain defects among the detected defects to match the actual detection requirements. That is, according to the defect shielding rules, some of the second defects in the second defect set are shielded, and the remaining second defects are determined as target defects, that is, effective detection defects of photovoltaic modules. In this embodiment, further screening of the output of the machine learning model through defect shielding rules can better match the actual detection requirements. Defect shielding rules may include: defect categories to be shielded, shielding areas, etc. An exemplary scheme will be provided below.
[0137] In an optional embodiment, if Figure 7 As shown, step S106 may include:
[0138] Step S700, determining the defect category of each second defect, and matching the defect category of each second defect with a preset defect shielding list to obtain a defect to be confirmed, wherein the defect to be confirmed is a second defect whose defect category matches the defect shielding list.
[0139] Step S702, obtaining the defect area, defect lateral width, defect longitudinal height and the battery cell where the defect is located of the defect to be confirmed, so as to determine the defect area ratio, defect lateral width ratio and defect longitudinal height ratio of the defect to be confirmed.
[0140] Step S704, comparing the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed with their corresponding preset ratio thresholds respectively.
[0141] Step S706, when the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed are all greater than their corresponding preset ratio thresholds, determine the preset shielding area of the battery cell where the defect to be confirmed is located, and the position of the defect to be confirmed in the battery cell.
[0142] Step S708: remove the to-be-confirmed defects located in the preset shielding area from the second defect set, and determine the remaining second defects in the second defect set as the target defects to form the target defect set.
[0143] Exemplarily, the defect category of the second defect can be retrieved in a preconfigured defect shielding list. If the defect category of the second defect is not retrieved, the second defect whose defect category is not retrieved is determined as a target defect and needs to be detected. If the defect category of the second defect is retrieved, it is marked as a defect to be confirmed. The defect area, defect lateral width, defect longitudinal height and battery cell where the defect is located of the defect to be confirmed are obtained to calculate the defect area ratio, defect lateral width ratio and defect longitudinal height ratio of the defect to be confirmed (all compared to the battery cell where the defect is located), and compare them with the corresponding preset ratio thresholds respectively. If any one of the items is lower than the corresponding preset ratio threshold, the defect to be confirmed is determined as a target defect and needs to be detected. If all three items are higher than the corresponding preset ratio thresholds, the position of the defect to be confirmed in the battery cell is obtained, for example: the upper edge height, the lower edge height, the left edge height, the right edge height, and the preset shielding area in the battery cell where the defect is located is determined. In the case where the upper edge height of the defect to be confirmed is lower than or equal to the upper edge height of the preset shielding area, the lower edge height is higher than or equal to the lower edge height of the preset shielding area, the left edge height is greater than or equal to the left edge height of the preset shielding area, and the right edge height is less than or equal to the right edge height of the preset shielding area, etc., it is determined that the defect to be confirmed is located in the preset shielding area and needs to be shielded, and it is deleted from the second defect list. If the defect to be confirmed is not in the preset shielding area, the defect to be confirmed is determined as a target defect and needs to be detected.
[0144] In this embodiment, certain defects are masked out of the detected defects through defect masking rules to adapt to actual detection requirements, thereby achieving accurate and automatic screening of redundant defects and detecting effective defects of photovoltaic modules.
[0145] In some embodiments, defect information of the target defect can also be obtained to construct a JSON string, and the JSON string can be returned to the front-end device (such as a human-computer interaction interface, etc.). The defect information can include the defect category of the target defect, the defect area ratio, the defect confidence, and the position of the defect in the cell (upper left corner x, y, lower right corner x, y). The coordinates of the target defect in the photovoltaic module can also be reversed and spliced based on the mapping relationship between the cell image and the cell area image of the photovoltaic module to calculate the position of the cell image in the original image (cell area image or electroluminescent image) and the specific position of the target defect in the original image. In this embodiment, the effective defects and corresponding defect information after screening and shielding are organized and summarized, and returned to the front-end software, which can support digital management and adapt to the needs of data tracking, analysis and supervision.
[0146] In order to make this application easier to understand, the following Figure 8 An exemplary application is provided.
[0147] S1: Acquire the image to be inspected (electroluminescent image of photovoltaic module) and parameters (defect detection requirements freely configured by the user, specification parameters of photovoltaic module).
[0148] S2: Format parsing parameters for subsequent conditional judgment.
[0149] S3: Preprocess the electroluminescent image (format conversion, cutting off invalid areas), and divide and store the image in units of battery cells.
[0150] S4: Group the multiple battery cell images obtained through preprocessing, and input them into the deep learning model (defect recognition model) in sequence, so as to infer and output multiple first defects and corresponding defect information through the deep learning model.
[0151] S5-7: Using defect detection rules, a confidence judgment and an area ratio judgment are performed on each first defect, and a first defect that passes both judgments is determined as a second defect.
[0152] S8-9: Check whether each first defect has a quantifiable detection standard. If a first defect has a quantifiable detection standard, the first defect is determined as a second defect, and the detection step jumps to S12. If a first defect does not have a quantifiable detection standard, extract features from the cell image corresponding to the cell where the first defect is located, and construct a feature vector (feature engineering).
[0153] S10: Input the constructed feature vector into the XGBoost model to obtain the classification result.
[0154] S11: Determine whether the first defect needs to be detected according to the classification result. Eliminate the first defect that does not need to be detected, and determine the first defect that needs to be detected as the second defect.
[0155] S12-14: Using defect shielding rules: for each second defect, shielding category judgment, shielding length and width ratio judgment, shielding area ratio judgment, and shielding region judgment are performed. The second defect that passes all four judgments is determined as the second defect that needs to be shielded and is eliminated. The second defect that does not need to be shielded is determined as the target defect.
[0156] S15: Summarize the target defects and the corresponding defect information, construct and return a JSON string.
[0157] In this exemplary application: (1) High flexibility and strong generalization ability: It supports free configuration of defect detection rules according to actual process quality standards, including: defect confidence threshold, defect area ratio threshold, defect category to be shielded, defect area to be shielded, and shielding conditions to be shielded (defect lateral width ratio, defect longitudinal height ratio, defect area ratio, etc.); (2) High accuracy: For detection standards that cannot be quantified, the trained machine learning classification model (defect classification model) automatically extracts image feature information and analyzes it, and outputs OK (qualified) or NG9 (unqualified) for unclear defects with a high accuracy rate. (3) High degree of automation: through the configuration of defect detection rules and machine learning classification models, accurate and automatic screening of redundant output results of deep learning models (defect recognition models) can be achieved, that is, the output of the model is optimized and corrected, the accuracy and robustness of defect detection are improved, and the cost of re-judgment of defect detection results is greatly reduced; (4) Accurate detection and automatic screening of defects in EL images of photovoltaic modules can be achieved to fit the actual production quality standards, shield non-PV module (battery) defects caused by external factors (such as human misjudgment), and support some unquantifiable detection needs, thereby improving the efficiency and accuracy of the quality inspection process.
[0158] Embodiment 2
[0159] Fig. 9 The block diagram of the defect detection device for photovoltaic modules according to the second embodiment of the present application is schematically shown. The device can be divided into one or more program modules, one or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Fig. 9 As shown, the device 1000 may include: an acquisition module 1100, a first detection module 1200, a second detection module 1300 and a third detection module 1400, wherein:
[0160] An acquisition module 1100 is used to acquire an electroluminescent image of a photovoltaic module and a defect detection rule, wherein the defect detection rule includes a defect detection rule and a defect shielding rule;
[0161] A first detection module 1200, configured to input the electroluminescent image into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information to form a first defect set;
[0162] A second detection module 1300 is configured to remove part of the first defects from the first defect set based on the first defect set and the defect detection rule, and determine the remaining first defects in the first defect set as second defects to form a second defect set;
[0163] The third detection module 1400 is configured to determine a target defect set based on the second defect set and the defect shielding rule, where the target defect set includes target defects of the photovoltaic module.
[0164] As an optional embodiment, the electroluminescent image is a pre-processed image;
[0165] The preprocessing of the electroluminescent image includes:
[0166] Cutting off the black edge area in the electroluminescent image to obtain a cell area image of the photovoltaic module;
[0167] According to the specification parameters of the photovoltaic module, the battery area image is segmented to obtain a plurality of battery cell images;
[0168] Wherein, one of the cell images corresponds to one cell in the photovoltaic module.
[0169] As an optional embodiment, the first detection module 1200 is further configured to:
[0170] Dividing the plurality of cell images into a plurality of groups to obtain a plurality of groups of cell images, each group of cell images including one or more cell images;
[0171] Inputting the plurality of groups of cell images into the defect recognition model in sequence to obtain a plurality of the first defects and corresponding defect information;
[0172] The defect information includes one or more of the following information: defect category, defect confidence, defect area, defect lateral width, defect longitudinal height, the battery cell where the defect is located, and the position of the defect in the battery cell.
[0173] As an optional embodiment, the defect detection rule includes detection rate comparison;
[0174] The second detection module 1300 is further used for:
[0175] determining a defect category and a defect confidence level for each of the first defects;
[0176] Determining, according to the defect category of each of the first defects, a defect detection rate corresponding to each of the first defects;
[0177] A first defect whose corresponding defect detection rate is less than a preset detection rate threshold is removed from the first defect set.
[0178] As an optional embodiment, the defect detection rule includes confidence comparison and area ratio comparison;
[0179] The second detection module 1300 is further used for:
[0180] Determine the defect category, defect confidence and defect area ratio of each of the first defects; wherein the defect area ratio of the first defect is the ratio between the defect area of the first defect and the area of the battery cell where the first defect is located;
[0181] Determining, according to the defect category of each of the first defects, a defect confidence threshold and a defect area ratio threshold corresponding to each of the first defects;
[0182] The first defect whose defect confidence is less than the corresponding defect confidence threshold, or whose defect area ratio is less than the corresponding defect area ratio threshold, is removed from the first defect set.
[0183] As an optional embodiment, the defect detection rule includes a detection standard corresponding to a defect category;
[0184] The second detection module 1300 is further used for:
[0185] determining a defect category of each of the first defects in the first defect set;
[0186] Determining, according to the defect category of each of the first defects in the first defect set, a detection standard corresponding to each of the first defects;
[0187] When a first defect without a corresponding detection standard appears in the first defect set, feature extraction is performed on a cell image corresponding to the cell where the first defect without a corresponding detection standard is located to obtain a feature vector;
[0188] Inputting the feature vector into a pre-trained defect classification model to obtain a classification result of the first defect without a corresponding detection standard;
[0189] When the classification result of the first defect without corresponding detection standard meets the preset standard, the first defect without corresponding detection standard is removed from the first defect set.
[0190] As an optional embodiment, the third detection module 1400 is further configured to:
[0191] Determine the defect category of each second defect, and match the defect category of each second defect with a preset defect shielding list to obtain a defect to be confirmed; wherein the defect to be confirmed is a second defect whose defect category matches the defect shielding list;
[0192] Obtaining the defect area, defect lateral width, defect longitudinal height and the cell where the defect is located of the defect to be confirmed, so as to determine the defect area ratio, defect lateral width ratio and defect longitudinal height ratio of the defect to be confirmed;
[0193] Compare the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed with the corresponding preset ratio thresholds respectively;
[0194] When the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed are all greater than the corresponding preset ratio thresholds, determining the preset shielding area of the battery cell where the defect to be confirmed is located, and the position of the defect to be confirmed in the battery cell;
[0195] The defects to be confirmed located in the preset shielding area are removed from the second defect set, and the remaining second defects in the second defect set are determined as the target defects to form the target defect set.
[0196] Embodiment 3
[0197] Fig.10 The hardware architecture diagram of a computer device 10000 suitable for implementing a defect detection method for photovoltaic modules according to the third embodiment of the present application is schematically shown. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a virtual device, a workbench, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Fig.10 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them:
[0198] The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed on the computer device 10000, such as program code for a defect detection method for a photovoltaic module, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.
[0199] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.
[0200] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0201] It should be pointed out that Fig.10 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0202] In this embodiment, the defect detection method for photovoltaic modules stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.
[0203] Embodiment 4
[0204] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the defect detection method for photovoltaic modules in the embodiment are implemented.
[0205] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEP ROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store the operating system and various application software installed on the computer device, such as the program code of the defect detection method for photovoltaic modules in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.
[0206] Embodiment 5
[0207] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.
[0208] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0209] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A defect detection method for photovoltaic modules, characterized in that: The method comprises: Acquire an electroluminescent image and defect detection rules of a photovoltaic module, wherein the defect detection rules include defect detection rules and defect shielding rules; Inputting the electroluminescent image into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information to form a first defect set; Based on the first defect set and the defect detection rule, remove part of the first defects from the first defect set, and determine the remaining first defects in the first defect set as second defects to form a second defect set; Based on the second defect set and the defect masking rule, a target defect set is determined, where the target defect set includes target defects of the photovoltaic module.
2. The method according to claim 1, characterized in that The electroluminescent image is a pre-processed image; The preprocessing of the electroluminescent image includes: Cutting off the black edge area in the electroluminescent image to obtain a cell area image of the photovoltaic module; According to the specification parameters of the photovoltaic module, the battery area image is segmented to obtain a plurality of battery cell images; Wherein, one of the cell images corresponds to one cell in the photovoltaic module.
3. The method according to claim 2, characterized in that The electroluminescent image is input into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information, including: Dividing the plurality of cell images into a plurality of groups to obtain a plurality of groups of cell images, each group of cell images including one or more cell images; Inputting the plurality of groups of cell images into the defect recognition model in sequence to obtain a plurality of the first defects and corresponding defect information; The defect information includes one or more of the following information: defect category, defect confidence, defect area, defect lateral width, defect longitudinal height, the battery cell where the defect is located, and the position of the defect in the battery cell.
4. The method according to claim 3, characterized in that The defect detection rules include detection rate comparison; Eliminating some of the first defects from the first defect set based on the first defect set and the defect detection rule includes: determining a defect category and a defect confidence level for each of the first defects; Determining, according to the defect category of each of the first defects, a defect detection rate corresponding to each of the first defects; A first defect whose corresponding defect detection rate is less than a preset detection rate threshold is removed from the first defect set.
5. The method according to claim 4, characterized in that The defect detection rules include confidence comparison and area ratio comparison; Eliminating some of the first defects from the first defect set based on the first defect set and the defect detection rule includes: Determine the defect category, defect confidence and defect area ratio of each of the first defects; wherein the defect area ratio of the first defect is the ratio between the defect area of the first defect and the area of the battery cell where the first defect is located; Determining, according to the defect category of each of the first defects, a defect confidence threshold and a defect area ratio threshold corresponding to each of the first defects; The first defect whose defect confidence is less than the corresponding defect confidence threshold, or whose defect area ratio is less than the corresponding defect area ratio threshold, is removed from the first defect set.
6. The method according to claim 3, characterized in that The defect detection rules include detection standards corresponding to defect categories; Eliminating some of the first defects from the first defect set based on the first defect set and the defect detection rule includes: determining a defect category of each of the first defects in the first defect set; Determining, according to the defect category of each of the first defects in the first defect set, a detection standard corresponding to each of the first defects; When a first defect without a corresponding detection standard appears in the first defect set, feature extraction is performed on a cell image corresponding to the cell where the first defect without a corresponding detection standard is located to obtain a feature vector; Inputting the feature vector into a pre-trained defect classification model to obtain a classification result of the first defect without a corresponding detection standard; When the classification result of the first defect without corresponding detection standard meets the preset standard, the first defect without corresponding detection standard is removed from the first defect set.
7. The method according to claim 3, characterized in that Determining a target defect set based on the second defect set and the defect masking rule includes: Determine the defect category of each second defect, and match the defect category of each second defect with a preset defect shielding list to obtain a defect to be confirmed; wherein the defect to be confirmed is a second defect whose defect category matches the defect shielding list; Obtaining the defect area, defect lateral width, defect longitudinal height and the cell where the defect is located of the defect to be confirmed, so as to determine the defect area ratio, defect lateral width ratio and defect longitudinal height ratio of the defect to be confirmed; Compare the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed with their corresponding preset ratio thresholds respectively; When the defect area ratio, defect lateral width ratio, and defect longitudinal height ratio of the defect to be confirmed are all greater than their corresponding preset ratio thresholds, determining a preset shielding area of the battery cell where the defect to be confirmed is located, and a position of the defect to be confirmed in the battery cell; The defects to be confirmed located in the preset shielding area are removed from the second defect set, and the remaining second defects in the second defect set are determined as the target defects to form the target defect set.
8. A defect detection device for photovoltaic modules, characterized in that: The device comprises: An acquisition module, used to acquire an electroluminescent image of a photovoltaic module and a defect detection rule, wherein the defect detection rule includes a defect detection rule and a defect shielding rule; A first detection module, used for inputting the electroluminescent image into a pre-trained defect recognition model to obtain a plurality of first defects and corresponding defect information to form a first defect set; a second detection module, configured to remove part of the first defects from the first defect set based on the first defect set and the defect detection rule, and determine the remaining first defects in the first defect set as second defects to form a second defect set; The third detection module is used to determine a target defect set based on the second defect set and the defect shielding rule, where the target defect set includes target defects of the photovoltaic module.
9. A computer device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
