High-definition repairing method and device for building effect picture, electronic equipment and storage medium
By constructing a style and cultural fit function, combined with particle swarm optimization and a diffusion model, the feature weights of architectural renderings are automatically adjusted, solving the problems of time-consuming, labor-intensive, and inefficient methods in traditional approaches, and achieving efficient and high-definition architectural rendering restoration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CITIC GENERAL INST OF ARCHITECTURAL DESIGN & RES
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional architectural rendering processes are time-consuming and labor-intensive, resulting in images with insufficient resolution, blurry details, and distorted colors. They are difficult to respond quickly to design iterations, and manual rendering is complex, leading to low efficiency.
By constructing style conformity and cultural fit functions, and combining particle swarm optimization algorithm and diffusion model, the feature weights of architectural renderings are automatically adjusted to generate high-definition restoration models, thus achieving efficient restoration of architectural renderings.
It generates architectural renderings with consistent style and rich details, reduces labor costs, avoids the loss of style information and inconsistencies in traditional methods, and improves repair efficiency and quality.
Smart Images

Figure CN121961932A_ABST
Abstract
Description
High-resolution restoration methods, devices, electronic equipment, and storage media for architectural renderings. Technical Field
[0001] This application relates to the field of architectural design technology, and in particular to a method, device, electronic device and storage medium for high-definition restoration of architectural renderings. Background Technology
[0002] Architectural renderings play an irreplaceable role in project presentation and communication. They are not only a direct tool for designers to express their creativity and showcase future architectural forms, but also a crucial basis for clients to understand design concepts and decide on project progress. A high-quality rendering can clearly and accurately convey details such as the building's volume, materials, lighting, and environment, which is essential for the successful advancement of the project.
[0003] However, traditional rendering workflows typically face numerous challenges. First, the transformation from concept sketches to final renderings often requires significant time and manpower, especially when pursuing ultimate detail and realism. Second, due to the complexity of manual rendering and post-processing, the generated images may suffer from insufficient resolution, blurred details, color distortion, or inconsistent styles; these defects directly impact the expressiveness and persuasiveness of the renderings. Furthermore, when modifications or iterations based on feedback are necessary, traditional methods are often inefficient and struggle to respond quickly to changes.
[0004] Therefore, a new high-definition restoration method for architectural renderings is urgently needed to solve the above problems. Summary of the Invention
[0005] In view of this, this application provides a method, apparatus, electronic device and storage medium for high-definition restoration of architectural renderings, which can improve the restoration effect of architectural renderings and reduce labor costs.
[0006] A first aspect of this application provides a method for high-definition restoration of architectural renderings, comprising: acquiring an architectural rendering dataset, wherein the dataset includes multiple original architectural renderings, each of which includes annotation information for characterizing image features and architectural features; constructing a style conformity function characterizing the feature differences between the original architectural renderings and a target architectural style image, and a cultural fit function characterizing the cultural matching degree between the original architectural renderings and the target architectural style image, based on the annotation information; and constructing a comprehensive objective function based on the style conformity function and the cultural fit function; and treating each original architectural rendering as a particle, and according to the annotation... The information determines an initial weight set for each original architectural rendering and uses this initial weight set as the initial position of the particle. The initial weight set represents the importance of image features and architectural features in the original architectural rendering. The initial position is iteratively updated, and a comprehensive objective function is calculated based on the position update results of each round. The iterative update of the initial position stops when the calculated value of the comprehensive objective function exceeds a preset threshold. A preset initial diffusion model is trained based on the final position obtained after the last iteration update to obtain a final high-definition restoration model. The architectural rendering to be restored is input into the final high-definition restoration model to obtain the restored final architectural rendering.
[0007] In one possible implementation, the annotation information includes at least the color, texture, shape, pattern, and cultural symbols of the original architectural renderings; determining the initial weight set for each original architectural rendering based on the annotation information includes: determining a first weight for color, a second weight for texture, a third weight for shape, a fourth weight for pattern, and a fifth weight for cultural symbols in the original architectural renderings; and using the first weight, the second weight, the third weight, the fourth weight, and the fifth weight as the initial weight set.
[0008] In one possible implementation, training a preset initial diffusion model based on the final position obtained after the last iteration update to obtain a final high-definition restoration model includes: calculating the comprehensive style feature parameters of the original architectural rendering based on the final position; inputting the comprehensive style feature parameters into the initial diffusion model for training to obtain the final high-definition restoration model; wherein, the comprehensive style feature parameters are calculated according to the following formula: F adjusted =Wc·Fc+Wt·Ft+Wsh·Fsh+Wp·Fp+Wsy·Fsy; among them, F adjustedThe comprehensive style feature parameters are defined as follows: Wc, Wt, Wsh, Wp, and Wsy are the values corresponding to the first weight, second weight, third weight, fourth weight, and fifth weight in the final position, respectively; and Fc, Ft, Fsh, Fp, and Fsy are the image feature values corresponding to color, texture, shape, pattern, and cultural symbol, respectively.
[0009] In one possible implementation, before iteratively updating the initial position, the method further includes: determining an initial velocity to characterize the particle's optimization direction; the iterative update of the initial position includes: iteratively updating the initial position according to the following formula: ; ; ; ;in, The particle velocity in the current iteration round, hour The initial velocity, For inertial weights, The particle velocity from the previous iteration. The local optimal solution found for each particle in the current round. The globally optimal solution found for the entire particle population in the current round. and All are random numbers. and All are acceleration constants. and acceleration constant The minimum and maximum values, and acceleration constant The minimum and maximum values, This represents the current iteration number. The maximum number of iterations, and All are constants. and Inertial weight The maximum and minimum values, This represents the particle position in the current iteration. This represents the particle position in the previous iteration.
[0010] In one possible implementation, constructing a style conformity function representing the feature differences between the original architectural rendering and the target architectural style image, and a cultural fit function representing the cultural matching degree between the original architectural rendering and the target architectural style image, based on the annotation information, includes: constructing the style conformity function according to the following formula: ;in, Let W be the style conformity function under the weight set W. The number of features in the original architectural rendering. The image feature values of the original architectural rendering under the weight set W are... The target image feature value is the target architectural style image; the cultural fit function is constructed according to the following formula: ;in, Let W be the cultural fit function under the weight set W. The number of cultural symbols in the original architectural rendering. Let W be the cultural symbol feature value of the original architectural rendering under the weight set W. The target cultural symbol feature value is the target architectural style image.
[0011] In one possible implementation, constructing the comprehensive objective function based on the style conformity function and the cultural fit function includes: constructing the comprehensive objective function according to the following formula: ;in, Let W be the comprehensive objective function under the weight set W. Let W be the style conformity function under the weight set W. Let W be the cultural fit function under the weight set W. and All of these are adjustable weighting coefficients.
[0012] In one possible implementation, before constructing the style conformity function representing the difference in features between the original architectural rendering and the target architectural style image, and the cultural fit function representing the cultural matching degree between the original architectural rendering and the target architectural style image based on the annotation information, the method further includes: preprocessing each of the original architectural renderings to obtain a standardized architectural rendering, wherein the preprocessing includes at least data augmentation, size normalization, noise reduction, and image alignment; the construction of the style conformity function representing the difference in features between the original architectural rendering and the target architectural style image, and the cultural fit function representing the cultural matching degree between the original architectural rendering and the target architectural style image based on the annotation information includes: constructing the style conformity function representing the difference in features between the standardized architectural rendering and the target architectural style image, and the cultural fit function representing the cultural matching degree between the standardized architectural rendering and the target architectural style image based on the annotation information.
[0013] Secondly, embodiments of this application also provide a high-definition restoration device for architectural renderings, comprising: an acquisition module, a first construction module, a second construction module, a determination module, an update module, a training module, and an input module; the acquisition module is used to acquire an architectural rendering dataset, wherein the architectural rendering dataset includes multiple original architectural renderings, each of which includes annotation information for characterizing image features and architectural features; the first construction module is used to construct a style conformity function characterizing the feature difference between the original architectural rendering and the target architectural style image, and a cultural fit function characterizing the cultural matching degree between the original architectural rendering and the target architectural style image, based on the annotation information; the second construction module is used to construct a comprehensive objective function based on the style conformity function and the cultural fit function; the determination module... The system uses each original architectural rendering as a particle, determines an initial weight set for each original architectural rendering based on the annotation information, and uses the initial weight set as the initial position of the particle. The initial weight set represents the importance of image features and architectural features in the original architectural rendering. The update module iteratively updates the initial position and calculates the comprehensive objective function based on the position update result of each round. It stops iteratively updating the initial position when the calculated value of the comprehensive objective function exceeds a preset threshold. The training module trains a preset initial diffusion model based on the final position obtained after the last iteration update to obtain a final high-definition restoration model. The input module inputs the architectural rendering to be restored into the final high-definition restoration model to obtain the restored final architectural rendering.
[0014] Thirdly, embodiments of this application also provide an electronic device, which includes a processor and a memory. The memory is used to store instructions, and the processor is used to call the instructions in the memory to cause the electronic device to execute the high-definition restoration method for architectural renderings as described in the first aspect.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device to perform the high-definition restoration method for architectural renderings as described in the first aspect.
[0016] Compared with related technologies, the embodiments of this application have at least the following advantages: By constructing a style conformity function that characterizes the feature differences between the original architectural rendering and the target architectural style image based on annotation information, and a cultural fit function that characterizes the cultural matching degree of the features between the original architectural rendering and the target architectural style image, the style conformity function can measure the degree of similarity in features between the original architectural rendering and the subsequently generated image and the target architectural style image, and the cultural fit function can measure the degree of matching of the original architectural rendering and the subsequently generated image with the specific cultural symbols of the target architectural style image. Furthermore, after constructing a comprehensive objective function based on the style conformity function and the cultural fit function, the comprehensive objective function can comprehensively consider the architectural style and cultural symbols of the subsequently generated image, balancing style conformity and cultural fit. By stopping the iterative update of the initial position when the calculated value of the comprehensive objective function exceeds a preset threshold, and training the preset initial diffusion model based on the final position obtained after the last iteration, a final high-definition restoration model is obtained. This approach, combining multi-scale feature fusion, enables the final high-definition restoration model to capture the core stylistic elements of architectural design renderings more precisely. It effectively avoids the style information loss and inconsistency problems caused by direct style transfer or fixed rule segmentation in traditional methods, allowing the final high-definition restoration model to generate final architectural renderings with highly consistent style and rich detail. Furthermore, this method eliminates the need for complex post-processing steps such as manual rendering, significantly reducing labor costs.
[0017] The technical effects achieved by the second, third, and fourth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description
[0018] Figure 1 is a flowchart of a high-definition restoration method for architectural renderings according to an embodiment of this application; Figure 2 is a functional block diagram of a high-definition restoration device for architectural renderings according to an embodiment of this application; Figure 3 is a structural schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0019] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0020] The following description sets forth many specific details to provide a full understanding of this application. The described embodiments are only some, not all, of the embodiments of this application.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0022] It should be further noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0023] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0024] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0025] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example for reference.
[0026] Diffusion model: A generative artificial intelligence model based on the diffusion process, which generates high-quality content such as images, videos or text by gradually adding noise to the data and then learning to remove noise.
[0027] Inpainting is a digital image processing technique that restores the integrity of an image by filling in missing areas or removing unwanted objects. It covers application scenarios such as damaged photo restoration and watermark removal.
[0028] Particle Swarm Optimization (PSO) algorithm: Simulates the group behavior of social organisms such as flocks of birds or schools of fish, finding the optimal solution through cooperation and information sharing among individuals. It belongs to the category of swarm intelligence algorithms, without central control; each individual (called a "particle") adjusts its search direction based on its own experience and the experience of the group.
[0029] Please refer to Figure 1, which is a flowchart of an embodiment of the high-definition restoration method for architectural renderings provided in this application. The order of steps in this flowchart can be changed, and some steps can be omitted, depending on different needs.
[0030] It should be noted that the high-definition restoration method for architectural renderings in this application embodiment can be applied to architectural design scenarios. The executing entity can be a high-definition restoration device for architectural renderings. For example, when performing high-definition restoration on an architectural rendering, it can be done using a high-definition restoration device. Of course, the high-definition restoration method for architectural renderings in this application embodiment can also be applied to other scenarios requiring partial redrawing of architectural renderings, and this application does not specifically limit its application in this regard.
[0031] The specific process of this embodiment is shown in Figure 1, including the following steps: S101, obtain the architectural rendering dataset, wherein the architectural rendering dataset includes multiple original architectural renderings, and each original architectural rendering includes annotation information for characterizing image features and architectural features.
[0032] In some embodiments, raw image data is collected from museums, art galleries, high-quality architectural photographs, design sketches, and 3D renderings, and basic data annotations are performed to obtain the original architectural renderings.
[0033] In some embodiments, the collected raw image data includes architectural design image data from different historical periods and related cultural and historical data (such as image data of bronzes, pottery, paintings, sculptures and folk images, and their corresponding cultural symbols and style evolution data).
[0034] In some embodiments, basic data annotation is performed on the acquired raw image data, including manual extraction and annotation of the image's texture, color, theme, building type, historical period, style features, and cultural symbols to obtain annotation information.
[0035] S102, construct a style conformity function that represents the difference in features between the original architectural rendering and the target architectural style image based on the annotation information, and a cultural fit function that represents the cultural matching degree between the features of the original architectural rendering and the target architectural style image.
[0036] In some embodiments, before constructing a style conformity function representing the difference in features between the original architectural rendering and the target architectural style image, and a cultural fit function representing the cultural matching degree of the features between the original architectural rendering and the target architectural style image, the method further includes: preprocessing each original architectural rendering to obtain a standardized architectural rendering, wherein the preprocessing includes at least data augmentation, size normalization, noise reduction, and image alignment; constructing a style conformity function representing the difference in features between the original architectural rendering and the target architectural style image, and a cultural fit function representing the cultural matching degree of the features between the original architectural rendering and the target architectural style image, based on the annotation information, includes: constructing a style conformity function representing the difference in features between the standardized architectural rendering and the target architectural style image, and a cultural fit function representing the cultural matching degree of the features between the standardized architectural rendering and the target architectural style image, based on the annotation information.
[0037] Specifically, data augmentation includes: expanding the dataset using oversampling strategies to balance the number of images across different categories and avoid model bias towards a minority of categories; normalizing and unifying image contrast, color saturation, and brightness to improve image adaptability under different lighting and display conditions; size normalization includes resizing all images to 512x512 pixels to fit the model's input size; denoising includes using median filtering to remove high-frequency noise from images and sharpening to enhance image details and improve image clarity; and image alignment includes automatically detecting and removing blank areas at image edges to ensure the building is centered in the image and optimize composition.
[0038] In some embodiments, the style conformity function is constructed according to the following formula: ;in, Let W be the style conformity function under the weight set W. The number of features in the original architectural rendering. The image feature values of the original architectural rendering under the weight set W are... The target image feature values are defined for the target architectural style image; a cultural fit function is constructed based on the following formula: ;in, Let W be the cultural fit function under the weight set W. The number of cultural symbols in the original architectural renderings. Let W be the cultural symbol feature value of the original architectural rendering under the weight set W. The target cultural symbol feature value for the target architectural style image.
[0039] It is worth noting that the style conformity function This is used to measure the similarity in features between the image corresponding to the weight set W and the target architectural rendering. It is the reciprocal function of feature difference (the smaller the difference, the higher the similarity); cultural fit function. This is used to measure the degree of matching between the image corresponding to the weight set W and the specific cultural symbols (such as the Jingchu cultural symbols) of the target building rendering.
[0040] S103, construct a comprehensive objective function based on the style conformity function and the cultural fit function.
[0041] In some embodiments, the comprehensive objective function is constructed according to the following formula: ;in, Let W be the comprehensive objective function under the weight set W. Let W be the style conformity function under the weight set W. Let W be the cultural fit function under the weight set W. and All of these are adjustable weighting coefficients.
[0042] Understandably, the comprehensive objective function The style conformity function and cultural fit function mentioned above are coupled by adjusting the weight coefficients to maximize both style consistency and cultural accuracy during the optimization process.
[0043] S104: Treat each original architectural rendering as a particle, determine the initial weight set of each original architectural rendering based on the annotation information, and use the initial weight set as the initial position of the particle.
[0044] In some embodiments, the annotation information includes at least the color, texture, shape, pattern, and cultural symbols of the original architectural renderings; determining an initial weight set for each original architectural rendering based on the annotation information includes: determining a first weight for color, a second weight for texture, a third weight for shape, a fourth weight for pattern, and a fifth weight for cultural symbols in the original architectural renderings; and using the first weight, second weight, third weight, fourth weight, and fifth weight as the initial weight set.
[0045] S105, iteratively update the initial position and calculate the comprehensive objective function based on the position update results of each round. Stop iteratively updating the initial position when the calculated value of the comprehensive objective function is greater than a preset threshold.
[0046] In some embodiments, before iteratively updating the initial position, the method further includes: determining an initial velocity to characterize the particle optimization direction; and iteratively updating the initial position, including: iteratively updating the initial position according to the following formula: ; ; ; ;in, The particle velocity in the current iteration round, hour The initial velocity, For inertial weights, The particle velocity from the previous iteration. The local optimal solution found for each particle in the current round. The globally optimal solution found for the entire particle population in the current round. and All are random numbers. and All are acceleration constants. and acceleration constant The minimum and maximum values, and acceleration constant The minimum and maximum values, This represents the current iteration number. The maximum number of iterations, and All are constants. and Inertial weight The maximum and minimum values, This represents the particle position in the current iteration. This represents the particle position in the previous iteration.
[0047] It should be noted that if the calculated value of the comprehensive objective function is not greater than the preset threshold, but the number of iterations at the initial position has reached the maximum number of iterations, the iteration update of the initial position will also stop.
[0048] In some embodiments, the size of the preset threshold and the maximum number of iterations is not specifically limited, and can be set according to actual needs.
[0049] It is worth noting that this embodiment designs a comprehensive objective function that takes into account both style conformity and cultural fit, and adjusts the particle velocity weight value accordingly (i.e., (Dynamic adjustment) and learning factor (i.e., speedup constant) and The dynamically adjusted Particle Swarm Optimization (PSO) algorithm enables particles to explore the search space more effectively, avoiding local optima and accelerating convergence. Specifically, this dynamic optimization method ensures that the selected feature weights optimally reflect the design intent and aesthetic standards. Compared to traditional manual or fixed weight settings, this embodiment achieves the optimal combination of feature weights, resulting in generated renderings that better meet expectations in terms of color harmony, texture realism, structural rationality, and cultural connotation, significantly improving artistic and cultural accuracy.
[0050] S106, based on the final position obtained after the last iteration update, train the preset initial diffusion model to obtain the final high-definition restoration model.
[0051] In some embodiments, a preset initial diffusion model is trained based on the final position obtained after the last iteration update to obtain a final high-definition restoration model, including: calculating the comprehensive style feature parameters of the original architectural rendering based on the final position; inputting the comprehensive style feature parameters into the initial diffusion model for training to obtain the final high-definition restoration model; wherein, the comprehensive style feature parameters are calculated according to the following formula: F adjusted =Wc·Fc+Wt·Ft+Wsh·Fsh+Wp·Fp+Wsy·Fsy; among them, F adjusted For the comprehensive style feature parameters, Wc, Wt, Wsh, Wp, and Wsy are the values corresponding to the first, second, third, fourth, and fifth weights in the final position, respectively, and Fc, Ft, Fsh, Fp, and Fsy are the image feature values corresponding to color, texture, shape, pattern, and cultural symbol, respectively.
[0052] To facilitate understanding, the training process of the initial large-scale diffusion model is explained in detail below: 1. Construction of Conditional Diffusion Network: Construct a conditional diffusion network based on the U-Net architecture. This network receives the comprehensive style feature parameters F. adjusted The model takes random noise Fz as conditional input, where Fz is a 128-dimensional uniformly distributed noise vector. The U-Net structure ensures that the model can simultaneously capture both global contextual information and local details of the image during the denoising process.
[0053] 2. Generator Construction: The generator first uses a fully connected layer to connect F... adjusted The feature map is mapped to a 1024-dimensional feature space using Fz. Then, through a series of four convolutional layers and upsampling operations, the feature map is progressively transformed into a 256x256x3 RGB image G(Fz, F...). adjusted Each convolutional layer is followed by a ReLU activation function for a non-linear transformation to enhance the model's expressive power. The output image G(Fz, F...) adjusted ) represents the characteristic F under given conditions.adjusted Matching architectural design renderings.
[0054] 3. Discriminator Construction: The discriminator receives the image G(Fz, F) output by the generator. adjusted ) and conditional feature F adjusted As input, the input image is progressively processed through four convolutional layers, followed by downsampling after the convolution operation. Finally, a fully connected layer transforms the high-dimensional feature vector of the image into a single probability value output. This probability value represents the authenticity of the input image and whether it conforms to the given Jingchu style.
[0055] 4. Loss Function Design: Diversity Loss Ldiv: Ldiv = Σi,j || G(Fz_i,F adjusted ) – G(Fz_j,F adjusted ||^2 is used to measure the L2 distance of generated images under different noise inputs, encouraging the model to generate diverse images.
[0056] Generator loss LG: LG = -log(D(G(Fz, F)) adjusted ), F adjusted )) + ωLdiv × Ldiv, where D(·) is the discriminator function and ωLdiv is the weight coefficient of the diversity loss.
[0057] Discriminator penalty term Lp: Lp = Lp1 + Lp2. Lp1 = (k / 2) × Σ || x, F adjusted D(x, F) adjusted Lp2 = (k / 2) × Σ ||^2, 1)^P, penalizing the gradient of the real image. G(Fz,F adjusted ) D(G(Fz,F adjusted )) ||^2,1) ^P, Penalizes the gradient generated in the image. k is a factor that controls the intensity of the penalty, and P is a hyperparameter.
[0058] Discriminator loss LD: LD = - [log(D(x, F)] adjusted ))–log(1-D(G(Fz,F adjusted ),F adjusted ))]–ωLp × Lp, where ωLp is the weight coefficient of the total penalty term of the discriminator.
[0059] 5. Model Training and Optimization: Standardized architectural renderings are used as training data. An adversarial training strategy is adopted, and the parameters of the generator and discriminator are iteratively optimized by minimizing LG and LD until the model converges, resulting in the final high-definition restored model of the architectural design renderings.
[0060] It is worth noting that, in order to overcome the problems of monotonous style, lack of diversity, and process instability in traditional adversarial generative networks when generating architectural design renderings, this embodiment introduces a diversity loss term (Ldiv) and a discriminator penalty term (Lp) into the diffusion model. The diversity loss Ldiv aims to measure the differences between generated images, encouraging the model to generate more diverse results. The discriminator penalty term Lp (including the real image penalty Lp1 and the generated image penalty Lp2) is used to enhance the stability of the discriminator, prevent mode collapse, and prompt the generator to learn richer and more realistic artistic features.
[0061] The introduction of diversity loss effectively prevents the generated images from becoming monotonous, ensuring that the model can produce a variety of creative and stylistic variations to meet designers' needs for diverse solutions. The addition of a discriminator penalty term significantly enhances the stability of the diffusion model training and reduces uncertainty in the generation process. This results in the final generated architectural design renderings not only possessing stylistic consistency, high-definition detail, and realism, but also significantly improved in terms of creative diversity and artistic value.
[0062] S107: Input the architectural rendering of the building to be repaired into the final high-definition repair model to obtain the final architectural rendering after repair.
[0063] Compared with related technologies, the embodiments of this application have at least the following advantages: By constructing a style conformity function that characterizes the feature differences between the original architectural rendering and the target architectural style image based on annotation information, and a cultural fit function that characterizes the cultural matching degree of the features between the original architectural rendering and the target architectural style image, the style conformity function can measure the degree of similarity in features between the original architectural rendering and the subsequently generated image and the target architectural style image, and the cultural fit function can measure the degree of matching of the original architectural rendering and the subsequently generated image with the specific cultural symbols of the target architectural style image. Furthermore, after constructing a comprehensive objective function based on the style conformity function and the cultural fit function, the comprehensive objective function can comprehensively consider the architectural style and cultural symbols of the subsequently generated image, balancing style conformity and cultural fit. By stopping the iterative update of the initial position when the calculated value of the comprehensive objective function exceeds a preset threshold, and training the preset initial diffusion model based on the final position obtained after the last iteration, a final high-definition restoration model is obtained. This approach, combining multi-scale feature fusion, enables the final high-definition restoration model to capture the core stylistic elements of architectural design renderings more precisely. It effectively avoids the style information loss and inconsistency problems caused by direct style transfer or fixed rule segmentation in traditional methods, allowing the final high-definition restoration model to generate final architectural renderings with highly consistent style and rich detail. Furthermore, this method eliminates the need for complex post-processing steps such as manual rendering, significantly reducing labor costs.
[0064] Based on the same concept as the high-definition restoration method for architectural renderings in the above embodiments, this application also provides a high-definition restoration device for architectural renderings, which can be used to perform the high-definition restoration method for architectural renderings described above. For ease of explanation, the structural schematic diagram of the embodiment of the high-definition restoration device for architectural renderings only shows the parts related to the embodiments of this application. Those skilled in the art will understand that the illustrated structure does not constitute a limitation on the device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0065] As shown in Figure 2, the high-definition restoration device 20 for architectural renderings includes an acquisition module 201, a first construction module 202, a second construction module 203, a determination module 204, an update module 205, a training module 206, and an input module 207. In some embodiments, the above modules can be programmable software instructions stored in memory and executable by a processor. It is understood that in other embodiments, the above modules can also be program instructions or firmware embedded in a processor.
[0066] The acquisition module 201 is used to acquire an architectural rendering dataset, wherein the architectural rendering dataset includes multiple original architectural renderings, each of which includes annotation information for characterizing image features and architectural features; the first construction module 202 is used to construct a style conformity function characterizing the feature differences between the original architectural renderings and the target architectural style image, and a cultural fit function characterizing the cultural matching degree between the original architectural renderings and the target architectural style image, based on the annotation information; the second construction module 203 is used to construct a comprehensive objective function based on the style conformity function and the cultural fit function; the determination module 204 is used to treat each of the original architectural renderings as a particle and determine each of the original architectural renderings based on the annotation information. An initial weight set is generated from the original architectural rendering, and this initial weight set is used as the initial position of the particles. The initial weight set represents the importance of image features and architectural features in the original architectural rendering. An update module 205 iteratively updates the initial position and calculates the comprehensive objective function based on the position update results of each round. The iterative update of the initial position stops when the calculated value of the comprehensive objective function exceeds a preset threshold. A training module 206 trains a preset initial diffusion model based on the final position obtained after the last iterative update to obtain a final high-definition restoration model. An input module 207 inputs the architectural rendering to be restored into the final high-definition restoration model to obtain the restored final architectural rendering.
[0067] The high-definition restoration device 20 for architectural renderings provided in the above embodiments can realize the technical solutions described in the embodiments of the high-definition restoration method for architectural renderings. The specific implementation principles of each module or unit can be found in the corresponding content in the embodiments of the high-definition restoration method for architectural renderings, and will not be repeated here.
[0068] Please refer to Figure 3, which is a schematic diagram of an embodiment of the electronic device of this application. In this embodiment of the invention, the electronic device 300 includes a processor 301, a memory 302, and a display 303. Figure 3 only shows some components of the electronic device 300; however, it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0069] In some embodiments, processor 301 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 302 or process data, such as the high-definition restoration method for architectural renderings in this invention.
[0070] In some embodiments, processor 301 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 301 may be local or remote. In some embodiments, processor 301 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.
[0071] In some embodiments, memory 302 may be an internal storage unit of electronic device 300, such as a hard disk or memory of electronic device 300. In other embodiments, memory 302 may also be an external storage device of electronic device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 300.
[0072] Furthermore, the memory 302 may include both internal storage units of the electronic device 300 and external storage devices. The memory 302 is used to store application software and various types of data installed on the electronic device 300.
[0073] In some embodiments, display 303 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 303 is used to display information from electronic device 300 and to display visual user applications. Components 301-303 of electronic device 300 communicate with each other via a system bus.
[0074] In one embodiment, when the processor 301 executes a high-definition restoration program for architectural renderings stored in the memory 302, the following steps can be implemented: acquiring an architectural rendering dataset, wherein the dataset includes multiple original architectural renderings, each of which includes annotation information characterizing image features and architectural features; constructing a style conformity function characterizing the feature differences between the original architectural renderings and the target architectural style image, and a cultural fit function characterizing the cultural matching degree between the original architectural renderings and the target architectural style image, based on the annotation information; and constructing a comprehensive objective function based on the style conformity function and the cultural fit function; and treating each original architectural rendering as a particle... The process involves determining an initial weight set for each original architectural rendering based on the annotation information, and using this initial weight set as the initial position of the particle. The initial weight set represents the importance of image features and architectural features in the original architectural rendering. The initial position is iteratively updated, and a comprehensive objective function is calculated based on the position update results of each round. The iterative update of the initial position is stopped when the calculated value of the comprehensive objective function exceeds a preset threshold. A preset initial diffusion model is trained based on the final position obtained after the last iteration update to obtain a final high-definition restoration model. The architectural rendering to be restored is input into the final high-definition restoration model to obtain the restored final architectural rendering.
[0075] It should be understood that when the processor 301 executes the high-definition restoration program for the architectural renderings in the memory 302, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0076] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 300 mentioned. Electronic device 300 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 300 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0077] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the high-definition restoration method for architectural renderings provided in the above-described method embodiments.
[0078] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0079] The above provides a detailed description of the high-definition restoration method, apparatus, electronic device, and computer-readable storage medium for architectural renderings provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are 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 method for high-definition restoration of architectural renderings, characterized in that, include: A dataset of architectural renderings is obtained, comprising multiple original architectural renderings, each including annotation information representing image and architectural features. Based on the annotation information, a style conformity function is constructed to characterize the feature differences between the original architectural renderings and the target architectural style image, and a cultural fit function is constructed to characterize the cultural matching degree between the original architectural renderings and the target architectural style image. A comprehensive objective function is then constructed based on the style conformity function and the cultural fit function. Each original architectural rendering is treated as a particle, and each original architectural rendering is determined based on the annotation information. An initial weight set is determined and used as the initial position of the particle, wherein the initial weight set represents the importance of image features and architectural features in the original architectural rendering; the initial position is iteratively updated, and the comprehensive objective function is calculated based on the position update result of each round. The iterative update of the initial position is stopped when the calculated value of the comprehensive objective function is greater than a preset threshold; a preset initial diffusion model is trained based on the final position obtained after the last iteration update to obtain a final high-definition restoration model; the architectural rendering to be restored is input into the final high-definition restoration model to obtain the restored final architectural rendering.
2. The method for high-definition restoration of architectural renderings according to claim 1, characterized in that, The annotation information includes at least the colors, textures, shapes, patterns, and cultural symbols of the original architectural renderings; The step of determining the initial weight set for each original architectural rendering based on the annotation information includes: determining the first weight of color, the second weight of texture, the third weight of shape, the fourth weight of pattern, and the fifth weight of cultural symbols in the original architectural rendering. The first weight, the second weight, the third weight, the fourth weight, and the fifth weight are used as the initial weight set.
3. The method for high-definition restoration of architectural renderings according to claim 2, characterized in that, The step of training a preset initial diffusion model based on the final position obtained after the last iteration update to obtain a final high-definition restoration model includes: calculating the comprehensive style feature parameters of the original architectural rendering based on the final position; inputting the comprehensive style feature parameters into the initial diffusion model for training to obtain the final high-definition restoration model; wherein, the comprehensive style feature parameters are calculated according to the following formula: F adjusted =Wc·Fc+Wt·Ft+Wsh·Fsh+Wp·Fp+Wsy·Fsy; among them, F adjusted The comprehensive style feature parameters are defined as follows: Wc, Wt, Wsh, Wp, and Wsy are the values corresponding to the first weight, second weight, third weight, fourth weight, and fifth weight in the final position, respectively; and Fc, Ft, Fsh, Fp, and Fsy are the image feature values corresponding to color, texture, shape, pattern, and cultural symbol, respectively.
4. The method for high-definition restoration of architectural renderings according to claim 1, characterized in that, Before iteratively updating the initial position, the method further includes: determining an initial velocity to characterize the particle optimization direction; the iterative update of the initial position includes: iteratively updating the initial position according to the following formula: ; ; ; ;in, The particle velocity in the current iteration round, hour The initial velocity, For inertial weights, The particle velocity from the previous iteration. The local optimal solution found for each particle in the current round. The globally optimal solution found for the entire particle population in the current round. and All are random numbers. and All are acceleration constants. and acceleration constant The minimum and maximum values, and acceleration constant The minimum and maximum values, This represents the current iteration number. The maximum number of iterations, and All are constants. and Inertial weight The maximum and minimum values, This represents the particle position in the current iteration. This represents the particle position in the previous iteration.
5. The method for high-definition restoration of architectural renderings according to claim 1, characterized in that, The step of constructing a style conformity function representing the feature differences between the original architectural rendering and the target architectural style image based on the annotation information, and a cultural fit function representing the cultural matching degree between the original architectural rendering and the target architectural style image, includes: constructing the style conformity function according to the following formula: ;in, Let W be the style conformity function under the weight set W. The number of features in the original architectural rendering. Let W be the image feature values of the original architectural rendering under the weight set W. The target image feature value is the target architectural style image; the cultural fit function is constructed according to the following formula: ;in, Let W be the cultural fit function under the weight set W. The number of cultural symbols in the original architectural rendering. Let W be the cultural symbol feature value of the original architectural rendering under the weight set W. The target cultural symbol feature value is the target architectural style image.
6. The method for high-definition restoration of architectural renderings according to claim 1, characterized in that, The step of constructing a comprehensive objective function based on the style conformity function and the cultural fit function includes: constructing the comprehensive objective function according to the following formula: ;in, Let W be the comprehensive objective function under the weight set W. Let W be the style conformity function under the weight set W. Let W be the cultural fit function under the weight set W. and All of these are adjustable weighting coefficients.
7. The method for high-definition restoration of architectural renderings according to any one of claims 1 to 6, characterized in that, Before constructing the style conformity function representing the feature differences between the original architectural rendering and the target architectural style image, and the cultural fit function representing the cultural matching degree between the original architectural rendering and the target architectural style image based on the annotation information, the method further includes: preprocessing each original architectural rendering to obtain a standardized architectural rendering, wherein the preprocessing includes at least data augmentation, size normalization, noise reduction, and image alignment; the construction of the style conformity function representing the feature differences between the original architectural rendering and the target architectural style image, and the cultural fit function representing the cultural matching degree between the original architectural rendering and the target architectural style image based on the annotation information includes: constructing the style conformity function representing the feature differences between the standardized architectural rendering and the target architectural style image, and the cultural fit function representing the cultural matching degree between the standardized architectural rendering and the target architectural style image based on the annotation information.
8. A high-definition restoration device for architectural renderings, characterized in that, include: The module includes an acquisition module, a first construction module, a second construction module, a determination module, an update module, a training module, and an input module. The acquisition module is used to acquire an architectural rendering dataset, wherein the architectural rendering dataset includes multiple original architectural renderings, each of which includes annotation information for characterizing image features and architectural features; the first construction module is used to construct a style conformity function characterizing the feature differences between the original architectural renderings and the target architectural style image, and a cultural fit function characterizing the cultural matching degree between the original architectural renderings and the target architectural style image, based on the annotation information; the second construction module is used to construct a comprehensive objective function based on the style conformity function and the cultural fit function; the determination module is used to treat each of the original architectural renderings as a particle, and determine each of the original architectural renderings based on the annotation information. An initial weight set is generated from the original architectural rendering, and this initial weight set is used as the initial position of the particles. The initial weight set represents the importance of image features and architectural features in the original architectural rendering. An update module iteratively updates the initial position and calculates the comprehensive objective function based on the position update results of each round. The iterative update of the initial position stops when the calculated value of the comprehensive objective function exceeds a preset threshold. A training module trains a preset initial diffusion model based on the final position obtained after the last iteration update to obtain a final high-definition restoration model. An input module inputs the architectural rendering to be restored into the final high-definition restoration model to obtain the restored final architectural rendering.
9. An electronic device, the electronic device comprising a processor and a memory, characterized in that, The memory is used to store instructions, and the processor is used to call the instructions in the memory, causing the electronic device to execute the high-definition restoration method of the architectural rendering as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform a high-definition restoration method for architectural renderings as described in any one of claims 1 to 7.