Instance segmentation loss functions | SoftwareMill
Briefly

Instance segmentation loss functions | SoftwareMill
"It is a binary cross-entropy loss, which handles class imbalance. Let's imagine a seagull instance segmentation model. The input and an output to the model are presented in Figure 1. Figure 1. The left image is an input to the instance segmentation network and the right image is a segmentation mask obtained as an output of the instance segmentation network."
"The network predicts black pixels as the background class (0) and white pictures as the object class (1). In the following scenario, the network poorly predicted the mask of the seagull. However, if we calculate the loss using standard binary cross-entropy the loss would be low (close to zero), which means that the network performs well. Why is that? It is because of a huge class imbalance."
Instance segmentation generates a binary mask for each detected object. Two main algorithm categories exist: detection-based and single-shot. Detection-based approaches produce higher-quality masks while single-shot methods offer faster inference. Training instance segmentation models requires loss functions that account for severe class imbalance between background and object pixels. Common loss functions include weighted binary cross-entropy, focal loss, Dice loss, Generalized IoU, boundary loss, and Lovasz softmax. Weighted binary cross-entropy increases contribution of positive pixels to counter imbalance. Class imbalance can cause low binary cross-entropy loss despite poor object mask prediction when background pixels dominate.
Read at Medium
Unable to calculate read time
[
|
]