Area renovation design method, electronic device, and storage medium
Patent Information
- Application Number
- CN202610627280.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-08
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-05-08
AI Technical Summary
为提升区域改造设计效率,相关技术中已出现采用人工智能技术生成区域改造设计图的方案;然而,本申请发明人经过研究发现,相关技术方案大多仅聚焦于视觉效果生成或单一模态交互,未能充分结合区域实际现状、居民实际需求等多维度关键信息,导致生成的改造设计图与当地实际需求匹配度较低,难以满足实际改造场景的应用要求,最终造成设计方案落地困难、实施效果不佳的问题
[0007]本申请中,第一方面,通过收集待改造区域居民选取的第一意向设计图及对应的第一意向描述信息,并通过预设提示模块根据第一意向描述信息生成第一居民偏好信息,使得所生成的第一改造设计图更加符合待改造区域的居民偏好特征;第二方面,通过利用基于第一意向设计图和要素描述文本训练得到的预设生成模块,生成待改造区域的第一改造设计图,由于要素描述文本基于第一意向设计图和第一意向描述信息生成,而第一意向描述信息又反映出居民偏好特征,从而使得预设生成模块生成的第一改造设计图更加符合居民偏好。由此,通过预设生成模块,根据第一居民偏好信息、第一空间约束信息和第一区域图像,可以结合多维度关键信息生成待改造区域的第一改造设计图,提高生成的设计图与当地实际需求的匹配度,降低设计方案落地难度,确保设计图能够满足实际改造场景的应用要求。
Smart Images

Figure CN122528614B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart city and urban-rural renewal technology, specifically to a regional redevelopment design method, electronic equipment, and computer-readable storage medium. Background Technology
[0002] With continuous social progress and accelerated urbanization, the demand for regional redevelopment (such as urban village redevelopment) is increasing, placing higher demands on the scientific, practical, and precise nature of redevelopment designs. To improve the efficiency of regional redevelopment design, some technologies have emerged that use artificial intelligence to generate redevelopment design drawings. However, the inventors of this application have found that most of these related technical solutions focus only on visual effect generation or single-modal interaction, failing to fully integrate multi-dimensional key information such as the actual situation of the region and the actual needs of residents. This results in a low degree of matching between the generated redevelopment design drawings and local needs, making it difficult to meet the application requirements of actual redevelopment scenarios, ultimately leading to difficulties in implementing the design scheme and poor implementation results. Summary of the Invention
[0003] This application provides a regional renovation design method, electronic device, and computer-readable storage medium, which can generate a first renovation design drawing of the area to be renovated by combining multi-dimensional key information, improve the matching degree between the generated design drawing and the actual local needs, reduce the difficulty of implementing the design scheme, and ensure that the design drawing can meet the application requirements of the actual renovation scenario.
[0004] In a first aspect, this application provides a regional redevelopment design method, the method comprising: Based on a preset image library, the first intended design drawing selected by residents of the area to be renovated and the first intended description information of the first intended design drawing are determined, wherein the preset image library includes multiple design drawings; Obtain the first region image and the first depth image of the area to be modified; Based on the first intention description information, the first resident preference information of the area to be renovated is determined by the preset prompt module. The first spatial constraint information is determined by the preset spatial constraint module based on the first semantic segmentation map of the first depth image and the first region image. The preset generation module generates a first renovation design drawing of the area to be renovated based on the first resident preference information, the first spatial constraint information, and the first area image. The preset generation module is trained based on the first intention design drawing and the element description text of the first intention design drawing. The element description text is generated based on a multimodal large language model, the first intention design drawing, and the first intention description information.
[0005] Secondly, this application also provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes any of the region modification design methods provided in this application when it calls the computer program in the memory.
[0006] Thirdly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the aforementioned regional modification design method.
[0007] In this application, firstly, by collecting the first intended design drawings and corresponding first intended description information selected by residents of the area to be renovated, and generating first resident preference information based on the first intended description information through a preset prompt module, the generated first renovation design drawings are made more in line with the residents' preference characteristics in the area to be renovated. Secondly, by using a preset generation module trained based on the first intended design drawings and element description text, the first renovation design drawings of the area to be renovated are generated. Since the element description text is generated based on the first intended design drawings and the first intended description information, and the first intended description information reflects the residents' preference characteristics, the first renovation design drawings generated by the preset generation module are more in line with the residents' preferences. Thus, through the preset generation module, based on the first resident preference information, the first spatial constraint information, and the first area image, the first renovation design drawings of the area to be renovated can be generated by combining multi-dimensional key information, improving the matching degree between the generated design drawings and the actual local needs, reducing the difficulty of implementing the design scheme, and ensuring that the design drawings can meet the application requirements of the actual renovation scenario. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic block diagram of the structure of an electronic device provided in an embodiment of this application; Figure 2 This is a schematic flowchart of a regional redevelopment design method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structural framework of the regional renovation design model in the embodiments of this application; Figure 4 This is a schematic diagram of the structural framework of the module to be trained and generated in an embodiment of this application; Figure 5 This is a schematic diagram of the structural framework of a basic submodule to be trained in an embodiment of this application. Detailed Implementation
[0010] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0012] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0013] To enable any person skilled in the art to implement and use this application, the following description is provided. In this description, details are set forth for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other instances, well-known processes will not be described in detail to avoid obscuring the description of the embodiments of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in the embodiments of this application.
[0014] This application provides a method for regional redevelopment design, an electronic device, and a computer-readable storage medium. The electronic device may be a mobile robot, a mobile phone, a computer, etc.
[0015] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0016] Figure 1 This is a schematic block diagram of the structure of an electronic device provided in an embodiment of this application.
[0017] like Figure 1As shown, the electronic device 100 includes a processor 101 and a memory 102, which are connected by a bus 103, such as a PCIe (Peripheral Component Interconnect Express) bus.
[0018] Specifically, processor 101 provides computing and control capabilities to support the operation of the entire electronic device 100. Processor 101 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0019] Specifically, the memory 102 can be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a portable hard drive, etc.
[0020] Those skilled in the art will understand that Figure 1 The structures shown are merely block diagrams of some structures related to the embodiments of this application and do not constitute a limitation on the electronic devices to which the embodiments of this application are applied. Specific electronic devices may include more or fewer components than those shown in the figures, or combine certain components, or have different component arrangements.
[0021] The processor 101 is configured to run a computer program stored in the memory 102, and implement any of the region modification design methods provided in this application embodiment when executing the computer program. For example, the processor 101 is configured to run a computer program stored in the memory 102, and when executing the computer program, it can perform the following steps: Based on a preset image library, the system determines the first intended design image selected by residents of the area to be renovated and the first intended description information of the first intended design image, wherein the preset image library includes multiple design images; it acquires a first area image and a first depth image of the area to be renovated; through a preset prompting module, it determines the first resident preference information of the area to be renovated based on the first intended description information; through a preset spatial constraint module, it determines the first spatial constraint information based on the first semantic segmentation map of the first depth image and the first area image; through a preset generation module, it generates the first renovation design image of the area to be renovated based on the first resident preference information, the first spatial constraint information, and the first area image, wherein the preset generation module is trained based on the first intended design image and the element description text of the first intended design image, and the element description text is generated based on a multimodal large language model, the first intended design image, and the first intended description information.
[0022] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding process in the following embodiments of the regional modification design method, and will not be repeated here.
[0023] The following will be based on Figure 1 Taking the electronic device shown as the execution subject of the area modification design method as an example, the area modification design method provided in this application embodiment will be described in detail. For the sake of simplification and ease of description, the execution subject will be omitted in the subsequent method embodiments.
[0024] Please see Figure 2 , Figure 2 This is a flowchart illustrating a regional redevelopment design method provided in an embodiment of this application. The regional redevelopment design method includes steps 201-205, wherein: 201. Based on a preset image library, determine the first intended design drawing selected by residents of the area to be renovated and the first intended description information of the first intended design drawing.
[0025] The preset image library is a database containing multiple design drawings. For example, images covering various architectural styles, public space types, and landscape designs can be collected via mobile phone to form the preset image library. For instance, a preset image library can be constructed using modern minimalist building facade design drawings, Lingnan-style public square design drawings, and Chinese garden landscape design drawings.
[0026] The areas to be renovated refer to areas that require renovation design, such as a village in the city, a park, or an old community.
[0027] Among them, the intended design drawing refers to the design drawing preferred by residents.
[0028] Among them, the first intended design drawing refers to the intended design drawing selected by the residents of the area to be renovated, that is, the design drawing selected by the residents from the preset image library that meets their own renovation preferences.
[0029] The first intention description information refers to the residents' ideas for renovation and adjustment when they select the first intention design drawing, supplemented by written descriptions, such as "hoping to add children's playground facilities in the selected plaza design drawing" or "replacing the tile material of the building facade with wood veneer" and other adjustment intention description information.
[0030] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structural framework of a regional renovation design model in an embodiment of this application. The regional renovation design model includes a preset segmentation module, a preset prompt module, a preset spatial constraint module, and a preset generation module. Steps 201-205 can be implemented using the regional renovation design model, such as... Figure 3 As shown, the preset prompt module takes the intention description information of the area as input and outputs the residents' preference information; the preset segmentation module takes the area image as input and outputs the semantic segmentation map; the preset spatial constraint module takes the semantic segmentation map and the depth image as input and outputs the spatial constraint information; the preset generation module takes the spatial constraint information and the residents' preference information as input and outputs the renovation design map.
[0031] For example, firstly, a pre-set image library containing multiple design drafts of different types and styles is built to provide residents of the area to be renovated with a visual basis for choosing renovation designs; then, through standardized data collection methods, residents are guided to select a first-choice design draft that matches their preferences from the pre-set image library, while simultaneously collecting residents' written adjustments to this first-choice design draft, forming a consensus on the first-choice design. Figure 1 The corresponding first intention description information is used to obtain the pairing data of "first intention design drawing - first intention description information", which provides basic data support for the training of the subsequent preset generation module and the generation of the first modification design drawing.
[0032] For example, a pre-built image library is first established, containing various architectural facade designs such as modern minimalist, Lingnan style, and new Chinese style; various public space designs such as sports plazas, leisure pocket parks, and waterfront landscape belts; and various landscape designs such as Chinese gardens, modern green plants, and vertical greening. For a certain urban village area slated for renovation, a semi-structured questionnaire is designed, incorporating all the design images from the pre-built image library. Residents of the urban village participate in the questionnaire, selecting a "Lingnan-style brick building facade design" as their first preferred design and writing their desired adjustment in the questionnaire: "We hope to retain the brick texture on the building facade while adding small-scale vertical greening to avoid obstructing windows." This desired adjustment is the first intention description information corresponding to the first preferred design. The selection results and written descriptions of all residents are then compiled to obtain multiple sets of paired data of "first preferred design - first intention description information."
[0033] Therefore, based on a pre-set image library, and combined with residents' "image selection + text description" approach, the renovation intentions of residents are collected, solving the problem of unclear and unprofessional expression of residents' needs in traditional renovation designs. The resulting "image-text" paired data provides real and relevant raw data for the training of the subsequent pre-set generation module, ensuring that the pre-set generation module can accurately learn residents' preferences, laying the foundation for generating the first renovation design that meets residents' expectations, and improving the residents' acceptance of the renovation design.
[0034] 202. Obtain the first region image and the first depth image of the area to be modified.
[0035] The first area image is an image taken of the area to be modified.
[0036] The first depth image refers to the depth image taken of the area to be transformed, which can reflect the three-dimensional spatial relationship of various physical elements in the area to be transformed, such as building height and terrain elevation difference.
[0037] For example, professional image acquisition equipment (such as depth cameras) is used to take on-site photos of the area to be renovated (such as an urban village) to obtain a first depth image that reflects the three-dimensional spatial characteristics of the site (such as building height, site elevation differences, and the relative distance between buildings and the site). This provides visual data support for determining the subsequent first spatial constraint information and reduces the problem of discrepancies between the spatial layout and the actual site in the subsequently generated first renovation design drawings. Alternatively, by using image acquisition equipment (such as high-definition cameras) to take on-site photos of the area to be renovated (such as an urban village), a first area image that reflects the actual site features (such as building layout, current facilities, functional zoning, and landscape texture) is obtained. This provides a realistic visual basis for the subsequent generation of the first semantic segmentation map and reduces the problem of deviations between the subsequent design and the actual landscape and physical layout of the site.
[0038] 203. Using a preset prompting module, determine the first resident preference information for the area to be renovated based on the first intention description information.
[0039] Among them, the first resident preference information is the resident preference information of the area to be renovated, which is determined based on the first intention description information.
[0040] The preset prompt module is a functional module used to determine the first resident's preference information based on the first intention description information.
[0041] In some embodiments, the following processing steps can be performed by a preset prompt module to determine the first resident preference information: Keyword extraction is performed on the first intention description information to obtain core demand keywords for the area to be renovated, the core demand keywords including at least one category of keywords such as design style, spatial function, material color, and regional characteristics; keyword expansion is performed based on the core demand keywords to obtain negative constraint keywords for the area to be renovated, the negative constraint keywords being generated from negative guidance renovation design drawings; and the core demand keywords and the negative constraint keywords are multi-level fused according to a preset prompt word structure to obtain the first resident preference information.
[0042] Among them, core demand keywords refer to keywords extracted from the first intention description information that can reflect the core demands of residents for renovation, including at least one type of keyword from design style, space function, material color, and regional characteristics, such as "Chinese style", "children's play function", "light-colored material", "Lingnan characteristics", etc.
[0043] Among them, negative constraint keywords are keywords obtained by expanding the core requirement keywords and used to generate transformation design drawings from negative guidance. The negative constraint keywords can expand the keyword data input to the preset generation model, thereby guiding the preset generation model to generate transformation design drawings that better meet the requirements.
[0044] Among them, the preset prompt word structure refers to a preset fixed structure used to integrate core demand keywords and negative constraint keywords. It is used to integrate scattered keywords into structured and standardized first resident preference information, such as the structure of "core demand keywords + negative constraint keywords".
[0045] For example, firstly, natural language processing technology is used to extract keywords from the initial intention description information to filter out the core demand keywords for residents' renovation, thus clarifying their core needs. Then, based on each type of core demand keyword, keywords of the same type but opposite to the core demand keywords are expanded as negative constraint keywords. For example, taking the core demand keywords as two types of keywords including design style (such as "Chinese style") and material color (such as "light-colored material"), the negative constraint keyword "European style" is expanded for the design style core demand keyword "Chinese style", and the negative constraint keyword "dark material" is expanded for the material color core demand keyword "light-colored material". Finally, according to the preset prompt word structure, the two types of keywords are merged in multiple levels to form a structured first resident preference information. Then, the core demand keywords can guide the preset generation module to generate renovation design drawings that are more in line with the residents' wishes, and the negative constraint keywords can guide and restrict the preset generation module to generate renovation design drawings that do not conform to the residents' wishes, so that the final generated renovation design drawings are more in line with the residents' wishes.
[0046] 204. Using a preset spatial constraint module, determine the first spatial constraint information based on the first semantic segmentation map of the first depth image and the first region image.
[0047] The preset spatial constraint module is a functional module used to determine spatial constraint information based on the semantic segmentation maps corresponding to the depth image and the region image.
[0048] The first semantic segmentation image is obtained by performing semantic segmentation on the first region image through a preset segmentation module. It can clearly delineate the boundaries and categories of different functional areas within the area to be renovated, such as the division of the building body, public space, landscape area, and passageway.
[0049] Among them, the first spatial constraint information is the constraint information determined based on the first depth image and the first semantic segmentation map, which is used to limit the spatial layout logic of the renovation design, and includes depth constraint rules and semantic constraint rules.
[0050] In some embodiments, the first spatial constraint information can be determined by performing the following steps 2041A~2043A through the preset spatial constraint module: 2041A. Perform three-dimensional feature extraction on the first depth image to obtain the first depth feature of the area to be modified.
[0051] Among them, the first depth feature is information extracted from the first depth image that reflects the spatial characteristics of various physical elements in the site to be transformed. It is used to indicate at least one type of feature among the physical elements in the site, such as the height difference, three-dimensional layer, relative distance relationship, and vertical structure. For example, the height difference between buildings and the ground, the relative distance between buildings and public spaces, the vertical layer of landscape areas, and the vertical structure of building facades.
[0052] For example, the preset spatial constraint module uses a three-dimensional feature extraction algorithm to analyze the first depth image pixel by pixel, capturing the three-dimensional spatial attributes of each physical element in the image, such as the building facade height, the local height difference between the ground and the public space, the relative distance between the building body and the leisure area, and the distribution structure of the vertical brick joints of the building facade, etc., to form the first depth features, providing three-dimensional data support for the generation of subsequent depth constraint rules, and ensuring that the depth constraint rules conform to the actual three-dimensional structure of the site.
[0053] 2042A. Perform partitioning and parsing on the first semantic segmentation map of the first region image to obtain the first semantic constraint features of the region to be modified.
[0054] The first semantic constraint feature refers to the constraint feature obtained from the first semantic segmentation map, which is used to indicate the boundaries of each functional zone and the relative positional relationship of each functional zone within the area to be renovated. Each functional zone includes at least one of the following: building body, public space, landscape area, and access passage.
[0055] For example, the preset spatial constraint module performs partitioning analysis on the first semantic segmentation map, identifies the boundaries of different functional zones (such as building bodies, public spaces, landscape areas, and access routes) in the map, clarifies the relative positional relationships between each functional zone, and integrates this information to form the first semantic constraint features. For instance, for the first semantic segmentation map of the aforementioned urban village area to be renovated, the preset spatial constraint module performs partitioning analysis: it identifies the boundaries of functional zones such as building bodies, public spaces, and access routes, and parses the relative positional relationships between each functional zone as follows: the building body is located on the side adjacent to the access route, the public space is connected between the building body and the access route, and one boundary of the public space is connected to the boundary of the landscape area. Finally, it integrates these elements to obtain the first semantic constraint features of the area to be renovated.
[0056] 2043A. The first depth feature and the first semantic constraint feature are structurally integrated to generate first spatial constraint information containing depth constraint rules and semantic constraint rules.
[0057] The depth constraint rule is used to limit the vertical spatial layout logic of each element in the renovation design, and the semantic constraint rule is used to limit the planar boundaries and element configuration range of each functional area in the renovation design.
[0058] Among them, structured integration refers to the process by which the preset spatial constraint module associates and matches the first depth feature (three-dimensional spatial data) with the first semantic constraint feature (planar functional data) and integrates them into standardized constraint information according to fixed logic.
[0059] Among them, the depth constraint rule is the core component of the first spatial constraint information, which is used to limit the vertical spatial layout logic of each element in the renovation design, such as the height limit of building facade greening and the adaptation requirements of site elevation differences.
[0060] Among them, semantic constraint rules are the core component of the first spatial constraint information. They are used to limit the planar boundaries and element configuration range of each functional area in the renovation design, such as the boundaries of each functional area cannot be crossed and the element configuration requirements of a specific area.
[0061] For example, the preset spatial constraint module associates and matches the three-dimensional spatial data reflected by the first depth feature with the planar functional data reflected by the first semantic constraint feature, combines the three-dimensional spatial requirements with the planar functional layout, and transforms them into rule-based information that can directly guide the renovation design. It generates depth constraint rules and semantic constraint rules respectively, and finally integrates them to form structured first spatial constraint information, providing a clear spatial constraint basis for the subsequent generation of the first renovation design drawing.
[0062] 205. Using a preset generation module, generate a first renovation design drawing of the area to be renovated based on the first resident preference information, the first spatial constraint information, and the first area image.
[0063] The preset generation module is trained based on the first intention design diagram and the element description text of the first intention design diagram. The element description text is generated based on a multimodal large language model, the first intention design diagram, and the first intention description information.
[0064] Among them, the preset generation module is a functional module used to generate the first renovation design drawing of the area to be renovated, which is trained based on the first intention design drawing and the element description text of the first intention design drawing.
[0065] Among them, the element description text is text generated based on the multimodal large language model, the first intention design drawing and the first intention description information. It is used to structurally describe the core design elements of the first intention design drawing, such as "Lingnan style building facade, brick material, retaining brick joint texture, and increasing vertical greening".
[0066] Among them, the multimodal large language model is a language model that can process image and text information simultaneously, and is used to generate element description text based on the first intention design diagram and the first intention description information.
[0067] In some embodiments, step 205 may specifically include: encoding the first resident preference information using the text encoder of the preset generation module to obtain a second text encoding feature; encoding the first region image using the image encoder of the preset generation module to obtain a second image encoding feature; predicting based on the first spatial constraint information, the second text encoding feature, and the second image encoding feature using the prediction network of the preset generation module to obtain a second predicted image feature; and decoding based on the second predicted image feature using the decoder of the preset generation module to obtain the first renovation design drawing.
[0068] The second text encoding feature refers to the feature data obtained after encoding the first resident preference information.
[0069] The second image coding feature is a visual coding feature obtained after encoding the first region image.
[0070] The second predicted image feature is a predicted image feature obtained by predicting based on the first spatial constraint information, the second text encoding feature, and the second image encoding feature.
[0071] For example, for a certain urban village area slated for redevelopment, the first redevelopment design drawing is generated according to the following steps: The first step involves encoding the first resident preference information, "preserve the texture of Lingnan brickwork, add small-scale vertical greening, and do not obstruct windows," using the text encoder of the preset generation module. This structured text is then transformed into a second text encoding feature that the prediction network can recognize. The second step involves encoding the first area image of the region using the image encoder of the preset generation module, resulting in a second image encoding feature. The third step involves predicting the second predicted image feature using the prediction network of the preset generation module based on the first spatial constraint information, the second text encoding feature (resident preference), and the second image encoding feature. The fifth step involves decoding the second predicted image feature using the decoder of the preset generation module, ultimately outputting the first renovation design drawing. This generated renovation design drawing better aligns with resident preferences and the actual site conditions.
[0072] In some embodiments, the preset generation module is trained using the following steps A1 to A6: A1. Using a multimodal large language model, generate element description text for the first intention design diagram based on the first intention design diagram and the first intention description information.
[0073] Among them, multimodal large language models are models that can simultaneously process image information (first intention design map) and text information (first intention description information) and achieve cross-modal fusion to generate structured text, such as BLIP-2.
[0074] Among them, the element description text is generated by a multimodal large language model based on the first intention design drawing and the first intention description information. It is used to structurally describe the core design elements of the first intention design drawing, such as "Lingnan style building facade, brick material, retaining the texture of brick joints, and setting small vertical greening on the building facade".
[0075] For example, the multimodal large language model simultaneously receives visual information from the first intended design and textual information from the first intended description. First, it performs visual feature analysis on the first intended design to extract core visual elements such as design style, material color, and spatial layout. Then, it performs textual semantic analysis on the first intended description to extract residents' adjustment intentions. Finally, it performs cross-modal fusion of visual elements and residents' adjustment intentions to generate structured, complete element description text that highly matches the first intended design, thereby ensuring that the element description text can capture the core features of the first intended design and residents' adjustment needs.
[0076] For example, using BLIP-2 as a multimodal large language model, the first intention design drawing input is "New Chinese style community public space design drawing", and the first intention description information is "retain the Chinese-style pergola, add stone seats, match with bamboo green plants, ensure smooth passage, and conform to the new Chinese style". The model first analyzes the visual features of the design drawing: new Chinese style, wooden pergola, bluestone ground, original green plant distribution, and passage width; then it analyzes the residents' adjustment intentions in the text: retain the Chinese-style pergola, add stone seats, match with bamboo green plants, and ensure smooth passage; then it integrates the two types of information to generate the element description text: "New Chinese style community public space, retain the wooden Chinese pergola, bluestone ground material, add stone seats, match with bamboo green plants, reserve passage, conform to the new Chinese style, and ensure smooth passage".
[0077] A2. Based on the element description text and the first intention design diagram, construct an image text pair dataset.
[0078] The image-text pair dataset includes multiple image-text data pairs, each including a first intended design drawing and corresponding element description text. The image-text pair dataset is a training dataset composed of multiple image-text data pairs, each including a first intended design drawing and corresponding element description text, such as a dataset consisting of 1000 sets of "Lingnan-style design drawing + corresponding element description text" and "modern minimalist design drawing + corresponding element description text".
[0079] For example, each element description text generated in step A1 is paired one by one with the corresponding first intention design drawing to ensure that the text information corresponds to the image features in each image-text data pair formed by the pairing. Then, multiple sets of such image-text data pairs of different types and styles are collected, and the training set and validation set are divided according to a preset ratio (e.g., 8:2). The sets are integrated to form a standardized image-text pair dataset, which provides high-quality, bimodal training data for the training and validation of the generation module to be trained, and ensures the effectiveness of the training of the generation module to be trained.
[0080] For example, the descriptive text of the element "New Chinese-style community public space, retaining wooden Chinese-style corridors, bluestone flooring, adding stone seats, matching bamboo greenery, reserving passageways with a width of not less than 2m, conforming to the New Chinese style, and ensuring smooth passage" generated in step A1 is paired with the corresponding "New Chinese-style community public space design drawing" to form one image-text data pair; repeat this process to collect 1000 image-text data pairs covering three architectural styles (modern minimalism, New Chinese style, and Lingnan characteristics) and five design types (public space, landscape area, building facade); divide them into a training set (800 data pairs) and a validation set (200 data pairs) at an 8:2 ratio, and then integrate them to construct the image-text pair dataset.
[0081] A3. Construct the module to be trained.
[0082] Please refer to the following: Figure 4 , Figure 4 This is a schematic diagram of the structural framework of the training generation module in this embodiment of the application. The training generation module includes a pre-training basic sub-module and a low-rank matrix sub-module. The pre-training basic sub-module includes a prediction network, a spatial constraint network, a text encoder, an image encoder, and a decoder. The low-rank matrix sub-module is mounted on the attention layer of the prediction network to form a bypass residual structure. The text encoder (e.g., a Transformer encoder) is used to encode the feature description text and output a first text encoding feature. The image encoder (e.g., a Vision Transformer encoder, or ViT) is used to encode the first intention design map and output a first image encoding feature. The spatial constraint network (e.g., a ControlNet) is used to determine second spatial constraint information based on the corresponding second region image and the second semantic segmentation map of the second region image according to each image text data. The prediction network is used to output a first predicted image feature based on the first text encoding feature, the first image encoding feature, and the second spatial constraint information. The decoder (e.g., a VAE decoder) is used to output a second modification design map based on the first predicted image feature.
[0083] Among them, the first text encoding feature is a high-dimensional semantic feature obtained by the text encoder after encoding the feature description text. It is used to represent the core information of the feature description text and is used by the prediction network for fusion processing.
[0084] The first image coding feature is a high-dimensional visual feature obtained by the image encoder after encoding the first intention design image. It is used to characterize the visual attributes of the first intention design image and is used by the prediction network for fusion processing.
[0085] The first predicted image feature is the feature output by the prediction network based on the second spatial constraint information, the first text encoding feature, and the first image encoding feature, which is used by the decoder to generate the second modification design map.
[0086] The second modification design map is a design map generated by the decoder based on the features of the first predicted image, which is used to compare with the first intention design map and calculate the first loss value.
[0087] The second spatial constraint information is determined based on the second semantic segmentation map of the corresponding second region image and the second region image for each image text data. The determination of the second spatial constraint information is similar to that of the first spatial constraint information. For details, please refer to the relevant explanation above, which will not be repeated here.
[0088] For example, a pre-trained basic sub-module is first loaded, which includes a prediction network, a text encoder, an image encoder, and a decoder. Then, a low-rank matrix sub-module is attached to the attention layer of the prediction network to construct a side-channel residual structure. This allows the low-rank matrix sub-module to perform targeted learning based on the features of the attention layer, while retaining the original feature processing capabilities of the pre-trained basic sub-module. Finally, a complete, well-defined, and trainable generation module is formed.
[0089] For example, first load the pre-trained basic sub-modules: the text encoder uses a Transformer encoder to encode the feature description text and output a 768-dimensional first text encoding feature; the image encoder uses a VisionTransformer encoder to encode the first intention design map and output a 1024-dimensional first image encoding feature; the prediction network uses a UNet architecture to receive the second spatial constraint information, the first text encoding feature, and the first image encoding feature to make predictions and output the first predicted image feature; the decoder uses a VAE decoder to decode the 512×512 pixel second modification design map based on the first predicted image feature; then, the low-rank matrix sub-module (with dimensions set to 128×512) is mounted on the attention layer of the UNet architecture, and its output features are residually superimposed with the original output features of the attention layer to form a bypass residual structure, thus completing the construction of the module to be trained.
[0090] A4. Based on the image-text pair dataset, determine the first loss value of the low-rank matrix submodule, wherein the first loss value is determined based on the second modification design drawing and the first intended design drawing.
[0091] The first loss value is a quantitative indicator that measures the difference between the second modification design drawing and the first intended design drawing. It can be calculated based on the similarity between the two and is used to guide the parameter adjustment of the low-rank matrix sub-module. For example, it can be a pixel-level difference value calculated by mean square error (MSE).
[0092] For example, the first intended design map and feature description text from the image-text pair dataset are input in batches into the generation module to be trained. The text encoder and image encoder encode the first text encoding features and the first image encoding features, respectively. The prediction network makes predictions based on the second spatial constraint information, the first text encoding features, and the first image encoding features, and outputs the first predicted image features. The decoder decodes and generates the second modification design map based on the first predicted image features. An image similarity evaluation algorithm (such as mean squared error MSE, structural similarity SSIM) is used to calculate the difference between each set of second modification design maps and the corresponding first intended design map. This difference is quantified as a first loss value, which measures the difference between the two in pixels, structure, and core elements, providing a precise quantitative basis for the parameter adjustment of the low-rank matrix submodule.
[0093] A5. Adjust the parameters of the low-rank matrix sub-module in the training generation module according to the first loss value until the training stop condition is met, and then obtain the trained generation module.
[0094] There are several ways to implement step A, including, for example: (1) In some embodiments, training is performed using a first loss value. In this case, step A5 may specifically include: adjusting the parameters of the low-rank matrix sub-module in the training generation module according to the first loss value until the training stop condition is met, and then obtaining the trained generation module.
[0095] For example, based on the first loss value calculated in step A4, the backpropagation algorithm is used to keep the parameters of the pre-trained basic sub-module fixed (to avoid destroying its original basic capabilities), and the parameters of the low-rank matrix sub-module are iteratively adjusted; after each round of parameter adjustment, the generation effect of the training generation module is verified using the image text dataset validation set, and the first loss value of the validation set is calculated; the iterative adjustment continues until the first loss value of the validation set tends to stabilize and is lower than a preset threshold (e.g., 0.05) for a preset number of rounds, reaching the stop training condition, and at this time the trained generation module with optimized parameters is obtained.
[0096] For example, the AdamW 8-bit optimizer is used to update the parameters of the low-rank matrix submodule, and the learning rate is set: prediction network Text encoder During training, Xformers are enabled to accelerate feature calculation of the attention layer, and training is completed on a single RTX 4080 Super GPU. Based on the first loss value of 0.35 obtained in step A4, the weight parameters of the low-rank matrix sub-module are adjusted through the backpropagation algorithm. After each round of training, the effect of the module to be trained is evaluated using 200 data pairs in the validation set. The first loss value of the validation set is calculated: 0.29 in round 1, 0.16 in round 5, and 0.04 in round 12. After that, the validation set loss value is stable between 0.03 and 0.04 for 10 consecutive rounds, which is lower than the preset threshold of 0.05, meeting the stop training condition. The parameter adjustment is stopped, and the trained module is obtained.
[0097] (2) In some embodiments, training is performed using a first loss value and a second loss value. The attention layer of the prediction network can be used to output text attention features based on the first text encoding features and output image attention features based on the first image encoding features. The text attention features and the image attention features have the same feature dimension. In this case, step A5 may specifically include: determining the second loss value of the low-rank matrix submodule based on the image-text pair dataset, wherein the second loss value is determined based on the text attention features and the image attention features; adjusting the parameters of the low-rank matrix submodule in the training generation module based on the first loss value and the second loss value until the training stop condition is met, thereby obtaining the trained generation module.
[0098] Among them, the text attention feature is the feature output by the attention layer of the prediction network after calculating the first text encoding feature through the attention mechanism.
[0099] Among them, the image attention feature is the feature output by the attention layer of the prediction network after calculating the first image encoding feature through the attention mechanism.
[0100] The second loss value is a quantitative indicator that measures the semantic consistency between text attention features and image attention features. It is calculated based on the semantic similarity between the two. It is used in conjunction with the first loss value to guide the parameter adjustment of the low-rank matrix submodule and improve the model's fit to text semantics.
[0101] For example, firstly, the first intentional design diagram and element description text from the image-text pair dataset are input into the training generation module. The text encoder encodes the first text encoding features, and the image encoder encodes the first image encoding features. The attention layer of the prediction network receives the two types of features and focuses on the core semantics and visual information through the attention mechanism, outputting text attention features and image attention features. A semantic similarity evaluation algorithm is used to calculate the semantic difference between the text attention features and the image attention features, and this difference is quantified as a second loss value to ensure that the features learned by the training generation module match the text semantics, providing a semantic-level quantitative basis for adjusting the parameters of the low-rank matrix submodule. Then, the first loss value and the second loss value are weighted and fused (the preset weights can be adjusted according to training needs, such as 0.6 for the first loss value and 0.4 for the second loss value) to obtain the comprehensive loss value. Based on the comprehensive loss value, the backpropagation algorithm is used to keep the parameters of the pre-trained basic sub-module fixed and iteratively adjust the parameters of the low-rank matrix sub-module. After each round of adjustment, the comprehensive loss value is calculated using the validation set. The iteration continues until the comprehensive loss value of the validation set tends to stabilize for a preset number of consecutive rounds and is lower than a preset threshold, reaching the stop training condition, and the trained generation module is obtained. This ensures that the trained generation module meets both the image generation accuracy requirements and the text semantic requirements.
[0102] By jointly training with the first and second loss values, compared to training with only the first loss value, firstly, the second loss value focuses on semantic consistency, ensuring that the features learned by the training generation module accurately match the core semantics of the element description text, avoiding a disconnect between the generated design drawings and the text requirements; secondly, by combining the two types of loss values to adjust parameters, the low-rank matrix sub-module can learn both the visual features of the first intended design drawing (ensuring image generation accuracy) and the semantics of the text (ensuring requirement relevance), further improving the generation accuracy of the trained generation module; thirdly, without changing the original model architecture of the trained generation module, mainly adding semantic-level loss value constraints, the practicality of the preset generation module is improved without increasing training costs, ensuring that the subsequently generated first renovation design drawings align with residents' preferences.
[0103] A6. Based on the model parameters of the trained generation module, determine the preset generation module.
[0104] Once the training of the untrained generation module is complete, the model parameters of its prediction network, text encoder, image encoder, and decoder can be extracted from the structural framework of the untrained generation module to construct a preset generation module. This preset generation module includes a prediction network, text encoder, image encoder, and decoder, and can perform similar functions to the prediction network, text encoder, image encoder, and decoder of the trained generation module. This allows the preset generation module to accurately learn the design features in the image-text pair dataset and generate a first renovation design drawing that meets the requirements based on the first resident preference information, the first spatial constraint information, and the first region image. Simultaneously, the model parameters of the spatial constraint network of the trained generation module can also be extracted as the model parameters of the preset spatial constraint module to construct the preset spatial constraint module.
[0105] The preset generation module is obtained through training steps A1-A6. The core beneficial technical effects are as follows: First, a multimodal large language model is used to generate element description text, ensuring that the visual features of the first intention design map are accurately matched with the text description, providing high-quality bimodal data for the training of the generation module to be trained, and improving the training effect. Second, an architecture of "pre-trained basic sub-module + low-rank matrix sub-module" is adopted. The parameters of the low-rank matrix sub-module are fine-tuned, which not only reduces the training cost of the generation module to be trained and improves the training efficiency, but also retains the original capabilities of the pre-trained basic sub-module through the bypass residual structure, realizing accurate learning of core features. Ultimately, the preset generation module can accurately extract the core features of the residents' intention design map, improving the generation efficiency and accuracy of the renovation design map.
[0106] In some embodiments, the pre-trained basic submodule is trained using the following steps B1 to B7: B1. Obtain the third region image and the third depth image of the sample area, as well as the second intention description information corresponding to the second intention design map selected by the residents of the sample area.
[0107] The sample region is a demonstration region used to train the pre-trained basic sub-modules.
[0108] Among them, the third depth image is a three-dimensional depth image of the sample region, which is used to characterize the three-dimensional spatial features of the sample region.
[0109] The second intended design drawing is the intended design drawing selected by the residents of the sample area, which is used to reflect the residents' willingness to renovate.
[0110] The second intention description information is a supplementary description text of the second intention design drawings by the residents of the sample area, which is used to clarify the residents' specific wishes for the transformation of the sample area.
[0111] B2. Using a preset prompting module, determine the second resident preference information for the sample area based on the second intention description information.
[0112] Among them, the second resident preference information is a standardized information that represents the renovation preferences of residents in the sample area, generated by the preset prompt module based on the second intention description information.
[0113] B3. Using a preset spatial constraint module, determine the third spatial constraint information based on the third semantic segmentation map of the third depth image and the third region image.
[0114] The third semantic segmentation image is an image obtained by performing semantic segmentation on the third region image through a preset segmentation module. It is used to distinguish different functions and types of elements within the sample region, such as segmented images of buildings, roads, open spaces, and green plants within the sample community.
[0115] Among them, the third spatial constraint information preset spatial constraint module is generated based on the third depth image and the third semantic segmentation map, and is used to limit the spatial rules for the sample region modification design, including depth constraint rules and semantic constraint rules.
[0116] The second depth feature refers to the information extracted from the third depth image that reflects the spatial characteristics of various physical elements within the sample area.
[0117] The second semantic constraint feature refers to the constraint feature that reflects the functional layout of the sample region, which is parsed from the third semantic segmentation map.
[0118] For example, the preset spatial constraint module first extracts three-dimensional features from the third depth image to obtain second depth features that reflect the three-dimensional spatial characteristics of the site; then it performs partitioning and analysis on the third semantic segmentation map of the third region image to obtain second semantic constraint features that reflect the planar functional layout of the site; finally, it integrates the second depth features and the second semantic constraint features in a structured manner to generate third spatial constraint information containing depth constraint rules and semantic constraint rules, setting hard spatial constraints for the generation of subsequent third renovation design drawings from two dimensions: vertical three-dimensional layout and planar functional boundaries.
[0119] B4. Using the training submodule, generate the third renovation design drawing of the area to be renovated based on the second resident preference information, the third spatial constraint information, and the third region image.
[0120] Among them, the third renovation design drawing is a sample area renovation design drawing generated by the basic submodule to be trained based on the second resident preference information, the third spatial constraint information, and the third regional image.
[0121] For example, first build the basic submodule to be trained. Please refer to [reference needed]. Figure 5 , Figure 5 This is a schematic diagram of the structural framework of the basic submodule to be trained in this application embodiment. The basic submodule to be trained integrates a prediction network, a spatial constraint network, a text encoder, an image encoder, and a decoder. The spatial constraint network is responsible for outputting third spatial constraint information based on the third semantic segmentation and the third depth image. The text encoder is responsible for encoding the second resident preference information to obtain the third text encoding feature. The image encoder is responsible for encoding the third region image to obtain the third image encoding feature. The prediction network is responsible for outputting the third predicted image feature based on the third spatial constraint information, the third text encoding feature, and the third image encoding feature. The decoder is responsible for generating the third renovation design map based on the third predicted image feature. Then, the third renovation design map is generated in accordance with the method in step 205.
[0122] The implementation of steps B1 to B4 is similar to that of steps 201 to 205. For details, please refer to the relevant explanations above. They will not be repeated here.
[0123] B5. Obtain expert evaluation information and public feedback information for the third renovation design drawing.
[0124] The expert evaluation information refers to the scoring results of the third renovation design drawing from the dimensions of image quality, design rationality, and implementation feasibility (e.g., each dimension uses a scoring standard of 0 to 10 points, such as "image quality 8 points, design rationality 7 points, and implementation feasibility 8 points"). The public feedback information refers to the scoring results of the third renovation design drawing from the dimensions of image quality, design effect, and matching degree with residents' expectations (e.g., each dimension uses a scoring standard of 0 to 10 points, such as "image quality 7 points, design effect 8 points, and matching degree with residents' expectations 7 points").
[0125] B6. Based on the expert evaluation information and public feedback information, determine the third loss value of the basic sub-module to be trained. The third loss value is quantified based on the difference between the scores of each dimension and the preset score threshold.
[0126] Among them, the third loss value is a quantitative indicator that measures the generation effect of the basic sub-module to be trained. It is quantified based on the difference between the scores of each dimension in expert evaluation information and public feedback information and the preset score threshold, and is used to guide the adjustment of the basic parameters of the basic sub-module to be trained.
[0127] For example, 3-5 experts in architectural design and engineering construction can be organized to score the third renovation design drawings (0-10 points) from three dimensions: image quality (clarity, color reproduction, etc.), design rationality (fitting the current situation, functional adaptation, etc.), and implementation feasibility (construction difficulty, cost control, etc.). The expert evaluation information can be collected. At the same time, residents in the sample area and the surrounding public can be organized to score the third renovation design drawings (0-10 points) from three dimensions: image quality, design effect (visual aesthetics, style adaptability, etc.), and matching degree with residents' expectations (degree of conformity with the second intention description information). The public feedback information can be collected. Then, preset the scoring thresholds for each dimension (0~10 points, usually set to 8 points), and calculate the difference between the score of each dimension in the expert evaluation information and the public feedback information and the preset scoring threshold. The differences of all dimensions are then weighted and summed (the weight of each dimension can be adjusted according to training needs, such as 0.2 for each dimension of expert evaluation and 0.1 for each dimension of public feedback), to obtain the quantified third loss value. The larger the third loss value, the worse the generation effect of the basic sub-module to be trained, and vice versa, providing quantitative guidance for the parameter adjustment of the basic sub-module to be trained.
[0128] B7. Iteratively adjust the basic parameters of the base submodule to be trained based on the third loss value until the scores of each dimension of the expert evaluation information and public feedback information reach the preset score threshold, and obtain the pre-trained base submodule.
[0129] For example, please refer to Figure 5 Based on the third loss value calculated in step B6, the backpropagation algorithm can be used to iteratively adjust the basic parameters (weights of the prediction network, spatial constraint network, text encoder, image encoder, and decoder, etc.) of the basic sub-module to be trained. After each round of parameter adjustment, steps B1 to B6 are repeated to regenerate the third renovation design map and obtain expert evaluation information and public feedback information, and calculate a new third loss value. The iterative adjustment continues until all dimensions of the expert evaluation information and public feedback information reach the preset scoring threshold, at which point training stops, and a pre-trained basic sub-module with basic image generation capabilities and in line with residents' preferences and spatial constraints is obtained.
[0130] As can be seen from the above, firstly, by using a preset image library to determine the first intended design image and corresponding first intended description information selected by residents in the area to be renovated, the core renovation intentions of residents are directly captured. Then, through a preset prompt module, combined with the first intended description information, the first resident preference information is determined, fully incorporating residents' subjective preferences. This ensures that the generated first resident preference information aligns with residents' needs, laying the foundation for the subsequent generation of renovation design images that meet actual needs. Consequently, the final first renovation design image of the area to be renovated is more in line with residents' preference characteristics and local actual needs. Secondly, by using a preset generation module trained based on the first intended design image and element description text, the first renovation design image of the area to be renovated is generated. The element description text is generated based on a multimodal large language model, the first intended design image, and the first intended description information. This design allows the element description text to accurately capture the core features of the first intended design image while fully carrying the resident preference features reflected in the first intended description information. This allows the preset generation module to accurately learn the design features corresponding to residents' preferences, ensuring that the generated first renovation design image accurately aligns with residents' preferences and reducing the problems of focusing on visual generation or single-modal interaction and failing to accurately match residents' needs. Thirdly, when generating the first renovation design drawing, the preset generation module integrates the first resident preference information, the first spatial constraint information, and the first area image. The first spatial constraint information is determined by the preset spatial constraint module, combined with the first depth image and its first semantic segmentation map, accurately reflecting the spatial structure, functional zoning, and other objective spatial constraints of the area to be renovated. The first area image provides the basic site conditions of the area to be renovated, ensuring that the generated first renovation design drawing conforms to the actual site conditions. In summary, by using the preset generation module to integrate the first resident preference information (aligning with residents' subjective needs), the first spatial constraint information (aligning with site spatial constraints), and the first area image (aligning with the actual site conditions), the first renovation design drawing of the area to be renovated can be generated by combining multi-dimensional key information. This improves the matching degree between the generated design drawing and local actual needs, reduces the difficulty of implementing the design scheme, and ensures that the design drawing meets the application requirements of the actual renovation scenario.
[0131] Those skilled in the art will understand that all or part of the steps in the above-described area modification design method can be accomplished by instructions, or by controlling related hardware with instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0132] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute any of the region modification design methods provided in embodiments of this application. For example, the computer program can be loaded by a processor to perform the following steps: Based on a preset image library, the system determines the first intended design image selected by residents of the area to be renovated and the first intended description information of the first intended design image, wherein the preset image library includes multiple design images; it acquires a first area image and a first depth image of the area to be renovated; through a preset prompting module, it determines the first resident preference information of the area to be renovated based on the first intended description information; through a preset spatial constraint module, it determines the first spatial constraint information based on the first semantic segmentation map of the first depth image and the first area image; through a preset generation module, it generates the first renovation design image of the area to be renovated based on the first resident preference information, the first spatial constraint information, and the first area image, wherein the preset generation module is trained based on the first intended design image and the element description text of the first intended design image, and the element description text is generated based on a multimodal large language model, the first intended design image, and the first intended description information.
[0133] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0134] In the above embodiments of the area modification design method, computer-readable storage medium, and electronic device, the descriptions of each embodiment have different focuses. For parts not described in detail in a particular embodiment, please refer to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the computer-readable storage medium, electronic device, and their corresponding units described above can be referred to the description of the area modification design method in the above embodiments, and will not be repeated here.
[0135] The above provides a detailed description of a regional modification design method, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A regional redevelopment design method, characterized in that, The method includes: Based on a preset image library, the first intended design drawing selected by residents of the area to be renovated and the first intended description information of the first intended design drawing are determined, wherein the preset image library includes multiple design drawings; Obtain the first region image and the first depth image of the area to be modified; Based on the first intention description information, the first resident preference information of the area to be renovated is determined by the preset prompt module. The first spatial constraint information is determined by the preset spatial constraint module based on the first semantic segmentation map of the first depth image and the first region image. The preset generation module generates a first renovation design drawing of the area to be renovated based on the first resident preference information, the first spatial constraint information, and the first area image. The preset generation module is trained in the following manner: Using a multimodal large language model, element description text of the first intention design diagram is generated based on the first intention design diagram and the first intention description information; Based on the element description text and the first intended design drawing, an image text pair dataset is constructed, wherein the image text pair dataset includes multiple image text data pairs, and each image text data pair includes the first intended design drawing and the corresponding element description text; A training generation module is constructed, comprising a pre-trained basic sub-module and a low-rank matrix sub-module. The pre-trained basic sub-module includes a prediction network, a spatial constraint network, a text encoder, an image encoder, and a decoder. The low-rank matrix sub-module is mounted on the attention layer of the prediction network. The text encoder encodes the feature description text and outputs a first text encoding feature. The image encoder encodes the first intention design map and outputs a first image encoding feature. The spatial constraint network determines second spatial constraint information based on each image text data for the corresponding second region image and the second semantic segmentation map of the second region image. The prediction network outputs a first predicted image feature based on the first text encoding feature, the first image encoding feature, and the second spatial constraint information. The decoder outputs a second modification design map based on the first predicted image feature. Based on the image-text pair dataset, a first loss value for the low-rank matrix submodule is determined, wherein the first loss value is determined based on the second modification design diagram and the first intended design diagram; The parameters of the low-rank matrix sub-module in the training generation module are adjusted according to the first loss value until the training stop condition is met, and the trained generation module is obtained. The preset generation module is determined based on the model parameters of the trained generation module.
2. The regional redevelopment design method according to claim 1, characterized in that, The attention layer of the prediction network is used to output text attention features based on the first text encoding features and to output image attention features based on the first image encoding features, wherein the text attention features and the image attention features have the same feature dimension. The method further includes: Based on the image-text pair dataset, a second loss value for the low-rank matrix submodule is determined, wherein the second loss value is determined based on the text attention features and the image attention features; The step of adjusting the parameters of the low-rank matrix sub-module in the training generation module according to the first loss value until the training stop condition is met, to obtain the trained generation module, includes: Based on the first loss value and the second loss value, the parameters of the low-rank matrix sub-module in the training generation module are adjusted until the training stop condition is met, thus obtaining the trained generation module.
3. The regional redevelopment design method according to claim 1, characterized in that, The pre-trained basic submodule is trained in the following manner: Acquire the third region image and the third depth image of the sample area, as well as the second intention description information corresponding to the second intention design map selected by the residents of the sample area; Based on the second intention description information, the second resident preference information of the sample area is determined by the preset prompt module. The third spatial constraint information is determined by the preset spatial constraint module based on the third semantic segmentation map of the third depth image and the third region image. Using the basic submodule to be trained, a third renovation design drawing of the area to be renovated is generated based on the second resident preference information, the third spatial constraint information, and the third region image. Obtain expert evaluation information and public feedback information of the third renovation design drawing, wherein the expert evaluation information is the scoring result of the third renovation design drawing from the dimensions of image quality, design rationality, and implementation feasibility, and the public feedback information is the scoring result of the third renovation design drawing from the dimensions of image quality, design effect, and matching degree with residents' expectations; Based on the expert evaluation information and public feedback information, the third loss value of the basic sub-module to be trained is determined. The third loss value is quantified based on the difference between the scores of each dimension and the preset score threshold. The basic parameters of the training submodule are iteratively adjusted based on the third loss value until the scores of each dimension of the expert evaluation information and public feedback information reach the preset score threshold, thus obtaining the pre-trained basic submodule.
4. The regional redevelopment design method according to claim 1, characterized in that, The step of determining the first resident preference information of the area to be renovated based on the first intention description information includes: Keyword extraction is performed on the first intention description information to obtain the core demand keywords of the area to be transformed. The core demand keywords include at least one of the following categories: design style, spatial function, material color, and regional characteristics. Based on the core requirement keywords, keywords are expanded to obtain negative constraint keywords for the area to be modified. These negative constraint keywords are generated from the negative guidance modification design drawing. According to the preset prompt word structure, the core demand keywords and the negative constraint keywords are fused in multiple levels to obtain the first resident preference information.
5. The regional redevelopment design method according to claim 1, characterized in that, The step of determining the first spatial constraint information based on the first semantic segmentation map of the first depth image and the first region image includes: Three-dimensional feature extraction is performed on the first depth image to obtain the first depth feature of the area to be modified. The first depth feature is used to indicate at least one type of feature among the physical elements in the site, such as elevation difference, three-dimensional layer, relative distance relationship, and vertical structure. The first semantic segmentation map of the first region image is partitioned and parsed to obtain the first semantic constraint features of the region to be modified. The first semantic constraint features are used to indicate the boundaries of each functional partition and the relative positional relationship of each functional partition within the region to be modified. Each functional partition includes at least one of the following: building body, public space, landscape area, and passageway. The first depth feature and the first semantic constraint feature are structurally integrated to generate first spatial constraint information containing depth constraint rules and semantic constraint rules. The depth constraint rules are used to limit the vertical spatial layout logic of each element in the renovation design, and the semantic constraint rules are used to limit the planar boundaries and element configuration range of each functional area in the renovation design.
6. The regional redevelopment design method according to claim 1, characterized in that, The step of generating a first renovation design drawing of the area to be renovated through a preset generation module, based on the first resident preference information, the first spatial constraint information, and the first depth image, includes: The first resident preference information is encoded by the text encoder of the preset generation module to obtain the second text encoding feature; The image encoder of the preset generation module encodes the first region image to obtain the second image encoding feature. The prediction network of the preset generation module predicts the second predicted image features based on the first spatial constraint information, the second text encoding features, and the second image encoding features. The first modification design drawing is obtained by decoding the second predicted image features using the decoder of the preset generation module.
7. The regional redevelopment design method according to claim 1, characterized in that, The parameters of the low-rank matrix submodule are updated using the AdamW 8-bit optimizer, and the learning rate of the prediction network is set to... The learning rate of the text encoder is During training, Xformers are enabled to accelerate feature computation of the attention layer.
8. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the area modification design method as described in any one of claims 1 to 7 when it invokes the computer program in the memory.
9. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the regional redevelopment design method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Country style and appearance design image generation method and system based on knowledge graph and large model
CN120747285A
Image generation method and device and storage medium
CN121544754A