Defect detection method and device for photovoltaic module and electronic equipment
By inputting the image of the photovoltaic module into a pre-trained defect detection model, the defect information of the image is determined, and problems such as low detection efficiency, high cost and high skill requirements in the prior art are solved, and efficient and economical defect detection is achieved.
Patent Information
- Application Number
- CN202411665573.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
The existing photovoltaic module defect detection methods have problems such as low detection efficiency, high cost, and high requirements for the testing environment and operator skills.
Defect detection is achieved by acquiring images of photovoltaic components and inputting them into a pre-trained defect detection model, defect information of the image, including probability scores for different defect types.
It reduces the requirements for the detection environment and operator skills, expands the universality of defect detection, saves detection costs, and improves detection efficiency.
Smart Images

Figure CN119599990A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a defect detection method, device and electronic equipment for photovoltaic modules. Background Art
[0002] Photovoltaic modules, also known as solar panels, are devices that convert solar energy into electrical energy. They are composed of a series of photovoltaic cells, which are arranged and connected in a specific way to convert the captured solar energy into electrical energy for people to use. Defect detection is a necessary part of the production and application of photovoltaic modules, and has an important impact on the safe and reliable operation of solar energy systems, photovoltaic power generation efficiency, and the service life of photovoltaic modules.
[0003] Related technologies mainly realize defect detection of photovoltaic modules through visual inspection, infrared imaging inspection, ultrasonic inspection, electrical performance inspection and X-ray inspection. Although the above methods can realize defect detection of photovoltaic modules, they have problems such as low detection efficiency, high cost, and high requirements on test environment and operator skills. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure propose a photovoltaic module defect detection method, device and electronic equipment to solve the problems existing in the related art, such as low detection efficiency, high cost, and high requirements on the test environment and operator skills.
[0005] According to a first aspect of the present disclosure, a defect detection method for a photovoltaic component is provided, comprising: acquiring a first component image of a photovoltaic component to be detected; inputting the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores that the first component image belongs to different defect types; and determining a defect detection result of the photovoltaic component to be detected based on the defect information.
[0006] According to a second aspect of the present disclosure, a defect detection device for a photovoltaic component is provided, comprising: an acquisition module, used to acquire a first component image of a photovoltaic component to be detected; a processing module, used to input the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes a defect type and a probability score of each defect type; and a detection module, used to determine a defect detection result of the photovoltaic component to be detected based on the defect information.
[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, cause the processor to execute the above-mentioned photovoltaic component defect detection method.
[0008] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned photovoltaic component defect detection method.
[0009] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:
[0010] In the defect detection method of photovoltaic components provided in the exemplary implementation of the present disclosure, a first component image of the photovoltaic component to be detected is obtained; the first component image is input into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores of the first component image belonging to different defect types; and the defect detection result of the photovoltaic component to be detected is determined based on the defect information. By inputting the image of the photovoltaic component into a pre-trained defect detection model, the embodiment of the present disclosure can realize defect detection of the photovoltaic component based on the defect information output by the defect detection model, thereby reducing the requirements for the detection environment and the operating skills of the detection personnel, expanding the universality of defect detection, saving detection costs, and improving detection efficiency.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0013] Figure 1 A flow chart of a photovoltaic module defect detection method according to an exemplary embodiment of the present disclosure is shown;
[0014] Figure 2 A flowchart of training a defect detection model in a defect detection method for a photovoltaic module according to an exemplary embodiment of the present disclosure is shown;
[0015] Figure 3 A flowchart of image processing of a second component image in a photovoltaic component defect detection method according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 4 A schematic diagram showing a second component image after being annotated in a defect detection method of a photovoltaic component according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 5 A schematic diagram of a network structure of a defect detection model in a defect detection method for a photovoltaic module according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 6A schematic diagram of the basic structure of a sample space equalization sampling model used in a photovoltaic module defect detection method according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 7 A schematic diagram of the basic structure of a significant feature adaptive coding and decoding description model used in a photovoltaic module defect detection method according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 8 The basic structure of a surface quality rapid detection model based on cooperative migration adopted by a defect detection method of a photovoltaic module according to an exemplary embodiment of the present disclosure is shown;
[0021] Fig. 9 A schematic block diagram of a photovoltaic module defect detection device according to an exemplary embodiment of the present disclosure is shown;
[0022] Fig.10 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] Defect detection is a necessary step in the production and application of photovoltaic modules, and has a significant impact on the safe and reliable operation of solar energy systems, photovoltaic power generation efficiency, and the service life of photovoltaic modules. Related technologies mainly use visual inspection, infrared imaging inspection, ultrasonic inspection, electrical performance inspection, and X-ray inspection to detect defects in photovoltaic modules. The following describes the implementation principles and existing problems of the above methods:
[0029] (1) Visual inspection: Observe the defects of the photovoltaic modules with the naked eye or a magnifying glass to check whether there are bubbles, cracks, film peeling and other problems. This method cannot detect subtle defects of the photovoltaic modules and has low detection accuracy.
[0030] (2) Infrared imaging detection: Scan the photovoltaic module with an infrared thermal imager and determine whether there are defects based on the difference in thermal radiation. For example, if there are bubbles or cracks on the surface of the photovoltaic module, it will lead to poor heat conduction, thus forming abnormal temperature areas, which can be clearly observed through infrared imaging. This method is costly and requires high skills of the operator;
[0031] (3) Ultrasonic testing: Use high-frequency ultrasonic waves to scan photovoltaic modules and determine whether there are internal defects based on the reflection, refraction and propagation laws of ultrasonic waves. For example, if there are bubbles or loose structures inside the photovoltaic module, the ultrasonic propagation path will change or the energy will attenuate. The location and size of the defect can be determined by analyzing the reflected and refracted waves. This method requires professional equipment and operators and has low universality.
[0032] (4) Electrical performance testing: A method of determining the performance and defects of photovoltaic modules by measuring their electrical parameters such as current and voltage. For example, if there are bubbles or cracks on the surface of a photovoltaic module, it will lead to uneven distribution of the electric field, affecting the stability of current and voltage. These problems can be discovered through electrical performance testing. This method has certain requirements for the test environment and operator skills;
[0033] (5) X-ray inspection: X-rays are used to penetrate and image photovoltaic modules, and the presence of defects is determined based on the degree of absorption and scattering of X-rays by different materials. For example, if there are bubbles or impurities inside the photovoltaic module, the absorption and scattering of X-rays will be enhanced. The location and shape of the defect can be determined by analyzing the image. This method is costly and requires professional equipment and operators.
[0034] In order to solve the problems existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a photovoltaic module defect detection method, device, electronic device and computer-readable storage medium. The following describes the scheme of the present disclosure with reference to the accompanying drawings for illustration.
[0035] The present disclosure first provides a method for detecting defects in a photovoltaic module. Figure 1 As shown, the defect detection method of the photovoltaic module specifically includes the following steps:
[0036] S110: Acquire a first component image of a photovoltaic component to be inspected;
[0037] S120: Inputting the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes defect types and probability scores of each defect type;
[0038] S130: Determine a defect detection result of the photovoltaic module to be detected based on the defect information.
[0039] In the defect detection method of photovoltaic modules provided in the embodiment of the present disclosure, by inputting the image of the photovoltaic module into a predetermined defect detection model, defect detection of the photovoltaic module can be achieved based on the defect information output by the defect detection model, thereby reducing the requirements for the detection environment and the operating skills of the detection personnel, expanding the universality of defect detection, saving detection costs, and improving detection efficiency.
[0040] Next, in another embodiment, the above steps are described in more detail.
[0041] In step S110 , a first component image of a photovoltaic component to be inspected is acquired.
[0042] In the embodiments of the present application, the photovoltaic module is a device that converts solar energy into electrical energy, and is the core part of the solar power generation system, and its main function is to convert solar energy into electrical energy. The photovoltaic module to be detected refers to the photovoltaic module that will be defect-detected by the defect detection method provided in the embodiments of the present application.
[0043] In the embodiment of the present application, the first component image (EL image) is the image data of the photovoltaic component to be inspected. For example, the first component image can be input by a user, or can be automatically received as real-time image data transmitted by a third-party system. The third-party system can be a manufacturing execution system (MES) system for the workshop execution layer of a manufacturing enterprise.
[0044] In the embodiment of the present application, the first component image can be acquired by an electronic device having an image acquisition function. For example, the first component image can be acquired by an industrial camera, an optical lens or other device.
[0045] In step S120, the first component image is input into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores of the first component image belonging to different defect types.
[0046] In the embodiment of the present application, the above-mentioned defect detection model is a neural network model for performing defect detection on the photovoltaic component to be inspected corresponding to the first component image by analyzing and processing the first component image.
[0047] In the embodiments of the present application, for example, the photovoltaic components to be inspected may not have defects after being inspected by the defect detection model, or may have any one or more of the defects such as cold soldering, hidden cracks, short circuits, broken pieces, detached solder strips, bright spots, sudden changes in light and dark, foreign matter, black masses, broken grid blocks, black lines, black corners, black edges, scratches, broken grids, suction cup marks, bright pieces, dark pieces, and mixed files, and the embodiments of the present application do not make any special limitations on this.
[0048] In the embodiment of the present application, the above defect information is the output data of the above model to be detected. Exemplarily, the defect information may include the defect type of the photovoltaic component to be detected and the probability score of each defect type. For example, the above first component image is input into the above defect detection model, and the defect detection model outputs the distribution probability of the defect type of the photovoltaic component to be detected, and the distribution probability is used to characterize the probability of the corresponding defect type existing in the photovoltaic component to be detected. The probability distribution input by the defect detection model is: [no defect, short circuit, scratch, solder strip detachment, bright spot, light and dark mutation] = [0.1, 0.05, 0.4, 0.15, 0.2, 0.1], then the meaning of the probability distribution is that the probability of the photovoltaic component to be detected being a qualified component is 10%, the probability of a short circuit defect is 5%, the probability of a scratch defect is 40%, the probability of a solder strip detachment defect is 15%, the probability of a bright spot defect is 20%, and the probability of a light and dark mutation defect is 10%.
[0049] In the embodiment of the present application, illustratively, the trap detection model can be trained by the following method: Figure 2 As shown, the training method may specifically include the following steps:
[0050] S210: constructing a training data set, where the training data set includes a plurality of second component images and training labels of each second component image;
[0051] S220: Determine anchor frame parameters of a target anchor frame of the second component image;
[0052] S230: Input the second component image, the training label corresponding to the second component image, and the anchor frame parameters of the target anchor frame into a neural network for training to obtain a defect detection model.
[0053] In one embodiment, the above steps S210 to S240 are described in detail below:
[0054] In step S210, a training data set is constructed, where the training data set includes a plurality of second component images and a training label for each second component image.
[0055] In the embodiment of the present application, the second component image is a defective component image. Exemplarily, the second component image can be a real image obtained by capturing an image of a defective photovoltaic component through an electronic device with an image acquisition function, or can be a generated image trained with defect features as prior information.
[0056] In the embodiment of the present application, in the process of constructing the training data set, the second component image can be further divided into multiple data subsets based on the impact of defects on component efficiency, life and appearance. Exemplarily, the defects of the photovoltaic component can be divided into the following four data subsets: (1) a first data subset that seriously affects the efficiency and life of the component. Exemplarily, the first data subset can include defects such as cold solder joints, hidden cracks, short circuits, broken pieces, strip detachment, bright spots, sudden changes in light and dark, and foreign matter; (2) a second data subset that affects the efficiency of the component to a certain extent. Exemplarily, the second data subset can include defects such as black clumps, broken grid blocks, black lines, black corners, and black edges; (3) a third data subset that has almost no impact on the efficiency but affects the appearance. The third data subset can include defects such as scratches, broken grids, and suction cup marks; (4) a fourth data subset where the battery efficiency does not match. The fourth data subset can include data subsets such as bright pieces, dark pieces, and mixed files. Among them, the degree of impact on component efficiency: the first data subset> the second data subset> the third data subset. The embodiments of the present application can form a complete hybrid photovoltaic module defect data set by establishing the above-mentioned different data subsets, thereby providing data support for the training and testing of the defect detection model.
[0057] In the embodiment of the present application, after acquiring the second component image, optionally, the acquired image can also be processed to improve the image quality and expand the scale of the training data set. Figure 3 As shown, performing image processing on the second component image may include the following steps:
[0058] In step S310, a data cleaning operation is performed on the second component image.
[0059] In the embodiment of the present application, the above data cleaning operation can be implemented as follows: invalid data is eliminated; positioning, scale normalization and image standardization of the target area in the second component image are realized based on operations such as movement, cropping and scaling. The above target area is an area with defects. Specifically, the target area in the second component image can be positioned to the center by moving and scaling operations, and the scale of the image can be normalized by cropping operations.
[0060] In an embodiment of the present application, after data cleaning of the second component image, the defects of the second component image can be annotated. Exemplarily, a bounding box can be drawn in the above-mentioned target area, and the defect information can be annotated to obtain a training label. The above-mentioned defect information may include whether there is a defect and the type of defect. Specifically, the image labeling (Image Labeler) annotation tool can be used to draw a 2D bounding box in the corresponding defect area, and at the same time add labels for the presence or absence of defects and the type of defects to obtain a dataset in the format of target detection, segmentation and image understanding tasks (Common Objects in Context, COCO). Figure 4 Shown is a schematic diagram of a labeled second component image.
[0061] In step S320, a data enhancement operation is performed on the second component image.
[0062] In the embodiment of the present application, the above data enhancement operation can be implemented as follows: horizontally flip, translate, randomly flip, scale, stretch, enhance or reduce the brightness, add Gaussian noise, etc., to the above labeled second component image, so as to achieve the construction of a large-scale training data set. For example, for a scratch defect area with an angle of 45 degrees to the upper left, flip, translate and / or stretch it, which can enrich the diversity of defect manifestations in the training data set and improve the accuracy and generalization ability of the defect detection model obtained by subsequent training.
[0063] In step S330, the processed second component images are divided into a training subset, a validation subset and a test subset.
[0064] In an embodiment of the present application, exemplarily, the specific implementation of dividing the processed second component image into a training subset, a validation subset and a test subset can be implemented as follows: the labeled second component image and its corresponding training labels are divided into a training subset, a validation subset and a test subset in a ratio of 3:1:1 using the holdout method.
[0065] The above training subset is used to build and train the model. During the training process of the defect detection model, the defect detection model learns how to extract features and make predictions from the data by running the algorithm on the training subset. The training subset is the basis for building the defect detection model. The performance of the defect detection model on the training subset is optimized by continuously adjusting the parameters of the model.
[0066] The validation subset is used for model selection and parameter adjustment. During model training, the validation subset helps select the best model parameters and structure. By evaluating the performance of different models on the validation subset, the model with the best performance on the validation subset can be selected. The main function of the validation subset is to assist in model construction and ensure that the model performs well on unseen data.
[0067] The above test subset is used to evaluate the performance of the model. The test subset contains unseen data and is used to evaluate the generalization ability of the final selected model. The test subset does not participate in the training and parameter adjustment process of the model. Its purpose is to objectively evaluate the performance of the model in practical applications. The performance evaluation results of the test subset reflect the performance of the model on new data.
[0068] In step S220, anchor box parameters of the target anchor box of the second component image are determined.
[0069] In the embodiment of the present application, illustratively, the network structure of the above-mentioned defect detection model can be obtained by improving the network structure of the Yolov5s target detection network. Figure 5 As shown, 510 and 520 are the improved parts relative to the Yolov5s target detection network. Figure 5 The modules in the following sections are described in detail:
[0070] The above-mentioned defect detection model includes a backbone network, a neck network and a prediction network. Among them, the backbone network is used to perform feature extraction operations on the above-mentioned second component image; the above-mentioned neck network is located between the backbone network and the prediction network, and is used to perform feature fusion and upsampling operations on the features extracted by the backbone network after the backbone network extracts features from the second component image, so as to provide more advanced semantic information and the ability to adapt to images of different scales; the above-mentioned prediction network is used to output the defect information of the photovoltaic component to be detected corresponding to the second component image based on the feature information output by the neck network.
[0071] Furthermore, the network layers in the Backbone network, Neck network and Prediction network are described in detail:
[0072] The Backbone network includes Focus layer, Conv layer, C3 layer and SPP layer. Among them, the Focus layer improves the computational efficiency of the trained defect detection model by rearranging the spatial information of the input second component image to the channel dimension, wherein the above spatial information includes the width information and height information of the second component image; the Conv layer is a convolution layer, which extracts the feature information of the second component image through convolution operation; the C3 layer further enhances the feature extraction and feature fusion capabilities of the trained defect detection model by combining the ideas of residual connection and feature pyramid; the SPP layer generates a fixed-length feature representation by performing pooling operations on feature maps at different scales, so that the trained defect detection model can better adapt to input images of different sizes and extract richer feature information.
[0073] like Figure 5 As shown, the defect detection method for photovoltaic modules provided in the embodiment of the present application introduces a coordinate attention mechanism (CA) as shown in 510 after the feature extraction module of the Backbone network. The core idea of CA is to embed position information in the channel attention to enhance the model's attention to important feature areas (that is, the target area with defects mentioned above). Specifically, the CA module can be composed of two parts: coordinate information embedding and coordinate attention generation. Its working principle is as follows: in the coordinate information embedding stage, features are aggregated in the horizontal and vertical directions through 1D pooling operations to generate two direction-aware feature maps containing position information; in the coordinate attention generation stage, the direction-aware feature maps in the above two directions are combined to generate attention weights in two directions, which act on the horizontal and vertical directions of the input feature map respectively, and finally obtain enhanced output features.
[0074] The Neck network includes Conv layer, C3 layer, Upsample layer and Concat layer. The corresponding positions of Conv layer and C3 layer in Backbone network have been explained, so they will not be repeated here. Upsample layer is an upsampling layer, which is used to enlarge the feature map to help the defect detection model better capture the location and shape of the target. Concat layer is a connection layer, which is used to splice two or more feature maps in a certain dimension so that the defect detection model can better capture the relationship between different features.
[0075] The Prediction network includes a Detect layer. The Detect layer is used for target detection, that is, to predict whether the second component image contains a target area with defects, and defect information such as the defect type of the defects, based on the extracted feature information.
[0076] like Figure 5 As shown, the photovoltaic component defect detection method provided in the embodiment of the present application adds a Conv layer, a C3 layer, an Upsample layer, a Concat layer and a Detect layer as shown in 520 on the basis of the existing Neck network and the Prediction network. By introducing an additional Conv layer, a C3 layer, an Upsample layer, a Concat layer and a Detect layer, the quality of the feature information extracted from the second component image can be improved, thereby improving the accuracy of the defect detection model obtained by training.
[0077] In the embodiments of the present application, based on Figure 5 The improved network structure shown is used to train the defect detection network. Since the calculation and setting of the anchor frame have an important impact on the various modules of the above network structure and the effect of its defect detection, the embodiment of the present application can also select and determine the anchor frame corresponding to the second component image to obtain the target anchor frame with the optimal parameter setting, so as to realize the automatic calculation and optimal setting of the anchor frame for the training data set of multi-type defect images of photovoltaic components.
[0078] Exemplarily, in view of the multi-type defect characteristics of photovoltaic components, the anchor frame parameters for determining the target anchor frame of the second component image can be implemented based on the K-means method, and the specific implementation is as follows:
[0079] S1: Extract the coordinate values of all initial anchor boxes;
[0080] S2: Convert the coordinate values of the anchor box into width and height;
[0081] S3: Use K-means clustering algorithm to randomly generate k boxes;
[0082] S4: Calculate the similarity between each generated frame and the initial anchor frame. For example, the similarity can be determined by calculating the intersection and union ratio of the generated frame and the initial frame.
[0083] S5: Initially divide all into k categories;
[0084] S6: Use the classified mean to update the above k generated boxes;
[0085] S7: Repeat the above steps S4 to S6 until the change value of the updated generated frame compared to the previous generated frame is lower than a preset threshold, and then stop the algorithm.
[0086] In step S230, the second component image, the training label corresponding to the second component image, and the anchor frame parameters of the target anchor frame are input into a neural network for training to obtain a defect detection model.
[0087] In the embodiment of the present application, after the training data set is constructed through the above steps S210 to S230 and the anchor frame parameters of the target anchor frame are determined, the second component image, the training label corresponding to the second component image and the anchor frame parameters of the target anchor frame are input into Figure 5 The neural network shown in the figure is trained to obtain the above defect detection model. Exemplarily, the model training process can be implemented as follows: the second component image, training label and anchor frame parameters are input into Figure 5 The neural network shown in FIG. 1 obtains the defect information output by the neural network; and adjusts the network parameters of the neural network with the goal of minimizing the difference between the defect information output by the neural network and the training label input to the neural network.
[0088] Specifically, the Yolov5s model environment can be configured on the deep learning GPU service platform, and the training subset of photovoltaic module defects and the optimal anchor frame parameters obtained above can be used as Figure 5 The input of the neural network shown in the figure; under the deep learning framework of Pytorch1.5, the batch size, learning rate, number of iterations and other training parameters are set based on the actual training scenario, and the Adam algorithm is used to train and optimize the neural network. The training status of the neural network is monitored through visualization tools, and the network parameters are adjusted in time according to the monitoring values to obtain the defect detection model with the best detection effect.
[0089] In the embodiment of the present application, based on the training subset Figure 5After the defect detection model is obtained by training the neural network shown in the figure, the defect detection model obtained by training can also be evaluated based on the above verification subset and test subset. Exemplarily, it can be implemented as follows: the defect image data of photovoltaic modules in the verification subset and the test subset (i.e., the second module image in the above verification subset and the test subset) are used as input, and the recall rate, accuracy rate, precision rate and other indicators are used to evaluate the model performance.
[0090] In step S130 , a defect detection result of the photovoltaic assembly to be detected is determined based on the defect information.
[0091] In the embodiment of the present application, after the defect information of the first component image is obtained through step S110 and step S120, the defect detection result of the photovoltaic component to be detected corresponding to the first component image can be further determined based on the defect information. Exemplarily, the process can be implemented as follows: obtaining defect detection rules; when the defect area in the component image meets the defect detection rules, determining the defect type with the highest probability score as the defect type of the photovoltaic component to be detected.
[0092] In the embodiment of the present application, the above-mentioned defect detection rules can be set according to the actual application scenario. Exemplarily, the defect detection rule can be that the area of the target area (the area with defects) reaches a preset threshold, then the above-mentioned determination of the defect detection result of the photovoltaic component to be detected can be implemented as follows: determine the defect type contained in the first component image based on the probability score of each defect type in the defect information. Specifically, the basis for determination can be: the probability score of a certain defect type is the highest, and the possibility that the first component image contains the defect type is greater. For example, if it is determined that the scratch has the highest score in the probability distribution output by the defect detection model, it is determined that the first component image contains a scratch defect; determine whether the area occupied by the scratch obtained by the defect detection model has reached a preset threshold. If it is reached, it is determined that the photovoltaic component to be detected corresponding to the first component image has a division defect. It should be noted that the above-mentioned scenario is only an exemplary description, and the protection scope of the embodiment of the present application is not limited to this. For example, the above-mentioned defect detection rules can also be other rules based on actual needs.
[0093] In an embodiment of the present application, a visualization display software may also be provided to visualize the defect detection process. For example, after the defect detection result of the photovoltaic component to be detected is determined based on the defect information, the defect information of the photovoltaic component to be detected may be visualized in the display interface of the visualization display software. In addition, the above-mentioned visualization display software may also provide the algorithm functions required in the defect detection process, such as image acquisition splicing fusion algorithm, image denoising filtering preprocessing algorithm, deep learning detection network model, real-time visualization of the detection process, display and storage of detection results, detection and marking collaborative control algorithm, etc.
[0094] In an embodiment of the present application, after obtaining the defect detection result of the photovoltaic component to be detected, the photovoltaic component to be detected can also be processed accordingly based on the defect detection result. Exemplarily, the photovoltaic component to be detected can be processed accordingly in combination with the data subset results obtained by dividing the above based on the impact of defects on component efficiency, life and appearance. For example, if the defect type determined by the defect detection result belongs to the first data subset that seriously affects the efficiency and life of the component, the photovoltaic component to be detected is scrapped. It should be noted that the above scenario is only an exemplary description, and the protection scope of the embodiment of the present application is not limited to this.
[0095] In another embodiment of the present application, in order to improve the accuracy and generalization ability of the above-mentioned defect detection model, the defect detection method of the photovoltaic module provided in the embodiment of the present application can also optimize the training data set for training the defect detection model based on the component data of normal photovoltaic modules without defects, which is described in detail below in combination with Examples 1 to 3:
[0096] Example 1:
[0097] In the existing production process of photovoltaic modules, samples with quality defects in photovoltaic modules are a minority, and the proportion is too large compared with the majority of normal samples with quality defects. Therefore, constructing a training data set by collecting defective samples will lead to problems such as imbalance in the sample space and poor data completeness, which will affect the detection capability of the trained defect detection model.
[0098] The embodiment of the present application can obtain sufficient data that conforms to the imaging characteristics of the real photovoltaic module surface by generating defect data based on normal samples and defect samples, and balance the data sample space. The implementation principle is as follows: Combined with the photovoltaic module defect generation mechanism, the contrast quantity strategy is used to guide the sampling generation model to learn the prior information of the real surface defect data, and dynamically adjust the network parameters based on the learned prior information to fuse the normal sample data to generate multiple types of defect data that conform to the characteristics of the real defects, thereby obtaining a more complete training data set. Among them, the sampling generation model is used to generate multiple types of defect data that conform to the characteristics of the real defects.
[0099] Exemplarily, the above process of generating multi-type defect data that conforms to the characteristics of real defects can be implemented as follows: obtaining multiple third component images, the third component image is a component image of a normal photovoltaic component (that is, the above normal sample without defects), and the normal photovoltaic component is a photovoltaic component without defects; obtaining multiple fourth component images, the fourth component image is a component image of a defective optical end component (that is, the above defective sample with defects), and the defective photovoltaic component is a photovoltaic component with defects; extracting defect feature information in the fourth component image; constructing the above sampling generation model based on the third component image and the defect feature information, the sampling generation model is used to generate a second component image, and the second component image here is the above multi-type defect data that conforms to the characteristics of real defects.
[0100] Next, combine Figure 6 The above process of generating multiple types of defect data that conform to the characteristics of real defects is described in detail, and specifically, it can include the following steps. Figure 6 This is a schematic diagram of the basic structure of the sample space equalization sampling model used in the embodiment of the present application:
[0101] S1: Figure 6 As shown, the defect sample (that is, the fourth component image) is input into the feature extraction network, the defect representation characteristics of the defect sample (that is, the defect feature information) are mined through the feature extraction network, and a contrast quantity strategy for intra-class and inter-class differences of defects is constructed, and the difference analysis between defect representations is used as a potential metric to guide the extraction of standard priors describing defect information; illustratively, the contrast quantity strategy can be to make the discreteness between defects of the same class smaller and the discreteness between defects of different classes larger, so as to achieve better feature clustering effect of different classes;
[0102] S2: construct a dynamic convolutional network (i.e., the sampling generation model) based on a large amount of normal photovoltaic module visual data (i.e., the third module image mentioned above), map the extracted defect representations to weight parameters in the dynamic convolutional network, and dynamically adjust the network parameters using the defect representations as prior information;
[0103] S3: Based on sample data amplification processing methods such as rotation, mirroring, and translation, multi-type sample data amplification of photovoltaic module surface defect data is achieved to enrich the number and types of samples;
[0104] S4: Measure the authenticity of the generated defect data, evaluate the quality of the generated defect data from multiple dimensions such as spatial domain and frequency domain, and determine Figure 6 The overall parameter structure of the optimized sample space equalization sampling model is shown.
[0105] Example 2:
[0106] Since the defect types of photovoltaic modules are diverse and their characteristics are not obvious, it is difficult for defect detection models to effectively label all defect forms and extract and learn defect features. Therefore, it is crucial to deeply explore the differences between defective samples and normal samples and highlight the hidden features that characterize the differences in order to improve the defect information detection effect of defect detection models.
[0107] The embodiment of the present application utilizes the function of the adaptive encoder to dig out the hidden characteristics of defective data, amplifies the representation error between defective samples and normal samples in the reconstruction space, and deeply digs out and highlights the distinguishing representation of defective samples. Exemplarily, the process can be implemented as follows: based on the target encoding and decoding network, the third component image and the fourth component image are encoded to obtain the first significant feature information of the third component image and the second significant feature information of the fourth component image; based on the decoding network, the first significant feature information and the second significant feature information are decoded to reconstruct the third component image and the fourth component image, and the network parameters of the target encoding and decoding network are dynamically adjusted based on the target loss function; wherein the target loss function includes the reconstruction loss of the third component image and the reconstruction loss of the fourth component image, and the reconstruction loss weight of the fourth component image is greater than the reconstruction loss of the third component image. Preferably, the embodiment of the present application can also separate the feature space of the third component image and the fourth component image based on the first significant feature information and the second significant feature information.
[0108] Next, combine Figure 7 The above process of amplifying the representation error between defective samples and normal samples in the reconstructed space and deeply mining and highlighting the distinguishing representation of defective samples is described in detail, specifically, including the following steps. Figure 7 A schematic diagram of the basic structure of the salient feature adaptive coding and decoding description model used in the embodiment of the present application:
[0109] S1: Figure 7 As shown, the defect sample data (i.e., the fourth component image) and the normal sample data (i.e., the third component image) are input into the feature encoding network (i.e., Figure 7 ), perform hidden feature mining and extraction on the defective sample data and the normal sample data through a feature encoding network, and obtain significant feature information of the defective sample data (i.e., the second significant feature information) and significant feature information of the normal sample data (i.e., the first significant feature information);
[0110] S2: Input the salient feature information output by the encoder Figure 7 The Z (feature space separation) module in the feature space separation module separates the defective samples and normal samples as much as possible in the feature space;
[0111] S3: Pass Figure 7The decoder in the decoder decodes the significant feature information of the defective sample data, that is, the normal sample data, with the optimization goal of minimizing the reconstruction error between the reconstructed data obtained by feature decoding and the input data, and adjusts Figure 7 The network parameters of the adaptive codec description model shown are such that after feature encoding and feature decoding, the reconstruction capability of defective samples is stronger while the reconstruction capability of normal samples is weaker, thereby mining more effective information at the deep feature level to distinguish the differences between defective and normal samples.
[0112] In the embodiment of the present application, in the process of training the adaptive codec description model, Figure 7 The memory pool in is used to store the feature representation of normal samples. When reconstructing defective samples, the adaptive coding and decoding description model compares the features of the current defective sample with the features of the normal samples in the memory pool to amplify the difference between the two. For example, the effect of amplifying the difference between the features of the current defective sample and the normal samples in the memory pool can be achieved by calculating the orthogonal product of the output features of the upper and lower encoders and introducing the orthogonal product in the loss function so that the orthogonal product approaches 0.
[0113] In the embodiment of the present application, the above-mentioned reconstruction ability of defective samples is stronger and the reconstruction ability of normal samples is weaker can be specifically achieved by adjusting the network parameters by designing an asymmetric loss function. Specifically, the asymmetric loss function can be: L_loss = 0.1*L_normal + L_defect, where L_normal is the reconstruction loss of normal samples and L_defect is the reconstruction loss of defective samples. Since the asymmetric loss function imposes a greater penalty on the reconstruction error of defective samples, the model will be more inclined to reduce the reconstruction error of defective samples during the training process, so that the model can better reconstruct defective samples. It should be noted that the above-mentioned scenario is only an exemplary description, and the protection scope of the embodiment of the present application is not limited thereto. For example, the above-mentioned loss function can also be other functions that can achieve the same function.
[0114] S4: Construct a reconstructability evaluation criterion to evaluate the quality of data reconstruction from the perspective of the completeness of spatial domain reconstruction and the accuracy of frequency domain reconstruction. Based on the criteria of differences in reconstruction capabilities of different types of sample data, optimize the coding model parameters and structure, and adaptively adjust the coding strategy to achieve the purpose of extracting significant features of differences.
[0115] In the embodiments of the present application, Example 2 guides the model to learn significant features that can distinguish defects from normal samples through the design of strategies and loss functions in the training process, so that the model can detect defects more accurately in practical applications.
[0116] Example 3:
[0117] Training the defect detection model based on the more balanced and complete defect data generated above can, to a certain extent, improve the adaptability of the defect detection model when processing real photovoltaic module image data, and alleviate the problems of insufficient learning and overfitting caused by training the network with unbalanced sample data. However, the domain mismatch between the generated data and the real data will still limit the generalization ability of the network in the actual detection environment.
[0118] In order to solve the above problems, an embodiment of the present application establishes a multi-domain data collaborative migration optimization method. Exemplarily, the multi-domain data collaborative migration optimization method can be implemented as follows: determine a feature set of the second component image and a feature set of the fourth component image, wherein the feature set of the second component image is a set composed of image features of the second component image, and the feature set of the fourth component image is a set composed of image features of the fourth component image; optimize the feature set of the second component image and the feature set of the fourth component image based on the target discriminator to obtain an optimized feature set; input the optimized feature set into the sampling generation model to optimize the generated second component image.
[0119] Next, combine Figure 8 The above multi-domain data collaborative migration optimization method is described in detail. Specifically, the multi-domain data collaborative migration optimization method may include the following steps, wherein: Figure 8 Model infrastructure for rapid detection of surface quality based on co-migration:
[0120] S1: input the generated photovoltaic module data (i.e., the generated defect data) and the collected small sample real defect data (i.e., the fourth module image) into the feature encoding module, find the significant features based on the feature encoding model, and obtain the generated feature domain corresponding to the generated photovoltaic module data (i.e., the feature set of the second module image) and the real feature domain of the small sample real defect data (i.e., the feature set of the fourth module image);
[0121] S2: Map the significant features in the above generated feature domain and the real feature domain to the defect location coordinates through the detection network. Figure 8 The target discriminator in the method is used to perform joint optimization based on the significant features in the generated feature domain and the real feature domain, so that the feature information with consistent statistical distribution characteristics can be learned from the data in different domains, so that the features extracted from the data in different domains can be mapped to the defect location coordinates through the detection network. The optimization goal of the joint optimization of the target discriminator is to be unable to distinguish the feature information in the generated feature domain and the real feature domain.
[0122] S3: Combine the generated domain data with the real domain data collected online, and synergistically promote the optimization of network parameters of the above sampling generation model through the common constraints of the statistical distribution of the network intermediate layer and output layer and the guided training of the reliable labeling of the generated data.
[0123] In the embodiment of the present application, based on the multi-domain data collaborative migration optimization method of Example 3, on the one hand, a large amount of label information of the generated data is relied on to ensure the adequacy of network learning, and on the other hand, the real collected data is used to fine-tune the network parameters in real time, thereby improving the generalization ability of the model in practical applications. In addition, further, the embodiment of the present application can also be combined with strategies such as network pruning learning to further realize the real-time and accurate detection of the production quality of photovoltaic modules by the defect detection model.
[0124] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0125] The embodiment of the present invention can divide the defect detection device of the photovoltaic module into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0126] Accordingly, the embodiment of the present disclosure also provides a defect detection device for a photovoltaic module. Fig. 9 As shown, the photovoltaic module defect detection device 900 may include an acquisition module 910, a processing module 920 and a detection module 930, wherein:
[0127] An acquisition module 910 may be used to acquire a first component image of a photovoltaic component to be inspected;
[0128] The processing module 920 may be used to input the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores of the first component image belonging to different defect types;
[0129] The detection module 930 may be used to determine a defect detection result of the photovoltaic component to be detected based on the defect information.
[0130] In an embodiment of the present application, the defect detection device of the above-mentioned photovoltaic component also includes a model training module, which is specifically used to: construct a training data set, the training data set includes multiple second component images and training labels of the second component images; determine the anchor frame parameters of the target anchor frame of the second component image; input the second component image, the training label corresponding to the second component image and the anchor frame parameters of the target anchor frame into the neural network for training to obtain a defect detection model.
[0131] In an embodiment of the present application, the above-mentioned model training module is also used to: obtain multiple third component images, the third component image is a component image of a normal photovoltaic component, and a normal photovoltaic component is a photovoltaic component without defects; obtain multiple fourth component images, the fourth component image is a component image of a defective light-end component, and a defective photovoltaic component is a photovoltaic component with defects; extract defect feature information in the fourth component image; construct a sampling generation model based on the third component image and the defect feature information, and the sampling generation model is used to generate a second component image.
[0132] In an embodiment of the present application, the above-mentioned model training module is also used to: perform encoding operations on the third component image and the fourth component image based on the target codec network to obtain first significant feature information of the third component image and second significant feature information of the fourth component image; perform decoding operations on the first significant feature information and the second significant feature information based on the decoding network to reconstruct the third component image and the fourth component image, and dynamically adjust the network parameters of the target codec network based on the target loss function; wherein the target loss function includes the reconstruction loss of the third component image and the reconstruction loss of the fourth component image, and the reconstruction loss weight of the fourth component image is greater than the reconstruction loss of the third component image.
[0133] In an embodiment of the present application, after the above-mentioned target codec network is used to encode the third component image and the fourth component image to obtain the first significant feature information of the third component image and the second significant feature information of the fourth component image, the above-mentioned model training module is also used to: separate the feature space of the third component image and the fourth component image based on the first significant feature information and the second significant feature information.
[0134] In an embodiment of the present application, the above-mentioned model training module is also used to: determine a feature set of the second component image and a feature set of the fourth component image, wherein the feature set of the second component image is a set composed of image features of the second component image, and the feature set of the fourth component image is a set composed of image features of the fourth component image; optimize the feature set of the second component image and the feature set of the fourth component image based on the target discriminator to obtain an optimized feature set; input the optimized feature set into the sampling generation model to optimize the generated second component image.
[0135] In an embodiment of the present application, the above-mentioned detection module is specifically used to: obtain defect detection rules; when the defect area in the component image meets the defect detection rules, determine the defect type with the highest probability score as the defect type of the photovoltaic component to be detected.
[0136] In an embodiment of the present application, the above-mentioned detection module is also used to: visually display the defect information of the photovoltaic component to be detected.
[0137] In addition, the specific implementation details of the above-mentioned photovoltaic module defect detection device have been described in detail in the corresponding position of the photovoltaic module defect detection method, so they will not be repeated here.
[0138] Fig.10 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig.10 , which shows a structural schematic diagram of an electronic device 1000 suitable for implementing the embodiments of the present disclosure. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0139] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the defect detection method of the photovoltaic module of the embodiment described in the present disclosure. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0140] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0141] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the defect detection method of the photovoltaic module as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0142] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0143] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0144] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0145] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0146] Acquire a first component image of a photovoltaic component to be inspected;
[0147] Inputting the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores of the first component image belonging to different defect types;
[0148] Determine a defect detection result of the photovoltaic module to be detected based on the defect information.
[0149] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0150] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0152] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0153] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0154] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0155] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0156] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0157] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for detecting defects in a photovoltaic module, characterized in that: include: Acquire a first component image of a photovoltaic component to be inspected; Inputting the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores of the first component image belonging to different defect types; A defect detection result of the photovoltaic assembly to be detected is determined based on the defect information.
2. The photovoltaic module defect detection method according to claim 1, characterized in that: The training process of the defect detection model includes: Constructing a training data set, wherein the training data set includes a plurality of second component images and training labels of the second component images; Determining anchor frame parameters of a target anchor frame of the second component image; The second component image, the training label corresponding to the second component image, and the anchor frame parameters of the target anchor frame are input into a neural network for training to obtain the defect detection model.
3. The photovoltaic module defect detection method according to claim 2, characterized in that: The constructing of the training data set comprises: Acquire a plurality of third component images, wherein the third component images are component images of normal photovoltaic components, and the normal photovoltaic components are photovoltaic components without defects; Acquire a plurality of fourth component images, wherein the fourth component images are component images of defective optical end components, and the defective photovoltaic component is a photovoltaic component with defects; Extracting defect feature information from the fourth component image; A sampling generation model is constructed based on the third component image and the defect characteristic information, and the sampling generation model is used to generate the second component image.
4. The photovoltaic module defect detection method according to claim 3, characterized in that: The method further comprises: Performing encoding operations on the third component image and the fourth component image based on a target encoding and decoding network to obtain first significant feature information of the third component image and second significant feature information of the fourth component image; The first salient feature information and the second salient feature information are decoded based on a decoding network, the third component image and the fourth component image are reconstructed, and the network parameters of the target encoding and decoding network are dynamically adjusted based on a target loss function; wherein the target loss function includes a reconstruction loss of the third component image and a reconstruction loss of the fourth component image, and the reconstruction loss weight of the fourth component image is greater than the reconstruction loss of the third component image.
5. The photovoltaic module defect detection method according to claim 4, characterized in that: After encoding the third component image and the fourth component image based on the target encoding and decoding network to obtain first significant feature information of the third component image and second significant feature information of the fourth component image, the method further includes: The feature spaces of the third component image and the fourth component image are separated based on the first salient feature information and the second salient feature information.
6. The photovoltaic module defect detection method according to claim 3, characterized in that: The method further comprises: Determine a feature set of the second component image and a feature set of the fourth component image, wherein the feature set of the second component image is a set consisting of image features of the second component image, and the feature set of the fourth component image is a set consisting of image features of the fourth component image; Optimizing the feature set of the second component image and the feature set of the fourth component image based on the target discriminator to obtain an optimized feature set; The optimized feature set is input into the sampling generation model to optimize the generated second component image.
7. The photovoltaic module defect detection method according to claim 1, characterized in that: The step of determining the defect detection result of the photovoltaic assembly to be detected based on the defect information includes: Obtain defect detection rules; When the defect area in the component image satisfies the defect detection rule, the defect type with the highest probability score is determined as the defect type of the photovoltaic component to be detected.
8. The photovoltaic module defect detection method according to claim 1, characterized in that: The method further comprises: The defect information of the photovoltaic assembly to be inspected is displayed visually.
9. A defect detection device for a photovoltaic module, characterized in that: include: An acquisition module, used for acquiring a first component image of a photovoltaic component to be inspected; a processing module, configured to input the first component image into a pre-trained defect detection model to determine defect information of the first component image; wherein the defect information includes probability scores of the first component image belonging to different defect types; A detection module is used to determine a defect detection result of the photovoltaic component to be detected based on the defect information.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.