In the photovoltaic power generation industry, the quality of solar panels plays a decisive role in system efficiency and long‑term reliability. However, due to manufacturing processes and environmental factors, solar panels fabricated from silicon‑based semiconductor materials are prone to various surface defects such as cracks, finger interruptions, and star‑shaped fractures. Traditional inspection methods heavily rely on manual visual identification, which not only consumes substantial human resources but also leads to missed detections, false positives, and low efficiency. Moreover, conventional electroluminescence (EL) detection technology, while commonly used, still requires extensive manual intervention during the operational workflow, further reducing detection efficiency and introducing subjective variability. With the rapid advancement of deep learning, convolutional neural networks have shown great promise in automated defect detection for solar panels. However, deploying large‑scale models on resource‑constrained embedded devices—which must operate under low‑power, always‑on conditions—poses significant challenges. To address these issues, we design a complete intelligent detection system for solar panels and propose an improved lightweight detection algorithm named MobileNetV2-C-SSD. This algorithm integrates contrast‑limited adaptive histogram equalization (CLAHE) for image enhancement and replaces the original VGG‑16 backbone with MobileNetV2, achieving a balance between high detection accuracy and low computational cost. Experimental results on the PVEL‑AD dataset demonstrate that our model achieves a mean average precision (mAP) of 78.16% while reducing the model size to only one‑sixth of the original SSD‑VGG16, enabling real‑time defect detection on resource‑limited hardware. The proposed system effectively automates the entire inspection process, including defect detection, classification, and sorting, thereby solving the longstanding problems of low efficiency and high error rates in manual inspection.
1. System Architecture of Intelligent Solar Panel Inspection
We propose a fully automated intelligent detection system for solar panels that integrates the MobileNetV2-C-SSD algorithm. The system consists of a hardware conveyor line, an automated guided vehicle (AGV) for transportation, a high‑resolution image acquisition unit, and a software control module. The software module is designed using the Unified Modeling Language (UML) and provides four core functions:
- Management of untested and tested solar panel samples.
- Defect type classification during the inspection process.
- Query and analysis of historical inspection results.
- User authentication and role management.
The workflow begins when raw solar panels are loaded at the sample inlet. An AGV transports each panel to the imaging station, where an EL camera captures high‑resolution images. These images are then processed by the MobileNetV2-C-SSD algorithm running on a compact embedded controller. The algorithm outputs bounding boxes and defect categories for each detected anomaly. Based on the detection results, the system automatically sorts the panels into “defective” and “defect‑free” stacks. Meanwhile, the software interface allows operators to monitor the process in real time, review historical records, and adjust parameters when necessary.
To illustrate the enhancement effect of CLAHE on solar panel images, we provide a comparative example. The original image often suffers from low contrast and uneven illumination, making subtle defects nearly invisible. After applying CLAHE, the defect regions become significantly more prominent, facilitating subsequent detection.

2. The MobileNetV2-C-SSD Algorithm
Our proposed algorithm builds upon the SSD (Single Shot MultiBox Detector) framework. The original SSD uses VGG‑16 as the backbone network and extracts feature maps from six different layers (Conv4_3, fc_7, Conv6_2, Conv7_2, Conv8_2, Conv9_2) for multi‑scale object detection. It inherits the regression‑based approach from YOLO and the multi‑scale anchor mechanism from Faster R‑CNN, enabling direct end‑to‑end prediction without a separate region proposal stage.
To make the model suitable for embedded deployment, we replace the heavy VGG‑16 backbone with MobileNetV2. MobileNetV2 introduces depthwise separable convolutions, inverted residual structures, and linear bottlenecks, which drastically reduce the number of parameters and the computational cost while maintaining high representational capacity. Additionally, we incorporate CLAHE preprocessing to enhance defect visibility.
2.1 CLAHE for Image Enhancement
When solar panel images exhibit large variations in contrast, traditional histogram equalization (HE) or adaptive histogram equalization (AHE) often produce unsatisfactory results, such as over‑enhancing noise or losing detail in uniform regions. CLAHE overcomes these limitations by dividing the image into small tiles and applying histogram equalization with a clipped contrast limit. The procedure is as follows:
- Let I(x, y) be the pixel value at coordinate (x, y) in the original image, and Iclahe(x, y) be the enhanced value.
- Partition the image into N × N non‑overlapping blocks: Iblock(x, y).
- For each block, compute the cumulative distribution function (CDF) and perform histogram equalization.
- Clip the histogram at a maximum contrast limit C to control the amplification.
This method preserves the local contrast without amplifying noise, making the subtle defects (e.g., micro‑cracks, finger interruptions) stand out clearly against the dark background of the EL image.
2.2 Depthwise Separable Convolution
MobileNetV2 uses depthwise separable convolution instead of standard convolution. In standard convolution, each filter operates on all input channels simultaneously, as illustrated conceptually. In depthwise separable convolution, the operation is decomposed into two stages:
- Depthwise convolution: a single filter per input channel (1:1 mapping).
- Pointwise convolution: a 1×1 convolution that linearly combines the output channels from the depthwise stage.
We compare the parameter count and computational cost between standard convolution and depthwise separable convolution. Assume:
- Input channels: M
- Kernel size: KW × KH (typically 3×3)
- Output feature map size: PW × PH
- Output channels: N
Standard convolution:
Parameters: $$ C_{\text{std}} = K_W \times K_H \times M \times N $$
Computations: $$ S_{\text{std}} = C_{\text{std}} \times (P_W – K_W + 1) \times (P_H – K_H + 1) $$
Depthwise separable convolution:
Depthwise part:
Parameters: $$ C_{\text{dw}} = K_W \times K_H \times M $$
Computations: $$ S_{\text{dw}} = C_{\text{dw}} \times (P_W – K_W + 1) \times (P_H – K_H + 1) $$
Pointwise part (1×1 convolution):
Parameters: $$ C_{\text{pw}} = 1 \times 1 \times M \times N $$
Computations: $$ S_{\text{pw}} = C_{\text{pw}} \times T_W \times T_H $$
where TW and TH are the output spatial dimensions after the depthwise step (usually the same as input spatial dimensions if stride = 1).
Total parameters: $$ C_{\text{dw}} + C_{\text{pw}} $$
Total computations: $$ S_{\text{dw}} + S_{\text{pw}} $$
The ratio of computations between depthwise separable and standard convolution is:
$$ \frac{S_{\text{dw}} + S_{\text{pw}}}{S_{\text{std}}} = \frac{1}{N} + \frac{T}{K \cdot (P_W – K_W + 1)(P_H – K_H + 1)} $$
For typical values (e.g., K=3, N=64, T≈P), the depthwise separable convolution reduces the computational cost by roughly a factor of N / (1 + N / 9), which is substantial when N is large. In practice, this leads to a model that is approximately 1/6 the size of the standard VGG‑16 based SSD while maintaining comparable accuracy.
2.3 Inverted Residual and Linear Bottleneck
MobileNetV2 introduces two key architectural innovations that prevent information loss in low‑dimensional representations:
- Inverted residual: Unlike traditional residual blocks that first reduce the number of channels (bottleneck) and then expand, the inverted residual first expands the channels, then applies depthwise convolution, and finally projects back to a lower dimension. This structure allows the depthwise filter to operate on a richer feature space, improving representational power.
- Linear bottleneck: The last pointwise convolution in each inverted residual block uses a linear activation function instead of ReLU. Because ReLU can irreversibly destroy information in low‑dimensional subspaces, replacing it with a linear activation preserves feature diversity after the projection step.
The overall MobileNetV2 architecture consists of a standard convolution layer followed by a series of inverted residual blocks with varying expansion ratios and strides. For our SSD adaptation, we select the following six feature layers for multi‑scale detection:
- Conv11 of MobileNetV2
- Conv13 of MobileNetV2
- Conv14_2
- Conv15_2
- Conv16_2
- Conv18_2
These layers provide feature maps of different resolutions, enabling the detection of both small and large defects on solar panels.
3. Experiments and Results
3.1 Dataset and Preprocessing
We evaluate our algorithm on the PVEL‑AD dataset, which is a large‑scale public dataset specifically designed for anomaly detection in photovoltaic cells. It contains 365,431 EL images, covering one normal class and twelve defect categories: cracks (linear and star‑shaped), finger interruptions, black cores, misalignment, thick lines, scratches, fragments, broken corners, and material defects. Among these, 4,500 images are fully annotated. We split them into 3,645 for training, 405 for validation, and 450 for testing. To highlight defect features, we apply CLAHE with a clip limit of 2.0 and a tile grid size of 8×8 on all training and testing images.
Table 1 summarizes the key training parameters.
| Parameter | Value |
|---|---|
| Number of epochs | 200 |
| Batch size | 8 |
| Initial learning rate | 2 × 10−5 |
| IoU threshold | 0.45 |
| Input image size | 1024 × 1024 |
3.2 Evaluation Metrics
We adopt the following metrics:
- Model size (in MB) — reflects memory footprint.
- Average Precision (AP) for each defect class at IoU threshold 0.5.
- Mean Average Precision (mAP) over all classes.
- Inference time per image (in ms).
3.3 Results and Comparison
We compare three models: SSD‑VGG16 (original), MobileNetV2-SSD (without CLAHE), and our proposed MobileNetV2-C-SSD (with CLAHE). All models are trained under identical conditions except for the backbone and preprocessing. Table 2 lists the AP for each defect class.
| Defect Type | SSD‑VGG16 | MobileNetV2-SSD | MobileNetV2-C-SSD |
|---|---|---|---|
| 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‑shaped Crack | 0.5330 | 0.4101 | 0.4723 |
| Thick Line | 0.7449 | 0.7490 | 0.7474 |
| Vertical Dislocation | 0.5714 | 0.6875 | 0.9167 |
Table 3 compares the overall performance metrics across the three models.
| Model | Model Size (MB) | mAP | Inference Time (ms) |
|---|---|---|---|
| SSD-VGG16 | 105.2 | 0.6820 | 23.6 |
| MobileNetV2-SSD | 18.1 | 0.7410 | 15.2 |
| MobileNetV2-C-SSD | 18.1 | 0.7816 | 14.9 |
From Table 3, we observe that MobileNetV2-C-SSD achieves the highest mAP of 78.16%, which is 4.06 percentage points higher than MobileNetV2-SSD and 9.96 points higher than SSD-VGG16. Notably, the model size is only 18.1 MB (about 1/6 of SSD-VGG16), making it highly suitable for embedded deployment. The inference time of 14.9 ms is also the fastest among the three, allowing real‑time processing at over 60 frames per second.
The per‑class results in Table 2 show that our model significantly improves detection of hard‑to‑recognize defects such as vertical dislocation (AP from 0.5714 to 0.9167) and star‑shaped cracks (AP from 0.5330 to 0.4723; note that CLAHE slightly degrades some classes but overall mAP improves due to better performance on other classes). The horizontal dislocation class reaches a perfect AP of 1.0 with CLAHE, indicating that image enhancement is especially beneficial for defects with low contrast.
To visualize the improvement, we compare detection outputs on a sample solar panel image containing multiple cracks. The SSD-VGG16 model fails to detect any defect region; the MobileNetV2-SSD model detects only one small defect; while our MobileNetV2-C-SSD model successfully identifies all three defect regions with high confidence. This qualitative result confirms that the combination of CLAHE and MobileNetV2 backbone effectively captures subtle anomalies that are missed by the original network.
4. Discussion
The superior performance of MobileNetV2-C-SSD can be attributed to two synergistic components. First, CLAHE preprocessing amplifies the local contrast of defect regions, making them more distinguishable from the normal background texture. This is particularly important for solar panels, where defects often occupy only a few pixels and have intensity values close to those of intact areas. Second, MobileNetV2’s inverted residual and linear bottleneck structures ensure that the network can learn rich feature representations without excessive parameters. The depthwise separable convolutions reduce the computational burden, allowing the model to run efficiently on low‑power microcontrollers commonly used in industrial inspection equipment.
Despite these promising results, there is still room for improvement. The mAP of 78.16% indicates that some defect types, such as cracks, remain challenging (AP around 0.40). Future work could explore multi‑scale feature fusion techniques, such as Feature Pyramid Networks (FPN), to better capture defects of varying sizes. Additionally, incorporating an attention mechanism (e.g., squeeze‑and‑excitation or convolutional block attention module) could help the model focus on the most informative regions. Finally, applying data augmentation techniques like random cropping, rotation, and mosaic may further improve generalization. We believe that with these enhancements, the detection accuracy of solar panel defects can be pushed even higher, enabling fully automated quality control in photovoltaic manufacturing.
5. Conclusion
In this work, we have developed an intelligent detection system for solar panels based on an improved MobileNetV2-C-SSD algorithm. By integrating CLAHE for image enhancement and using MobileNetV2 as the backbone, we achieved a lightweight model that is only 18.1 MB in size but attains a mean average precision of 78.16% on the PVEL‑AD dataset—a 4.06% improvement over the baseline MobileNetV2-SSD and a 9.96% improvement over the original SSD-VGG16. The system’s inference time of 14.9 ms per image meets real‑time requirements. The proposed solution effectively automates the inspection of solar panels, eliminating the inefficiencies and human errors associated with manual visual inspection, and is well‑suited for deployment in resource‑constrained industrial environments.
