# Developing a Robust Training Dataset for AI-Driven Architectural Spatial Layout Generation
## 3 Methodology
### 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. [PERSON] [14] suggested considering four  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Division** & **Class Name** & **Class Number** & **Color** \\ \hline \multirow{4}{*}{Indoor space} & \multirow{2}{*}{Public space} & Living room & 1 & **RGB (255,10,20)** \\  & & Dining room & 20 & **RGB (255,255,0)** \\ \cline{2-4}  & \multirow{2}{*}{Private space} & Bedroom & 2 & **RGB**(255,255,0)** \\  & & Dressing room & 5 & **RGB**(255,255,0)** \\  & & Closet & 11 & **RGB**(255,255,0)** \\ \cline{2-4}  & \multirow{2}{*}{Household space} & Kitchen & 3 & \\  & & Utility room & 6 & \\  & & Pantry room & 9 & \\  & & Laundry room & 10 & \\ \cline{2-4}  & \multirow{2}{*}{Sanitary space} & Bathroom & 4 & **RGB**(176,80)** \\ \cline{2-4}  & & Entrance & 0 & **RGB**(185,185,185)** \\ \multirow{2}{*}{Aisle space} & Stair room & 7 & **RGB**(185,185,185)** \\  & Stair entrance & 17 & **RGB**(185,185,185)** \\  & & Hallway & 8 & **RGB**(185,185,185)** \\ \cline{2-4}  & \multirow{2}{*}{Ontdoor space} & Porch & 18 & **RGB**(176,176,176)** \\  & & Garage & 19 & **RGB**(176,176,176)** \\ \hline \hline \end{tabular}
\end{table}
Table 1: Definition of classes of housing space.  
Figure 2: The process of collecting raw data by web crawling.  
categories when analyzing floor plans: graphic separation, object recognition, vectorization, and structural modeling. [PERSON] [22] used a multitask network model to recognize floor plan elements such as walls, rooms, doors, and windows. [PERSON] [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.  
\begin{table}
\begin{tabular}{c c} \hline \hline Floor plan \\ \hline \hline \end{tabular}
\end{table}
Table 2: Definition of Adjacency in Spatial Relationships.