中国空间科学技术 ›› 2021, Vol. 41 ›› Issue (6): 85-90.doi: 10.16708/j.cnki.1000-758X.2021.0085

• 论文 • 上一篇    下一篇

TopPixelLoss:类别不均衡的遥感影像语义分割损失函数

袁伟,许文波,周甜   

  1. 1成都大学 建筑与土木工程学院,成都610106
    2电子科技大学 资源与环境学院,成都610097
  • 出版日期:2021-12-25 发布日期:2021-12-15

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

摘要: 针对遥感影像中类别不均衡的小目标分割效果不理想的问题,提出了一种类别不均衡小目标二分类分割的损失函数——TopPixelLoss损失函数。首先计算出每个像素的交叉熵,然后将所有像素的交叉熵按从大到小进行排序,随后确定一个K值作为阈值,筛选出前K个交叉熵最大的像素,最后对于筛选出的K个像素交叉熵取平均,做为损失值。在ISPRS 提供的 Vaihingen 数据集上,使用PSPNet网络与普通交叉熵、FocalLoss、TopPixelLoss三种损失函数分别对车辆进行二分类分割试验。结果表明,不同的K值,使用TopPixelLoss损失函数的平均交并比(MIoU)、F1-score、准确度(ACC)都最高;当K值为5×104时效果最佳,MIoU、F1-score、ACC分别比FocalLoss提高了3.0%、5.0%、0.1%。TopPixelLoss损失函数是一种针对类别不均衡分割非常有效的损失函数

关键词: 遥感影像, 语义分割, 深度学习, 类别不均衡, 小目标分割, 不均衡样本

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