Building planning image generation method and system based on potential diffusion model
By improving the structure of the potential diffusion model and introducing embedding vectors, the problems of large computing burden and poor image quality when generating building planning images in the prior art are solved, and an efficient, rich in details and conforming to the specifications are achieved.
Patent Information
- Application Number
- CN202411625025.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-14
AI Technical Summary
When generating diverse architectural planning images with high precision, rich details and conforming to building specifications, the existing technology has a large computing burden, poor image quality, low training efficiency of GAN model and easy pattern collapse, which cannot meet the needs of efficient design generation of complex scenarios.
The architectural planning image generation method based on the potential diffusion model is adopted, and the network structure of the U-Net model is improved, the channel crossing and spatial crossing attention mechanism is introduced, and the architectural style embedding vector, architectural description text embedding vector and geometric information embedding vector are introduced as input conditions of the model, ensuring that the generated image contains complete information of style, functional layout and geometric structure.
It improves computing efficiency, reduces computational cost and complexity, and the generated images have rich details and high resolution, conforms to functional layout and geometric structure specifications, avoids geometric distortion problems, and meets the efficiency and diversity requirements of building planning image generation.
Smart Images

Figure CN119557955A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for generating architectural planning images based on a potential diffusion model. Background Art
[0002] Traditional architectural design methods are currently unable to adapt to the changing design needs brought about by the accelerated urbanization process, especially the needs for architectural planning images. At present, technologies that apply AI technology to this image generation field have emerged, such as GAN (Generative Adversarial Network) and Stable Diffusion. The former defaults to an image size of 512x512, and the latter relies on the confrontation between the generator and the discriminator. Both perform poorly when dealing with the generation of high-precision, detailed, and diverse images that meet architectural specifications. In order to generate high-resolution and high-precision images, since they contain a lot of structural information and detail elements, operating directly in high-bit pixel space will have a large computational burden. Stable Diffusion chooses to compress high-bit images to low dimensions for operation. Although it reduces the consumption of computing resources to a certain extent, it greatly sacrifices the quality and details of the image and cannot meet the needs of high-precision images such as complex scenes. In the iterative calculation process of GAN's image generation, each step requires mutual training of the generator and the discriminator, which costs a lot of time and computing resources and cannot meet the current needs of efficient design generation.
[0003] In addition, since Stable Diffusion adapts to the image size of 512x512 by default, for image generation requirements beyond this resolution range, it is necessary to use an upscaling algorithm to process the low-resolution images. During the processing, the model relies on random seeds and noise vectors, and freely interpolates and infers. The generated content does not meet the design scope and standards, and cannot guarantee the accuracy of the building's proportional relationship and structural layout, that is, geometric distortion. And due to limitations such as the model's resolution, some details will be blurred when generating complex architectural scenes, such as material texture and facade decoration. However, the GAN model training process relies on the confrontation between the generator and the discriminator, which is not only computationally inefficient but also prone to mode collapse. Therefore, it cannot process complex image information. The generated images tend to be monotonous and lack architectural details, which cannot meet the diverse needs of architectural design. Although GAN performs well in terms of realism and can generate "pseudo-real" images that are realistic on the surface and difficult to distinguish, it also causes credibility issues in practical applications, and the actual design requirements may be very different from the application. At the same time, the training mechanism makes it difficult for the generated model to accurately and synchronously update parameters at each stage, resulting in non-convergence. The image generated by the final model lacks the logic and consistency of the architectural structure, that is, the image is distorted.
[0004] The latent diffusion model is a deep learning generative model based on AI technology. It uses a progressive denoising method to generate high-quality images. However, it is currently only used for general image generation and technical style transfer. It has not been perfectly combined with the application methods of "architectural design and urban planning". When faced with generating architectural planning images, it cannot meet some special needs in this field and urgently needs to be optimized.
[0005] Therefore, how to overcome the above-mentioned defects has become an important issue to be solved urgently by those skilled in the art. Summary of the invention
[0006] The present invention relates to the field of image processing technology, and in particular to a method and system for generating architectural planning images based on a potential diffusion model, which aims to generate diversified architectural planning images with high precision, rich details and in compliance with architectural specifications. To achieve the above purpose, the present invention adopts the following technical solutions:
[0007] A first aspect of an embodiment of the present invention discloses a method for generating a building planning image based on a potential diffusion model, comprising the following steps:
[0008] S1. Data preprocessing: obtaining a dataset A containing architectural design images and a dataset B containing urban planning images, and preprocessing the images in the dataset A and the dataset B;
[0009] S2. Improve the structure of the latent diffusion model: Improve the network structure of the U-Net model. For the architectural design images and urban planning images in the data set input to the latent diffusion model, first compress them into the latent space for reverse diffusion to obtain the latent representation of the preliminary architectural design images and the latent representation of the preliminary urban planning images.
[0010] Introducing channel-wise and spatial-wise attention mechanisms at each encoder stage of the U-Net model to enhance the relevance between text descriptions and architectural styles;
[0011] S3. Optimize input conditions: The architectural style embedding vector C is additionally introduced to combine with the architectural description text embedding vector D and the geometric information embedding vector E as additional input conditions of the latent diffusion model. By adding "building functional area segmentation" and "geometric constraint" embedding, it is ensured that the generated image contains complete information on style, functional layout and geometric structure.
[0012] S4, model training: construct a training data set based on multiple training samples, and use the data set to train the improved model; wherein each training sample includes a potential representation of a preliminary building image, a corresponding text description, and a potential representation of a preliminary urban planning image;
[0013] S5. Image generation: After the model training is completed, the latent representation of the target urban planning image, the architectural style embedding vector C, and the architectural description text embedding vector D are input into the optimized latent diffusion model to obtain a generated architectural planning image that meets the requirements.
[0014] Preferably, the “S1, data preprocessing: obtaining a data set A containing architectural design images and a data set B containing urban planning images, and preprocessing the images in the data set A and the data set B” includes:
[0015] For large-scale architectural design images / urban planning images, the large-scale images are divided into smaller areas for block training. In this case, overlapping parts must be introduced on the boundaries of each block to preserve the continuity and contextual information of the scene.
[0016] Using a multi-scale strategy, we learn multi-resolution versions of images to enhance the training model’s ability to recognize large scenes.
[0017] Among them, lower resolution images are used to train the model to learn the global structure, while higher resolution images are used to train the model to learn local details. Finally, the images will be uniformly normalized to ensure that image features at different scales can be consistently input into the training model for training.
[0018] Preferably, in step S2, the architectural design images and urban planning images in the data set input into the latent diffusion model are compressed from high dimensions to low dimensions through a variational autoencoder (VAE).
[0019] Preferably, the architectural style embedding vector C is generated by the following steps:
[0020] The architectural design image is encoded using CLIP ImageEncoder to obtain the image embedding vector V0. After the embedding vector V0 is processed by the Transformer model, it is passed to different stages in the U-Net network multiple times through the cross-attention mechanism.
[0021] At the same time, a layer-by-layer generation strategy is adopted. According to the complexity of the building, a phased generation strategy is adopted to first generate the basic framework of the building, and then generate the external details and internal functional areas;
[0022] V0 is processed through a three-layer self-attention mechanism to extract architectural style and geometric features and generate an architectural style embedding vector C.
[0023] Preferably, the architectural text embedding vector D is generated by the following steps:
[0024] According to each architectural design image in dataset A, a descriptive text based on architectural style, structural characteristics, functional area layout and geometric information is generated. CLIPTokenizer and CLIPTextModel are used to encode the text description and generate the architectural text embedding vector D.
[0025] Preferably, the model training process described in step S4 includes the following steps:
[0026] Perform forward diffusion on the building images in the training samples, gradually add noise, and generate potential images with different noise levels to train the model to understand how to recover images from noise; use the Adam optimizer, and use momentum and weight decay techniques in the parameter update process to speed up convergence and improve model stability;
[0027] After multiple rounds of training, the architectural planning images are evaluated and the training is completed if they meet the requirements. The evaluation criteria include the structural accuracy, style consistency, high resolution and visual quality of the generated architectural planning images.
[0028] Preferably, in the model training step, the depth-wise separable convolution is used including a depth-wise convolution step and a point-wise convolution step, wherein the depth-wise convolution step applies a convolution operation to each input channel separately to capture spatial features, and the point-wise convolution step uses a 1x1 convolution kernel to linearly combine the output of the depth-wise convolution to integrate information from different channels.
[0029] A second aspect of an embodiment of the present invention discloses a building planning image generation system based on a potential diffusion model, which adopts the image generation method described in the first aspect and includes:
[0030] Data preprocessing module 1, used to read and process architectural design image and urban planning image datasets;
[0031] Model optimization module 2, used to improve the structure of the potential diffusion model and optimize the input conditions;
[0032] Model training module 3, used to train the optimized latent diffusion model by combining building description text, building image and planning image;
[0033] The image generation module 4 is used to receive the building image to be generated and the planning image input after the model training is completed, and generate a high-resolution building image that meets the design specifications.
[0034] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0035] 1. Through the setting of steps S1-S5 of the method of the invention in this case, the calculation efficiency is improved, the calculation cost and complexity are reduced, the number of model parameters is greatly reduced during the calculation process, the image generation speed is accelerated, and the high efficiency requirements for building planning image generation in a real environment are met.
[0036] 2. The optimized latent diffusion model proposed in the present invention is used to generate architectural planning images, which can generate diversified image results according to actual needs, with rich details and high resolution. The architectural style embedding vector and text description embedding vector are introduced. The model can more accurately understand and generate images that meet the requirements. Therefore, it ensures that the generated images meet the functional layout and geometric structure specifications, avoids the problem of geometric distortion, and the generated image results are more in line with actual requirements.
[0037] 3. The training process of the potential diffusion model provided by the present invention can be used to train more sample data, which is different from the poor training samples in the prior art due to the low efficiency of model training. Therefore, the performance of the trained model (i.e., the final generated image result) is more in line with the complexity or diversity requirements of architectural design in current real-life scenarios.
[0038] 4. The Adam optimizer is used in the training process of the third module in the present invention, which effectively improves the stability of the model and overcomes the instability problem existing in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a schematic diagram of the process of the first embodiment of the present invention;
[0041] Figure 2 It is a schematic structural block diagram of embodiment 2 of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present invention and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] The embodiment of the present invention discloses an image generation method based on a potential diffusion model provided by the present invention, which can be applied to multiple fields such as architectural design, urban planning, virtual reality, etc., and has wide applications and good prospects.
[0045] Embodiment 1
[0046] like Figure 1 As shown, a method for generating a building planning image based on a potential diffusion model comprises the following steps:
[0047] S1. Data preprocessing: obtaining a dataset A containing architectural design images and a dataset B containing urban planning images, and preprocessing the images in the dataset A and the dataset B;
[0048] S2. Improve the structure of the latent diffusion model: Improve the network structure of the U-Net model. For the architectural design images and urban planning images in the data set input to the latent diffusion model, first compress them into the latent space for reverse diffusion to obtain the latent representation of the preliminary architectural design images and the latent representation of the preliminary urban planning images.
[0049] Introducing channel-wise and spatial-wise attention mechanisms at each encoder stage of the U-Net model to enhance the relevance between text descriptions and architectural styles;
[0050] S3. Optimize input conditions: The architectural style embedding vector C is additionally introduced to combine with the architectural description text embedding vector D and the geometric information embedding vector E as additional input conditions of the latent diffusion model. By adding "building functional area segmentation" and "geometric constraint" embedding, it is ensured that the generated image contains complete information on style, functional layout and geometric structure.
[0051] S4, model training: construct a training data set based on multiple training samples, and use the data set to train the improved model; wherein each training sample includes a potential representation of a preliminary building image, a corresponding text description, and a potential representation of a preliminary urban planning image;
[0052] S5, Image Generation: After the model training is completed, the latent representation of the target urban planning image, the architectural style embedding vector C, and the architectural description text embedding vector D are input into the optimized latent diffusion model to obtain a generated architectural planning image that meets the requirements. In specific implementation, the model training also obtains reference information on urban layout and planning based on each urban planning image in the dataset B for training.
[0053] As described above, by setting step S1, the images in dataset A (architectural design images) and dataset B (urban planning images) are preprocessed, which helps to improve the training efficiency of the model and the quality of the generated images. By setting S2, the network structure of the U-Net model is improved, and the back diffusion process is introduced, so that the architectural design images and urban planning images can be compressed into the latent space to obtain their latent representations, which helps the model capture the key information and features in the image. At the same time, the introduction of channel cross- and spatial cross-attention mechanisms in each encoder stage of the U-Net model can enhance the model's ability to understand the correlation between text descriptions and architectural styles, so that the generated images are more in line with the requirements of text descriptions and architectural styles. By setting S3, by additionally introducing architectural style embedding vectors C, architectural description text embedding vectors D, and geometric information embedding vectors E as additional input conditions of the latent diffusion model, more information and guidance can be provided to the model; and the optimized input conditions enable the model to design and generate qualified and diverse images according to actual needs after training. By setting S4, a dataset containing multiple training samples is constructed, and the improved model is used for training, so that the model can learn the correlation and regularity between architectural design images and urban planning images. At the same time, according to each urban planning image in the data set B, the reference information of urban layout and planning is obtained for training, which can further improve the model's understanding of urban planning and architectural design, making the generated images more in line with actual requirements. Through the setting of S5, after the model training is completed, the latent representation of the target urban planning image, the architectural style embedding vector C and the architectural description text embedding vector D are input into the optimized latent diffusion model, and the architectural planning image that meets the requirements can be generated. This generation method is highly flexible and customizable, and can generate architectural planning images of different styles and functions according to different needs and scenarios. At the same time, since the model has fully learned the correlation and rules between architectural design images and urban planning images, the generated images have high accuracy and credibility.
[0054] As a preferred implementation, the “S1, data preprocessing: obtaining a data set A containing architectural design images and a data set B containing urban planning images, and preprocessing the images in the data set A and the data set B” includes:
[0055] For large-scale architectural design images / urban planning images, the large-scale images are divided into smaller areas for block training. In this case, overlapping parts must be introduced on the boundaries of each block to preserve the continuity and contextual information of the scene.
[0056] Using a multi-scale strategy, we learn multi-resolution versions of images to enhance the training model’s ability to recognize large scenes.
[0057] Among them, lower resolution images are used to train the model to learn the global structure, while higher resolution images are used to train the model to learn local details. Finally, the images will be uniformly normalized to ensure that image features at different scales can be consistently input into the training model for training.
[0058] As mentioned above, by dividing large-scale architectural design images and urban planning images into smaller areas for block training, the computational burden of a single training can be significantly reduced. At the same time, the introduction of overlapping parts on the boundaries of each block of images ensures the continuity of the scene and the retention of contextual information, avoiding the breakage of image information caused by block division, which not only improves the computational efficiency but also ensures the coherence of image content. The multi-resolution version of the image is learned using a multi-scale strategy, so that the model can capture image features at different scales. Lower-resolution images are used to train the model to learn global structures, while higher-resolution images are used to capture local details, which can reduce the computational cost of operating directly on high-resolution images and improve the model's ability to capture image details. In addition, through the training of multi-scale strategies, the model can learn the global structure and local details of the image at different scales, so that the generated images can maintain global structural consistency while also showing rich local details, such as material texture, facade decoration, etc.
[0059] As a preferred implementation, the architectural design images and urban planning images in the data set input to the latent diffusion model in step S2 are compressed from high dimensions to low dimensions through a variational autoencoder VAE. In this way, VAE can extract key features and information from the image through the learned latent space representation during the compression process, which is crucial for generating high-quality architectural planning images that meet the requirements.
[0060] As a preferred implementation, the architectural style embedding vector C is generated by the following steps:
[0061] The architectural design image is encoded using the CLIPImageEncoder image encoder to obtain the image embedding vector V0. After the embedding vector V0 is processed by the Transformer deep learning model, it is passed to different stages in the U-Net network multiple times through the cross-attention mechanism.
[0062] At the same time, a layer-by-layer generation strategy is adopted. According to the complexity of the building, a phased generation strategy is adopted to first generate the basic framework of the building, and then generate the external details and internal functional areas;
[0063] V0 is processed through a three-layer self-attention mechanism to extract architectural style and geometric features and generate an architectural style embedding vector C.
[0064] As mentioned above, by using CLIPImageEncoder to convert images into embedding vectors and processing these vectors in the Transformer model, direct operations in high-bit pixel space are avoided, further reducing the computational burden. The layer-by-layer generation strategy allows the model to generate images in stages, from the basic framework to the external details and internal functional areas. This gradual addition of details not only improves the generation efficiency, but also enables the model to better handle the needs of complex scenes and high-precision images. Specifically, by processing the embedding vector V0 through a three-layer self-attention mechanism, the method in this case can extract the architectural style and geometric features and generate the architectural style embedding vector C, ensuring that the generated image can show rich details and accurate geometric structure while maintaining the overall style consistency; and the layer-by-layer generation strategy ensures that the image will not have geometric distortion or blurred details during the generation process, because each stage focuses on generating a specific level of image content. Compared with GAN, the method in this case avoids the problems of mode collapse and image simplification, because the combination of the Transformer model and the U-Net network provides stronger image generation capabilities and higher diversity.
[0065] As a preferred implementation, the architectural text embedding vector D is generated by the following steps:
[0066] According to each architectural design image in the dataset A, a description text based on architectural style, structural features, functional area layout and geometric information is generated. The text description is encoded using CLIPTokenizer and CLIPTextModel to generate an architectural text embedding vector D. In specific implementation, CLIPTokenizer is a text encoder that converts text descriptions into a series of digital tokens; these tokens are the basis for subsequent processing and can capture the vocabulary and grammatical information in the text. CLIPTextModel is a text model based on the CLIP (Contrastive Language–Image Pre-training) framework; it can further process the tokens generated by CLIPTokenizer, extract key information from the text description, and generate the corresponding embedding vector. In specific implementation, the architectural text embedding vector D is a high-dimensional numerical representation that contains all the semantic information about architectural style, structural features, functional area layout and geometric information in the description text. This vector can be used as one of the input conditions of the latent diffusion model to guide the model to generate architectural images that match the description text.
[0067] As described above, the method of this case converts complex image information into concise text descriptions by generating architectural text embedding vectors D, and further encodes them into embedding vectors, thereby avoiding the huge computational burden caused by direct operations in high-bit pixel space, thereby reducing computational costs. Moreover, the architectural text embedding vector D contains key information such as architectural style, structural characteristics, functional area layout, and geometric information, which can more accurately understand and generate images that meet the requirements, ensure that the generated images meet the functional layout and geometric structure specifications, avoid geometric distortion problems, and the generated image results are more in line with actual requirements.
[0068] As a preferred embodiment, in the above-mentioned method for generating architectural planning images based on the latent diffusion model, the geometric information embedding vector E is a special numerical representation, which is specifically used to capture and represent the geometric features or shape information of the building. In the process of generating architectural planning images, the geometric information embedding vector E can ensure that the generated image is consistent with the input description or design in terms of geometry, which helps to avoid generating visually reasonable but geometrically incorrect architectural images. Moreover, by introducing the geometric information embedding vector E as an additional input condition of the latent diffusion model, the model can learn more information about the geometric structure of the building, which helps the model to better handle complex geometric shapes and layouts during the generation process. In practical applications, users may want to generate architectural images with specific geometric features. By adjusting the geometric information embedding vector E, users can customize the desired geometry and layout to generate architectural planning images that meet specific needs.
[0069] As a preferred implementation, the model training process described in step S4 includes the following steps:
[0070] Perform forward diffusion on the building images in the training samples, gradually add noise, and generate potential images with different noise levels to train the model to understand how to recover images from noise; use the Adam optimizer, and use momentum and weight decay techniques in the parameter update process to speed up convergence and improve model stability;
[0071] After multiple rounds of training, the architectural planning images are evaluated and the training is completed if they meet the requirements. The evaluation criteria include the structural accuracy, style consistency, high resolution and visual quality of the generated architectural planning images.
[0072] As mentioned above, through the process of forward diffusion and noise addition, the model can learn how to recover the key information of the image from the noise at a lower computational burden, which helps to reduce the computational cost of operating directly in the high-bit pixel space. The use of the Adam optimizer further improves the computational efficiency, allowing the model to complete training in a shorter time. In addition, the momentum and weight decay techniques in the Adam optimizer help enhance the stability and reliability of the model.
[0073] As a preferred embodiment, in the model training step, the use of depth-separable convolution includes a depth-wise convolution step and a point-wise convolution step, wherein the depth-wise convolution step applies a convolution operation to each input channel separately to capture spatial features, and the point-wise convolution step uses a 1x1 convolution kernel to linearly combine the output of the depth-wise convolution to integrate information from different channels. In this way, in the depth-wise convolution step, each channel is processed independently, avoiding repeated calculations between different channels in traditional convolutions; compared with traditional two-dimensional convolutions, depth-wise separable convolutions greatly reduce the amount of calculation. Moreover, in the point-by-point convolution step, the amount of calculation of the 1x1 convolution kernel is much smaller than that of the traditional convolution kernel, further reducing the computational cost. In addition, due to the reduction in the amount of calculation, the computational efficiency of the model during training and reasoning has been significantly improved. This enables the model to process input data faster, thereby shortening the training and reasoning time.
[0074] Embodiment 2
[0075] like Figure 2 As shown, a building planning image generation system based on a potential diffusion model adopts the image generation method described in Example 1, which includes:
[0076] Data preprocessing module 1, used to read and process architectural design image and urban planning image datasets;
[0077] Model optimization module 2, used to improve the structure of the potential diffusion model and optimize the input conditions;
[0078] Model training module 3, used to train the optimized latent diffusion model by combining building description text, building image and planning image;
[0079] The image generation module 4 is used to receive the building image to be generated and the planning image input after the model training is completed, and generate a high-resolution building image that meets the design specifications.
[0080] As mentioned above, by optimizing the structure and input conditions of the latent diffusion model, the speed and efficiency of image generation are significantly improved, enabling the system to generate a large number of high-quality building planning images in a short time to meet the needs of practical applications. The system can accurately capture the key information in the building description text and planning images, and generate high-resolution images that meet the design specifications.
[0081] In summary, the image generation method and system of this case improves the computational efficiency, reduces the computational cost and complexity, greatly reduces the number of model parameters in the computational process, speeds up the image generation speed, and meets the high efficiency requirements for the generation of architectural planning images in the real environment. The optimized latent diffusion model proposed in the present invention is used to generate architectural planning images, which can generate diversified image results according to actual needs, with rich details and high resolution. The architectural style embedding vector and text description embedding vector are introduced. The model can more accurately understand and generate images that meet the requirements, thereby ensuring that the generated images meet the functional layout and geometric structure specifications, avoiding the problem of geometric distortion, and the generated image results are more in line with actual requirements.
[0082] The above is a detailed introduction to a method and system for generating building planning images based on a potential diffusion model disclosed in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for generating architectural planning images based on a latent diffusion model, characterized in that: The following steps are involved: S1. Data preprocessing: obtaining a dataset A containing architectural design images and a dataset B containing urban planning images, and preprocessing the images in the dataset A and the dataset B; S2. Improve the structure of the latent diffusion model: Improve the network structure of the U-Net model. For the architectural design images and urban planning images in the data set input to the latent diffusion model, first compress them into the latent space for reverse diffusion to obtain the latent representation of the preliminary architectural design images and the latent representation of the preliminary urban planning images. Introducing channel-wise and spatial-wise attention mechanisms at each encoder stage of the U-Net model to enhance the relevance between text descriptions and architectural styles; S3. Optimize input conditions: Introduce the architectural style embedding vector C and combine it with the architectural description text embedding vector D and the geometric information embedding vector E as additional input conditions for the latent diffusion model. By adding "building functional area segmentation" and "geometric constraint" embedding, it ensures that the generated image contains complete information on style, functional layout and geometric structure. S4, model training: construct a training data set based on multiple training samples, and use the data set to train the improved model; wherein each training sample includes a potential representation of a preliminary building image, a corresponding text description, and a potential representation of a preliminary urban planning image; S5. Image generation: After the model training is completed, the latent representation of the target urban planning image, the architectural style embedding vector C, and the architectural description text embedding vector D are input into the optimized latent diffusion model to obtain a generated architectural planning image that meets the requirements.
2. The method for generating architectural planning images based on a potential diffusion model according to claim 1, characterized in that: The “S1, data preprocessing: obtaining a data set A containing architectural design images and a data set B containing urban planning images, and preprocessing the images in the data set A and the data set B” includes: For large-scale architectural design images / urban planning images, the large-scale images are divided into smaller areas for block training. In this case, overlapping parts must be introduced on the boundaries of each block to preserve the continuity and contextual information of the scene. Using a multi-scale strategy, we learn multi-resolution versions of images to enhance the training model’s ability to recognize large scenes. Among them, lower resolution images are used to train the model to learn the global structure, while higher resolution images are used to train the model to learn local details. Finally, the images will be uniformly normalized to ensure that image features at different scales can be consistently input into the training model for training.
3. The method for generating architectural planning images based on a potential diffusion model according to claim 1, characterized in that: In step S2, the architectural design images and urban planning images in the data set input into the latent diffusion model are compressed from high dimensions to low dimensions through a variational autoencoder VAE.
4. The method for generating architectural planning images based on a potential diffusion model according to claim 1, characterized in that: The architectural style embedding vector C is generated by the following steps: The architectural design image is encoded using CLIPImageEncoder to obtain the image embedding vector V0. After the embedding vector V0 is processed by the Transformer model, it is passed to different stages in the U-Net network multiple times through the cross-attention mechanism. At the same time, a layer-by-layer generation strategy is adopted. According to the complexity of the building, a phased generation strategy is adopted to first generate the basic framework of the building, and then generate the external details and internal functional areas; V0 is processed through a three-layer self-attention mechanism to extract architectural style and geometric features and generate an architectural style embedding vector C.
5. The method for generating architectural planning images based on a potential diffusion model according to claim 1, characterized in that: The architectural text embedding vector D is generated by the following steps: According to each architectural design image in dataset A, a descriptive text based on architectural style, structural characteristics, functional area layout and geometric information is generated. CLIPTokenizer and CLIPTextModel are used to encode the text description and generate the architectural text embedding vector D.
6. The method for generating architectural planning images based on a potential diffusion model according to claim 1, characterized in that: The model training process described in step S4 includes the following steps: Perform forward diffusion on the building images in the training samples, gradually add noise, and generate potential images with different noise levels to train the model to understand how to recover images from noise; use the Adam optimizer, and use momentum and weight decay techniques in the parameter update process to speed up convergence and improve model stability; After multiple rounds of training, the architectural planning images are evaluated and the training is completed if they meet the requirements. The evaluation criteria include the structural accuracy, style consistency, high resolution and visual quality of the generated architectural planning images.
7. The method for generating architectural planning images based on a potential diffusion model according to claim 1, characterized in that: In the model training step, the use of depth-wise separable convolution includes depth-wise convolution step and point-wise convolution step, where the depth-wise convolution step applies convolution operation to each input channel separately to capture spatial features, and the point-wise convolution step uses 1x1 convolution kernel to linearly combine the output of depth-wise convolution to integrate information from different channels.
8. A building planning image generation system based on a potential diffusion model, characterized in that: The image generation method according to any one of claims 1 to 7 comprises: A data preprocessing module (1), used for reading and processing architectural design image and urban planning image datasets; Model optimization module (2), used to improve the structure of the potential diffusion model and optimize input conditions; A model training module (3), used to train the optimized latent diffusion model by combining the building description text, the building image and the planning image; The image generation module (4) is used to receive the building image to be generated and the planning image input after the model training is completed, and generate a high-resolution building image that meets the design specifications.
Citation Information
Patent Citations
Method for generating continuous pictures by long text based on diffusion model
CN117521672A
Diffusion image generation method and system based on retrieval and segmentation enhancement
CN117725247A
Super-resolution on text-to-image synthesis with gans
US20240281924A1
Privacy-protecting distributed self-supervised learning
WO2024005840A1
Cited By
DiT city layout generation method based on multi-mode cooperative driving
CN120107491A
A multimodal collaboratively driven DiT urban layout generation method
CN120107491B
Multi-conditional constraint fusion generation method and system for planning intention graph generation
CN120745021A
A multi-condition constraint fusion generation method and system for planning intention graph generation
CN120745021B
Building image generation method and device, and medium
CN120807715A