C-Flow: Conditional Generative Flow Models for Images and 3D Point Clouds

Albert Pumarola, Stefan Popov, Francesc Moreno-Noguer, Vittorio Ferrari

Abstract

Flow-based generative models have highly desirable properties like exact log-likelihood evaluation and exact latent-variable inference, however they are still in their infancy and have not received as much attention as alternative generative models. In this paper, we introduce C-Flow, a novel conditioning scheme that brings normalizing flows to an entirely new scenario with great possibilities for multimodal data modeling. C-Flow is based on a parallel sequence of invertible mappings in which a source flow guides the target flow at every step, enabling fine-grained control over the generation process. We also devise a new strategy to model unordered 3D point clouds that, in combination with the conditioning scheme, makes it possible to address 3D reconstruction from a single image and its inverse problem of rendering an image given a point cloud. We demonstrate our conditioning method to be very adaptable, being also applicable to image manipulation, style transfer and multi-modal image-to-image mapping in a diversity of domains, including RGB images, segmentation maps and edge masks.

Introduction

Generative modeling is currently dominated by Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs). However, Normalizing Flows offer unique advantages: they allow for exact latent-variable inference and exact log-likelihood evaluation. Despite these perks, flows have historically struggled with two primary challenges: effective conditioning and the processing of unordered data.

Conditioning a flow-based model to generate specific outputs based on source inputs (e.g., generating a 3D chair from a 2D image) is traditionally difficult. Furthermore, flows typically rely on convolutional layers, which require data to be on a regular grid, making them inherently ill-suited for 3D point clouds. C-Flow addresses these gaps by introducing a framework that guides one flow with another and a preprocessing strategy to structure 3D point clouds.

Methodology

The core of the C-Flow architecture consists of two parallel flow branches: a source and a target. Unlike previous methods that might only feed the condition at the beginning, C-Flow interconnects the two branches using Conditional Coupling Layers. At every transformation step, the source flow provides features that guide the target flow, enabling fine-grained control over the generation process.

C-Flow enables the generation of structured 3D point clouds from 2D images.

Handling Unordered 3D Point Clouds

To handle unordered 3D points, the authors introduce a three-step process:

  1. Hilbert Sorting: Points are reordered based on their position along a 3D Hilbert curve, creating a semantically stable neighborhood relationship.
  2. Global Feature Approximation: An invertible version of global feature extraction (similar to PointNet) is used to capture the overall shape.
  3. Symmetric Chamfer Distance: A specialized loss function for the cycle consistency term that is better suited for point sets than standard L1 loss.

Experimental Results and Insights

The authors evaluated C-Flow across several diverse domains, including ShapeNet for 3D reconstruction and Cityscapes for mapping semantic segmentation masks to street-view images.

Bijectivity as a Multi-Tool

Because the model is fully invertible, the exact same weights can be used for 3D reconstruction (Image → Points) and rendering (Points → Image). This bijectivity allows for a unified framework where the model can sample the latent space multiple times for a single input, generating multiple plausible "interpretations" of an image, such as rendering the same 3D chair with different textures.

The invertible nature of C-Flow allows for high-quality image rendering from 3D data.

Key Results

  • 3D Reconstruction: C-Flow achieves a Chamfer Distance (CD) of 0.26 on ShapeNet, performing on par with specialized state-of-the-art 3D models like AtlasNet and Pix2Mesh.
  • Image-to-Image: It is the first flow-based model to demonstrate high-quality results on tasks like segmentation-to-RGB, achieving competitive Inception Scores (IS).
  • Refinement: The model can "upsample" point clouds by performing multiple backward passes through the flow with different latent samples, progressively improving detail.

Limitations and Future Work

Despite its successes, C-Flow faces challenges in resolution and computational efficiency. Due to high memory requirements, experiments were limited to 64x64 resolution, and training required roughly 10 days on 4 GPUs. Future work will explore more memory-efficient flow architectures and more robust sorting mechanisms for 3D data to scale these capabilities to higher definitions.

Summary updated

BibTeX
@inproceedings{pumarola2020c,
  author = {Albert Pumarola and Stefan Popov and Francesc Moreno-Noguer and Vittorio Ferrari},
  title = {{C-Flow: Conditional Generative Flow Models for Images and 3D Point Clouds}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  url = {https://openreview.net/forum?id=9aksbvU7Qy1},
}
Figure