A Deep Learning-Based Intelligent Defect Recognition Method and System for Photovoltaic Module EL Images, Storage Medium, and Electronic Terminal

By improving the heterogeneous fusion model of Transformer and YOLOv5, the problems of low efficiency and low accuracy in defect detection of traditional photovoltaic modules are solved, and efficient and accurate defect identification is achieved.

CN121147231BActive Publication Date: 2026-01-30CHINA CONSTRUCTION SIXTH ENGINEERING DIVISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511705517.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-01-30
Estimated Expiration
2045-11-20

AI Technical Summary

Technical Problem

Traditional photovoltaic module defect detection relies on manual visual inspection, which is inefficient and labor-intensive. Furthermore, existing image processing algorithms perform poorly in extracting complex defect features and suppressing background interference, making it difficult to meet the needs of large-scale, high-quality production and operation and maintenance.

Method used

A heterogeneous fusion model based on multivariate and multiscale improved Transformer and YOLOv5 is adopted. The backbone network is replaced by the Swin-IdentityFormer structure, and a parameterless attention module and spectral nonlocal block are introduced. Combined with the full-dimensional dynamic convolution structure, fine-grained feature enhancement and long-range dependency modeling are achieved. In the neck network, an attention pyramid module is used to perform multi-scale hierarchical fusion.

Benefits of technology

It significantly improves the accuracy of defect recognition in photovoltaic module EL images, solves the problems of missed detection of small targets and interference from complex environments, and realizes adaptive detection of defects at multiple scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147231B_ABST
    Figure CN121147231B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for intelligent defect recognition of photovoltaic module EL images based on deep learning, as well as a storage medium and electronic terminal. The defect recognition method includes the following steps: segmenting the acquired photovoltaic module EL image to obtain cell images; labeling the cell images with defect types to obtain defect images labeled with defect types; performing data augmentation on the defect images to obtain an augmented image set; training a heterogeneous fusion model based on a multi-scale, multi-dimensional improved Transformer and YOLOv5 using the augmented image set to obtain a trained model; and using the trained model for defect recognition. This invention achieves fine-grained feature enhancement with zero parameter overhead and long-range dependency modeling in complex backgrounds, significantly improving the ability to perceive details of small target defects, and achieving a significant improvement in recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for intelligent defect recognition of photovoltaic module EL images based on deep learning, as well as a storage medium and electronic terminal. Background Technology

[0002] Traditional photovoltaic (PV) module defect detection primarily relies on electroluminescent (EL) imaging technology, which can clearly reveal defects such as concentric circles, microcracks, and broken grids within the cells. However, current EL image analysis heavily depends on manual visual inspection, resulting in bottlenecks such as low efficiency, high labor intensity, strong subjectivity, and susceptibility to fatigue-induced missed detections. With the surge in PV production capacity, traditional methods are struggling to meet the demands of large-scale, high-quality production and maintenance. Although some traditional image processing algorithms have been attempted for automated inspection, their feature extraction capabilities are limited, performing poorly in complex defect feature extraction, background interference suppression, and generalization, making it difficult to handle complex scenes with diverse defect morphologies and significant contrast differences in EL images. In recent years, deep convolutional neural networks (CNNs) have made groundbreaking progress in computer vision. Their powerful end-to-end feature learning and transfer capabilities provide a novel solution to these challenges, driving research in this field to evolve from traditional methods to deep learning-based artificial intelligence recognition methods. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for intelligent defect recognition of photovoltaic module EL images based on deep learning, as well as a storage medium and electronic terminal, thereby improving the accuracy of identifying defects in photovoltaic module EL images.

[0004] To achieve the objectives of this invention, the specific technical solution provided by this invention is as follows:

[0005] First aspect

[0006] This application provides a deep learning-based intelligent defect recognition method for photovoltaic module EL images, comprising the following steps:

[0007] Step S1: Crop the acquired photovoltaic module EL image to obtain the cell image;

[0008] Step S2: Mark the defect types on the battery cell image to obtain a defect image marked with defect types. The defect types include concentric circles, black edges, hidden cracks, broken grids, black cores and black spots, and missing corners.

[0009] Step S3: Perform data augmentation on the defective image to obtain an enhanced image set;

[0010] Step S4: Using the image set after data augmentation, train the heterogeneous fusion model of the improved Transformer and YOLOv5 based on multivariate multiscale to obtain the trained model.

[0011] The heterogeneous fusion model based on the improved Transformer and YOLOv5 with multi-scale and multi-dimensional features includes: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction; the backbone network includes multiple parameter-free attention modules, multiple spectral nonlocal blocks, and one attention pyramid module; the neck network adopts a full-dimensional dynamic convolution structure.

[0012] Step S5: Use the trained model to identify defects.

[0013] Furthermore, the heterogeneous fusion model based on multi-scale and multi-dimensional improved Transformer and YOLOv5 specifically includes the following: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction.

[0014] The backbone network comprises, in sequence, a Patch Partition module for segmenting images in the input enhanced image set to form a one-dimensional vector; a Linear Embedding layer for forming an initial token sequence from the one-dimensional vector; a feature extraction module group for forming a first feature map from the token sequence; a Patch Merging layer for performing a 2x downsampling on the first feature map; a feature extraction module group for forming a second feature map; a Patch Merging layer for performing a 2x downsampling on the second feature map; a feature extraction module group for forming a third feature map; a Patch Merging layer for performing a 2x downsampling on the third feature map; an Identity Former layer for deep feature extraction and outputting a fourth feature map; and an attention pyramid module for constructing global attention features from the fourth feature map and outputting a fifth feature map. Each feature extraction module group includes, from top to bottom, two Swing Blocks, one parameterless attention module, and one spectral nonlocal block.

[0015] The neck network includes one bottom-up path and one top-down path. The bottom-up path comprises a first front feature fusion module group, a second front feature fusion module group, a third front feature fusion module group, and a fourth front feature fusion module group, connected sequentially. Each of these four modules includes a bottom-up, sequentially connected buttleneck CSP, an ODConv, an upsampling module, and a Concat module. The first feature map generated by the backbone network is input to the Concat module of the fourth front feature fusion module group; the second feature map generated by the backbone network is input to the Concat module of the third front feature fusion module group; and the third feature map generated by the backbone network is input to the Concat module of the second front feature fusion module group.

[0016] The fourth and fifth feature maps generated by the backbone network are input to the Concat and buttleneck CSP of the first pre-feature fusion module group. The top-down path includes a first post-feature fusion module group, a second post-feature fusion module group, a third post-feature fusion module group, and a buttleneck CSP connected sequentially. Each of the first, second, and third post-feature fusion module groups includes a buttleneck CSP, an ODConv, and a Concat connected sequentially from top to bottom. The feature map output from the Concat of the fourth pre-feature fusion module group is input to the buttleneck CSP of the first post-feature fusion module group; the feature map output from the ODConv of the fourth pre-feature fusion module group is input to the Concat of the first post-feature fusion module group; the feature map output from the ODConv of the third pre-feature fusion module group is input to the Concat of the second post-feature fusion module group; the feature map output from the ODConv of the second pre-feature fusion module group is input to the Concat of the third post-feature fusion module group; and the feature map output from the third post-feature fusion module group is input to the buttleneck CSP connected to it.

[0017] The head network includes four parallel YOLO Heads. The buttleneck CSPs of the first post-feature fusion module group, the second post-feature fusion module group, and the third post-feature fusion module group, as well as the buttleneck CSP connected to the third post-feature fusion module group, are each connected to the corresponding YOLO Head through a Conv.

[0018] Furthermore, in step S3, the defect image is augmented using the data augmentation strategy built into YOLOv5.

[0019] Furthermore, the Linear Embedding layer forms an initial token sequence by projecting a one-dimensional vector onto a 96-dimensional feature space.

[0020] Second aspect

[0021] Corresponding to the above method, this application provides a deep learning-based intelligent defect recognition system for photovoltaic module EL images, including the following units: a cutting unit, a defect type labeling unit, a data augmentation unit, a model training unit, and a recognition unit;

[0022] The cutting unit is used to cut the acquired photovoltaic module EL image to obtain the cell image;

[0023] The defect type labeling unit is used to label the battery cell image with defect types to obtain a defect image with labeled defect types. The defect types include concentric circles, black edges, as well as hidden cracks, broken grids, black cores and black spots, and missing corners.

[0024] The data augmentation unit is used to perform data augmentation on the defective image to obtain an enhanced image set;

[0025] The model training unit is used to train a heterogeneous fusion model of improved Transformer and YOLOv5 based on multi-scale and multi-dimensional images using the data augmentation image set, so as to obtain the trained model.

[0026] The heterogeneous fusion model based on the improved Transformer and YOLOv5 with multi-scale and multi-dimensional features includes: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction; the backbone network includes multiple parameter-free attention modules, multiple spectral nonlocal blocks, and one attention pyramid module; the neck network adopts a full-dimensional dynamic convolution structure.

[0027] The identification unit is used to identify defects using the trained model.

[0028] Furthermore, the heterogeneous fusion model based on multi-scale and multi-dimensional improved Transformer and YOLOv5 specifically includes the following: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction.

[0029] The backbone network comprises, in sequence, a Patch Partition module for segmenting images in the input enhanced image set to form a one-dimensional vector; a Linear Embedding layer for forming an initial token sequence from the one-dimensional vector; a feature extraction module group for forming a first feature map from the token sequence; a Patch Merging layer for performing a 2x downsampling on the first feature map; a feature extraction module group for forming a second feature map; a Patch Merging layer for performing a 2x downsampling on the second feature map; a feature extraction module group for forming a third feature map; a Patch Merging layer for performing a 2x downsampling on the third feature map; an Identity Former layer for deep feature extraction and outputting a fourth feature map; and an attention pyramid module for constructing global attention features from the fourth feature map and outputting a fifth feature map. Each feature extraction module group includes, from top to bottom, two Swing Blocks, one parameterless attention module, and one spectral nonlocal block.

[0030] The neck network includes one bottom-up path and one top-down path. The bottom-up path comprises a first front feature fusion module group, a second front feature fusion module group, a third front feature fusion module group, and a fourth front feature fusion module group, connected sequentially. Each of these four modules includes a bottom-up, sequentially connected buttleneck CSP, an ODConv, an upsampling module, and a Concat module. The first feature map generated by the backbone network is input to the Concat module of the fourth front feature fusion module group; the second feature map generated by the backbone network is input to the Concat module of the third front feature fusion module group; and the third feature map generated by the backbone network is input to the Concat module of the second front feature fusion module group.

[0031] The fourth and fifth feature maps generated by the backbone network are input to the Concat and buttleneck CSP of the first pre-feature fusion module group. The top-down path includes a first post-feature fusion module group, a second post-feature fusion module group, a third post-feature fusion module group, and a buttleneck CSP connected sequentially. Each of the first, second, and third post-feature fusion module groups includes a buttleneck CSP, an ODConv, and a Concat connected sequentially from top to bottom. The feature map output from the Concat of the fourth pre-feature fusion module group is input to the buttleneck CSP of the first post-feature fusion module group; the feature map output from the ODConv of the fourth pre-feature fusion module group is input to the Concat of the first post-feature fusion module group; the feature map output from the ODConv of the third pre-feature fusion module group is input to the Concat of the second post-feature fusion module group; the feature map output from the ODConv of the second pre-feature fusion module group is input to the Concat of the third post-feature fusion module group; and the feature map output from the third post-feature fusion module group is input to the buttleneck CSP connected to it.

[0032] The head network includes four parallel YOLO Heads. The buttleneck CSPs of the first post-feature fusion module group, the second post-feature fusion module group, and the third post-feature fusion module group, as well as the buttleneck CSP connected to the third post-feature fusion module group, are each connected to the corresponding YOLO Head through a Conv.

[0033] Furthermore, the defective image is augmented using the data augmentation strategies built into YOLOv5.

[0034] Furthermore, the Linear Embedding layer forms an initial token sequence by projecting a one-dimensional vector onto a 96-dimensional feature space.

[0035] Third aspect

[0036] This application provides a storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the aforementioned intelligent defect recognition method for photovoltaic module EL images based on deep learning.

[0037] Fourth aspect

[0038] This application provides an electronic terminal, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set are loaded and executed by the processor to implement the aforementioned intelligent defect recognition method for photovoltaic module EL images based on deep learning.

[0039] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0040] This invention proposes a heterogeneous fusion model based on a multi-scale, multi-dimensional improved Transformer and YOLOv5. By replacing the backbone network with a Swin-IdentityFormer structure, and embedding a parameterless attention module SimAM and a spectral nonlocal block SNL sequentially after the outputs of its first three layers, fine-grained feature enhancement with zero parameter overhead and long-range dependency modeling in complex backgrounds are achieved, respectively. Furthermore, an attention pyramid module APM is introduced at the end of the backbone network, significantly improving the detail perception capability of small target defects through a multi-scale hierarchical fusion mechanism. Finally, a full-dimensional dynamic convolution ODConv is used to completely replace conventional convolutions in the neck network, adaptively adjusting the convolution kernel weights through a multi-dimensional attention mechanism. Using this structure for defect recognition, a significant improvement in recognition accuracy is achieved on a self-built six-class defect dataset, effectively solving key problems such as missed detection of small targets in industrial scenarios, interference from complex environments, and adaptive detection of multi-scale defects. Attached Figure Description

[0041] Figure 1 A schematic flowchart of a photovoltaic module EL image intelligent defect recognition method based on deep learning provided in an embodiment of this application;

[0042] Figure 2 A schematic diagram of the structure of the heterogeneous fusion model of the improved Transformer and YOLOv5 based on multi-scale and multi-dimensional models provided in this application embodiment;

[0043] Figure 3 To compare the model in this application with the baseline model on the same dataset, a schematic diagram of the loss function of the two models is shown.

[0044] Figure 4 This is a schematic diagram showing the mean accuracy (mAP) of the model in this application and the baseline model after 800 generations of training. Detailed Implementation

[0045] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0046] like Figure 1 As shown, this embodiment presents a deep learning-based intelligent defect recognition method for photovoltaic module EL images, comprising the following steps:

[0047] Step S1: The acquired photovoltaic module EL image is segmented, and each photovoltaic module EL image is used to obtain multiple cell images;

[0048] Step S2: In the obtained solar cell images, select solar cell images with defects and mark them. There are 6 types of defects to mark: concentric circles, black edges, hidden cracks, broken grids, black cores and black spots, and missing corners. Finally, multiple defect images are obtained.

[0049] Step S3: The data distribution after screening is uneven. In order to improve the generalization ability and robustness of the model, the data augmentation strategy built into YOLOv5 is adopted. During the training process, the parameters of the defective images are dynamically adjusted, including image color hue and saturation processing, image rotation, flipping, scaling, image mosaic processing, and image cropping and stitching, and finally the image set after data augmentation is obtained.

[0050] Step S4: Input the image set after data augmentation into the heterogeneous fusion model based on multivariate multiscale improved Transformer and YOLOv5 to train the model and obtain the trained model.

[0051] The heterogeneous fusion model based on the improved Transformer and YOLOv5 with multi-scale and multi-dimensional features includes: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction; the backbone network includes multiple parameter-free attention modules, multiple spectral nonlocal blocks, and one attention pyramid module; the neck network adopts a full-dimensional dynamic convolution structure.

[0052] like Figure 2 As shown, the heterogeneous fusion model based on multi-scale improved Transformer and YOLOv5 specifically includes the following: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction.

[0053] The backbone network comprises, in sequence, a Patch Partition module for segmenting images in the input enhanced image set to form a one-dimensional vector; a Linear Embedding layer for forming an initial token sequence from the one-dimensional vector; a feature extraction module group for forming a first feature map from the token sequence; a Patch Merging layer for performing a 2x downsampling on the first feature map; a feature extraction module group for forming a second feature map; a Patch Merging layer for performing a 2x downsampling on the second feature map; a feature extraction module group for forming a third feature map; a Patch Merging layer for performing a 2x downsampling on the third feature map; an Identity Former layer for deep feature extraction and outputting a fourth feature map; and an attention pyramid module for constructing global attention features from the fourth feature map and outputting a fifth feature map. Each feature extraction module group includes, from top to bottom, two Swing Blocks, one parameterless attention module, and one spectral nonlocal block.

[0054] It should be noted that the following data processing is performed in the backbone network:

[0055] Initial processing: The images in the input enhanced image set first pass through a PatchPartition module, which divides them into a series of non-overlapping 4x4 pixel blocks and flattens these blocks into one-dimensional vectors;

[0056] Subsequently, a Linear Embedding layer projects these vectors into a 96-dimensional feature space to form the initial token sequence.

[0057] Hierarchical Feature Extraction Stages 1-3: This part of the network comprises three similar feature extraction stages. In each stage, the feature map is first downsampled by a factor of 2 through a Patch Merging layer (except for the first stage). Then, the data flows through a feature extraction module group consisting of two Swin Blocks, one parameterless attention module (SimAM), and one spectral nonlocal block (SNL). The Swin Blocks are responsible for efficiently extracting local and cross-window contextual information. Next, the SimAM module generates 3D attention weights without additional parameters, allowing the network to focus on fine-grained key discriminative features. Finally, the SNL module, operating in the frequency domain, effectively captures long-range dependencies globally, which is crucial for identifying irregularly shaped or widely distributed defects. The feature maps processed in each stage (three sets in total) are then fed into the neck network for subsequent fusion.

[0058] The fourth stage, deep feature refinement: After the third downsampling, the feature maps enter the final stage consisting of Identity Former and Attention Pyramid (APM) modules. Identity Former performs deep refinement on the feature maps, outputting the refined feature maps, while APM simulates the human perception process from coarse to fine, constructing hierarchical global attention features to output further processed feature maps, significantly enhancing the model's ability to perceive minute defects (such as hidden cracks). The feature maps output in this stage are also fed into the neck network.

[0059] The neck network comprises a bottom-up path and a top-down path. The bottom-up path includes a first, second, third, and fourth front feature fusion module group connected sequentially. Each of these modules includes a bottom-up buttleneck CSP, an ODConv, an upsampling module, and a concat module, all connected sequentially from bottom to top. The first feature map generated by the backbone network is input to the concat module of the fourth front feature fusion module group; the second feature map generated by the backbone network is input to the concat module of the third front feature fusion module group; the third feature map generated by the backbone network is input to the concat module of the second front feature fusion module group; and the fourth and fifth feature maps generated by the backbone network are input to the concat module of the first front feature fusion module group and the buttleneck module. CSP; wherein, the top-down path includes a first post-feature fusion module group, a second post-feature fusion module group, a third post-feature fusion module group, and a buttleneck CSP connected in sequence, the first post-feature fusion module group, the second post-feature fusion module group, and the third post-feature fusion module group each include a buttleneck CSP, an ODConv, and a Concat connected in sequence from top to bottom; the feature map output by the Concat of the fourth pre-feature fusion module group is input to the buttleneck CSP of the first post-feature fusion module group, the feature map output by the ODConv of the fourth pre-feature fusion module group is input to the Concat of the first post-feature fusion module group, the feature map output by the ODConv of the third pre-feature fusion module group is input to the Concat of the second post-feature fusion module group, the feature map output by the ODConv of the second pre-feature fusion module group is input to the Concat of the third post-feature fusion module group, and the feature map output by the third post-feature fusion module group is input to the buttleneck CSP connected to it;

[0060] It should be noted that the four feature maps of different scales extracted by the backbone network are fed into the improved PANet neck structure. The neck structure contains a top-down path and a bottom-up path. During feature fusion, all standard convolutional layers are replaced by full-dimensional dynamic convolution ODConv. ODConv can dynamically generate convolutional kernel weights from multiple dimensions such as space, input channels, and output channels based on input features. This allows the network to flexibly adapt to the various morphological and sizing defect features in the EL images of photovoltaic modules, significantly improving the model's feature adaptability.

[0061] The head network includes four parallel YOLO Heads. The buttleneck CSPs of the first post-feature fusion module group, the second post-feature fusion module group, and the third post-feature fusion module group, as well as the buttleneck CSP connected to the third post-feature fusion module group, are each connected to the corresponding YOLO Head through a Conv.

[0062] It should be noted that the four-way fused feature map output from the neck network is ultimately fed into four parallel YOLO Heads. Each YOLO Head is responsible for defect detection at a specific scale. Through the final 1x1 convolutional layer, the network predicts the defect category, confidence level, and bounding box coordinates at each grid location in the feature map. Through this multi-scale detection mechanism, the model can simultaneously and accurately locate defects such as large-area black cores and dark spots as well as subtle hidden cracks.

[0063] Step S5: Use the trained model to identify defects.

[0064] The model in this application will be compared with the current mainstream method SwinIdentity-YOLO (Baseline model) below. Under the same dataset, the loss functions of the two models are as follows: Figure 3 As shown. Observing the loss functions of the two models, it can be seen that the loss function of the improved model in this application converges faster.

[0065] After 800 generations of training, the mean average accuracy (mAP) of the model in this application and the SwinIdentity-YOLO (baseline model) is as follows: Figure 4 As shown.

[0066] The average accuracy (AP) of various defects under the model of this application and the SwinIdentity-YOLO (baseline model) is compared in Table 1 below.

[0067] Table 1

[0068] ;

[0069] Corresponding to the above method, this application provides a deep learning-based intelligent defect recognition system for photovoltaic module EL images, including the following units: a cutting unit, a defect type labeling unit, a data augmentation unit, a model training unit, and a recognition unit;

[0070] The cutting unit is used to cut the acquired photovoltaic module EL image to obtain the cell image;

[0071] The defect type labeling unit is used to label the battery cell image with defect types to obtain a defect image with labeled defect types. The defect types include concentric circles, black edges, as well as hidden cracks, broken grids, black cores and black spots, and missing corners.

[0072] The data augmentation unit is used to perform data augmentation on the defective image to obtain an enhanced image set;

[0073] The model training unit is used to train a heterogeneous fusion model of improved Transformer and YOLOv5 based on multi-scale and multi-dimensional images using the data augmentation image set, so as to obtain the trained model.

[0074] The heterogeneous fusion model based on the improved Transformer and YOLOv5 with multi-scale and multi-dimensional features includes: a backbone network for feature extraction, a neck network for multi-scale feature fusion, and a head network for defect prediction; the backbone network includes multiple parameter-free attention modules, multiple spectral nonlocal blocks, and one attention pyramid module; the neck network adopts a full-dimensional dynamic convolution structure.

[0075] The identification unit is used to identify defects using the trained model.

[0076] This application also provides a storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the aforementioned intelligent defect recognition method for photovoltaic module EL images based on deep learning.

[0077] This application also provides an electronic terminal, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the aforementioned intelligent defect recognition method for photovoltaic module EL images based on deep learning.

[0078] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention.

Claims

1. A deep learning-based photovoltaic module EL image intelligent defect recognition method, characterized by, The method comprises the following steps: Step S1: cutting the collected photovoltaic module EL image to obtain a cell image; Step S2: labeling the cell image to obtain a defect image labeled with a defect type, wherein the defect type includes concentric circles, black edges, and hidden cracks, broken grids, black core black spots, and missing corners; Step S3: performing data enhancement on the defect image to obtain an image set after enhancement processing; Step S4: training an improved Transformer and YOLOv5 heterogeneous fusion model based on multi-element and multi-scale using the image set after data enhancement processing, to obtain a trained model; The improved Transformer and YOLOv5 heterogeneous fusion model based on multi-element and multi-scale comprises a backbone network Backbone for feature extraction, a neck network Neck for multi-scale feature fusion, and a head network Head for defect prediction; the backbone network Backbone comprises a plurality of non-parametric attention modules and a plurality of spectral non-local blocks, and one attention pyramid module; the neck network Neck adopts a full-dimensional dynamic convolution structure; Step S5: using the trained model to perform defect recognition; The improved Transformer and YOLOv5 heterogeneous fusion model based on multi-element and multi-scale comprises the following: a backbone network Backbone for feature extraction, a neck network Neck for multi-scale feature fusion, and a head network Head for defect prediction; The backbone network Backbone comprises a Patch Partition module connected in sequence for segmenting images in the image set after enhancement processing and finally forming a one-dimensional vector, a Linear Embedding layer for forming an initial Token sequence according to the one-dimensional vector, a feature extraction module group for forming a first feature map according to the Token sequence, a Patch Merging layer for 2 times down-sampling according to the first feature map, a feature extraction module group for forming a second feature map, a Patch Merging layer for 2 times down-sampling according to the second feature map, a feature extraction module group for forming a third feature map, a Patch Merging layer for 2 times down-sampling according to the third feature map, an Identity Former layer for deep refining features and outputting a fourth feature map, and an attention pyramid module for constructing global attention features according to the fourth feature map and outputting a fifth feature map; all feature extraction module groups respectively comprise two Swin Blocks, one non-parametric attention module, and one spectral non-local block connected in sequence from top to bottom. ​ The neck network Neck includes one bottom-up path and one top-down path; wherein the one bottom-up path includes a first front feature fusion module group, a second front feature fusion module group, a third front feature fusion module group and a fourth front feature fusion module group connected in sequence, the first front feature fusion module group, the second front feature fusion module group, the third front feature fusion module group and the fourth front feature fusion module group each include a buttleneck CSP, an ODConv, an up-sampling and a Concat connected in sequence from bottom to top; wherein the first feature map generated by the backbone network Backbone is input to the Concat of the fourth front feature fusion module group; the second feature map generated by the backbone network Backbone is input to the Concat of the third front feature fusion module group; the third feature map generated by the backbone network Backbone is input to the Concat of the second front feature fusion module group; the fourth feature map and the fifth feature map generated by the backbone network Backbone are input to the Concat and the buttleneck CSP of the first front feature fusion module group; wherein the one top-down path includes a first rear feature fusion module group, a second rear feature fusion module group, a third rear feature fusion module group and a buttleneck CSP connected in sequence, the first rear feature fusion module group, the second rear feature fusion module group and the third rear feature fusion module group each include a buttleneck CSP, an ODConv and a Concat connected in sequence from top to bottom; the feature map output by the Concat of the fourth front feature fusion module group is input to the buttleneck CSP of the first rear feature fusion module group, the feature map output by the ODConv of the fourth front feature fusion module group is input to the Concat of the first rear feature fusion module group, the feature map output by the ODConv of the third front feature fusion module group is input to the Concat of the second rear feature fusion module group, the feature map output by the ODConv of the second front feature fusion module group is input to the Concat of the third rear feature fusion module group, and the feature map output by the third rear feature fusion module group is input to the buttleneck CSP connected thereto. The head network Head includes four parallel YOLO Heads, the buttleneck CSPs of the first rear feature fusion module group, the second rear feature fusion module group and the third rear feature fusion module group and the buttleneck CSP connected to the third rear feature fusion module group are connected to the corresponding YOLO Heads through a Conv respectively. 2.The deep learning-based photovoltaic module EL image intelligent defect recognition method according to claim 1, characterized in that, In step S3, the defect image is subjected to data enhancement by using the data enhancement strategy provided by YOLOv5. 3.The deep learning-based photovoltaic module EL image intelligent defect recognition method according to claim 1, characterized in that, The Linear Embedding layer projects a one-dimensional vector into a 96-dimensional feature space to form an initial Token sequence.

4. A deep learning-based photovoltaic module EL image intelligent defect recognition system, characterized in that, The method comprises the following units: a cutting unit, a defect type labeling unit, a data enhancement unit, and a model training unit and an identification unit. The cutting unit is configured to cut the collected photovoltaic module EL image to obtain a cell piece image. The defect type labeling unit is configured to label the defect type of the cell piece image to obtain a defect image labeled with the defect type. The defect type includes concentric circles, black edges, and hidden cracks, broken grids, black core black spots, and missing corners. The data enhancement unit is configured to perform data enhancement on the defect image to obtain an enhanced image set. The model training unit is configured to train an improved Transformer and YOLOv5 heterogeneous fusion model based on multi-element and multi-scale using the enhanced image set to obtain a trained model. The improved Transformer and YOLOv5 heterogeneous fusion model based on multi-element and multi-scale comprises a backbone network Backbone for feature extraction, a neck network Neck for multi-scale feature fusion, and a head network Head for defect prediction. The backbone network Backbone comprises a plurality of parameter-free attention modules and a plurality of spectral non-local blocks, and one attention pyramid module. The neck network Neck adopts a full-dimensional dynamic convolution structure. The identification unit is configured to perform defect identification using the trained model. The improved Transformer and YOLOv5 heterogeneous fusion model based on multi-element and multi-scale comprises the following: a backbone network Backbone for feature extraction, a neck network Neck for multi-scale feature fusion, and a head network Head for defect prediction. The backbone network Backbone comprises a Patch Partition module connected in sequence for segmenting images in the enhanced image set to finally form a one-dimensional vector, a Linear Embedding layer for forming an initial Token sequence according to the one-dimensional vector, a feature extraction module group for forming a first feature map according to the Token sequence, a Patch Merging layer for 2 times down-sampling according to the first feature map, a feature extraction module group for forming a second feature map, a Patch Merging layer for 2 times down-sampling according to the second feature map, a feature extraction module group for forming a third feature map, a Patch Merging layer for 2 times down-sampling according to the third feature map, an Identity Former layer for deep refining features and outputting a fourth feature map, and an attention pyramid module for constructing global attention features according to the fourth feature map and outputting a fifth feature map. All feature extraction module groups respectively comprise two Swin Blocks, one parameter-free attention module, and one spectral non-local block connected in sequence from top to bottom. The neck network Neck includes one bottom-up path and one top-down path; wherein the one bottom-up path includes a first front feature fusion module group, a second front feature fusion module group, a third front feature fusion module group and a fourth front feature fusion module group connected in sequence, the first front feature fusion module group, the second front feature fusion module group, the third front feature fusion module group and the fourth front feature fusion module group each include a buttleneck CSP, an ODConv, an up-sampling and a Concat connected in sequence from bottom to top; wherein a first feature map generated by the backbone network Backbone is input to the Concat of the fourth front feature fusion module group, a second feature map generated by the backbone network Backbone is input to the Concat of the third front feature fusion module group, a third feature map generated by the backbone network Backbone is input to the Concat of the second front feature fusion module group, and a fourth feature map and a fifth feature map generated by the backbone network Backbone are input to the Concat and the buttleneck CSP of the first front feature fusion module group; wherein the one top-down path includes a first rear feature fusion module group, a second rear feature fusion module group, a third rear feature fusion module group and a buttleneck CSP connected in sequence, the first rear feature fusion module group, the second rear feature fusion module group and the third rear feature fusion module group each include a buttleneck CSP, an ODConv and a Concat connected in sequence from top to bottom; a feature map output by the Concat of the fourth front feature fusion module group is input to the buttleneck CSP of the first rear feature fusion module group, a feature map output by the ODConv of the fourth front feature fusion module group is input to the Concat of the first rear feature fusion module group, a feature map output by the ODConv of the third front feature fusion module group is input to the Concat of the second rear feature fusion module group, a feature map output by the ODConv of the second front feature fusion module group is input to the Concat of the third rear feature fusion module group, and a feature map output by the third rear feature fusion module group is input to the buttleneck CSP connected thereto. The head network Head includes four parallel YOLO Heads, the buttleneck CSPs of the first rear feature fusion module group, the second rear feature fusion module group and the third rear feature fusion module group and the buttleneck CSP connected to the third rear feature fusion module group are connected to the corresponding YOLO Heads through a Conv respectively.

5. The deep learning-based photovoltaic module EL image intelligent defect recognition system according to claim 4, characterized in that, The defect images are subjected to data enhancement by using a data enhancement strategy provided by YOLOv5.

6. The deep learning-based photovoltaic module EL image intelligent defect recognition system according to claim 4, characterized in that, The Linear Embedding layer forms an initial Token sequence by projecting a one-dimensional vector to a 96-dimensional feature space.

7. A storage medium, characterized by The storage medium stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the deep learning-based photovoltaic module EL image intelligent defect identification method in any one of claims 1-3.

8. An electronic terminal, characterized in that The electronic terminal comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the deep learning-based photovoltaic module EL image intelligent defect identification method in any one of claims 1-3.

Citation Information

Patent Citations

  • ViT-YOLOX-Dynamic Head-based cattle face image dynamic detection and tracking method

    CN119559669A

  • Coordinated multi-scale feature enhancement network-based driving scene multi-task perception method

    CN120564151A