  The continuous development of the photovoltaic (PV) industry has raised high
requirements for the quality of monocrystalline of PV module cells. When
learning to segment defect regions in PV module cell images, Tiny Hidden Cracks
(THC) lead to extremely-imbalanced samples. The ratio of defect pixels to
normal pixels can be as low as 1:2000. This extreme imbalance makes it
difficult to segment the THC of PV module cells, which is also a challenge for
semantic segmentation. To address the problem of segmenting defects on
extremely-imbalanced THC data, the paper makes contributions from three
aspects: (1) it proposes an explicit measure for output imbalance; (2) it
generalizes a distribution-based loss that can handle different types of output
imbalances; and (3) it introduces a compound loss with our adaptive
hyperparameter selection algorithm that can keep the consistency of training
and inference for harmonizing the output imbalance on extremelyimbalanced input
data. The proposed method is evaluated on four widely-used deep learning
architectures and four datasets with varying degrees of input imbalance. The
experimental results show that the proposed method outperforms existing
methods.
