TL;DR
ShapeWords is a novel framework that allows users to guide text-to-image synthesis using 3D shapes by embedding geometric information directly into the text prompt space. By representing 3D shapes as specialized "tokens" within a CLIP-based embedding, the method achieves superior compositionality and flexible, view-independent control compared to traditional 2D-map-based conditioning like ControlNet.
What Problem Does This Paper Address?
While text-to-image (T2I) models like Stable Diffusion are incredibly powerful, providing fine-grained control over the shape of generated objects remains a challenge. Current state-of-the-art methods typically rely on 2D spatial conditioning, such as depth maps or edge maps (e.g., ControlNet).
However, these 2D approaches have three major drawbacks:
- Viewpoint Dependence: They are locked to a single, fixed perspective. If you want to see the same object from a different angle, the 2D map doesn't help.
- Poor Compositionality: These models often struggle to balance the "hard" geometric constraint of a depth map with complex textual descriptions. For example, asking for "an airplane inside a snow globe" using a depth map of an airplane often results in just an airplane, ignoring the "snow globe" context.
- Lack of Design Flexibility: They don't allow for "soft" guidance where a user might want an image that resembles a target shape but allows for stylistic or structural variations.
Methods
The core innovation of ShapeWords is the Shape2CLIP module, which bridges the gap between 3D geometry and textual embeddings.
- Shape Encoding: The system takes a 3D point cloud and processes it through Point-BERT, a transformer-based encoder that extracts structure-aware geometric features.
- Shape-Aware Tokens: Instead of using a separate conditioning branch, ShapeWords maps these 3D features into the OpenCLIP text embedding space. It generates a "prompt residual" ($\delta T$) that is added to specific tokens in the text prompt—specifically the object identifier (e.g., "[SHAPE-ID]") and the End-of-Sequence (EOS) token.
- Why the EOS token? The authors found that updating the EOS token is critical because it captures the global context of the entire prompt, allowing the shape information to integrate naturally with the rest of the scene.
- Training with SDS: The Shape2CLIP module is trained using Score Distillation Sampling (SDS). This allows the model to learn the mapping from 3D shapes to CLIP space by leveraging the gradients of a pre-trained Stable Diffusion model, ensuring the generated images remain aesthetically plausible.
- Guidance Strength ($\lambda$): Users can adjust a parameter $\lambda$ to control how strictly the model follows the 3D shape, enabling everything from exact replicas to loose, stylized interpretations.
Datasets
- ShapeNet: The primary source for 3D reference shapes across 55 categories.
- Training Dataset: A massive synthetic dataset of 1.58 million triplets (shape, prompt, image). The images were generated using ControlNet on ShapeNet depth maps, then augmented with ChatGPT-generated prompts and background inpainting to ensure diversity and reduce bias.
- Evaluation Benchmarks: The authors introduced two new test sets:
- Simple Prompts Dataset: 2592 shapes with basic "a photo of a [SHAPE-ID]" prompts to test raw geometric adherence.
- Compositional Prompts Dataset: Challenging prompts like "a craftsman working on a [SHAPE-ID]" to test how well the model handles complex interactions and contexts.
Key Insights and Ideas
- Geometry as Language: By treating 3D shapes as specialized "words" in the CLIP space, the model can use its existing linguistic knowledge to handle composition. This is why ShapeWords succeeds at "an airplane in a snow globe" where depth-map methods fail—it understands the concept of the airplane's shape rather than just seeing a wall of pixels.
- View-Independent Control: Because the embedding represents the full 3D structure, the model can generate the object from any viewpoint specified in the text or inferred by the diffusion process, without needing a new depth map for every angle.
- Soft vs. Hard Constraints: Traditional conditioning is a "hard" constraint. ShapeWords provides "soft" structural guidance, which is often more useful for creative exploration and concept art.
Key Results
ShapeWords significantly outperforms ControlNet-based baselines in both quantitative metrics and human preference studies, particularly in complex scenarios.
- Quantitative: On compositional prompts, ShapeWords achieved a FID of 73.8 (lower is better) compared to ControlNet's 97.0, and a higher CLIP score of 31.5 vs 26.9, indicating much better alignment with text.
- Shape Adherence: Even without explicit depth maps, ShapeWords@40 (using 40% guidance) achieved shape adherence comparable to the original ControlNet while maintaining much higher image quality.
- User Study: In a study with 250 participants, ShapeWords was preferred 54.4% of the time for text matching and 57.1% for shape matching, consistently beating the best ControlNet variants.
Limitations and Future Work
- Fine-Grained Details: The model sometimes struggles with very thin parts or intricate holes (e.g., the legs of a delicate chair), likely due to the resolution limits of the underlying OpenCLIP model (224px).
- Appearance Biases: The authors noted some biases in color and saturation, which they attribute to the synthetic training data generated by ControlNet.
- Future Directions: Promising next steps include training on larger, more diverse datasets and combining shape tokens with viewpoint-specific tokens to provide even more granular control over the final render.
Summary updated