Tree Energy Loss: Towards Sparsely Annotated Semantic Segmentation

Zhiyuan Liang, Tiancai Wang, Xiangyu Zhang, Jian Sun, Jianbing Shen

Abstract

Semantic segmentation typically requires dense, pixel-level annotations, which are prohibitively expensive to produce. Sparsely Annotated Semantic Segmentation (SASS) offers a cost-effective alternative by training models on minimal labels such as points or scribbles. We present Tree Energy Loss (TEL), a novel framework that treats images as graphs and utilizes Minimum Spanning Trees (MSTs) to propagate label information. TEL generates high-quality pseudo-labels during training, allowing for effective online self-training. Our method achieves state-of-the-art results on Pascal VOC 2012, Cityscapes, and ADE20k, significantly bridging the gap between sparse and full supervision while maintaining high training and inference efficiency.

Introduction

Assigning a semantic category to every pixel in an image is a fundamental task in computer vision. However, the "data hunger" of deep learning models for this task is a major bottleneck. For instance, a single image in the Cityscapes dataset can require over 90 minutes of manual labor for full annotation. SASS addresses this by utilizing "cheap" labels—single points, scribbles, or small blocks—which leave the vast majority of pixels unlabeled.

The primary challenge in SASS is effectively supervising the network on these unlabeled regions. Existing methods often rely on complex multi-stage pipelines, external data, or computationally expensive post-processing like Conditional Random Fields (CRFs). We propose Tree Energy Loss (TEL) to overcome these limitations through a simple, structurally-aware loss function.

Proposed Method: Tree Energy Loss

The core of our approach is the Tree Energy Loss (TEL), which provides structural guidance to the network during training. Unlike previous paradigms that use auxiliary tasks, pseudo-proposals, or consistency learning, TEL integrates structural priors directly into the loss function as shown in Figure 1.

Comparison of different training paradigms for sparsely annotated semantic segmentation. TEL (e) simplifies the process by using a structural loss term.

TEL operates by constructing two Minimum Spanning Trees (MSTs) for each image:

  1. Low-level MST: Based on RGB color similarity to capture sharp object boundaries.
  2. High-level MST: Based on deep CNN features to ensure semantic consistency.

By calculating distances along these trees, the model "spreads" information from sparse labels to structurally related unlabeled pixels. This cascaded filtering process generates "soft pseudo-labels" that guide the network's training in an online fashion, allowing the model to constantly improve its own targets.

Experiments and Results

We evaluated TEL on three major benchmarks: Pascal VOC 2012, Cityscapes, and ADE20k. We considered various sparse annotation settings, including point-wise (one pixel per object), scribble-wise (a line per object), and block-wise supervision.

Example of a scribble annotation, where only a few lines are used to represent objects in the scene.

Performance

On Pascal VOC, TEL achieved 77.3% mIoU with scribble annotations, nearly matching the ~80% mIoU achieved with 100% full annotations. In the extreme case of point-only labels, TEL provided a 6.4% mIoU improvement over the baseline.

Efficiency

TEL is highly efficient, adding zero computational cost during inference. During training, it only increases the GPU load by approximately 4-6% and training time by roughly 9%. This makes it significantly more practical than traditional CRF-based methods.

Conclusion

Tree Energy Loss provides a simple yet powerful "plug-and-play" solution for sparsely annotated semantic segmentation. By leveraging the structural priors of MSTs, it enables models to learn effectively from minimal human effort. While challenges remain regarding color mutations and potential confirmation bias in self-training, TEL represents a significant step towards reducing the annotation burden in computer vision.

Summary updated

BibTeX
@inproceedings{liang2022tree,
  author = {Zhiyuan Liang and Tiancai Wang and Xiangyu Zhang and Jian Sun and Jianbing Shen},
  title = {{Tree Energy Loss: Towards Sparsely Annotated Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure