Solar cell defect online detection method based on domain incremental continual learning
By using the domain incremental continuous learning method, solar cell image data is divided into multiple subsets according to imaging conditions. The old samples are retained in the memory buffer and used for collaborative training with the new samples. This solves the problems of low accuracy and poor adaptability of traditional models under complex conditions, and achieves efficient defect detection.
Patent Information
- Application Number
- CN202511395855.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-28
AI Technical Summary
Traditional convolutional neural networks suffer from low accuracy and poor model adaptability when processing complex and varied images of solar cells, especially in defect detection under different lighting conditions and angles.
We employ a domain-incremental continuous learning approach, dividing the solar cell image dataset into multiple subsets based on imaging conditions. By using a memory buffer to retain old samples and co-train with new samples, we gradually learn and fuse feature knowledge under different imaging conditions, thus avoiding catastrophic forgetting.
It improved the accuracy of solar cell defect detection, enhanced the model's cross-domain adaptability to complex and variable image data, and achieved stable online detection.
Smart Images

Figure CN120876488B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to an online detection method, apparatus, computer device, computer-readable storage medium, and computer program product for solar cell defects based on domain incremental continuous learning. Background Technology
[0002] In the field of deep learning, solar cell defect detection technology is an important research direction in the photovoltaic industry. The core component of photovoltaic solar energy is the photovoltaic cell module. Besides inherent defects in the cell materials themselves, multiple processing steps during production can also damage the cells, leading to defects such as over-soldering, black spots, and microcracks. Combined with mechanical damage during installation and use, these issues all affect the module's conversion efficiency and lifespan. In practical applications, they can even pose a threat to the safety of the photovoltaic power generation system itself. Therefore, research on photovoltaic module defect detection is particularly important.
[0003] However, due to varying lighting conditions, angles, backgrounds, and other interference factors, solar cell image data is often complex and variable, posing a significant challenge to defect detection. Traditional convolutional neural networks (CNNs) have limitations in processing these complex images, resulting in low accuracy in solar cell defect detection. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for online detection of solar cell defects based on domain incremental continuous learning, which can improve the accuracy of solar cell defect detection, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides an online defect detection method for solar cells based on domain incremental continuous learning, including:
[0006] Acquire an image dataset of solar cells; the image dataset includes multiple sub-datasets, each of which includes photoluminescence image samples of the solar cells acquired under various imaging conditions, and each photoluminescence image sample is labeled with a corresponding defect type;
[0007] For the current subset of the multiple subsets, the defect detection model to be trained is trained using the current subset, and target photoluminescence image samples are selected from the current subset and stored in the memory buffer.
[0008] For the next subset relative to the current subset, a portion of the target photoluminescence image samples are obtained from the memory buffer. The defect detection model to be trained is trained based on the next subset and the portion of the target photoluminescence image samples. The next subset is used as the updated current subset. The process returns to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer until the iteration stopping condition is met, thus obtaining the pre-trained defect detection model.
[0009] The pre-trained defect detection model is used to output the defect detection results of the solar cell based on the photoluminescence image of the solar cell.
[0010] In one embodiment, selecting target photoluminescence image samples from the current subset and storing them in a memory buffer includes:
[0011] For each of the aforementioned defect types, obtain the photoluminescence image samples corresponding to each defect type in the current subset of data;
[0012] Based on the feature vectors of each photoluminescence image sample, the average value of each feature vector is calculated to obtain the class center corresponding to the defect type;
[0013] Based on the feature distance between the feature vectors of each photoluminescence image sample and the class center, representative photoluminescence image samples corresponding to the defect type are selected from the current subset of data.
[0014] Representative photoluminescence image samples corresponding to each of the aforementioned defect types are stored as target photoluminescence image samples in the memory buffer.
[0015] In one embodiment, selecting representative photoluminescence image samples corresponding to the defect type from the current subset of data based on the feature distances between the feature vectors of each photoluminescence image sample and the class center includes:
[0016] Based on the feature distance between the feature vectors of each photoluminescence image sample and the class center, select several photoluminescence image samples with the smallest feature distance corresponding to the defect type from the current subset of data.
[0017] The plurality of photoluminescence image samples are arranged in ascending order of feature distance to obtain representative photoluminescence image samples corresponding to the defect type.
[0018] In one embodiment, obtaining a portion of the target photoluminescence image sample from the memory buffer includes:
[0019] Randomly select a preset number of photoluminescence image samples from the memory buffer;
[0020] The photoluminescence image samples that meet the preset number are used as part of the target photoluminescence image samples.
[0021] In one embodiment, selecting target photoluminescence image samples from the current subset and storing them in a memory buffer includes:
[0022] The current subset of data is input into the generative model to obtain the target photoluminescence image sample; the generative model is used to simulate the image features of the photoluminescence image sample in the current subset of data to generate the target photoluminescence image sample stored in the memory buffer.
[0023] In one embodiment, prior to acquiring the image dataset of the solar cells, the method further includes:
[0024] Acquire multiple photoluminescence image samples of the solar cell;
[0025] The defect types of the multiple photoluminescence image samples are labeled to obtain the multiple photoluminescence image samples labeled with the corresponding defect types;
[0026] The plurality of photoluminescence image samples are divided into sub-datasets corresponding to each of the imaging conditions; each sub-dataset includes the photoluminescence image sample corresponding to each of the defect types.
[0027] Secondly, this application also provides an online defect detection device for solar cells based on domain incremental continuous learning, comprising:
[0028] An acquisition module is used to acquire an image dataset of a solar cell; the image dataset includes multiple sub-datasets, each of which includes photoluminescence image samples of the solar cell acquired under various imaging conditions, and each photoluminescence image sample is labeled with a corresponding defect type.
[0029] The determination module is used to train the defect detection model to be trained using the current subset of the multiple subsets, and to select target photoluminescence image samples from the current subset and store them in a memory buffer.
[0030] The generation module is used to obtain a portion of the target photoluminescence image samples from the memory buffer for the next subset relative to the current subset, train the defect detection model to be trained based on the next subset and the portion of the target photoluminescence image samples, use the next subset as the updated current subset, and return to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer until the iteration stopping condition is met, thereby obtaining a pre-trained defect detection model; wherein, the pre-trained defect detection model is used to output the defect detection result of the solar cell based on the photoluminescence image of the solar cell.
[0031] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0032] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0033] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0034] The aforementioned online defect detection method, apparatus, computer device, computer-readable storage medium, and computer program product for solar cells based on domain incremental continuous learning acquire an image dataset of solar cells. This image dataset includes multiple subsets, each containing photoluminescence image samples of the solar cells acquired under various imaging conditions. Each photoluminescence image sample is labeled with a corresponding defect type. For the current subset, a defect detection model is trained using this dataset. Target photoluminescence image samples are selected from the current subset and stored in a memory buffer. For the next subset relative to the current subset, a portion of the target photoluminescence image samples is retrieved from the memory buffer. The defect detection model is trained using the next subset and the portion of the target photoluminescence image samples. The next subset is used as the updated current subset. The process returns to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer, until the iteration stops. A pre-trained defect detection model is obtained. This pre-trained model is used to output defect detection results for the solar cells based on their photoluminescence images. Thus, by employing a domain incremental continuous learning mechanism, the complex and variable solar cell image data is divided into multiple subsets according to imaging conditions. This allows the defect detection model to gradually learn and integrate feature knowledge corresponding to different imaging conditions during iterative training. Simultaneously, by retaining old samples from the current subset and co-training with new samples from the next subset, catastrophic forgetting of the model when learning new domain features is effectively avoided. This ensures that the model's ability to identify defect features under various historical imaging conditions is continuously retained. Consequently, the cross-domain adaptability and generalization of the defect detection model to complex and variable image data are enhanced. This overcomes the accuracy bottleneck of traditional convolutional neural networks caused by differences in data distribution, achieving more accurate and stable online detection of solar cell defects. It solves the reliability problem of photovoltaic cell defect detection in complex application scenarios and improves the accuracy of solar cell defect detection. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is an application environment diagram of an online defect detection method for solar cells based on domain incremental continuous learning in one embodiment;
[0037] Figure 2 This is a flowchart illustrating an online defect detection method for solar cells based on domain incremental continuous learning in one embodiment.
[0038] Figure 3 This is a schematic diagram of a method for constructing a defect dataset for solar cells in a domain incremental scenario, as described in one embodiment.
[0039] Figure 4 This is a schematic diagram of a training paradigm for domain incremental learning in one embodiment;
[0040] Figure 5 This is a schematic diagram of a continuous learning method based on memory playback in one embodiment;
[0041] Figure 6 This is a structural block diagram of an online defect detection device for solar cells based on domain incremental continuous learning in one embodiment;
[0042] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] While traditional defect detection algorithms perform well in detecting single defects, their versatility is limited when faced with defects of various shapes and sizes on actual production lines, creating a bottleneck. With the rapid development of deep learning technology, automatic detection of multiple defects in photovoltaic modules has become possible; however, due to insufficient accumulation of original defect data, related research progress remains slow.
[0045] Therefore, the online defect detection method for solar cells based on domain incremental continuous learning provided in this application can solve the problem of complex and variable solar cell image data caused by interference factors such as different lighting conditions, angles, and backgrounds through continuous learning methods, and solve the problems of high modeling limitations and low defect detection accuracy of traditional convolutional neural networks.
[0046] The online defect detection method for solar cells based on domain incremental continuous learning provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0047] Terminal 102 acquires an image dataset of solar cells. The image dataset includes multiple subsets, each containing photoluminescence image samples of the solar cells acquired under various imaging conditions. Each photoluminescence image sample is labeled with a corresponding defect type. For the current subset, terminal 102 trains a defect detection model using the current subset, selecting target photoluminescence image samples from the current subset and storing them in a memory buffer. For the next subset relative to the current subset, terminal 102 acquires a portion of the target photoluminescence image samples from the memory buffer, trains the defect detection model using the next subset and the portion of the target photoluminescence image samples, uses the next subset as the updated current subset, and returns to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer. This process continues until the iteration stops, resulting in a pre-trained defect detection model. The pre-trained defect detection model is used to output defect detection results for the solar cells based on the photoluminescence images. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and IoT devices. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0048] In one exemplary embodiment, such as Figure 2 As shown, an online defect detection method for solar cells based on domain incremental continuous learning is presented, and this method is applied to... Figure 1 Taking terminal 102 as an example, the explanation includes:
[0049] Step S202: Obtain the image dataset of the solar cell.
[0050] The image dataset consists of multiple sub-datasets, each containing photoluminescence image samples of solar cells acquired under various imaging conditions, with each photoluminescence image sample labeled with a corresponding defect type.
[0051] In practice, photoluminescence (PL) detection is a non-destructive defect detection technology for solar cells. Using a laser of a specific wavelength as an excitation source, ground-state electrons in the silicon wafer can be excited into an excited state. When the electrons return to the ground state, they release fluorescence. The wavelength and intensity of the fluorescence are related to factors such as defects and impurities in the material. A highly sensitive and high-resolution camera is used for photosensitive imaging. By observing features such as dark spots, dark lines, or dark areas on the image, defects and performance problems in the solar cell can be determined.
[0052] Among them, photoluminescence image samples can be images of solar cells acquired after they have been excited by a specific light source during photoluminescence detection. These images can reflect deep defects such as microcracks and impurities inside the solar cell through differences in luminescence intensity and distribution. Different imaging conditions can include different light source intensities, different illumination areas, and different imaging angles in photoluminescence detection.
[0053] Different light source intensities, illumination areas, and imaging angles can all cause defects of the same category to exhibit different visual features on new and old data, thus affecting the model's recognition accuracy. Traditional deep learning techniques suffer from catastrophic forgetting problems when learning new tasks or data, meaning that after training with defect samples under strong lighting, the model will forget its ability to recognize defect samples under weak lighting, resulting in a significant drop in recognition accuracy. Therefore, for the complex and variable nature of solar cell image data caused by different lighting conditions, angles, and other interference factors in practical applications, the domain incremental continuous learning method can be used to address this issue.
[0054] Data under different imaging conditions can be considered as different domains because their data distribution and feature space change, conforming to the definition of domain difference in incremental domain learning. Therefore, each subset is a subset of the total image dataset divided according to differences in imaging conditions. Each subset represents a domain, and each domain corresponds to the feature distribution under specific imaging conditions. This allows the defect detection model to learn knowledge from different domains in stages, avoiding catastrophic forgetting due to large differences in data distribution. The model based on incremental domain learning maintains its memory of the old domain while simultaneously learning features of the new domain as it gradually adapts to the new domain, thus achieving cross-domain robustness.
[0055] For the convenience of those skilled in the art, Figure 3 This document provides an exemplary schematic diagram of a method for constructing a defect dataset for solar cells in a domain incremental scene. In practical applications, high-resolution photoluminescence (PL) images of solar cells under different imaging conditions can be collected by varying the illumination intensity and illumination area. Then, different types of defects within the solar cells are labeled using a development platform. These defects can include cracks, microcracks, pores, impurities, etc. The labeled defect types can serve as sample labels for training a defect detection model. Finally, based on different imaging conditions, the labeled defect data is divided into four subsets: data1, data2, data3, and data4. Each subset contains all defect types, and these four subsets constitute a complete defect dataset for solar cells in a domain incremental scene, thus realizing the construction of a defect dataset for solar cells in a domain incremental scene.
[0056] For example, data1 may include photoluminescence image samples captured under a first illumination (weak illumination) and a vertical shooting angle; data2 may include photoluminescence image samples captured under a first illumination (weak illumination) and a tilted shooting angle (e.g., the lens is tilted at 30 or 60 degrees to the surface of the battery cell); data3 may include photoluminescence image samples captured under a second illumination (strong illumination) and a vertical shooting angle; data4 may include photoluminescence image samples captured under a second illumination (strong illumination) and a tilted shooting angle, wherein the illumination intensity of the first illumination is less than the illumination intensity of the second illumination.
[0057] Step S204: For the current subset of multiple subsets, train the defect detection model to be trained using the current subset, and select target photoluminescence image samples from the current subset and store them in the memory buffer.
[0058] The current subset includes the subset currently being trained during the domain incremental learning iteration process, in which subsets collected under different imaging conditions are sequentially input.
[0059] The defect detection model to be trained is a deep learning model (such as a convolutional neural network-based model) that is still in the training process and has not yet completed all optimizations. Its goal is to accurately identify defects in solar cells by learning the mapping relationship between image features and defect types. At this stage, the model parameters still need to be adjusted through multiple rounds of iteration. For example, the defect detection model may include the YOLO (You Only Look Once) deep learning object detection model.
[0060] In practical applications, continuous learning is an effective method to address the catastrophic forgetting problem of models, and it can be divided into three types: task increment, class increment, and domain increment. Among them, the goal of domain increment continuous learning is to allow the model to gradually adapt to new data, with the new data sharing the same semantic category space as the old data. Domain increment learning can continuously expand the training data domain, enabling the model to cope with changes in the distribution of the same category, thus possessing strong generalization ability.
[0061] For the convenience of those skilled in the art, Figure 4 An exemplary diagram illustrating a training paradigm for domain incremental learning is provided. Figure 4 As shown, image data data 1 to data 4 collected under different imaging conditions are input sequentially for training. The model does not forget the previously learned knowledge and retains the recognition effect of data 1 to data 4. It does not produce catastrophic forgetting. For various defects, even if the imaging conditions change, the model can accurately identify and classify them.
[0062] The target photoluminescence images can be representative photoluminescence image samples selected from the current subset. When storing the target photoluminescence images in the memory buffer, these images can be considered old samples. Optionally, representative photoluminescence image samples corresponding to each defect type can be selected from the current subset as target photoluminescence images. Therefore, the target photoluminescence images selected from the current subset and stored in the memory buffer can also be considered old samples. Then, during training on the next subset, the photoluminescence image samples in the next subset can be considered new samples. Old samples are used for subsequent co-training with new samples from the new subset, helping the model retain learned knowledge.
[0063] In practical implementation, incremental domain learning can be achieved using a memory replay method based on a clustering strategy. After learning each subset of data, the memory replay algorithm stores a portion of the original photoluminescence image samples of the current subset in a memory buffer. These stored samples can refer to older samples. The memory buffer is updated after training each subset and revisited during training of a new subset. In subsequent learning processes, old samples are sampled and replayed, helping the model perceive the boundary between new and old knowledge.
[0064] The sample preservation strategy for old samples involves saving a fixed number of samples for each defect category in each subset as old samples. As the number of subsets increases, the required memory also increases. To balance data storage costs and mitigating the forgetting problem, an effective sample sampling method needs to be introduced to ensure that the small amount of data retained can represent the distribution of the original dataset as much as possible. Therefore, a clustering strategy is used to select representative photoluminescence image samples as target photoluminescence image samples, which are stored as old samples in a memory buffer. During playback, old samples are randomly selected from the memory buffer, ensuring a degree of randomness in sample selection during playback. This helps the model better learn the distinguishing features between categories and improves generalization ability. Specifically, the clustering strategy selects representative samples from the current subset as target photoluminescence image samples by calculating the class center (mean of features of samples in the same class) for each defect category, selecting the sample closest to the class center as the target photoluminescence image sample, and storing the target photoluminescence image sample in the memory buffer as old samples.
[0065] For the convenience of those skilled in the art, Figure 5 An exemplary diagram of a continuous learning method based on memory playback is provided. Figure 5As shown, the data replayed in each iteration is sampled from M. In sampled replay, M can refer to the memory buffer; in generative replay, it can refer to the generative model. In practical applications, during each iteration of the domain incremental continuous learning algorithm based on memory replay, the samples used to review old knowledge are not directly retrieved from the original dataset, but rather extracted from a specific data source M. When using the "sampled replay" method, M refers to the memory buffer (i.e., the representative sample set selected and stored from each subset after the model has learned it, used to retain old domain knowledge). In this case, the old samples replayed are randomly selected directly from the memory buffer. When using the "generative replay" method, M refers to the generative model (i.e., the model trained by the algorithm that can simulate the distribution of old domain data). In this case, the old samples replayed are not real historical data, but "virtual old samples" synthesized by the generative model.
[0066] Step S206: For the next subset relative to the current subset, obtain some target photoluminescence image samples from the memory buffer, train the defect detection model to be trained based on the next subset and the partial target photoluminescence image samples, use the next subset as the updated current subset, return to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer, until the iteration stopping condition is met, and obtain the pre-trained defect detection model.
[0067] The pre-trained defect detection model is used to output defect detection results for solar cells based on the photoluminescence images of the solar cells.
[0068] The next subset is the subset following the one currently being trained.
[0069] In this dataset, the photoluminescence image samples in the next subset can be considered as new samples, while the partial target photoluminescence image samples obtained from the memory buffer can be considered as old samples. The old samples (representative samples of the old domain) and the new samples (samples of the next subset) are fused together to train the defect detection model to be trained, thereby achieving joint learning of new and old knowledge. This allows the model to continuously learn new domain features based on new samples, while maintaining the recognition of old domain features based on old samples. This enables the model to adapt to the complex and variable problem of solar cell image data caused by interference factors such as different lighting conditions and angles during solar cell defect detection.
[0070] In the specific implementation, a portion of the target photoluminescence image samples can be randomly selected from the memory buffer as old samples, and the photoluminescence image samples in the next subset can be used as new samples. The defect detection model to be trained is trained based on the selected portion of the target photoluminescence image samples and the next subset. Then, the next subset is used as the updated current subset, and the process returns to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer, until the iteration stopping condition is met. For example, if multiple subsets include A, B, and C, assuming the current subset is A, the defect detection model to be trained is trained using the current subset A. Target photoluminescence image samples are selected from the current subset A and stored in a memory buffer. For the next subset B relative to the current subset A, some target photoluminescence image samples are obtained from the memory buffer. The defect detection model to be trained is trained based on the next subset B and some target photoluminescence image samples. The next subset B is used as the updated current subset. Target photoluminescence image samples are selected from the current subset B and stored in a memory buffer. Then, for the next subset C relative to the current subset B, some target photoluminescence image samples are obtained from the memory buffer. The defect detection model to be trained is trained based on the next subset C and some target photoluminescence image samples. If the model has been successfully trained for all subsets A, B, and C, the iteration can stop.
[0071] The iteration stopping conditions may include: all subsets of the dataset have been trained, the model’s defect detection accuracy on the validation set has reached a preset threshold, or the number of iterations has reached the upper limit.
[0072] In the specific implementation, firstly, the next subset of data is determined as the new sample, clarifying the new domain knowledge (such as defect feature patterns under new imaging conditions) that the model needs to learn. Then, the defect detection model to be trained is trained based on the old samples (partial target photoluminescence image samples) and the new samples (the next subset of data). That is, by fusing representative old samples from the historical domain with new samples from the new domain, training data containing both old and new knowledge is constructed to ensure that the model reviews old domain knowledge while learning new features, avoiding forgetting learned content due to focusing on new samples. Next, the next subset of data is used as the updated current subset of data, returning to step S204 to continue the next iteration. This loop enables the defect detection model to gradually absorb the domain knowledge corresponding to each subset of data, achieving progressive fusion of multi-domain features. Finally, when the iteration stopping condition is met, the training terminates, and a pre-trained defect detection model is obtained. This pre-trained defect detection model has learned and retained defect feature knowledge under multiple imaging conditions, can stably adapt to complex and ever-changing actual detection scenarios, and can output accurate defect detection results (such as defect type, location, etc.) based on the photoluminescence images of solar cells under complex imaging conditions. Therefore, this online defect detection method for solar cells based on domain incremental continuous learning overcomes the catastrophic forgetting problem, is unaffected by factors such as illumination conditions and angle, and can accurately identify defect types.
[0073] The aforementioned online defect detection method for solar cells based on domain incremental continuous learning divides the complex and variable solar cell image data into multiple subsets according to imaging conditions. This allows the defect detection model to gradually learn and integrate feature knowledge corresponding to different imaging conditions during iterative training. Simultaneously, by retaining old samples from the current subset and co-training with new samples from the next subset, catastrophic forgetting during the learning of new domain features is effectively avoided. This ensures the model's ability to continuously recognize defect features under various historical imaging conditions. Consequently, the cross-domain adaptability and generalization of the defect detection model to complex and variable image data are enhanced. This overcomes the accuracy bottleneck of traditional convolutional neural networks caused by data distribution differences, achieving more accurate and stable online detection of solar cell defects. It solves the reliability problem of photovoltaic cell defect detection in complex application scenarios and improves the accuracy of solar cell defect detection.
[0074] In another embodiment, selecting target photoluminescence image samples from the current subset and storing them in a memory buffer includes: for each defect type, obtaining each photoluminescence image sample corresponding to the defect type in the current subset; calculating the average value of each feature vector based on the feature vector of each photoluminescence image sample to obtain the class center corresponding to the defect type; selecting representative photoluminescence image samples corresponding to the defect type from the current subset based on the feature distance between the feature vector of each photoluminescence image sample and the class center; and storing the representative photoluminescence image samples corresponding to each defect type as target photoluminescence image samples in the memory buffer.
[0075] In this context, each photoluminescence image sample corresponding to each defect type in the current subset can be a set of all photoluminescence image samples belonging to the same defect type in the current subset.
[0076] The feature vector of a photoluminescent image sample includes the feature vector obtained by converting the photoluminescent image sample through a feature encoder (such as the feature extraction module of a deep learning model), which can quantify the key features (such as shape, texture, brightness distribution, etc.) that characterize defects in the image.
[0077] Among them, the class center is the vector obtained by averaging the feature vectors of all photoluminescence image samples for a certain defect type. It represents the "core position" of the defect type in the feature space, reflects the overall feature distribution law of the defect type, and can be used as a reference benchmark to measure the representativeness of the samples.
[0078] Among them, feature distance includes indicators (such as Euclidean distance, cosine distance, etc.) used to measure the similarity between the feature vector of a single sample (photoluminescence image sample) and the class center. The smaller the distance, the closer the features of the sample are to the core features of the defect type, and the stronger the representativeness.
[0079] In the specific implementation, photoluminescence image samples corresponding to each defect type in the current subset are selected based on feature distance. The photoluminescence image samples with smaller feature vector distances to the class center of the corresponding defect type are used as representative photoluminescence images. These images can centrally reflect the core features of the defect type under the current imaging conditions and are used for subsequent memory playback to retain knowledge from the old domain. Then, the representative photoluminescence images corresponding to each defect type are stored as target photoluminescence images in the memory buffer.
[0080] In specific implementation, a clustering strategy can be used to select representative photoluminescence image samples for each defect type from the current subset based on the feature distance between the feature vectors of each photoluminescence image sample and the class center. The clustering strategy calculates the mean feature value of all photoluminescence image samples belonging to the same defect type based on the current model feature encoder, using this as the class center. Then, the samples are sorted in ascending order according to the distance between the photoluminescence image samples and the class center, and the top few samples are retained. For example, in each iteration, a new representative photoluminescence image sample is selected from a defect type *o* in the subset and added to the cached sample set. The cached sample set includes photoluminescence image samples selected through the clustering strategy and stored in a memory buffer, ensuring that the average feature vector of the representative photoluminescence image sample selected from defect type *o* is as close as possible to the average feature vector of all available photoluminescence image samples in defect type *o*. Assume... This represents a feature extractor with trainable parameters. , It is a collection of all available photoluminescence image samples for defect type o. It is a set Given the average eigenvector on the image, the nth photoluminescence image sample (n=1,...,m) selected from defect type o is determined by the following formula:
[0081] ;
[0082] An ordered sample set consisting of representative photoluminescence image samples selected from each defect type o The stored ordered sample set can be stored in a memory buffer. This set can be viewed as a priority list; the earlier a sample appears in the ordered set, the more representative it is. Representative photoluminescence image samples corresponding to each defect type can be used together as the target photoluminescence image sample.
[0083] Finally, classification is performed based on the closest class mean rule in the feature space, that is, the class mean is calculated from the photoluminescence image samples stored in the memory buffer. In other words, each defect type in the selected target photoluminescence image samples corresponds to a class mean.
[0084] The memory replay continuous learning algorithm using the above clustering strategy selects representative sample features that are closest to the feature mean of the original dataset, which helps the model review the common knowledge of old data.
[0085] The technical solution of this embodiment first constructs a domain incremental scene solar cell defect dataset, and then constructs a domain incremental learning scenario, dividing the dataset into multiple subsets according to imaging conditions for sequential model training. The domain incremental continuous learning algorithm enables the model to continuously learn new domain features while maintaining the recognition of old domain features, thus adapting to the complex and variable nature of solar cell image data caused by interference factors such as different lighting conditions and angles during solar cell defect detection. The memory-playback-based domain incremental continuous learning algorithm uses a clustering strategy to select representative samples for storage, maximizing the effectiveness of sample memory playback and significantly improving detection accuracy. This online solar cell defect detection method based on domain incremental continuous learning can detect minute defects and impurities in solar panels under complex and variable conditions, achieving highly efficient online detection.
[0086] In another embodiment, representative photoluminescence images corresponding to defect types are selected from the current subset of data based on the feature distances between the feature vectors of each photoluminescence image and the class center. This includes: selecting several photoluminescence images with the smallest feature distances corresponding to defect types from the current subset of data based on the feature distances between the feature vectors of each photoluminescence image and the class center; and arranging the several photoluminescence images in ascending order of feature distance to obtain representative photoluminescence images corresponding to defect types.
[0087] In the specific implementation, for all photoluminescence image samples of a certain defect type in the current subset, each image is first converted into a feature vector using a feature encoder. Then, the feature distance (e.g., Euclidean distance) between each feature vector and the class center (the average of feature vectors of the same type of samples) of that defect type is calculated. Based on the calculation results, several photoluminescence image samples with the smallest feature distances are selected from the samples of that defect type. The features of these images are closest to the core feature patterns of that defect type, and can represent the typical features of this type of defect in the current subset to the greatest extent, effectively filtering out feature deviation samples (noise samples) caused by imaging interference, etc. Then, the selected photoluminescence image samples are sorted according to their feature distance from the class center, with images with smaller distances placed at the front, forming an ordered set of old samples, thus obtaining representative photoluminescence image samples corresponding to the defect type. This sorting method clarifies the representativeness priority of the samples. The closest sample has the strongest supporting effect on the core features of the category. In the subsequent memory playback training of domain incremental learning, the model can be strengthened by prioritizing the first sample to enhance the memory of core knowledge. At the same time, when memory resources are limited, high-value samples can be retained first by sorting, thus balancing the knowledge retention effect and computational cost.
[0088] The technical solution of this embodiment selects representative photoluminescence image samples for each type of defect, so that the selected old samples not only accurately cover the core defect features of the current subset, but also provide a clear priority basis for knowledge reuse in subsequent training through ordered arrangement, laying the foundation for the model to stably retain old knowledge when learning new domains.
[0089] In another embodiment, obtaining a portion of the target photoluminescence images from the memory buffer includes: randomly selecting a preset number of photoluminescence images from the memory buffer; and using the preset number of photoluminescence images as a portion of the target photoluminescence images.
[0090] The preset number can be a value that is pre-set based on requirements such as memory capacity and training efficiency (e.g., 20 images are selected each time). By randomly selecting images, feature bias caused by fixed selection of a single type of sample is avoided. This ensures that the selected target photoluminescence images can evenly cover the core defect features of the historical subset, thus preserving diverse old domain knowledge for the model.
[0091] The technical solution of this embodiment incorporates historical domain knowledge into randomly selected photoluminescence images of some targets, enabling the model to simultaneously learn new knowledge and review old knowledge in the new round of training, balancing the weights of new and old knowledge, effectively combating catastrophic forgetting, and providing stable training data support for the iterative process of domain incremental continuous learning.
[0092] In another embodiment, selecting a target photoluminescence image from the current subset and storing it in a memory buffer includes: inputting the current subset into a generation model to obtain a target photoluminescence image; the generation model is used to simulate the image features of the photoluminescence image in the current subset and generate the target photoluminescence image stored in the memory buffer.
[0093] For example, the generative model may include generative adversarial networks, variational autoencoders, etc. In a specific implementation, the current subset contains photoluminescence image samples under specific imaging conditions and corresponding defect type annotations, serving as feature templates for the generative model to learn. The generative model has the pre-existing ability to learn data distribution characteristics. Upon receiving the current subset, it analyzes image features such as the shape, texture, and brightness distribution of defects in the image to learn and capture the potential feature patterns of the subset (such as pixel differences between defects and the background, and common feature patterns of similar defects). Based on the learning of the feature patterns of the current subset, the generative model generates new photoluminescence image samples as target photoluminescence image samples. These newly generated photoluminescence image samples are not copies of the original images, but rather, through modeling the feature distribution, simulate data with similar core defect features to the current subset, accurately reproducing the core data features of the current subset (such as the typical visual appearance of a "crack" defect under this imaging condition). These generated samples can be identified as target photoluminescence image samples and stored in a memory buffer as old samples for memory playback in subsequent domain incremental learning.
[0094] The technical solution of this embodiment replaces the traditional sample screening with a generative model. By simulating features to generate target photoluminescence image samples, it can retain the core defect knowledge of the current subset dataset and reduce the dependence on the storage of original samples, thus saving memory overhead. At the same time, the generated samples can avoid redundancy or noise in the original data and support the subsequent model's memory of old domain knowledge in a purer feature form, thereby helping the model to combat the problem of catastrophic forgetting.
[0095] In another embodiment, before acquiring the image dataset of the solar cell, the method further includes: acquiring multiple photoluminescence images of the solar cell; labeling the defect types of the multiple photoluminescence images to obtain multiple photoluminescence images labeled with the corresponding defect types; dividing the multiple photoluminescence images into sub-datasets corresponding to each imaging condition; each sub-dataset includes a photoluminescence image corresponding to each defect type.
[0096] In practical implementation, photoluminescence image samples are collected under diverse imaging conditions (such as different light intensities, shooting angles, and background interference) for solar cells, ensuring coverage of typical environments and combinations of acquisition parameters that may be encountered in photovoltaic inspection. These photoluminescence image samples are generated after the solar cell is excited by a specific light source, accurately revealing deep defect features such as microcracks, impurities, and minority carrier recombination within the cell, providing core visual data for defect detection. For each collected photoluminescence image sample, the development platform automatically identifies and labels the types of defects present in the image, clearly defining the defect category label for each image. This provides a clear training objective and feature reference benchmark for subsequent supervised learning of the model, resulting in labeled photoluminescence image samples. Then, based on the differences in imaging conditions during acquisition, all labeled photoluminescence image samples are classified and grouped, so that each subset corresponds to a specific set of imaging conditions. This division method ensures that the image feature distribution within each subset is relatively consistent, providing structured data units for the phased learning of different domain knowledge in subsequent domain incremental learning, avoiding feature distribution chaos caused by data mixing, and ensuring the model's effective learning of defect features under various imaging conditions.
[0097] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0098] Based on the same inventive concept, this application also provides an online defect detection device for solar cells based on domain incremental continuous learning, used to implement the above-mentioned online defect detection method for solar cells based on domain incremental continuous learning. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the online defect detection device for solar cells based on domain incremental continuous learning provided below can be found in the limitations of the online defect detection method for solar cells based on domain incremental continuous learning described above, and will not be repeated here.
[0099] In one exemplary embodiment, such as Figure 6 As shown, an online defect detection device for solar cells based on domain incremental continuous learning is provided, comprising:
[0100] The acquisition module 610 is used to acquire an image dataset of a solar cell; the image dataset includes multiple sub-datasets, each of which includes photoluminescence image samples of the solar cell acquired under various imaging conditions, and each photoluminescence image sample is labeled with a corresponding defect type.
[0101] The determination module 620 is used to train the defect detection model to be trained using the current subset of the multiple subsets, and to select target photoluminescence image samples from the current subset and store them in a memory buffer.
[0102] The generation module 630 is used to obtain a portion of the target photoluminescence image samples from the memory buffer for the next subset relative to the current subset, train the defect detection model to be trained based on the next subset and the portion of the target photoluminescence image samples, use the next subset as the updated current subset, and return to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer, until the iteration stopping condition is met, and obtain a pre-trained defect detection model; wherein, the pre-trained defect detection model is used to output the defect detection result of the solar cell based on the photoluminescence image of the solar cell.
[0103] In one embodiment, the determining module 620 is specifically configured to: acquire each photoluminescence image sample corresponding to the defect type in the current subset for each defect type; calculate the average value of each feature vector based on the feature vector of each photoluminescence image sample to obtain the class center corresponding to the defect type; select representative photoluminescence image samples corresponding to the defect type from the current subset based on the feature distance between the feature vector of each photoluminescence image sample and the class center; and store the representative photoluminescence image samples corresponding to each defect type as the target photoluminescence image samples in the memory buffer.
[0104] In one embodiment, the determining module 620 is specifically used to select a number of photoluminescence image samples with the smallest feature distances corresponding to the defect type from the current subset of data based on the feature distances between the feature vectors of each photoluminescence image sample and the class center; and to arrange the number of photoluminescence image samples in ascending order of the feature distances to obtain representative photoluminescence image samples corresponding to the defect type.
[0105] In one embodiment, the generation module 630 is specifically used to randomly select a preset number of photoluminescence image samples from the memory buffer; and to use the preset number of photoluminescence image samples as part of the target photoluminescence image samples.
[0106] In one embodiment, the determining module 620 is specifically used to input the current subset of data into the generation model to obtain the target photoluminescence image sample; the generation model is used to simulate the image features of the photoluminescence image sample in the current subset of data to generate the target photoluminescence image sample stored in the memory buffer.
[0107] In one embodiment, the acquisition module 610 is specifically used to acquire multiple photoluminescence image samples of the solar cell; to label the defect types of the multiple photoluminescence image samples to obtain the multiple photoluminescence image samples labeled with the corresponding defect types; to divide the multiple photoluminescence image samples into subsets corresponding to each of the imaging conditions; each subset includes the photoluminescence image sample corresponding to each defect type.
[0108] The modules in the aforementioned online defect detection device for solar cells based on domain incremental continuous learning can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0109] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an online defect detection method for solar cells based on domain incremental continuous learning. The display unit of the computer device is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0110] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0111] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0112] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0113] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0115] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0116] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0117] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An online defect detection method for solar cells based on domain incremental continuous learning, characterized in that, The method includes: Acquire multiple photoluminescence image samples of solar cells; The defect types of the multiple photoluminescence image samples are labeled to obtain the multiple photoluminescence image samples labeled with the corresponding defect types; The plurality of photoluminescence image samples are divided into sub-datasets corresponding to each imaging condition; each sub-dataset includes the photoluminescence image sample corresponding to each defect type; Acquire an image dataset of solar cells; the image dataset includes multiple sub-datasets, each of which includes photoluminescence image samples of the solar cells acquired under various imaging conditions, and each photoluminescence image sample is labeled with a corresponding defect type; For the current subset of the multiple subsets, the defect detection model to be trained is trained using the current subset. The current subset is then input into the generative model to obtain a target photoluminescence image sample. The generative model is used to simulate the image features of the photoluminescence image sample in the current subset and generate the target photoluminescence image sample stored in a memory buffer. For the next subset relative to the current subset, a portion of the target photoluminescence image samples are obtained from the memory buffer. The defect detection model to be trained is trained based on the next subset and the portion of the target photoluminescence image samples. The next subset is used as the updated current subset. The process returns to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer until the iteration stopping condition is met, thus obtaining the pre-trained defect detection model. The pre-trained defect detection model is used to output the defect detection results of the solar cell based on the photoluminescence image of the solar cell.
2. The method according to claim 1, characterized in that, The step of selecting target photoluminescence image samples from the current subset and storing them in a memory buffer includes: For each of the aforementioned defect types, obtain the photoluminescence image samples corresponding to each defect type in the current subset of data; Based on the feature vectors of each photoluminescence image sample, the average value of each feature vector is calculated to obtain the class center corresponding to the defect type; Based on the feature distance between the feature vectors of each photoluminescence image sample and the class center, representative photoluminescence image samples corresponding to the defect type are selected from the current subset of data. Representative photoluminescence image samples corresponding to each of the aforementioned defect types are stored as target photoluminescence image samples in the memory buffer.
3. The method according to claim 2, characterized in that, The step of selecting representative photoluminescence image samples corresponding to the defect type from the current subset of data based on the feature distances between the feature vectors of each photoluminescence image sample and the class center includes: Based on the feature distance between the feature vectors of each photoluminescence image sample and the class center, select several photoluminescence image samples with the smallest feature distance corresponding to the defect type from the current subset of data. The plurality of photoluminescence image samples are arranged in ascending order of feature distance to obtain representative photoluminescence image samples corresponding to the defect type.
4. The method according to claim 1, characterized in that, The step of obtaining a portion of the target photoluminescence image samples from the memory buffer includes: Randomly select a preset number of photoluminescence image samples from the memory buffer; The photoluminescence image samples that meet the preset number are used as part of the target photoluminescence image samples.
5. An online defect detection device for solar cells based on domain incremental continuous learning, characterized in that, The device includes: An acquisition module is used to acquire multiple photoluminescence image samples of a solar cell; label the defect types of the multiple photoluminescence image samples to obtain multiple photoluminescence image samples labeled with corresponding defect types; divide the multiple photoluminescence image samples into subsets corresponding to various imaging conditions; each subset includes a photoluminescence image sample corresponding to each defect type; and acquire an image dataset of the solar cell; the image dataset includes multiple subsets, each subset including photoluminescence image samples of the solar cell acquired under various imaging conditions, and each photoluminescence image sample is labeled with a corresponding defect type. The determination module is used to train the defect detection model to be trained using the current subset of the multiple subsets, and input the current subset into the generation model to obtain the target photoluminescence image sample; the generation model is used to simulate the image features of the photoluminescence image sample in the current subset and generate the target photoluminescence image sample stored in the memory buffer. The generation module is used to obtain a portion of the target photoluminescence image samples from the memory buffer for the next subset relative to the current subset, train the defect detection model to be trained based on the next subset and the portion of the target photoluminescence image samples, use the next subset as the updated current subset, and return to the step of selecting target photoluminescence image samples from the current subset and storing them in the memory buffer until the iteration stopping condition is met, thereby obtaining a pre-trained defect detection model; wherein, the pre-trained defect detection model is used to output the defect detection result of the solar cell based on the photoluminescence image of the solar cell.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Depressive disorder detection model training method based on domain incremental learning and electronic equipment
CN117912640A