Introduction
While modern image synthesis models (like Stable Diffusion or ControlNet) can generate stunning visuals, they are often "blind" to the underlying common sense of the physical world. They rely on human-provided spatial conditions to decide where objects go. If a user provides a nonsensical layout—such as a square-shaped donut or a person the size of a house—the model will faithfully generate that nonsense.
VisorGPT addresses this by applying the "Generative Pre-training" success story to the visual world. By treating spatial layouts—like bounding boxes, human poses, and masks—as a language, it learns a probabilistic "visual prior." This allows the model to automatically generate or complete realistic scene layouts, ensuring that synthetic images adhere to real-world logic (e.g., keeping a cup on a table rather than floating in mid-air).
Methods: Discretizing the Visual World
The core innovation of VisorGPT is the transformation of continuous visual geometry into discrete sequences that a standard Transformer decoder (specifically a GPT-2 architecture) can process.
- Discretization: Continuous coordinates (like the $x,y$ positions of a bounding box) are quantized into discrete bins. This turns spatial data into "vocabulary" tokens.
- Serialization via Prompting: To unify different types of data, the authors designed universal prompt templates. A sequence might look like:
[Annotation type]; [Data type]; [Size]; [#Instances]; [Category names]; [Coordinates]. This allows the model to handle bounding boxes, human keypoints, and instance masks within the same framework. - Likelihood Maximization: The model is trained just like an LLM—predicting the next token in the sequence. By training on millions of these "visual sentences," the model learns the joint probability distribution of where objects of certain classes and sizes usually appear.
- Customized Sampling: Because it is a generative model, users can "prime" the model with a partial prompt (e.g., "Give me a scene with 3 large dogs") and the model will auto-complete the coordinates for those dogs in a realistic arrangement.
Datasets
The authors compiled a massive "sequence corpus" of approximately 4 million sequences from several public datasets, covering object detection (Open Images, Objects365, COCO, ImageNet), human pose (COCO Keypoint, CrowdPose), instance segmentation (COCO Mask), specialized layouts (Rico, PubLayNet), and image-text pairs (Flickr30K).
Key Insights and Results
- Visual Common Sense as Syntax: The rules of the physical world—gravity, relative scale, and co-occurrence—can be modeled as a language syntax. Just as "the" usually precedes a noun, a "sky" usually appears above "grass."
- Unified Modality: Unlike previous work that built specific models for layout generation or pose estimation, VisorGPT proves that a single, vanilla Transformer can learn diverse visual tasks simultaneously simply by changing the prompt.
- State-of-the-Art Layouts: On the Rico (UI) and PubLayNet (Document) benchmarks, VisorGPT achieved significantly better FID scores (5.85 and 9.18, respectively) compared to specialized models like LayoutDM (6.65 and 13.9).
- High Controllability: The model is remarkably good at following instructions, achieving over 99% accuracy in matching the requested number of instances and ~90% accuracy in adhering to requested object sizes.
- Extrapolation vs. Memorization: The model demonstrates "scene completion." If a user places two people in a specific part of the canvas, VisorGPT can deduce where "skis" should be placed to make the scene coherent, showing it has learned relationships rather than just memorizing training images.
Limitations and Future Work
Due to the maximum token limit of Transformers, there is a cap on how many objects or how detailed a mask can be included in a single sequence. Furthermore, while the model understands where a "dog" goes, it doesn't yet leverage the massive world knowledge of multi-billion parameter LLMs.
The authors suggest that these discrete visual locations could be integrated directly into the training of future Large Language Models, allowing them to truly "perceive" and "reason" about the spatial world alongside text.
Summary updated