CLIP-Forge: Towards Zero-Shot Text-to-Shape Generation

Aditya Sanghi, Hang Chu, Joseph G. Lambourne, Ye Wang, Chin-Yi Cheng, Marco Fumero · DOI

Introduction

Generating 3D shapes from natural language descriptions is a significant challenge in computer vision and graphics, with applications ranging from virtual reality to industrial design. While text-to-image generation has seen rapid progress due to the abundance of captioned images on the web, 3D generation is hindered by a severe lack of paired text-and-3D-model datasets. Existing supervised methods are often restricted to specific categories or require expensive manual labeling. Furthermore, optimization-based approaches, while capable of zero-shot generation, are computationally intensive and slow.

CLIP-Forge addresses these issues by introducing a framework for zero-shot text-to-shape generation that requires no paired text-3D data and operates in a fast, feed-forward manner.

Methodology

The CLIP-Forge framework utilizes a two-stage training process that leverages the joint language-vision latent space of the Contrastive Language-Image Pre-training (CLIP) model.

Stage 1: Shape Autoencoder

The first stage involves training a 3D autoencoder on unlabeled voxelized shapes. A voxel encoder compresses the 3D geometry into a latent shape embedding ($e$). An implicit decoder, based on Occupancy Networks, is then trained to reconstruct the original geometry from this embedding by predicting occupancy at given $(x, y, z)$ coordinates.

Stage 2: Conditional Normalizing Flow

The second stage creates a bridge between the 3D shape space and the CLIP latent space. 3D shapes are rendered into 2D images from multiple viewpoints. These images are passed through a pre-trained, frozen CLIP image encoder to obtain image embeddings ($c$). A Normalizing Flow model (specifically RealNVP) is trained to map a simple Gaussian distribution to the distribution of shape embeddings ($e$), conditioned on the CLIP image features ($c$).

The CLIP-Forge training and inference pipeline. Stage 1 trains a shape autoencoder. Stage 2 trains a normalizing flow conditioned on CLIP image embeddings. Inference swaps image embeddings for text embeddings.

Zero-Shot Inference

At inference time, the model exploits the "interchangeable" nature of CLIP's text and image embeddings. By providing a natural language prompt to the pre-trained CLIP text encoder, the resulting embedding can be used as the conditioning variable ($c$) for the flow model. The flow model then generates a shape embedding ($e$), which the implicit decoder transforms into a 3D mesh.

Key Insights

  • Rendering as a Proxy: By rendering 3D shapes into 2D images, the authors bypass the need for direct text-3D pairs, using CLIP's pre-existing knowledge of image-text relationships as a bridge.
  • Flow-based Sampling: The use of a normalizing flow allows the model to sample multiple diverse shapes for a single text prompt by varying the input noise vector, enabling the generation of various interpretations of a prompt like "a round chair."
  • Efficiency: Unlike optimization-based methods that require lengthy per-shape processing, CLIP-Forge is a feed-forward model, enabling near-instantaneous generation.

Results and Evaluation

CLIP-Forge demonstrates impressive generalization capabilities across various object categories and fine-grained attributes.

Examples of 3D shapes generated by CLIP-Forge from various text prompts, demonstrating zero-shot capability across categories and sub-categories.

In quantitative evaluations, CLIP-Forge achieved a classification accuracy of 83.33% on generated shapes, significantly outperforming supervised baselines (6.84%) in zero-shot scenarios. Human perceptual studies further confirmed the model's ability to capture fine-grained details, with participants correctly identifying shapes generated from specific prompts (e.g., "a fighter plane") over generic ones 70.83% of the time.

Limitations and Future Work

While successful, the current implementation has limitations. The $32^3$ voxel resolution used for the initial encoding restricts fine geometric detail. Additionally, the model currently generates only geometry without textures or materials. Future work aims to integrate local implicit methods for higher resolution and explore the generation of colored and textured 3D models. The model also remains subject to the inherent biases of the pre-trained CLIP encoder.

Summary updated

BibTeX
@inproceedings{sanghi2021clip,
  author = {Aditya Sanghi and Hang Chu and Joseph G. Lambourne and Ye Wang and Chin-Yi Cheng and Marco Fumero},
  title = {{CLIP-Forge: Towards Zero-Shot Text-to-Shape Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr52688.2022.01805},
}
Figure