MPG: A Multi-ingredient Pizza Image Generator with Conditional StyleGANs

Fangda Han, Guoyao Hao, Ricardo Guerrero, Vladimir PavlovicarXiv 2020 · OpenReview

TL;DR

This paper introduces MPG, a novel conditional GAN framework built upon StyleGAN2, capable of generating realistic pizza images with specific, controllable ingredients. By developing a "Scalewise Label Encoder" and a "Classification Regularizer," MPG effectively handles the complex challenge of multilabel image generation, producing diverse and high-fidelity results.

What Problem Does This Paper Address?

Generating images that accurately reflect multiple specified attributes (multilabel conditional image generation) is a significant challenge in computer vision. This is particularly true for complex visual domains like food, where ingredients can vary in appearance due to cooking, mixing, and spatial arrangement. Existing methods often struggle to control specific attributes or produce blurry, low-resolution images. The authors aim to address this by creating a system that can generate photo-realistic pizza images with precise control over a combination of ingredients.

Methods

The core of MPG is an adaptation of the state-of-the-art StyleGAN2 architecture. The key innovations are:

  • Scalewise Label Encoder (SLE): Instead of a single label embedding, the SLE generates distinct embeddings for different scales within the StyleGAN2 synthesis network. This allows for more nuanced control over how ingredient information influences image generation at various resolutions.
  • Classification Regularizer (CR): To further ensure that generated images contain the correct ingredients, a pretrained multilabel classifier is used to regularize the generator. This encourages the generator to produce images that the classifier would correctly label with the desired ingredients.
  • Conditional Discriminator: The discriminator is modified to include a conditional branch that receives the label embeddings. This helps it learn to distinguish between real images and generated images that correctly match their specified ingredients, and also to identify mismatches between ingredients and images.

Datasets

  • Pizza10: The authors introduce a new, carefully annotated dataset called Pizza10. This dataset is derived from the existing pizzaGANdata [29] by relabeling a subset of ingredients. The relabeling process aimed to improve accuracy and reduce mislabeled instances, resulting in a dataset better suited for multilabel classification and image retrieval tasks.

Key Insights and Ideas

  • Fine-grained control through scale-specific conditioning: The idea of injecting label information at different scales within the generator is crucial. It suggests that controlling visual features at different levels of detail requires corresponding levels of control in the conditioning signal.
  • The importance of a curated dataset: The significant performance jump observed when using the newly created Pizza10 dataset highlights how critical high-quality, accurately labeled data is for training robust conditional image generation models, especially in complex domains.
  • Bridging the gap between generation and classification: Using a classifier to regularize the generator is an effective way to enforce semantic consistency, ensuring that the generated images align with the intended labels.

Key Results

  • Quantitative Performance: MPG achieved a significantly lower FID (8.43) and a higher mAP (0.9816) compared to baseline models like StackGAN2, CookGAN, and AttnGAN. The FID score is particularly impressive, nearing the theoretical lower bound estimated from real images.
  • Qualitative Results: The generated pizza images are described as photo-realistic and visually appealing, effectively incorporating the specified ingredients. Visualizations demonstrate the independence of ingredient control from style noise and the smoothness of the learned embedding spaces.
  • Dataset Impact: The refined Pizza10 dataset led to a substantial improvement in performance for both retrieval and multilabel classification tasks compared to using the original pizzaGANdata.

Limitations and Future Work

  • Computational Cost: The authors acknowledge that the model remains computationally expensive to train.
  • Fine Resolution Details: While the visual appearance is strong, there is a noted loss of detail at fine resolutions.
  • Future Work: The authors suggest investigating ways to address the computational cost and improve fine-resolution details in future research. They also mention the potential for extending the framework to other multilabel image generation scenarios.

Summary updated

Abstract

Multilabel conditional image generation is a challenging problem in computer vision. In this work we propose Multi-ingredient Pizza Generator (MPG), a conditional Generative Neural Network (GAN) framework for synthesizing multilabel images. We design MPG based on a state-of-the-art GAN structure called StyleGAN2, in which we develop a new conditioning technique by enforcing intermediate feature maps to learn scalewise label information. Because of the complex nature of the multilabel image generation problem, we also regularize synthetic image by predicting the corresponding ingredients as well as encourage the discriminator to distinguish between matched image and mismatched image. To verify the efficacy of MPG, we test it on Pizza10, which is a carefully annotated multi-ingredient pizza image dataset. MPG can successfully generate photo-realist pizza images with desired ingredients. The framework can be easily extend to other multilabel image generation scenarios.
BibTeX
@misc{han2020mpg,
  author = {Fangda Han and Guoyao Hao and Ricardo Guerrero and Vladimir Pavlovic},
  title = {{MPG: A Multi-ingredient Pizza Image Generator with Conditional StyleGANs}},
  year = {2020},
  eprint = {2012.02821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.02821},
}
Figure