Campus layout model generation method based on generative adversarial network and diffusion model
By combining adversarial generation network and diffusion model, multiple high-precision campus plan layout images are generated and campus layout models are constructed in three-dimensional software, which solves the problems of unstable generation results, singleness and poor image quality in the existing technology, and achieves rapid, diverse and reliable generation of campus layout design.
Patent Information
- Application Number
- CN202510008985.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, in artificial intelligence-assisted building layout design, especially in campus layout design, there are problems such as unstable generation results, singleness and poor image quality.
The campus layout model generation method based on adversarial generation network and diffusion model is adopted. Campus planar data is converted into initial layout images through adversarial generation network (such as Pix2pix model), and divergence deduction is used for diffusion models (such as Lora model in Stable Diffusion) to generate multiple high-precision campus planar layout images. Finally, the campus layout model is built in three-dimensional software, and sunshine and energy consumption simulation is performed through the building green indicator simulation plug-in.
It realizes the rapid generation of campus layout, with diverse generation results, reliable and good image quality, which can effectively assist architects in campus layout design and reduce design cycles.
Smart Images

Figure CN119918143A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of information processing, and in particular to a campus layout model generation method based on a generative adversarial network and a diffusion model. Background Art
[0002] The exploration of artificial intelligence in the generation of architectural layouts has been ongoing. In 2010, Paul Merrell and others from Stanford University proposed a method for automatically generating architectural layouts for computer graphics applications, applying Bayesian networks to the field of architecture for the first time. In 2014, Ian Goodfellow, an artificial intelligence scholar at the University of Montreal, first proposed generative adversarial neural networks (GANs). The introduction of GANs also allowed the construction industry to begin trying to apply artificial intelligence to architectural design from the perspective of images. In 2017, Phillip Isola and others from the Berkeley Artificial Intelligence Research Laboratory proposed Pix2Pix, and realized street view generation and building facade generation based on annotated images.
[0003] In terms of automatic generation of residential layouts, in 2018, Huang Weixin, Zheng Hao and others used the generative adversarial network (GAN) to realize function recognition based on apartment floor plans and the floor plan generation process based on functional color block maps; in 2019, Stanislas Chaillou realized the automatic generation process from the base to the building outline, to the floor plan functional layout and finally the furniture arrangement in terms of automatic generation of residential layouts.
[0004] At the urban design level, in 2018, Liu Yuezhong et al. proposed the use of CGAN to realize the distribution diagram of urban design from satellite land images to specified building density and greening rate control in "Research on Urban Design Based on Conditional Generative Adversarial Networks", and applied CGAN to the direction of urban design; in 2020, Shen J et al. used the pix2pixHD deep learning model to learn the characteristics of the overall building plan layout of different cities in China, and generate urban planning and design plans that meet different regional conditions.
[0005] The exploration of AI in the generation of building complex layouts is also being carried out simultaneously; in 2019, Sun Cheng et al. realized the automatic generation of residential area layout plans based on the pix2pix algorithm in CGAN; in the same year, Sun Chengyu et al. proposed the deep reinforcement learning theory in the exploration of the automatic layout of high-rise building complexes, and realized the automatic layout rules of high-rise building complexes based on "one axis, binary, and four elements"; in 2020, Lin Wenqiang et al. proposed an automatic generation method of campus plans under the generative adversarial network architecture. Subsequently, Deng Qiaoming et al. summarized and optimized the method to a certain extent, and explored the transformation method from two-dimensional images to three-dimensional models.
[0006] In general, current research on AI-assisted building layout design mainly focuses on residential and urban design levels. There is less exploration of the layout of public buildings, which needs to be supplemented and optimized. At the same time, in the actual generation process, there are problems such as unstable generation results, single generation results, and poor generated image quality. Summary of the invention
[0007] The purpose of the present invention is to provide a campus layout model generation method based on a generative adversarial network and a diffusion model. The present invention can realize the rapid generation of the overall campus layout, and has the advantages of diverse, reliable and high-quality generation results.
[0008] The technical solution of the present invention is a campus layout model generation method based on a generative adversarial network and a diffusion model, which is carried out according to the following steps:
[0009] Step S1: Collect campus plane data and convert the campus plane data into RGB color block data form;
[0010] Step S2: Input the RGB color block data obtained in step S1 into the adversarial generation network to convert it into an initial layout image;
[0011] Step S3: Inputting the initial layout image of step S2 into the diffusion model for divergent deduction to obtain multiple high-precision campus plane layout images;
[0012] Step S4: inputting the multiple high-precision campus layout images obtained in step S3 into a three-dimensional software to construct a campus layout model;
[0013] Step S5: Linking the campus layout model of step S4 with the building green index simulation plug-in, performing sunlight simulation and energy consumption simulation on the campus layout model, and providing an objective green building evaluation for the generated results.
[0014] In the above-mentioned campus layout model generation method based on the generative adversarial network and the diffusion model, the conversion of the campus plane data into the RGB color block data form is to use the coloring rules to color the different functional buildings in the campus plane data.
[0015] In the aforementioned campus layout model generation method based on the generative adversarial network and the diffusion model, the coloring rule is as follows:
[0016] Use black blocks to fill the ground, gray blocks to fill the roads, yellow blocks to fill the main entrance, purple blocks to fill the basketball court and volleyball court, rose-red blocks to fill the dormitories and canteens, red blocks to fill the teaching buildings, dark blue blocks to fill the corridors, light blue blocks to fill the gymnasium, green blocks to fill the administrative building and library, and orange blocks to fill the playground.
[0017] In the aforementioned campus layout model generation method based on a generative adversarial network and a diffusion model, the generative adversarial network is a Pix2pix model; the training process of the Pix2pix model is to first collect campus plane data, convert the campus plane data into RGB color block data form, and then perform data enhancement on the RGB color block data form to form a data set, and use the data set to train the Pix2pix model.
[0018] In the aforementioned campus layout model generation method based on the generative adversarial network and the diffusion model, the parameters of the Pix2pix model are that the number of iterations is 200 times, the learning rate is initially set to 2e-4 for the first 100 epochs, and the learning rate linearly decays to zero for the remaining epochs.
[0019] In the aforementioned campus layout model generation method based on the generative adversarial network and the diffusion model, the data enhancement includes left-right symmetry, top-bottom symmetry, central symmetry and noise addition processing.
[0020] In the aforementioned campus layout model generation method based on a generative adversarial network and a diffusion model, the diffusion model is the Lora model in Stable Diffusion.
[0021] In the aforementioned campus layout model generation method based on the generative adversarial network and the diffusion model, the campus layout model of step S4 is linked to the building green index simulation plug-in to perform sunlight simulation and energy consumption simulation on the campus layout model, so as to provide an objective green building evaluation for the generated results.
[0022] In the aforementioned campus layout model generation method based on generative adversarial networks and diffusion models, the building green index simulation plug-in is a Ladybug plug-in.
[0023] Compared with the prior art, the present invention converts the campus plan data into an initial layout image through a generative adversarial network as the basis. The initial layout image is divergently deduced in a diffusion model to obtain multiple high-precision campus plan layout images, which increases the number of images generated while improving the image quality. The high-precision campus plan layout images are then input into the three-dimensional software to construct multiple campus layout models, thereby realizing the automatic generation of the campus master layout. In addition, the campus layout model is linked to a building green index simulation plug-in to perform sunlight simulation and energy consumption simulation on the generated model, provide green building evaluation, and generate reliable results. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of the present invention;
[0025] Figure 2 This is a working principle diagram of the Pix2pix model of the present invention;
[0026] Figure 3 A schematic diagram of the process of generating an image for the Lora model of the present invention;
[0027] Figure 4 It is a conversion flow chart of campus plane data of the present invention;
[0028] Figure 5 It is a schematic diagram of generating the plane data of No. 1 Middle School of the present invention;
[0029] Figure 6 This is a schematic diagram of the generation of the plane data of No. 2 Middle School in the present invention
[0030] Figure 7 It is a schematic diagram of generating the plane data of No. 3 Middle School in the present invention. DETAILED DESCRIPTION
[0031] The present invention is further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.
[0032] Embodiment: A campus layout model generation method based on a generative adversarial network and a diffusion model, as shown in the attached Figure 1 As shown, follow the steps below:
[0033] Step S1: Through data collection and field research, collect the plane data of middle schools in southern China (i.e., site redline maps) No. 1-3, and screen and obtain the campus plane data that meets the functional specifications as input according to the middle school campus design specifications in the "Design Specifications for Primary and Secondary Schools". Use PS to color the collected campus plane data, and uniformly convert the samples into RGB color block data format that is easier for AI to read. The coloring rules are: use black blocks (R0, G0, B0) to fill the ground, use gray blocks (R150, G150, B150) to fill the road, and use yellow triangle blocks (R2 55, G255, B0), the basketball court and volleyball court are filled with purple blocks (R150, G150, B255), the dormitory and canteen are filled with rose red blocks (R255, G0, B255), the teaching building is filled with red blocks (R255, G0, B0), the corridor is filled with dark blue blocks (R0, G0, B255), the gymnasium is filled with light blue blocks (R0, G255, B255), the administrative building and library are filled with green blocks (R0, G255, B0), and the playground is filled with orange blocks (R255, G150, B0).
[0034] When constructing the database for training, we collected the plan data of middle schools in southern China (i.e., the red line map of the site). According to the middle school campus design specifications in the "Design Specifications for Primary and Secondary Schools", we screened and obtained the campus plan data that met the functional specifications. We used PS to color the collected campus plan data using the same coloring rules, and converted the samples into RGB color block data that is easier for AI to read. We then used data enhancement methods including left-right symmetry, top-down symmetry, center symmetry, and noise processing to obtain a data set of 120 images.
[0035] Step S2: As shown in the attached Figure 4 and attached Figure 2 As shown, the campus plane data in the form of RGB color block data obtained in step S1 is input into the Pix2pix model to convert it into an initial layout image;
[0036] When training the Pix2pix model, the data set is input for training. The Pix2pix model experiment selects 200 iterations. For the first 100 epochs, the learning rate is initially set to 2e-4, and then for the remaining epochs, the learning rate linearly decays to zero. The iterative Pix2pix model can automatically generate the initial layout image, that is, by inputting the base outline map, the model can generate a campus floor plan with a functional layout, but due to the insufficient accuracy of the generated image, subsequent model secondary optimization is required.
[0037] Step S3: As shown in the attached Figure 3 As shown, the initial layout image of step S2 is input into the Lora model of Stable Diffusion for divergent deduction, so that the low-precision initial layout image is converted into multiple high-precision campus plane layout images;
[0038] The data in the original data set is input during Lora model training. The trained Lora model can generate multiple images from a single image and convert low-precision floor plans into high-precision floor plans.
[0039] Step S4: import the multiple high-precision images in step S3 into the Python program, use Python code to decompose the high-precision campus plan layout image into multiple monochrome block images, and use Grasshopper modeling software to identify the pixel range of different functional buildings by color, raise the pixels and color blocks according to the set building height, and construct multiple campus layout models;
[0040] Step S5: Link the campus 3D model in step S4 with the Ladybug plug-in to simulate sunlight and energy consumption of the generated model and provide green building evaluation. Figure 5 -Attached Figure 7As shown in the figure, various teaching building layouts (C-shaped, strip-shaped, U-shaped, etc.) are generated, which can effectively simulate the architectural green indicators of the generated layout (the following table shows the sunlight simulation results). The architectural green indicators can provide a more direct reference for architects to choose generated images and can be fed back to the Lora model and Pix2pix model in the training stage to accelerate convergence.
[0041] In summary, the present invention combines the adversarial generative network with the diffusion model. Compared with the independent use of the adversarial neural network to automatically generate the campus layout, it has more diverse generation results and can significantly reduce the training time. The rich bevel and special-shaped design changes it brings provide architects with a wide range of inspiration. Designers can continuously generate models according to project requirements until an ideal campus plan layout is obtained; compared with the independent use of the diffusion model to automatically generate the campus layout, the generated result image quality is higher and the generation performance is more stable; the generation method can assist architects in generating buildings, speed up the early design process of the campus layout, and provide reference and reference for the rapid design of the campus master plan layout. The research selection range is southern China, and the research results are generally applicable. In key aspects such as the selection of main entrances and exits and the layout relationship of functional areas, they all show a high degree of conformity with the middle school campus design specifications, reflecting the rationality and effectiveness of the overall layout design; the three-dimensional model is generated by Grasshopper software, and the ladybug plug-in is used to simulate the building green index of the generated model, so that the generation result is more visualized.
Claims
1. A campus layout model generation method based on a generative adversarial network and a diffusion model, characterized by: Follow these steps: Step S1: Collect campus plane data and convert the campus plane data into RGB color block data form; Step S2: Input the RGB color block data obtained in step S1 into the adversarial generation network to convert it into an initial layout image; Step S3: Inputting the initial layout image of step S2 into the diffusion model for divergent deduction to obtain multiple high-precision campus plane layout images; Step S4: inputting the multiple high-precision campus layout images obtained in step S3 into a three-dimensional software to construct a campus layout model; Step S5: Linking the campus layout model of step S4 with the building green index simulation plug-in, performing sunlight simulation and energy consumption simulation on the campus layout model, and providing an objective green building evaluation for the generated results.
2. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 1 is characterized in that: The campus plane data is converted into RGB color block data by using coloring rules to color different functional buildings in the campus plane data.
3. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 1 is characterized in that: The coloring rules are as follows: Use black blocks to fill the ground, gray blocks to fill the roads, yellow blocks to fill the main entrance, purple blocks to fill the basketball court and volleyball court, rose-red blocks to fill the dormitories and canteens, red blocks to fill the teaching buildings, dark blue blocks to fill the corridors, light blue blocks to fill the gymnasium, green blocks to fill the administrative building and library, and orange blocks to fill the playground.
4. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 1 is characterized in that: The generative adversarial network is a Pix2pix model; the training process of the Pix2pix model is to first collect campus plane data, convert the campus plane data into RGB color block data form, then perform data enhancement on the RGB color block data form to form a data set, and use the data set to train the Pix2pix model.
5. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 4 is characterized in that: The parameters of the Pix2pix model are that the number of iterations is 200, the learning rate is initially set to 2e-4 for the first 100 epochs, and the learning rate is linearly decayed to zero for the remaining epochs.
6. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 4 is characterized in that: The data enhancement includes left-right symmetry, top-bottom symmetry, center symmetry and noise addition processing.
7. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 1 is characterized by: The diffusion model is the Lora model in Stable Diffusion.
8. The campus layout model generation method based on the adversarial generative network and the diffusion model according to claim 1 is characterized by: The building green index simulation plug-in is a Ladybug plug-in.
Citation Information
Cited By
Block texture generation method based on multi-objective optimization
CN121505091A
Building plane intelligent generation method considering indoor environment
CN121598489A