Leveraging GAN Priors for Few-Shot Part Segmentation

Mengya Han, Heliang Zheng, Chaoyue Wang, Yong Luo, Han Hu, Bo Du

Abstract

Part segmentation is a critical task in computer vision that involves labeling specific components of an object. However, the high cost of annotation makes it difficult to scale. While few-shot learning offers a potential solution, existing methods often struggle with overfitting or suboptimal feature representation. This paper discusses PFTGAN (Progressive Fine-Tuned GAN), a framework that repurposes pre-trained generative models for part segmentation using as little as a single labeled image. By treating segmentation labels as "colored images" and employing a progressive fine-tuning strategy, PFTGAN achieves state-of-the-art performance in extreme few-shot regimes.

Introduction

Deep learning models typically require vast amounts of labeled data to achieve high accuracy. Part segmentation—identifying fine-grained components like a car's headlights or a person's eyebrows—is particularly labor-intensive to annotate. Few-shot learning aims to mitigate this by learning from minimal examples. Current approaches often utilize "frozen" features from pre-trained Generative Adversarial Networks (GANs) or Diffusion models. However, these features are not inherently optimized for discriminative tasks like segmentation.

Fine-tuning large-scale generative models on a handful of images (1–5) usually leads to catastrophic overfitting, where the model loses its general spatial priors. PFTGAN addresses this by asking: How can we adapt a pre-trained generative model to learn task-specific features without compromising its existing structural knowledge?

Methodology

PFTGAN introduces a novel approach to bridge the gap between generative pre-training and discriminative segmentation through three primary innovations.

1. Prompt-based Label Projection

Traditional segmentation treats the task as a pixel-wise classification problem. PFTGAN reframes this by projecting part labels into the RGB color space. By transforming labels into "images," the perception task is converted into a generation task. This aligns the segmentation objective with the GAN’s original training objective, making the transition more natural for the model.

2. Two-Stream Architecture

The framework utilizes a shared encoder but bifurcates the decoder into two distinct streams:

  • Image Stream: This stream functions as a self-supervised auto-encoder. It reconstructs the original image to provide spatial constraints, ensuring the model retains the object's geometric integrity.
  • Segmentation Stream: This stream is specifically tuned to generate the RGB-projected label maps.

By sharing coarse-resolution layers, the segmentation stream inherits the hierarchical structural knowledge (e.g., the relative position of facial features) already present in the GAN.

3. Progressive Fine-Tuning

To manage the "domain gap" between realistic images and abstract label maps, the authors employ a progressive interpolation strategy. Training occurs in three stages:

  1. Layer-specific Tuning: Fine-tuning only the final "toRGB" layers using hybrid images (interpolations of real images and color maps).
  2. Decoder Tuning: Fine-tuning the entire decoder on these interpolated images.
  3. Task-specific Tuning: Final fine-tuning on the actual RGB segmentation maps.

Experimental Evaluation

The model was evaluated on two standard benchmarks: FFHQ-34 (human faces with 34 parts) and LSUN CAR-20 (cars with 20 parts).

Quantitative Results

PFTGAN demonstrates superior performance compared to competitive baselines such as DatasetGAN, DDPM (Diffusion-based), and MAE (Masked Auto-Encoder), particularly in one-shot scenarios:

  • FFHQ-34 (1-shot): PFTGAN achieved a mean Intersection over Union (mIoU) of 0.380, surpassing DatasetGAN (0.360) and DDPM (0.285).
  • LSUN CAR-20 (1-shot): The model reached 0.338 mIoU, significantly outperforming DatasetGAN's 0.270.

Qualitative Analysis

Visual evaluations indicate that PFTGAN produces cleaner boundaries and more coherent segments. Unlike diffusion-based methods, which can suffer from "speckling" or noise in the feature maps, PFTGAN leverages the smooth latent space of GANs to produce stable segmentation masks.

Discussion and Limitations

A key insight of this work is that the "task gap" is a major hurdle in few-shot learning. By transforming classification into a regression task (RGB projection), PFTGAN minimizes this gap. Furthermore, the use of an image stream allows the model to benefit from unlabeled data, anchoring the few-shot learning process in a broader understanding of object variance.

However, the method is dependent on GAN inversion—the process of mapping real images into the GAN's latent space. If the inversion fails to capture the nuances of an input image (e.g., an extreme profile view), the resulting segmentation quality declines. Additionally, extreme view variances remain a challenge when the provided support samples do not cover those perspectives.

Conclusion

PFTGAN demonstrates that pre-trained generative models contain rich spatial priors that can be effectively harnessed for part segmentation. Through progressive fine-tuning and label projection, it sets a new standard for few-shot performance. Future work may involve improving GAN inversion techniques and extending the framework to more diverse and complex datasets.

Summary updated

BibTeX
@inproceedings{han2022leveraging,
  author = {Mengya Han and Heliang Zheng and Chaoyue Wang and Yong Luo and Han Hu and Bo Du},
  title = {{Leveraging GAN Priors for Few-Shot Part Segmentation}},
  booktitle = {ACM Multimedia},
  year = {2022},
  doi = {10.1145/3503161.3548398},
}
Figure