Improved YOLOv8-Based Hot Spot Detection Algorithm for Solar Panels

In the context of renewable energy, solar panels have become a critical component of global power generation. However, during long-term operation, solar panels are susceptible to hot spots caused by factors such as soiling, manufacturing defects, or environmental stresses. These hot spots lead to localized overheating, which can reduce efficiency, damage solar panels, and even pose fire hazards. Accurate and rapid detection of hot spots is therefore essential for maintaining the safety and performance of solar energy systems. Traditional methods for hot spot detection, often based on image processing and machine learning, struggle with robustness under varying environmental conditions. With advancements in deep learning, object detection algorithms, particularly those based on convolutional neural networks (CNNs), have shown significant promise. The YOLO (You Only Look Once) series, known for its real-time, end-to-end detection capabilities, has been widely applied. Yet, for hot spot detection in solar panels, challenges persist due to the small size of hot spots and interference from complex backgrounds. Small objects lose detail during network downsampling, while background noise from lighting or other artifacts can degrade detection accuracy. To address these issues, this work proposes an enhanced YOLOv8 model that integrates a small object detection layer, BiFPN for multi-scale feature fusion, a CBAM attention mechanism, and a WIoU loss function. These improvements aim to boost detection precision and robustness specifically for solar panel hot spot scenarios.

The proposed model builds upon the YOLOv8 architecture, which comprises a backbone for feature extraction, a neck for multi-scale feature fusion, and a head for detection. YOLOv8 utilizes CSPNet in the backbone to reduce redundancy and enhance feature extraction, while the neck combines FPN and PANet for bidirectional feature fusion. The head adopts an anchor-free approach for efficient inference. However, for hot spot detection in solar panels, the standard model may miss small targets due to insufficient detail retention. Therefore, we introduce a small object detection layer that leverages high-resolution feature maps (e.g., 160×160) to preserve fine-grained information. To mitigate computational overhead, we replace some convolutions with depthwise separable convolutions, reducing parameters and computations. Additionally, we replace the neck’s feature fusion module with BiFPN, which employs skip connections and learnable weighting to better integrate features across scales. This is crucial for solar panels, where hot spots vary in size and context. Furthermore, we incorporate the CBAM attention mechanism at the end of each backbone layer to enhance focus on relevant channels and spatial regions, suppressing background noise common in solar panel imagery. Finally, we substitute the original loss function with WIoU to improve bounding box regression sensitivity, especially for small hot spots. The overall architecture of our improved model is designed to optimize detection performance while maintaining efficiency for real-world solar panel monitoring applications.

To elaborate, the small object detection layer is added to the neck section, processing shallow feature maps with high resolution. This allows the model to capture minute details of hot spots in solar panels, which might otherwise be lost. The layer is coupled with a corresponding detection head, ensuring that small targets are adequately recognized. The use of depthwise separable convolutions helps keep the model lightweight, as shown in Table 1, which compares parameters and computations. For multi-scale feature fusion, BiFPN enhances information flow by enabling repeated top-down and bottom-up interactions. This bidirectional approach ensures that both semantic and detailed features are utilized effectively, improving detection across various hot spot sizes in solar panels. The CBAM attention mechanism consists of two sequential sub-modules: channel attention and spatial attention. The channel attention module computes weights based on global average and max pooling, focusing on important feature channels for hot spot characteristics in solar panels. The spatial attention module generates weights highlighting key spatial locations, aiding in precise localization. Mathematically, the channel attention can be expressed as:

$$M_c(F) = \sigma(MLP(AvgPool(F)) + MLP(MaxPool(F)))$$

where \( \sigma \) is the sigmoid activation function, \( MLP \) denotes a multilayer perceptron, and \( F \) is the input feature map. The spatial attention is given by:

$$M_s(F) = \sigma(f^{7 \times 7}([AvgPool(F); MaxPool(F)]))$$

where \( f^{7 \times 7} \) represents a convolution with a 7×7 kernel. By integrating CBAM, the model becomes more attuned to hot spot regions in solar panels, reducing false positives from background clutter. The WIoU loss function addresses limitations of traditional IoU losses by incorporating an outlierness metric and a dynamic non-monotonic focusing mechanism. This is particularly beneficial for small hot spot detection in solar panels, as it sensitizes the model to minor bounding box deviations. The WIoU loss is defined as:

$$L_{WIoU_v3} = r L_{WIoU_v1}$$

with \( L_{WIoU_v1} = R_{WIoU} L_{IoU} \), where \( R_{WIoU} \) accounts for center distance normalization, and \( r \) is a non-monotonic focusing parameter based on outlierness. This formulation accelerates convergence and enhances regression accuracy for solar panel hot spots.

For experimental validation, we curated a dataset of solar panel infrared images containing hot spots. The dataset was collected via drone-mounted thermal cameras, annotated using labeling tools, and split into training, validation, and test sets. Data augmentation techniques, such as random rotations, flips, and brightness adjustments, were applied to increase diversity and reduce overfitting. The augmented dataset helps the model generalize better to real-world solar panel conditions. Table 2 summarizes the experimental environment, including hardware and software configurations. Training parameters were set consistently across experiments to ensure fair comparisons. Evaluation metrics primarily focused on mean average precision (mAP) at an IoU threshold of 0.5, alongside parameter counts and computational loads to assess efficiency. The mAP is computed as:

$$mAP = \frac{\sum_{j=1}^{c} AP_j}{c}$$

where \( AP_j \) is the average precision for each class, and \( c \) is the number of classes (in this case, hot spots for solar panels). Precision and recall are derived from true positives (TP), false positives (FP), and false negatives (FN), essential for measuring detection performance in solar panel monitoring.

Table 1: Comparison of Model Parameters and Computations for Solar Panel Hot Spot Detection
Model Component Parameters (×10⁶) Computations (×10⁹) Impact on Solar Panel Detection
Original YOLOv8n Backbone 3.01 4.10 Baseline for solar panel feature extraction
With Small Object Layer 2.41 3.66 Enhances detail capture for small hot spots in solar panels
With BiFPN Fusion 2.43 3.71 Improves multi-scale feature integration for solar panels
With CBAM Attention 2.43 3.73 Boosts focus on hot spot regions in solar panels
Full Improved Model 2.43 3.73 Optimal balance for solar panel hot spot detection

Ablation studies were conducted to isolate the contributions of each improvement. Starting from the base YOLOv8n model (Model A), we incrementally added modules: small object detection layer (Model B), BiFPN (Model C), CBAM (Model D), and WIoU loss (Model E). Results, as shown in Table 3, demonstrate that each module positively impacts mAP for solar panel hot spot detection. The small object layer alone increased mAP by 2.8%, highlighting its importance for small targets in solar panels. BiFPN added a further 1.0% gain, showcasing better feature utilization across scales. CBAM provided an additional 0.6% improvement, emphasizing the value of attention in noisy solar panel backgrounds. Finally, WIoU loss boosted mAP to 80.8%, a total increase of 5.1% over the baseline. Notably, parameter and computation counts decreased slightly due to depthwise separable convolutions, making the model more efficient for deployment in solar panel inspection systems.

Table 2: Experimental Environment and Training Parameters for Solar Panel Hot Spot Detection
Configuration Specification Role in Solar Panel Experiments
Operating System Windows 11 64-bit Platform for running detection algorithms on solar panel data
CPU Intel Core i5-12490F Handles preprocessing of solar panel infrared images
GPU NVIDIA GeForce RTX 3060 (12 GB) Accelerates deep learning training for solar panel hot spot models
Memory 32 GB Supports large datasets of solar panel thermal images
Framework PyTorch 1.7.1 with CUDA 11.0 Enables efficient model implementation for solar panel applications
Batch Size 8 Optimizes gradient updates during solar panel model training
Initial Learning Rate 0.01 Controls convergence speed for solar panel hot spot detection
Epochs 300 Ensures thorough learning on solar panel dataset
Image Size 640×640 Standardizes input dimensions for solar panel infrared scans
Optimizer SGD Minimizes loss function for solar panel hot spot prediction

To further analyze module synergies, we tested combinations such as CBAM with BiFPN, and small object layer with WIoU loss. Table 4 presents these results, indicating that CBAM and BiFPN together yield a 1.8% mAP increase, surpassing their individual gains, due to enhanced feature refinement and focus for solar panels. Similarly, the small object layer combined with WIoU loss achieves a 4.0% boost, underscoring their complementary roles in detecting and localizing small hot spots in solar panels. The training process, illustrated via loss and mAP curves, shows that our improved model converges faster and reaches higher mAP values compared to the original YOLOv8n, confirming its efficacy for solar panel hot spot tasks. Visual detection results also reveal fewer missed hot spots and more accurate bounding boxes in complex solar panel scenes, validating the model’s robustness.

Table 3: Ablation Study Results for Solar Panel Hot Spot Detection (mAP@0.5)
Model Small Object Layer BiFPN CBAM WIoU Loss mAP (%) Parameters (×10⁶) Computations (×10⁹)
A (Baseline) × × × × 75.7 3.01 4.10
B × × × 78.5 2.41 3.66
C × × 79.5 2.43 3.71
D × 80.1 2.43 3.73
E (Improved) 80.8 2.43 3.73

Comparative experiments were performed against other lightweight detection algorithms to benchmark our improved model. As summarized in Table 5, our model achieves an mAP of 80.8%, outperforming YOLOv4-tiny (71.0%), YOLOv5s (75.7%), YOLOv7-tiny (75.9%), and the original YOLOv8n (75.7%) for solar panel hot spot detection. This represents improvements of 9.8%, 5.1%, 4.9%, and 5.1%, respectively. Moreover, our model maintains lower parameter and computation counts, demonstrating a favorable trade-off between accuracy and efficiency for solar panel applications. The superior performance stems from the integrated enhancements tailored to small targets and complex backgrounds in solar panel imagery. For instance, the small object layer preserves details, BiFPN enriches multi-scale context, CBAM reduces noise interference, and WIoU sharpens localization—all critical for reliable hot spot detection in solar panels. These results underscore the model’s potential for real-time monitoring in solar farms, where quick and accurate identification of hot spots can prevent energy losses and safety hazards.

Table 4: Synergistic Effects of Modules on Solar Panel Hot Spot Detection (mAP@0.5)
Model Small Object Layer BiFPN CBAM WIoU Loss mAP (%) Explanation for Solar Panel Context
A × × × × 75.7 Baseline for solar panel hot spot detection
B × × × 78.5 Small object layer aids in spotting tiny hot spots in solar panels
C × × × 76.5 BiFPN improves multi-scale fusion for varying solar panel hot spot sizes
D × × × 76.1 CBAM enhances focus on relevant solar panel regions
E × × × 76.3 WIoU loss refines bounding box regression for solar panel hot spots
F × × 77.5 Combined BiFPN and CBAM boost feature quality for solar panels
G × × 79.5 Small object layer with WIoU optimizes small hot spot detection in solar panels

The effectiveness of our approach can be further understood through mathematical analysis. For the WIoU loss, the outlierness metric \( \beta \) is computed as:

$$\beta = \frac{L^*_{IoU}}{L_{IoU}}$$

where \( L^*_{IoU} \) is the ideal IoU loss. This dynamically adjusts weights during training, making the model more sensitive to small hot spots in solar panels. Additionally, the CBAM mechanism’s dual attention ensures that both channel-wise and spatial information are prioritized, which is vital for distinguishing hot spots from background artifacts in solar panel thermal images. In practice, this means the model can ignore irrelevant features, such as cloud shadows or panel frames, and concentrate on anomalous temperature zones indicative of hot spots. The integration of these modules creates a cohesive system that addresses the unique challenges of solar panel hot spot detection, including scale variation, noise, and small object prevalence.

Table 5: Performance Comparison with Other Algorithms for Solar Panel Hot Spot Detection
Model mAP@0.5 (%) Parameters (×10⁶) Computations (×10⁹) Remarks for Solar Panel Applications
YOLOv4-tiny 71.0 5.9 8.0 Less accurate for small hot spots in solar panels
YOLOv5s 75.7 7.1 8.2 Moderate performance but higher complexity for solar panels
YOLOv7-tiny 75.9 6.0 6.6 Lightweight but suboptimal for solar panel hot spot details
YOLOv8n 75.7 3.0 4.1 Baseline with room for improvement in solar panel contexts
Our Improved Model 80.8 2.4 3.7 Best balance of accuracy and efficiency for solar panel hot spots

In conclusion, we have developed an enhanced YOLOv8-based algorithm for detecting hot spots in solar panels. By incorporating a small object detection layer, BiFPN feature fusion, CBAM attention mechanism, and WIoU loss function, the model achieves significant gains in mAP while reducing computational overhead. The improvements are particularly beneficial for small target detection and robustness against complex backgrounds, common issues in solar panel monitoring. Ablation and comparison experiments validate the contributions of each module, showing that our model outperforms existing lightweight detectors. This work demonstrates the potential of tailored deep learning solutions for maintaining solar panel health, contributing to safer and more efficient solar energy systems. Future directions may include extending the model to handle other solar panel defects or integrating it with drone-based inspection platforms for large-scale deployment.

Scroll to Top