A photovoltaic module defect detection method and system based on image recognition
Patent Information
- Application Number
- CN202610670849.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-15
- Publication Date
- 2026-10-20
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic module defect detection technology, specifically relating to a photovoltaic module defect detection method and system based on image recognition. Background Technology
[0002] As a core component of solar power generation systems, photovoltaic (PV) modules directly impact power generation efficiency and system safety. In practical applications, due to manufacturing defects, material aging, and external environmental influences, PV modules are prone to various defects such as cracks, broken grids, black spots, contamination, and inefficient cells. These defects typically lead to a decline in localized electrical performance, and in severe cases, can even cause module failure. Therefore, efficient and accurate defect detection of PV modules is of paramount importance.
[0003] Electroluminescence imaging technology has become an important means of defect detection in photovoltaic modules because it can visually reflect the internal structure and conductivity of solar cells when the module is powered on. By acquiring electroluminescence images of photovoltaic modules, the abnormal grayscale distribution corresponding to defect areas can be clearly observed, thereby achieving visual detection of internal defects in the module. With the development of image recognition technology, automated defect detection methods based on image recognition have gradually become a research hotspot.
[0004] In existing technologies, deep learning-based target detection models are commonly used to identify defects in electroluminescent images. However, problems still exist in practical applications. Acquiring photovoltaic module defect data is costly, especially since samples of certain low-probability or complex-shaped defects are scarce, resulting in insufficient training data to support the training needs of high-performance models. This affects the accuracy and generalization ability of the detection models. Existing models are mostly trained based on cell-level images, with features primarily extracted from local defects. However, photovoltaic module-level images are characterized by complex structures, large differences in target scale, and a low proportion of defects. This leads to a decrease in detection accuracy when migrating models from cell-level to module-level applications. Furthermore, because actual electroluminescent images vary in imaging conditions, noise levels, and grayscale distribution, directly using raw data for training can cause the model to become dependent on specific data distributions, thus affecting its adaptability in complex scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide a photovoltaic module defect detection method and system based on image recognition, which can expand the types and number of defect samples under limited real data conditions, and at the same time realize the effective adaptation of the model from the cell level to the module level, thereby improving the detection capability of multi-scale defects.
[0006] The specific technical solution adopted by this invention is as follows: A photovoltaic module defect detection method based on image recognition, comprising: Acquire electroluminescence images of photovoltaic modules, preprocess the electroluminescence images to obtain a real image dataset; Based on real image datasets, a generative adversarial network is trained by transfer learning to obtain an image generation model for generating defect images of photovoltaic modules. Then, a synthetic EL image containing multiple defect morphologies is generated based on the image generation model. The synthetic EL images are processed for feature similarity, redundant images are removed according to a preset similarity threshold, and the processed synthetic EL images are fused with the real image dataset according to a preset ratio to obtain a hybrid training dataset. Obtain the target detection model pre-trained from the electroluminescence image dataset based on photovoltaic modules, and extract the model weights; The mixed training dataset is input into the target detection model, and the model weights are used as initialization parameters for transfer learning training. This adapts the target detection model from cell-level defect recognition to photovoltaic module-level defect detection tasks, resulting in a photovoltaic module defect detection model. The electroluminescent image of the photovoltaic module to be inspected is input into the photovoltaic module defect detection model to obtain the defect category information and the corresponding spatial location information.
[0007] In a preferred embodiment, an electroluminescence image of the photovoltaic module is acquired, and the electroluminescence image is preprocessed to obtain a real image dataset, including: Acquire electroluminescence images of photovoltaic modules under energized conditions; The electroluminescent image is converted to grayscale and noise is suppressed to obtain the processed image. The processed image is labeled based on preset defect categories, which include black patches, black edges, broken grids, cracks, contamination, and inefficient patches, resulting in a labeled image. The labeled image is then subjected to data augmentation, which includes geometric transformation and brightness adjustment, to obtain the augmented image. The enhanced images are then organized and a real image dataset is constructed.
[0008] In a preferred embodiment, a generative adversarial network is trained using transfer learning on a real image dataset to obtain an image generation model for generating images of photovoltaic module defects. Based on this model, a synthetic EL image containing various defect morphologies is generated, including: A generative adversarial network (GAN) pre-trained based on source domain image data is obtained, and the GAN is trained by transfer learning using a real image dataset as the target domain data to obtain an image generation model. The GAN is a StyleGAN3-t network with translation equivariance. During the transfer learning training process, the style control parameters in the generative adversarial network are adjusted to ensure that the structural features and defect texture features of the generated images are consistent with those of the real image dataset. Randomly sampled latent vectors are input into the trained image generation model to generate synthetic EL images containing various defect morphologies.
[0009] In a preferred embodiment, the synthesized EL images undergo feature similarity processing, redundant images are removed according to a preset similarity threshold, and the processed synthesized EL images are fused with the real image dataset according to a preset ratio to obtain a hybrid training dataset, including: Global and local texture features are extracted from the synthesized EL image. The global features include gray-level histogram features and frequency domain distribution features, while the local texture features include defect texture description features. The feature similarity between any two synthesized EL images is obtained based on global features and local texture features, resulting in a similarity matrix; The similarity matrix is filtered according to a preset similarity threshold. Images with similarity higher than the preset similarity threshold are identified as redundant samples. In the redundant sample set, samples with more obvious defect features and higher image quality are retained, and the remaining samples are removed to obtain the deredundant EL image set. The redundancy-removed EL image set is subjected to validity detection. Images with large areas of invalid background and the proportion of defect areas is lower than the preset defect area ratio are removed to obtain valid EL images. According to the preset data fusion ratio, the validity detection EL images are combined with the real image dataset to obtain combined image data; The combined image data is converted to a unified annotation format and augmented to obtain a hybrid training dataset.
[0010] In a preferred embodiment, the validity detection EL image is combined with the real image dataset according to a preset data fusion ratio to obtain combined image data, including: The number of target samples in the combined data is obtained based on the preset data fusion ratio, which is the real image dataset and the validity detection EL image. Based on the target sample size, proportional sampling is performed from the real image dataset and the validity detection EL image to obtain proportionally sampled real image data and validity detection EL image; The real image data sampled at the same scale and the validity detection EL image are randomly rearranged and combined to obtain the combined image data.
[0011] In a preferred embodiment, a target detection model is pre-trained using a dataset of electroluminescent images based on photovoltaic modules, and the model weights are extracted, including: A pre-trained target detection model based on the YOLOv9 architecture is constructed. The target detection model includes a programmable gradient information module and a generalized efficient layer aggregation network structure. The programmable gradient information module is used to maintain the complete transmission of gradient information and reduce information loss in deep networks during network training. The generalized efficient layer aggregation network structure is used to improve feature expression efficiency and multi-scale information fusion capability through cross-layer feature aggregation. The target pre-training detection model is pre-trained based on the electroluminescent images of photovoltaic modules, enabling the target pre-training detection model to have the ability to extract features of local defects in solar cells. After pre-training is completed, the parameter convergence of the target pre-trained detection model is determined, and the parameters of the model that meets the preset convergence conditions are solidified to obtain a stable target detection model. Network parameters are extracted from the object detection model and used as model weights.
[0012] In a preferred embodiment, a hybrid training dataset is input into the object detection model, and the model weights are used as initialization parameters for transfer learning training. This adapts the object detection model from its cell-level defect identification capability to the photovoltaic module-level defect detection task, resulting in a photovoltaic module defect detection model, including: The mixed training dataset is input into the object detection model, and the model weights are loaded into the object detection model as initialization parameters; During training, feature extraction is performed on the input electroluminescent image to obtain defect feature information at different scales; The feature extraction network parameters of the target detection model are updated based on defect feature information at different scales. Based on the annotation information in the hybrid training dataset, the detection head parameters of the object detection model are optimized and trained. A defect detection model for photovoltaic modules was obtained through transfer learning training.
[0013] In a preferred embodiment, the electroluminescence image of the photovoltaic module to be inspected is input into the photovoltaic module defect detection model to obtain the defect category information and corresponding spatial location information, including: Input the electroluminescence image of the photovoltaic module to be inspected into the photovoltaic module defect detection model; The photovoltaic module defect detection model encodes the features of the input electroluminescent image and generates the corresponding multi-scale feature map; Based on multi-scale feature maps, the defect target is classified by the detection head structure in the photovoltaic module defect detection model, and the spatial location of the defect target in the image is obtained. The output electroluminescent image contains category information and corresponding spatial location information for each defect target. The spatial location information includes the bounding box coordinates of the defect target, the defect category, and the confidence level.
[0014] The present invention also provides an image recognition-based photovoltaic module defect detection system for use in the aforementioned image recognition-based photovoltaic module defect detection method, comprising: The image acquisition module is used to acquire electroluminescent images of photovoltaic modules, preprocess the electroluminescent images, and obtain a real image dataset. The image generation module trains a generative adversarial network using transfer learning based on a real image dataset to obtain an image generation model for generating images of defects in photovoltaic modules. Based on the image generation model, it generates synthetic EL images containing various defect morphologies. The image fusion module is used to process the feature similarity of the synthesized EL images, remove redundant images according to a preset similarity threshold, and fuse the processed synthesized EL images with the real image dataset according to a preset ratio to obtain a mixed training dataset. The feature extraction module is used to obtain the target detection model pre-trained from the electroluminescence image dataset based on photovoltaic modules and extract the model weights; The transfer learning module is used to input the mixed training dataset into the target detection model, and use the model weights as initialization parameters for transfer learning training, so that the target detection model can be adapted from the cell-level defect recognition capability to the photovoltaic module-level defect detection task, thus obtaining the photovoltaic module defect detection model. The image detection module is used to input the electroluminescent image of the photovoltaic module to be detected into the photovoltaic module defect detection model to obtain the defect category information and the corresponding spatial location information.
[0015] And, a photovoltaic module defect detection terminal based on image recognition, comprising: One or more processors; A storage device on which one or more programs are stored; When one or more programs are executed by one or more processors, the one or more processors implement a photovoltaic module defect detection method based on image recognition.
[0016] The technical effects achieved by this invention are as follows: This invention integrates data acquisition, data expansion, model training, and detection output into a unified design, realizing a complete processing chain from raw images to defect results. It generates diverse defect images through generative adversarial networks, significantly expanding the scale of training data and increasing data coverage. Feature similarity filtering and data fusion mechanisms ensure the authenticity and diversity of training data, improving model training quality. Transfer learning mechanisms enable a shift from identifying local defects at the cell level to detecting multi-scale defects at the module level. Multi-scale feature extraction and fusion allow the model to simultaneously identify both subtle defects and large-scale anomalies, improving detection comprehensiveness. The introduction of mixed training data and pre-trained weights allows the model to adapt to different scenarios and data distributions, improving practical application effectiveness. By outputting structured defect information, the detection results can be directly applied to photovoltaic module quality assessment, fault analysis, and operation and maintenance management. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method provided by the present invention; Figure 2 This is a system module diagram provided by the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0019] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0020] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that mutually excludes other embodiments.
[0021] Furthermore, the present invention will be described in detail with reference to the schematic diagrams. When describing the embodiments of the present invention in detail, the schematic diagrams are merely examples for ease of explanation and should not limit the scope of protection of the present invention.
[0022] Please see the appendix Figure 1 As shown, an image recognition-based method for detecting defects in photovoltaic modules is provided, including: S1. Obtain electroluminescence images of photovoltaic modules, preprocess the electroluminescence images to obtain a real image dataset; S2. Based on a real image dataset, a generative adversarial network is trained by transfer learning to obtain an image generation model for generating images of defects in photovoltaic modules. Based on the image generation model, a synthetic EL image containing multiple defect morphologies is generated. S3. Perform feature similarity processing on the synthesized EL image, remove redundant images according to the preset similarity threshold, and fuse the processed synthesized EL image with the real image dataset according to the preset ratio to obtain a mixed training dataset. S4. Obtain the target detection model pre-trained from the electroluminescent image dataset based on photovoltaic modules, and extract the model weights; S5. Input the hybrid training dataset into the target detection model, use the model weights as initialization parameters for transfer learning training, so that the target detection model can be adapted from the cell-level defect recognition capability to the photovoltaic module-level defect detection task, and obtain the photovoltaic module defect detection model. S6. Input the electroluminescent image of the photovoltaic module to be inspected into the photovoltaic module defect detection model to obtain the defect category information and the corresponding spatial location information.
[0023] As described in steps S1 to S6 above, electroluminescent images of photovoltaic modules under energized conditions are acquired (reflecting the conductivity state and defect distribution characteristics of the cells inside the module, where different types of defects appear as different grayscale anomalies in the image). These images are then preprocessed to construct a real image dataset. Grayscale unification and noise suppression are applied to the original images to reduce the impact of environmental interference on image quality and highlight defect region features. Defect annotation and data augmentation are performed on the images to ensure the data possesses clear category and spatial information, while also expanding the data distribution range. Finally, a well-structured and fully annotated real image dataset is constructed. This dataset is then trained using transfer learning on a generative adversarial network (such as StyleGAN3-T image generation network), leveraging the general image generation capabilities of the source domain pre-trained model and combining it with real image data for target domain adaptation. The model is gradually trained to learn the structural features and defect distribution patterns of photovoltaic module images, resulting in an image generation model suitable for electroluminescent (EL) images of photovoltaic modules. During training, style control parameters in the generation model are adjusted to ensure that the generated images maintain consistency with real images in terms of texture representation, grayscale distribution, and defect morphology. Diverse synthetic EL images are generated by inputting latent vectors into the model, thereby expanding the types and distribution patterns of defects at the data level. Feature similarity processing is performed to remove redundant images that differ significantly from real data or have repetitive features, ensuring data quality. Based on a preset data fusion ratio, the selected synthetic EL images are combined with the real image dataset, and a mixed training dataset is formed through random rearrangement. This process ensures data authenticity while introducing diverse sample distributions. The detection model (such as YOLOv9) is then trained based on the electroluminescent image data. The GELAN-e target detection network is trained to learn the structural features and manifestations of local defects, bringing the model to a stable state. Its parameters are then fixed, and network parameters are extracted as initial weights. This method preserves the feature representation capabilities acquired during pre-training as parameters. A mixed training dataset is input into the target detection model, and the pre-trained model weights are loaded as initial parameters. Transfer learning training is then performed on the model. Through this process, the model gradually adapts to the overall structural features and multi-scale defect distribution of photovoltaic module-level images, building upon its existing local defect recognition capabilities. During training, the model achieves a unified representation of defects of different sizes through the synergy of multi-scale feature extraction and the detection head structure, gradually establishing the correlation between local defect features and the overall module structure. Through continuous training, the model completes the cross-level capability transfer from the cell level to the module level, ultimately forming a photovoltaic module defect detection model. The electroluminescent image to be detected is input into the model for defect identification. The model first extracts multi-scale features from the image and then analyzes potential defect areas through the detection head to determine the defect category.Based on the spatial mapping relationship between feature maps and original images, the specific location of defect targets in the image is determined and expressed in the form of bounding boxes. Finally, defect category information and corresponding spatial location information are output, achieving structured detection results for photovoltaic module defects. By integrating data acquisition, data expansion, model training, and detection output, a complete processing chain from original image to defect results is realized. Diverse defect images are generated through generative adversarial networks, significantly expanding the scale of training data and improving data coverage. Feature similarity filtering and data fusion mechanisms ensure the authenticity and diversity of training data, improving model training quality. Transfer learning mechanisms enable the transformation from cell-level local defect recognition to module-level multi-scale defect detection. Multi-scale feature extraction and fusion enable the model to simultaneously identify subtle defects and large-scale anomalies, improving detection comprehensiveness. The introduction of mixed training data and pre-trained weights allows the model to adapt to different scenarios and data distributions, improving practical application effects. By outputting structured defect information, the detection results can be directly applied to photovoltaic module quality assessment, fault analysis, and operation and maintenance management.
[0024] In a preferred embodiment, an electroluminescence image of the photovoltaic module is acquired, and the electroluminescence image is preprocessed to obtain a real image dataset, including: S101. Acquire an electroluminescence image of the photovoltaic module under energized conditions; S102. Perform grayscale processing and noise suppression processing on the electroluminescent image to obtain the processed image; S103. The processed image is labeled based on the preset defect categories, which include black patches, black edges, broken grids, cracks, contamination and inefficient patches, to obtain the labeled image. S104. Perform data augmentation on the labeled image, including geometric transformation and brightness adjustment, to obtain the augmented image. S105. Organize the enhanced images into a unified dataset of real images.
[0025] As described in steps S101 to S105 above, after applying a forward bias current to the photovoltaic module, the internal cells of the module will produce electroluminescence. The luminescence intensity of different regions is closely related to its electrical performance. When the cells have defects such as cracks, broken grids, or performance degradation, the luminescence intensity of the corresponding regions will change abnormally, which will appear as uneven grayscale or local dark areas in the imaging results. By collecting the luminescence distribution through imaging equipment, image data reflecting the internal structure and defect status of the module can be obtained. This type of image has the characteristics of intuitive information and strong defect visibility. Grayscale processing and noise suppression processing are performed on it. Grayscale processing is used to unify the image representation and concentrate the image information on the brightness distribution, thereby highlighting the defect area and the normal area. The differences lie in noise suppression. To address potential environmental interference and equipment noise introduced during imaging, smoothing or filtering is applied to the image to reduce the impact of random noise on image details, thereby improving image quality and enhancing the recognizability of defect features. While ensuring that defect edge information is not weakened, the image is moderately optimized to make subtle defects such as cracks and broken grids clearer in grayscale distribution. The image is labeled based on preset defect categories, including typical photovoltaic defect types such as black patches, black edges, broken grids, cracks, contamination, and inefficient wafers. The labeling method combines manual and assisted labeling. During the labeling process, labelers with professional knowledge first use the grayscale values in the electroluminescent image... Anomaly features are identified to distinguish different defect regions, and each defect region is assigned a corresponding category label. Simultaneously, the spatial extent of the defect is determined by selecting or outlining the defect region in the image. For defects with obvious structures (such as broken grids or black patches), rectangular bounding boxes can be used for annotation; for irregularly shaped defects (such as cracks), polygonal outlines can be used for fine annotation, resulting in labeled image data containing both category and location information. Data augmentation processing is then performed on the labeled images to expand the data distribution and improve the model's generalization ability. Data augmentation processing includes two types of operations: geometric transformations and brightness adjustment. Geometric transformations include operations such as rotation, flipping, scaling, and translation of the image, changing the spatial extent of defects in the image. The distribution pattern allows the model to adapt to defects in different directions and locations. Brightness adjustment simulates brightness changes under different imaging conditions by adjusting the overall or local grayscale of the image, thereby enhancing the model's adaptability to illumination differences and imaging fluctuations. During enhancement processing, the corresponding annotation information is updated simultaneously to ensure consistency with the enhanced image, making the data more diverse in terms of structure, location, and grayscale distribution. All image data is uniformly organized to construct a realistic image dataset. Specifically, the images and their corresponding annotation information are first uniformly formatted, including standardizing image size, naming rules, and annotation formats, to ensure a consistent data structure. Image data and annotation information are then stored in a one-to-one correspondence.The dataset is categorized and managed according to preset rules, such as grouping by defect type, data source, or data augmentation method. Based on subsequent model training needs, the dataset is divided into training, validation, and testing subsets to support model performance evaluation and optimization. Through this process of organization and refinement, a structured and complete real-world image dataset is formed, enabling the model to adapt to different imaging conditions and defect manifestations, thus improving its application effectiveness in real-world scenarios.
[0026] In a preferred embodiment, a generative adversarial network is trained using transfer learning on a real image dataset to obtain an image generation model for generating images of photovoltaic module defects. Then, a synthetic EL image containing various defect morphologies is generated based on the image generation model, including: S201. Obtain the generative adversarial network pre-trained based on source domain image data, and use the real image dataset as the target domain data to perform transfer learning training on the generative adversarial network to obtain an image generation model. The generative adversarial network is a StyleGAN3-t network with translation equivariance. S202. During the transfer learning training process, the style control parameters in the generative adversarial network are adjusted to ensure that the structural features and defect texture features of the generated images are consistent with those of the real image dataset. S203. Input the randomly sampled latent vectors into the trained image generation model to generate a synthetic EL image containing various defect morphologies.
[0027] As described in steps S201 to S203 above, a generative adversarial network (GAN) pre-trained based on source domain image data is obtained. The GAN is a StyleGAN3-t network with translational equivariance. The source domain image data can be collected from public image datasets, historical industrial inspection data, or simulated generated data, containing image samples with rich texture structures and defect morphologies. The images are not limited to the photovoltaic field but possess strong structural representation capabilities and texture diversity, enabling the GAN to learn general image generation capabilities. The source domain image data is used to pre-train the GAN, allowing it to complete the parameter convergence process from a random state to possessing basic image generation capabilities. Real image datasets are then introduced as target domain data to further refine the pre-trained network. A generative adversarial network (GAN) is trained using transfer learning. During this process, the main structure of the GAN remains unchanged, and the model parameters are gradually adjusted based on real electroluminescence image data. This allows the model output to gradually approximate the distribution characteristics of the electroluminescence images of photovoltaic modules. A phased adjustment strategy is preferred during transfer learning: initially, some network layer parameters are kept stable to preserve the general structural representation capabilities learned in the source domain; gradually, the parameter update range is released to allow the model to adapt to the grayscale distribution characteristics and defect representations in the target domain, resulting in an image generation model that reflects the defect characteristics of photovoltaic modules. During transfer learning training, style control parameters in the GAN (including those used to adjust image texture distribution and grayscale levels) are adjusted. The parameters related to local structural expression are adjusted to control the overall style and detail representation of the generated image. In the actual adjustment process, the generated image is compared with the statistical characteristics of the real image dataset. When the generated image deviates from the distribution of the real image in terms of texture coarseness, grayscale contrast, or defect morphology, the corresponding style parameters are adjusted accordingly, gradually converging the generated result towards the real data distribution. Combined with feedback information from the discriminant network, the realism of the generated image is constrained, allowing the generation network to continuously optimize its output during training. This achieves a balance between structural consistency and detail realism, ensuring that the generated image not only has overall structural rationality but also accurately reflects defect texture features from the preset latent space. Random sampling is performed to obtain latent vectors, which are then input into a trained generative network. The generative network maps these latent vectors into image outputs with specific structural and textural features. During generation, different latent vectors correspond to different combinations of image features. Through multiple sampling, electroluminescent images with diverse defect morphologies can be generated, including defect distributions of different locations, sizes, and types. By interpolating or controlling the range of the latent vectors, the generated images exhibit continuous variations in the number, distribution density, and morphological complexity of defects, thereby further enhancing data diversity. The final synthesized EL images structurally conform to the layout characteristics of photovoltaic modules and texturally approximate the real-world defect representation, making them effective training data for model training.Highly realistic and diverse electroluminescent images of photovoltaic module defects were generated.
[0028] In a preferred embodiment, the synthesized EL images undergo feature similarity processing, redundant images are removed according to a preset similarity threshold, and the processed synthesized EL images are fused with the real image dataset according to a preset ratio to obtain a hybrid training dataset, including: S301. Extract global features and local texture features from the synthesized EL image. The global features include gray-level histogram features and frequency domain distribution features, and the local texture features include defect texture description features. S302. Based on global features and local texture features, obtain the feature similarity between any two synthesized EL images to obtain a similarity matrix; S303. The similarity matrix is filtered according to the preset similarity threshold. Images with similarity higher than the preset similarity threshold are judged as redundant samples. In the redundant sample set, samples with more obvious defect features and higher image quality are retained, and the remaining samples are removed to obtain the deredundant EL image set. S304. Perform validity detection on the redundancy-removed EL image set, and remove images with large areas of invalid background and defect areas with a proportion lower than the preset defect area proportion to obtain valid EL images. S305. According to the preset data fusion ratio, the validity detection EL image is combined with the real image dataset to obtain combined image data; S306. Perform unified annotation format conversion and data augmentation on the combined image data to obtain a hybrid training dataset.
[0029] As described in steps S301 to S306 above, for each synthesized EL image, at the global level, a gray-level histogram feature is constructed by statistically analyzing the image's gray-level value distribution. This feature reflects the overall brightness structure and energy distribution differences of the image. The image is then converted to the frequency domain, and its frequency domain energy distribution features are obtained to characterize the texture changes of the image at different spatial frequencies, thereby reflecting the periodicity of the component structure and the overall texture coarseness. At the local level, texture description features are extracted around the defect area to depict the continuity of crack direction, the fracture morphology of broken grids, and the texture distribution of contaminated areas, enabling local detail information to be effectively expressed. Each synthesized EL image is mapped to a feature vector of a unified dimension and then normalized. The images are processed to eliminate the influence of different units. Then, based on at least one of the following methods—cosine similarity, Euclidean distance, or structural similarity index—pairwise matching is performed on any two images to obtain the corresponding similarity values. The pairwise similarity results of all images are arranged according to the row-column correspondence to construct a symmetric similarity matrix. Each element in the matrix represents the degree of similarity between corresponding two images. This similarity matrix can reflect the overall distribution density and similarity clustering within the synthesized EL image set. The image set is then screened by setting a preset similarity threshold (which can be obtained through statistical analysis of the similarity distribution, such as selecting the inflection point of the similarity distribution curve, or setting it based on practical experience). When the similarity between any two images exceeds a certain threshold, they are considered redundant. For the set of images deemed redundant, further quality assessment is performed. By comparing the clarity, contrast, and structural integrity of defective regions in each image, samples with more obvious defect features and higher image quality are prioritized for retention, while other duplicate or low-quality samples are removed. This results in a redundancy-free EL image set, reducing data redundancy and improving data effectiveness. The effective regions in the images are determined, identifying large areas of background without information, such as pure black areas or areas without obvious structural information. Based on the labeled or automatically extracted defective regions in the image, the proportion of defective regions in the entire image is obtained and... The image is compared with a preset proportion of defective regions, which can be set according to task requirements or data statistics. When the invalid background area in the image is too large or the proportion of defective areas is lower than the preset proportion, the image is determined to have no effective training value and is removed, resulting in an EL image set containing only valid defect information, thereby improving data quality. According to a preset data fusion ratio, a corresponding number of image samples are selected from the real image dataset and the validity detection EL image set, respectively. The selected samples are randomly rearranged to ensure that the real data and the validity detection EL data are evenly distributed in the overall dataset, avoiding data distribution bias and achieving a balance between the constraint of real data on the model's realism and the supplementation of data diversity by synthetic data.The annotation information of images from different sources was uniformly converted into the standard annotation format required by the target detection model, ensuring consistency in the bounding box coordinate representation and category label encoding. Consistent data augmentation processing was applied to all data, including geometric transformations (such as flipping, rotation, and scaling) and brightness adjustments, to enhance data diversity. All images and their corresponding annotations were organized and stored according to a unified data structure, ultimately constructing a standardized and structurally complete hybrid training dataset. Through feature modeling, similarity filtering, validity constraints, and proportional fusion with real data on synthetic EL images, a high-quality, diverse, and structurally unified hybrid training dataset was constructed, providing a stable and reliable data foundation for training the photovoltaic module defect detection model.
[0030] In a preferred embodiment, the validity detection EL image is combined with the real image dataset according to a preset data fusion ratio to obtain combined image data, including: S3051. Based on a preset data fusion ratio, obtain the number of target samples in the combined data of the real image dataset and the validity detection EL image; S3052. Based on the target sample quantity, perform proportional sampling from the real image dataset and the validity detection EL image to obtain proportionally sampled real image data and validity detection EL image. S3053. The real image data sampled at the same ratio and the validity detection EL image are randomly rearranged and combined to obtain the combined image data.
[0031] As described in steps S3051 to S3053 above, by comparing and analyzing the performance of existing models under different data ratios, the ratio that optimizes the model's detection accuracy and stability is selected as the preset data fusion ratio. Alternatively, the preset data fusion ratio can be determined empirically, taking into account the difference between the scale of real data and the scale of synthetic data. For example, while ensuring that real data dominates, a certain proportion of synthetic data can be introduced to supplement the few sample defect types. Based on the total sample size of the combined dataset, the number of samples required for real images and validity detection EL images are obtained according to the preset data fusion ratio, thereby obtaining the target sample number of the two types of data in the combined data. The corresponding number of image samples are selected from the corresponding dataset. To avoid sample distribution bias, random sampling or stratified sampling can be used. The sampling method ensures a relatively balanced distribution of different defect categories in the sampling results, thereby guaranteeing the integrity of data coverage. Real image data and validity detection (EL) images are obtained in equal proportions, ensuring that both types of data meet preset requirements in terms of quantity and category distribution. The two types of data are then merged, and the merged data sequence is randomly rearranged to break the potential distribution bias caused by the original data source order. This ensures that real and synthetic data are evenly interspersed in the overall dataset. During the combination process, the annotation information corresponding to each image is preserved, and the one-to-one correspondence between annotations and images is ensured without misalignment. Through random rearrangement and consistency processing, a unified and balanced combined image data is finally obtained, achieving the orderly fusion of real and synthetic data, thus constructing a reasonably distributed and structurally balanced training data foundation.
[0032] In a preferred embodiment, a target detection model is pre-trained from a dataset of electroluminescent images based on photovoltaic modules, and the model weights are extracted, including: S401. Construct a target pre-trained detection model based on the YOLOv9 architecture. The target detection model includes a programmable gradient information module and a generalized efficient layer aggregation network structure. The programmable gradient information module is used to maintain the complete transmission of gradient information and reduce information loss in deep networks during network training. The generalized efficient layer aggregation network structure is used to improve feature expression efficiency and multi-scale information fusion capability through cross-layer feature aggregation. S402. The target pre-training detection model is pre-trained based on the electroluminescent images of photovoltaic modules, so that the target pre-training detection model has the ability to extract features of local defects in the battery cell. S403. After pre-training is completed, the parameter convergence of the target pre-trained detection model is determined, and the parameters of the model that meets the preset convergence conditions are solidified to obtain a stable target detection model. S404. Extract network parameters from the object detection model as model weights.
[0033] As described in steps S401 to S404 above, a pre-trained target detection model based on the YOLOv9 architecture is constructed. This model incorporates a Programmable Gradient Information (PGI) module and a Generalized Efficient Layer Aggregation Network (GELAN) structure, establishing an optimized foundation for photovoltaic defect detection at the network structure level. The PGI module, by introducing reversible branches and auxiliary information paths into the backbone network, ensures consistent feature information transmission during forward feature propagation and backward gradient transfer. This avoids the fine-grained feature loss problem that occurs in traditional deep networks during multiple downsampling processes. This is particularly important in photovoltaic electroluminescent images, where defects such as microcracks and broken grids often exhibit low contrast and small-scale structures. The GI module ensures that these features are effectively preserved in deep networks. Meanwhile, the GELAN structure, through cross-layer feature recombination and multi-path information fusion mechanisms, collaboratively integrates semantic and detailed information from different levels. This improves feature representation efficiency and multi-scale information fusion capabilities without significantly increasing model parameter size, enabling the model to simultaneously address global structure perception and local defect recognition. The model possesses good feature representation potential and information transmission capabilities from the initial construction stage. A photovoltaic electroluminescence image dataset is constructed for pre-training, preferably at the cell level or local region level to highlight fine-grained defect features. The electroluminescence images are input into the target pre-trained detection model for pre-training. Training enables the model to learn the feature representation of local defects in solar cells. During pre-training, the model extracts multi-layer features from defect regions in the input image, gradually establishing a feature representation structure from low-level edge information to high-level semantic information. This allows the model to identify the morphological features and distribution patterns of local defects such as broken grids, cracks, and black spots. The model acquires basic feature extraction capabilities for photovoltaic electroluminescent images. The training state of the target pre-trained detection model is then converged. Preset convergence conditions are determined based on the changing trends of model performance indicators during training. For example, when the model's loss variation is lower than a preset threshold over multiple consecutive training cycles, or when the model's detection performance indicators (such as detection precision or recall) on the validation dataset tend to... When the model reaches a stable state, it is considered to have converged. The upper limit of the training epochs can also be used as an auxiliary criterion to avoid overtraining. After determining that the model meets the convergence condition, further updates to the model parameters are stopped, and the current model parameters are saved. The consistency of the model structure and parameter state is confirmed to ensure stable output during subsequent loading and application, resulting in a target detection model with stable parameters and fixed feature representation capabilities. Corresponding parameter information is extracted from the model's feature extraction network and detection head structure and stored according to a preset format so that it can be used as initialization parameters for subsequent model loading. The photovoltaic defect feature knowledge learned in the pre-training stage is retained in parameter form, realizing the transfer and reuse of model knowledge.By obtaining stable model weights with prior knowledge of photovoltaic defects, a reliable foundation is provided for transfer learning of the module-level defect detection model.
[0034] In a preferred embodiment, a hybrid training dataset is input into the object detection model, and the model weights are used as initialization parameters for transfer learning training. This adapts the object detection model from cell-level defect identification capabilities to photovoltaic module-level defect detection tasks, resulting in a photovoltaic module defect detection model, including: S501. Input the mixed training dataset into the object detection model, and load the model weights as initialization parameters into the object detection model; S502. During the training process, feature extraction is performed on the input electroluminescent image to obtain defect feature information at different scales. S503. Update the feature extraction network parameters of the target detection model based on defect feature information at different scales; S504. Based on the annotation information in the mixed training dataset, optimize the detection head parameters of the target detection model. S505. A photovoltaic module defect detection model is obtained through transfer learning training.
[0035] As described in steps S501 to S505 above, the mixed training dataset is input into the object detection model, and the model weights are loaded into the object detection model as initialization parameters. This enables the model to respond to local defects such as cracks, broken grids, and black spots from the initial training stage, thereby avoiding the slow convergence and feature learning difficulties caused by training from a random state. The mixed training dataset contains real and synthetic data, which can provide the model with a diverse input distribution in the early stages of training. During training, the input electroluminescent image is fed into the feature extraction network of the object detection model, and the image is subjected to hierarchical feature encoding. The model extracts image features step by step through a multi-layer convolutional structure, extracting edges, textures, etc. in the shallow network. Fine-grained information is extracted from semantic and structural information in deep networks. Through feature pyramid structures or multi-scale feature fusion mechanisms, features from different levels are integrated to form feature maps at multiple scales. This allows the model to simultaneously represent large-scale component structural information and small-scale defect region features. For example, small-scale crack defects in component-level images can be captured in high-resolution feature maps, while regions with overall performance abnormalities are represented in low-resolution feature maps, achieving unified modeling of defects at different scales. During training, the model's prediction results are compared with the labeled information to obtain the deviation between the feature representation and the target features. This deviation is then fed back layer by layer to the feature extraction network during parameter updates. During the process, on the one hand, the local defect feature representation ability already learned in the pre-trained weights is retained; on the other hand, the model is guided to gradually adapt to large-scale structural information and low-proportion defect features in component-level images through mixed training data. This enables the feature extraction network to transform from local sensitivity to global and local collaborative perception, allowing the feature extraction network to stably extract multi-scale features suitable for component-level detection tasks. The defect category labels and corresponding spatial locations provided in the labeled data are used to constrain the output results of the detection head, allowing the model to gradually establish the mapping relationship between features and categories, as well as the correspondence between features and locations, during training. By jointly optimizing the detection results on feature maps of different scales, the detection head... The system can effectively identify and locate defect targets at different scales, enabling the detection head to gradually adapt to the detection task requirements of a large number of targets and large scale differences in module-level images. During the training process, while retaining the ability to identify defects at the cell level, the model continuously learns the spatial structural relationships and defect distribution characteristics in module-level images through mixed training data. This allows the model to gradually establish the ability to express the correlation between local defect features and global module structure. When the model performs stably on the validation data and meets the preset performance requirements, the current model parameters are saved, thus obtaining the final photovoltaic module defect detection model. This achieves effective adaptation of the target detection model from the cell level to the photovoltaic module level, thereby obtaining high-precision, multi-scale defect detection capabilities.
[0036] In a preferred embodiment, the electroluminescence image of the photovoltaic module to be inspected is input into the photovoltaic module defect detection model to obtain defect category information and corresponding spatial location information, including: S601. Input the electroluminescent image of the photovoltaic module to be inspected into the photovoltaic module defect detection model; S602, the photovoltaic module defect detection model performs feature encoding on the input electroluminescent image and generates the corresponding multi-scale feature map; S603. Based on multi-scale feature maps, the defect target is classified by the detection head structure in the photovoltaic module defect detection model, and the spatial location of the defect target in the image is obtained. S604. Output the category information and corresponding spatial location information of each defect target in the electroluminescent image, wherein the spatial location information includes the bounding box coordinates of the defect target, the defect category and the confidence level.
[0037] As described in steps S601 to S604 above, the electroluminescent image of the photovoltaic module to be detected is input into the pre-trained photovoltaic module defect detection model. During the input process, the image undergoes uniform size adaptation and data format standardization to ensure it meets the model's input requirements. Since the detection model has been trained through transfer learning using a mixed training dataset and possesses the ability to identify multi-scale defects at the module level, after the image is input, the model can perform overall analysis of the entire module image based on existing feature representation mechanisms. The image first enters the feature extraction network, which extracts information features from the image step by step through a multi-layer structure. The shallow structure focuses on extracting edge information, texture details, and local features. The model uses grayscale variation features to reflect the detailed features of minute defects, while deep structure abstracts the image at the semantic level, extracting the overall structural information of components and the distribution features of defect areas. Through a multi-scale feature fusion mechanism, features at different levels are integrated to construct multiple feature maps with different spatial resolutions. Each scale feature map corresponds to a target region of different sizes, enabling the model to simultaneously cover small-scale defects (such as microcracks and broken grids) and large-scale abnormal regions (such as black spots and inefficient areas), thus forming a unified multi-scale feature representation system. The model uses a detection head structure to identify and locate potential defect regions in the feature maps at different scales. The model processes regions with significant feature responses on the feature map and matches these regions with preset defect categories based on the feature representation results, thereby determining the defect category attribute. Simultaneously, the detection head determines the location of the defect target based on the spatial mapping relationship between the response regions in the feature map and the original image, restoring the response regions in the feature map to the coordinate space of the original image, determining the boundary range of the defect region, and expressing it in a unified coordinate form. Through joint processing on multi-scale feature maps, the model can achieve accurate category recognition and spatial localization for defect targets of different sizes and distribution patterns, accurately identifying and locating each identified defect target. The corresponding category information and spatial location information of the target are organized in a structured manner. The category information is used to characterize the defect type, and the spatial location information is represented in the form of bounding box coordinates, defect category and confidence level to describe the location range and distribution area of the defect in the image. The output result can contain a set of information of multiple defect targets, reflecting the defect distribution in the entire electroluminescent image of the photovoltaic module. Through this structured output method, the detection results have good readability and usability, which facilitates defect statistical analysis, quality assessment and operation and maintenance decision support. Through multi-scale feature extraction and detection head collaborative processing, accurate identification and spatial positioning of defects in the electroluminescent image of photovoltaic module are achieved.
[0038] Please see the appendix Figure 2As shown, the present invention also provides a photovoltaic module defect detection system based on image recognition, used in the above-mentioned photovoltaic module defect detection method based on image recognition, comprising: The image acquisition module is used to acquire electroluminescent images of photovoltaic modules, preprocess the electroluminescent images, and obtain a real image dataset. The image generation module trains a generative adversarial network using transfer learning based on a real image dataset to obtain an image generation model for generating images of defects in photovoltaic modules. Based on the image generation model, it generates synthetic EL images containing various defect morphologies. The image fusion module is used to process the feature similarity of the synthesized EL images, remove redundant images according to a preset similarity threshold, and fuse the processed synthesized EL images with the real image dataset according to a preset ratio to obtain a mixed training dataset. The feature extraction module is used to obtain the target detection model pre-trained from the electroluminescence image dataset based on photovoltaic modules and extract the model weights; The transfer learning module is used to input the mixed training dataset into the target detection model, and use the model weights as initialization parameters for transfer learning training, so that the target detection model can be adapted from the cell-level defect recognition capability to the photovoltaic module-level defect detection task, thus obtaining the photovoltaic module defect detection model. The image detection module is used to input the electroluminescent image of the photovoltaic module to be detected into the photovoltaic module defect detection model to obtain the defect category information and the corresponding spatial location information.
[0039] The image acquisition module, as described above, acquires images of the internal luminescence response of the solar cell using an electroluminescence imaging device. These images directly reflect the internal structure and defect distribution of the solar cell. The original images undergo unified processing, including grayscale normalization and noise suppression, to reduce the impact of environmental interference and imaging noise on subsequent processing. The images are labeled with preset defect categories, and data augmentation is used to expand sample diversity, ultimately forming a well-structured and fully labeled real-world image dataset. The image generation module acquires a pre-trained generative adversarial network (GAN) on the source domain image data and uses the real-world image dataset as the target domain data for adaptation training. This allows the model to gradually learn the structural features and defect distribution patterns of the photovoltaic module's electroluminescence images. During the training process... By adjusting the style control parameters of the generative model, the generated images are made consistent with real images in terms of texture representation, grayscale distribution, and defect morphology. After training, synthetic EL images containing various defect morphologies are generated by inputting latent vectors, thereby effectively expanding the coverage of the training data. The image fusion module performs feature similarity processing on the synthetic EL images. By comparing their feature consistency with real images, redundant or low-quality images are identified and eliminated. Valid samples are selected according to a preset similarity threshold. According to a preset data fusion ratio, the selected synthetic EL images are combined with the real image dataset. A balanced mixed training dataset is formed through random rearrangement, which ensures data authenticity and enhances the sample diversity. The diversity of data provides more comprehensive data support for model training. The feature extraction module pre-trains the target detection model based on photovoltaic electroluminescence image data, enabling it to extract features of local defects in solar cells. After pre-training, the model's state is converged to select stable models, and their parameters are solidified to ensure consistency and reliability of the model output. Network parameters are extracted from stable models as model weights for initialization during transfer learning, thus achieving effective inheritance of existing feature knowledge. The transfer learning module inputs the mixed training dataset into the target detection model and loads the pre-trained model weights as initialization parameters. During training, the model performs multiple processing on the input images... Scale feature extraction is performed, and the feature extraction network and detection head structure are collaboratively adjusted in conjunction with annotation information. This allows the model to gradually adapt to the feature representation requirements of large-scale structures and low-proportion defects in module-level images while retaining its ability to identify local defects. Through continuous training, the model completes the cross-level capability transfer from the cell level to the module level, ultimately forming a photovoltaic module defect detection model. The image detection module inputs the image to be detected into the trained photovoltaic module defect detection model. The model generates multi-scale feature maps through the feature extraction network and identifies potential defect regions through the detection head structure. Based on the feature response results, the defect category is determined, and the specific location of the defect in the image is obtained by combining the spatial mapping relationship between the feature map and the original image.The final output includes defect category information and corresponding spatial location information, achieving a structured representation of component defects. Through multi-module collaboration, a complete closed-loop processing flow from data construction to model training to defect detection is realized, thereby effectively improving the accuracy and reliability of photovoltaic module defect detection.
[0040] And, a photovoltaic module defect detection terminal based on image recognition, comprising: One or more processors; A storage device on which one or more programs are stored; When one or more programs are executed by one or more processors, the one or more processors implement a photovoltaic module defect detection method based on image recognition.
[0041] The above description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained in this invention are implemented according to conventional methods in the art unless otherwise specified or limited.
Claims
1. A method for detecting defects in photovoltaic modules based on image recognition, characterized in that, include: Acquire electroluminescence images of photovoltaic modules, preprocess the electroluminescence images to obtain a real image dataset; Based on real image datasets, a generative adversarial network is trained by transfer learning to obtain an image generation model for generating defect images of photovoltaic modules. Then, a synthetic EL image containing multiple defect morphologies is generated based on the image generation model. The synthetic EL images are processed for feature similarity, redundant images are removed according to a preset similarity threshold, and the processed synthetic EL images are fused with the real image dataset according to a preset ratio to obtain a hybrid training dataset. Obtain the target detection model pre-trained from the electroluminescence image dataset based on photovoltaic modules, and extract the model weights; The mixed training dataset is input into the target detection model, and the model weights are used as initialization parameters for transfer learning training. This adapts the target detection model from cell-level defect recognition to photovoltaic module-level defect detection tasks, resulting in a photovoltaic module defect detection model. The electroluminescent image of the photovoltaic module to be inspected is input into the photovoltaic module defect detection model to obtain the defect category information and the corresponding spatial location information.
2. The photovoltaic module defect detection method based on image recognition according to claim 1, characterized in that, Electroluminescence images of photovoltaic modules are acquired, and these images are preprocessed to obtain a dataset of real images, including: Acquire electroluminescence images of photovoltaic modules under energized conditions; The electroluminescent image is converted to grayscale and noise is suppressed to obtain the processed image. The processed image is labeled based on preset defect categories, which include black patches, black edges, broken grids, cracks, contamination, and inefficient patches, resulting in a labeled image. The labeled image is then subjected to data augmentation, which includes geometric transformation and brightness adjustment, to obtain the augmented image. The enhanced images are then organized and a real image dataset is constructed.
3. The photovoltaic module defect detection method based on image recognition according to claim 1, characterized in that, Based on a real image dataset, a generative adversarial network (GAN) is trained using transfer learning to obtain an image generation model for generating images of defects in photovoltaic modules. Synthetic EL images containing various defect morphologies are then generated based on this model, including: A generative adversarial network (GAN) pre-trained based on source domain image data is obtained, and the GAN is trained by transfer learning using a real image dataset as the target domain data to obtain an image generation model. The GAN is a StyleGAN3-t network with translation equivariance. During the transfer learning training process, the style control parameters in the generative adversarial network are adjusted to ensure that the structural features and defect texture features of the generated images are consistent with those of the real image dataset. Randomly sampled latent vectors are input into the trained image generation model to generate synthetic EL images containing various defect morphologies.
4. The photovoltaic module defect detection method based on image recognition according to claim 1, characterized in that, The synthesized EL images undergo feature similarity processing, redundant images are removed according to a preset similarity threshold, and the processed synthesized EL images are fused with the real image dataset according to a preset ratio to obtain a hybrid training dataset, including: Global and local texture features are extracted from the synthesized EL image. The global features include gray-level histogram features and frequency domain distribution features, while the local texture features include defect texture description features. The feature similarity between any two synthesized EL images is obtained based on global features and local texture features, resulting in a similarity matrix; The similarity matrix is filtered according to a preset similarity threshold. Images with similarity higher than the preset similarity threshold are identified as redundant samples. In the redundant sample set, samples with more obvious defect features and higher image quality are retained, and the remaining samples are removed to obtain the deredundant EL image set. The redundancy-removed EL image set is subjected to validity detection. Images with large areas of invalid background and the proportion of defect areas is lower than the preset defect area ratio are removed to obtain valid EL images. According to the preset data fusion ratio, the validity detection EL images are combined with the real image dataset to obtain combined image data; The combined image data is converted to a unified annotation format and augmented to obtain a hybrid training dataset.
5. The photovoltaic module defect detection method based on image recognition according to claim 4, characterized in that, Based on a preset data fusion ratio, the validity detection EL images are combined with the real image dataset to obtain combined image data, including: The number of target samples in the combined data is obtained based on the preset data fusion ratio, which is the real image dataset and the validity detection EL image. Based on the target sample size, proportional sampling is performed from the real image dataset and the validity detection EL image to obtain proportionally sampled real image data and validity detection EL image; The real image data sampled at the same scale and the validity detection EL image are randomly rearranged and combined to obtain the combined image data.
6. The photovoltaic module defect detection method based on image recognition according to claim 1, characterized in that, Obtain the target detection model pre-trained from the electroluminescence image dataset based on photovoltaic modules, and extract the model weights, including: A pre-trained target detection model based on the YOLOv9 architecture is constructed. The target detection model includes a programmable gradient information module and a generalized efficient layer aggregation network structure. The programmable gradient information module is used to maintain the complete transmission of gradient information and reduce information loss in deep networks during network training. The generalized efficient layer aggregation network structure is used to improve feature expression efficiency and multi-scale information fusion capability through cross-layer feature aggregation. The target pre-training detection model is pre-trained based on the electroluminescent images of photovoltaic modules, enabling the target pre-training detection model to have the ability to extract features of local defects in solar cells. After pre-training is completed, the parameter convergence of the target pre-trained detection model is determined, and the parameters of the model that meets the preset convergence conditions are solidified to obtain a stable target detection model. Network parameters are extracted from the object detection model and used as model weights.
7. The photovoltaic module defect detection method based on image recognition according to claim 1, characterized in that, The hybrid training dataset is input into the object detection model, and the model weights are used as initialization parameters for transfer learning training. This adapts the object detection model from cell-level defect identification capabilities to photovoltaic module-level defect detection tasks, resulting in a photovoltaic module defect detection model, including: The mixed training dataset is input into the object detection model, and the model weights are loaded into the object detection model as initialization parameters; During training, feature extraction is performed on the input electroluminescent image to obtain defect feature information at different scales; The feature extraction network parameters of the target detection model are updated based on defect feature information at different scales. Based on the annotation information in the hybrid training dataset, the detection head parameters of the object detection model are optimized and trained. A defect detection model for photovoltaic modules was obtained through transfer learning training.
8. The photovoltaic module defect detection method based on image recognition according to claim 1, characterized in that, The electroluminescence image of the photovoltaic module to be inspected is input into the photovoltaic module defect detection model to obtain the defect category information and corresponding spatial location information, including: Input the electroluminescence image of the photovoltaic module to be inspected into the photovoltaic module defect detection model; The photovoltaic module defect detection model encodes the features of the input electroluminescent image and generates the corresponding multi-scale feature map; Based on multi-scale feature maps, the defect target is classified by the detection head structure in the photovoltaic module defect detection model, and the spatial location of the defect target in the image is obtained. The output electroluminescent image contains category information and corresponding spatial location information for each defect target. The spatial location information includes the bounding box coordinates of the defect target, the defect category, and the confidence level.
9. A photovoltaic module defect detection system based on image recognition, applied to the photovoltaic module defect detection method based on image recognition as described in any one of claims 1 to 8, characterized in that, include: The image acquisition module is used to acquire electroluminescent images of photovoltaic modules, preprocess the electroluminescent images, and obtain a real image dataset. The image generation module trains a generative adversarial network using transfer learning based on a real image dataset to obtain an image generation model for generating images of defects in photovoltaic modules. Based on the image generation model, it generates synthetic EL images containing various defect morphologies. The image fusion module is used to process the feature similarity of the synthesized EL images, remove redundant images according to a preset similarity threshold, and fuse the processed synthesized EL images with the real image dataset according to a preset ratio to obtain a mixed training dataset. The feature extraction module is used to obtain the target detection model pre-trained from the electroluminescence image dataset based on photovoltaic modules and extract the model weights; The transfer learning module is used to input the mixed training dataset into the target detection model, and use the model weights as initialization parameters for transfer learning training, so that the target detection model can be adapted from the cell-level defect recognition capability to the photovoltaic module-level defect detection task, thus obtaining the photovoltaic module defect detection model. The image detection module is used to input the electroluminescent image of the photovoltaic module to be detected into the photovoltaic module defect detection model to obtain the defect category information and the corresponding spatial location information.
10. A photovoltaic module defect detection terminal based on image recognition, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When one or more programs are executed by one or more processors, the one or more processors implement the image recognition-based photovoltaic module defect detection method according to any one of claims 1 to 8.