Retrieval-Augmented Floor Plan Generation with Pre-Trained Text-to-Image Models: A Saudi Building Code Study

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.

Authors

Institutions

Publication Details

Journal
Electronics
Published
2026-08-24
DOI
https://doi.org/10.3390/electronics15173778
Primary Topic
Handwritten Text Recognition Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Retrieval-Augmented Floor Plan Generation with Pre-Trained Text-to-Image Models: A Saudi Building Code Study

Fayha Almutairy
Electronics
Handwritten Text Recognition Techniques
article

Retrieval-Augmented Floor Plan Generation with Pre-Trained Text-to-Image Models: A Saudi Building Code Study

Fayha Almutairy
article en

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.

ElectronicsVol. 15(17)
Shaqra University (SA)
Sustainable cities and communities
Openalex Percentile: Top 12%
Handwritten Text Recognition Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.