2510001741
  • Open Access
  • Article

Dynamic Attention and Context-Aware Feature Fusion for Multi-Scale Solar Panel Defect Detection

  • Ali Farajzadeh Bavil 1,   
  • Mahdi Khodayar 1,   
  • Jacob Regan 1,   
  • Mohammad E. Khodayar 2,*

Received: 21 Jun 2025 | Revised: 18 Aug 2025 | Accepted: 16 Oct 2025 | Published: 18 Nov 2025

Abstract

Ensuring the accurate detection of surface flaws in PV panels is vital for preserving energy efficiency and minimizing future repair expenses. Nevertheless, the diverse nature of these defects in terms of size, shape, and visibility presents significant localization challenges. Conventional models typically rely on fixed feature hierarchies, uniform spatial weighting, and static fusion strategies. These limitations restrict their ability to capture defects across scales, emphasize relevant regions, and integrate semantic information effectively under visually complex conditions. To overcome these challenges, we propose a Multi-Scale Attention-based Convolutional Neural Network (MSA-CNN), which is a compact detection framework composed of three specialized modules. The multi-scale feature extraction module first captures spatial patterns at varying resolutions through parallel convolutional branches, addressing scale-related limitations. These features are then refined by the dynamic attention module, which adaptively emphasizes defect-relevant regions based on spatial context. Finally, the context-aware fusion module integrates the attention-enhanced features by selectively combining multi-level information, producing semantically consistent representations for accurate detection. Experimental results on the PV Multi-Defect dataset show that MSA-CNN outperforms a range of state-of-the-art methods across all key detection metrics by achieving higher accuracy across all metrics and defect categories, with notable improvements in detecting small, low-contrast, and structurally irregular faults.

References 

  • 1.
    Li, L.; Wang, Z.; Zhang, T. Gbh-yolov5: Ghost convolution with bottleneckcsp and tiny target prediction head incorporating yolov5 for pv panel defect detection. Electronics 2023, 12, 561.
  • 2.
    Tang, W.; Yang, Q.; Dai, Z.; et al. Module defect detection and diagnosis for intelligent maintenance of solar photovoltaic plants: Techniques, systems and perspectives. Energy 2024, 297, 131222.
  • 3.
    Hijjawi, U.; Lakshminarayana, S.; Xu, T.; et al. A review of automated solar photovoltaic defect detection systems: Approaches, challenges, and future orientations. Sol. Energy 2023, 266, 112186.
  • 4.
    Juan, R.O.S.; Kim, J. Photovoltaic Cell Defect Detection Model Based-On Extracted Electroluminescence Images Using SVM s. In Proceedings of the 2020 International Conference on Artificial Intelligence in Information and Communication (ICAIIC), Fukuoka, Japan, 19–21 February 2020; pp. 578–582.
  • 5.
    Patel, A.V.; McLauchlan, L.; Mehrubeoglu, M. Defect Detection in PV Arrays Using Image Processing. In Proceedings of the 2020 International Conference on Computational Science and Computational Intelligence (CSCI), Vegas, NV, USA, 16–18 December 2020; pp. 1653–1657.
  • 6.
    Guan, Y.; Wu, G.; Huang, W.; et al. Gray Level Co-Occurrence Matrix-Based Defect Detection Method for Photovoltaic Power Plant Panels. In Proceedings of the 2023 International Conference on Computers, Information Processing and Advanced Education (CIPAE), Ottawa, ON, Canada, 26–28 August 2023; pp. 703–707.
  • 7.
    Bordihn, S.; Fladung, A.; Schlipf, J.; et al. Machine Learning Based Identification and Classification of Field-Operation Caused Solar Panel Failures Observed in Electroluminescence Images. IEEE J. Photovolt. 2022, 12, 827–832.
  • 8.
    Dolatyabi, P.; Regan, J.; Khodayar, M. Deep Learning for Traffic Scene Understanding: A Review. IEEE Access 2025, 13, 13187–13237.
  • 9.
    Regan, J.; Khodayar, M. A triplet graph convolutional network with attention and similarity-driven dictionary learning for remote sensing image retrieval. Expert Syst. Appl. 2023, 232, 120579.
  • 10.
    Saffari, M.; Khodayar, M. Low-Rank Sparse Generative Adversarial Unsupervised Domain Adaptation for Multitarget Traffic Scene Semantic Segmentation. IEEE Trans. Ind.Inform. 2024, 20, 2564–2576.
  • 11.
    Masita, K.; Hasan, A.; Shongwe, T.; et al. Deep Learning in Defects detection of PV modules: A Review. Sol. Energy Adv. 2025, 5, 100090.
  • 12.
    Rocha, D.; Alves, J.; Lopes, V.; et al. Multidefect detection tool for large-scale PV plants: Segmentation and classification. IEEE J. Photovolt. 2023, 13, 291–295.
  • 13.
    Tang, W.; Yang, Q.; Xiong, K.; et al. Deep learning based automatic defect identification of photovoltaic module using electroluminescence images. Sol. Energy 2020, 201, 453–460.
  • 14.
    Zyout, I.; Oatawneh, A. Detection of PV Solar Panel Surface Defects Using Transfer Learning of the Deep Convolutional Neural Networks. In Proceedings of the 2020 Advances in Science and Engineering Technology International Conferences (ASET), Dubai, United Arab Emirates, 4 February–9 April 2020; pp. 1–4.
  • 15.
    Zhang, Z.; Cao, Y.; Yang, Q. Defect Detection and Classification of Photovoltaic Modules Based on Image Fusion Analysis. In Proceedings of the 2022 IEEE 6th Conference on Energy Internet and Energy System Integration (EI2), Chengdu, China, 11–13 November 2022; pp. 2460–2465.
  • 16.
    Nagar, S.; Mishra, M.K.; Rai, P.K. Using Densenet169 for Image-Based Classification of Solar Panel Defects. In Proceedings of the 7th International Conference on Contemporary Computing and Informatics (IC3I), Greater Noida, India, 18–20 September 2024; pp. 479–484.
  • 17.
    Ma, W.; Chen, B.; Wang, B.; et al. Photovoltaic Panel Defect Detection via Multi-scale Siamese Convolutional Fusion Network with Information Bottleneck Theory. IEEE Trans. Instrum. Meas. 2024, 73, 5030815.
  • 18.
    Zhou, P.; Fang, H.; Wu, G. PDeT: A Progressive Deformable Transformer for Photovoltaic Panel Defect Segmentation. Sensors 2024, 24, 6908.
  • 19.
    Saffari, M.; Khodayar, M.; Jalali, S.M.J. Sparse Adversarial Unsupervised Domain Adaptation with Deep Dictionary Learning for Traffic Scene Classification. IEEE Trans. Emerg. Top. Comput. Intell. 2023, 7, 1139–1150.
  • 20.
    Hussain, M.; Khanam, R. In-depth review of yolov1 to yolov10 variants for enhanced photovoltaic defect detection. Solar 2024, 4, 351–386.
  • 21.
    Di Tommaso, A.; Betti, A.; Fontanelli, G.; et al. A multi-stage model based on YOLOv3 for defect detection in PV panels based on IR and visible imaging by unmanned aerial vehicle. Renew. Energy 2022, 193, 941–962.
  • 22.
    Zhang, M.; Yin, L. Solar cell surface defect detection based on improved YOLO v5. IEEE Access 2022, 10, 80804–80815.
  • 23.
    Liu, H.; Zhang, F. A Photovoltaic Panel Defect Detection Method Based on the Improved Yolov7. In Proceedings of the 2024 5th International Conference on Mechatronics Technology and Intelligent Manufacturing (ICMTIM), Nanjing, China, 26–28 April 2024; pp. 359–362.
  • 24.
    Wang, Y.; Zhao, J.; Yan, Y.; et al. Pushing the boundaries of solar panel inspection: Elevated defect detection with yolov7-gx technology. Electronics 2024, 13, 1467.
  • 25.
    Hu, H.; Li, Y.; Wang, J.; et al. Aerial Photovoltaic Panel Infrared Image Defect Detection Method Based on Improved YOLOv8. In Proceedings of the 2024 9th International Conference on Intelligent Computing and Signal Processing (ICSP), Xian, China, 19–21 April 2024; pp. 1777–1780.
  • 26.
    Tzutalin. LabelImg. Available online: https://github.com/tzutalin/labelImg (accessed on 23 October 2025).
  • 27.
    Kong, X.; Xu, W.; Xu, B.; et al. Defect detection of photovoltaic modules based on improved SSD algorithm. In Proceedings of the 2023 International Conference on Image Processing, Computer Vision and Machine Learning (ICICML), Chengdu, China, 3–5 November 2023; pp. 1063–1066.
Share this article:
How to Cite
Bavil, A. F.; Khodayar, M.; Regan, J.; Khodayar, M. E. Dynamic Attention and Context-Aware Feature Fusion for Multi-Scale Solar Panel Defect Detection. AI Engineering 2025, 1 (1), 6. https://doi.org/10.53941/aieng.2025.100006.
RIS
BibTex
Copyright & License
article copyright Image
Copyright (c) 2025 by the authors.