Urban design general plan rendering model training method based on diffusion model
By constructing the element-level and expression-level label set of urban design overall floor plan, the diffusion model is fine-tuned and the benchmark LoRA model is trained to obtain, which solves the problems of cognitive deficiency and inaccurate rendering of existing large models in urban design overall floor plan drawing, and realizes efficient and flexible urban design overall floor plan rendering.
Patent Information
- Application Number
- CN202510540034.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
The existing general models lack the understanding of urban design floor plans in urban design overall plan drawing, cannot accurately render professional terms, spatial design elements under specific scales, and lack coordinated expression logic, making it difficult to meet the efficient and flexible rendering needs of planning and design overall plan drawings.
The element-level and expression-level label set of urban design overall floor plan is constructed, and the diffusion model is fine-tuned through the LoRA method, and the benchmark LoRA model is trained to obtain the benchmark LoRA model. The urban design overall floor plan can be rendered based on the input prompt words and the urban design overall floor plan line drawing.
The trained model can accurately identify and render the expression focus in the urban design general floor plan, establish clear color expression logic, adapt to the expression needs of different work stages, and improve the drawing efficiency and accuracy of the urban design general floor plan.
Smart Images

Figure CN120451358A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence generated content (AIGC), and relates to a training method for a rendering model, and specifically to a training method for a rendering model of an urban design master plan based on a diffusion model. Background Art
[0002] Drafting master plans for planning and design is a key task in urban and rural planning. In the new landscape of shifting from "incremental planning" to "stock planning," master plan development requires more efficient and flexible iteration to address the complex and changing needs of stock space planning. Traditional methods often rely on manual design, which is time-consuming, labor-intensive, and inefficient. They struggle to meet the growing demand for personalized spatial quality from planning subjects, as well as the need for efficient and flexible adjustments to planning and design solutions.
[0003] Currently, artificial intelligence-generated content (AIGC) is gaining increasing application. AIGC is a method in which creators use instructions (prompt words) to guide AI models to produce various content. Advances in AIGC technology and the emergence of large, general-purpose image generation models have enabled rapid image generation, facilitating rapid communication between planners and clients in urban renewal. These large-scale image generation models have learned from a vast amount of image-text data from the internet and possess general image generation knowledge. Furthermore, ControlNet can control the neural network structure of the diffusion model by adding additional conditions. Using conditional inputs in the text-to-image generation process, such as graffiti, edge mapping, segmentation mapping, and pose keypoints, can ensure that the generated image more closely resembles the input image, resulting in controllable image generation. This provides the prerequisite for AIGC to generate controllable images.
[0004] In AIGC technology, image generation using diffusion models has been applied in many fields. However, in urban planning, general-purpose large-scale models lack in-depth understanding of specific tasks and planning industry knowledge. When using prompt words to generate images in the application scenario of master plan drawing, the following problems may arise:
[0005] First, the existing large models lack the understanding of urban design plans, and generally generate perspective renderings or architectural design plans, which are far from urban design plans. Figure 10 An example of the generated results.
[0006] Secondly, the existing large-scale model lacks understanding of the professional terminology of planning floor plan rendering. For example, when the prompt word "point group" is entered, some clustered graphics will appear in the generated image, but they do not match the spatial texture. At the same time, the generated scene will also appear distorted, mixed, and unable to integrate into the original image. Figure 11 An example of the generated results.
[0007] Third, the existing large-scale model has a poor understanding of how to express spatial design elements at a specific scale. For example, when the prompt word "pedestrian street pavement" is input, the existing model cannot generate a pavement representation at a scale of 1:1000, but instead generates a realistic wooden pavement at a scale of 1:1. When the prompt word "river" is input, the model cannot accurately represent the river channel at a scale of 1:1000, but instead generates a water wave texture at a scale of 1:1. Figure 12 An example of the generated results.
[0008] Fourthly, the existing large-scale model lacks a comprehensive expression logic for the complex and diverse design elements in the planning and design master plan. For example, the generated boundaries and shadow relationships of the elements are wrong, the use of colors cannot distinguish the scenes, and the expression lacks focus. Figure 13 An example of the generated results.
[0009] In addition, a Chinese invention patent application with publication number CN119026220A discloses an AIGC-driven BIM rendering generation tool and method. This tool, based on Revit software, includes a BIM model pre-rendering plug-in loaded into Revit software and AIGC-based BIM rendering generation software. The BIM model pre-rendering plug-in is used to control the display or hiding of various objects in each building view and generate model line drawings; the BIM rendering generation software includes a categorized and organized library of professional domain prompt words. By importing model line drawings and entering corresponding prompt words, controllable rendering renderings are output. This method, based on AIGC technology, utilizes the BIM model to generate renderings with one click, lowering the barrier to use and improving work efficiency. However, this invention is targeted at the architectural field, where the design objects differ significantly from planning and design. Furthermore, the BIM rendering generation is a three-dimensional rendering, and it is not capable of rendering and coloring plan views.
[0010] The Chinese invention patent application with publication number CN118570567A discloses a method and system for generating planning intention maps based on an image generation model. The method comprises: obtaining feature labels and sample images, preprocessing the sample images to form a sample library; adjusting and acceptance testing the preset basic model through a diffusion model; adjusting the standard CheckPoint model through the LoRA method to obtain a LoRA model; and generating images through an image generation interface. This method summarizes the entire process of generating a planning intention map and can efficiently generate planning intention maps. However, this method lacks an accurate description of the screening conditions for sample images; and lacks the organization of professional knowledge and the construction of a label set in the labeling stage of the sample library. Furthermore, this method generates real-life renderings based on real-life photos, lacks the ability to render floor plans, and cannot be applied to the rendering of planning master plans.
[0011] In summary, the existing general large models cannot be used for drawing urban design master plans. In order to use large models to generate urban design master plans and improve the efficiency of master plan drawing, a new model training method for this application is needed. Summary of the Invention
[0012] In order to solve the above problems, a method for training an urban design master plan rendering model based on a diffusion model is provided. The principle of drawing an urban design master plan is based on a drawing expression strategy under comprehensive consideration of design elements, design intentions, and work depth, rather than the simple "element recognition-generation" logic of the original large model. Therefore, the existing large model cannot be used directly to generate an urban design master plan. The planner's acquisition of the ability to refine drawing expression strategies is based on a large amount of reading and expression case learning, which is similar to the mechanism of large model learning and fine-tuning. Therefore, the method of the present invention starts from the principle of drawing an urban design master plan, combines the above mechanism, and designs a large model training (fine-tuning) method for the application scenario of drawing an urban design master plan. Specifically, the present invention adopts the following technical solutions:
[0013] The present invention provides a method for training an urban design master plan rendering model based on a diffusion model, which has the following technical features: step S1, constructing an element-level label set of the urban design master plan; step S2, constructing an expression-level label set of the urban design master plan; step S3, performing targeted collection of the urban design master plan based on the element-level label set and the expression-level label set, and annotating it according to the element-level label set and the expression-level label set to form a sample library; step S4, fine-tuning the diffusion model through the LoRA method based on the sample library to obtain a baseline LoRA model, wherein the baseline LoRA model is used to render the urban design master plan according to the input prompt words and the urban design master plan line draft, wherein the element-level label set corresponds to the main functional type, drawing structure and design element details of the urban design master plan, and the expression-level label set corresponds to the working stage, drawing style and color expression of the urban design master plan.
[0014] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have such technical features, wherein step S1 includes the following sub-steps: step S1-1, based on urban design and planning professional knowledge, the main functional types involved in the urban design master plan are split into multiple functional type labels; step S1-2, based on urban planning professional knowledge and urban design experience, sort out and list the drawing structure characteristics of the urban design master plan of different functional types, and refine and split the drawing structure of the urban design master plan according to the drawing structure characteristics to form drawing structure labels; step S1-3, based on urban design experience and the goal of drawing the urban design master plan, further sort out and list the detailed characteristics of various elements involved in the master plan, and refine and split the element details that need to be expressed in the urban design master plan according to the element detail characteristics to form element detail labels, and the element-level label set includes the functional type label, the drawing structure label and the element detail label.
[0015] The urban design master plan rendering model training method based on the diffusion model provided by the present invention can also have the following technical features, wherein the functional type labels include: commercial area, educational park, transportation hub area, residential area, park square, industrial park, historical style area; the drawing structure labels include: single building form, building layout, spatial structure; the element detail labels include: design elements and surrounding elements.
[0016] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have such technical features, wherein step S2 includes the following sub-steps: step S2-1, dividing different work stages and setting corresponding work stage labels according to the planning and design business process of the urban design master plan; step S2-2, for the said work stages, summarizing and sorting out the overall drawing style of the urban design master plan according to the expression requirements and expression focus of each said work stage, and forming a drawing style label; step S2-3, for the said work stages, summarizing and sorting out the color expression of each design element in the urban design master plan according to the expression requirements and expression focus of each said work stage, and forming an element expression label, the expression-level label set includes the work stage label, the drawing style label and the element expression label.
[0017] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have such technical features, wherein the working stages include: conceptual design stage, scheme deepening stage, the drawing style labels include: bright colors, soft colors, gray tones, dark shadows, light shadows, and the element expression labels include: a combination of multiple architectural and environmental elements and multiple colors.
[0018] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have the following technical features, wherein, after step S2, the element-level label set and the expression-level label set are integrated into an element-level-expression-level label set, and step S3 includes the following sub-steps: step S3-1, based on the element-level-expression-level label set, directionally collect multiple urban design master plan images as sample images; step S3-2, preprocess the collected sample images; step S3-3, judge whether the preprocessed sample images meet the requirements of the design scale, and whether they meet the requirements of the drawing structure, design elements and color expression in different working stages, and exclude the sample images if the judgment is no; step S3-4, label the screened sample images using the element-level-expression-level label set to obtain a preliminary sample library; step S3-5, perform a sample library index test, collect the number of times each label appears in the preliminary sample library, and judge whether there is a label whose appearance frequency is lower than a predetermined threshold. If the judgment is no, generate the sample library through the test.
[0019] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have the following technical features, wherein the element-level-expression-level label set includes two levels and four categories of labels, the two levels are the function type label at the overall element level and the work stage label at the overall expression level, and the four categories are the drawing structure label and the element detail label at the element level, and the drawing style label and the element expression label at the expression level. In step S3-4, the function type label at the overall element level and the work stage label at the overall expression level are required options for each of the sample images. In step S3-4, it is determined whether 50% to 70% of the plots in the sample image are of a certain land use function type. If the judgment is yes, the sample image is marked with the corresponding function type label. If the judgment is no, the sample image is excluded. In step S3-5, the predetermined threshold is 10%. If the judgment is yes, the corresponding sample images are collected to perform targeted supplementation on the labels whose occurrence frequency is lower than the predetermined threshold.
[0020] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have such technical features, wherein step S4 includes the following sub-steps: step S4-1, selecting a CheckPoint model, and fine-tuning the CheckPoint model based on the sample library using the LoRA method to obtain multiple alternative LoRA models; step S4-2, selecting several alternative LoRA models according to the training log, and performing acceptance testing and weighted screen testing on the selected alternative LoRA models. When the test passes, the baseline LoRA model is obtained. When the test fails, the sample library is used again to fine-tune the alternative LoRA model.
[0021] The urban design master plan rendering model training method based on the diffusion model provided by the present invention may also have such technical features, wherein, in step S4-1, the CheckPoint model is a large model for image generation based on the diffusion model, and in step S4-2, the prompt word and the urban design master plan line draft are input into the alternative LoRA model for testing, and the test is judged to be passed if the following conditions are met: when the function type label and the work stage label in the prompt word are changed, the drawing generated by the alternative LoRA model can change and present the function type difference and / or work stage difference; when the drawing structure label in the prompt word is adjusted, the corresponding building outline in the drawing generated by the alternative LoRA model is rendered; when the drawing element label in the prompt word is adjusted, the corresponding drawing element in the drawing generated by the alternative LoRA model is rendered; when the expression level label in the prompt word is changed, the drawing generated by the alternative LoRA model is the corresponding drawing style; and in the drawing generated by the alternative LoRA model, the shadow relationship, building outline, road continuity, and water body boundary are all expressed accurately.
[0022] Functions and effects of the invention
[0023] Compared with conventional large-scale model training methods in the prior art, the diffusion-model-based urban design master plan rendering model training method provided by the present invention has the following advantages: Because a feature-level-expression-level label set is constructed, which includes feature-level labels corresponding to the main functional types, drawing structure, and design element details of the master plan, as well as expression-level labels corresponding to the working stage, drawing style, and color expression of the master plan, and a sample library annotated with this label set is used to fine-tune the diffusion model to obtain a trained baseline LoRA model for rendering urban design master plans, the method has the following advantages:
[0024] First, the trained model can understand the professional terminology used in urban design master plan drawings to express functional types, drawing styles, and element details. This allows the model to accurately identify and render the key points of urban design space concepts based on existing design line drafts.
[0025] Second, the trained model can accurately identify the color effects of the complex and diverse urban planning and design master plan at specific work stages, and establish a clear and reasonable color expression logic for that work stage;
[0026] Third, the trained model can combine the expression requirements of the planning and design master plan at different work stages and use different expression strategies to generate images at different drawing expression depths. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 1 is a flow chart of a method for training an urban design master plan rendering model based on a diffusion model in an embodiment of the present invention;
[0028] Figure 2 is a flow chart of a method for training an urban design master plan rendering model based on a diffusion model in an embodiment of the present invention;
[0029] Figure 3 This is a flowchart of constructing element-level labels for an urban design master plan in an embodiment of the present invention;
[0030] Figure 4 This is an example diagram of function type labels and corresponding drawings in an embodiment of the present invention;
[0031] Figure 5 This is a flowchart of constructing an urban design master plan expression-level label in an embodiment of the present invention;
[0032] Figure 6 is an example diagram of two working stages and corresponding drawings in an embodiment of the present invention;
[0033] Figure 7 This is a flow chart for obtaining a sample library of urban design master plan drawings in an embodiment of the present invention;
[0034] Figure 8 is a schematic diagram of function type annotation in an embodiment of the present invention;
[0035] Figure 9 This is a flowchart of the LoRA model training in an embodiment of the present invention;
[0036] Figure 10 This is an example of direct generation using a large model in existing technology Figure 1 ;
[0037] Figure 11 This is an example of direct generation using a large model in existing technology Figure 2 ;
[0038] Figure 12 This is an example of direct generation using a large model in existing technology Figure 3 ;
[0039] Figure 13 This is an example of direct generation using a large model in existing technology Figure 4 . DETAILED DESCRIPTION
[0040] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following is a detailed description of the urban design master plan rendering model training method based on the diffusion model of the present invention in combination with embodiments and drawings.
[0041] <Example>
[0042] Figure 1 : is a flow chart of the urban design master plan rendering model training method based on the diffusion model in this embodiment, Figure 2 4 is a flow chart of the urban design master plan rendering model training method based on the diffusion model in this embodiment.
[0043] like Figure 1 and Figure 2 As shown, the method of this embodiment includes the following steps:
[0044] Step S1, constructing a feature-level label set of the urban design master plan;
[0045] Step S2, constructing an expression-level label set of the urban design master plan;
[0046] Step S3: performing targeted collection of the urban design master plan based on the element-level tag set and the expression-level tag set, and annotating the collected urban design master plan according to the element-level tag set and the expression-level tag set to form a sample library;
[0047] Step S4: fine-tune the diffusion model using the LoRA method based on the sample library to obtain a baseline LoRA model, which can be used to render the urban design master plan according to the input prompt words and the urban design master plan line draft.
[0048] The above steps will be described in detail below.
[0049] Step S1: constructing element-level labels for the urban design master plan.
[0050] Figure 3 This is a flowchart of constructing element-level labels for the urban design master plan in this embodiment.
[0051] like Figure 3 As shown, step S1 specifically includes the following sub-steps:
[0052] Step S1-1: Based on urban design and planning expertise, the main functional types involved in the urban design master plan are divided into multiple functional type labels.
[0053] Specifically, based on planning expertise, interpret the main land use function types within the planning scope of the master plan. The floor plan layout and presentation style of each land use function type should vary significantly. In this embodiment, the function type labels include seven types: commercial area, education park, transportation hub area, residential area, park square, industrial park, and historical area.
[0054] Figure 4 Schematic diagram of the function type labels and corresponding drawings in this embodiment.
[0055] like Figure 4 As shown in the urban design master plan, most commercial areas feature single-family buildings, often with glass skylights. Their layout is primarily a point cluster structure, with axes and plazas serving as key design elements. Most educational parks are dominated by circular, single-family buildings, with glass skylights, sloping roofs, and playgrounds. Their layouts are primarily point cluster and enclosed, with distinct axes. Most transportation hubs are dominated by irregularly curved buildings, accompanied by railroad tracks. Their layouts feature prominent axes and plazas. Most residential areas feature sloping roofs. Their layouts are primarily a matrix and point cluster design, with pedestrian walkways emphasized. Most parks and plazas often feature waterfront spaces and green cores. Most industrial parks are primarily factory buildings with sloping roofs. Their layouts are primarily a matrix design. Most historical areas feature sloping roofs, with a matrix design predominating.
[0056] In step S1-2, based on urban planning expertise and urban design experience, the drawing structure characteristics of urban design master plans of different functional types are sorted out and listed, and the drawing structure of the urban design master plan is refined and split according to the drawing structure characteristics to form drawing structure labels.
[0057] In this embodiment, the drawing structure features include multiple single building forms, multiple building layouts, and multiple spatial structures, and the drawing structure tags include corresponding tags.
[0058] Among them, single building forms refer to building forms with iconic characteristics, including irregular curved buildings, circular buildings, single-family buildings, glass skylight roofs, sloping roofs, and factory buildings.
[0059] Architectural layout mainly refers to the combination form between building units, including point group type, matrix type, enclosure type, etc.
[0060] Spatial structure refers to the most iconic spatial features of the area represented by the plan, including: axis, waterfront space, green heart, etc.
[0061] In step S1-3, based on urban design experience and the goal of drawing the urban design master plan, the detailed characteristics of various elements involved in the master plan are further sorted out and listed, and the element details that need to be expressed in the urban design master plan are refined and split according to the detailed characteristics of the elements to form element detail labels.
[0062] In this embodiment, the element detail features include features of design elements and surrounding elements, and the element detail tags include corresponding tags.
[0063] Among them, design elements refer to the spatial elements that are mainly operated and designed within the planning and design red line, including parks, squares, sidewalks, winding paths, pedestrian walkways, ports, playgrounds, commercial streets, bridges, railways, parking lots, overpasses, sky corridors, woods, large lawns, etc.
[0064] Surrounding elements refer to spatial elements outside the planning and design red line but that require auxiliary expression, mainly including the surrounding areas of gray-tone buildings, surrounding areas of large water areas, surrounding areas of linear water belts, mountains, plains, etc.
[0065] Step S1-4: for each design element, determine whether the design element needs to be emphasized. If the determination is yes, retain the corresponding detail element label; if the determination is no, exclude the corresponding detail element label.
[0066] In an alternative solution, step S1 can also be implemented using a computer algorithm combined with manual review. For example, in step S1-1, some main functional types can be summarized based on planning and design professional knowledge, combined with an example planning and design master plan, and input into an existing large-scale visual-language model in the form of few-shot prompting. Then, more main functional types can be obtained through the large-scale visual-language model, and then reviewed and revised by planning designers with professional knowledge, thereby obtaining multiple functional type labels. The same applies to steps S1-2 and S1-3.
[0067] Step S2: construct an expression-level label set for the urban design master plan.
[0068] Figure 5 This is a flowchart of constructing an urban design master plan expression-level label in this embodiment.
[0069] like Figure 5 As shown, step S2 specifically includes the following sub-steps:
[0070] Step S2-1, according to the planning and design business process of the urban design master plan, different work stages are divided and corresponding work stage labels are set. The work stages include the conceptual design stage and the scheme deepening stage.
[0071] Among them, since the focus and style of drawing expression in the urban design master plan in different work stages are quite different, it is necessary to divide the work into two different stages according to the expression of planning and design, and perform different processing in the two stages respectively.
[0072] Figure 6 Schematic diagram of two working stages and corresponding drawings in this embodiment.
[0073] like Figure 6 As shown in the figure, during the conceptual design phase, the focus of the drawing is on the spatial system, key planning contents, and building volume. During the scheme development phase, the focus is on site design, building form control, and crowd flow.
[0074] Step S2-2: For the two working stages, the overall drawing style of the urban design master plan is summarized and sorted out according to the expression requirements and expression focus of each working stage to form a drawing style label.
[0075] Among them, the drawing style refers to the overall color matching and expression style of the urban design master plan, including: bright colors, soft colors, gray tones, dark shadows, and light shadows.
[0076] Step S2-3: For the two working stages, the color expressions of various design elements in the urban design master plan are summarized and sorted out according to the expression requirements and expression priorities of each working stage to form element expression labels.
[0077] Among them, element expression refers to the color style of each element that needs to be expressed in the drawing, that is, various combinations of different elements and different colors, such as: white roof, warm roof, green roof, blue water surface, green water surface, light water surface, gray road, dark road, white road, yellow trail, orange trail, red trail, brown trail, pink trail, etc.
[0078] Step S2-4: for the color expression of each design element, determine whether the color expression of the design element needs to be emphasized. If the judgment is yes, retain the corresponding element expression label; if the judgment is no, exclude the corresponding element expression label.
[0079] In an alternative solution, step S2 can also be implemented using a computer algorithm combined with manual review. For example, in step S2-2, some drawing styles can be summarized based on planning and design expertise, combined with an example planning and design master plan, and input into an existing large-scale visual-language model using a few-shot prompting method. The large-scale visual-language model can then be used to obtain more drawing styles, which can then be reviewed and revised by planning designers with professional knowledge, thereby obtaining multiple drawing style labels. The same applies to step S2-3.
[0080] Step S3: Directedly collect the urban design master plan based on the element-level tag set and the expression-level tag set, and annotate the collected urban design master plan according to the element-level tag set and the expression-level tag set to form a sample library.
[0081] Among them, the element-level label set obtained by step S1 and the expression-level label set obtained by step S2 are combined to obtain the element-level-expression-level label set, which contains two levels and four categories of labels, as shown in Table 1 below, that is, the function type label leads to the element-level label, and the work stage label leads to the expression-level label.
[0082] Table 1 Summary of feature-level and expression-level label sets
[0083]
[0084]
[0085] Then, the feature-level-expression-level label set can be used for targeted collection and annotation.
[0086] Figure 7 This is a flow chart for obtaining a sample library of urban design master plan drawings in this embodiment.
[0087] like Figure 7 As shown, step S3 specifically includes the following sub-steps:
[0088] In step S3-1, based on the element-level-expression-level label set, the urban design master plan is widely and directionally collected as a sample image.
[0089] Among them, based on the feature-level and expression-level label sets, according to the main functional types and design elements, and the requirements of the surface structure and element expression at different work stages, a wide range of urban design master plan images can be collected as sample images with a scale of 20 hectares to 100 hectares as the benchmark. This can reduce the workload in subsequent steps.
[0090] Step S3-2: pre-process the collected sample images.
[0091] The preprocessing includes, for example, removing text from the sample image, adjusting its angle, cropping its size, etc.
[0092] Step S3-3, judging whether the pre-processed sample image meets the requirements of the design scale, and whether it meets the requirements of the drawing structure, design elements and color expression in different working stages, and excluding the sample image if the judgment is no.
[0093] like Figure 7As shown, first determine whether the sample image is a design scale of 20 hectares to 100 hectares. If the judgment is no, exclude the sample image. If the judgment is yes, further determine whether the sample image meets the drawing structure, design elements and color expression requirements of the corresponding working stage. If the judgment is no, exclude the sample image.
[0094] Step S3-4: annotate the filtered sample images using the element-level-expression-level label set to obtain a preliminary sample library.
[0095] like Figure 7 As shown, in step S3-4, the functional type label is mandatory in the feature-level labeling. The drawing structure label and drawing element label at the feature level are selected based on the actual drawing conditions of the sample image. At least one type is selected, and a combination of both types can be used. For the functional type label, a determination is made as to whether 50% to 70% of the plots in the sample image are of a certain land use functional type. If so, the sample image is labeled with that functional type label. If not, the sample image is not labeled and excluded.
[0096] Figure 8 It is a schematic diagram of the function type marking in this embodiment.
[0097] like Figure 8 As shown in the figure, approximately 50% of the land parcels in the sample image on the left meet the functional type of transportation hub, which meets the threshold. Therefore, the functional type label of this sample image is set to transportation hub. Similarly, approximately 70% of the land parcels in the sample image on the right meet the functional type of commercial area, which also meets the threshold. Therefore, the functional type label of this sample image is set to commercial area.
[0098] In the expression-level tags, the work phase tag is mandatory. The drawing style tags and element expression tags under the expression level are selected based on the actual drawing of the sample image. At least one type must be selected, and a combination of two types can be used. For the work phase tag, determine whether the sample image only has road red lines, building outlines, blue lines, and soft and hard ground demarcations. If the judgment is yes, the sample image is marked as the conceptual design stage. If not, the sample image is marked as the solution development stage. This ensures higher image accuracy in the corresponding work phase.
[0099] Step S3-5, perform sample library index test, collect the number of times each label appears in the preliminary sample library, and determine whether there is a label with an appearance frequency of less than 10%. If the judgment is yes, collect corresponding sample images to carry out targeted supplementation of labels with an appearance frequency of less than 10%. The newly collected sample images can also be processed according to the above steps; if the judgment is no, the test is passed and the sample library is generated.
[0100] If the frequency of a label is less than 10%, that is, the number of samples for that label is too small, making it difficult for the model to effectively understand its content, and thus it is considered to have failed the test. If all labels are above 10%, the test is passed.
[0101] Step S4: fine-tune the diffusion model using the LoRA method based on the sample library to obtain a baseline LoRA model, which can be used to render the urban design master plan according to the input prompt words and the urban design master plan line draft.
[0102] Figure 9 This is a flowchart of the LoRA model training in this embodiment.
[0103] like Figure 9 As shown, step S4 specifically includes the following sub-steps:
[0104] Step S4-1: Select a suitable CheckPoint model, and fine-tune the standard CheckPoint model using the LoRA method based on the sample library to obtain multiple candidate LoRA models.
[0105] Among them, the CheckPoint model is a diffusion model that contains all the content required to generate images. For example, it can generate large models for images based on diffusion models such as Stable Diffusion 1.5, Stable Diffusion XL, and urban design large models. It uses the data with the above two-level four-category labels in the sample library and fine-tunes it using the LoRA method (low-rank adaptation method).
[0106] In step S4-2, several candidate LoRA models are selected according to the training log, and acceptance test and weight screen test are performed on the selected candidate LoRA models. If the test is passed, the benchmark LoRA model is obtained. If the test is not passed, the method returns to step S4-1 and fine-tunes the candidate LoRA model using the sample library again.
[0107] Among them, the alternative LoRA model can be tested for acceptance and weighted screen by pre-set chart scripts. The prompt words and the line drawing of the urban design master plan are input into the alternative LoRA model for testing. If the following five conditions are met at the same time, it is judged to have passed the test: (1) When the two mandatory items of the functional type label at the element level and the work stage label at the expression level in the prompt words are changed, the drawing generated by the alternative LoRA model can produce obvious changes and show obvious functional type differences and work stage differences; (2) When the drawing structure label at the element level in the prompt words is adjusted, the corresponding building outline in the drawing generated by the alternative LoRA model is rendered, that is, the model can accurately identify the corresponding building outline matching the line drawing according to the prompt words ; (3) When the drawing element labels at the feature level in the prompt word are adjusted, the corresponding drawing elements in the drawing generated by the alternative LoRA model are rendered, that is, the model can accurately identify the corresponding elements in the line drawing according to the prompt word, such as landscape design, pedestrian bridge outline, etc.; (4) By changing the expression level labels in the prompt word, the drawing generated by the alternative LoRA model is the corresponding drawing style, that is, the model can accurately index the target drawing style according to the prompt word to obtain the ideal expression effect; (5) In the drawing generated by the alternative LoRA model, the shadow relationship, building outline, road continuity, and water body boundary are all accurately expressed.
[0108] After obtaining the baseline LoRA model, it can be used to render the urban design master plan. First, the line drawing of the planning and design master plan is input into the model, and spatial constraints are performed through various ControlNet methods; secondly, appropriate prompt words are selected according to the feature-level-expression-level label set (two-level four-category label set) to input the model. In the feature-level label, the function type label is required, and the drawing structure label and design element label can be selected according to the actual situation of the line drawing; in the expression-level label, the work stage label is required, and the drawing style label and element expression label can be selected according to the rendering requirements. Finally, the model completes the rendering of the urban design master plan and outputs the urban design master plan.
[0109] Functions and Effects of the Embodiments
[0110] The diffusion model-based urban design master plan rendering model training method provided in this embodiment, compared with the conventional large model training method in the prior art, constructs an element-level-expression-level label set, which includes element-level labels corresponding to the main functional types, drawing structure, and design element details of the master plan, as well as expression-level labels corresponding to the working stage, drawing style, and color expression of the master plan. The sample library annotated with this label set is used to perform fine-tuning training of the LoRA model to obtain a trained baseline LoRA model for rendering the urban design master plan. Therefore, it has the following advantages:
[0111] First, the trained model can understand the professional terminology used in urban design master plan drawings to express functional types, drawing styles, and element details. This allows the model to accurately identify and render the key points of urban design space concepts based on existing design line drafts.
[0112] Second, the trained model can accurately identify the color effects of the complex and diverse urban planning and design master plan at specific work stages, and establish a clear and reasonable color expression logic for that work stage;
[0113] Third, the trained model can combine the expression requirements of the planning and design master plan at different work stages and use different expression strategies to generate images at different drawing expression depths.
[0114] In this embodiment, sample images containing 50% to 70% of the land parcels in the map are labeled with the corresponding functional type. This significantly differentiates sample images with different functional type labels, allowing the trained model to accurately identify each functional type. Furthermore, when the frequency of a particular label falls below 10%, the label is re-collected and supplemented with targeted data. This ensures that each label has sufficient samples, preventing the trained model from failing to effectively understand the corresponding content due to insufficient samples for a particular label.
[0115] Furthermore, in LoRA model training, five judgment conditions are set. Only when these conditions are met at the same time will it be judged to have passed the test and obtained a trained benchmark model. Therefore, the generation effect of the benchmark model can be ensured. And because the judgment conditions are very clear, automatic testing can be achieved through scripts, thereby improving the efficiency of model training.
[0116] The above embodiments are merely illustrative of specific implementations of the present invention, and the present invention is not limited to the scope of the description of the above embodiments. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention as claimed. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for training an urban design master plan rendering model based on a diffusion model, characterized in that: The following steps are involved: Step S1, constructing a feature-level label set of the urban design master plan; Step S2, constructing an expression-level label set of the urban design master plan; Step S3, performing targeted collection of the urban design master plan based on the element-level tag set and the expression-level tag set, and annotating the urban design master plan according to the element-level tag set and the expression-level tag set to form a sample library; Step S4: fine-tuning the diffusion model using the LoRA method based on the sample library to obtain a baseline LoRA model, wherein the baseline LoRA model is used to render the urban design master plan according to the input prompt words and the urban design master plan line draft. The element-level label set corresponds to the main functional types, drawing structure and design element details of the urban design master plan. The expression-level tag set corresponds to the working stage, drawing style and color expression of the urban design master plan drawing.
2. The method for training an urban design master plan rendering model based on a diffusion model according to claim 1, characterized in that: in, Step S1 includes the following sub-steps: Step S1-1, based on urban design and planning expertise, split the main functional types involved in the urban design master plan into multiple functional type labels; Step S1-2: Based on urban planning expertise and urban design experience, the drawing structure characteristics of urban design master plans of different functional types are sorted out and listed, and the drawing structure of the urban design master plan is refined and split according to the drawing structure characteristics to form drawing structure labels; Step S1-3: Based on urban design experience and the goal of drawing the urban design master plan, further sort out and list the detailed characteristics of various elements involved in the master plan, and then refine and split the element details that need to be expressed in the urban design master plan according to the characteristics of the element details to form element detail labels. The element-level label set includes the function type label, the drawing structure label, and the element detail label.
3. The urban design master plan rendering model training method based on the diffusion model according to claim 2 is characterized by: in, The functional type labels include: commercial area, educational park, transportation hub area, residential area, park square, industrial park, historical area, The drawing structure tags include: single building form, building layout, spatial structure, The element detail tags include: design elements and surrounding elements.
4. The urban design master plan rendering model training method based on the diffusion model according to claim 1, Its characteristics are: Wherein, step S2 includes the following sub-steps: Step S2-1, dividing different work stages and setting corresponding work stage labels according to the planning and design business process of the urban design master plan; Step S2-2: for the two working stages, summarizing and sorting out the overall drawing style of the urban design master plan according to the expression requirements and expression focus of each working stage to form a drawing style label; Step S2-3: For the two working stages, the color expressions of each design element in the urban design master plan are summarized and sorted out according to the expression requirements and expression focus of each working stage to form element expression labels. The expression-level tag set includes the work stage tag, the drawing style tag, and the element expression tag.
5. The urban design master plan rendering model training method based on the diffusion model according to claim 4 is characterized by: in, The work stage labels include: conceptual design stage, scheme deepening stage, The image style tags include: bright colors, soft colors, gray tones, dark shadows, and light shadows. The element expression label includes: a combination of multiple architectural and environmental elements and multiple colors.
6. The urban design master plan rendering model training method based on the diffusion model according to claim 1, Its characteristics are: After step S2, the element-level label set and the expression-level label set are integrated into an element-level-expression-level label set. Step S3 includes the following sub-steps: Step S3-1, based on the element-level-expression-level label set, directionally collect multiple urban design master plan drawings as sample images; Step S3-2, pre-processing the collected sample images; Step S3-3, determining whether the pre-processed sample image meets the design scale requirements, and whether it meets the requirements of the drawing structure, design elements and color expression in different working stages, and excluding the sample image if the determination is negative; Step S3-4, labeling the filtered sample images using the element-level-expression-level label set, thereby obtaining a preliminary sample library; Step S3-5, performing a sample library index test, collecting the number of times each tag appears in the preliminary sample library, and determining whether any tag has an appearance frequency lower than a predetermined threshold. If the judgment is no, the sample library is generated through the test.
7. The method for training an urban design master plan rendering model based on a diffusion model according to claim 6, characterized in that: in, The element-level-expression-level label set includes two levels and four categories of labels. The two levels are the function type label at the general element level and the work stage label at the general expression level. The four categories are the drawing structure label and element detail label at the element level, and the drawing style label and element expression label at the expression level. In step S3-4, the function type label at the general element level and the work stage label at the general expression level are required items for each sample image. In step S3-4, it is determined whether 50% to 70% of the plots in the sample image are of a certain land use function type. If the determination is yes, the sample image is labeled with the corresponding function type label; if the determination is no, the sample image is excluded. In step S3-5, the predetermined threshold is 10%. When the judgment is yes, corresponding sample images are collected to perform targeted supplementation on the tags whose occurrence frequency is lower than the predetermined threshold.
8. The urban design master plan rendering model training method based on the diffusion model according to claim 7 is characterized by: in, Step S4 includes the following sub-steps: Step S4-1, selecting a CheckPoint model, and fine-tuning the CheckPoint model using the LoRA method based on the sample library to obtain multiple candidate LoRA models; Step S4-2, select several alternative LoRA models according to the training log, and perform acceptance test and weight screen test on the selected alternative LoRA models. When the test is passed, the benchmark LoRA model is obtained. When the test fails, the sample library is used again to fine-tune the alternative LoRA model.
9. The urban design master plan rendering model training method based on the diffusion model according to claim 8, Its characteristics are: In step S4-1, the CheckPoint model is a large image generation model based on the diffusion model. In step S4-2, the prompt word and the urban design master plan line drawing are input into the candidate LoRA model for testing. If the following conditions are met, the test is considered to have passed: When the function type label and the working stage label in the prompt word are changed, the drawing generated by the alternative LoRA model can change and show the difference in function type and / or working stage; When the drawing structure label in the prompt word is adjusted, the corresponding building outline in the drawing generated by the alternative LoRA model is rendered; When the drawing element label in the prompt word is adjusted, the corresponding drawing element in the drawing generated by the alternative LoRA model is rendered; Changing the label of the expression level in the prompt word so that the drawing generated by the alternative LoRA model has a corresponding drawing style; and In the drawings generated by the alternative LoRA model, shadow relationships, building outlines, road continuity, and water body boundaries are accurately expressed.
Citation Information
Patent Citations
Planning intention graph generation method and system based on image generation model
CN118570567A
AIGC-driven BIM effect picture generation tool and method
CN119026220A