Pix2Pix-based vector drawing generation model training method

By using a Pix2Pix-based generative adversarial network model training method, the problems of low efficiency and low accuracy in CAD drawing processing have been solved, achieving intelligent generation and efficient annotation and repair, thus forming an AI model training standard for the construction industry.

CN120997865APending Publication Date: 2025-11-21SHENZHEN CAPOL INT & ASSOC CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511084672.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, CAD drawings are processed inefficiently and with low accuracy, and algorithms that rely on human experience or rule-driven approaches have poor generalization capabilities.

Method used

A Pix2Pix-based generative adversarial network (GAN) model is adopted. By constructing a paired graph set and performing adversarial training, the GAN model is optimized until convergence, generating a vector drawing generation model for automatically outputting target building floor plans.

Benefits of technology

It enables intelligent generation, annotation, repair, and style transfer of CAD drawings, improving processing efficiency and quality, reducing manual intervention costs, and establishing an AI model training standard for the construction industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997865A_ABST
    Figure CN120997865A_ABST
Patent Text Reader

Abstract

The invention discloses a Pix2Pix-based vector drawing generation model training method, which comprises the following steps of: acquiring a plurality of real architectural plane graphs, constructing a pairing graph set, and reflecting a corresponding relationship between an original architectural plane graph and a target architectural plane graph in the pairing graph set; inputting the paired atlas into a generative adversarial network model for adversarial training, and outputting a feedback result of the adversarial training; and based on the feedback result, performing iterative optimization on the generative adversarial network model until adversarial training of the generative adversarial network model is converged, and obtaining a vector drawing generation model. According to the method, the generative adversarial network model is trained based on the paired graph set, so that the vector drawing generation model capable of automatically outputting the target architectural plane graph according to the input original architectural plane graph is generated, the functions of intelligent generation, labeling, repairing, style migration and the like of the CAD drawing are conveniently realized, the processing efficiency and quality of the CAD drawing are improved, and the user experience is improved. And the manual intervention cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a vector drawing generation model training method based on Pix2Pix. BACKGROUND

[0002] With the development of artificial intelligence technology, especially the breakthrough of deep learning in image processing and natural language understanding, the application of AI in engineering design is gradually increasing. CAD (Computer-Aided Design) drawings are important carriers in the fields of industrial design, architectural design, and mechanical manufacturing, and their digitization and intelligent processing have become a current research hotspot. Traditional CAD drawing processing relies on manual experience or rule-driven algorithms, which has low efficiency and poor generalization ability. In recent years, deep learning has been widely applied in image generation, image restoration, style transfer, and other fields, and has achieved remarkable results.

[0003] Some artificial intelligence models in the prior art can automatically process some CAD drawings, but the clarity, accuracy, and efficiency of processing images cannot meet the requirements.

[0004] Therefore, the prior art still has defects. SUMMARY

[0005] The technical problem to be solved by the present application is to provide a vector drawing generation model training method based on Pix2Pix to solve the above-mentioned defects of the prior art. The technical solution adopted by the present application is as follows:

[0006] In a first aspect, the present application provides a vector drawing generation model training method based on Pix2Pix, wherein the method comprises:

[0007] Obtain a plurality of real building plans, and construct a paired atlas based on the plurality of real building plans, wherein the paired atlas reflects the correspondence between the original building plan and the target building plan;

[0008] Input the paired atlas into a generative adversarial network model for adversarial training, and output the feedback result of the adversarial training;

[0009] Based on the feedback result, iteratively optimize the generative adversarial network model until the adversarial training of the generative adversarial network model converges, and obtain a vector drawing generation model, wherein the vector drawing generation model is used to output a target building plan according to an input original building plan.

[0010] In an implementation manner, the paired atlas is constructed based on the plurality of real building plans, comprising:

[0011] Optimizing each real building plan, the optimization including: gray-white processing and retaining walls, doors, windows and space layout;

[0012] For the real building plan after optimization, the real building plan with image quality meeting the preset requirement is selected to construct the paired atlas.

[0013] In an implementation manner, the feedback result of the adversarial training is output by inputting the paired atlas into the generative adversarial network model for adversarial training, including:

[0014] The original building plan in the paired atlas is taken as an initial condition, and random drawing is performed on the original building plan based on the generator in the generative adversarial network model, to obtain a hypothetical building plan;

[0015] Based on the hypothetical building plan and the target building plan in the paired atlas, the feedback result of the adversarial training is determined.

[0016] In an implementation manner, the feedback result of the adversarial training is determined based on the hypothetical building plan and the target building plan in the paired atlas, including:

[0017] The target building plan in the paired atlas is taken as a real label;

[0018] The discriminator in the generative adversarial network model compares and scores the hypothetical building plan and the target building plan, to obtain a scoring result;

[0019] Based on the scoring result, the feedback result of the adversarial training is determined.

[0020] In an implementation manner, the feedback result of the adversarial training is determined based on the scoring result, including:

[0021] If the scoring result is higher than a preset score value, the feedback result is determined as positive feedback;

[0022] If the scoring result is lower than the preset score value, the feedback result is determined as negative feedback.

[0023] In an implementation manner, the generative adversarial network model is iteratively optimized based on the feedback result until the adversarial training of the generative adversarial network model converges, to obtain a vector drawing model, including:

[0024] If the feedback result is negative feedback, the generator in the generative adversarial network model is fed back, and the generator in the generative adversarial network model is controlled to perform random drawing on the original building plan again, to obtain a hypothetical building plan again;

[0025] The re-obtained hypothetical building plan and the target building plan are compared and scored by a discriminator in the generative adversarial network model;

[0026] If the re-obtained score is higher than a preset score, it is determined that the adversarial training of the generative adversarial network model converges, and the vector drawing generation model is obtained.

[0027] If the re-obtained score is lower than the preset score, the generator in the generative adversarial network model is fed back again, and the step of generating the hypothetical building plan is re-executed until the adversarial training of the generative adversarial network model converges.

[0028] In an implementation manner, the method further includes:

[0029] After it is determined that the adversarial training of the generative adversarial network model converges, the paired atlas, the model parameters, and the loss function are adjusted based on actual requirements, and the generative adversarial network model is repeatedly trained for multiple times to obtain an optimal vector drawing generation model.

[0030] In a second aspect, an embodiment of the present application further provides a vector drawing generation model training system based on Pix2Pix, wherein the system is configured to implement the steps of the vector drawing generation model training method based on Pix2Pix in any of the above-mentioned solutions, and the system includes:

[0031] A paired atlas construction module is configured to obtain a plurality of real building plans, and construct a paired atlas based on the plurality of real building plans, wherein the paired atlas reflects the corresponding relationship between an original building plan and a target building plan.

[0032] An adversarial training module is configured to input the paired atlas into a generative adversarial network model for adversarial training, and output a feedback result of the adversarial training.

[0033] An iterative optimization module is configured to perform iterative optimization on the generative adversarial network model based on the feedback result until the adversarial training of the generative adversarial network model converges, and obtain a vector drawing generation model, wherein the vector drawing generation model is configured to output a target building plan according to an input original building plan.

[0034] In a third aspect, an embodiment of the present application further provides a terminal, wherein the terminal includes a memory, a processor, and a vector drawing generation model training program based on Pix2Pix stored in the memory and executable on the processor, and when the processor executes the vector drawing generation model training program based on Pix2Pix, the steps of the vector drawing generation model training method based on Pix2Pix in any of the above-mentioned solutions are implemented.

[0035] In a fourth aspect, the embodiments of the present application also provide a computer readable storage medium, wherein the computer readable storage medium stores a Pix2Pix-based vector drawing generation model training program, and the Pix2Pix-based vector drawing generation model training program implements the steps of the Pix2Pix-based vector drawing generation model training method in any of the above solutions on the computer readable storage medium.

[0036] Beneficial effects: Compared with the prior art, the present application provides a Pix2Pix-based vector drawing generation model training method. The present application first acquires a plurality of real building plans, and constructs a paired atlas based on the plurality of real building plans, wherein the paired atlas reflects the correspondence between the original building plan and the target building plan. Then, the paired atlas is input into a generative adversarial network model for adversarial training, and the feedback result of the adversarial training is output. Finally, based on the feedback result, the generative adversarial network model is iteratively optimized until the adversarial training of the generative adversarial network model converges, and a vector drawing generation model is obtained. The vector drawing generation model is used to output a target building plan according to an input original building plan. The present application trains a generative adversarial network model based on a paired atlas, thereby generating a vector drawing generation model that can automatically output a target building plan according to an input original building plan. This facilitates the intelligent generation, labeling, repair, and style transfer of CAD drawings, improves the efficiency and quality of CAD drawing processing, and reduces the cost of manual intervention. Moreover, the present application forms a mature training process, and forms a judgment standard for the training results of AI models for the construction industry, which facilitates expansion to other businesses. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 The flowchart of the preferred embodiment of the Pix2Pix-based vector drawing generation model training method provided by the embodiments of the present application.

[0038] Figure 2 The adversarial flowchart in the Pix2Pix-based vector drawing generation model training method provided by the embodiments of the present application.

[0039] Figure 3 The architecture schematic diagram of the Pix2Pix-based vector drawing generation model training system provided by the embodiments of the present application.

[0040] Figure 4 The principle block diagram of the terminal provided by the embodiments of the present application. DETAILED DESCRIPTION

[0041] For the purposes of the present application, the technical solutions and effects, the following will be further described in detail with reference to the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application, and are not intended to limit the present application.

[0042] The flowchart shown in the drawings is only an example and does not necessarily include all contents and operations or steps, nor does it necessarily execute in the order described. For example, some operations or steps can be further divided, combined or partially merged, so the actual execution order can be changed according to the actual situation.

[0043] It should be understood that the terms used in the present application specification herein are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clear from the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0044] It should be understood that in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first", "second" and the like are used to distinguish the same or similar items with basically the same function and effect. For example, the first control information and the second control information are only used to distinguish different control information, and do not limit the order.

[0045] Those skilled in the art can understand that the terms "first", "second" and the like do not limit the quantity and execution order, and the terms "first", "second" and the like do not necessarily mean different.

[0046] It should also be understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0047] Based on the problems of the prior art, the present application provides a vector drawing generation model training method based on Pix2Pix. The method of the present embodiment can realize intelligent generation, labeling, repair, style transfer and other functions of CAD drawings, improve the efficiency and quality of CAD drawing processing, and reduce the cost of manual intervention. In specific applications, the present embodiment first acquires a plurality of real building plans, and constructs a paired atlas based on the plurality of real building plans, wherein the corresponding relationship between the original building plan and the target building plan is reflected in the paired atlas. Then, the paired atlas is input into a generative adversarial network model for adversarial training, and the feedback result of the adversarial training is output. Finally, based on the feedback result, the generative adversarial network model is iteratively optimized until the adversarial training of the generative adversarial network model converges, and a vector drawing generation model is obtained, which is used to output a target building plan according to an input original building plan. As can be seen, the present embodiment trains a generative adversarial network model based on a paired atlas, thereby generating a vector drawing generation model that can automatically output a target building plan according to an input original building plan. Moreover, the present embodiment forms a mature training process and a set of evaluation criteria for the training results of AI models for the construction industry, facilitating expansion to other businesses.

[0048] pix2pix is an image-to-image conversion model based on conditional generative adversarial network (CGAN). The vector drawing generation model training method based on Pix2Pix of the present embodiment can be applied in a terminal, including a computer and other intelligent product terminals. The trained vector drawing generation model in the present embodiment can be implanted in the APP of a computer, a smart TV or a mobile phone for application. In the present embodiment, as shown in Figure 1 the vector drawing generation model training method based on Pix2Pix includes the following steps:

[0049] Step S100, a plurality of real building plans are acquired, and a paired atlas is constructed based on the plurality of real building plans, wherein the corresponding relationship between the original building plan and the target building plan is reflected in the paired atlas.

[0050] In the early stage of training, the embodiment needs to obtain a plurality of real building plans, which are obtained based on drawings of various sample rooms, various house types and internal partition configurations, covering simple to complex buildings. The embodiment can construct a paired atlas based on the real building plans, which reflects the correspondence between the original building plan (real A picture) and the target building plan (real B picture). That is, the correspondence between a plurality of real A pictures and real B pictures in the paired atlas. Among them, the original building plan (real A picture) is the drawing that needs to be processed (such as needing to be labeled) or needs to be optimized (such as needing to be repaired) in the embodiment, and the target building plan (real B picture) is the effect picture that the embodiment wants to achieve.

[0051] In an implementation manner, when constructing the paired atlas, the embodiment includes the following steps:

[0052] Step S101, performing optimization processing on each real building plan, the optimization processing including: gray-white processing and retaining walls, doors and windows and space layout;

[0053] Step S102, selecting real building plans with image quality meeting preset requirements to construct the paired atlas for the real building plans after optimization processing.

[0054] In specific application, the embodiment can perform optimization processing on each real building plan, the optimization processing including: gray-white processing and retaining walls, doors and windows and space layout. In specific execution, the embodiment can perform gray-white processing on the real building plan, simplify interference information, so as to make the subsequent generative adversarial network model focus more on core space features (such as wall structure). The embodiment can also extract key information such as space layout and line position based on CNN convolutional neural network. Then, the embodiment selects real building plans with image quality meeting preset requirements to construct the paired atlas for the real building plans after optimization processing, so as to ensure the clarity of the paired atlas. In the embodiment, after obtaining the paired atlas, the embodiment can also use preset rules to screen out low-quality samples for the paired atlas, so as to avoid samples not meeting the requirements entering the subsequent model training step. For example, the preset rules are wall closure and space rationality, and high-quality paired atlas meeting the two preset rules is selected to enter the subsequent training step, so as to improve the training accuracy.

[0055] Step S200, inputting the paired atlas into the generative adversarial network model for adversarial training, and outputting feedback results of the adversarial training.

[0056] In combination Figure 2As shown in the above Table 1, the embodiment inputs the paired atlas into the generative adversarial network model, and the generative adversarial network model learns the relationship between the real building plan (realA picture) and the target building plan (realB picture) in the paired atlas. When the adversarial training is performed, the embodiment outputs the feedback result of the adversarial training.

[0057] In an implementation manner, the adversarial training process of the generative adversarial network model in the embodiment includes the following steps.

[0058] In step S201, the real building plan in the paired atlas is taken as an initial condition, and the generator in the generative adversarial network model is used to randomly draw on the real building plan to obtain a hypothetical building plan.

[0059] In step S202, the feedback result of the adversarial training is determined based on the hypothetical building plan and the target building plan in the paired atlas.

[0060] Specifically, in combination with Figure 2 As shown in the above Table 1, the generative adversarial network model takes the real building plan (realA picture) as an initial condition after receiving the paired atlas. The generator in the generative adversarial network model is used to randomly draw on the real building plan to obtain a hypothetical building plan. In the embodiment, the generator can randomly draw some line segments on the real building plan to modify or repair the real building plan, thereby generating a hypothetical building plan. The purpose of the generator in the embodiment to randomly draw on the real building plan is to try to infer the output close to the target building plan (realB picture) from the real building plan (realA picture), that is, the hypothetical building plan in the embodiment, such as drawing lines according to the original framework of the real building plan (realA picture) to complete the wall, and the obtained picture after completion is the hypothetical building plan. In order to verify the generation ability of the generator, the embodiment can determine the feedback result of the adversarial training based on the hypothetical building plan and the target building plan in the paired atlas, and the feedback result can reflect the situation of the adversarial training.

[0061] The embodiment can determine whether the assumed building plan is close to the target building plan by generating a discriminator of a generative adversarial network model, comparing the assumed building plan with the target building plan in the matched set, and multiple rounds of scoring. Specifically, the embodiment takes the target building plan in the matched set as a real label, then compares and scores the assumed building plan and the target building plan based on the discriminator in the generative adversarial network model to obtain a scoring result, and then determines a feedback result of adversarial training based on the scoring result. If the scoring result is higher than a preset score value, it means that the assumed building plan is close to the target building plan, and the feedback result is determined as positive feedback. If the scoring result is lower than the preset score value, it means that the assumed building plan deviates from the target building plan, and the feedback result is determined as negative feedback.

[0062] In step S300, the generative adversarial network model is iteratively optimized based on the feedback result until the adversarial training of the generative adversarial network model converges, and a vector drawing model is obtained, which is used to output a target building plan according to an input original building plan.

[0063] Based on the feedback result, the generative adversarial network model can be iteratively optimized until the adversarial training of the generative adversarial network model converges. If the feedback result is positive feedback, the assumed building plan drawn by the generator can be retained. If the feedback result is negative feedback, the assumed building plan drawn by the generator will be discarded, and re-drawing, re-comparison and re-scoring will be performed until the vector drawing model is obtained by training, which is used to output a target building plan according to an input original building plan.

[0064] In an implementation manner, step S300 of the embodiment specifically includes the following steps:

[0065] In step S301, if the feedback result is negative feedback, the generator in the generative adversarial network model is fed back, and the generator in the generative adversarial network model is controlled to randomly draw on the original building plan again to obtain an assumed building plan again.

[0066] In step S302, the assumed building plan obtained again and the target building plan are compared and scored based on the discriminator in the generative adversarial network model to obtain a scoring result again.

[0067] In step S303, if the scoring result obtained again is higher than a preset score value, it is determined that the adversarial training of the generative adversarial network model converges, and the vector drawing model is obtained.

[0068] Step S304, if the re-obtained score result is lower than the preset score value, the generator in the generative adversarial network model is fed back again, and the step of generating the assumed building plan is re-executed until the adversarial training of the generative adversarial network model converges.

[0069] Therefore, in the embodiment, the adversarial training logic of the generative adversarial network is that the generator first draws the original building plan, so that the generated assumed building plan is infinitely close to the target building plan. If the score result is higher than the preset score value, the assumed building plan is close to the target building plan. If the score result is lower than the preset score value, the assumed building plan is re-drawn, a new assumed building plan is re-generated, and re-scoring and judgment are performed. When the assumed building plan obtained by each drawing is close to the target building plan, i.e., the score result is higher than the preset score value each time, the adversarial training of the generative adversarial network model converges (low loss), and the vector drawing generation model can be obtained. Through the game learning of the conditional generative adversarial network model (CGAN) in the embodiment, intelligent generation from an input condition to a target result is realized. The typical applications of pix2pix (such as image style conversion and house type optimization) are all based on this logic. Based on the vector drawing generation model in the embodiment, a drawing that is close to the target building plan can be automatically output according to the input original building plan, so that intelligent generation, labeling, repair, and style migration of CAD drawings can be realized, the efficiency and quality of CAD drawing processing are improved, and the cost of manual intervention is reduced. The embodiment is a typical application of pix2pix, such as image style conversion and house type optimization, which can be realized based on the method in the embodiment.

[0070] In addition, after determining that the adversarial training of the generative adversarial network model converges, the input paired atlas, model parameters, and loss function are adjusted by the input end (i.e., the developer) based on actual needs, and the generative adversarial network model can be trained repeatedly to obtain an optimal vector drawing generation model. In the embodiment, the learning rate and the number of rounds are adjusted for different resolution paired atlases during model training, and the most suitable learning rate and number of rounds are selected, such as 0.0001 learning rate and 300 rounds for 1024 resolution. After the vector drawing generation model is trained in the embodiment, the model can be evaluated from the visual quality of the output drawing, whether the loss function is stable, whether the generated drawing meets the expectation, and the model generalization ability.

[0071] In other implementations, the adversarial generation network model of the present embodiment can replace the basic U-Net with U-Net++ / AttentionU-Net, utilize reinforced multi-scale feature fusion (such as fusing wall bodies and spatial relationships at different levels), or focus on key areas through attention mechanisms (preferentially learning load-bearing walls and core areas of house types in the paired atlas set), to improve the accuracy of detail generation. In addition, adaptive instance normalization (AdaIN) can also be introduced to make the generator more flexible to adapt to the house style of different input paired atlas sets. If processing diverse house types (such as modern or retro styles), the original layout can be better preserved while incorporating the target style. In other implementations, the present embodiment can also fuse perceptual loss (Perceptual Loss) by introducing a pre-trained CNN (such as VGG) to extract high-level semantic features, so that the drawings output by the vector drawing generation model of the present embodiment not only "look like pixels", but also are close to the target building plan in "spatial semantics" (such as room function area association), avoiding local details being good but the overall logic being wrong. In addition, an adversarial loss weighting strategy can also be added to dynamically adjust the loss proportion of the generator and the discriminator, which can allow the generator to quickly learn the basic structure in the early stage (by reducing the adversarial loss weight), and to strengthen the detail confrontation in the later stage (by increasing the weight), balancing training stability and accuracy.

[0072] During training, the present embodiment can also introduce a "wall line random offset / missing repair" enhancement feature for the input paired atlas set, simulate actual drawing errors, and make the model more robust. Or the present embodiment can mix different style data (such as simple house types or complex house types) through Style Mixing to expand the generation capability. If the paired atlas set is insufficient, the present embodiment can also pre-train the generator with unsupervised data (such as using only the original building plan realA for self-encoding learning), and then fine-tune it with a small amount of paired atlas set to alleviate the problem of data scarcity. Of course, in addition to the input paired atlas set, the present embodiment can also add text input, such as using CLIP (text-image association model) to assist the discriminator, so that the generated hypothetical building plan not only matches the target building plan, but also aligns with the text semantics (such as the user requiring "warm style", and CLIP can judge whether the generated hypothetical building plan meets the semantics). During the training process, the present embodiment can adopt a phased training method, which first "pre-trains the structure" (only learns the wall layout in the paired atlas set), and then "optimizes the details" (learns features such as doors, windows, and decorations in the paired atlas set), to reduce the learning difficulty. And in the training, samples are generated and visualized synchronously (such as outputting building plans every round), and artificial and automatic indicators (such as spatial rationality scores) are used to monitor convergence to avoid overfitting or underfitting. The present embodiment can also automatically perform wall smoothing and space annotation completion on the output drawings of the vector drawing generation model, or use reinforcement learning to allow user interaction for correction (such as dragging room boundaries or real-time optimization of the model), to improve the actual use experience.

[0073] In summary, the present application firstly acquires a plurality of real building plans, constructs a paired atlas based on the plurality of real building plans, wherein the paired atlas reflects the correspondence between the original building plan and the target building plan. Then, the paired atlas is input into a generative adversarial network model for adversarial training, and the feedback result of the adversarial training is output. Finally, based on the feedback result, the generative adversarial network model is iteratively optimized until the adversarial training of the generative adversarial network model converges, and a vector drawing generation model is obtained, which is used to output a target building plan according to an input original building plan. It can be seen that the present embodiment trains a generative adversarial network model based on a paired atlas, thereby generating a vector drawing generation model that can automatically output a target building plan according to an input original building plan. Moreover, the present embodiment forms a mature training process and a set of evaluation criteria for the training results of AI models for the construction industry, which facilitates expansion to other businesses.

[0074] Based on the above embodiment, the present application further provides a Pix2Pix-based vector drawing generation model training system, which is used to implement the steps of the Pix2Pix-based vector drawing generation model training method in the above embodiment. As shown in Figure 3 The system comprises a paired atlas construction module 10, an adversarial training module 20, and an iterative optimization module 30. Specifically, the paired atlas construction module 10 is used to acquire a plurality of real building plans, and construct a paired atlas based on the plurality of real building plans, wherein the paired atlas reflects the correspondence between the original building plan and the target building plan. The adversarial training module 20 is used to input the paired atlas into a generative adversarial network model for adversarial training, and output the feedback result of the adversarial training. The iterative optimization module 30 is used to iteratively optimize the generative adversarial network model based on the feedback result until the adversarial training of the generative adversarial network model converges, and obtain a vector drawing generation model, which is used to output a target building plan according to an input original building plan.

[0075] The working principles of the various modules in the Pix2Pix-based vector drawing generation model training system of the present embodiment are the same as those of the various steps in the above method embodiment, and will not be repeated here.

[0076] The various modules in the above Pix2Pix-based vector drawing generation model training system can be realized by software, hardware, or a combination thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the terminal in hardware form, or can be stored in the memory in the terminal in software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.

[0077] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 4 As shown. The terminal may include one or more processors 100 ( Figure 4 (Only one is shown in the image), a memory 101, and a computer program 102 stored in the memory 101 and executable on one or more processors 100. For example, a Pix2Pix-based vector paper generation model training program. When one or more processors 100 execute the computer program 102, they can implement the various steps in the Pix2Pix-based vector paper generation model training method embodiment. Alternatively, when one or more processors 100 execute the computer program 102, they can implement the functions of each module / unit in the Pix2Pix-based vector paper generation model training system embodiment, which is not limited here.

[0078] In one embodiment, the processor 100 may be a Central Processing Unit (CPU), or 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 may be a microprocessor or any conventional processor.

[0079] In one embodiment, memory 101 may be an internal storage unit of an electronic device, such as a hard drive or RAM. Memory 101 may also be an external storage device of the electronic device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, memory 101 may include both internal and external storage units. Memory 101 is used to store computer programs and other programs and data required by the terminal. Memory 101 can also be used to temporarily store data that has been output or will be output.

[0080] Those skilled in the art will understand that Figure 4The principle block diagram shown in the figure is only a block diagram of part of the structure related to the technical scheme of the present application, and does not constitute a limitation on the terminal to which the technical scheme of the present application is applied. The specific terminal can include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0081] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing relevant hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, operating database or other medium used in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchl ink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM), etc.

[0082] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for training a vector paper generation model based on Pix2Pix, characterized in that, The method includes: Acquire several real building floor plans, and construct a pairing map set based on these real building floor plans. The pairing map set reflects the correspondence between the original building floor plans and the target building floor plans. The paired graph set is input into a generative adversarial network model for adversarial training, and the feedback results of the adversarial training are output. Based on the feedback results, the generative adversarial network model is iteratively optimized until the adversarial training of the generative adversarial network model converges, resulting in a vector drawing generation model. The vector drawing generation model is used to output a target building floor plan based on the input original building floor plan.

2. The method for training a vector paper generation model based on Pix2Pix according to claim 1, characterized in that, The method of constructing a paired atlas based on several real building floor plans includes: Each actual building floor plan is optimized, including grayscale treatment and preservation of walls, doors, windows and spatial layout; For the optimized real building floor plan, real building floor plans that meet the preset image quality requirements are selected to construct the paired image set.

3. The method for training a vector paper generation model based on Pix2Pix according to claim 1, characterized in that, The step of inputting the paired graph set into a generative adversarial network model for adversarial training and outputting the feedback results of the adversarial training includes: Using the original building floor plan in the pairing map set as initial conditions, the generator in the generative adversarial network model randomly draws on the original building floor plan to obtain the hypothetical building floor plan. Based on the hypothetical building floor plan and the target building floor plan in the paired map set, the feedback results of the adversarial training are determined.

4. The method for training a vector paper generation model based on Pix2Pix according to claim 3, characterized in that, The step of determining the feedback results of adversarial training based on the hypothetical building floor plan and the target building floor plan in the paired map set includes: Use the target building floor plan in the paired map set as the real label; The hypothetical building floor plan and the target building floor plan are compared and scored based on the discriminator in the generative adversarial network model to obtain the scoring results; Based on the scoring results, the feedback results of the adversarial training are determined.

5. The method for training a vector paper generation model based on Pix2Pix according to claim 4, characterized in that, The step of determining the feedback result of the adversarial training based on the scoring result includes: If the scoring result is higher than the preset score, then the feedback result is determined to be positive feedback; If the scoring result is lower than the preset score, then the feedback result is determined to be negative feedback.

6. The method for training a vector paper generation model based on Pix2Pix according to claim 5, characterized in that, Based on the feedback results, the generative adversarial network (GAN) model is iteratively optimized until the adversarial training of the GAN model converges, resulting in a vector paper generation model, including: If the feedback result is negative, then the generator in the generative adversarial network model is fed back, and the generator in the generative adversarial network model is controlled to redraw randomly on the original building floor plan to obtain a new hypothetical building floor plan. The discriminator in the generative adversarial network model is used to compare and score the newly obtained hypothetical building floor plan and the target building floor plan, and a new scoring result is obtained. If the re-obtained score is higher than the preset score, then the adversarial training of the generative adversarial network model is determined to have converged, and the vector paper generation model is obtained. If the re-obtained score is lower than the preset score, it is fed back to the generator in the generative adversarial network model again, and the step of generating the hypothetical building floor plan is repeated until the adversarial training of the generative adversarial network model converges.

7. The method for training a vector paper generation model based on Pix2Pix according to claim 1, characterized in that, The method further includes: Once the adversarial training of the generative adversarial network model has converged, the input pairing graph set, model parameters, and loss function are adjusted based on actual needs, and the generative adversarial network model is trained repeatedly to obtain the optimal vector paper generation model.

8. A training system for a vector paper generation model based on Pix2Pix, characterized in that, The system is used to implement the steps of the Pix2Pix-based vector paper generation model training method according to any one of claims 1-7, and the system includes: The matching map set construction module is used to acquire several real building floor plans and construct a matching map set based on the several real building floor plans. The matching map set reflects the correspondence between the original building floor plan and the target building floor plan. The adversarial training module is used to input the paired graph set into the generative adversarial network model for adversarial training and output the feedback results of the adversarial training. An iterative optimization module is used to iteratively optimize the generative adversarial network model based on the feedback results until the adversarial training of the generative adversarial network model converges, thereby obtaining a vector drawing generation model. The vector drawing generation model is used to output a target building floor plan based on the input original building floor plan.

9. A terminal, characterized in that, The terminal includes a memory, a processor, and a Pix2Pix-based vector paper generation model training program stored in the memory and executable on the processor. When the processor executes the Pix2Pix-based vector paper generation model training program, it implements the steps of the Pix2Pix-based vector paper generation model training method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a Pix2Pix-based vector paper generation model training program, which implements the steps of the Pix2Pix-based vector paper generation model training method as described in any one of claims 1-7 on the computer-readable storage medium.

Citation Information

Patent Citations

  • Floor structure design method and device based on generative adversarial network

    CN113987637A

  • University campus planning layout grading generation method

    CN114626294A

  • Business building group automatic modeling method based on image learning

    CN115713605A

  • Method for drawing urban noise map by using generative adversarial network

    CN118799437A

  • Building design method and system based on generative adversarial network

    CN120030654A