Abstract
Modern text-to-image (T2I) models often struggle with compositional tasks that require precise spatial arrangements and object counts. We present BlobGEN, a framework that introduces "dense blob representations" to bridge the gap between coarse bounding boxes and complex pixel-level maps. By decomposing scenes into modular, human-interpretable ellipses paired with rich text descriptions, BlobGEN achieves superior spatial and numerical accuracy. Our approach utilizes masked cross-attention to prevent attribute leakage and leverages Large Language Models (LLMs) for automated layout planning, enabling both high-quality image synthesis and precise local editing.
Introduction
While diffusion-based models like Stable Diffusion have revolutionized image generation, they frequently fail to adhere to complex prompts involving specific spatial relationships (e.g., "a cat under a car") or exact quantities (e.g., "exactly five boats"). Current methods for grounding these models typically fall into two categories: coarse grounding using bounding boxes, which lack orientation and detail, or dense grounding using semantic maps, which are difficult for users to create or manipulate.
BlobGEN addresses this by introducing a "middle ground" representation. This modular approach captures object pose and appearance through tilted ellipses, providing enough detail for complex scenes while remaining simple enough for human or LLM-based interaction.
The Dense Blob Representation
The core innovation of this work is the Dense Blob Representation. Each object in a scene is defined by two components:
- Blob Parameters: A five-variable vector $[c_x, c_y, a, b, heta]$ defining a tilted ellipse (center coordinates, radii, and orientation).
- Blob Description: A rich, synthetic text sentence describing the object's specific attributes, such as color, texture, and sub-parts.
By using tilted ellipses instead of standard axis-aligned bounding boxes, the model can capture the specific pose of an object—such as a leaning bird or a reclining person—far more effectively than traditional methods.
Methodology
BlobGEN incorporates two key technical components to process these representations:
Masked Cross-Attention
In standard T2I models, every text token can influence every pixel, often leading to "attribute leakage" where colors or textures from one object bleed into the rest of the image. BlobGEN introduces a masked cross-attention module that constrains a blob's text embedding to attend only to visual features within its specific elliptical mask. This ensures that the attributes of one object remain localized, facilitating modular scene construction.
LLM-based Layout Planning
To automate the creation of these blobs, the framework uses Large Language Models (such as GPT-4) as spatial architects. Through in-context learning, the LLM translates a global text prompt into structured CSS-style blob parameters and descriptions. These structured plans are then fed into the diffusion model to guide the generation process.
Experimental Results
Training and Evaluation
The model was trained on a filtered subset of 1 million image-text pairs from Common Crawl, utilizing synthetic captions generated by vision-language models (like LLaVA) to improve prompt-following. Evaluation was conducted on MS-COCO for general quality and the NSR-1K (Numerical and Spatial Reasoning) benchmark for compositional accuracy.
Quantitative Performance
- Image Realism: On MS-COCO, BlobGEN improved the zero-shot FID of the base Stable Diffusion model from 10.40 to 8.61.
- Controllability: BlobGEN significantly outperformed GLIGEN in layout alignment, achieving a mean Intersection over Union (mIOU) of 0.51 compared to 0.42.
- Compositional Accuracy: When paired with GPT-4, BlobGEN surpassed LayoutGPT on the NSR-1K benchmark, showing a 5.7% improvement in spatial accuracy and a 1.4% improvement in numerical counting.
Qualitative Benefits
Beyond metrics, BlobGEN enables intuitive local editing. Because the representation is modular, users can reposition objects or change specific attributes (e.g., changing a "horse" to a "cow") by modifying a single blob's parameters or text without triggering global changes in the image.
Discussion and Limitations
While BlobGEN offers significant improvements in controllability, it faces challenges regarding image inversion—the ability to convert an existing real photo back into blobs for editing. Additionally, very large blobs can sometimes cause entanglement with the background, and the system's spatial correctness remains dependent on the quality of the LLM's initial layout plan.
Future research will focus on tighter integration between the LLM planner and the diffusion process, potentially allowing for iterative refinement of the blobs during the generation stages to ensure even higher fidelity to complex prompts.
Summary updated