Keywords

1 Introduction

As an important technology in the field of artificial intelligence, Deep learning has received a lot of attention since it was introduced by Hinton [2] in 2006. It acquires the complex patterns of large-scale data by mimicking the nervous system in the animal brain to perceive and understand information. Deep neural networks such as generative adversarial networks (GAN) [1, 5] and graph neural networks (GNN) [13] have improved the ability of machines to learn from images, and a number of research have shown that they have certain potential in quickly generating architectural design layouts. However, most of the current studies have focused on the layout of simple apartments, and the results generated lack controllability and diversity.

In the pre-planning stage of campus planning and design, the university administrators need to compare multiple campus layout plans to determine if the site meets the construction requirements. However, they lack mature design and construction experience to complete this step independently. If there is a tool that can automatically generate multiple schemes to assist the them in quickly identifying the direction of campus development, it will shorten the research time for site and facilitate the evaluation work. From this perspective, it is important to explore a method for quickly obtaining multiple campus layout options based on user constraints.

This paper hopes to combine campus layout design research with deep learning technology, and generate a variety of reasonable campus layout schemes that meet user needs through deep learning. The campus construction of universities in China is mainly in three situations: renovation of old campuses, expansion of old campuses, and the build of new campuses, because the renovation and expansion projects of old campuses are relatively complex, this study mainly considers the construction of the new campus. The construction of new campuses is often chosen as a stand-alone site, which usually includes two situations, one is that the campus is built on an urban site with known surrounding site conditions, and the other is the campus is built on a site to be developed with undetermined surrounding conditions. We have explored the former case in previous studies [6, 8, 9], and this study applies to the latter. Using a step-by-step generation method combining graph neural networks (GNN) and generative adversarial networks (GAN), the machine is able to quickly generate multiple layout schemes based on the site contour and the constraint parameters input by the users. Then it can reduce the time spent on pre-design inputs and improve design efficiency.

2 Related Work in the Field of Deep Learning Techniques and Buildings Layout Generation

At present, deep learning technology has penetrated into the field of architectural design. Many scholars have explored the direction of building layout generation, constantly trying out more complex research objects and more advanced technical methods. In terms of the selection of the research object, it has changed from the small-scale layout of floorplan [4] to the medium-scale layout of blocks and residential areas [12], and now to the campus layout and even the urban layout [6,7,8,9]. The scale of the object of study is constantly increasing and the elements it contains are becoming more and more complex. The following section will focus on research related to deep learning combined with campus layout generation. Liu et al. [8] used deep learning techniques for primary school and campus layout generation and summarized a labelling method for small sample generation. Lai [6] explored campus layout generation methods using pix2pix model. The study took the central loop campus as the research object and proposed a step-by-step training method. The experimental results demonstrated that the step-by-step generation method can make the machine better learn complex layouts. In addition, the authors’ comprehensive summary of strategies to achieve building layout generation based on small samples provides a good inspiration for the research in this paper. However, the current study can only output a single result based on a single site condition. Since then, Liu et al. [9] have explored and experimented with the diversity of output results, proposing an innovative training method. This method allows for the simultaneous input of two images, a functional bubble image of the campus site boundary image, by changing the image input channel of the pix2pix model. The user can change the input campus function bubble diagram to control the generated results. The experiment achieved the goal of generating a diverse campus layout in the same site conditions, but lacked controllability and clarity of the generated results. Our research hopes to continue the exploration of diversity and controlled generation of campus layouts in combination with the experience of previous studies.

In terms of the diversity and controllability of the generated results, current research has been explored using different deep learning algorithms. Many scholars have taken different perspectives to explore the constraints contained in design or to disassemble the design process, and they have focused on how to better learn the design logic involved [17]. Pan et al. [12] used the GauGAN model to generate the neighborhood layout of northern China. This method can generate diverse results by changing the style of the input image. However, the final result changes are very weak and it is difficult to see the direct effect of the input elements on the results. Hu et al. [3] proposed Graph2Plan based on graph neural networks (GNN) and convolutional neural networks (CNN). The idea of the method is that the machine searches for similar layouts from a database based on user input constraints. It then generates a new suitable layout on the given input boundary based on this layout. Nauata et al. [10, 11] propose the House-GAN model to explore the generation of user-constrained floorplan. Different from Graph2Plan, this study combines a graph network relational model with GAN, using a generator-discriminator adversarial learning method. It encodes user constraints such as the number and type of rooms and their spatial adjacencies as graph input the machine. Diverse layouts can be generated by changing this constraint. However, this study cannot achieve generation based on certain contour constraints. Most studies have focused on small-scale spaces such as floorplans, and there are few studies on larger-scale objects.

The results of several studies demonstrate the outstanding ability of graph neural networks (GNN) in image controllability generation. The graph structure data is similar to the functional bubble diagram in the pre-design stage of the building, where each node represents a different functional space and the connecting lines between the nodes represent the relationships between the different functional spaces. Similarly, the campus functional layout can be represented by a graph constraint structure. We hope to explore graph neural network techniques combined with campus layout generation in terms of the design logic of the campus scheme in order to achieve diverse and controllable generation results.

3 Methodology

The methods of graph constrained multiple schemes generation of campus layout is as follows:

  1. 1.

    Selecting an appropriate deep learning model. According to the experimental objectives of multi-scheme generation and user controllability, House-GAN ++ and pix2pix are selected as experimental models, and the loss functions of the models are modified to adapt to the generative goals.

  2. 2.

    Propose a new training method. According to the campus design method and process, the appropriate training method is proposed.

  3. 3.

    Develop experimental process. The main process of experiment includes database establishment, model training, model test and result analysis.

3.1 Model Architecture

In this experiment, two deep learning models: House-GAN ++ and pix2pix, were used to generate campus functional layout and campus building layout respectively (Fig. 1).

Fig. 1.
figure 1

The idea of the experiment

The overall structure of the House-GAN ++ model is a generative adversarial network (GAN), which consists of a generator and a discriminator (Fig. 2). Generators and discriminators are constantly competing with each other to generate more realistic images. Different from pix2pix, House-GAN ++ model’s generator and discriminator use a convolutional message passing neural network (Conv-MPN) [14], and input constraints are encoded into this graph structure. Conv-MPN is a variant structure in graph neural networks (GNN). It is characterized by the use of the data structure of the graph to exchange and transfer information between nodes in the graph, constantly updating the node information for the purpose of learning about the image. Since the original House-GAN ++ model did not define the boundaries of the generated objects, the generation result boundaries were uncertain. Based on the goals of this experiment, we add a boundary loss function to the original loss function so that the generated layout scheme can be constrained to a certain campus site boundary.

Fig. 2.
figure 2

Model architecture

The pix2pix model also belongs to one of the generative adversarial networks (GAN), containing a generator and a discriminator. The generator uses a U-Net structure to encode the input image and then decode it, ultimately generating a false image that resembles the real one. The discriminator uses a PatchGAN structure, which aims to distinguish between real samples and fake samples. The two are constantly playing against each other, and if the image generated by the generator can fool the discriminator, the model can be considered to have learned the rules of the image. Using this model architecture, the machine can learn the regular logic between the input conditions and the output conditions for the purpose of this experiment.

3.2 Training Method

Based on the experience of the original experiment, the step-by-step generation method was determined (Fig. 3). After being familiar with the process and method of campus layout design, the campus layout generation process is disassembled. Two machine learning models are trained. The first model is to input the site contour and functional bubble connection graph and output the campus functional zoning layout; the second model is to input the campus functional zoning layout and output the campus building layout.

Fig. 3.
figure 3

Step-by-step generation method

4 Database Establishment

Database establishment includes data collection, data selecting, sample labelling, data augmentation.

4.1 Data Collection

We used manual methods to collect the campus data through a variety of means, including the portfolios of architectural design institutes, university official websites, and related books and papers.

4.2 Data Selecting

In order to ensure the effectiveness of the experiment, the data selected needs to follow certain rules.

  1. 1.

    Relatively consistent size of scale. The size of the sites in the case is between 50 and 150 hectares.

  2. 2.

    Relatively square site contours. Squared site contour forms are common, which are convenient for the compact layout of various functions on campus, and can provide more efficient transportation.

  3. 3.

    Campus layout design with the central loop as the main feature. For small sample data sets, a relatively consistent layout of the rules helps the machine to extract the valid information from the data.

  4. 4.

    A complete and clear campus functional zonings. The campus case with functional complexity did not meet the requirement of this experiment.

Finally, 230 campus samples were selected, 30 of which were used as test samples.

4.3 Sample Labelling

There are some problems in the proportion and style of the collected data, which need to be further processed before the images can be learned by the machine. Firstly, the data was scaled using the 400m track and field as a standard to ensure that the data were of the same proportion. Then we labelled the raw data through the uniform labelling rules (Fig. 4).

Fig. 4.
figure 4

Color block labelling rules

The process of extracting the functional bubble connection graph is shown in Fig. 5. The connection relationship referred to means that when two functional zonings are adjacent, the two corresponding functional bubbles are connected to each other. We use python to recognize the center point of each zoning, and then draws the smallest outer rectangle of each functional zoning. If the smallest outer rectangles of two partitions intersect, then the center points of the two zonings are connected to each other. The graph of functional connectivity generated is the graph structure data. The nodes represent the types of functional zonings of the campus and their attributes correspond to their layout forms. The edges represent the connections between the campus functional zonings. When two nodes are connected to each other, the corresponding functional zoning of the campus is adjacent to each other.

Fig. 5.
figure 5

Extraction process of functional bubble connection graph

The data labelling points are formulated from five aspects: main entrance layout, road traffic organization, functional zoning, building layout and public space. Then we labelled the data according to the points and the actual situation of the original case. The experimental dataset was labelled to obtain 210 campus site condition data, 210 campus functional bubble connection graph data, 210 campus functional zoning layout data and 40 campus building layout data (Fig. 6).

Fig. 6.
figure 6

Partial labelling data

4.4 Data Augmentation

We use data augmentation methods such as mirroring and rotation of images to increase the amount of training data. The amount of data for the training data in the first step is 1600 sets. The amount of data for the training data in the second step is 120 sets because of the deletion of the data for the incorrect building orientation.

5 Training and Test

5.1 Training

After conditioning the model, the dataset is input into the corresponding machine learning model for training according to the method mentioned in 3.2. This experiment combines the experience of the pre-experiment. In the first experiment, the learning rate of the model is 0.0001 and the number of iterations (n_epochs) is 10,000. In the second step experiment, the learning rate of the model is 0.0002, the number of iterations (n_epochs) is 800, and the input and output image channels are 3.

5.2 Test Results

We tried to test the data on a variety of campus site scales. Different results were generated by changing the function bubble connection graph, some of the results are shown in the following (Fig. 7).

Fig. 7.
figure 7

Partial test results of the experiments

5.3 Result Analysis

The results show that by changing the function bubble connection graph, different layout schemes can be obtained. The model can also generate multiple layout schemes based on the same constraints.

5.3.1 Qualitative Evaluation

Combining the theories and design methods related to campuses, the qualitative evaluation indicators for the experiment were set as follows: main entrance layout, campus functional zoning, road network structure, campus building layout and public space layout. We evaluate the reasonableness of the test results based on the evaluation indicators.

  1. 1.

    Main entrance layout. Most of the data generates a suitably sized and clearly Administrative Office area. The area is well positioned on the campus, with some distance left from the external cross roads.

  2. 2.

    Campus functional zoning. Most data can generate corresponding results based on the input constraints and can generate multiple layout solutions based on the same constraint. The functional bubble graph is adjusted by means of control variables (Fig. 8). The functional zoning is well located, and can be arranged around the central area. But there are some test results that do not satisfy the constraints.

Fig. 8.
figure 8

Results of partial test data in the first step

  1. 3.

    Road network structure. The roadways between the functional zoning are continuous and complete, and most of the generated results are able to form a clear central loop. Pedestrian traffic is well connected and it is able to form a more complete pedestrian loop around the central landscape.

  2. 4.

    Campus building layout. The building functions of each functional zoning in most of the data are complete and the building spacing is appropriate. The buildings are well spaced. They are able to enclose each other to form flexible and variable courtyard spaces. The buildings in the central zoning can be arranged around the central landscape.

  3. 5.

    Public space layout. A certain number of public spaces can be formed in each functional zoning and are interconnected with the transport system in the layout. However, the scale of the public space areas in individual layouts is large, producing very empty square areas.

The grading rules are formulated from an architectural point of view and each test data is scored separately. The results were graded as A, B and C. After statistics, 83% of the results from the first step of the experiment achieved an A grade, 40% of the results from the second part of the experiment achieved an A grade, and all results from both experiments were graded B and above.

5.3.2 Quantitative Evaluation

The quantitative indicators are the diversity of the generated results, the area proportion of functional zonings, the building density and the floor area ratio.

  1. 1.

    The diversity of the generated results. The diversity of the results of the first step was analyzed using the LPIPS distance metric [15], which is one of the common metrics for measuring the diversity of image generation. We fed 30 data into the trained model and adjusted the number of iterations to obtain 450 test results. These images were combined with real images for LIPIPS distance analysis. The mean and standard deviation of the results was 0.478 ± 0.090.

  2. 2.

    The area proportion of functional zonings. The area proportion in the test data and training data is obtained by calculating the image pixels with python (Table 1). The mean values are closer to the recommended values. The mean values for teaching areas are higher than the recommended values, while the living and sports areas are slightly lower than the recommended values.

  3. 3.

    The building density. The average building density of the training set is 12.20%, the maximum value is 14.18%, and the minimum value is 9.93%. The average building density of the test results was 11.12%, the maximum value was 14.10%, and the minimum value was 8.33%. The results for the dataset are slightly lower compared to the recommended value of 15% for building density on campuses.

  4. 4.

    The floor area ratio. The average floor area ratio of the training set is 0.51. The average floor area ratio of the test results is 0.47. This result is in accordance with recommended values of 0.5.

Table 1. The area proportion of functional Zonings

6 Discussion

This paper explored user-constrained campus layout generation strategy from the perspective of “one-to-many generation” in combination with common design scenarios. Our experiment realized the generation of campus layouts based on user constraints, and improved the richness of the generated results. This is an in-depth study of the original experiment. Better experimental results are achieved by proposing a method for transforming graph-constrained data for campus layout images, improving the training method and modifying the loss function in the model. In exploring deep learning for design solution generation, we should give more consideration to the relationship between real design conditions and design solutions, and think in terms of the essence of design, so that the research results can solve real design problems.

In conclusion, this is a meaningful exploration to give more ideas for deep learning for layout design generation studies. The experimental results demonstrated the feasibility of improving the controllability of user input to achieve the generation of diverse results. However, the experiment is still limited by the amount of data, and there are still some data in the results that did not fully satisfy the constraints, as well as some constraints in the richness of the generated results. In the future, we will further improve this issue and hope to explore the complete campus scenario generation process. We will establish a professional technical process from site study, demand analysis, to multiple solution design, solution comparison, solution optimization and finally visual 3D solution model representation.