Weakly Supervised Segmentation of Cracks on Solar Cells using Normalized Lp Norm

Martin Mayr, Mathis Hoffmann, Andreas Maier, Vincent ChristleinarXiv 2020

TL;DR

This paper introduces a weakly supervised method to segment cracks in solar cell images using only image-level labels, eliminating the need for labor-intensive pixel-level masks. By integrating a normalized $L_p$ norm layer into a modified ResNet-50, the researchers demonstrate that a classification surrogate task can effectively localize fine structural defects across both mono- and polycrystalline solar cells.

What Problem Does This Paper Address?

Automatic quality management is critical for the scaling of photovoltaic energy. Electroluminescence (EL) imaging is the standard for inspecting solar modules, but identifying cracks is notoriously difficult. Polycrystalline cells, in particular, have a "grainy" and noisy texture that can easily be mistaken for defects (see Figure 1).

While deep learning excels at segmentation, standard supervised methods require thousands of manually drawn pixel-level masks. These are expensive and time-consuming to produce. The authors tackle this bottleneck by asking: Can we train a model to segment cracks using only simple "crack" or "no-crack" labels for the entire image?

Fig. 1. EL image of a polycrystalline solar cell with a crack in the right upper corner. Red box shows the area where the crack is located. Blue arrows point to the busbars. Green boxes show noisy areas, which are no crack regions.

Methods

The authors propose a pipeline based on a modified ResNet-50 architecture. To adapt a classification network for segmentation, they made several key architectural changes:

  1. Spatial Preservation: They removed the final fully connected and average pooling layers. They also reduced downsampling in the earlier layers (using a stride of 1 instead of 2 in the last block) and employed dilated convolutions to maintain a higher resolution ($38 \times 38$) for the final feature maps.
  2. Class Heat Maps: A $1 \times 1$ convolutional layer was added to reduce the feature maps to exactly two: one representing the "crack" class and one for "non-crack."
  3. Normalized $L_p$ Norm Layer: This is the core innovation. To train the network on image-level labels, they needed to aggregate the spatial heat map into a single classification score. They used a normalized $L_p$ norm: $$L_p(\vec{x}) = \left( \frac{1}{N} \sum_{i=1}^{N} |y_i|^p \right)^{1/p}$$ By varying $p$, the network changes how it "pools" information. For example, $L_1$ is equivalent to average pooling, while $L_\infty$ is equivalent to max pooling.

  4. Surrogate Training: The model is trained to classify images. At inference time, the "crack" heat map is extracted and thresholded (at 50% of the maximum activation) to produce the final segmentation.

Fig. 2. Architecture of modified ResNet50. In contrast to the original ResNet50, this version is just downsampling in conv1 and conv3.x to retain more precise spatial information. Downsampling is performed via stride equal to 2 for the first convolutional layer of the scaled residual block.

Datasets

The study utilized the publicly available elpv-dataset, which contains:

  • 2,426 EL images of solar cells ($300 \times 300$ pixels, grayscale).
  • Images extracted from 44 different solar modules, including both mono- and polycrystalline types.
  • The authors manually added binary image-level annotations (crack vs. no-crack) to the existing defect probability metadata.

Key Insights and Ideas

  • Classification vs. Segmentation Performance: A surprising finding was that the best norm for classification isn't necessarily the best for segmentation. While $L_1$ and $L_3$ yielded the highest classification accuracy, $L_\infty$ produced the sharpest and most useful segmentation masks.
  • The "Inversion" Phenomenon: For lower values of $p$ ($L_1$ to $L_4$), the network learned to represent cracks as low values (dark spots) in the activation maps to maximize the global average score. For higher $p$ values, this behavior inverted, with cracks appearing as high values (bright spots).
  • Sharpness Control: The $p$ parameter acts as a knob for localization. Lower norms lead to blurred, blob-like regions, while higher norms provide sharp edges. The authors suggest lower norms might be better for large, amorphous objects, whereas higher norms (like $L_\infty$) are superior for thin, sharp structures like cracks.
Fig. 3. Original EL image and heat maps of crack layer for different normalized Lp norms. In the heat maps the dark areas are low values and the bright values are high values.

Key Results

  • Classification: The $L_1$ and $L_3$ models achieved the best results with an accuracy of 0.94 and an f1-score of 0.83 for the crack class.
  • Segmentation: Qualitatively, the $L_\infty$ norm was the clear winner for localizing cracks. It successfully ignored busbars and noisy background textures in polycrystalline cells that often trip up classical image processing algorithms.
Segmentation results for monocrystalline (top) and polycrystalline (bottom) cells using the $L_\infty$ norm.

Limitations and Future Work

  • Coarse Resolution: Because the network downsamples the image, the resulting segmentation is relatively coarse ($38 \times 38$ pixels). While sufficient for localization, it lacks fine-grained pixel precision.
  • Simple Thresholding: The use of a simple dynamic threshold (half of the maximum activation) is a heuristic. The authors note that more advanced segmentation methods could likely improve the final masks.
  • Broader Application: The authors believe this $L_p$ normalization strategy is a general-purpose tool that could be applied to other weakly supervised segmentation tasks in medical imaging or industrial inspection.

Summary updated

BibTeX
@misc{mayr2020weakly,
  author = {Martin Mayr and Mathis Hoffmann and Andreas Maier and Vincent Christlein},
  title = {{Weakly Supervised Segmentation of Cracks on Solar Cells using Normalized Lp Norm}},
  year = {2020},
  eprint = {2001.11248},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.11248},
}
Figure