An Intelligent Detection System for Solar Panel Defects Using MobileNetV2-C-SSD

In the solar energy industry, the quality of solar panels is critical for the efficiency of photovoltaic power generation. However, due to manufacturing processes and environmental factors, solar panels made from silicon crystalline semiconductors are prone to surface defects such as cracks, finger interruptions, and missing corners. Traditional defect detection methods for solar panels heavily rely on manual visual inspection, which is not only labor-intensive but also suffers from low efficiency and high rates of false positives and missed detections. Moreover, conventional electrical luminescence (EL) detection techniques require significant human intervention, reducing detection efficiency and introducing variability in defect identification.

With the rapid development of deep learning, convolutional neural networks have shown great potential in object detection tasks, including defect detection for solar panels. However, deploying deep learning models in industrial environments demands consideration of computational resources, memory constraints, and power consumption. Lightweight network architectures become essential for real-time, low-power detection systems. In this study, we propose an intelligent detection system for solar panel defects based on an enhanced MobileNetV2-C-SSD algorithm. Our system integrates image preprocessing with CLAHE (Contrast Limited Adaptive Histogram Equalization), replaces the original VGG-16 backbone of SSD with MobileNetV2, and achieves a balance between detection accuracy and model efficiency. Experiments on a public solar panel dataset demonstrate that our method significantly reduces the model size to one-sixth of the original while improving the mean average precision (mAP) by 4.06 percentage points.

System Framework and Software Architecture

We designed a complete intelligent detection system for solar panels, comprising hardware modules and a control software suite. The system automates the entire workflow: solar panel samples are transported via AGV carts to the inspection station, where high-resolution images are captured. The detection algorithm processes these images in real time, classifying each solar panel as defective or non-defective. The control software, modeled using UML (Unified Modeling Language), provides four main functions: sample management, defect type management, result query and analysis, and user management. Users can log in, upload images remotely, view historical detection records, and obtain statistical reports.

The system architecture is modular, allowing easy integration with existing production lines. The software backend uses a relational database to store detection results, and a lightweight web interface enables remote monitoring. By combining AGV automation with deep learning-based inspection, our system significantly reduces human labor and improves the consistency of defect detection for solar panels.

MobileNetV2-C-SSD Algorithm

Baseline SSD Architecture

The Single Shot MultiBox Detector (SSD) is a popular object detection framework that uses VGG-16 as its backbone. It extracts feature maps from six different layers (Conv4_3, fc_7, Conv6_2, Conv7_2, Conv8_2, Conv9_2) and performs detection at multiple scales. SSD inherits the regression idea from YOLO and the anchor box mechanism from Faster R-CNN, making it an end-to-end model that simultaneously predicts object categories and bounding box offsets. However, the original SSD model with VGG-16 is heavy, with over 100 million parameters, making it unsuitable for embedded devices with limited memory and computational power.

CLAHE Image Enhancement

To improve the visibility of solar panel defects in EL images, we apply Contrast Limited Adaptive Histogram Equalization (CLAHE). Traditional histogram equalization often amplifies noise and produces unnatural contrast in images with non-uniform illumination. CLAHE overcomes this by dividing the image into small tiles and applying histogram equalization locally, with a contrast limit to prevent over-enhancement.

Let \( I(x,y) \) be the pixel value at coordinate \((x,y)\) in the original image, and \( I_{\text{clahe}}(x,y) \) be the output after CLAHE processing. The algorithm operates as follows:

1. Divide the image into \( N \times N \) non-overlapping tiles: \( I_{\text{block}}(x,y) \).

2. Compute the cumulative distribution function (CDF) for each tile: \( \text{CDF}_{\text{block}}(I_{\text{block}}) \).

3. Perform histogram equalization within each tile.

4. Clip the histogram at a predefined contrast limit \( C \) to control the enhancement.

After CLAHE processing, the defect regions in solar panel images become more prominent, facilitating subsequent detection by the neural network. We used the PVEL-AD dataset (a public dataset for solar panel anomaly detection) to validate the effectiveness of CLAHE; visual comparisons showed clearer defect boundaries after enhancement.

Lightweight Backbone: MobileNetV2

MobileNetV2 is a lightweight convolutional neural network designed by Google. It introduces several innovations over its predecessor MobileNetV1: depthwise separable convolutions, inverted residual structures, and linear bottlenecks. These techniques drastically reduce the number of parameters and computational cost while maintaining high accuracy.

Depthwise Separable Convolution

Standard convolution applies a single kernel to all input channels simultaneously. In contrast, depthwise separable convolution splits the operation into two steps: depthwise convolution and pointwise convolution. In depthwise convolution, each input channel is convolved with its own kernel, producing an output feature map with the same number of channels as the input. Then, pointwise convolution (a 1×1 convolution) combines these channels to produce the desired output channels.

Let the input have \( M \) channels, the kernel size be \( K_w \times K_h \), the input feature map size be \( P_w \times P_h \), and the output have \( N \) channels. For standard convolution:

Parameter count:

$$ C_{\text{std}} = K_w \times K_h \times M \times N $$

Computation count (number of multiply-adds):

$$ S_{\text{std}} = C_{\text{std}} \times (P_w – K_w + 1) \times (P_h – K_h + 1) $$

For depthwise separable convolution, the depthwise part has:

$$ C_{\text{dw}} = K_w \times K_h \times M $$
$$ S_{\text{dw}} = C_{\text{dw}} \times (P_w – K_w + 1) \times (P_h – K_h + 1) $$

The pointwise part has:

$$ C_{\text{pw}} = 1 \times 1 \times M \times N $$
$$ S_{\text{pw}} = C_{\text{pw}} \times T_w \times T_h $$
where \( T_w \) and \( T_h \) are the width and height of the feature map after depthwise convolution. The total parameter count is \( C_{\text{dw}} + C_{\text{pw}} \) and total computation is \( S_{\text{dw}} + S_{\text{pw}} \). The ratio of computation between depthwise separable and standard convolution is:

$$ \frac{S_{\text{dw}} + S_{\text{pw}}}{S_{\text{std}}} = \frac{1}{N} + \frac{T_w T_h}{K (P_w – K_w + 1)(P_h – K_h + 1)} $$

Typically, this ratio is much smaller than 1, leading to significant reduction in computational load. For example, with a 3×3 kernel and typical feature map sizes, the cost can be reduced by a factor of 8–9.

Inverted Residual Structure and Linear Bottleneck

MobileNetV2 uses an inverted residual block: it first expands the number of channels using a 1×1 pointwise convolution (with ReLU6 activation), then applies a 3×3 depthwise convolution, and finally compresses the channels back using a 1×1 pointwise convolution without a non-linear activation (linear bottleneck). This design allows the network to learn richer features while keeping the model compact. The inverted residual structure is effective because it avoids information loss caused by ReLU in low-dimensional spaces.

Our proposed MobileNetV2-C-SSD architecture replaces the VGG-16 backbone of SSD with MobileNetV2. We select six feature layers from MobileNetV2: Conv11, Conv13, and the additional SSD layers Conv14_2, Conv15_2, Conv16_2, and Conv18_2. This configuration balances the detection of small and large defects in solar panels.

Experimental Setup and Results

Dataset and Preprocessing

We used the public PVEL-AD dataset, which contains 365,431 images of solar panel EL inspection, including 12 defect categories and one normal category. From the annotated subset, we used 4,500 labeled images, split into 3,645 for training, 405 for validation, and 450 for testing. Defect types include cracks (linear and star-shaped), finger interruptions, black core, misalignment, thick line, scratch, fragment, missing corner, and material defects. All images were preprocessed with CLAHE to enhance defect visibility. Input size was resized to 1024×1024 pixels.

Implementation Details

We implemented our models in PyTorch 2.0.0 with CUDA 11.8 on an Intel i7-8750H CPU, 24 GB RAM, and an NVIDIA RTX 4090D GPU. Training hyperparameters are listed in the table below.

Training Hyperparameters
Parameter Value
Number of epochs 200
Batch size 8
Initial learning rate 2×10⁻⁵
IOU threshold for positive match 0.45
Optimizer SGD with momentum 0.9
Weight decay 5×10⁻⁴

Evaluation Metrics

We evaluated models using model size (MB), average precision (AP) for each defect category at IOU threshold 0.5, and mean average precision (mAP) across all categories. Additionally, we measured inference time per image (ms).

Comparison of Different Backbones

We compared three configurations: SSD with VGG-16, SSD with MobileNetV2 (without CLAHE), and our proposed MobileNetV2-C-SSD (with CLAHE). The training loss curves are shown in Figure (not displayed here, but analyzed). Our model converged faster and achieved lower final loss. The AP values for each defect type are given in the following table.

Average Precision (AP@0.5) for Each Defect Category
Defect Type SSD (VGG-16) MobileNetV2-SSD MobileNetV2-C-SSD (Ours)
Black Core 0.9894 0.9892 0.9897
Crack 0.5811 0.3932 0.4054
Finger 0.8415 0.7210 0.7214
Horizontal Dislocation 0.8774 0.9786 1.0000
Short Circuit 1.0000 1.0000 1.0000
Star Crack 0.5330 0.4101 0.4723
Thick Line 0.7449 0.7490 0.7474
Vertical Dislocation 0.5714 0.6875 0.9167

Our MobileNetV2-C-SSD achieved the highest AP in several categories, especially in horizontal dislocation (1.0) and vertical dislocation (0.9167), significantly outperforming the baseline. The overall mAP comparison is shown below.

Overall Model Performance Comparison
Model Model Size (MB) mAP @ IOU≥0.5 Inference Time (ms)
SSD-VGG16 105.2 0.6820 23.6
MobileNetV2-SSD 18.1 0.7410 15.2
MobileNetV2-C-SSD (Ours) 18.1 0.7816 14.9

Our method achieved an mAP of 0.7816, which is 4.06 percentage points higher than the standard MobileNetV2-SSD and 9.96 points higher than the VGG-16-based SSD. The model size is only 18.1 MB (approximately 1/6 of SSD-VGG16), and the inference time is reduced from 23.6 ms to 14.9 ms, making it suitable for real-time inspection of solar panels.

Qualitative Analysis

We performed visual inspections on test images. The baseline SSD-VGG16 often missed small defects or produced false negatives. The MobileNetV2-SSD detected some defects but still missed subtle ones. In contrast, our MobileNetV2-C-SSD successfully identified multiple defect regions, even those with low contrast, thanks to the CLAHE preprocessing and the effective feature extraction of MobileNetV2. This demonstrates the practical advantage of our system for industrial solar panel defect detection.

Conclusions and Future Work

In this study, we presented an intelligent detection system for solar panels based on a lightweight deep learning algorithm. By incorporating CLAHE image enhancement and replacing the VGG-16 backbone with MobileNetV2, we developed the MobileNetV2-C-SSD model that significantly reduces computational complexity while improving detection accuracy. Experimental results on the PVEL-AD public dataset show that our model achieves an mAP of 78.16%, outperforming the original SSD by 9.96 percentage points, with a model size of only 18.1 MB and an inference time of 14.9 ms per image. The proposed system integrates automated sample handling and a graphical user interface, enabling efficient and reliable defect detection for solar panels in real-world production lines.

Future work can focus on further improving detection accuracy for challenging defect types such as cracks and star cracks. Potential directions include introducing multi-scale feature fusion to enhance information exchange between feature layers, and incorporating attention mechanisms to make the model focus more on defect regions. Additionally, deploying the model on edge devices such as embedded GPU modules (e.g., NVIDIA Jetson) could enable on-site real-time inspection, further reducing dependency on cloud computing and network latency. These enhancements will make the intelligent detection system for solar panels more robust and adaptable to diverse industrial scenarios.

Scroll to Top