Retrieval-Augmented Floor Plan Generation with Pre-Trained Text-to-Image Models: A Saudi Building Code Study
TL;DR
The study sets out plainly what off-the-shelf models and prompt-level guidance deliver without fine-tuning, and where they still fall short of professional, code-verified design.
Abstract
Floor plan design normally depends on architectural training or CAD software, a barrier for homeowners, students, and small practices alike. The author asks a narrower question: can a general-purpose, pre-trained text-to-image model draw a usable floor plan straight from a written brief, and can a building code be folded into that process? To find out, four models, Gemini, DALL-E, DeepAI, and Stable Diffusion, were put through tests using ten descriptions of villas and apartment buildings. Relevant Saudi Building Code (SBC) clauses, covering minimum room sizes, corridor widths, accessibility, and fire-safety provisions, were retrieved and written into each prompt before generation, and the outputs were assessed quantitatively by accuracy and latency, with SBC compliance and realism recorded only as qualitative observations. Gemini was the fastest by a wide margin, averaging 8.3 s per plan against 40.5 for Stable Diffusion, the slowest, and it also scored highest for accuracy; that ordering is not established here, however, because the models were not scored by a common judge, and each description was generated only once. DALL-E drew the most realistic images but was slower and looser on detail. One limitation cut across all four: none reported room dimensions reliably, so compliance can be verified only in part from the image. A case is presented in which Gemini printed area labels directly on the image, yet a pixel-level measurement shows the room with the smallest printed area drawn as the largest of the three, an internal inconsistency that needs no external ground truth to demonstrate and that exposes the core limitation of current text-to-image decoders. On the strength of these results, the best model, Gemini, was built into a Django web application that turns a typed description into a viewable plan. The system is offered as an early-stage drafting assistant, not a code-verified architectural design tool. The study sets out plainly what off-the-shelf models and prompt-level guidance deliver without fine-tuning, and where they still fall short of professional, code-verified design.