Large model training method, and picture generation method and device based on large model
By overlapping and detailed marking of the sample pictures of the interior space design of the building, the problem of the poor generation effect of the Lora model in the pavilion design is solved, and high-quality pavilion design renderings are generated, which improves the design efficiency and accuracy.
Patent Information
- Application Number
- CN202510558794.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-15
AI Technical Summary
The existing Lora model is not ideal in a scene with complex elements and diverse content design, and it is difficult to meet design needs.
By obtaining multiple building interior space design samples, overlapping cropping, performing detailed marking processing, determining the object name and searching for corresponding pictures, training the big model based on the first and second marking pictures, and generating the trained big model.
The model's understanding of complex elements and layouts in exhibition hall design has been improved, and high-quality renderings that are more in line with actual needs have been generated, which has improved design efficiency and quality.
Smart Images

Figure CN120495804A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image generation technology, and specifically to a large model training method, and a large model-based image generation method and device. Background Art
[0002] The current exhibition hall design process primarily relies on designers taking on-site measurements and drawing floor plans, followed by modelers creating and rendering the resulting designs. This traditional approach typically consumes significant time and human resources, resulting in low design efficiency. While some AI-generated content (AIGC) technologies have emerged in recent years, such as embedding the Stable Diffusion (SD) model into Krita software to automatically generate interior design drawings, their application in exhibition hall design remains limited.
[0003] Existing Lora (Low-Rank Adaptation of Large Language Models) models for interior design can effectively generate corresponding renderings for scenes with fewer elements. However, for design scenarios such as exhibition halls, which involve complex elements and diverse content, existing Lora models are not suitable and the generation results are often unsatisfactory.
[0004] Therefore, how to effectively train and apply the Lora model suitable for exhibition hall design has become a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The embodiments of the present application provide a large model training method, a large model-based image generation method and device to solve the technical problem that the existing Lora model is not applicable to design scenarios such as exhibition halls involving complex elements and diverse content, and the generation effect is not ideal.
[0006] To solve the above technical problems, the embodiments of the present application provide the following aspects:
[0007] In a first aspect, an embodiment of the present application provides a large model training method, the method comprising:
[0008] Obtain multiple sample images of interior space designs of buildings;
[0009] Performing overlapping cropping on the sample image to obtain a cropped image, wherein in the cropped image, there is an overlapping area between adjacent cropped images;
[0010] Marking the cropped image to obtain a first marked image;
[0011] Determining the name of the object contained in the first marked image, and searching for images containing the object based on the name;
[0012] Marking the image containing the object to obtain a second marked image;
[0013] Based on the first labeled image and the second labeled image, the large model is trained to obtain a trained large model.
[0014] Optionally, before cropping the sample image with overlap to obtain the cropped image, the method further includes:
[0015] Determine the target cutting size;
[0016] determining a target overlap parameter based on the target crop size;
[0017] The sample image is cropped with overlap, and the cropped image includes:
[0018] Based on the target cropping size and the target overlap parameter, the sample image is cropped with overlap to obtain a cropped image.
[0019] Optionally, determining target cropping size and target overlap parameters includes:
[0020] Set the crop size to variable (L c 、W c ), wherein the L c The length of the set cutting size, the W c is the width of the cutting size;
[0021] Determining a scalar of the degree of difference between the size of each sample image and the set cropping size based on the set cropping size and the size of each sample image in the plurality of sample images of interior space design of buildings;
[0022] Calculating the sum of the difference degree scalars, and determining the sum of the difference degree scalars as a total difference degree scalar;
[0023] According to the set cropping size constraint conditions, a cropping size that minimizes the total difference degree scalar while satisfying the constraint conditions is obtained and determined as the target cropping size.
[0024] Optionally, determining the target overlap parameter based on the target cropping size includes:
[0025] The target overlap parameter is determined based on the length of the target cropping size, the total number of the sample images, and the length of each sample image.
[0026] Optionally, the image containing the object is subjected to a marking process to obtain a second marked image, including:
[0027] Based on the name of the object, a marking process is performed on the picture containing the object to obtain a second marked picture.
[0028] In a second aspect, an embodiment of the present application provides a method for generating an image based on a large model, the method comprising:
[0029] Obtain the rough image of the building's interior space and the corresponding prompt words input by the user;
[0030] Based on the large model, the user's input of the rough picture of the building's interior space and the corresponding prompt words are analyzed to generate the target interior space design picture;
[0031] The large model is trained using the method described in any one of the first aspects.
[0032] In a third aspect, an embodiment of the present application provides a large model training device, the device comprising:
[0033] The first acquisition module is used to acquire multiple sample pictures of interior space design of buildings;
[0034] a first execution module, configured to perform overlapping cropping on the sample image to obtain a cropped image, wherein in the cropped image, there is an overlapping area between adjacent cropped images;
[0035] Marking the cropped image to obtain a first marked image;
[0036] Determining the name of the object contained in the first marked image, and searching for images containing the object based on the name;
[0037] Marking the image containing the object to obtain a second marked image;
[0038] Based on the first labeled image and the second labeled image, the large model is trained to obtain a trained large model.
[0039] In a fourth aspect, an embodiment of the present application provides a large model-based image generation device, the device comprising:
[0040] The second acquisition module is used to obtain the rough picture of the building interior space and the corresponding prompt word input by the user;
[0041] The second execution module is used to analyze the rough picture of the building interior space and the corresponding prompt words input by the user based on the large model to generate a target interior space design picture;
[0042] The large model is trained using the method described in any one of the first aspects.
[0043] In a fifth aspect, an embodiment of the present application provides an electronic device comprising: a processor, a memory, and a program stored on the memory and runnable on the processor, wherein when the program is executed by the processor, the steps of a large model training method as described in the first aspect are implemented, or, when the program is executed by the processor, the steps of a large model-based image generation method as described in the second aspect are implemented.
[0044] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the computer program implements the steps of a large model training method as described in the first aspect, or, when the computer program is executed by the processor, the computer program implements the steps of a large model-based image generation method as described in the second aspect.
[0045] In the seventh aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by the processor, implement the steps of a large model training method as described in the first aspect, or, when executed by the processor, implement the steps of a large model-based image generation method as described in the second aspect.
[0046] Therefore, by obtaining multiple sample images of building interior space designs and performing overlapping cropping, the missing elements in the sample images can be avoided, effectively improving the accuracy and diversity of the generated interior space design images. By performing detailed labeling on the cropped images and further image search and labeling in combination with object names, the richness of the diverse data sets required for model training is ensured. Based on the joint training of the first labeled image and the second labeled image, the model can better understand the relationship and layout of complex elements in building interior space design (such as exhibition hall design), thereby generating high-quality building interior space design renderings that are more in line with actual needs in subsequent large-scale model applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0048] Figure 1 A flowchart of a large model training method provided in an embodiment of the present application;
[0049] Figure 2 A flowchart of a large model training method provided in an embodiment of the present application;
[0050] Figure 3 A flowchart of a large model training method provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of cropping a sample image with overlap provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of the operating interface of a model training tool provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the operating interface of a model training tool provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the operating interface of a model training tool provided in an embodiment of the present application;
[0055] Figure 8 A flowchart of a large model-based image generation method provided in an embodiment of the present application;
[0056] Figure 9 A structural block diagram of a large model training device provided in an embodiment of the present application;
[0057] Figure 10 A structural block diagram of a large model-based image generation device provided in an embodiment of the present application;
[0058] Figure 11 This is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0060] Figure 1 A large model training method according to an embodiment of the present application is shown, such as Figure 1 As shown, the method includes:
[0061] Step S101: obtaining a plurality of sample pictures of interior space design of buildings;
[0062] Step S102: cropping the sample image with overlap to obtain a cropped image;
[0063] Among them, in the cropped images, there are overlapping areas between adjacent cropped images;
[0064] Step S103: marking the cropped image to obtain a first marked image;
[0065] Step S104: determining the name of the object contained in the first marked image, and searching for images containing the object based on the name;
[0066] Step S105: Marking the image containing the object to obtain a second marked image;
[0067] Step S106: Train the large model based on the first labeled image and the second labeled image to obtain a trained large model.
[0068] It should be noted that Figure 1 The illustrated method, through a series of steps, aims to generate high-quality renderings of building interior space designs. First, in step S101, multiple sample images of building interior space designs are obtained. These images will serve as the basic data for model training. Next, in step S102, the sample images are cropped with overlap, ensuring that adjacent parts of the cropped images have overlapping areas. This effectively preserves important information and details in the image and avoids content loss due to cropping. In step S103, the cropped images are labeled to obtain a first labeled image. This process typically combines automatic and manual labeling to ensure accuracy and comprehensiveness. Subsequently, in step S104, the names of the objects contained in the first labeled image are determined and, based on these names, images containing the corresponding objects are searched. This step provides richer sample data for subsequent model training. Next, in step S105, the images containing the objects are labeled to obtain a second labeled image. These second labeled images, together with the first labeled images, will constitute the training dataset, providing the model with diverse visual information. Step S106 trains the model based on the first marked image and the second marked image, and finally obtains a trained model that can better understand and generate the complex elements and layout of the building interior space design (such as the exhibition hall design). Finally, when applying the large model, the trained large model can be used to generate the target exhibition hall image based on the rough picture of the building interior space input by the user and the corresponding prompt words. Through this series of steps, the generated renderings can accurately reflect the design intention of the building interior space, and can also show higher quality in terms of element layout, color matching, etc. This method effectively improves the efficiency and quality of the building interior space design, reduces the manpower and time costs required in the traditional design process, and provides designers with more powerful tool support.
[0069] In one possible implementation, Figure 2 As shown, before the sample image is cropped with overlap to obtain the cropped image, the method further includes:
[0070] Step S201: Determine the target cutting size;
[0071] Step S202: Determine target overlap parameters based on the target cropping size.
[0072] Correspondingly, step S102 , performing overlapping cropping on the sample image to obtain a cropped image, includes: step S1021 , performing overlapping cropping on the sample image based on a target cropping size and a target overlap parameter to obtain a cropped image.
[0073] In one possible implementation, Figure 3 As shown, determining the target crop size includes:
[0074] Step S301, set the cutting size as a variable (L c 、W c );
[0075] Among them, L c The length and W of the set cutting size c is the width of the cutting size;
[0076] Step S302: determining a scalar of the degree of difference between the size of each sample image and the set cropping size based on the set cropping size and the size of each sample image in the plurality of sample images of interior space designs of buildings;
[0077] Step S303: Calculate the sum of the difference degree scalars, and determine the sum of the difference degree scalars as the total difference degree scalar;
[0078] Step S304: According to the set cropping size constraints, find the cropping size that minimizes the total difference degree scalar while satisfying the constraints, and determine it as the target cropping size.
[0079] Determining the target overlap parameter based on the target crop size includes determining the target overlap parameter based on the length of the target crop size, the total number of sample images, and the length of each sample image. Specifically, determining the target overlap parameter based on the target crop size is implemented by the following formula: Among them, α is the target overlap parameter, L c is the length of the target crop size, n is the number of sample images, L i is the length of the sample image, i is the i-th sample image, i∈[0,n-1].
[0080] It should be noted that the existing picture cropping can be performed after the length and width of the picture are set, but the actual length and width of the picture cannot exactly fit the set values, which will cause a certain degree of content loss. In the method shown in the embodiment of the present application, the user can choose between manual cropping and automatic cropping. The manual method is to set the length, width, and overlap parameters of the picture to be cropped, and then crop it. In automatic mode, the length, width, and overlap parameters of the picture to be cropped will be calculated based on the training atlas (explained later).
[0081] In the exemplary application scenario, this cropping is based on the image width as the adaptive standard (in actual application, the image length can also be selected as the adaptive standard according to actual needs). Therefore, when cropping, there will be no content loss in the width of the image, but in terms of length, when the original image length exceeds the cropping length, there will be a certain degree of loss. In this case, the image can be cropped multiple times with overlapping until the entire image is cropped. Figure 4 shown.
[0082] Now let's explain the parameters: length (L): the length of the image, width (W): the width of the image, overlap parameter (α): Figure 4 As shown, the blue area is the original image with a length of L. When the cutting length and width are confirmed to be (L c 、W c ), the first cropping will generate an orange frame image, and the second cropping will generate a red frame image. The length of the overlapping area between the two is αL c .
[0083] In automatic mode, the cutting parameters (L c 、W c ), α is calculated as follows:
[0084] Assume that there are n original images with length and width (L i 、W i ), where i∈[0,n-1], assuming the cutting length and width are (L c 、W c ) (It is necessary to ensure that the set cropping length and width cover all images as much as possible), calculate the degree of difference between the cropping size and all images:
[0085]
[0086] Then the total difference scalar for all images is:
[0087] The total constraints are:
[0088] It should be noted that in order to ensure that the content of the cropped image is clear, the cropping length and width cannot be too low, so it must be ≥512. In order to ensure the efficiency of training, the cropping length and width must be ≤1024. And according to the regulations of Lora training, the training material must be an integer multiple of 64. Therefore, the above constraints are obtained. According to the above conditions, the target cropping size (L c 、W c ).
[0089] The overlap parameter is selected based on the following criteria: if the overlap parameter is too high, the more overlap there is, the more training data there will be, which will lead to excessive overlap in the training data, a large increase in the amount of training data, and low training efficiency; if the overlap parameter is too low, the less overlap there is, the less correlation there is between the slices generated from the same original image, making it difficult to extract valid elements during training. Therefore, as a compromise, the calculation formula for this value is:
[0090] Among them, L c The length of the target cutting size.
[0091] In this way, multiple overlapping cropped images can be effectively generated to ensure that the diversity and richness of the sample data are increased while retaining important details. First, the target cropping size and overlap parameters are determined so that the cropped images can share information between adjacent areas, thereby reducing the risk of information loss. By calculating the degree of difference between each sample image and the set cropping size and optimizing the cropping size, the target cropping size is finally obtained to maximize the adaptation to the characteristics of different sample images. The reasonable setting of the overlap parameters ensures effective overlap between the cropping areas, further improving the accuracy and generation effect of subsequent model training. Therefore, this method not only improves the utilization efficiency of sample data, but also provides more accurate data for exhibition hall design generation.
[0092] In one possible implementation, step S104 determines the name of the object contained in the first marked image and searches for images containing the object based on the name; and step S105 labels the image containing the object to obtain a second marked image. Labeling the image containing the object to obtain the second marked image includes: labeling the image containing the object based on the name of the object to obtain the second marked image.
[0093] It should be noted that this implementation method only supplements the materials. The existing model training directly enters the model parameter setting step after image cropping and labeling, and then starts model training. This training process is not effective for complex scenes such as exhibition halls and situations where there are many elements in the original image. Therefore, a new training step is added, namely material supplementation. The specific supplementation process is as follows:
[0094] Read the image labeling file (the first labeled image) and extract the names of common items in the file. For example, in this scenario, there are: posters, display boards, bookshelves, display cabinets, and display screens. Read the generated labeling file and extract the common item names. Based on the extracted item names, use crawler technology to crawl the corresponding item images to supplement the material. For the newly acquired image materials, they need to be labeled again to obtain the second labeled image. However, this time the labeling no longer needs to go through the model. The extracted item names can be directly used to generate the corresponding labeling file to improve labeling efficiency.
[0095] In a specific application scenario, the Lora model training tool can be optimized based on the method shown in the embodiment of this application. If the early cutting and marking operations have been completed, the optimization can be directly entered as shown in the following example. Figure 5 Set the model-related parameters on the page shown, and then start model training.
[0096] like Figure 6 The page shown is the image cropping page. Here, you need to set the original image's atlas path and the cropped output path. You can manually set the crop length, width, and overlap parameters, or choose automatic cropping, which is calculated by the algorithm. Click Start Cropping to complete the image cropping process.
[0097] like Figure 7 The page shown is the material supplement page. The Tag path indicates the address of the marking file. The program will automatically read all txt files in this path to obtain the names of specific items. Supplemental Tags: You can also manually add keywords to specific materials. The program will use these supplemental tags to collect raw images. Material Length and Material Width are the length and width of the image to be cropped, as well as the final output path. Click Start Supplement to complete the material supplement.
[0098] Therefore, the Lora model training tool can be optimized based on the method shown in the embodiment of the present application to improve user convenience.
[0099] In summary, the method shown in the embodiment of the present application can avoid the loss of elements in the sample pictures by obtaining multiple sample pictures of building interior space design and performing overlapping cropping, thereby effectively improving the accuracy and diversity of the generated pictures of building interior space design. By carrying out detailed labeling of the cropped pictures and further image search and labeling in combination with the object names, the richness of the diversified data set required for model training is ensured. Based on the joint training of the first labeled picture and the second labeled picture, the model can better understand the relationship and layout of the complex elements in the building interior space design, obtain a higher quality large model, and improve the applicability and practicality of the large model, thereby generating high-quality exhibition hall design renderings that are more in line with actual needs based on the rough pictures of the building interior space and prompt words provided by the user.
[0100] Figure 8 A method for generating an image based on a large model according to an embodiment of the present application is shown. Figure 8 As shown, the method includes:
[0101] Step S801: Obtaining a rough picture of a building's interior space and a corresponding prompt word input by a user;
[0102] Step S802: Analyze the rough-finished picture of the building interior space and the corresponding prompt words input by the user based on the large model to generate a target interior space design picture;
[0103] Among them, the large model uses Figure 1 The method shown is trained.
[0104] It should be noted that Figure 8 The method shown is an application method for large models. Figure 1 The method shown is a training method for large models. Figure 8 The method shown is described in detail in Figure 1 The description of the method shown will not be repeated in the embodiments of the present application.
[0105] In summary, the method shown in the embodiment of the present application can avoid the loss of elements in the sample pictures by obtaining multiple sample pictures of building interior space design and performing overlapping cropping, thereby effectively improving the accuracy and diversity of the generated pictures of building interior space design. By carrying out detailed labeling of the cropped pictures and further image search and labeling in combination with the object names, the richness of the diversified data set required for model training is ensured. Based on the joint training of the first labeled picture and the second labeled picture, the model can better understand the relationship and layout of the complex elements in the building interior space design, obtain a higher quality large model, and improve the applicability and practicality of the large model, thereby generating high-quality exhibition hall design renderings that are more in line with actual needs based on the rough pictures of the building interior space and prompt words provided by the user.
[0106] Figure 9 A large model training device according to an embodiment of the present application is shown. Figure 9 As shown, the device 90 includes:
[0107] The first acquisition module 901 is used to acquire a plurality of sample pictures of interior space designs of buildings;
[0108] A first execution module 902 is configured to perform overlapping cropping on the sample image to obtain a cropped image, wherein the cropped image has overlapping areas between adjacent cropped images;
[0109] Marking the cropped image to obtain a first marked image;
[0110] Determine the name of the object contained in the first marked image, and search for images containing the object based on the name;
[0111] Marking the image containing the object to obtain a second marked image;
[0112] Based on the first labeled image and the second labeled image, the large model is trained to obtain a trained large model.
[0113] In a possible implementation, the first execution module 902 is further configured to determine a target cropping size before performing overlapping cropping on the sample image to obtain the cropped image;
[0114] Determine target overlap parameters based on target cropping size;
[0115] The sample images are cropped with overlap, and the cropped images include:
[0116] Based on the target cropping size and target overlap parameters, the sample image is cropped with overlap to obtain the cropped image.
[0117] In a possible implementation, the first execution module 902 is further configured to set the cropping size as a variable (L c 、W c ), where L c The length and W of the set cutting size c is the width of the cutting size;
[0118] Determining a scalar of the degree of difference between the size of each sample image and the set cropping size based on the set cropping size and the size of each sample image in the plurality of sample images of interior space design of buildings;
[0119] Calculating the sum of the difference degree scalars, and determining the sum of the difference degree scalars as the total difference degree scalar;
[0120] According to the set cutting size constraints, the cutting size that minimizes the total difference degree scalar while satisfying the constraints is obtained and determined as the target cutting size.
[0121] In a possible implementation, the first execution module is further configured to determine a target overlap parameter based on the length of the target cropping size, the total number of sample images, and the length of each sample image.
[0122] In a possible implementation, the first execution module 902 is further configured to label the image containing the object based on the name of the object to obtain a second labeled image.
[0123] Therefore, by acquiring multiple sample images of building interior space designs and performing overlapping cropping, missing elements in the sample images can be avoided, effectively improving the accuracy and diversity of the generated building interior space design images. By carefully labeling the cropped images and further searching and labeling them based on object names, the richness of the diverse dataset required for model training is ensured. Joint training based on the first and second labeled images enables the model to better understand the relationships and layout of complex elements in building interior space design. This allows the model to generate high-quality building interior space design renderings that better meet actual needs based on the rough building interior space images and prompt words provided by the user.
[0124] Figure 10 A method for generating an image based on a large model according to an embodiment of the present application is shown. Figure 10 As shown, the apparatus 100 includes:
[0125] The second acquisition module 1001 is used to acquire the rough-finished picture of the building interior space and the corresponding prompt words input by the user;
[0126] The second execution module 1002 is configured to analyze the rough-finished image of the building interior space and the corresponding prompt words input by the user based on the large model to generate a target interior space design image;
[0127] Among them, the large model uses Figure 1 The method shown is trained.
[0128] In summary, the method shown in the embodiment of the present application can avoid the loss of elements in the sample pictures by obtaining multiple sample pictures of building interior space design and performing overlapping cropping, thereby effectively improving the accuracy and diversity of the generated pictures of building interior space design. By carrying out detailed labeling of the cropped pictures and further image search and labeling in combination with the object names, the richness of the diversified data set required for model training is ensured. Based on the joint training of the first labeled picture and the second labeled picture, the model can better understand the relationship and layout of the complex elements in the building interior space design, obtain a higher quality large model, and improve the applicability and practicality of the large model, thereby generating high-quality exhibition hall design renderings that are more in line with actual needs based on the rough pictures of the building interior space and prompt words provided by the user.
[0129] The embodiment of the present application further provides an electronic device 110, such as Figure 11 As shown, it includes: a processor 1101, a memory 1102, and a program stored in the memory 1102 and executable on the processor 1101. When the program is executed by the processor, the steps of the large model training method shown in the above embodiment are implemented, or when the program is executed by the processor, the steps of the large model-based image generation method shown in the above embodiment are implemented.
[0130] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the large model training method shown in the above embodiment are implemented, or when the program is executed by a processor, the steps of the image generation method based on the large model as shown in the above embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Wherein, the computer-readable storage medium is such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0131] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the large model training method shown in the above method embodiment, or, when executed by a processor, implement the steps of the large model-based image generation method shown in the above embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0132] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0134] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A large model training method, characterized in that: The method comprises: Obtain multiple sample images of interior space designs of buildings; Performing overlapping cropping on the sample image to obtain a cropped image, wherein in the cropped image, there is an overlapping area between adjacent cropped images; Marking the cropped image to obtain a first marked image; Determining the name of the object contained in the first marked image, and searching for images containing the object based on the name; Marking the image containing the object to obtain a second marked image; Based on the first labeled image and the second labeled image, the large model is trained to obtain a trained large model.
2. The method according to claim 1, characterized in that Before cropping the sample image with overlap to obtain the cropped image, the method further includes: Determine the target cutting size; determining a target overlap parameter based on the target crop size; The sample image is cropped with overlap, and the cropped image includes: Based on the target cropping size and the target overlap parameter, the sample image is cropped with overlap to obtain a cropped image.
3. The method according to claim 2, characterized in that Parameters for determining target crop size and target overlap include: Set the crop size to variable (L c 、W c ), wherein the L c The length of the set cutting size, the W c is the width of the cutting size; Determining a scalar of the degree of difference between the size of each sample image and the set cropping size based on the set cropping size and the size of each sample image in the plurality of sample images of interior space design of buildings; Calculating the sum of the difference degree scalars, and determining the sum of the difference degree scalars as a total difference degree scalar; According to the set cropping size constraint conditions, a cropping size that minimizes the total difference degree scalar while satisfying the constraint conditions is obtained and determined as the target cropping size.
4. The method according to claim 3, characterized in that Determining target overlap parameters based on the target cropping size includes: The target overlap parameter is determined based on the length of the target cropping size, the total number of the sample images, and the length of each sample image.
5. The method according to claim 1, characterized in that The image containing the object is marked to obtain a second marked image including: Based on the name of the object, a marking process is performed on the picture containing the object to obtain a second marked picture.
6. A method for generating an image based on a large model, characterized in that: The method comprises: Obtain the rough image of the building's interior space and the corresponding prompt words input by the user; Based on the large model, the user's input of the rough picture of the building's interior space and the corresponding prompt words are analyzed to generate the target interior space design picture; The large model is trained using the method according to any one of claims 1 to 5.
7. A large model training device, characterized in that: The device comprises: The first acquisition module is used to acquire multiple sample pictures of interior space design of buildings; a first execution module, configured to perform overlapping cropping on the sample image to obtain a cropped image, wherein in the cropped image, there is an overlapping area between adjacent cropped images; Marking the cropped image to obtain a first marked image; Determining the name of the object contained in the first marked image, and searching for images containing the object based on the name; Marking the image containing the object to obtain a second marked image; Based on the first labeled image and the second labeled image, the large model is trained to obtain a trained large model.
8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the program implements the steps of a large model training method as described in any one of claims 1 to 5, or, when the program is executed by the processor, the program implements the steps of a large model-based image generation method as described in claim 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by the processor, implements the steps of a large model training method as described in any one of claims 1 to 5, or, when executed by the processor, implements the steps of a large model-based image generation method as described in claim 6.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by the processor, implement the steps of a large model training method as described in any one of claims 1 to 5, or the method, when executed by the processor, implement the steps of a large model-based image generation method as described in claim 6.