The accurate image segmentation of surface defects is challenging for modern convolutional neural networks (CNN)-based models. This paper identifies that loss imbalance a critical problem in accuracy improvement. includes: label imbalance, which impairs the on less represented classes; easy–hard example misleads focus optimization valuable examples; and boundary involves an unusually large valu...