ModRes: A modification of the ResPlan dataset ready for floor plan analysis and graph machine learning
Authors: Emma Shelley, Wassim Jabi, Thomas Woolley, Katerina Kaouri
Organizations: School of Computational and Mathematical Sciences, Cardiff University, Cardiff · Welsh School of Architecture, Cardiff University, Cardiff
Floor plan datasets underpin computational analysis of building layouts, spatial connectivity and graph machine learning. However, publicly available datasets often require substantial preprocessing before they can be used reliably. We present ModRes, a cleaned and enriched version of the ResPlan dataset, containing 8,431 valid and unique residential floor plans. Invalid and duplicate floor plans are removed through a dedicated cleaning workflow, producing a ready-to-use dataset. For each floor plan, ModRes provides two-dimensional geometry, images, three-dimensional building representations and three complementary dual graphs in CSV and JSON formats with graph-, node- and edge-level features. Continuous and categorical graph attributes support machine learning workflows. We characterise the dataset using graph-based statistics and demonstrate its utility through a range of case studies. ModRes provides structured geometric, topological and semantic representations needed to automate spatial analysis and support machine learning-based workflows for building design and performance evaluation.
Figures & tables
Figure 1: The planar (primary) and dual graph of a floor plan. Source: [ 14 ] .
Figure 2: An example of a graph in ResPlan. Dark blue lines denote connections through doors, and dark green dashed lines represent connections through an arch. Source: [ 11 ] .
Figure 3: Examples of floor plans stored within different datasets.
Figure 4: Examples of invalid floor plans identified during the dataset filtering process.
Number of bedrooms
Area Threshold ( m2 )
1
[46.5,92.7]
2
[69.7,120.3]
3
[99.4,181.4]
4
[142.6,278.7]
5
[191.9,278.7]
Table 1: Thresholds for removal of floor plans in the size filtering step.
Figure 5: The distribution of floor plan areas in the ResPlan dataset before and after applying the size filtering process.
Cleaning step
Number of plans removed
Percentage of plans removed
No kitchens
84
0.5 %
Invalid doors
627
3.7 %
Missing rooms
1609
9.4 %
Missing walls
372
2.2 %
Disconnected
1606
9.4 %
Door Clusters
2046
12.0 %
Table 2: Number and percentage of floor plans in the ResPlan dataset removed through our cleaning process at each step.
Figure 6: An example of small slivers being removed from the living room of plan 890 using the ‘buffer_shrink_expand’ function.
Figure 7: An example of a door geometry being separated into two distinct doors from plan 15633.
Figure 8: An example of each dual graph type for plan #1158 . From left to right they are the: Full graph, Adjacency Graph and Accessibility graph.
Figure 9: Diagrams showing how different graph features are calculated. Namely, the red areas or length of red line in (c).
Figure 10: An example of high and low compactness floor plans, as calculated using the isoperimetric quotient.
Room type
Measurement
Small
Medium
Large
Extra Large
Living room
Area
(0,20]
(20,40]
(40,60]
(60,∞)
Perimeter
(0,20]
(20,35]
(35,50]
(50,∞)
Bedroom
Area
(0,15]
(15,20]
(20,25]
(25,∞)
Perimeter
(0,15]
(15,20]
(20,25]
(25,∞)
Bathroom
Area
(0,2.5]
(2.5,5]
(5,7.5]
(7.5,∞)
Perimeter
(0,6]
(6,9]
(9,12]
(12,∞)
Table 3: Measurement thresholds for each category for area and perimeter in the categorical dataset. Areas are in m2 and perimeters are in m .
Figure 11: Diagrams showing how different node features are calculated depending on the node type.
Attribute
Entity Type
Data Type
Units
Allowed Range
Encoding Method
Source Method
Available at Inference Time
Bedrooms
Graph
Ordinal
–
0 – 6
Integer encoding
Computed from geometry
Yes
Area
Graph
Continuous
m2
>0
–
Computed from geometry
Yes
Net Area
Graph
Continuous
m2
>0
–
Computed from geometry
Yes
Perimeter
Graph
Continuous
m
>0
–
Computed from geometry
Yes
Compactness
Graph
Continuous
-
0 – 1
–
Isoperimetric quotient
Yes
Unit Type
Graph
Categorical
–
0 – 3
One-hot
Given in ResPlan
Yes
Table 4: Attributes included in the dataset.
Figure 12: Floor plan 67 in two-dimensional and three-dimensional form.
Figure 13: Examples of the geometry images stored for each floor plan.
Figure 14: Frequency of different numbers of bedrooms in ModRes.
Graph
Mean
Variance
Standard Deviation
Skew
Full
20.34
16.90
4.11
0.57
Adjacency
6.60
1.26
1.12
0.80
Accessibility
13.46
6.79
2.61
0.66
Table 5: Variables for the gamma distribution approximation for the number of nodes in each type of graph.
Graph
Mean
Variance
Standard Deviation
Skew
Full
23.06
24.68
4.97
0.63
Adjacency
9.19
4.29
2.07
0.65
Accessibility
12.52
6.89
2.62
0.65
Table 6: Variables for the gamma distribution approximation for the number of edges in each type of graph.
Figure 15: Histograms showing the node and edge distributions for accessibility graphs.
Figure 16: Histograms showing the node and edge distributions for adjacency graphs.
Figure 17: Histograms showing the node and edge distributions for full graphs.
Figure 18: Histograms to show the distribution of density of graphs across all three graph types.
Figure 19: Histograms to show the distribution of the degrees of nodes across all three graph types.
Figure 20: Examples of high and low density graphs from the Modified ResPlan dataset.
Figure 21: Heat maps showing the heating and cooling load per square metre for plan 67 in the Modified ResPlan dataset.
Figure 22: Betweenness centrality for nodes and edges calculated on the accessibility graph for plan 8426.
Figure 23: Visibility analysis on plan 7. The green area is visible from the given vertex, and the red line represents the direction of sight.
In this work, we propose HypergraphFormer, a novel and efficient approach to floor plan generation based on learning hypergraph representations with a large language model (LLM). The model is trained via supervised fine-tuning to generate a hypergraph-based textual representation that encodes spatial relationships and connectivity information within floor plans. We train and evaluate our approach on the RPLAN dataset, and further demonstrate its generalizability on a separate out-of-distribution dataset, which we release in this paper. Our method outperforms state-of-the-art techniques based on rasterized or vectorized representations across a diverse set of metrics. We also show improved data efficiency, particularly under distribution shift. The hypergraph formulation enables the generation of floor plans for arbitrary, irregular, user-specified boundaries by decoupling apartment footprints from their functional and geometric subdivisions. Furthermore, we show that the proposed methodology offers a high degree of editability, making it particularly well suited to design-oriented workflows supported by LLMs.
Two structural insights have been overlooked in automated residential floor plan generation. First, design is inherently progressive. Architects begin with rough strokes and refine them over time, whereas existing methods typically require their conditioning representation to be fully specified before generation, a fundamental mismatch with how design actually works. Second, the 2D floor plan is not an optional intermediate but an irreplaceable spatial contract. Once room boundaries, doors, and windows are fixed, furnishing reduces from open-ended spatial reasoning to bounded constraint satisfaction. Bypassing this contract, as existing 3D systems do by delegating layout to language models, yields overlapping rooms and implausible proportions; directly calling general-purpose language models likewise produces geometrically invalid layouts. Guided by these insights, we present PlanCraft. SketchPlan supplies the missing training signal by replaying the architect's drawing process on 80K real floor plans, producing partial sketches at every completeness level. PlanCraft-Diff progressively sharpens an incomplete sketch into a geometrically precise, vectorizable floor plan through a coarse-to-fine strategy. With the spatial contract established, PlanCraft-Agent then furnishes the scene within well-defined room boundaries. Experiments show that PlanCraft achieves a 61.1% lower FID than the best existing 2D method and surpasses existing 3D systems by 15 points in expert-rated spatial rationality, with a sketch at only 25% completion already outperforming all fully specified baselines.
Residential design aims to transform existing homes into functional living spaces while satisfying diverse design preferences and physical constraints. However, existing floorplan generation methods typically assume empty building boundaries as input, whereas renovation requires reasoning over existing floorplans. Furthermore, floorplan renovation and furniture layout are commonly addressed as separate tasks, overlooking their inherent spatial dependency. Consequently, practical residential design must preserve immutable structural components while transforming editable spatial elements. It must also optimize furniture placement under design objectives and physical constraints. To address these challenges, we formulate residential design as a design-point-guided conditional generation task and propose RenoLayout, a framework that translates a pre-design residential state together with a design-point set into an executable Geometry-as-Code program. To enable controllable supervision, we construct a Design Map comprising 123 fine-grained design points covering structural renovation and furniture layout. We further introduce Difference-Grounded Design-Point Annotation to derive design-point sets automatically from before--after design pairs with VLM-based consistency verification. RenoLayout is trained using a three-stage CPT--SFT--RL pipeline, progressively improving spatial reasoning, instruction following, and constraint compliance. We also introduce the RenoLayout Benchmark, a set of 200 real-world before--after renovation cases with complete furniture layouts. To the best of our knowledge, it is the first benchmark for unified residential design. These cases include design-critical structural and building-service constraints.