Jaccard Metric Losses: Optimizing the Jaccard Index with Soft Labels (2302.05666v5)
Abstract: Intersection over Union (IoU) losses are surrogates that directly optimize the Jaccard index. Leveraging IoU losses as part of the loss function have demonstrated superior performance in semantic segmentation tasks compared to optimizing pixel-wise losses such as the cross-entropy loss alone. However, we identify a lack of flexibility in these losses to support vital training techniques like label smoothing, knowledge distillation, and semi-supervised learning, mainly due to their inability to process soft labels. To address this, we introduce Jaccard Metric Losses (JMLs), which are identical to the soft Jaccard loss in standard settings with hard labels but are fully compatible with soft labels. We apply JMLs to three prominent use cases of soft labels: label smoothing, knowledge distillation and semi-supervised learning, and demonstrate their potential to enhance model accuracy and calibration. Our experiments show consistent improvements over the cross-entropy loss across 4 semantic segmentation datasets (Cityscapes, PASCAL VOC, ADE20K, DeepGlobe Land) and 13 architectures, including classic CNNs and recent vision transformers. Remarkably, our straightforward approach significantly outperforms state-of-the-art knowledge distillation and semi-supervised learning methods. The code is available at \href{https://github.com/zifuwanggg/JDTLosses}{https://github.com/zifuwanggg/JDTLosses}.
- A Novel Focal Tversky Loss Function with Improved Attention U-Net for Lesion Segmentation. ISBI, 2019.
- The Lovasz-softmax loss: A Tractable Surrogate for the Optimization of the Intersection-Over-Union Measure in Neural Networks. CVPR, 2018.
- Theoretical analysis and experimental validation of volume bias of soft Dice optimized segmentation maps in the context of inherent uncertainty. MIA, 2021.
- MixMatch: A Holistic Approach to Semi-Supervised Learning. NeurIPS, 2019.
- End-to-End Object Detection with Transformers. ECCV, 2020.
- Rethinking Atrous convolution for semantic image segmentation. arXiv, 2017.
- Encoder-decoder with Atrous separable convolution for semantic image segmentation. ECCV, 2018.
- Masked-attention Mask Transformer for Universal Image Segmentation. CVPR, 2022.
- Per-Pixel Classification is Not All You Need for Semantic Segmentation. NeurIPS, 2021.
- MMSegmentation Contributors. MMSegmentation: OpenMMLab Semantic Segmentation Toolbox and Benchmark, 2020.
- The Cityscapes Dataset for Semantic Urban Scene Understanding. CVPR, 2016.
- DeepGlobe 2018: A Challenge to Parse the Earth through Satellite Images. CVPR Workshop, 2018.
- ImageNet: A Large-Scale Hierarchical Image Database. CVPR, 2009.
- Encyclopedia of Distances. Springer, 2009.
- Local Temperature Scaling for Probability Calibration. ICCV, 2021.
- Learning joint segmentation of tissues and brain lesions from task-specific hetero-modal domain-shifted datasets. MIA, 2020.
- Optimization for medical image segmentation: Theory and Practice When Evaluating With Dice Score or Jaccard Index. TMI, 2020.
- The Pascal Visual Object Classes (VOC) Challenge. IJCV, 2009.
- Labels are Not Perfect: Inferring Spatial Uncertainty in Object Detection. TITS, 2022.
- On calibration of modern neural networks. ICML, 2017.
- Deep residual learning for image recognition. CVPR, 2016.
- Distilling the knowledge in a neural network. NeurIPS Workshop, 2015.
- Knowledge Distillation from A Stronger Teacher. NeurIPS, 2022.
- Masked Distillation with Receptive Tokens. ICLR, 2023.
- Pavel Iakubovskii. Segmentation models pytorch, 2019.
- Sergey Ioffe. Improved Consistent Sampling, Weighted Minhash and L1 Sketching. ICDM, 2010.
- nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nature Methods, 2021.
- Panoptic Segmentation. CVPR, 2019.
- Segment Anything. ICCV, 2023.
- Sven Kosub. A note on the triangle inequality for the Jaccard distance. PRL, 2019.
- Trainable Calibration Measures For Neural Networks From Kernel Mean Embeddings. ICML, 2018.
- AutoLoss-Zero: Searching Loss Functions from Scratch for Generic Tasks. CVPR, 2022.
- Auto Seg-Loss: Searching Metric Surrogates for Semantic Segmentation. ICLR, 2021.
- Dice Loss for Data-imbalanced NLP Tasks. ACL, 2020.
- Focal Loss for Dense Object Detection. TPAMI, 2018.
- Structured Knowledge Distillation for Semantic Segmentation. CVPR, 2019.
- A ConvNet for the 2020s. CVPR, 2022.
- Decoupled Weight Decay Regularization. ICLR, 2019.
- Meta-Cal: Well-controlled Post-hoc Calibration by Ranking. ICML, 2021.
- Lena Maier-Hein et al. Metrics Reloaded: Recommendations for image analysis validation. arXiv, 2023.
- Confidence Calibration and Predictive Uncertainty Estimation for Deep Medical Image Segmentation. TMI, 2020.
- Self-Distillation Amplifies Regularization in Hilbert Space. NeurIPS, 2020.
- Maximally Consistent Sampling and the Jaccard Index of Probability Distributions. ICDM Workshop, 2018.
- When Does Label Smoothing Help? NeurIPS, 2019.
- Measuring Calibration in Deep Learning. CVPR Workshop, 2019.
- Sebastian Nowozin. Optimal Decisions from Probabilistic Models: the Intersection-over-Union Case. CVPR, 2014.
- On the relationship between calibrated predictors and unbiased volume estimation. MICCAI, 2021.
- A Consistent and Differentiable Lp Canonical Calibration Error Estimator. NeurIPS, 2022.
- Optimizing intersection-over-union in deep neural networks for image segmentation. ISVC, 2016.
- Land Cover Classification from Satellite Imagery With U-Net and Lovász-Softmax Loss. CVPR Workshop, 2018.
- U-Net: Convolutional Networks for Biomedical Image Segmentation. MICCAI, 2015.
- Post training uncertainty calibration of deep networks for medical image segmentation. ISBI, 2021.
- Tversky loss function for image segmentation using 3D fully convolutional deep networks. MICCAI Workshop, 2017.
- MobileNetV2: Inverted Residuals and Linear Bottlenecks. CVPR, 2018.
- Channel-wise Knowledge Distillation for Dense Prediction. ICCV, 2021.
- H. Späth. The minisum location problem for the Jaccard metric. OR Spektrum, 1981.
- Generalised Dice overlap as a deep learning loss function for highly unbalanced segmentations. MICCAI Workshop, 2017.
- Rethinking the Inception Architecture for Computer Vision. CVPR, 2016.
- Understanding and Improving Knowledge Distillation. arXiv, 2020.
- Vladimir N Vapnik. The Nature of Statistical Learning Theory. Springer, 1995.
- MaX-DeepLab: End-to-End Panoptic Segmentation with Mask Transformers. CVPR, 2021.
- InternImage: Exploring Large-Scale Vision Foundation Models with Deformable Convolutions. CVPR, 2023.
- Semi-Supervised Semantic Segmentation Using Unreliable Pseudo-Labels. CVPR, 2022.
- Intra-class Feature Variation Distillation for Semantic Segmentation. ECCV, 2020.
- Revisiting Evaluation Metrics for Semantic Segmentation: Optimization and Evaluation of Fine-grained Intersection over Union. NeurIPS, 2023.
- Dice Semimetric Losses: Optimizing the Dice Score with Soft Labels. MICCAI, 2023.
- Ross Wightman. Pytorch Image Models, 2019.
- ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders. CVPR, 2023.
- SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers. NeurIPS, 2021.
- Cross-Image Relational Knowledge Distillation for Semantic Segmentation. CVPR, 2022.
- Revisiting Weak-to-Strong Consistency in Semi-Supervised Semantic Segmentation. CVPR, 2023.
- The Lovász Hinge: A Novel Convex Surrogate for Submodular Losses. TPAMI, 2018.
- Learning generalized intersection over union for dense pixelwise prediction. ICML, 2021.
- CMT-DeepLab: Clustering Mask Transformers for Panoptic Segmentation. CVPR, 2022.
- k-means Mask Transformer. ECCV, 2022.
- Revisiting Knowledge Distillation via Label Smoothing Regularization. CVPR, 2020.
- Decoupled Knowledge Distillation. CVPR, 2022.
- Pyramid Scene Parsing Network. CVPR, 2017.
- Instance-specific and Model-adaptive Supervision for Semi-supervised Semantic Segmentation. CVPR, 2023.
- Augmentation Matters: A Simple-yet-Effective Approach to Semi-supervised Semantic Segmentation. CVPR, 2023.
- Scene Parsing Through ADE20K Dataset. CVPR, 2017.
- Rethinking Soft Labels for Knowledge Distillation: A Bias-Variance Tradeoff Perspective. ICLR, 2021.