DreamFusion: Text-to-3D using 2D Diffusion

Ben Poole, Ajay Jain, Jonathan T. Barron, Ben Mildenhall

Overview

DreamFusion is a breakthrough method that generates high-fidelity 3D assets directly from text prompts without requiring any 3D training data. By leveraging a pretrained 2D diffusion model (Imagen) as a "critic" through a novel technique called Score Distillation Sampling (SDS), the authors successfully optimize a Neural Radiance Field (NeRF) to produce 3D objects that look realistic from every angle.

The Bottleneck in 3D Generation

Creating 3D assets is notoriously difficult and time-consuming. While we have seen an explosion in 2D text-to-image models like DALL-E 2 and Stable Diffusion, 3D generation has lagged significantly behind. The primary bottleneck is data: while billions of captioned images exist on the web to train 2D models, high-quality, large-scale 3D datasets are scarce.

Previous attempts to "lift" 2D knowledge into 3D often relied on CLIP. While CLIP provides a semantic link between text and images, it lacks the fine-grained spatial understanding needed to generate complex geometry. Consequently, earlier models often produced "flat" results or lacked realistic textures and coherent shapes.

Methodology: Score Distillation Sampling (SDS)

The core innovation of DreamFusion is Score Distillation Sampling (SDS). Instead of training a 3D model from scratch, the authors treat a pretrained 2D diffusion model as a frozen "expert" that inherently knows what objects should look like from various perspectives.

  1. The Representation: The 3D scene is represented using a Neural Radiance Field (NeRF), a neural network that maps 3D coordinates to color and density.
  2. The Optimization Loop:
  3. A random camera angle is chosen, and the NeRF renders a 2D image.
  4. This image is "noised" following the standard diffusion process.
  5. The pretrained 2D diffusion model (Imagen) predicts the noise in that image based on the provided text prompt.
  6. The difference between the predicted noise and the actual added noise provides a gradient. This gradient is then used to update the NeRF's parameters.
  7. Shading and Geometry: To ensure the model learns actual 3D structure rather than just "painting" a 2D image onto a flat surface, the authors randomly render the NeRF without textures (using only shading and normal maps). This forces the model to develop a coherent 3D shape.
A generated 3D scene of a robot and dinosaur playing chess, displaying the full render alongside underlying geometry (shading and normal maps).
  1. View-Dependent Prompts: To solve the "Janus problem"—where a model might put a face on both the front and back of a head—the authors append camera-specific text like "front view" or "side view" to the prompt during optimization.

Key Insights

  • 2D Priors are Sufficient for 3D: The most significant takeaway is that a sufficiently powerful 2D generative model contains enough implicit knowledge about lighting, shading, and perspective to guide the creation of a 3D object, even if it was never trained on a single 3D file.
  • SDS vs. Traditional Sampling: In standard diffusion, you start with noise and "denoise" it into an image. In SDS, you are optimizing the parameters of a generator (the NeRF) so that its output always looks like a clean sample to the diffusion model.

Results

DreamFusion does not use a 3D dataset, relying entirely on Imagen (pretrained on web-scale image-text pairs) and evaluating on a subset of MS-COCO prompts.

  • Quantitative: Using CLIP R-Precision (a metric for how well a render matches a text prompt), DreamFusion significantly outperformed previous state-of-the-art methods like Dream Fields. On the CLIP-L/14 metric, DreamFusion achieved an R-Precision of 88.4%, approaching the performance of real-world ground truth images.
  • Qualitative: The generated models are relightable, can be viewed from any angle, and exhibit much higher geometric complexity than previous work. They successfully generated highly diverse and imaginative objects, such as "a chimpanzee dressed like Henry VIII."
"A chimpanzee dressed like Henry VIII" generated by DreamFusion.

Limitations and Future Work

While groundbreaking, DreamFusion has a few limitations:

  • The Janus Problem: Despite view-dependent prompting, the model occasionally still generates objects with multiple faces or redundant parts.
  • Resolution: The current implementation uses the 64x64 base Imagen model. While the NeRF can be rendered at higher resolutions, the "guidance" comes from a low-res source, which can lead to an oversmoothed look or a lack of fine-grained textures.
  • Computational Cost: Optimizing a single 3D asset takes about 1.5 hours on 4 TPUv4 chips, making it much slower than 2D image generation.
  • Mode Seeking: The SDS loss tends to converge on a single, very high-quality version of a prompt rather than providing a diverse range of possible 3D interpretations.

Summary updated

BibTeX
@inproceedings{poole2023dreamfusion,
  author = {Ben Poole and Ajay Jain and Jonathan T. Barron and Ben Mildenhall},
  title = {{DreamFusion: Text-to-3D using 2D Diffusion}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=FjNys5c7VyY},
}
Figure