Next Article in Journal
Study on Thermal Radiation Characteristics and the Multi-Point Source Model of Hydrogen Jet Fire
Previous Article in Journal
Association between Resting Heart Rate and Homeostatic Model Assessment of Insulin Resistance in South Korean Adults
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Developing a Robust Training Dataset for AI-Driven Architectural Spatial Layout Generation

by
Hyejin Park
,
Hyeongmo Gu
,
Soonmin Hong
and
Seungyeon Choo
*
School of Architecture, Kyungpook National University, Daegu 41566, Republic of Korea
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(16), 7095; https://doi.org/10.3390/app14167095
Submission received: 19 July 2024 / Revised: 9 August 2024 / Accepted: 10 August 2024 / Published: 13 August 2024

Abstract

:
Recent advancements in AI research, particularly in spatial layout generation, highlight its capacity to enhance human creativity by swiftly providing architects with numerous alternatives during the pre-design phase. The complexity of architectural design data, characterized by multifaceted elements and varying representations, presents significant challenges in creating uniform and robust datasets. This study addresses this challenge by developing a robust training dataset specifically tailored for AI-driven spatial layout generation in architecture. An algorithm capable of extracting spatial relationship diagrams from raster-based floor plan images and converting them into vector-based data was introduced. Through extensive web crawling, a dataset comprising 10,000 data rows, categorized into 21 classes and three spatial relationship categories, was collected. When tested with the You-Only-Look-Once (YOLO) model, the detection rate was 99%, the mean average precision was 85%, and the MIoU was 74.2%. The development of this robust training dataset holds significant potential to advance knowledge-based artificial intelligence design automation studies, paving the way for further innovation in architectural design.

1. Introduction

Searle, a renowned American philosopher and academic, distinguished between “weak” and “strong” artificial intelligence (AI) that simulates human cognitive capacities using computers [1]. The advent of AI research in architectural design signifies more than its mere utilization as an instrument; it suggests a progression toward “strong AI” that enhances intrinsic design creativity. Recently, many studies on spatial layout generation [2,3,4,5] and recommendations [6] have been conducted using AI technology. A commonality between these studies is that they can increase human creativity by quickly providing architects with many alternatives during the predesign phase. Such AI-based research in the field of architecture and the construction of datasets is necessary and must precede [7].
However, architectural design data are replete with intricate elements and the representations in drawings often vary. Consequently, the uniform formulation of datasets is challenging and circumscribed. Considering that superior datasets directly influence the outcomes of deep learning, it is imperative to prioritize the construction of extensive high-quality training datasets. Therefore, this paper proposes a methodology and algorithm for constructing high-quality datasets geared toward AI research in spatial layout generation. The main objective of this study is to develop a robust training dataset specifically tailored for AI-driven spatial layout generation in architecture. By achieving this, the study aims to support the advancement of knowledge-based AI design automation.
By consistently extracting extensive information from floor plan images (such as space names, areas, and adjacencies) as vector data, knowledge-based AI learning beyond intelligent learning is possible. This approach holds promise for evolving into a knowledge-based AI design automation technique.

2. Related Research

2.1. AI-Based Dataset Construction for Architectural Design

One reason for the slow application and development of AI in architectural design is the difficulty of constructing standardized datasets with diverse data. The Korea Institute of Architecture and Urban Research [8] aggregates and offers information related to design projects, including drawings, images, and summaries. However, the volume of this data falls short of the AI learning requirements. The floor plan is expressed using heuristic symbols, including lines, guides, text, and icons, which can be interpreted as meaningful information. However, a universally recognized procedure for the transition from raster to vector data is still lacking, complicating efforts to achieve uniformity [9,10].
For effective AI learning, the datasets must be constructed in a format amenable to computer processing. Given these datasets, the AI can learn spatial rules to generate or recommend an optimized layout. Lu [11] proposed an algorithm for generating graphs using CubiCase5K, floor plan datasets. Based on the BIM model and Dynamo, Kim [12] interpreted the spatial relationship information in a drawing as a graph and constructed a spatial relationship database using an algorithm. In the early stages of design education, Kavakoglu [13] used sketch datasets expressed by students to train the styleGAN2-ADA model and generate facade images. Pizarro [14] investigated the datasets (such as name, public access, annotation, and number of plans) that were mainly used for floor plan analysis and recognition.
Notably, design-centric datasets are remarkably small compared to those in other fields. This is limited in annotation because it is difficult to obtain raster-based raw data and there are many heuristics in drawings. Specifically, the levels and details of the raw data are different; therefore, when annotating, the classes, boundaries, and standards are inevitably different. Consequently, high-quality large-scale training datasets should be constructed in accordance with specific research objectives and orientations. This study distinguishes itself by not only addressing these common challenges but also by developing a novel algorithm that consistently extracts extensive information from floor plan images and converts it into vector-based data, specifically tailored for spatial layout generation in architecture.

2.2. AI-Based Spatial Layout Generation Research

Hopgood [15] defines AI as the intelligence of a machine or computer that enables it to imitate or mimic human capabilities. Regarding this perspective, AI-based tools are divided into “intelligent systems” or “knowledge-based systems” and “computational intelligence and hybrid systems”. Intelligent systems are highly relevant in design automation [16].
This study delves into recent deep-learning spatial layout generation studies in the field of computer vision. Chaillou [2] trained a model to generate a footprint, proceeded with a generative adversarial network (GAN)-generated master plan for program repartitioning, and proposed a furniture layout. After the floor plans, doors, windows, and vertical circulations were placed, a layout was created using GAN learning. Nauata [3] studied a house GAN layout that used an architectural constraint as a graph (i.e., the number and types of rooms with their spatial adjacency) and produced a set of axis-aligned bounding boxes of rooms. Wu [4] determined the location of a room as a point given a boundary and predicted the location of a wall using an encoder–decoder model. By repeatedly learning to create different rooms, this study constructed a vector dataset for more than 80,000 residential floor plans. Carta [17] utilized the CubiGraph5k [11] dataset. Utilizing machine-parsing structured floor plan data and Graph Convolutional Networks (GCN), an approximate spatial layout is generated when a user draws rooms (kitchen, living room, etc.) as nodes like a graph. Seo [18] learned drawing elements and spatial usage using the DeeplabV3+ model and then automatically generated spatial zoning based on AttnGAN. Hu [5] learned to generate floor plans from layout graphs using the RPLAN’s dataset [4]. Given an input building boundary, a floor plan associated with the layout graphs is generated from a database.
A unifying aspect of prior studies is a rule-based randomly generated floor plan. However, these studies did not consider design theory or knowledge. Although AI-based intelligent systems boast rapid result generation, their results often lack precision and are unreliable. For better quality and more reliable plans, it should be developed as an AI-based knowledge system with high reliability. This necessitates the construction of training datasets consistently rooted in vector data.
The training datasets should include complex vector data, such as type, size, scale, location, and adjacency of space, rather than simply drawing elements, such as walls, doors, windows, and furniture. This is because the more detailed the vector data about space that are constructed, the better the AI can learn these spatial relationships through neural networks. Moreover, the current study differentiates itself by introducing a novel algorithm designed to convert raster-based floor plan images to vector-based data using deep learning, providing a strategy for formulating expansive training datasets tailored for high-precision AI applications in architectural design. Such insights will be instrumental in generating or recommending spaces in the future.

3. Methodology

3.1. Procedure

The procedure adopted in this study is illustrated in Figure 1. Initially, raster-based floor plan images served as the raw data sources. Subsequently, the classes and adjacency conditions for the space were defined. In the third phase, training data were created using an annotation tool and data training and testing were conducted using the You-Only-Look-Once (YOLO) recognition model. Finally, an algorithm for automatically constructing vector-based data from raster-based floor plan images was proposed and tested. The dataset, named ‘AIBIM_House Dataset’ [19], comprises graph-extracted spatial relationship diagrams converted into vector-based data. Metrics such as precision, detection rate, mean Average Precision (mAP), and Intersection over Union (IoU) were used to measure the algorithm’s performance.

3.2. Raw Data Collection

Raw data were collected by crawling raster-based floor plan images from real estate websites. Web crawling can be used to collect and archive specific data [20]. The total number of projects on ‘Houseplans’ is 14,970, classified by style, size, favorites, and region [21]. Each project was assigned a distinct identity (ID) and included a raster-based elevation plan, floor plan, and text-based description. Web crawling, executed using Python, facilitated the raw data collection process, as illustrated in Figure 2. By inputting the project ID, specific content could be retrieved (selected from Cases 1, 2, and 3). From 6900 projects, 10,000 raster-based floor plan images (in formats such as .jpg and .png) and their corresponding descriptions (in .xlsx format) were collected. These 10,000 images underwent spatial relationship diagram extraction using YOLO-based recognition. Finally, text-based descriptions and spatial relationship diagrams were algorithmically converged to extract the final vector-based spatial relationship data.

3.3. Spatial Relationship Definition

Before delving into spatial relationships, categorizing housing spaces is essential. According to architectural planning theories, housing spaces are typically classified into indoor and outdoor areas. Indoor spaces encompass public, private, household, sanitary, and circulation spaces. By comparing floor plan images from Korea and the United States, representative categories of housing spaces were identified. Appendix A provides a detailed hierarchy of these spaces. In this study, we defined 14 indoor and 2 outdoor space classes. The indoor space categories include living rooms, dining rooms, bedrooms, dressing rooms, closets, kitchens, utility rooms, pantry rooms, laundry rooms, bathrooms, entrances, stairs, and hallways. The distinction between stair rooms and entrances was made for annotation purposes. The two outdoor space categories are porches and garages. As depicted in Table 1, housing space classes were defined for image recognition.
In the pre-design phase, spatial relationships can be represented in graphs, particularly in space programming and zoning. These graphs are denoted by nodes that symbolize the spaces and the edges that interconnect them. Pizarro [14] suggested considering four categories when analyzing floor plans: graphic separation, object recognition, vectorization, and structural modeling. Zeng [22] used a multitask network model to recognize floor plan elements such as walls, rooms, doors, and windows. Song [23] used image-based learning to classify floor plan elements and represented them in a vector format. Their methodology emphasizes the detection of indoor elements (such as walls and doors), symbols, and spatial elements (such as rooms and corridors) for image learning.
Based on prior studies, it is necessary to detect space and basic elements (walls, doors, and windows) to analyze spatial relationships in the floor plan. As shown in Table 2, this study defines three cases for determining adjacency in spatial relationships. Case 1 is a directly connected space, that is, a completely open space without walls. Case 2 was a directly connected space but was a partially open space with walls and no doors. Case 3 is an indirectly connected space with walls and a door or window. A space with walls alone is disconnected. The criteria for discerning adjacency within spatial relationships are based on elements, such as doors (single, double, or sliding), windows, and openings. Thus, this study defined 16 spatial classes alongside five central classes and established three distinct cases to elucidate the adjacencies in spatial relationships.

3.4. YOLO-Based Spatial Relationship Diagram Extraction Method

The convolutional neural network (CNN) and YOLO [24,25] are pivotal object detection models. Although object detection requires the ability to identify and categorize multiple entities, CNN models encounter challenges when recognizing numerous objects. As floorplan images contain a variety of diminutive and intricate elements of varying sizes and positions, the YOLO model was adopted in this study. This decision stems from YOLO’s proficiency in rapidly detecting multiple classes within raster-based floor plan images. Unlike Fast R-CNN, which requires two stages, specifically region proposal and classification, YOLO models are single-stage detectors. This means that YOLO can predict bounding boxes and class probabilities directly from full images in one evaluation, making it faster and more suitable for real-time applications. YOLOv3, in particular, predicts the objectness score for each bounding box using logistic regression. YOLOv3’s architecture divides the input image into a grid and predicts bounding boxes and confidence scores for objects within each grid cell. This offers significant advantages in terms of both speed and accuracy, especially when detecting smaller objects compared to other models like Faster R-CNN. In terms of operational efficiency, YOLOv3 outperforms both Faster R-CNN and Retinanet and its ability to detect smaller objects has been enhanced using scales [25].
Table 3 presents the extraction process of the spatial relationship diagram from YOLOv3-based floor plan images. When an image was input, the space and central classes were detected using the YOLO model. A center point is detected and each point (referring to a node) is connected based on previously defined adjacency conditions (i.e., a completely open space, a partially open space, or an indirectly connected space). This is discussed in detail in Section 3.3. Table 4 shows how the lines were connected according to the adjacency definition.
Table 5 lists the successful encapsulation methods used in the extraction process. It is divided into a step for detecting classes using the YOLO model and a step for drawing a diagram, such as a graph, through calculation. The dimensions of the graph images were determined after data calculation. If the outer coordinates of the detected space class are represented by X and Y, their cumulative lengths are incorporated and averaged to obtain a square. As the space classes are discerned through bounding boxes, overlaps may occur. In the event of such overlaps, the principle of pushing each other was applied. The points of minimum X and Y and maximum X and Y were found to connect these four points with a line to create a boundary. After determining the central coordinates within the square, the connections between them were drawn based on their relative adjacencies. The final diagrammatic representation was obtained by transforming the square into a circular format. Consequently, a spatial relationship diagram is extracted from the original raster-based floor plan images.

4. Algorithm and Experiment

4.1. YOLO-Based Training Dataset Construction Algorithm

4.1.1. Algorithm for Spatial Relationship Diagram Extraction

The algorithms and contents for extracting spatial relationship diagrams are depicted in Figure 3 and Table 6. Each project is uniquely identified by an ID. The term ‘Search Same Project’ means to search for the same project from the selected floor plan image (for instance, Project ID-3 corresponds to a building on the 3rd floor).
The intricacies and procedures within ‘Connectalorithm.cs’ are exhibited in Figure 4. Within housing plans, living rooms predominantly occupy the most extensive area. Consequently, directly adjacent spaces like hallways, kitchens, and foyers are the primary connections. Rooms with a solitary door are connected accordingly. In instances where a room contains multiple doors, all neighboring rooms are interconnected. As space is detected as a bounding box, the closet is mostly included in the bedroom. The porch space is connected and the hallways may overlap due to bounding boxes, so they are merged. The ‘Connectorithm.cs’ function yields ‘Connection Information’ as its output. The contents described in Chapter 3.4 are in ‘Drawimages.cs’. The conclusive diagrammatic image is presented to the user after calibrating parameters like pixels, resolution, and dimensions.

4.1.2. Algorithm for Spatial Relationship Data Extraction

The algorithm and contents for extraction of spatial relationship data are shown in Figure 5. The conclusive spatial relationship data are consolidated into an Excel document by amalgamating the ‘Detected Class’, ‘Connection Information’, and ‘Crawling Data’ during the ‘Setexcelfiles.cs’ phase. The progression within ‘Setexcelfiles.cs’ is segmented into ‘Sort by Excel Data’, ‘Merge Data’, and ‘Write Excel’ stages, as visualized in Figure 6. In the ‘Merge Data’ step, the total area is calculated by adding the areas of the detected spaces and merging them with the sorted data. The ‘Write Excel’ phase culminates in the export of the spatial relationship data into an Excel sheet.

4.2. Experiment

4.2.1. Creating Training Data Using an Annotation Tool

Recognition involves annotating image regions using words [26]. Data annotation is defined as the labeling or tagging of relevant information in a dataset to allow machines to understand what they are [27]. It is difficult to extract data from raster-based floor plan images using polygonal methods. Given the variety of symbols and potential overlaps within floor plans, isolating specific data remains a complex task. This study facilitated the development of an annotation tool tailored to crafting training datasets from raster-based floor plan visuals. As illustrated in Figure 7, this tool streamlines the creation of labeled data by allowing users to demarcate classes using a bounding box. As discussed in Section 3.3, 21 label elements can be marked, encompassing both spaces and central classes. The periphery of the bounding box for the space class also includes a wall outline.

4.2.2. Data Training and Testing

The datasets for training and testing comprised 5524 and 1380 samples, respectively, which were split in an 8:2 ratio. The parameters designated for training encompassed a batch size of 64, a subdivision of 16, dimensions of 416 × 416 for height and width, and 78 filters. Test accuracy was ascertained using a confusion matrix [28,29]. This matrix consists of two rows and two columns delineating the true positives, false positives, false negatives, and true negatives [29]. When the actual true matches the predicted true, it becomes a true positive (TP). When the actual false is matched with the predicted true, it becomes a false positive (FP). When the actual true is matched with the predicted false, it becomes a false negative (FN). When an actual false result matches a predicted false result, it becomes a true negative (TN). The unique truth count (UTC) from the 1380 test data points was 52,253. Precision is calculated in Equation (1) as the ratio of how many positive predictions were correct (positive predictive value), as follows:
P r e c i s i o n = t r u e   p o s i t i v e s p r e d i c t e d   p o s i t i v e s = T P T P + F P
The evaluation metrics for the space classes are listed in Table 7. The TP and FP values were 19,528 and 2359, respectively, with an average precision of 0.873. The kitchen had the highest precision at 0.971, followed by the bedroom (0.962), stairs room (0.954), and living room (0.949). By contrast, spaces such as laundry rooms (0.723), utility rooms (0.728), and pantry rooms (0.747), which are intrinsic to households but lack distinguishing features, registered lower precision scores. The kitchen had high precision because the detected classes were small and the number of incorrect answers was small.
Table 8 presents the evaluation metrics for the central class. Here, the TP and FP were 27,107 and 2573, respectively, with an average precision of 0.89. Single doors had precision scores of 0.958, followed by double doors (0.921) and windows (0.901). These central classes demonstrated high precision owing to their distinct features and the prevalence of their detection. Sliding doors were occasionally misclassified as windows. The lower precision of the opening classes can be explained by the lack of distinct features. Of the 52,253 UTCs, 686 were not detected.
Recall is the percentage of correct predictions of actual positives (true positive rate), calculated using Equation (2). The TP was 46,635, the FN was 5618, and the recall was 0.89.
R e c a l l S e n s i t i v i t y = t r u e   p o s i t i v e s a l l   p o s i t i v e s = T P T P + F N
The bounding box detection rate is given by Equation (3): the TP was 46,635, the FP was 4932, and the UTC was 52,253, respectively, resulting in a detection rate of 0.99. This signifies that even when classes were not precisely matched within the bounding box, 99% of the detections were feasible.
D e t e c t i o n   r a t e = a c t u a l   d e t e c t e d   v a l u e u n i q u e   t r u t h   c o u n t = T P + F P U T C
The performance of the algorithm for object detection was evaluated using the mAP, as shown in Equation (4). Following the establishment of an IoU threshold of 0.5, the test yielded an mAP of 0.85. This score surpasses those documented in prior studies [11,18,30]. The results of the algorithm’s performance for data testing are shown in Figure 8.
m A P = 1 N i = 1 N A P i

4.3. Result

4.3.1. Results of Spatial Relationship Diagram Extraction

Upon the input of a floor plan image, the YOLO model discerns spaces and central classes and extracts diagrams showing spatial relationships. The detection rate is 99%. With an mAP of 85%, this method marginally outperformed previous studies [11,18,30] in the recognition of floor plan images, thereby affirming the suitability of the YOLO model parameters utilized in this test. Although discerning boundaries in completely open direct-connection spaces posed a challenge, it was reduced through the incorporation of an open class in the learning phase. While the stairroom was identifiable, establishing connections with the adjacent spaces remained problematic. This issue was addressed by introducing a stair entrance class in the learning phase to facilitate connections with neighboring spaces. In the future, the accuracy and performance of the model can be improved by training on many floor plan images. Figure 9 shows the result of spatial relationship diagram extraction from the program ‘AIBIM_Bubblemaker [19]’ developed in this study.

4.3.2. Results of Spatial Relationship Data Extraction

Table 9 presents the results of the vector data extraction from the raster-based floor plan images. Further details of Table 9 are provided in Appendix B. The algorithm effectively extracts spatial relationship data and translates them into consistent vector data. Conceptually, a diagram can be interpreted as a graph with defined nodes and edges; this information is structured as an adjacency matrix. Four factors contributed to the extracted vector data, as follows:
  • Project and Space Names: These were automatically sourced and include the project ID, layer, detected space name, class number, and a random “N” when there are identical space names;
  • Space Size: This is determined as the percentage of the detected space area. For a total image size scaled to 100%, both the horizontal and vertical ratios were calculated. In raster images, the relative size of a space is typically inferred from the size of the door. The length of the side toward the door was standardized to 1 and the opposite side was scaled proportionally. The actual space area was derived by multiplying the total area (determined through data crawling) by the space ratio;
  • Doors and Windows: These features are coded as binary data, where 1 indicates presence within the detected space and 0 indicates absence. For example, in the detected space, a single door (class12), double door (class13), sliding door (class14), and window (class15) were designated as either 1 or 0. The numbers of corresponding classes were also identified;
  • Adjacent Spaces: These data were structured as an adjacency matrix, highlighting the connections of a particular space. If there was a wall or door connecting the space, it was marked as 1; otherwise, it was marked as 0. As per the adjacency definitions in Section 3.3, the connection weights for Cases 1, 2, and 3 were automatically set to 1, 0.5 for Case 2, and 0.25 for Case 3.
Upon comparing the outputs of the algorithm with real measurements, a minor discrepancy of 0.6% in the space size was noted. This variance can be attributed to the fact that the actual space measurements considered the inline of the wall, whereas the detected space accounted for its outline. Nonetheless, other vector information for the detected space remains in a consistent format. This consistency confirmed the accuracy and dependability of the proposed algorithm.

5. Discussion

5.1. Comparison of Dataset-Related Research

From an architectural perspective, obtaining raw data poses challenges owing to privacy constraints and copyright issues. As shown in Table 10, the number of public plans is very small. This limitation inevitably restricts the application of AI technology in the field of architecture. CubiCasa5K [13] has many annotated items but the number of datasets is small and its performance quality is low. Korea LH [18] experimented with apartment floor plan images; however, the number of datasets was very small and the performance quality was low. LIFULL [31] provides real estate information services for Japan and primarily uses raster-based raw data. RFP [30] uses YOLOv4 and DeepLabv3+ models to recognize elements and rooms; however, there are fewer annotation items, making it unlikely to correctly judge the room category in open spaces.
The burgeoning growth of image recognition techniques has spurred interest in the conversion of raster-based floor plans into vector data in the architecture. However, these raster images vary in detail and quality and their annotation criteria and extent differ. Additionally, due to the overlap of complex elements and symbols, the performance of deep-learning models is lower than in general fields. In previous studies, the extraction of vectorized spatial data from raster-based images was limited. This study illustrates the feasibility of deriving spatial relationship diagrams from raster-based floor plans, coupled with the consistent extraction of vector-based spatial data through a tailored algorithm. Testing using the YOLO model revealed a detection rate of 99%, an mAP of 85%, and an MIoU of 74.2%. The efficacy of the algorithm marginally surpasses that of previous studies.

5.2. Implication

If training datasets are constructed and learned using deep learning, new ideas can be generated using AI. The datasets considered in this study were utilized to develop a floor plan recommendation system [6]. This recommendation system developed a deep neural network approach using SimGNN and shallow networks with the teacher–student learning to quickly and accurately compute graph similarity, as measured by the graph edit distance, during the search operation. This approach enhances exploratory creativity in design. The automation of exploratory creativity can be extended to transformational creativity [37]. If diagrams and vectorized spatial relationship data are trained using a GAN or a GNN, AI can generate new diagrams. Moreover, if AI learns not only spatial relationships but also information about location, direction, and entities, it can be extended to automated research for spatial layout generation and recommendations in pre-design. The construction of such high-quality large-scale training datasets increases the possibility of design automation in the sense of strong AI.

6. Conclusions

The aim of this study was to develop a robust training dataset for AI-driven architectural spatial layout generation and recommendation. The dataset includes spatial relationship diagrams extracted from raster-based floor plan images using the YOLOv3 model, as well as vector-based spatial relationship data obtained through a specialized algorithm. This methodology enables consistent and reliable dataset construction, distinguishing it from previous approaches. Data testing results demonstrated a detection rate of 99%, with an mAP of 85% and an MIoU of 74.2%. The efficient collection of raw data through crawling facilitates rapid expansion to include diverse building data. Additionally, incorporating advanced labeling methods, such as semantic segmentation or polygons, could further enhance the granularity of the dataset.
Furthermore, this dataset lays a strong foundation for future research in AI-driven architectural design. We plan to extend our work by leveraging this dataset to train GAN to represent spatial relationships in graph form, which could facilitate the automatic generation of spatial layouts. Additionally, by incorporating GNN, we aim to develop a system that recommends floor plans based on similar spatial relationships. This dataset could also potentially be utilized in the development and training of architectural Large Language Models (LMMs), which would significantly contribute to advancements in AI-driven architectural design.

Author Contributions

Conceptualization, H.P. and H.G.; methodology, H.P. and H.G.; software, H.P., H.G., and S.H.; investigation, H.P.; writing—original draft preparation, H.P.; writing—review and editing, H.P. and S.H.; supervision, S.C.; project administration, S.C.; funding acquisition, H.P. and S.C. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in 2024 by a Korea Agency for Infrastructure Technology Advancement (KAIA) grant funded by the Ministry of Land, Infrastructure, and Transport, South Korea (Grant RS-2021-KA163269). This work was supported by the National Research Foundation of Korea (NRF) and a South Korea grant funded by the Korean government (MSIT) (No. RS-2023-00213909).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets generated and analyzed during the current study are available in the [AIBIM_House Dataset] repository, under the identifier [https://github.com/andWHISKEY/AIBIM_House-Finder, accessed on 12 August 2024]. The AIBIM_House dataset, which includes spatial relationship diagrams and vector-based data extracted from raster-based floor plans, can be accessed via this public repository. The AIBIM_Bubblemaker program, which was used for extracting spatial relationship diagrams and associated data, is available upon request. Interested researchers should contact Hyejin Park at [email protected] for access to the program and additional information.

Conflicts of Interest

The authors declare no conflicts of interest. This manuscript has not been published elsewhere and it has not been submitted simultaneously for publication elsewhere.

Nomenclature

AIBIM_House Dataset refers to the dataset created in this study, which includes spatial relationship diagrams extracted from floor plans and converted into vector-based data. AIBIM_Bubblemaker denotes the program developed for extracting these spatial relationship diagrams and associated data.

Appendix A

Table A1. Hierarchy of indoor space of houses in South Korea and the United States.
Table A1. Hierarchy of indoor space of houses in South Korea and the United States.
CategorySubdivisionSynonym
Living roomgreat roomgreat rm, grt rm
family roomfamily, fam rm, fam
living roomliving, liv rm, liv
Diningdiningbreakfast nook, bfst, bfast,
brk, dining rm, dining area,
din, din rm, eating area
Kitchenkitchencountry kitchen, kit
Bedroombedroombed rm, bed, br, bdrm, bedr
suitesuite, sui
master suitemstr ste
master bedroommaster, master bed,
master bdrm, mbr
bonus roombonus, bonus area, future
future bonus, future bonus room
guest roomguest, guest rm
Private roomstudy roomnook, libr, library,
library room, library rm
office roomoffice rm, office
media roommedia rm, media
game roomgame rm, game
fitness roomfitness rm, fitness
Closet roomclosetdress room, dress area, dress,
drs, storage closet,
waik in closet, walk-in, wic,
clos, clo, clst
master closetmaster closet, mclo, mcloset
waik in closet roomwaik in closet, wic
Kitchenkitchencountry kitchen, kit
Laundry roomlaundry roomlaundry, laund, lndry
linen, lin, lnd
Pantry roompantry roompantry, pan
Utility roomutility roomutility, util
storage roomstorage
Bath roombathba, half bath, w/d
master bathmaster bath, mstr bath,
mba, m.bath
Foyerfoyerfoy, entry,
entryway, lobby
Storystorystory, stor
Hallhallhall

Appendix B

Table A2. Results obtained from spatial relationship data extraction.
Table A2. Results obtained from spatial relationship data extraction.
Project and Space NamesSpace SizeDoors and WindowsAdjacent Spaces
Project
ID
LayerFloor
Plan
ID
Space
Name
ClassRandom
N
RatioLength RatioArea
(sq/ft)
Space Area
Ratio (%)
Building
Total Area
(sq/ft)
Class
12
NClass
13
NClass
14
NClass
15
NSpace
Name
Class
Number
Random
N
WallDoorWeight
(Conversion)
Horizontal
(%)
Vertical
(%)
Horizontal
(Ratio)
Vertical
(Ratio)
20-573120-573-1Bedroom210.17480.29980.97011980.0532183513000012Closet112110.25
20-573120-573-1Bedroom210.18770.283710.908980.0532183513000012Closet113110.25
20-573120-573-1Bedroom210.18770.283710.908980.0532183513000012Hallway81110.25
20-573120-573-1Hallway810.18770.283710.908470.0254183514000000Living room11001
20-573120-573-1Hallway810.10030.25310.65961470.0254183514000000Closet111110.25
20-573120-573-1Hallway810.10030.25310.65961470.0254183514000000Laundry room101110.25
20-573120-573-1Hallway810.10030.25310.65961470.0254183514000000Living room11001
20-573120-573-1Hallway810.10030.25310.65961470.0254183514000000Bedroom21110.25
20-573120-573-1Hallway810.10030.25310.65961470.0254183514000000Bathroom41110.25
20-573120-573-1Closet1110.10030.25310.6596170.0037183511000000Hallway81110.25
20-573120-573-1Kitchen310.05290.0710.7959850.0464183511000000Living room11001
20-573120-573-1Kitchen310.15860.29260.90181850.0464183511000000Pantry room91110.25
20-573120-573-1Pantry room910.15860.29260.9018140.0022183511000000Kitchen31110.25
20-573120-573-1Stair room710.03670.059210.9706500.0272183511000011Entrance01110.25
20-573120-573-1Stair room710.12940.210110.975500.0272183511000011Entrance01110.25
20-573120-573-1Bathroom410.12940.210110.975450.0244183511000000Hallway81110.25
20-573120-573-1Garage1910.1640.14910.54613150.1714183511000011Laundry room101110.25
20-573120-573-1Living room110.3020.56730.886115030.2742183500000015Hallway81001
20-573120-573-1Living room110.44010.62310.85055030.2742183500000015Kitchen31001
20-573120-573-1Living room110.44010.62310.85055030.2742183500000015Hallway81001
20-573120-573-1Living room110.44010.62310.85055030.2742183500000015Entrance01001
20-573120-573-1Porch1810.44010.62310.85051870.1019183511000000Entrance01110.25
20-573120-573-1Entrance010.37110.274710.4448360.0194183512000011Living room11001

References

  1. Searle, J.R. Minds, brains, and programs. Behav. Brain Sci. 1980, 3, 417–424. [Google Scholar] [CrossRef]
  2. Chaillou, S. ArchiGAN: A Generative Stack for Apartment Building Design; NVIDIA Corporation: Santa Clara, CA, USA, 2019. [Google Scholar]
  3. Nauata, N.; Chang, K.H.; Cheng, C.Y.; Mori, G.; Furukawa, Y. House-gan: Relational generative adversarial networks for graph-constrained house layoutgeneration. In Computer Vision—ECCV 2020, Proceedings of the European Conference on Computer Vision (ECCV), Glasgow, UK, 23–28 August 2020; Springer: Cham, Switzerland, 2020; pp. 162–177. [Google Scholar] [CrossRef]
  4. Wu, W.; Xiao-Ming, F.; Tang, R.; Wang, Y.; Qi, Y.-H.; Liu, L. Data-driven interior plan generation for residential buildings. ACM Trans. Graph. 2019, 38, 234. [Google Scholar] [CrossRef]
  5. Hu, R.; Huang, Z.; Tang, Y.; Van Kaick, O.; Zhang, H.; Huang, H. Graph2plan: Learning floorplan generation from layout graphs. ACM Trans. Graph. 2020, 39, 118. [Google Scholar] [CrossRef]
  6. Park, H.; Suh, H.; Kim, J.; Choo, S. Floor plan recommendation system using graph neural network with spatial relationship dataset. J. Build. Eng. 2023, 71, 106378. [Google Scholar] [CrossRef]
  7. Davenport, T.H.; Ronanki, R. Artificial intelligence for the real world. Harv. Bus. Rev. 2018, 96, 108–116. [Google Scholar]
  8. Auric. Architecture & Urban Research Review. Available online: https://www.auric.or.kr/ (accessed on 19 July 2024).
  9. Liu, C.; Wu, J.; Kohli, P.; Furukawa, Y. Raster-to-vector: Revisiting floorplan transformation. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2195–2203. [Google Scholar]
  10. Kalervo, A.; Ylioinas, J.; Haiki, M.; Karhu, A.; Kannala, J. CubiCasa5K: A dataset and an improved multi-task model for floorplan image analysis. In Image Analysis, Proceedings of the SCIA 2019, Norrköping, Sweden, 11–13 June 2019; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2019; Volume 11482, pp. 28–40. [Google Scholar] [CrossRef]
  11. Lu, Y.; Tian, R.; Li, A.; Wang, X.; Jose Luis, G.D.C.L. Cubigraph5k-organizational graph generation for structured architectural floor plan dataset. In Proceedings of the 26th CAADRIA Conference, Hong Kong, China, 29 March–1 April 2021; pp. 81–90. [Google Scholar] [CrossRef]
  12. Kim, G.; Gu, H.; Park, H.; Choo, S. Using genetic algorithm to automate the generation of an open-plan office layout. Int. J. Archit. Comput. 2022, 38, 67–74. [Google Scholar] [CrossRef]
  13. Kavakoglu, A.; Aysegul, A.; Bihter, E. AI Driven Creativity in Early Design Education-A pedagogical approach in the age of Industry 5.0. In Proceedings of the 40th Education and research in Computer Aided Architectural Design in Europe (eCAADe) Conference, Ghent, Belgium, 13–16 September 2022; Volume 1, pp. 133–142. [Google Scholar]
  14. Pizarro, P.N.; Hitschfeld, N.; Sipiran, I.; Saavedra, J.M. Automatic floor plan analysis and recognition. Autom. Constr. 2022, 140, 104348. [Google Scholar] [CrossRef]
  15. Hopgood, A.A. Intelligent Systems for Engineers and Scientists: A Practical Guide to Artificial Intelligence, 4th ed.; CRC Press: Boca Raton, FL, USA, 2021. [Google Scholar] [CrossRef]
  16. Cederfeldt, M. Planning Design Automation: A Structured Method and Supporting Tools. Ph.D. Thesis, Department of Product and Production Development, Chalmers University of Technology, Göteborg, Sweden, 2007. [Google Scholar]
  17. Carta, S. Self-organizing floor plans. Harv. Data Sci. Rev. HDSR 2021, 3, 1–35. [Google Scholar] [CrossRef]
  18. Seo, J.; Park, H.; Choo, S. Inference of Drawing Elements and Space Usage on Architectural Drawings Using Semantic Segmentation. Appl. Sci. 2020, 10, 7347. [Google Scholar] [CrossRef]
  19. Park, H.; Suh, H.; Kim, J.; Choo, S. AIBIM_House-Finder. Available online: https://github.com/andWHISKEY/AIBIM_House-Finder (accessed on 19 July 2024).
  20. Najork, M. Web Crawler Architecture. In Encyclopedia of Database Systems; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar] [CrossRef]
  21. Houseplans. Search Nearly 40,000 Floor Plans and Find Your Dream Home Today. Available online: https://www.houseplans.com/ (accessed on 19 July 2024).
  22. Zeng, Z.; Li, X.; Yu, Y.K.; Fu, C.W. Deep floor plan recognition using a multi-task network with room-boundary-guided attention. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 9096–9104. [Google Scholar] [CrossRef]
  23. Song, J.; Yu, K. Framework for Indoor Elements Classification via Inductive Learning on Floor Plan Graphs. ISPRS Int. J. Geo-Inf. 2021, 10, 97. [Google Scholar] [CrossRef]
  24. He, K.; Zhang, X.; Ren, S.; Sun, J. Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition. arXiv 2014. [Google Scholar] [CrossRef]
  25. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
  26. Duygulu, P.; Barnard, K.; de Freitas, J.F.; Forsyth, D.A. Object recognition as machine translation: Learning a lexicon for a fixed image vocabulary. In Proceedings of the Computer Vision—ECCV 2002: 7th European Conference on Computer Vision, Copenhagen, Denmark, 28–31 May 2002; Proceedings, Part IV. Springer: Berlin/Heidelberg, Germany, 2002; pp. 97–112. [Google Scholar] [CrossRef]
  27. Wikipedia. Data Annotation. Available online: https://simple.wikipedia.org/wiki/Data_annotation (accessed on 19 July 2024).
  28. Stehman, S.V. Selecting and interpreting measures of thematic classification accuracy. Remote Sens. Environ. 1997, 62, 77–89. [Google Scholar] [CrossRef]
  29. Powers, M.W. Evaluation: From Precision, Recall and F-Measure to ROC. arXiv 2010, arXiv:2010.16061. [Google Scholar] [CrossRef]
  30. Lv, X.; Zhao, S.; Yu, X.; Zhao, B. Residential floor plan recognition and reconstruction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 19–25 June 2021; pp. 16717–16726. [Google Scholar] [CrossRef]
  31. IDR Group, National Institute of Informatics. LIFULL HOME’S. Available online: https://www.nii.ac.jp/dsc/idr/en/lifull (accessed on 19 July 2024).
  32. Murugan, G.; Moyal, V.; Nandankar, P.; Pandithurai, O.; John Pimo, E. A novel CNN method for the accurate spatial data recovery from digital images. Mater. Today Proceed. 2021, 80, 1706–1712. [Google Scholar] [CrossRef]
  33. Lu, Z.; Wang, T.; Guo, J.; Meng, W.; Xiao, J.; Zhang, W.; Zhang, X. Data-driven floor plan understanding in rural residential buildings via deep recognition. Inf. Sci. 2021, 567, 58–74. [Google Scholar] [CrossRef]
  34. Yamasaki, T.; Zhang, J.; Takada, Y. Apartment structure estimation using fully convolutional networks and graph model. In Proceedings of the 2018 ACM Workshop on Multimedia for Real Estate Tech, Yokohama, Japan, 11 June 2018; ACM: New York, NY, USA, 2018; pp. 1–6. [Google Scholar] [CrossRef]
  35. Takada, Y.; Inoue, N.; Yamasaki, T.; Aizawa, K. Similar floor plan retrieval featuring multi-task learning of layout type classification and room presence prediction. In Proceedings of the 2018 IEEE International Conference on Consumer Electronics, Las Vegas, NV, USA, 12–14 January 2018; IEEE: Las Vegas, NV, USA, 2018; pp. 1–6. [Google Scholar] [CrossRef]
  36. Yamada, M.; Wang, X.; Yamasaki, T. Graph Structure Extraction from Floor Plan Images and Its Application to Similar Property Retrieval. In Proceedings of the IEEE International Conference on Consumer Electronics (ICCE) 2021, Las Vegas, NV, USA, 10–12 January 2021; pp. 1–5. [Google Scholar] [CrossRef]
  37. Boden, M.A. Computer models of creativity. AI Mag. 2009, 30, 23. [Google Scholar] [CrossRef]
Figure 1. Procedure of research.
Figure 1. Procedure of research.
Applsci 14 07095 g001
Figure 2. The process of collecting raw data by web crawling.
Figure 2. The process of collecting raw data by web crawling.
Applsci 14 07095 g002
Figure 3. Algorithm for spatial relationship diagram extraction.
Figure 3. Algorithm for spatial relationship diagram extraction.
Applsci 14 07095 g003
Figure 4. Process of ‘Connectalorithm.cs’.
Figure 4. Process of ‘Connectalorithm.cs’.
Applsci 14 07095 g004
Figure 5. Algorithm for spatial relation data extraction.
Figure 5. Algorithm for spatial relation data extraction.
Applsci 14 07095 g005
Figure 6. Process of ‘Setexcelfiles.cs’.
Figure 6. Process of ‘Setexcelfiles.cs’.
Applsci 14 07095 g006
Figure 7. Creating training data using an annotation tool.
Figure 7. Creating training data using an annotation tool.
Applsci 14 07095 g007
Figure 8. Results of algorithm performance.
Figure 8. Results of algorithm performance.
Applsci 14 07095 g008
Figure 9. Results of spatial relationship diagram extraction.
Figure 9. Results of spatial relationship diagram extraction.
Applsci 14 07095 g009
Table 1. Definition of classes of housing space.
Table 1. Definition of classes of housing space.
DivisionClass NameClass NumberColor
Indoor spacePublic spaceLiving room1RGB(254,0,2)
Dining room20RGB(254,0,2)
Private spaceBedroom2RGB(255,255,0)
Dressing room5RGB(255,255,0)
Closet11RGB(255,255,0)
Household spaceKitchen3RGB(0,0,254)
Utility room6RGB(0,0,254)
Pantry room9RGB(0,0,254)
Laundry room10RGB(0,0,254)
Sanitary spaceBathroom4RGB(0,176,80)
Aisle spaceEntrance0RGB(128,15,181)
Stair room7RGB(128,15,181)
Stair entrance17RGB(128,15,181)
Hallway8RGB(128,15,181)
Outdoor spacePorch18RGB(76, 76, 76)
Garage19RGB(76, 76, 76)
Table 2. Definition of Adjacency in Spatial Relationships.
Table 2. Definition of Adjacency in Spatial Relationships.
Floor plan
Applsci 14 07095 i001
Definition of Adjacency in Spatial Relationships
Directly connected spacesCase 1Applsci 14 07095 i002No walls
(Completely open space)
Case 2Applsci 14 07095 i003Walls but no doors
(Partially open space)
Indirectly connected spaceCase 3Applsci 14 07095 i004Walls and door or window
Disconnected space-Applsci 14 07095 i005Only walls
Table 3. Extraction process of the spatial relationship diagram.
Table 3. Extraction process of the spatial relationship diagram.
Step 1. Image input Step 2. Class detection using YOLO model Step 3. Center point calculated from bounding box
Applsci 14 07095 i006Applsci 14 07095 i007Applsci 14 07095 i008
Step 4. Connection by definition of adjacency Step 5. Spatial relationship diagram extraction
Applsci 14 07095 i009Applsci 14 07095 i010
Table 4. Connection line according to the adjacency definition.
Table 4. Connection line according to the adjacency definition.
DivisionCase 1Case 2Case 3
DefinitionCompletely open spacePartially open spaceIndirectly connected space
ExampleApplsci 14 07095 i011Applsci 14 07095 i012Applsci 14 07095 i013
connection line
Thick line Thin line Dotted line
Table 5. Encapsulation methods for extracting spatial relationship diagrams using the YOLO model.
Table 5. Encapsulation methods for extracting spatial relationship diagrams using the YOLO model.
Step 1. Detected Bounding Box Step 2. Offset for Overlapping Regions Step 3. Convert to Square and Determine Diagram Size Step 4. Calculated Center Point Step 5. Connect and Extract Circular Diagram
Applsci 14 07095 i014Applsci 14 07095 i015Applsci 14 07095 i016Applsci 14 07095 i017Applsci 14 07095 i018
Table 6. Description of Figure 3.
Table 6. Description of Figure 3.
ProcedureMeaning of InputMeaning of Output
Select floor plan → Search same projectSelect one floor plan imageSearch the same project as the
selected floor plan image
Detection floor plan → Search classDetect floor plan imageSearch space and medium class
Connectalorithm.cs → Connection informationRun ‘Connectalorithm.cs’ to determine the
adjacency of spatial relationships
Know connected information
Drawimages.cs → Show diagram imageRun‘Drawimages.cs’Show spatial relationship diagram image
Table 7. Precision for space classes.
Table 7. Precision for space classes.
Space ClassTPFPPrecision (%)
Living room916490.949
Dining room191450.809
Bedroom29981180.962
Dressing room12791080.922
Closet29864340.873
Kitchen894270.971
Utility room6932590.728
Pantry room3601220.747
Laundry room7282790.723
Bathroom21961060.954
Entrance391950.805
Stair room1000480.954
Stair entrance8841210.88
Hallway22823790.858
Porch9281560.856
Garage802130.984
Total19,52823590.873
Table 8. Precision for central classes.
Table 8. Precision for central classes.
Central ClassTPFPPrecision (%)
Single door10,7484740.958
Double door12281050.921
Sliding door18763410.846
Window11,3222470.901
Opening19334060.826
Total27,10725730.89
Table 9. Results of spatial relationship data extraction (part of Appendix B).
Table 9. Results of spatial relationship data extraction (part of Appendix B).
Project and Space NamesSpace SizeDoors and WindowsAdjacent Spaces
RatioLength RatioArea (sq/ft)Space Area Ratio (%)Building Area (sq/ft)Class12NumberClass13NumberClass14NumberClass15NumberSpace NameClass NumberRandom NWallDoorWeight (Conversion)
Project IDLayerFloor Plan IDSpace NameClass NumberRandom NHorizontal (%)Vertical (%)Horizontal (Ratio)Vertical (Ratio)
20-573120-573-1Dining room2010.17480.29980.97011960.0524183500000011Entrance01110.5
Table 10. Comparison of dataset-related research.
Table 10. Comparison of dataset-related research.
Dataset Name (Year)Public
Access
ModelAnnotationNumber of PlansPerformanceApplied Studies
CubiCasa5K
(2019)
Multi-task Model80 object categories (doors, windows, walls, etc.)5000Rooms
(Mean accuracy 69.8%)
(MIoU 57.5%)
Indoor elements classification [23], Vectorized 3D reconstruction [31],
Spatial data recovery [32], Floor plan layout analysis [33]
Korea LH
(2019)
DeepLabV3+5 elements (walls, windows, hinged doors, sliding doors and evacuation doors)
and 7 space (rooms, entrances, balconies, dress rooms, bathrooms, living rooms, evacuation space, and pantries)
343Elements
(MIoU 80.68%)
Room
(MIoU 81.75%)
Generating GAN-based zoning [18]
LIFULL
(2020)
X-dataset contains the data of LIFULL HOME’S, a Real Estate Information Service in Japan5,300,000+-Apartment structure estimation [34],
Application to similar property retrieval [35,36]
RFP
(2021)
YOLOv4,
DeepLabv3+
4 elements (wall, window, door, doorway) and
7 room types (balcony, bedroom, kitchen, other, library, living room, toilet)
7000Elements and Rooms
(MIoU 85%)
-
AIBIM_House
(2023)
YOLOv316 space class(living room, dining room, bedroom, etc.)
and 5 medium class (doors, windows, etc.)
14,970Space classes
(mAP 87.3%)
Mediums classes
(mAP 89%)
Floor plan recommendation system [6]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Park, H.; Gu, H.; Hong, S.; Choo, S. Developing a Robust Training Dataset for AI-Driven Architectural Spatial Layout Generation. Appl. Sci. 2024, 14, 7095. https://doi.org/10.3390/app14167095

AMA Style

Park H, Gu H, Hong S, Choo S. Developing a Robust Training Dataset for AI-Driven Architectural Spatial Layout Generation. Applied Sciences. 2024; 14(16):7095. https://doi.org/10.3390/app14167095

Chicago/Turabian Style

Park, Hyejin, Hyeongmo Gu, Soonmin Hong, and Seungyeon Choo. 2024. "Developing a Robust Training Dataset for AI-Driven Architectural Spatial Layout Generation" Applied Sciences 14, no. 16: 7095. https://doi.org/10.3390/app14167095

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop