A building layout generation method based on graph-constrained generative adversarial networks

By adopting a generative adversarial network based on graph constraints in building layout generation, combined with graph variational autoencoder and node fine-tuning methods, the problem of relying on expert knowledge and experience in the existing technology is solved, and high-precision and reasonable buildings are achieved object layout generation.

CN118761328BActive Publication Date: 2025-02-14SUN YAT SEN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411237260.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-02-14
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

Existing building layout generation methods rely on expert knowledge and experience, are inefficient and difficult to deal with complex and unstructured design problems.

Method used

A generative adversarial network (GCGAN) based on graph constraints is adopted, combined with graph variational autoencoder (Graph VAE) and generative adversarial network (GAN), and a node fine-tuning method is used to optimize the layout results to generate a real and reasonable building layout.

Benefits of technology

It improves the accuracy of building layout generation, can accurately and reasonably generate building spatial layout, meet the needs of building number, distance and height, and effectively learn and utilize the building attributes of land use types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761328B_ABST
    Figure CN118761328B_ABST
Patent Text Reader

Abstract

The present invention provides a method for generating building layout based on graph-constrained generative adversarial networks, including obtaining land use plots and building vector data in a target area to construct a data set; constructing a plot tuple and a building layout diagram and obtaining a training data set and a test data set; based on a graph-constrained generative adversarial network GCGAN, introducing a graph variational autoencoder network Graph VAE and a generative adversarial network GAN, constructing a building generation model and training it; using the graph variational autoencoder network Graph VAE to generate a building layout diagram and fine-tune it; and then using the generative adversarial network GAN to generate a corresponding building layout result. The present invention can achieve high-precision building layout, by using plot data, combining a graph variational autoencoder with a generative adversarial network, and optimizing the layout results using a node fine-tuning method, to generate a true and reasonable building layout, thereby improving the accuracy of building layout generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building layout, and in particular to a building layout generation method based on a graph-constrained generative adversarial network. Background Art

[0002] Buildings are the main components of urban elements and play a vital role in shaping urban form and spatial organization. As urban physical structures, they provide space for various activities and have a significant impact on the urban environment. Generating building layouts is a key step in urban design.

[0003] Traditionally, building layout design relies heavily on expert knowledge and experience, which is labor-intensive and inefficient. In recent years, the application of computer-aided generation methods has provided a more efficient and high-quality solution for the generation of building layouts, which is of great significance for optimizing urban configuration and simulating urban environment scenarios.

[0004] Traditional methods for generating building layouts mainly belong to procedural modeling methods, which refer to methods for generating building layouts under a set of rules or programs. Procedural modeling methods can be divided into two categories: rule-based and evolutionary algorithms. Rule-based methods usually do not require a lot of computing resources. However, rule-based methods rely on expert knowledge to adjust rules and model parameters, which brings challenges to solving complex and unstructured design problems. To address this limitation, evolutionary algorithms inspired by the principles of biological evolution have become the mainstream procedural modeling methods for automatically generating building layouts. Unlike rule-based methods, evolutionary algorithms seek the optimal solution for building layouts by encoding buildings as parameter variables in the search space. Representative evolutionary algorithms include but are not limited to genetic algorithms and particle swarm optimization algorithms. Compared with rule-based methods, evolutionary algorithms provide greater adaptability and flexibility in generating building layouts. However, the performance of evolutionary algorithms depends heavily on the adjustment of hyperparameters. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a building layout generation method based on a graph constraint generative adversarial network. The present invention combines a graph variational autoencoder with a generative adversarial network, and uses a node fine-tuning method to optimize the layout results, thereby generating a realistic and reasonable building layout and improving the accuracy of building layout generation.

[0006] The technical solution of the present invention is: a building layout generation method based on a graph-constrained generative adversarial network, comprising the following steps:

[0007] S1), obtain the vector data of land use plots and buildings in the target area and construct a data set;

[0008] S2), constructing a plot tuple and a building layout diagram based on the data set in step S1), and obtaining a training data set and a test data set;

[0009] S3) Based on the graph-constrained generative adversarial network GCGAN, we introduce the graph variational autoencoder network Graph VAE and the generative adversarial network GAN to build a building generation model;

[0010] S4), training the building generation model based on the training data set to obtain a trained building generation model;

[0011] S5) Use the trained graph variational autoencoder network Graph VAE of the building generation model to predict the plot tuple data and generate the building layout map ;

[0012] S6) Use the node fine-tuning method based on the force-directed algorithm to adjust the building layout diagram Make fine adjustments;

[0013] S7) The fine-tuned layout diagrams of multiple buildings Rasterize it into the corresponding raster image, and then input the plot tuple and the raster image into the generative adversarial network GAN to generate the corresponding building layout results.

[0014] Preferably, in step S2), the plots and buildings in the data set are rasterized.

[0015] Preferably, in step S2), the plot tuple It is expressed as:

[0016] ;

[0017] In the formula, is a binary mask; is the adjustment factor; Indicates the type of land use. is the compactness of the plot; The average height of all buildings within a plot of land.

[0018] Preferably, in step S2), the building layout diagram is a ring topological structure, so as to better represent the composition and arrangement of the buildings in the plot; the building layout diagram is represented as:

[0019] ;

[0020] in, Each building node A set of node feature vectors; , It is the node that connects the buildings and The edge set of ; is an adjacency matrix whose elements or 0, where 1 represents a building node and connected, 0 means not connected.

[0021] Preferably, in step S3), the building generation model comprises a graph variational autoencoder network GraphVAE and a generative adversarial network GAN; the graph variational autoencoder GraphVAE is used to generate a building layout diagram according to an input plot tuple, and the generated building layout diagram contains generation attributes of each building; and the generation attributes of the building and the plot tuple are used as input of the GAN to generate the building layout.

[0022] Preferably, in step S3), the graph variational autoencoder network Graph VAE includes a graph variational autoencoder and a decoder, wherein the graph variational autoencoder includes two branches, one of which is an encoder based on a convolutional neural network, which converts the plot tuples into The other branch is a GNN-based encoder, which converts the real image of the building into The characteristic matrix into potential space.

[0023] Preferably, in step S3), the generative adversarial network GAN adopts a Pix2Pix structure, including a generator and a discriminator. The generator uses the encoder-decoder architecture of UNet, wherein each layer feature of the decoder of the encoder-decoder architecture is connected to the corresponding feature of the encoder using a skip connection method. The discriminator is a patch-based discriminator.

[0024] As a preferred embodiment, in step S6), for the building layout diagram If a building node falls outside the plot, the building node outside the plot is moved to the nearest plot boundary with a certain pixel step length until the building node crosses the boundary and becomes part of the plot.

[0025] Preferably, in step S6), the position of the building nodes in the plot is fine-tuned using a repulsive model based on the Fruchterman-Reingold force-oriented algorithm, wherein the repulsive model assumes that there is a repulsive force between the building nodes and between the building nodes and the plot boundaries; the repulsive force is calculated as follows:

[0026]

[0027] In the formula, and They represent the repulsive force between building nodes and between building nodes and the boundary of plots respectively; and Building nodes and Height; Is a building node and The Euclidean distance between Is a building node Euclidean distance to the plot boundary; and is the adjustment coefficient.

[0028] Preferably, in step S7), for the multiple building layout results generated by the generator, the optimal building layout result is selected by MAE between the expected number of buildings and the generated number of buildings.

[0029] Preferably, in step S7), if the number of optimal building layout results obtained is greater than 1, the MAE of the expected average building height and the generated average building height are used for screening again, and the generated building layout result with the minimum MAE in terms of average building height and meeting the expected number of buildings is selected as the final result.

[0030] The beneficial effects of the present invention are:

[0031] 1. The present invention can realize high-precision building layout by utilizing plot data, combining graph variational autoencoder and generative adversarial network, and optimizing the layout results by using node fine-tuning method to generate a real and reasonable building layout, thereby improving the accuracy of building layout generation;

[0032] 2. The present invention can accurately and reasonably generate the spatial layout of buildings, and the number of buildings, the distance between buildings, and the height meet people's layout requirements; the present invention can effectively learn and utilize the building attributes of land use types;

[0033] 3. The present invention represents the land parcel by tuples and represents the building layout diagram by ring topology, so as to better represent the composition and arrangement of the buildings in the land parcel and the attributes between the land parcel and the buildings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of a framework of a building generation model constructed in Example 1 of the present invention;

[0035] Figure 2 This is a schematic diagram of the process of tuple representation in Example 1 of the present invention;

[0036] Figure 3 This is a flow chart of the ring topology structure in Example 1 of the present invention;

[0037] Figure 4 1 is a comparison diagram of the actual building layout in Example 2 of the present invention and the building layout generated by the method of the present invention and the existing model; wherein, (a) is the actual building layout; (b) is the building layout generated by GANmapper; (c) is the building layout generated by Pix2Pix; (d) is the building layout generated by ESGAN; (e) is the building layout generated by the model of the present invention based on GCGAN. DETAILED DESCRIPTION

[0038] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:

[0039] Example 1

[0040] like Figure 1 and 2 As shown, this embodiment provides a method for generating a building layout based on a graph constraint generative adversarial network, comprising the following steps:

[0041] S1), obtain the vector data of land use plots and buildings in the target area and construct a dataset; then rasterize the constructed dataset.

[0042] In this embodiment, for each plot polygon, rasterization is performed at a resolution of 2 meters, with a pixel value of 255 representing the plot coverage, and a value of 0 representing the background, i.e., pixels outside the plot; the size of the resulting raster is equivalent to the minimum bounding box of the plot. And the buildings inside the plot are also rasterized at a resolution of 2 meters, and the raster size is the minimum bounding box of the plot. The pixel value range is 0 to 100, where a value of 0 represents the background, i.e., pixels outside the building footprint, and other values ​​represent the building height. A value of 100 corresponds to a building height equal to or greater than 100 meters.

[0043] S2), based on the data set in step S1), construct a plot tuple and a building layout diagram to obtain a training data set and a test data set; in this embodiment, the ratio between the training data set and the test data set is 80% and 20% respectively.

[0044] In this embodiment, the plot attributes related to the building layout are converted into single-valued grids, which constitute the plot tuple, such as Figure 2 As shown, the plot tuple It is expressed as:

[0045] ;

[0046] In the formula, is a binary mask; is the adjustment factor; Indicates the type of land use. = 1 indicates residential land, = 2 indicates commercial land; is the compactness of the plot, defined as the ratio of the plot area to its perimeter; is the average height of all buildings in a certain plot. , , and The format is a single value raster, the size of which is Same, that is, 256×256.

[0047] In this embodiment, according to the adjustment coefficient The value of will adjust the plot raster data to 256×256; adjustment factor The ratio of the length (in pixels) of the longer side of the minimum bounding box of the plot to 256. And the adjustment factor The values ​​of are also used to resize its original building raster to 256×256.

[0048] In this embodiment, Figure 3 As shown, for each plot, its building layout is converted into a ring topology structure. The building layout diagram is a ring topology structure, so as to better represent the composition and arrangement of the buildings in the plot; the building layout diagram is represented as:

[0049] ;

[0050] in, Each building node A set of node feature vectors; , is the maximum number of buildings allowed in a plot, It is the node that connects the buildings and The edge set of ; is the adjacency matrix whose elements represent building nodes and Whether it is connected; its elements or 0, where 1 represents a building node and connected, 0 means not connected.

[0051] In this embodiment, for each building node ; ; Contains buildings Geometric location information , and the spatial relationship with neighboring buildings ; and It is a building The coordinates of the geometric center of is its height. Assume that the building Located on the plot Inside, then and The value of is obtained from the local coordinate system, the origin of which is set at the plot The center of the plot In addition, in this local coordinate system, The coordinates of the lower left corner and upper right corner are set to [-1, -1] and [1,1] respectively.

[0052] Then, the azimuth of each building mass centroid relative to the origin is calculated; based on the calculated azimuth values, all building nodes (i.e., building mass centroids) are sorted in a counterclockwise order. In this way, edges are created in the sorted order to connect these nodes, thus forming a ring topology of building nodes.

[0053] In addition to the building nodes, the origin of the local coordinate system is also considered as a special node, and additional edges are added to connect the origin with all building nodes to form a graph with these nodes and edges. The advantage of this graph representation is that it can preserve the topological structure of the building layout within a certain plot.

[0054] For building nodes i The spatial relationship of neighboring buildings ;in, , , Corresponding to the building The Euclidean distance between the centroid of and its neighboring nodes. Specifically, It is a building The distance between the centroid of and node zero (i.e., the origin); and and Buildings The Euclidean distance between the centroid of and its preceding and succeeding neighbors on the building node ring, parameter It is a building The angle between its two edges connecting its previous and next neighbors respectively.

[0055] In this embodiment, for node zero, The value of is set to [0, 0] and Set to The average value of .

[0056] S3), based on the graph constraint generative adversarial network GCGAN, the graph variational autoencoder network Graph VAE and the generative adversarial network GAN are introduced to construct a building generation model; the framework diagram of the building generation model is as follows Figure 1 shown.

[0057] The building generation model includes a graph variational autoencoder network Graph VAE and a generative adversarial network GAN; the graph variational autoencoder Graph VAE is used to generate a building layout map according to an input plot tuple, and the generated building layout map contains the generated attributes of each building, such as location and height; and the generated attributes of the building and the plot tuple are used as input of the GAN to generate the building layout.

[0058] As a preferred embodiment of the present invention, the graph variational autoencoder network Graph VAE includes a graph variational autoencoder and a decoder. In the present embodiment, the graph variational autoencoder includes two branches, one of which is an encoder based on a convolutional neural network, which converts the plot tuples into The encoder based on the convolutional neural network includes five convolutional blocks, each of which contains a convolution and a rectified linear unit activation function; the size of each convolutional layer is set to 3; except for the last convolutional layer, the output of each convolutional layer is downsampled by maximum pooling; the features generated by the last convolutional layer are further converted into 512-dimensional features using a multi-layer perceptron MLP. In the figure, the symbol Represents a feature transformation (Reshape) operation;

[0059] The other branch is a GNN-based encoder, which converts the real image The characteristic matrix is transformed into a potential space; This is a real picture of the building The number of building nodes in the feature matrix By connecting the real building map The feature vectors of all nodes in are formed.

[0060] The GNN-based encoder includes a four-layer graph attention network GAT; each layer of the graph attention network is connected to a ReLU layer; the feature matrix obtained after the four-layer graph attention network GAT is average pooled, and then aggregated using MLP to convert the features into 512-dimensional features; and then sampled into a latent space according to the normal distribution through variational reparameterization; in the figure, the symbol Represents the feature concatenation operation;

[0061] The features processed by the two branches of the graph variational autoencoder are connected to generate fused features;

[0062] During decoding, MLP is used to process the fused features to obtain the initial feature matrix of the node. ; The feature dimension is 512;

[0063] Then, according to the real picture Generate a real image of a building based on the topological structure The adjacency matrix of ;

[0064] Next, the initial feature matrix and the adjacency matrix Multi-layer message passing is performed through four graph attention networks GAT with ReLU; finally, another MLP is used to generate .

[0065] As a preferred embodiment of this embodiment, the generative adversarial network GAN adopts a Pix2Pix structure, including a generator and a discriminator. The generator uses the encoder-decoder architecture of UNet, wherein each layer feature of the decoder of the encoder-decoder architecture is connected to the corresponding feature of the encoder using a skip connection method, which is conducive to recovering detail information.

[0066] The encoder of the encoder-decoder architecture consists of nine convolutional blocks, each of which includes a convolutional layer, a batch normalization layer, and a LeakyReLU activation function; the kernel size of the convolutional layer is set to 4, the stride value of the first layer is 1, and the stride value of the remaining layers is 2 to reduce the spatial dimension of the feature map.

[0067] The decoder of the encoder-decoder architecture generates the building layout by mapping the encoder's implicit feature representation to a high-resolution space; each decoder block of the encoder-decoder architecture consists of a transposed convolution layer, a BN layer, and a ReLU layer. The transposed convolution is a symmetric process to the normal convolution, and the kernel size of the transposed convolution layer is set to the same as the convolution layer in the encoder.

[0068] The discriminator is a patch-based discriminator consisting of four convolutional blocks, each of which consists of a 4×4 convolutional layer followed by BN and LeakyReLU; in this way, the discriminator produces a 64×64 array representing the probability of whether each relevant patch in the input building layout is real or generated.

[0069] S4), training the building generation model based on the training data set to obtain a trained building generation model;

[0070] In this embodiment, the training batch size of the graph variational autoencoder network Graph VAE is set to 32, the initial learning rate is set to 0.0005, and the number of training rounds is set to 400. The batch size of the generative adversarial network GAN is set to 16, the initial learning rate is set to 0.0002, and the number of training rounds is set to 200. Adam is used as the network optimizer of the building generation model;

[0071] In this embodiment, first, a set of plot tuples is used and the corresponding real building map to train a graph variational autoencoder network Graph VAE; wherein the graph variational autoencoder is used to learn the potential relationship between the plot and the building layout; when generating a building layout map, the graph variational autoencoder of the graph variational autoencoder network Graph VAE receives the plot tuple It is fused with Gaussian noise and then further processed by its decoder to produce a building layout map ; Building layout The nodes are then rasterized, producing a raster image , the raster image The location and height of the buildings generated on the input plot are recorded.

[0072] Second, the plot tuple and raster images Input the Generative Adversarial Network (GAN) for training; the generator is trained to generate building layout results (256×256 grid).

[0073] S5) Use the graph variational autoencoder of the trained building generation model to predict the plot tuple data and generate the building layout map .

[0074] This example uses the trained graph variational autoencoder network Graph VAE to generate a building layout map for a certain plot of land. When The features obtained in are fused with Gaussian noise to produce fused features; then given the number of building nodes specified externally Total Building nodes are randomly placed in the plots, and their positions are determined using the binary mask of the plots. In this way, an initial building layout can be created that follows a ring topology. , and can also create an initial building layout diagram accordingly based on the connections between nodes The adjacency matrix of ; In addition, the fused features are processed by an MLP to obtain the initial building layout map Create an initial feature matrix ; The initial feature matrix and the adjacency matrix As input, the building layout graph is then generated by running the decoder of GraphVAE ; and the building layout is rasterized, thus producing a raster image ; The generated raster image From the building layout The same local coordinate system is inherited from the plot tuple are the same size.

[0075] S6) Use the node fine-tuning method based on the force-directed algorithm to adjust the building layout diagram Make fine adjustments.

[0076] For building layout If a building node falls outside the plot, the building node that falls outside the plot is moved to the nearest plot boundary with a certain pixel step length until the building node crosses the boundary and becomes a part of the plot. In this embodiment, 5 pixels are used as the step length of each movement.

[0077] The positions of building nodes in the plot are fine-tuned using a repulsive model based on the Fruchterman-Reingold force-oriented algorithm. The repulsive model assumes that there is a repulsive force between building nodes and between building nodes and plot boundaries. The repulsive force is calculated as follows:

[0078]

[0079] In the formula, and They represent the repulsive force between building nodes and between building nodes and the boundary of plots respectively; and Building nodes and Height; Is a building node and The Euclidean distance between Is a building node Euclidean distance to the plot boundary; and is the adjustment coefficient; in this embodiment, and are set to 2 and 5 respectively; in this example, building nodes that are less than 10 pixels away from the boundary will be affected by the boundary repulsion force. The resultant force at the building node is calculated as the vector superposition of all repulsive forces. The direction and magnitude of the resultant force determine in which direction and how far the building node should move, and one unit of force will result in a one-pixel movement. The repulsion model is iterated 100 times to produce 100 fine-tuned building node configurations for a plot. Then all of them are converted into corresponding raster image inputs to generate adversarial networks GAN and generate a corresponding number of building layout results.

[0080] S7) The fine-tuned layout diagrams of multiple buildings Rasterize to the corresponding raster image , then the plot tuple and raster images Input the Generative Adversarial Network (GAN); Generate the building layout result through the generator ; and use the discriminator to determine whether the generated building layout is a result or a real building layout.

[0081] The optimal building layout result is selected by the MAE between the expected number of buildings and the generated number of buildings; if the number of optimal building layout results is greater than 1; then the MAE of the expected average building height and the generated average building height is used for screening, and the generated building layout result with the smallest MAE in terms of average building height and meeting the expected number of buildings is selected as the final result.

[0082] Example 2

[0083] This embodiment compares the building generation model based on the graph-constrained generative adversarial network GCGAN provided by the present invention with several existing models for building layout. The comparison models selected in this embodiment are mainly GANmapper, Pix2Pix and ESGAN; wherein the evaluation indicators include the structural similarity index measure (SSIM), peak signal to noise ratio (PSNR), Frechet inception distance (FID) and mean absolute error (MAE). The higher the values ​​of SSIM and PSNR, the lower the values ​​of FID and MAE, indicating that the model performance is better.

[0084] Table 1 provides the performance indicators of each model. Figure 4 The four models were compared by visualizing the building layouts they generated. As shown in Table 1, the building generation model constructed based on the graph constraint generative adversarial network GCGAN provided by the present invention performed the best, with the maximum values ​​of the indicators SSIM and PSNR and the minimum value of FID, which indicates that the building spatial layout generated by the building generation model constructed based on the graph constraint generative adversarial network GCGAN provided by the present invention is most similar to the actual situation. In addition, the building generation model constructed based on the graph constraint generative adversarial network GCGAN provided by the present invention has the smallest error in predicting the number of buildings and the average height, which indicates the effectiveness of the building generation model constructed based on the graph constraint generative adversarial network GCGAN provided by the present invention in learning the building attributes of different land use types. Figure 4 It can be seen from the generated results that the building generation model based on the graph constraint generative adversarial network GCGAN provided by the present invention achieves better generation performance in generating building layouts, especially in generating the required number of buildings. In addition, compared with the results generated by the other three generation models, the shapes and arrangements of the buildings generated by the building generation model based on the graph constraint generative adversarial network GCGAN provided by the present invention are more visually reasonable. Figure 4 Among them, Case 1 is the layout of residential buildings; Case 2 is the layout of commercial buildings; Case 3 is the layout of industrial buildings; Case 4 is the layout of transportation station buildings; and Case 5 is the layout of parks and green space buildings.

[0085] Table 1 Comparison of performance indicators of GANmapper, Pix2Pix, ESGAN and GCGAN

[0086]

[0087] Among them, MAE_BN and MAE_AH refer to the MAE values ​​of the number of buildings and the average height of buildings on the plot, respectively.

[0088] The above embodiments and descriptions are only for illustrating the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, all of which fall within the scope of the present invention to be protected.

Claims

1. A building layout generation method based on graph-constrained generative adversarial networks, characterized in that: The following steps are involved: S1), obtain the vector data of land use plots and buildings in the target area and construct a data set; S2), constructing a plot tuple and a building layout diagram based on the data set in step S1), and obtaining a training data set and a test data set; S3) Based on the graph-constrained generative adversarial network GCGAN, we introduce the graph variational autoencoder network Graph VAE and the generative adversarial network GAN to build a building generation model; S4), training the building generation model based on the training data set to obtain a trained building generation model; S5) Use the trained graph variational autoencoder network Graph VAE of the building generation model to predict the plot tuple data and generate the building layout map ; S6) Use the node fine-tuning method based on the force-directed algorithm to adjust the building layout diagram Make fine adjustments; S7) The fine-tuned layout diagrams of multiple buildings Rasterize it into the corresponding raster image, and then input the plot tuple and the raster image into the generative adversarial network GAN to generate the corresponding building layout results.

2. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 1, characterized in that: In step S2), the plot tuple It is expressed as: In the formula, is a binary mask; is the adjustment factor; Indicates the type of land use. is the compactness of the plot; The average height of all buildings within a plot of land.

3. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 2, characterized in that: In step S2), the building layout diagram is a ring topology structure, and the building layout diagram is represented as follows: in, Each building node A set of node feature vectors; , It is the node that connects the buildings and The edge set of ; is an adjacency matrix whose elements or 0, where 1 represents a building node and connected, 0 means not connected.

4. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 3, characterized in that: In step S2), for the building node ;have: in, For buildings The geometric position information of and It is a building The coordinates of the geometric center of is its height; For buildings The spatial relationship of adjacent buildings, It is a building The distance between the centroid of and node zero; and and Buildings The Euclidean distance between the centroid of and its preceding and succeeding neighbors on the building node ring, parameter It is a building The angle between its two edges connecting to its previous and next neighbor nodes respectively; Assume that the building Located on the plot Inside, then and The value of is obtained from the local coordinate system, the origin of which is set at the plot the center of Furthermore, in this local coordinate system, The coordinates of the lower left corner and upper right corner are set to [-1, -1] and [1,1] respectively; Then, the azimuth of each building mass centroid relative to the origin is calculated; based on the calculated azimuth values; all building nodes are sorted in a counterclockwise order, in this way, edges are created in the sorted order to connect these nodes, thereby forming a ring topology of the building nodes.

5. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 1, characterized in that: In step S3), the building generation model includes a graph variational autoencoder network Graph VAE and a generative adversarial network GAN; The graph variational autoencoder network Graph VAE is used to generate a building layout map according to an input plot tuple, and the generated building layout map contains the generated attributes of each building; and the generated attributes of the building and the plot tuple are used as input of a generative adversarial network GAN to generate a building layout.

6. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 5, characterized in that: In step S3), the graph variational autoencoder network Graph VAE includes a graph variational autoencoder and a decoder. The graph variational autoencoder includes two branches, one of which is an encoder based on a convolutional neural network, which converts the plot tuples into The other branch is a GNN-based encoder, which converts the real image The characteristic matrix into potential space.

7. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 5, characterized in that: In step S3), the generative adversarial network GAN adopts a Pix2Pix structure, including a generator and a discriminator; The generator utilizes the encoder-decoder architecture of UNet, wherein each layer feature of the decoder of the encoder-decoder architecture is connected to the corresponding feature of the encoder using a skip connection method; the discriminator is a patch-based discriminator.

8. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 1, characterized in that: In step S6), for the building layout diagram If a building node falls outside the plot, the building node that falls outside the plot is moved to the nearest plot boundary with a certain pixel step length until the building node crosses the boundary and becomes part of the plot.

9. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 8, characterized in that: In step S6), the positions of the building nodes in the plot are fine-tuned using a repulsive model based on the Fruchterman-Reingold force-oriented algorithm. The repulsive model assumes that there is a repulsive force between the building nodes and between the building nodes and the plot boundaries. The repulsive force is calculated as follows: In the formula, and They represent the repulsive force between building nodes and between building nodes and the boundary of plots respectively; and Building nodes and Height; Is a building node and The Euclidean distance between Is a building node Euclidean distance to the plot boundary; and is the adjustment coefficient.

10. The method for generating building layout based on graph-constrained generative adversarial networks according to claim 1, characterized in that: In step S7), for multiple building layout results generated by the generator, the optimal building layout result is selected by MAE between the expected number of buildings and the generated number of buildings; If the number of optimal building layout results obtained is greater than one, the MAE of the expected average building height and the generated average building height are used for screening again, and the generated building layout result with the smallest MAE in terms of average building height and meeting the expected number of buildings is selected as the final result.

Citation Information

Patent Citations

  • Oversampling method based on graph topology

    CN116861959A