SEMEDA: Enhancing segmentation precision with semantic edge aware loss. (December 2020) - Chen, Yifu; Dapogny, Arnaud; Cord, Matthieu
Highlights: We highlight several pitfalls of the traditional per-pixel cross-entropy loss for semantic segmentation. We propose a novel SEMEDA loss function that uses a Semantic Edge Detection Network to avoid these pitfalls. Experiments on several datasets shows that SEMEDA improves the segmentation accuracy with negligible computational overhead. Abstract: Per-Pixel Cross entropy (PPCE) is a commonly used loss on semantic segmentation tasks. However, it suffers from a number of drawbacks. Firstly, PPCE only depends on the probability of the ground truth class since the latter is usually one-hot encoded. Secondly, PPCE treats all pixels independently and does not take the local structure into account. While perceptual losses (e.g. matching prediction and ground truth in the embedding space of a pre-trained VGG network) would theoretically address these concerns, it does not constitute a practical solution as segmentation masks follow a distribution that differs largely from natural images. In this paper, we introduce a SEMantic EDge-Aware strategy (SEMEDA) to solve these issues. Inspired by perceptual losses, we propose to match the 'probability texture' of predicted segmentation mask and ground truth through a proxy network trained for semantic edge detection on the ground truth masks. Through thorough experimental validation on several datasets, we show that SEMEDA steadily improves the segmentation accuracy with negligible computational overhead and can be added with any popular segmentation networks in an end-to-end training framework.