Chinese Space Science and Technology ›› 2021, Vol. 41 ›› Issue (6): 85-90.doi: 10.16708/j.cnki.1000-758X.2021.0085

Previous Articles     Next Articles

TopPixelLoss: a loss function for semantic segmentation of remote sensing images with class imbalance

YUAN Wei,XU Wenbo,ZHOU Tian   

  1. 1School of Architecture and Civil Engineering,Chengdu University,Chengdu 610106,China
    2School of Resources and Environment,University of Electronic Science and Technology of China,Chengdu 610097,China
  • Published:2021-12-25 Online:2021-12-15

Abstract: Aiming at the problem that the segmentation effect of small target in remote sensing image is not ideal, a loss function named TopPixelLoss was proposed.Firstly, the cross entropy of each pixel was calculated, and then the cross entropy of all pixels was sorted from large to small. After that, a K value was determined. According to the threshold K, the pixels with the largest cross entropy of the top K were selected. Finally, the cross entropy of the K pixels was averaged as the final loss value. Experiments using PSPNet network with cross entropy, FocalLoss and TopPixelLoss were carried out  respectively through Vaihingen data set of ISPRS. The results show that, for different K values, the mean intersection over union (M IOU), F1-score and accuracy(ACC) are all higher than FocalLoss, and that the effect is the best when K is 50000 (MIoU, F1-score and ACC are improved by 3.0%, 5.0% and 0.1% respectively compared with FocalLoss). The proposed TopPixelLoss  function is a very effective loss function for imbalanced class segmentation.

Key words: remote sensing image, semantic segmentation, deep learning, class imbalance, small target segmentation, unbalanced sample