As solar energy becomes a cornerstone of renewable energy systems, maintaining the efficiency of solar panel is critical. One significant challenge is the detection of hot spots—localized overheating regions caused by shading, dust, or defects. This study investigates both traditional image processing and machine learning-based approaches to detect hot spots in solar panel using thermal infrared imaging.

1. Introduction
Solar panel operate in harsh outdoor environments, making them susceptible to hot spots. These hotspots reduce energy output and pose fire risks. Traditional methods rely on manual inspection, which is time-consuming and error-prone. Automated detection using thermal imaging offers a scalable solution. This research evaluates classical image processing techniques and proposes an improved YOLOv4 model for robust hot spot detection in solar panel.
2. Traditional Image Processing Methods
Traditional approaches focus on segmenting or enhancing thermal images to highlight hot spots.
2.1 Region Segmentation
Threshold Segmentation:
This method converts images to grayscale and applies a threshold to isolate hot spots. Let the grayscale intensity of a pixel be I(x,y)I(x,y). The binary output B(x,y)B(x,y) is:B(x,y)={1if I(x,y)≥T0otherwiseB(x,y)={10if I(x,y)≥Totherwise
where TT is the threshold. However, noise and background similarity lead to false positives (Table 1).
Histogram Equalization:
Enhances contrast by redistributing pixel intensities. For an image with cumulative distribution CDF(k)CDF(k), the transformed intensity I′(x,y)I′(x,y) is:I′(x,y)=round(CDF(I(x,y))−CDFmin(M×N)−CDFmin×(L−1))I′(x,y)=round((M×N)−CDFminCDF(I(x,y))−CDFmin×(L−1))
where M×NM×N is the image size and LL is the intensity range. Over-enhancement complicates hot spot separation (Table 1).
HSV Color Extraction:
Hot spots in HSV space exhibit distinct hue (HH) and value (VV) characteristics. By filtering specific HSV ranges, hot spots are segmented. For a pixel with HSV values (H,S,V)(H,S,V):Segment if H∈[Hmin,Hmax] and V≥VthresholdSegment if H∈[Hmin,Hmax] and V≥Vthreshold
This method performs well but depends on image quality.
2.2 Edge Detection
Sobel Operator:
Calculates gradients using horizontal (GxGx) and vertical (GyGy) kernels:Gx=[−101−202−101],Gy=[−1−2−1000121]Gx=−1−2−1000121,Gy=−101−202−101
The gradient magnitude GG is:G=Gx2+Gy2G=Gx2+Gy2
Noise and weak edges cause false detections.
Canny Edge Detection:
A multi-stage algorithm involving Gaussian smoothing, gradient computation, non-maximum suppression, and hysteresis thresholding. Let TlowTlow and ThighThigh be thresholds. Edges are retained if:G≥ThighorG≥Tlow and connected to G≥ThighG≥ThighorG≥Tlow and connected to G≥Thigh
Threshold selection critically impacts accuracy (Table 1).
Table 1: Performance of Traditional Methods
| Method | Precision (%) | Recall (%) | IoU (%) |
|---|---|---|---|
| Threshold Segmentation | 72.3 | 68.5 | 65.8 |
| Histogram Equalization | 69.1 | 64.2 | 61.4 |
| HSV Extraction | 81.5 | 75.8 | 73.2 |
| Sobel Edge Detection | 66.7 | 70.1 | 62.9 |
| Canny Edge Detection | 74.2 | 73.6 | 69.5 |
3. Improved YOLOv4 for Solar Panel Hot Spot Detection
Machine learning methods, particularly YOLOv4, overcome limitations of traditional techniques by learning multi-dimensional features.
3.1 Dataset Construction
- Data Acquisition: 1,410 thermal images (560×350 resolution) of solar panel was captured, combining real-world and simulated hot spots.
- Augmentation: Rotation (±15°), scaling (0.8–1.2x), flipping (horizontal/vertical), and random cropping were applied to prevent overfitting.
3.2 Network Architecture
The original YOLOv4 backbone (CSPDarkNet53) was replaced with MobileNetV3 for efficiency. Key modifications:
- Depthwise Separable Convolutions: Reduce parameters while preserving accuracy.
- h-swish Activation: Replaces ReLU6 for better gradient flow:
h-swish(x)=x⋅ReLU6(x+3)6h-swish(x)=x⋅6ReLU6(x+3)
- SENet Attention: Enhances feature channel weights:
zc=1H×W∑i=1H∑j=1WFc(i,j),s=σ(W2⋅δ(W1⋅z))zc=H×W1i=1∑Hj=1∑WFc(i,j),s=σ(W2⋅δ(W1⋅z))
where FcFc is the feature map, σσ is sigmoid, and δδ is ReLU.
Table 2: Improved YOLOv4 Architecture
| Component | Description |
|---|---|
| Backbone | MobileNetV3 with SENet attention |
| Neck | SPP + PANet |
| Head | YOLO Head with CIoU loss |
3.3 Training and Evaluation
- Loss Function: CIoU loss combines overlap, center distance, and aspect ratio:
LCIoU=1−IoU+ρ2(b,bgt)c2+αvLCIoU=1−IoU+c2ρ2(b,bgt)+αv
where ρρ is Euclidean distance, cc is diagonal length, vv measures aspect ratio consistency, and α=v(1−IoU)+vα=(1−IoU)+vv.
- Hyperparameters: Initial learning rate = 0.001, batch size = 16, Adam optimizer.
Table 3: Performance Comparison
| Model | AP (%) | IoU (%) | Precision (%) | Recall (%) |
|---|---|---|---|---|
| SSD | 87.29 | 89.69 | 87.54 | 85.39 |
| Faster R-CNN | 92.17 | 93.61 | 91.26 | 90.68 |
| YOLOv4 | 90.03 | 91.81 | 91.28 | 90.12 |
| Improved YOLOv4 | 93.42 | 92.31 | 94.36 | 92.27 |
4. Discussion
Traditional methods struggle with noise and dependency on image quality, while the improved YOLOv4 excels in solar panel hot spot detection. The SENet attention mechanism and MobileNetV3 backbone enhance feature learning, achieving 93.42% AP and 92.31% IoU.
5. Conclusion
This study demonstrates that machine learning, particularly the improved YOLOv4, outperforms traditional image processing in detecting hot spots in solar panel. The proposed model offers high precision, recall, and robustness, making it suitable for large-scale solar farm inspections. Future work will focus on real-time deployment and multi-panel analysis.
