Solar panel fault detection represents a critical challenge in photovoltaic system maintenance due to limited annotated datasets and complex environmental imaging conditions. This study introduces a novel bio-inspired loss function integrated within a Latent Diffusion Model framework to address dataset constraints while enhancing fault detection accuracy. The proposed methodology employs a metaheuristic optimization strategy that emulates behavioral patterns observed in bald uakari monkeys, translating their adaptive foraging mechanisms into computational optimization processes. The framework comprises five synergistic loss components targeting specific photovoltaic image characteristics: surface texture preservation, feature conservation, thermal pattern similarity, structural defect enhancement, and behavioral optimization. Experimental validation on 15,847 high-resolution images (1024×1024 pixels) from solar installations across Alexandria, California, and Bavaria demonstrates exceptional performance. The proposed method achieves 96.51% accuracy, 97.12% precision, 96.84% recall, and 96.98% F1-score, representing statistically significant improvements (p < 0.001) over existing state-of-the-art methods that typically achieve 93-95% accuracy. The synthetic image generation component demonstrates an Inception Score of 82.47 and Fréchet Inception Distance of 164.92, indicating high-quality data augmentation with effective diversity preservation. Visual quality metrics reveal Peak Signal-to-Noise Ratio of 88.15% and Structural Similarity Index of 89.23%, confirming preservation of essential diagnostic features. The Matthews Correlation Coefficient of 0.957 indicates robust performance on imbalanced datasets. Cross-validation studies confirm strong generalization across diverse installation types and environmental conditions, establishing the framework as a significant advancement in automated photovoltaic fault detection systems.
Mahmoud et al. (Fri,) studied this question.