Discovering Latent Classes for Semi-Supervised Semantic Segmentation

Johann Sawatzky, Olga Zatsarynna, Juergen Gall · DOI

Abstract

High annotation costs are a major bottleneck for the training of semantic segmentation systems. Therefore, methods working with less annotation effort are of special interest. This paper studies the problem of semi-supervised semantic segmentation. This means that only a small subset of the training images is annotated while the other training images do not contain any annotation. In order to leverage the information present in the unlabeled images, we propose to learn a second task that is related to semantic segmentation but easier. On labeled images, we learn latent classes consistent with semantic classes so that the variety of semantic classes assigned to a latent class is as low as possible. On unlabeled images, we predict a probability map for latent classes and use it as a supervision signal to learn semantic segmentation. The latent classes, as well as the semantic classes, are simultaneously predicted by a two-branch network. In our experiments on Pascal VOC and Cityscapes, we show that the latent classes learned this way have an intuitive meaning and that the proposed method achieves state of the art results for semi-supervised semantic segmentation.

Introduction

Semantic segmentation—the task of assigning a categorical label to every pixel in an image—is a cornerstone of computer vision, essential for applications like autonomous driving and medical imaging. However, it is notoriously data-hungry. Unlike image classification, which requires a single label per image, segmentation requires dense, pixel-perfect maps. Producing such high-quality datasets is prohibitively expensive and time-consuming.

Semi-supervised learning (SSL) offers a promising alternative by leveraging a small set of labeled images alongside a much larger pool of unlabeled data. Traditional SSL approaches often struggle to extract meaningful signals from unlabeled images. Some methods rely on Generative Adversarial Networks (GANs) to identify "reliable" regions, but these often discard significant portions of data where the model lacks confidence. This paper introduces a novel framework that discovers "latent classes"—data-driven groupings of objects that are easier for a model to learn. By training a secondary branch to master these simplified classes, the model generates a robust supervision signal to guide the primary segmentation task on unlabeled data.

Methodology: The Two-Branch Architecture

The core of the proposed approach is a segmentation network with two distinct output branches: the Semantic Branch and the Latent Branch.

  1. The Semantic Branch: This branch performs the standard segmentation task, aiming to predict the full set of ground-truth semantic classes (e.g., 21 classes for Pascal VOC).
  2. The Latent Branch: This branch learns to group the original semantic classes into a smaller number of "latent classes."
The proposed semi-supervised framework featuring a two-branch segmentation network and an adversarial discriminator.

Learning Latent Groupings via Conditional Entropy

Rather than manually defining "super-categories" (e.g., grouping "car" and "bus" into "vehicle"), the latent branch discovers these groupings automatically. This is achieved using a conditional entropy loss, which ensures that the latent classes remain consistent with the ground-truth semantic classes. By minimizing the variety of semantic classes assigned to any single latent class, the model finds a simplification of the world that aligns with the neural network's internal feature space.

Semi-Supervised Training Loop

The training process alternates between labeled and unlabeled data:

  • Labeled Data: Both branches are trained with standard supervision. The semantic branch learns the target classes, while the latent branch learns its simplified groupings.
  • Unlabeled Data: Because the latent task is inherently "easier," the latent branch produces more confident and accurate predictions on unlabeled images than the semantic branch. The framework enforces a consistency loss ($L_{cons}$), requiring the semantic branch's predictions to align with the stable, simplified view provided by the latent branch.
  • Adversarial Learning: A discriminator network is employed to ensure that the predicted segmentation maps for unlabeled data are indistinguishable from ground-truth maps, further refining the output.

Results and Discussion

The researchers evaluated the framework on three benchmarks: Pascal VOC 2012, Cityscapes, and IIT Affordances.

Performance Benchmarks

The method achieved state-of-the-art (SOTA) results across various data regimes. On Pascal VOC 2012, using only 1/50th of the available labels, the model reached 61.8% mIoU (mean Intersection over Union), significantly outperforming previous GAN-based baselines. On the Cityscapes dataset, the model consistently outperformed previous SOTA methods; for instance, with 1/8th of the labels and COCO pre-training, it achieved 63.3% mIoU. Ablation studies confirmed the impact of the latent branch, showing an improvement from 64.1% to 71.3% mIoU on Pascal VOC when the latent loss and consistency signals were added.

Qualitative Insights

A key finding is that learned latent classes often outperform manually defined ones. When the model groups objects based on shared textures or shapes in its feature space, the resulting supervision signal is stronger than human-defined categories.

Comparison of (a) the original image, (b) discovered latent classes, and (c) predicted semantic classes.

As shown in the figure above, the latent classes (b) provide a simplified but structurally sound representation of the scene. This "anchor" effect prevents the semantic branch from becoming unstable or "hallucinating" when processing unlabeled data. The mapping typically converges to a sparse state where each semantic class belongs primarily to one latent class, ensuring a clean translation between tasks.

Conclusion and Future Work

This research demonstrates that discovering latent classes provides a powerful mechanism for semi-supervised semantic segmentation. By solving an easier auxiliary task, the model creates a reliable bridge to the more complex target task.

However, some limitations remain. The performance is sensitive to the pre-defined number of latent classes; setting this number too low or too high can degrade results. Additionally, a "warm-up" period is required to allow the latent branch to learn useful groupings before the consistency loss can be effectively applied. Future work could explore dynamic methods for determining the optimal number of latent classes during training or extending this "easy-to-hard" supervision logic to domains with even scarcer labels, such as medical imaging.

Summary updated

BibTeX
@inproceedings{sawatzky2019discovering,
  author = {Johann Sawatzky and Olga Zatsarynna and Juergen Gall},
  title = {{Discovering Latent Classes for Semi-Supervised Semantic Segmentation}},
  booktitle = {GCPR},
  year = {2019},
  doi = {10.1007/978-3-030-71278-5\_15},
}
Figure