Following [1]}, [2]}, two loss functions are used to supervise our network.
The total loss function combines both weighted cross-entropy and Lovász-Softmax losses [3]} as \(\mathcal {L} = \mathcal {L}_{wce} + \mathcal {L}_{ls}\) .
To alleviate the imbalanced distribution over different classes, the cross-entropy loss function is weighted with inverse square root frequency for each class, defined as
\(\mathcal {L}_{wce}(y, \hat{y})=-\sum \alpha _{i} p\left(y_{i}\right) \log \left(p\left(\hat{y}_{i}\right)\right), \ \alpha _{i}=1 / \sqrt{f_{i}},\) 
