IoU losses are surrogates that directly optimize the Jaccard index. In semantic segmentation, leveraging IoU losses as part of the loss function is shown to perform better with respect to the Jaccard index measure than optimizing pixel-wise losses such as the cross-entropy loss alone. The most notable IoU losses are the soft Jaccard loss and the Lovasz-Softmax loss. However, these losses are incompatible with soft labels which are ubiquitous in machine learning. In this paper, we propose Jaccard metric losses (JMLs), which are identical to the soft Jaccard loss in a standard setting with hard labels, but are compatible with soft labels. With JMLs, we study two of the most popular use cases of soft labels: label smoothing and knowledge distillation. With a variety of architectures, our experiments show significant improvements over the cross-entropy loss on three semantic segmentation datasets (Cityscapes, PASCAL VOC and DeepGlobe Land), and our simple approach outperforms state-of-the-art knowledge distillation methods by a large margin. Code is available at: \href{https://github.com/zifuwanggg/JDTLosses}{https://github.com/zifuwanggg/JDTLosses}.
翻译:IoU损失是直接优化Jaccard指数的替代函数。在语义分割中,将IoU损失作为损失函数的一部分已被证明比单独使用交叉熵损失等逐像素损失更能提升Jaccard指数指标的表現。最著名的IoU损失包括软Jaccard损失和Lovasz-Softmax损失。然而,这些损失函数与机器学习中普遍存在的软标签不兼容。本文提出Jaccard度量损失(JMLs),该损失在标准硬标签设置下与软Jaccard损失完全相同,但兼容软标签。借助JMLs,我们研究了软标签的两个最流行应用场景:标签平滑和知识蒸馏。在多种架构下,我们的实验表明,在三个语义分割数据集(Cityscapes、PASCAL VOC和DeepGlobe Land)上,该方法相比交叉熵损失取得了显著提升,且我们的简单方法大幅优于当前最优的知识蒸馏方法。代码开源地址:\href{https://github.com/zifuwanggg/JDTLosses}{https://github.com/zifuwanggg/JDTLosses}。