TL;DR
Snap a messy, real-world photo of a building, and this framework turns it into working, editable code that generates a clean 3D architectural asset. Instead of forcing an AI to write fragile 3D modeling scripts from scratch, the authors teach it to sketch a high-level blueprint, critique its own visual drafts, and compile the result deterministically—giving game developers and urban designers instant, tweakable 3D buildings without writing rules by hand.
What Problem Does This Paper Address?
If you have ever walked through a sprawling digital city in a video game, you were likely looking at procedural modeling. Because buildings are fundamentally rhythmic—floors repeat, windows align in grids—we can describe them compactly using rule-based code, like Computer Generated Architecture (CGA) shape grammars, rather than sculpting millions of static polygons. Unlike neural radiance fields (NeRFs) or raw 3D meshes, procedural models are lightweight and infinitely editable.
The catch? Writing those rules takes serious human expertise. Reversing the process—going from a casual street photo to executable procedural code ("inverse procedural modeling")—is notoriously tricky. Asking a Vision-Language Model (VLM) to spit out raw CGA code directly from a photo usually fails. Why? Because street photos suffer from perspective distortion, trees blocking the view, and weird lighting. Furthermore, procedural code is non-unique (you can split a grid rows-first or columns-first to get the exact same building) and unforgiving: one syntax error breaks the whole 3D compilation.
Methods
Rather than gambling on end-to-end image-to-code generation, the authors build a hierarchical neuro-symbolic bridge. Neural networks handle the fuzzy visual understanding, outputting structured YAML files, while a traditional deterministic compiler handles the strict code generation.
The pipeline splits the problem into three stages:
- Global Structure Reasoning (with Visual Reflection): Given a building crop and a segmentation mask (from SAM3), a fine-tuned Qwen-VL-7B model predicts a Global Structure Layout Tree—a 2D hierarchy of
splitandrepeatoperations defining floors and columns. Because initial guesses often misalign, the authors introduce a clever render-guided reflection loop. A deterministic renderer turns the YAML draft into a color-coded 2D schematic. The VLM then looks at its rendered schematic side-by-side with the original masked photo, spots structural mismatches (like a missing row of windows), and rewrites the YAML—repeating this up to two times. Visual-symbolic reflection loop
- Component-Level Parameterization: Once the global tree isolates individual repeating tiles (windows, entrances), a specialized visual encoder zooms in. It fuses CLIP features (for semantic style) and DINOv3 features (for crisp geometric edges) to predict a structured checklist of attributes—like arch presence, sill dimensions, row/column pane counts, and door handles.
- Deterministic Compilation: Finally, a custom compiler translates the global layout tree and local tile attributes into guaranteed-executable CGA rules, attaching the visible facade(s) onto a simple 3D massing block.
Datasets
To train and test their pipeline, the authors draw from:
- CMP and eTRIMS: Classic real-world facade datasets used to evaluate global layouts and build a held-out test set of 107 real-world component crops (split strictly by building identity to prevent data leakage).
- In-the-wild imagery: Challenging street-level photographs featuring perspective tilt and occlusions.
- Procedurally rendered synthetic tiles: Generated to provide clean, controllable supervision alongside real-world crops for training the local component predictor.
(Note: Specific dataset sizes for training the global layout model are deferred to the paper's appendices and not detailed in the main text.)
Key Insights and Ideas
- Compare in pixel space, repair in symbol space: Because two completely different code trees can describe the exact same facade, grading or fixing code purely via text tokens is unstable. Rendering the symbolic draft into a simple 2D color map lets the VLM effortlessly "see" counting or spacing mistakes.
- Middle-code beats raw code: Constraining neural networks to output high-level YAML schemas—and letting a classic compiler write the low-level syntax—eliminates syntax crashes while keeping the model grounded.
- True procedural editability: Because the output is modular code rather than a static mesh, changing one parameter on a single window tile automatically updates every matching window across the entire skyscraper, and tweaking the layout tree smoothly stretches or rearranges floors.
Key Results
- Visual Reflection Works: Across two reflection iterations, window count accuracy jumps from 0.61 to 0.80 and door count accuracy rises from 0.69 to 0.81. Meanwhile, the Tree Repair Cost (the number of manual node edits an expert needs to fix a layout) drops sharply from 4.32 to 1.47, while maintaining 99% compilation success.
- Beating Frontier VLMs: Prompting Gemini 3.1 Pro Preview to write raw tile-level CGA code directly succeeds only 68% of the time. Asking Gemini to predict the authors' structured YAML schema boosts execution to 95%, and the authors' custom dual-stream predictor pushes it to 98% with superior attribute accuracy (e.g., 0.99 on arches, 0.96 on handles). End-to-end, their pipeline beats direct Gemini generation on both compilation rate (98% vs. 94%) and structural accuracy (1.47 vs. 1.83 repair cost).
- Human Preference: In a blinded study against FaçAID (a prior method that requires pre-segmented inputs, whereas this method uses raw RGB), users preferred the authors' layouts 59% of the time versus 30% for FaçAID (with 11% ties).
Limitations and Future Work
- Flat Facades & Hallucinated Backs: The method assumes facades are roughly planar and wraps them onto simple rectangular boxes. Unseen sides of the building aren't reconstructed from evidence—they are simply filled in by repeating rules.
- Vocabulary Limits: The component schema handles parametric window arches, stairs, and sills, but cannot yet express ornate sculptures, complex decorative assemblies, or arched entrances. Extreme camera angles and heavy tree cover can still trip up the layout tree.
- Next Steps: The authors point toward incorporating richer 3D massing shapes, broader architectural vocabularies, and rigorous testing across completely unseen cities and architectural styles.
Summary updated