Semi Supervised Semantic Segmentation Using Generative Adversarial Network

Nasim Souly, Concetto Spampinato, Mubarak ShahICCV 2017

Abstract

Semantic segmentation has been a long standing challenging task in computer vision. It aims at assigning a label to each image pixel and needs a significant number of pixel-level annotated data, which is often unavailable. To address this lack of annotations, in this paper, we leverage, on one hand, a massive amount of available unlabeled or weakly labeled data, and on the other hand, non-real images created through Generative Adversarial Networks. In particular, we propose a semi-supervised framework - based on Generative Adversarial Networks (GANs) - which consists of a generator network to provide extra training examples to a multi-class classifier, acting as discriminator in the GAN framework, that assigns sample a label y from the K possible classes or marks it as a fake sample (extra class). The underlying idea is that adding large fake visual data forces real samples to be close in the feature space, which, in turn, improves multiclass pixel classification. To ensure a higher quality of generated images by GANs with consequently improved pixel classification, we extend the above framework by adding weakly annotated data, i.e., we provide class level information to the generator. We test our approaches on several challenging benchmarking visual datasets, i.e. PASCAL, SiftFLow, Stanford and CamVid, achieving competitive performance compared to state-of-the-art semantic segmentation methods.

Introduction

Semantic segmentation—the task of assigning a category label to every single pixel in an image—is notoriously data-hungry. Training deep networks for this task typically requires thousands of images with "pixel-perfect" annotations, which are incredibly expensive and time-consuming to produce. While unlabeled data is abundant, traditional unsupervised methods struggle with segmentation because they lack a concept of semantic classes.

Overview of the semi-supervised framework incorporating labeled, unlabeled, and generated data.

This work addresses the lack of annotations by leveraging Semi-Supervised Learning (SSL). The proposed framework uses a Generative Adversarial Network (GAN) to learn the underlying structure of visual scenes from unlabeled data and "weak" labels (e.g., image-level tags). By introducing synthetic data as a regularizer, the model can learn robust features even with limited ground-truth labels.

Methodology

The core innovation is a GAN-based architecture where the discriminator is modified to function as a multi-class classifier.

The Multi-Class Discriminator

Instead of a standard binary discriminator, this model uses a Fully Convolutional Network (FCN) that outputs $K+1$ channels. The first $K$ channels correspond to semantic classes (e.g., person, car, road), and the $(K+1)$-th channel represents "fake" pixels generated by the model. This "$K+1$ trick" forces the model to distinguish the subtle textures of real objects from the artifacts of generated ones, sharpening its internal representation of what a "real" object looks like.

The Generator and Semi-Supervised Loss

The generator produces synthetic images from random noise, attempting to "fool" the discriminator into classifying these pixels as one of the $K$ real classes. The training process optimizes three types of data:

  • Labeled Data: Standard cross-entropy loss ensures pixels match ground truth.
  • Unlabeled Data: The discriminator is pushed to be confident in its classification of these pixels into one of the $K$ real classes.
  • Generated Data: The discriminator is trained to identify these as the $(K+1)$-th "fake" class.

Weak Supervision with Conditional GANs

To further improve results, the authors extend the model into a Conditional GAN. By providing image-level labels (e.g., "this image contains a cat") to the generator, the model learns to produce more relevant features. This helps the generator learn "co-occurrences"—for example, that "cars" usually appear on "roads"—providing the discriminator with more realistic spatial distributions to learn from.

The Conditional GAN architecture where the generator receives class information to produce more relevant synthetic data for the discriminator.

Experimental Results

The authors evaluated their approach on four challenging benchmarks: PASCAL VOC 2012, SiftFlow, StanfordBG, and CamVid. The GAN-based approach consistently outperformed baseline supervised models, especially when labeled data was scarce.

  • PASCAL VOC 2012: Using only 30% of labeled data, the semi-supervised GAN achieved a 64.1% Mean IU (Intersection over Union), compared to 59.5% for the baseline. Adding weak labels pushed this further to 65.8%.
  • SiftFlow: The semi-supervised method reached 35.1% Mean IU, outperforming the fully supervised version (34.4%) by leveraging 2,000 unlabeled images.
  • Qualitative Improvements: The semi-supervised approach was notably better at identifying small objects (like distant people) and defining cleaner boundaries between classes compared to models trained only on limited labeled data.

Discussion and Future Work

The "aha moment" of this research is that adding "fake" visual data forces the model to cluster real samples more tightly in the feature space. However, some limitations remain. The training process is sensitive to small batch sizes due to memory constraints, and unlabeled data can occasionally promote "false positives" where background pixels are misclassified.

Future work could explore more modern backbones (like ResNet or Transformers) and focus on improving the visual fidelity of the generator, as higher-quality synthetic images could lead to even better segmentation features.

Summary updated

BibTeX
@inproceedings{souly2017semi,
  author = {Nasim Souly and Concetto Spampinato and Mubarak Shah},
  title = {{Semi Supervised Semantic Segmentation Using Generative Adversarial Network}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2017},
  url = {https://openreview.net/forum?id=rk-5AezO-H},
}
Figure