Next Article in Journal
Preparation, Performance Evaluation and Mechanisms of a Diatomite-Modified Starch-Based Fluid Loss Agent
Previous Article in Journal
Design of Novel Hydraulic Drive Cleaning Equipment for Well Maintenance
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Defect Detection Algorithm for Photovoltaic Cells Based on SEC-YOLOv8

College of Electronic and Information, Taiyuan University of Science & Technology, Taiyuan 030024, China
*
Author to whom correspondence should be addressed.
Processes 2025, 13(8), 2425; https://doi.org/10.3390/pr13082425
Submission received: 9 June 2025 / Revised: 12 July 2025 / Accepted: 29 July 2025 / Published: 31 July 2025
(This article belongs to the Section AI-Enabled Process Engineering)

Abstract

Surface defects of photovoltaic (PV) cells can seriously affect power generation efficiency. Accurately detecting such defects and handling them in a timely manner can effectively improve power generation efficiency. Aiming at the high-precision and real-time requirements for surface defect detection during the use of PV cells, this paper proposes a PV cell surface defect detection algorithm based on SEC-YOLOv8. The algorithm first replaces the Spatial Pyramid Pooling Fast module with the SPPELAN pooling module to reduce channel calculations between convolutions. Second, an ECA attention mechanism is added to enable the model to pay more attention to feature extraction in defect areas and avoid target detection interference from complex environments. Finally, the upsampling operator CARAFE is introduced in the Neck part to solve the problem of scale mismatch and enhance detection performance. Experimental results show that the improved model achieves a mean average precision (mAP@0.5) of 69.2% on the PV cell dataset, which is 2.6% higher than the original network, which is designed to achieve a superior balance between the competing demands of accuracy and computational efficiency for PV defect detection.

1. Introduction

The “Dual Carbon” goal has ushered in unprecedented strategic development opportunities for the development of solar energy and other clean energy industries [1]. Against the backdrop of global energy transition, the development and utilization of solar energy resources have become a global consensus. As the primary form of solar energy utilization, photovoltaic (PV) power generation systems are prone to various environmental factors during long-term outdoor operation, leading to anomalies such as soiling, electrical degradation, physical damage, and foreign object coverage. These defects may result in energy loss, lifespan reduction, and system failures, making the establishment of efficient defect identification mechanisms crucial for ensuring the stable operation of PV systems. Although current AI-based detection methods demonstrate significant effectiveness, there exists a contradiction between the computational demands required for training and testing models and the limited processing capabilities of edge devices used in PV panel defect detection, posing challenges for practical applications. Therefore, under the premise of maintaining detection accuracy, how to minimize the complexity and computational load of deep learning models remains one of the critical issues to be addressed in this field.
Traditional manual inspection methods have significant limitations: On one hand, they require a substantial investment of human resources, leading to persistently high operational and maintenance costs; on the other hand, constrained by the professional expertise of inspectors, there often exist risks of misdetection and undetected faults. With the continuous advancement of deep learning, it has now been widely applied in the field of computer vision. An increasing number of researchers have utilized deep learning methods for the detection and diagnosis of surface defects in photovoltaic arrays. Currently, deep learning-based object detection algorithms can be divided into two categories: one is the Two Stage algorithm, which mainly uses Faster RCNN [2,3,4] (Fast Region-based CNN). Another type is the One Stage algorithm, which is mainly based on YOLO [5,6,7,8,9] (You Only Look Once), a family of models known for its continuous evolution and state-of-the-art performance [10]. The powerful YOLO architecture has been successfully applied in other demanding industrial fields, such as aircraft inspection [11]. Alongside YOLO, other advanced architectures like the real-time DETR (RT-DETR), with models such as RT-DETR offering competitive performance [12]. Ref. [13] proposed a lightweight CNN classification system for defect detection, which performs data augmentation such as rotation and cropping on EL images to compensate for the sparsity of available data. Ref. [14] optimized the backbone network by using inverse linear convolution and depthwise separable convolution and introduced sub-pixel links and channel attention guidance modules to optimize the YOLOv4 deep learning model. Ref. [15] improved the network structure based on the YOLOv5 model to achieve fast and accurate detection of surface defects in solar cells. Ref. [16] proposed an improved defect detection method for lightweight YOLOv5 solar panels, replacing the convolutional module with the MobileOne module and adding a depthwise separable vision transformer (SepViT) module to the backbone network. This method compresses the model parameters while improving detection accuracy and speed. Ref. [17] proposed a multi-scale Faster RCNN crack detection model that integrates attention. By improving the feature pyramid to obtain multi-scale semantic feature maps, the network’s feature expression ability for multi-scale cracks is enhanced. Ref. [18] used the GauGAN network for data augmentation to alleviate data imbalance, embedded the context aggregation module to enhance feature fusion and small defect detection capabilities, and optimized classification and localization tasks with multiple attention detection heads. Ref. [19] proposed an improved Dn-YOLOv7 algorithm. This algorithm combines a denoising convolutional neural network (DnCNN) and proposes a denoising module (DnBlock) that uses spatial coordinate convolution (CoordConv) to convolve and integrate noisy channels, enhancing the network’s denoising ability and improving the model’s detection ability for small targets. Phan et al. [20] proposed a new method for detecting faults in photovoltaic cells, introducing the particle swarm optimization algorithm in YOLOv8 to optimize model parameters and achieve optimal detection accuracy. Ref. [21] proposed an improved SSD algorithm, which replaces the Conv7 convolutional layer in the original SSD with the Involution [22] operator and uses the FocalLoss [23] loss function to improve accuracy. While the aforementioned methods have achieved certain success in improving detection accuracy or reducing model parameters and computational costs, they fail to simultaneously balance lightweight design and accuracy enhancement. Consequently, there remains significant room for optimization in these object detection algorithms.
When deploying object detection models for surface defect inspection of photovoltaic arrays on lightweight UAV-based inspection devices, it is critical to achieve model lightweighting while maintaining high detection accuracy. This study proposes SEC-YOLOv8, a photovoltaic cell surface defect detection algorithm developed specifically for resource-constrained environments. The method addresses the dual challenge of balancing detection accuracy with model compactness through systematic lightweight optimization. While maintaining detection accuracy, this study achieves model compactness and reduces interference from background noise in defect detection. The main contributions include replacing the fast spatial pyramid pooling module with the SPPELAN pooling module to reduce channel computation between convolutions and parallelize pooling channels and adding the ECA attention mechanism [24] to improve the feature extraction ability for small defects and avoid interference from complex environments in object detection. Introduce the upsampling operator CARAFE in the Neck section to expand the receptive field and enhance the detection performance.

2. YOLOv8 Algorithm

YOLOv8 is a single-stage object detection algorithm launched by the Ultralytics team in January 2023. Building upon the YOLOv5 architecture, it integrates state-of-the-art (SOTA) technologies and can be executed directly from the command-line interface. This versatile tool addresses various computer vision tasks, including object detection, segmentation, tracking, classification, and pose estimation [25]. The network architecture of the YOLOv8 object detection algorithm comprises four core components: the Input layer, Backbone layer, Neck layer, and Head layer. The input layer is equipped with data augmentation capabilities, enhancing data diversity and subsequently boosting the network’s generalization and robustness. The Backbone layer comprises three components: Conv, C2f, and SPPF. Specifically, Conv is utilized for downsampling, C2f handles feature extraction, and SPPF expands the network’s receptive field. The Neck layer employs a structure that integrates a Feature Pyramid Network (FPN) with a Path Aggregation Network (PAN) for feature fusion. The FPN transmits semantics from top to bottom, while the PAN transmits positional information from bottom to top. Additionally, this structure incorporates cross-layer connections to merge shallow and deep features, yielding a feature layer enriched with both positional and semantic information. The Head layer receives the feature maps from the Neck layer and processes them to produce the final prediction results for each pixel, encompassing category, confidence score, and location details. Ultimately, all predicted bounding boxes undergo post-processing through confidence filtering and Non-Maximum Suppression (NMS), culminating in the display of the final predicted boxes and their associated information on the image. The complete network architecture is shown in Figure 1.

2.1. Proposed Algorithm Improvements

This paper enhances the effectiveness and performance of defect detection in photovoltaic panels by refining the structure of the YOLOv8 model. Initially, within the backbone network, the SPPELAN pooling module is employed to substitute the Spatial Pyramid Pooling Fast (SPPF) module. This replacement reduces the computational load between convolutional channels and bolsters the model’s target recognition capabilities in intricate scenarios. Additionally, the ECA attention mechanism is incorporated to elevate the feature extraction capability for subtle defects. In the neck structure, CARAFE upsampling is utilized, with high-frequency details being restored via a dynamic kernel prediction mechanism. This significantly improves the detection accuracy of small targets and densely occluded scenes. The enhanced SEC-YOLOv8 network architecture is shown in Figure 2.

2.2. SPPELAN Pooling Module

This study introduces the SPPELAN module [26] as a replacement for the original SPPF structure. The SPPELAN (Spatial Pyramid Pooling combined with Efficient Layer Aggregation Network) represents an optimized pyramid architecture integrating Spatial Pyramid Pooling (SPP) [27] and Efficient Layer Aggregation Network (ELAN) [28] through structural adaptation. As illustrated in Figure 3, The input feature map, measuring H × W × 256 in size, undergoes a 1 × 1 CBS (Conv-BatchNorm-SiLU) convolution, resulting in a reduction of its channel count from 256 to 5. This substantial decrease significantly lowers the feature dimension and parameter volume in subsequent computations. By employing a parallel pooling architecture, we circumvent redundant calculations stemming from sequential feature processing. Ultimately, the pooled feature maps are concatenated and convolved, enhancing the network’s feature representation capability while restoring the spatial resolution of the feature maps.

2.3. ECA Module

The dataset of photovoltaic cell defects is characterized by complex backgrounds and a variety of defect shapes, which may lead to the model being distracted by background noise during the detection process, subsequently impacting the segmentation accuracy adversely. To address these challenges, this paper introduces the ECA (Efficient Channel Attention) attention mechanism, aiming to diminish the model’s focus on irrelevant features and enhance its detection precision. The architectural details of the ECA (Efficient Channel Attention) module are shown in Figure 4.
The ECA attention mechanism leverages one-dimensional convolution to facilitate efficient cross-channel interaction, extracting the interdependencies of information among channels while preserving the dimensionality of the feature map unchanged. This method of keeping dimensions unchanged not only reduces computational complexity but also enables the model to better focus on important features, thereby improving the overall feature expression ability of the model. Firstly, perform the global average pooling (GAP) operation to keep the number of input feature map channels unchanged. Then perform a one-dimensional convolution operation with a kernel size of k , and obtain the weight coefficients of each channel through the Sigmoid activation function, as shown in Equation (1):
ω = σ C 1 D k y
Within this context, ω represents the weight of each channel, σ denotes the activation function, and C 1 D signifies the one-dimensional convolution operation. Ultimately, the computed result is integrated with the original input feature map through element-wise multiplication, yielding the final output feature map. The scope of interaction within the entire ECA attention mechanism, specifically the size k of the one-dimensional convolution kernel, is contingent upon the number of channels C in the input feature map. Furthermore, there exists a mapping relationship between k and C , as outlined below:
k = ψ C = log 2 c y + b y o d d
Among them, y and b are assigned values of 2 and 1, while ψ signifies the mapping relationship.

2.4. CARAFE Module

YOLOv8 employs nearest-neighbor interpolation for upsampling to perform feature fusion of deep-layer and shallow-layer information. However, this method determines the upsampling kernel using only the pixels closest to the sampling point under consideration, resulting in a limited perception range and failing to capture the rich semantic information required for prediction tasks. In particular, for features with widely distributed defects, small target defects, and minimal inter-class differences in defects, this approach is prone to false detections and missed detections. In contrast, the lightweight upsampling operator, Content-Aware Reassembly of Features (CARAFE) [29], possesses a larger receptive field, enabling more extensive utilization of contextual information. Without significantly increasing parameters or computational overhead, it dynamically generates adaptive kernels to match the semantic information of fabric defect feature maps, effectively enhancing the model’s detection performance. The upsampling process of the CARAFE operator is shown in Figure 5.
To clearly summarize the main innovations and the task-specific design rationale of our proposed method, a detailed comparison between the modules of SEC-YOLOv8 and the baseline YOLOv8 is shown in Table 1.

3. Experimental Results and Analysis

3.1. Experimental Environment and Parameter Configuration

The experiments were conducted on a computer with the Windows 11 operating system, an NVIDIA GeForce GTX 4060 GPU, and 16 GB of RAM. The software environment included Python 3.9, PyTorch 2.3.0, and CUDA 11.8. During training, a batch size of 32 was used, and the model was trained for a total of 200 epochs. The input size of the original photovoltaic cell images was uniformly set to 640 × 512. The experimental environment is presented in Table 2.
To rationally allocate hardware resources, the parameter configuration is shown in Table 3.

3.2. Dataset Introduction

The experimental dataset used in this study was collected by the laboratory research group using a DJI M300 drone (Dajiang Innovation Technology Co., Ltd., Shenzhen, China) equipped with a Zenmuse H20T camera (Dajiang Innovation Technology Co., Ltd., Shenzhen, China) to capture infrared images of photovoltaic (PV) arrays at solar power stations. After dataset curation, 743 images containing seven types of PV defects were selected: Diode malfunction, Hot spot, Soot formation, Fragmentation, Plant obstruction, Foreign object obstruction, and Shadow occlusion. These images were annotated using LabelImg3.9 software to generate corresponding labels for model training. To address the overfitting issue and enhance model stability when working with limited data, the dataset was augmented to 2971 images through a combination of rotation, cropping, translation, and mirror flipping. The augmented dataset was then divided into a training set (2377 images), a validation set (297 images), and a test set (297 images) at an 8:1:1 ratio. Examples of the PV cell dataset are shown in Figure 6.

3.3. Evaluation Index

To validate the model’s performance, this experiment selects evaluation metrics, such as precision (P), recall (R), average precision (AP), and mean average precision (mAP) to assess the model’s detection performance. The specific formulas are as follows:
P = T P T P + F P
R = T P T P + F N
A P = 0 1 P R   d R
m A P = 1 c j = 1 c A P j
In the formula, TP represents the number of correctly detected targets, FP represents the number of incorrectly detected targets, and FN represents the number of missed targets. When multiple classification categories are involved, it represents the total number of categories. AP, the average accuracy, is a measure of the detection performance of a specific target category. mAP combines precision and recall to comprehensively evaluate the accuracy of the model.

3.4. Experimentals and Results

3.4.1. Comparative Experiments

To validate the effectiveness of the improved photovoltaic cell defect detection model, this study conducted comparative experiments by training six object detection algorithms—YOLOv3-tiny, YOLOv5, YOLOv5s, YOLOv8, YOLOv8s, and SEC-YOLOv8—on the same PV cell defect dataset under identical experimental conditions. The results are presented in Table 4.
In terms of detection accuracy, YOLOv3-tiny and YOLOv5 exhibit inferior performance compared to other algorithms, while their parameter counts are excessively large. During object detection, these algorithms demand high computational resources and stringent device specifications, rendering them unsuitable for deployment in lightweight UAVs. Although YOLOv5s and YOLOv8s demonstrate improvements in accuracy and average precision, their parameter counts remain relatively high compared to other YOLO-series algorithms. In contrast, the improved ESC-YOLOv8 model, despite a slight decline in accuracy and recall, achieves favorable detection results while consuming fewer computational resources. It attains an mAP@0.5 of 69.2% with only 3.6 million parameters. This evidence conclusively demonstrates that the improved model outperforms others in terms of lightweight design and detection precision, making it effectively deployable in lightweight UAVs for real-time detection of surface defects in photovoltaic arrays.
To more intuitively demonstrate the improved model’s operational results, a comparison of the detection performance between the proposed model and several other mainstream models on the test set is shown in Figure 7. For the first and second images, the SEC-YOLOv8 algorithm accurately detects soot formation and Shadow occlusion, while other models all exhibit false detection or missed detection. For the foreign object obstruction defect in the third image, YOLOv3-tiny, YOLOv5, and YOLOv8s models show missed detections, the YOLOv5s model has false detections, and the SEC-YOLOv8 algorithm achieves the best detection effect. In conclusion, the improved SEC-YOLOv8 algorithm has obvious advantages in perception ability, enabling more accurate detection of more targets with lower probabilities of false detection and missed detection.

3.4.2. Ablation Experiments

To validate the impact of improvement strategies on the algorithm’s detection performance, this study conducted experiments by introducing the SPPELAN pooling module, ECA module, and CARAFE module into the original YOLOv8 network model, respectively. The effects of different improvement methods on model performance were verified through ablation experiments. The evaluation metrics selected for the ablation experiments include precision (P), recall (R), mean average precision at 0.5 (mAP@0.5), and the number of parameters. The design of the ablation experiments is shown in Table 5.
This study systematically investigates the optimization effects of the SPPELAN, ECA, and CARAFE modules on the YOLOv8 model. According to the ablation experiment results in Table 5, Model 1 represents the experimental results of the unmodified YOLOv8. In Model 2, the multi-scale fusion capability of the SPPELAN module was integrated into YOLOv8. Compared with Model 1, although the number of parameters increased by 0.4 MB, mAP@0.5 improved by 0.1 percentage points. Model 3 introduced the ECA module into YOLOv8; compared with Model 1, mAP@0.5 increased by 1.5 percentage points while the parameter count remained basically unchanged, verifying that the channel attention of the ECA module enhances local feature representation and thus improves the network’s detection accuracy. Model 4 combines SPPELAN and CARAFE with VOLOv8, and the test results show a decrease in mAP@0.5. This is because the CARAFE upsampling may destroy the multi-scale feature distribution output by SPPELAN, leading to detail misalignment in the fused feature map. In model 5, after combining SPPELAN and ECA, the parameter quantity increases by only 16.3%, and the mAP@0.5% increases by 1.2 percentage points. After further introducing the CARAFE module, Model 6 achieved an mAP@0.5 of 69.2% with 3.6 MB parameters. Its dynamic receptive field expansion mechanism significantly enhanced contextual modeling capability, achieving a 2.6% improvement over the YOLOv8 model. The detection accuracy significantly outperforms lightweight comparison schemes, while the frames per second (FPS) reached 416.67, meeting the speed requirements for industrial inspection, effectively reducing the difficulty and cost of model deployment on mobile terminals, and demonstrating practical application value. The experiments show that CARAFE contributed most significantly to performance improvement, while the combination of SPPELAN and ECA provided a foundation for feature enhancement.
To more intuitively evaluate the detection performance of the improved SEC-YOLOv8 model, both the original YOLOv8 and SEC-YOLOv8 models were applied to detect defects in the photovoltaic cell test dataset, with a comparison of results before and after model improvement. Partial detection results are shown in Figure 8, which respectively displays the defect locations in test images, the detection results of the baseline YOLOv8 model, and the detection results of the improved SEC-YOLOv8 model. Comparing Figure 8a and Figure 8b, it is evident that the YOLOv8 algorithm fails to effectively identify minor defects in photovoltaic panels during detection. In contrast, the improved algorithm proposed in this paper demonstrates superior performance in recognizing foreign object occlusions and soot formation defects. This enhancement significantly boosts the model’s capability to detect small-target defects, minimizing instances of missed detections and enabling more precise defect localization. The Precision-Recall (P-R) curves for all categories of YOLOv8 and the improved SEC-YOLOv8 algorithm are shown in Figure 9.
By comparing the precision-recall (P-R) curves of Figure 9a,b, it can be observed that the P-R curve of the improved algorithm overall lies above that of the original algorithm. Except for a 2.1% decrease in precision for hot spot faults, the improved algorithm achieves precision improvements of 2.2%, 1.8%, 1.8%, 7.2%, 2.8%, and 9.1% for the six fault categories of diode malfunction, soot formation, fragmentation, plant obstruction, foreign object obstruction, and shadow occlusion, respectively. This indicates that under the same recall rate, the recognition precision of the improved algorithm for six types of defects is significantly higher than that of the original algorithm, and the average precision of all categories for the improved algorithm is increased by 2.6% compared to the original algorithm. This confirms that the improved algorithm model exhibits better performance in photovoltaic panel defect detection tasks.
To visualize the feature learning process of the algorithm, we demonstrate the effect of feature extraction through the visualization of attention maps. A heatmap, as a visualization tool using colors to represent data magnitude, intuitively highlights key regions in data via varying color intensities. As shown in Figure 10, the brighter areas in the map indicate that the algorithm extracts more feature information in those regions. Through comparison, the YOLOv8 heatmap reveals a significant deviation between the model’s focused regions and actual defect areas, whereas the improved SEC-YOLOv8 heatmap shows the model accurately focuses on the actual defect regions. This indicates that the improved model captures key defect features more effectively, intuitively validating the rationality of the network enhancement.

4. Conclusions

To achieve an exceptional balance between the competing demands of precision and computational efficiency in PV defect detection, this paper proposes a PV cell surface defect detection algorithm named SEC-YOLOv8 based on an improved YOLOv8 framework. In the backbone network of the detection algorithm, the SPPELAN pooling module replaces the fast spatial pyramid pooling (SPPF) module, reducing channel computations between convolutions and enhancing target recognition capabilities in complex scenes. An ECA (Efficient Channel Attention) mechanism is integrated to improve feature extraction for minute defects. The neck structure employs CARAFE (Content-Aware ReAssembly of Features) upsampling, which restores high-frequency details through a dynamic kernel prediction mechanism, significantly improving detection accuracy for small targets and densely occluded scenes. Experimental results show that compared with the baseline YOLOv8 model, the improved model achieves a 2.6% improvement in mAP@0.5, meeting industrial inspection requirements. This work demonstrates engineering practical application value and provides a reference for improving other surface defect detection algorithms for PV cells.
Furthermore, the performance improvement of the detection model is significantly influenced by defects such as hot spots and foreign object obstructions, which exhibit high similarity to the background, making it difficult for the model to distinguish abnormal defects from normal backgrounds. The future work should include benchmarking SEC-YOLOv8 against lightweight architectures like EfficientDet, YOLO-NAS and RT-DETR to further validate its performance. And validate the SEC-YOLOv8 model on a larger, publicly available PV defect dataset to test its generalization ability under different conditions. For the deployment and application of this algorithm in actual industrial production, researchers can achieve model lightweighting through techniques such as model pruning to reduce parameter count and computational load, thereby further improving detection speed and adapting to the operational requirements of PV power plant inspection terminal devices.

Author Contributions

Writing—original draft preparation, H.X.; writing—review and editing, L.L.; visualization, Q.W.; supervision, J.H. and Y.F. All authors have read and agreed to the published version of the manuscript.

Funding

This work was financially supported by the Basic Research Surface Projects of Shanxi Province (202203021221153).

Data Availability Statement

The data in this article is subject to confidentiality agreements with relevant partner entities and is not available for public use.

Acknowledgments

The authors acknowledged the financial support from the Basic Research Surface Projects of Shanxi Province (202203021221153).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Han, F.; Wang, L.L.; Lin, Y. Research Progress of hole dopants for perovskite solar cells. J. Ceram. 2023, 44, 417–433. [Google Scholar]
  2. Zhang, W.B.; Ma, Y.H.; Bai, X.J.; Tan, Y.P.; Pi, Y.X. Defect identification of solar panels using improved faster R-CNN. Power Syst. Technol. 2022, 46, 2593–2600. [Google Scholar]
  3. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
  4. Xu, X.; Zhao, M.; Shi, P.; Ren, R.; He, X.; Wei, X.; Yang, H. Crack detection and comparison study based on faster R-CNN and mask R-CNN. Sensors 2022, 22, 1215. [Google Scholar] [CrossRef] [PubMed]
  5. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the Computer Vision & Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
  6. Cheng, S.; Dai, J.T.; Yang, H.G.; Chen, Y.X. Weld Image Detection and Recognition Based on Improved YOLOv4. Laser Optoelectron. Prog. 2022, 59, 1610002. [Google Scholar]
  7. Chu, Z.; Zhang, X.L.; Yin, G.F.; Jia, R.Q.; Qi, Y.J.; Xu, M.; Hu, X.; Huang, P.; Ma, M.J.; Yang, R.F. Detection algorithm of planktonic algae based on improved YOYOv3. Laser Optoelectron Prog. 2023, 60, 257–264. [Google Scholar]
  8. Li, X.; He, M.; Luo, H.B. Occluded pedestrian detection algorithm based on improved YOLOv3. Acta. Opt. Sin. 2022, 42, 160–169. [Google Scholar]
  9. Shi, T.; Ding, Y.; Zhu, W. YOLOv5s_2E: Improved YOLOv5s for Aerial Small Target Detection. IEEE Access 2023, 11, 80479–80490. [Google Scholar] [CrossRef]
  10. Terven, J.; Córdova-Esparza, D.-M.; Romero-González, J.-A. A Comprehensive Review of YOLO Architectures in Computer Vision: From YOLOv1 to YOLOv8 and YOLO-NAS. Mach. Learn. Knowl. Extr. 2023, 5, 1680–1716. [Google Scholar] [CrossRef]
  11. Liao, K.-C.; Lau, J.; Hidayat, M. An Innovative Aircraft Skin Damage Assessment Using You Only Look Once-Version9: A Real-Time Material Evaluation System for Remote Inspection. Aerospace 2025, 12, 31. [Google Scholar] [CrossRef]
  12. Zong, Z.; Song, G.; Liu, Y. DETRs with Collaborative Hybrid Assignments Training. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Paris, France, 2–6 October 2023; pp. 6748–6758. [Google Scholar]
  13. Akram, M.W.; Li, G.; Jin, Y.; Chen, X.; Zhu, C.; Zhao, X.; Khaliq, A.; Faheem, M.; Ahmad, A. CNN based automatic detection of photovoltaic cell defects in electroluminescence images. Energy 2019, 189, 116319. [Google Scholar] [CrossRef]
  14. Zhang, P.F.; Wang, S.Q.; Huang, J.F.; Liu, Y.F.; Zhang, Z.Y. Surface defect detection method of solar cell based on vision. Modul. Mach. Tool Autom. Manuf. Tech. 2022, 8, 144–147+151. [Google Scholar]
  15. Teng, S.; Liu, Z.; Luo, Y.; Zhang, P. Improved Solar Photovoltaic Panel Defect Detection Technology Based on YOLOv5. In Proceedings of the International Conference on 6GN for Future Wireless Networks; Springer Nature: Cham, Switzerland, 2023; pp. 199–213. [Google Scholar]
  16. Li, T.; Sun, Y. Defect Detection of Solar Panels Based on Improved Lightweight YOLOv5. Modul. Mach. Tool Autom. Manuf. Tech. 2023, 4, 95–99+106. [Google Scholar]
  17. Chen, H.Y.; Zhao, P.; Yan, H.W. Crack detection based on multi-scale Faster RCNN with attention. Opto-Electron. Eng. 2021, 48, 64–74. [Google Scholar]
  18. Zhou, Y.; Yan, M.Z.; Chen, H.Y.; Fei, S.H. Defect Detection of Photovoltaic Cells Based on Improved YOLOv8. Laser Optoelectron. Prog. 2024, 61, 245–255. [Google Scholar]
  19. Liu, C.Y.; Dong, X.J.; Liu, S.J.; Zhou, Y.L. Detection of small defects on photovoltaic panel surfaces based on improved Dn-YOLOv7 algorithm. J. Hubei MinZu Univ. 2024, 42, 212–218. [Google Scholar]
  20. Phan, Q.B.; Nguyen, T.T. A Novel Approach for PV Cell Fault Detection Using YOLOv8 and Particle Swarm Optimization. In Proceedings of the Midwest Symposium on Circuits and Systems (MWSCAS), Tempe, AZ, USA, 6–9 August 2023. [Google Scholar]
  21. Jiao, S.T.; Wang, K.Q.; Zhou, Q.; Li, L.Y. Research on Surface Defect Detection of Photovoltaic Panel Based on Improved SSD Algorithm. Comput. Eng. Softw. 2023, 44, 47–52. [Google Scholar]
  22. Li, D.; Hu, J.; Wang, C.; Li, X.; She, Q.; Zhu, L.; Zhang, T.; Chen, Q. Involution: Inverting the Inherence of Convolution for Visual Recognition. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021. [Google Scholar]
  23. Lin, T.; Goyal, P.; Girshick, R.; He, K.; Dollar, P. Focal Loss for Dense Object Detection. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 318–327. [Google Scholar] [CrossRef]
  24. Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Hu, Q. ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020. [Google Scholar]
  25. Mi, Z.; Lian, Z. Review of YOLO Methods for Universal Object Detection. Comput. Eng. Appl. 2024, 60, 38–54. [Google Scholar]
  26. Chen, X.X.; Guo, X.Y.; Li, Y.M.; Liu, C. A lightweight automatic measurement method for cattle body scale based on improved YOLOv8n-pose. J. Nanjing Agr. Univ. 2025, 1–14. Available online: https://link.cnki.net/urlid/32.1148.S.20250313.1339.006 (accessed on 8 June 2025).
  27. He, K.; Zhang, X.; Ren, S.; Sun, J. Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 1904–1916. [Google Scholar] [CrossRef] [PubMed]
  28. Wang, C.; Liao, H.M.; Yeh, I. Designing Network Design Strategies Through Gradient Path Analysis. J. Inf. Sci. Eng. 2023, 39, 975–995. [Google Scholar]
  29. Wang, J.; Chen, K.; Xu, R.; Liu, Z.; Loy, C.C.; Lin, D. CARAFE: Content-Aware ReAssembly of FEatures. In Proceedings of the International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019. [Google Scholar]
Figure 1. YOLOv8 network.
Figure 1. YOLOv8 network.
Processes 13 02425 g001
Figure 2. SEC-YOLOv8 network.
Figure 2. SEC-YOLOv8 network.
Processes 13 02425 g002
Figure 3. SPPELAN module.
Figure 3. SPPELAN module.
Processes 13 02425 g003
Figure 4. ECA module.
Figure 4. ECA module.
Processes 13 02425 g004
Figure 5. The upsampling process of the CARAFE operator.
Figure 5. The upsampling process of the CARAFE operator.
Processes 13 02425 g005
Figure 6. PV cell dataset. (a) Original images; (b) enhanced images.
Figure 6. PV cell dataset. (a) Original images; (b) enhanced images.
Processes 13 02425 g006
Figure 7. Visualization of Comparative Experiment: (a) YOLOv3-tiny; (b) YOLOv5; (c) YOLOv5s; (d) YOLOv8s; (e) SEC-YOLOv8.
Figure 7. Visualization of Comparative Experiment: (a) YOLOv3-tiny; (b) YOLOv5; (c) YOLOv5s; (d) YOLOv8s; (e) SEC-YOLOv8.
Processes 13 02425 g007
Figure 8. Visual comparison of detection results: (a) YOLOv8; (b) SEC-YOLOv8.
Figure 8. Visual comparison of detection results: (a) YOLOv8; (b) SEC-YOLOv8.
Processes 13 02425 g008aProcesses 13 02425 g008b
Figure 9. Comparison of Precision-Recall Curve: (a) YOLOv8; (b) SEC-YOLOv8.
Figure 9. Comparison of Precision-Recall Curve: (a) YOLOv8; (b) SEC-YOLOv8.
Processes 13 02425 g009
Figure 10. Comparison of Feature Extraction Effects: (a) Original image; (b) YOLOv8; (c) SEC-YOLOv8.
Figure 10. Comparison of Feature Extraction Effects: (a) Original image; (b) YOLOv8; (c) SEC-YOLOv8.
Processes 13 02425 g010
Table 1. Comparison of the proposed SEC-YOLOv8 modules with the baseline YOLOv8.
Table 1. Comparison of the proposed SEC-YOLOv8 modules with the baseline YOLOv8.
Improved ComponentBaseline Model (YOLOv8)Proposed Model (SEC-YOLOv8)Core Task-Specific Rationale
Backbone PoolingSPPFSPPELANTo ensure efficiency for drone-based processing. a
Feature EnhancementNo attention mechanismECATo enhance focus on defects by filtering PV-specific noise. b
Neck UpsamplingNearest-Neighbor InterpolationCARAFETo preserve the fidelity of fine-grained defect details. c
Overall Synergistic EffectIndependent Module StackingTask-Specific Integrated PipelineA synergistic pipeline of Efficiency → Focus → Fidelity. d
Table notes: a Efficiency for Drones: For real-time applications on resource-limited UAVs, computational efficiency is paramount. We chose SPPELAN for its superior efficiency-to-performance ratio, which establishes a powerful yet lightweight feature foundation for the entire system. b Focus on Defects: PV images are notoriously noisy due to environmental factors like sun glare and shadows. The lightweight ECA module was specifically selected to act as a filter, enhancing the signal-to-noise ratio by guiding the model’s attention to subtle defect features. c Fidelity of Details: The detection of fine-grained defects like micro-cracks is often the final bottleneck. CARAFE was chosen for its content-aware upsampling, which prevents the loss of critical details during feature fusion by intelligently reconstructing the high-value features previously identified by ECA. d Synergistic Pipeline: This workflow was purposely built for the PV inspection task. SPPELAN provides an efficient data stream, ECA isolates the critical defect signal from that stream, and CARAFE ensures the signal is preserved with high fidelity for the final analysis. This integration allows the lightweight system to achieve performance superior to simply stacking individual components.
Table 2. Experimental environment.
Table 2. Experimental environment.
ItemEnvironment
Operating systemWindows11
RAM16GB
GPUNVIDIA GeForce RTX 4060
PythonPython 3.9
Deep learning frameworkPyTorch
Table 3. Parameter configuration.
Table 3. Parameter configuration.
HyperparametersParameter Set
Batch-size32
Epochs200
Learning rate0.01
Momentum0.937
OptimizerSGD
Table 4. Comparative experiment results.
Table 4. Comparative experiment results.
ModelsP (%)R (%)mAP@0.5 (%)Parameters (MB)
YOLOv3-tiny65.754.556.48.68
YOLOv570.164.764.67.02
YOLOv5s7868.169.27.04
YOLOv872.663.867.43.0
YOLOv8s7565.26911.13
SEC-YOLOv872.365.769.23.6
Table 5. Ablation experiment results.
Table 5. Ablation experiment results.
ModelsYOLOv8SPPELANECACARAFEP (%)R (%)mAP@0.5(%)Parameters (MB)FPS
1 72.663.867.43.0434.78
2 7463.968.43.4384.61
3 75.864.268.93.0476.19
4 70.963.3673.63400
5 71.866.268.63.49454
672.365.769.23.6416.67
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xue, H.; Liu, L.; Wu, Q.; He, J.; Fan, Y. Defect Detection Algorithm for Photovoltaic Cells Based on SEC-YOLOv8. Processes 2025, 13, 2425. https://doi.org/10.3390/pr13082425

AMA Style

Xue H, Liu L, Wu Q, He J, Fan Y. Defect Detection Algorithm for Photovoltaic Cells Based on SEC-YOLOv8. Processes. 2025; 13(8):2425. https://doi.org/10.3390/pr13082425

Chicago/Turabian Style

Xue, Haoyu, Liqun Liu, Qingfeng Wu, Junqiang He, and Yamin Fan. 2025. "Defect Detection Algorithm for Photovoltaic Cells Based on SEC-YOLOv8" Processes 13, no. 8: 2425. https://doi.org/10.3390/pr13082425

APA Style

Xue, H., Liu, L., Wu, Q., He, J., & Fan, Y. (2025). Defect Detection Algorithm for Photovoltaic Cells Based on SEC-YOLOv8. Processes, 13(8), 2425. https://doi.org/10.3390/pr13082425

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop