A photovoltaic panel defect detection method and detector based on enhanced feature extraction
Patent Information
- Application Number
- CN202410768089.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2044-06-14
AI Technical Summary
然而,直接将YOLOX应用于光伏面板缺陷检测,尤其是适配到便携式EL检测仪上,仍面临一系列挑战
[0035](1)针对某些微小或复杂类型的缺陷识别能力较弱的问题,本发明建立在深度学习目标检测框架YOLOX-Tiny的基础之上进行优化和增强,通过在主干网络在特征提取时采用大卷积核的深度可分离卷积层扩大感受野,捕获更多的上下文信息,以增强对复杂和大型缺陷的识别能力,且采用的多尺度特征融合模块进行多尺度地融合,使得本发明能够有效地捕捉光伏面板缺陷的细微特征和上下文信息,从而提升方法对各类缺陷的识别能力,提高缺陷检测的准确率。
Smart Images

Figure CN118747736B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic panel defect detection technology, and in particular to a photovoltaic panel defect detection method and instrument based on enhanced feature extraction. Background Technology
[0002] With the transformation of the global energy structure and the rapid development of renewable energy, photovoltaic (PV) technology, as a clean and sustainable energy form, has been widely used globally. The construction and operation of PV power plants are crucial for ensuring the stability of energy supply, reducing environmental pollution, and promoting sustainable economic development. However, PV panels, as the core components of PV power plants, are exposed to the natural environment for extended periods and are susceptible to defects such as cracks, stains, and hot spots. These defects not only reduce the power generation efficiency of PV panels but may also pose safety hazards. Therefore, timely and accurate defect detection of PV panels is essential.
[0003] Traditional methods for detecting defects in photovoltaic panels mainly rely on manual inspection and simple image processing techniques. While manual inspection is intuitive, it is inefficient and easily affected by human factors and environmental conditions, making it difficult to guarantee accuracy and consistency. Simple image processing techniques often have limited ability to identify complex and minute defects, failing to meet the operation and maintenance needs of large-scale photovoltaic power plants, especially those in remote areas. Therefore, developing an efficient, accurate, and portable automatic method for detecting defects in photovoltaic panels has become a current research hotspot and challenge.
[0004] In recent years, deep learning technology has made groundbreaking progress in the field of computer vision, providing strong technical support for tasks such as object detection and image segmentation. YOLOX, as an advanced deep learning object detection method, has been widely used in various fields due to its high efficiency and flexibility. However, directly applying YOLOX to photovoltaic panel defect detection, especially adapting it to portable EL inspection instruments, still faces a series of challenges. On the one hand, photovoltaic panel defects are diverse in type and form, placing higher demands on the method's feature extraction capabilities; on the other hand, portable devices impose strict limitations on the number of parameters and computational complexity of the method, requiring the method to maintain high performance while being lightweight. Summary of the Invention
[0005] The purpose of this invention is to provide a photovoltaic panel defect detection method and instrument based on enhanced feature extraction to improve detection accuracy.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] A photovoltaic panel defect detection method based on enhanced feature extraction includes the following steps:
[0008] The image data of the photovoltaic panel to be detected is acquired, preprocessed, and input into a pre-trained defect detection model to output the defect detection result. The defect detection model is constructed based on the improved YOLOX-Tiny model and includes a backbone network, a multi-scale feature fusion network, and a head prediction layer. The backbone network includes a basic convolutional module, a CSPlayer feature extraction module, a multi-scale feature extraction module, and a bottleneck layer. The basic convolutional module, the CSPlayer feature extraction module, and the multi-scale feature extraction module all include depthwise separable convolutional layers with 7×7 large convolutional kernels.
[0009] The defect detection model includes the following steps:
[0010] The preprocessed photovoltaic panel image data is sequentially input into the basic convolution module and the CSPlayer feature extraction module for processing, and preliminary key features at different scales are extracted.
[0011] The initial key features at different scales are sequentially fed into the input base convolution module and the CSPlayer feature extraction module for processing to extract further key features at different scales.
[0012] The key features at different scales are then sequentially input into the multi-scale feature extraction module and the bottleneck layer for processing to extract the final key features at different scales.
[0013] The initial key features at different scales, the further key features at different scales, and the final key features at different scales are input into the multi-scale feature fusion network for feature fusion to obtain fused features.
[0014] The fused features are input into the Head prediction layer for classification and regression, and the defect detection results are output.
[0015] Furthermore, Focus processing technology is used to preprocess the photovoltaic panel image data to be detected in order to remove noise.
[0016] Furthermore, the basic convolutional module also includes a normalization layer and an activation function layer connected to the depthwise separable convolutional layer.
[0017] Furthermore, the multi-scale feature fusion network includes a channel attention mechanism module and a fusion module, and the step of obtaining the fused features includes:
[0018] The initial key features at different scales, the further key features at different scales, and the final key features at different scales are respectively input into the channel attention mechanism module for processing, so as to enhance useful features and suppress irrelevant information;
[0019] The initial key features at different scales, the further key features at different scales, and the final key features at different scales processed by the channel attention mechanism module are input into the fusion module for feature fusion to obtain fused features.
[0020] Furthermore, the fusion module includes a convolutional layer, an upsampling layer, a CSPlayer feature extraction module, and a downsampling layer. The steps performed by the fusion module include:
[0021] The final key features at different scales processed by the channel attention mechanism module are sequentially input into the convolutional layer and upsampling layer for processing, and then fused for the first time with the further key features at different scales processed by the channel attention mechanism module in the CSPLAYer feature extraction module.
[0022] The first fusion result is sequentially input into the convolutional layer and upsampling layer for processing, and then fused with the preliminary key features of different scales processed by the channel attention mechanism module in the CSPlayer feature extraction module to obtain the second fused feature.
[0023] The second fusion feature is input into the downsampling layer for processing, and then fused with the first fusion result after processing by the convolutional layer and the upsampling layer in the CSPlayer feature extraction module for a third fusion to obtain the third fusion feature.
[0024] The third fused feature is input into the sampling layer for processing, and then fused a fourth time with the final key features of different scales after processing by the convolutional layer and the upsampling layer in the CSPLAYer feature extraction module to obtain the final fused feature.
[0025] Furthermore, the training steps of the defect detection model include:
[0026] Acquire an image dataset of photovoltaic panels, the image dataset including image data of normal panels and image data of panels with various types of defects;
[0027] The image dataset is preprocessed and the images are labeled.
[0028] The preprocessed and annotated image dataset is input into the defect detection model, which outputs the defect detection results of the photovoltaic panel.
[0029] The loss function is constructed based on the defect detection results and corresponding image annotations, and iterative optimization is performed using optimization methods including stochastic gradient descent and Adam optimizer until the loss function converges, thus completing the training process of the defect detection model.
[0030] Furthermore, the preprocessing of the image dataset includes denoising, enhancement, and normalization.
[0031] Furthermore, the loss function is either the cross-entropy loss function or the mean squared error loss function.
[0032] Furthermore, the Head prediction layer is a decoupled head design, which processes the fused features through convolution to obtain defect detection results, including various defect types and their locations.
[0033] The present invention also provides a portable EL inspection instrument, including one or more processors, a memory, and one or more programs stored in the memory, said one or more programs including instructions for executing the photovoltaic panel defect detection method based on enhanced feature extraction as described above.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] (1) To address the problem of weak identification ability for certain small or complex types of defects, this invention is based on the deep learning target detection framework YOLOX-Tiny and optimized and enhanced. By using deep separable convolutional layers with large kernels in the backbone network to expand the receptive field during feature extraction, more contextual information is captured, thereby enhancing the identification ability for complex and large defects. Furthermore, the multi-scale feature fusion module is used to perform multi-scale fusion, enabling this invention to effectively capture the subtle features and contextual information of photovoltaic panel defects, thereby improving the method's ability to identify various types of defects and increasing the accuracy of defect detection.
[0036] (2) The attention mechanism module introduced in this invention can adaptively focus on important features and suppress irrelevant information during the processing, thereby further improving the accuracy of detection.
[0037] (3) The multi-scale feature fusion module of the present invention fuses features of different scales from different paths. This fusion strategy can make full use of the complementarity between various features through sampling, thereby obtaining a more comprehensive and richer feature representation, thereby improving the detection performance of defects of various sizes.
[0038] (4) The depth-separable convolutional layer of this invention replaces the traditional convolution operation. The depth-separable convolution separates spatial convolution and channel convolution in parallel, which significantly reduces the number of parameters and computational load of the method. This makes the defect detection model more suitable for deployment on portable devices while maintaining high performance. This improvement not only reduces the operating cost of the method, but also improves its feasibility and convenience in practical applications. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0040] Figure 2 This is a schematic diagram of the overall structure of the present invention;
[0041] Figure 3 This is a schematic diagram comparing the standard convolution and depthwise separable convolution of the present invention;
[0042] Figure 4 This is a schematic diagram of the extracted feature map of the present invention;
[0043] Figure 5 This is a visualization of the detection results of the PV-Multi-Defect dataset of the present invention. Detailed Implementation
[0044] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0045] Example 1
[0046] This embodiment provides a photovoltaic panel defect detection method based on enhanced feature extraction, such as... Figure 1 As shown, the method includes the following steps:
[0047] S1. Acquire the image data of the photovoltaic panel to be inspected and perform preprocessing.
[0048] The image data of the photovoltaic panel to be inspected is preprocessed using Focus processing technology. Focus processing improves the image clarity and contrast, thereby highlighting various details on the photovoltaic panel.
[0049] Next, the preprocessed photovoltaic panel image data needs to be input into the defect detection model for detection to output the defect detection results. In this embodiment, the defect detection model is built based on the improved YOLOX-Tiny model, including a backbone network, a multi-scale feature fusion network, and a head prediction layer. The backbone network includes a basic convolutional module, a CSPrayer feature extraction module, a multi-scale feature extraction module, and a bottleneck layer. The basic convolutional module, the CSPrayer feature extraction module, and the multi-scale feature extraction module all include depthwise separable convolutional layers with 7×7 large convolutional kernels to expand the model's receptive field.
[0050] S2. The preprocessed photovoltaic panel image data is sequentially input into the basic convolution module and the CSPlayer feature extraction module for processing to extract preliminary key features at different scales.
[0051] Combination Figure 2 The model structure shown first processes the preprocessed photovoltaic panel image data into the basic convolution module, and then uses the CSPLAYer feature extraction module to extract features. This structure can effectively split and merge features, improve the model's learning ability and generalization performance, and initially extract key features at different scales in the image.
[0052] Furthermore, the basic convolutional module also includes a normalization layer and an activation function layer connected to the depth-separable convolutional layer.
[0053] S3. The initial key features at different scales are sequentially fed into the input base convolution module and the CSPlayer feature extraction module for processing to extract further key features at different scales.
[0054] Combination Figure 2 The model structure shown in the figure represents a repetition of step S2, which further enhances the feature extraction and learning capabilities. The multiple iterations help the model to understand the image data more deeply, thereby more accurately identifying potential defects on photovoltaic panels.
[0055] S4. The key features at different scales are sequentially input into the multi-scale feature extraction module and the bottleneck layer for processing to extract the final key features at different scales.
[0056] Combination Figure 2 The model structure shown utilizes multi-scale feature extraction technology from the image to extract features at different scales. This captures defects of different sizes and shapes on the photovoltaic panel, improving the sensitivity and accuracy of detection.
[0057] In step S2, a 7×7 large-kernel convolution is used to expand the model's receptive field, enabling it to capture broader image context information. Simultaneously, depthwise separable convolutional layers are used to reduce the number of model parameters, minimizing computational burden while maintaining performance. The structure of this depthwise separable convolutional layer is as follows: Figure 3 As shown.
[0058] Next, the SPPBlittle Neck layer is processed. The SPPBlittle Neck is a special network structure that uses multiple different convolutional kernels for branching to further integrate and refine the features extracted in the previous steps.
[0059] At this point, the feature extraction of the backbone network is complete. The extracted features are as follows: Figure 4 As shown.
[0060] S5. Input the initial key features at different scales, the further key features at different scales, and the final key features at different scales into the multi-scale feature fusion network for feature fusion to obtain fused features.
[0061] The multi-scale feature fusion network includes a channel attention mechanism module and a fusion module. The fusion module includes convolutional layers, upsampling layers, a CSPlayer feature extraction module, and downsampling layers. In this step, key features at three different scales are first input into the attention mechanism module for processing using an attention mechanism, and then feature fusion is performed in the output fusion module. Figure 2 As shown, the specific steps are as follows:
[0062] The initial key features at different scales, the further key features at different scales, and the final key features at different scales are respectively input into the channel attention mechanism module for processing, so as to enhance useful features and suppress irrelevant information;
[0063] The final key features at different scales processed by the channel attention mechanism module are sequentially input into the convolutional layer and upsampling layer for processing, and then fused for the first time with the further key features at different scales processed by the channel attention mechanism module (ECANet) in the CSPLAYE feature extraction module.
[0064] The first fusion result is sequentially input into the convolutional layer and upsampling layer for processing, and then fused with the preliminary key features of different scales processed by the channel attention mechanism module in the CSPlayer feature extraction module to obtain the second fused feature.
[0065] The second fusion feature is input into the downsampling layer for processing, and then fused with the first fusion result after processing by the convolutional layer and the upsampling layer in the CSPlayer feature extraction module for a third fusion to obtain the third fusion feature.
[0066] The third fused feature is input into the sampling layer for processing, and then fused a fourth time with the final key features of different scales after processing by the convolutional layer and the upsampling layer in the CSPLAYer feature extraction module to obtain the final fused feature.
[0067] This step involves feeding the obtained feature data into ECANet for further processing. ECANet effectively enhances useful features and suppresses irrelevant information, thereby improving the model's ability to identify defects in photovoltaic panels. In the fusion module, features from different paths are fused. This fusion strategy fully utilizes the complementarity between various features through sampling, resulting in a more comprehensive and richer feature representation.
[0068] S6. Input the fused features into the Head prediction layer for classification and regression, and output the defect detection results.
[0069] Finally, in the Head decoupling section, the features obtained from the previous fusion are used for classification and regression tasks. Through accurate classification and regression analysis, various defect types and their specific locations on the photovoltaic panel are identified.
[0070] This implementation also relates to a portable EL detector that integrates the aforementioned improved methods. This detector integrates all the instructions of the methods described above, enabling rapid and accurate defect detection of photovoltaic panels in on-site or remote areas. This integrated design makes the detector highly portable and practical, meeting the diverse needs of photovoltaic power plant operation and maintenance.
[0071] To effectively implement a lightweight deep learning-based method for photovoltaic panel defect detection, this embodiment proposes an experimental scheme. The scheme details the entire process from data preparation and model building to training optimization and deployment, ensuring the feasibility and practicality of the method.
[0072] 1. Data Preparation: First, collect image data of photovoltaic panels, including images of normal panels and panels with various types of defects. This image data should cover different lighting conditions, shooting angles, and resolutions to improve the model's generalization ability. Preprocess the collected image data, including denoising, enhancement, and normalization, to improve image quality and consistency. Simultaneously, annotate the images, marking the location and category of defects for use in model training and validation.
[0073] 2. Model Construction; In the model construction phase, this embodiment of the invention designs a lightweight and efficient photovoltaic panel defect detection model based on the YOLOX-Tiny framework. By carefully adjusting the method structure, this embodiment of the invention introduces an attention mechanism to enhance the model's ability to focus on key features, while employing large convolutional kernels to capture more contextual information. Throughout the construction process, this embodiment of the invention emphasizes the model's lightweight nature and real-time performance, introducing depthwise separable convolutions to ensure smooth operation on portable devices.
[0074] 3. Training Optimization: (1) Loss Function Design: Based on the characteristics of the photovoltaic panel defect detection task, design a suitable loss function to measure the difference between the model prediction and the true label. Common loss functions such as cross-entropy loss function or mean squared error loss function can be used, and adjustments and optimizations can be made according to the actual situation. (2) Optimization Method Selection: Select an optimization method suitable for the deep learning model for model training, such as stochastic gradient descent (SGD), Adam, etc. At the same time, set a suitable learning rate decay strategy to ensure that the model can gradually converge to the optimal solution during the training process. (3) Batch Processing and Regularization: In order to improve training efficiency and prevent overfitting, batch processing technology can be used to divide the training data into multiple small batches for training. At the same time, regularization techniques such as L1 regularization, L2 regularization or Dropout are introduced to constrain model complexity and enhance generalization ability.
[0075] 4. Model Evaluation: The obtained model is evaluated on an independent test set, and its accuracy, recall, mean precision score and other evaluation indicators are calculated and compared with the benchmark method to verify the effectiveness and superiority of the patented method.
[0076] To verify the effectiveness of the method proposed in this invention, a comparative experiment was designed to compare the performance differences between the improved YOLOX-Tiny method and other methods. The experiment used the publicly available photovoltaic panel defect detection dataset PV-multi-defect, which contains five defect classes, and the publicly available object detection dataset Pascal VOC, which contains twenty common object classes.
[0077] Data preprocessing: Mixup and Mosaic data augmentation are performed on the images in the dataset to increase the number of training samples and data complexity.
[0078] Model training environment: Windows 10 64-bit operating system, AMD R7 5800H processor, NVIDIA RTX 3060 Laptop graphics card, 16.00GB of memory, JetBrains PyCharm Community Edition 2021.3.2 experimental software, and Python 3.10 experimental environment.
[0079] The experimental results for the PV-Multi-Defect dataset are shown in Table 1, and the experimental results for the Pascal VOC dataset are shown in Table 2. The results of the visualized detection of photovoltaic panel defects are shown below. Figure 5 As shown.
[0080] Table 1 Experimental results of the PV-Multi-Defect dataset
[0081]
[0082] Table 2. Detection results of the Pascal VOC dataset.
[0083]
[0084] As shown in the table, Faster R-CNN, this classic two-stage detector, exhibited certain performance limitations in the experiments, with an mAP of 71.18%. This may be due to its insufficient ability to detect small targets and diverse defects in complex backgrounds. The single-stage detector SSD performed slightly better in the experiments, achieving an mAP of 72.93%, but it still struggled to handle the highly complex defect samples in the dataset. Meanwhile, the CenterNet method based on keypoint detection, by eliminating the anchor point mechanism, achieved a simpler and more efficient target detection, achieving an mAP of 86.2% on the dataset, significantly outperforming the former two. This indicates that the anchor-free strategy has potential advantages in handling complex defect detection problems. To balance detection performance and computational efficiency, experiments were conducted combining YOLOv4 with the MobileNet method. This combination effectively reduced the computational complexity of the method while maintaining high detection accuracy. Experimental results show that the combined method achieved an mAP of 86.58%, validating the effectiveness of the lightweight method in defect detection tasks. Furthermore, in the experiments, YOLOX-Tiny achieved accuracy, recall, and mAP of 88.01%, 76.93%, and 90.44%, respectively, demonstrating good results. Finally, the improved method proposed in this embodiment of the invention improves all performance indicators. By introducing an enhanced feature extraction strategy, this embodiment of the invention successfully improved YOLOX-Tiny's accuracy by 4.45 percentage points, recall by 1.32 percentage points, and mAP by 2.47 percentage points. At the same time, the method of this embodiment of the invention has advantages in terms of parameter count and inference speed.
[0085] The robustness of the proposed method was verified through systematic experimental evaluation on the Pascal VOC dataset. Experimental results show that the proposed method exhibits good performance on the Pascal VOC dataset. Specifically, the proposed method achieves significant improvements in both precision and mAP%. Compared to the original YOLOX-Tiny method, the proposed method improves precision by nearly 17 percentage points to 84.40%, and also improves mAP by nearly 10 percentage points to 78.32%. This performance improvement fully demonstrates the effectiveness of the enhanced feature extraction strategy.
[0086] Meanwhile, compared to the original YOLOX-Tiny method, the number of parameters in this embodiment is reduced by nearly 40%, to only 3.24M. This significant reduction in the number of parameters not only helps to reduce the computational complexity of the method and improve inference speed, but also makes it possible to apply the method in resource-constrained environments.
[0087] Furthermore, although the embodiments of the present invention reduce the number of parameters, their performance is still close to that of methods with a larger number of parameters. For example, compared with the YOLOX-M method, the method is close to it in terms of mAP% but reduces the number of parameters by nearly 87%. This result shows that, through reasonable method design and improvement strategies, the method can achieve high-performance target detection while maintaining a small number of parameters.
[0088] In summary, this embodiment delves into the current state and development trends of photovoltaic panel defect detection technology, and proposes an improved YOLOX-Tiny method based on practical application needs. This method aims to improve the accuracy and efficiency of photovoltaic panel defect detection by enhancing feature extraction capabilities and optimizing the method structure, while reducing the number of parameters to meet the needs of portable EL detectors. Specifically, firstly, addressing the diversity and complexity of photovoltaic panel defects, this embodiment employs feature enhancement techniques such as attention mechanisms, large convolutional kernels, and multi-scale feature fusion to capture subtle features and contextual information of photovoltaic panel defects, thereby improving the method's ability to identify various types of defects. The introduction of attention mechanisms allows the method to adaptively focus on important features and suppress irrelevant information during processing, further improving detection accuracy. Large convolutional kernels help expand the receptive field, capturing more contextual information and enhancing the ability to identify complex and large defects. Multi-scale feature fusion technology can fuse feature maps at different levels to obtain richer and more robust feature representations, thereby improving the detection performance for defects of various sizes. Simultaneously, depthwise separable convolution is introduced to replace traditional convolution operations. Depthwise separable convolution separates spatial and channel convolutions in parallel, reducing the number of parameters and computational complexity. These innovations and improvements make the improved YOLOX-Tiny method more suitable for deployment on portable devices while maintaining high performance. This improvement not only reduces the method's operating cost but also enhances its feasibility and convenience in practical applications. Through the comprehensive application of these technologies, this embodiment aims to provide strong support for intelligent inspection in the photovoltaic industry and promote the application and development of lightweight deep learning technology in the photovoltaic field.
[0089] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] Example 2
[0091] This embodiment provides a portable EL inspection instrument, including one or more processors, a memory, and one or more programs stored in the memory, the one or more programs including instructions for executing the photovoltaic panel defect detection method based on enhanced feature extraction as described in Embodiment 1.
[0092] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0093] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0094] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0095] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0096] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0097] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for detecting defects in photovoltaic panels based on enhanced feature extraction, characterized in that, Includes the following steps: The image data of the photovoltaic panel to be detected is acquired, preprocessed, and input into a pre-trained defect detection model to output the defect detection result. The defect detection model is constructed based on the improved YOLOX-Tiny model and includes a backbone network, a multi-scale feature fusion network, and a head prediction layer. The backbone network includes a basic convolutional module, a CSPlayer feature extraction module, a multi-scale feature extraction module, and a bottleneck layer. The basic convolutional module, the CSPlayer feature extraction module, and the multi-scale feature extraction module all include depthwise separable convolutional layers with 7×7 large convolutional kernels. The execution steps of the defect detection model include: The preprocessed photovoltaic panel image data is sequentially input into the basic convolution module and the CSPlayer feature extraction module for processing, and preliminary key features at different scales are extracted. The initial key features at different scales are sequentially input into the basic convolution module and the CSPlayer feature extraction module for processing to extract further key features at different scales. The key features at different scales are then sequentially input into the multi-scale feature extraction module and the bottleneck layer for processing to extract the final key features at different scales. The initial key features at different scales, the further key features at different scales, and the final key features at different scales are input into the multi-scale feature fusion network for feature fusion to obtain fused features. The multi-scale feature fusion network includes a channel attention mechanism module and a fusion module. The steps for obtaining the fused features include: The initial key features at different scales, the further key features at different scales, and the final key features at different scales are respectively input into the channel attention mechanism module for processing, so as to enhance useful features and suppress irrelevant information; The initial key features at different scales, the further key features at different scales, and the final key features at different scales processed by the channel attention mechanism module are input into the fusion module for feature fusion to obtain fused features. The fusion module includes a convolutional layer, an upsampling layer, a CSPlayer feature extraction module, and a downsampling layer. The steps performed by the fusion module include: The final key features at different scales processed by the channel attention mechanism module are sequentially input into the convolutional layer and upsampling layer for processing, and then fused for the first time with the further key features at different scales processed by the channel attention mechanism module in the CSPLAYer feature extraction module. The first fusion result is sequentially input into the convolutional layer and upsampling layer for processing, and then fused with the preliminary key features of different scales processed by the channel attention mechanism module in the CSPlayer feature extraction module to obtain the second fused feature. The second fusion feature is input into the downsampling layer for processing, and then fused with the first fusion result after processing by the convolutional layer and the upsampling layer in the CSPlayer feature extraction module for a third fusion to obtain the third fusion feature. The third fusion feature is input into the downsampling layer for processing, and then fused a fourth time with the final key features of different scales processed by the convolutional layer and the upsampling layer in the CSPLAYE feature extraction module to obtain the final fusion feature. The fusion feature is then input into the Head prediction layer for classification and regression, and the defect detection result is output.
2. The photovoltaic panel defect detection method based on enhanced feature extraction according to claim 1, characterized in that, The image data of the photovoltaic panel to be inspected is preprocessed using Focus processing technology.
3. The photovoltaic panel defect detection method based on enhanced feature extraction according to claim 1, characterized in that, The basic convolutional module also includes a normalization layer and an activation function layer connected to the depthwise separable convolutional layer.
4. The photovoltaic panel defect detection method based on enhanced feature extraction according to claim 1, characterized in that, The training steps of the defect detection model include: Acquire an image dataset of photovoltaic panels, the image dataset including image data of normal panels and image data of panels with various types of defects; The image dataset is preprocessed and the images are labeled. The preprocessed and annotated image dataset is input into the defect detection model, which outputs the defect detection results of the photovoltaic panel. The loss function is constructed based on the defect detection results and corresponding image annotations, and iterative optimization is performed using optimization methods including stochastic gradient descent and Adam optimizer until the loss function converges, thus completing the training process of the defect detection model.
5. The photovoltaic panel defect detection method based on enhanced feature extraction according to claim 4, characterized in that, The preprocessing of the image dataset includes denoising, enhancement, and normalization.
6. The photovoltaic panel defect detection method based on enhanced feature extraction according to claim 4, characterized in that, The loss function is either the cross-entropy loss function or the mean squared error loss function.
7. The photovoltaic panel defect detection method based on enhanced feature extraction according to claim 1, characterized in that, The Head prediction layer is a decoupled head design. It processes the fused features through convolution to obtain defect detection results, which include various defect types and their locations.
8. A portable EL detector, characterized in that, It includes one or more processors, a memory, and one or more programs stored in the memory, said one or more programs including instructions for executing the photovoltaic panel defect detection method based on enhanced feature extraction as described in any one of claims 1-7.
Citation Information
Patent Citations
Industrial product surface defect detection method based on deep learning
CN115511812A
Industrial flaw detection method based on improved YOLOX model
CN115661094A