IET Computer Vision (Dec 2022)

Contour loss for instance segmentation via k‐step distance transformation image

  • Xiaolong Guo,
  • Xiaosong Lan,
  • Kunfeng Wang,
  • Shuxiao Li

DOI
https://doi.org/10.1049/cvi2.12114
Journal volume & issue
Vol. 16, no. 8
pp. 683 – 693

Abstract

Read online

Abstract Instance segmentation aims to locate targets in the image and segment each target at the pixel level, which is one of the most important tasks in computer vision. Mask R‐CNN is a classic method of instance segmentation, but we find that its predicted masks are unclear and inaccurate near contours. To cope with this problem, we draw on the idea of contour matching based on distance transformation image and propose a novel loss function called contour loss. Contour loss is designed to specifically optimise the contour parts of the predicted masks, thus can assure more accurate instance segmentation. To make the proposed contour loss be jointly trained under modern neural network frameworks, we design a differentiable k‐step distance transformation image calculation module, which can approximately compute truncated distance transformation images of the predicted mask and the corresponding ground‐truth mask online. The proposed contour loss can be integrated into existing instance segmentation methods such as Mask R‐CNN, and combined with their original loss functions without modification of the structures of inference network, thus has strong versatility. Experimental results on COCO show that contour loss is effective, which can further improve instance segmentation performances.