Three-dimensional indoor scene generation method and device, electronic equipment and storage medium
By obtaining target demand information, and optimizing the generation of three-dimensional indoor scenes based on spatial positional relationship sorting and adaptive layout, the problem of insufficient rationality and authenticity of three-dimensional indoor scenes in the existing technology is solved, and a more realistic and reasonable three-dimensional indoor scene generation is achieved, which improves visual aesthetics and functional practicality.
Patent Information
- Application Number
- CN202510219636.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the three-dimensional indoor scene generated by the three-dimensional indoor scene generation method is low in rationality and authenticity, and lacks global context understanding, resulting in insufficient rationality and authenticity of the generated scene.
By obtaining target demand information, sorting based on the spatial position relationship information of the target items, generating the target item arrangement sequence, and using the adaptive layout optimization coefficient to generate the target item in the room three-dimensional model, combining the multi-modal large language model to extract multi-dimensional scene information, build a spatial relationship network, and ensure the consistency and authenticity of indoor scene layout.
It significantly improves the authenticity and rationality of the generated three-dimensional indoor scenes, balances the spatial function and aesthetics, improves the visual aesthetics and functional practicality, and enhances the user experience.
Smart Images

Figure CN120298573A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a three-dimensional indoor scene generation method, device, electronic equipment and storage medium. Background Art
[0002] A 3D indoor scene is a digital space model constructed by computer technology, which can simulate a real or imaginary indoor environment in a three-dimensional form. A 3D indoor scene is a dynamically explorable virtual environment that includes spatial structure, physical properties, and interactive logic. Realistic 3D indoor scenes are of great significance in improving user experience, assisting design and decision-making, reducing costs and risks, promoting sales and marketing, education and training, and cultural inheritance and protection.
[0003] In the related art, the traditional three-dimensional indoor scene generation method can be mainly divided into two types: implicit three-dimensional indoor scene generation method and explicit three-dimensional indoor scene generation method. The above-mentioned traditional implicit three-dimensional indoor scene generation method can generate a three-dimensional indoor scene based on a diffusion or large language model. However, the above-mentioned traditional implicit three-dimensional indoor scene generation method lacks global contextual understanding and ignores the rationality of the overall layout, resulting in low rationality and authenticity of the three-dimensional indoor scene generated based on the traditional implicit three-dimensional indoor scene generation method. The above-mentioned traditional explicit three-dimensional indoor scene generation method can guide the generation of three-dimensional indoor scenes by defining a series of rules. However, the above-mentioned traditional explicit three-dimensional indoor scene generation method is limited by the completeness of the rules and the constraints of the algorithm. When the rules are not complete or the algorithm is not flexible enough, the three-dimensional indoor scene generated based on the above-mentioned traditional explicit three-dimensional indoor scene generation method will lack realism, rationality and diversity.
[0004] Therefore, how to generate three-dimensional indoor scenes more reasonably and realistically is a technical problem that needs to be solved urgently in this field. Summary of the invention
[0005] The present invention provides a three-dimensional indoor scene generation method, device, electronic device and storage medium, which are used to solve the defects of low rationality and authenticity of three-dimensional indoor scenes generated by traditional three-dimensional indoor scene generation methods in the prior art, and realize more reasonable and more realistic generation of three-dimensional indoor scenes.
[0006] The present invention provides a three-dimensional indoor scene generation method, comprising the following steps.
[0007] Obtain target requirement information, where the target requirement information includes room information of the three-dimensional indoor scene to be generated, type information of each target item to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes the spatial position relationship information between each target item and other target items except each target item and / or the spatial position relationship information between each target item and spatial composition elements. The spatial composition elements include the floor and walls, and at least one of the ceiling, door, and window; Based on the spatial position relationship information corresponding to each target item, sort each target item to obtain a target item arrangement sequence; Based on the room information of the three-dimensional indoor scene to be generated, generate a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated; Based on the type information of each target item and the spatial position relationship information corresponding to each target item, in the order of each target item from front to back in the target item arrangement sequence, generate each target item in the room three-dimensional model in sequence to obtain the generated three-dimensional indoor scene.
[0008] According to a three-dimensional indoor scene generation method provided by the present invention, the step of sorting each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence includes: Based on the spatial position relationship information corresponding to each target item, obtain the target items whose spatial position relationship with the wall is to lean on as the first target items, and determine the other target items except the first target items among each target item as the second target items; Based on the spatial position relationship information corresponding to each second target item, obtain the sum of the number of target items and spatial composition elements having a spatial position relationship with each second target item as the constraint quantity corresponding to each second target item; After adding the first target items to an empty queue, add each second target item to the empty queue in the order from largest to smallest of the constraint quantity to obtain the target item arrangement sequence; Wherein, when the number of the first target items is multiple, the arrangement order of each first target item in the target item arrangement sequence is randomly determined; when the constraint quantities corresponding to multiple second target items are the same, the arrangement order of the multiple second target items in the target item sorting queue is randomly determined.
[0009] A method for generating a three-dimensional indoor scene provided by the present invention, based on the type information of each target item and the spatial position relationship information corresponding to each target item, and in the order from front to back of each target item in the target item arrangement sequence, generating each target item in the room three-dimensional model in sequence, including: Determine whether the th target item in the target item arrangement sequence is the first target item or the second target item, where the is a positive integer starting from 1; When it is determined that the th target item is the first target item, based on the adaptive layout optimization coefficient corresponding to the th target item, calculate the original position information of the th target item in the room three-dimensional model; Based on the type information of the th target item, correct the original position information of the th target item in the room three-dimensional model to obtain the target position information of the th target item in the room three-dimensional model; Based on the type information of the th target item, generate the target position information of the th target item at the target position information of the th target item in the room three-dimensional model. Based on the offset between the target position information and the original position information of the th target item in the room three-dimensional model, update the adaptive layout optimization coefficient corresponding to the th target item, and determine the updated adaptive layout optimization coefficient corresponding to the th target item as the adaptive layout optimization coefficient corresponding to the th target item; When the has not reached the maximum value, increase the by 1, and return to execute the step of determining whether the th target item in the target item arrangement sequence is the first target item or the second target item.
[0010] According to a method for generating a three-dimensional indoor scene provided by the present invention, the adaptive layout optimization coefficient corresponding to the th target item includes: the first adaptive layout optimization sub-coefficient corresponding to the th target item and the The second adaptive layout optimization sub - coefficient corresponding to the target item; Based on the adaptive layout optimization coefficient corresponding to the target item, calculate the original position information of the target item in the three - dimensional room model, including: Calculate the product of the first adaptive layout optimization sub - coefficient corresponding to the target item and the first distance corresponding to each sampling point in the three - dimensional room model as the first intermediate result of each sampling point corresponding to the target item, calculate the product of the second adaptive layout optimization sub - coefficient corresponding to the target item and the second distance corresponding to each sampling point, the first distance corresponding to each sampling point is the distance between each sampling point and the wall in the three - dimensional room model, and the second distance corresponding to each sampling point is the average distance between each sampling point and the generated target item model in the three - dimensional room model within a preset range centered on each sampling point; Calculate the product of the first adaptive layout optimization sub - coefficient corresponding to the target item and the first distance corresponding to each sampling point in the three - dimensional room model as the first intermediate result of each sampling point corresponding to the target item, calculate the product of the second adaptive layout optimization sub - coefficient corresponding to the target item and the second distance corresponding to each sampling point, the first distance corresponding to each sampling point is the distance between each sampling point and the wall in the three - dimensional room model, and the second distance corresponding to each sampling point is the average distance between each sampling point and the generated target item model in the three - dimensional room model within a preset range centered on each sampling point; Calculate the sum of the first intermediate result and the second intermediate result of each sampling point corresponding to the target item as the confidence value of each sampling point corresponding to the target item; Based on the order from large to small of the confidence values, sort each sampling point to obtain the sampling point arrangement sequence corresponding to the target item, and determine the sampling points arranged in the first target number of positions in the sampling point arrangement sequence corresponding to the target item as the original sampling points corresponding to the target item; Randomly select one from the original sampling points corresponding to the target item as the target sampling point corresponding to the target item, and determine the position of the target sampling point corresponding to the target item in the three - dimensional room model as the original position information of the target item in the three - dimensional room model. Calculate the sum of the first intermediate result and the second intermediate result of each sampling point corresponding to the target item as the confidence value of each sampling point corresponding to the target item; Based on the order from large to small of the confidence values, sort each sampling point to obtain the sampling point arrangement sequence corresponding to the target item, and determine the sampling points arranged in the first target number of positions in the sampling point arrangement sequence corresponding to the target item as the original sampling points corresponding to the target item; Randomly select one from the original sampling points corresponding to the target item as the target sampling point corresponding to the target item, and determine the position of the target sampling point corresponding to the target item in the three - dimensional room model as the original position information of the target item in the three - dimensional room model. Based on the order from large to small of the confidence values, sort each sampling point to obtain the sampling point arrangement sequence corresponding to the target item, and determine the sampling points arranged in the first target number of positions in the sampling point arrangement sequence corresponding to the target item as the original sampling points corresponding to the target item; Randomly select one from the original sampling points corresponding to the target item as the target sampling point corresponding to the target item, and determine the position of the target sampling point corresponding to the target item in the three - dimensional room model as the original position information of the target item in the three - dimensional room model. Based on the order from large to small of the confidence values, sort each sampling point to obtain the sampling point arrangement sequence corresponding to the target item, and determine the sampling points arranged in the first target number of positions in the sampling point arrangement sequence corresponding to the target item as the original sampling points corresponding to the target item; Randomly select one from the original sampling points corresponding to the target item as the target sampling point corresponding to the target item, and determine the position of the target sampling point corresponding to the target item in the three - dimensional room model as the original position information of the target item in the three - dimensional room model. Randomly select one from the original sampling points corresponding to the target item as the target sampling point corresponding to the target item, and determine the position of the target sampling point corresponding to the target item in the three - dimensional room model as the original position information of the target item in the three - dimensional room model. Based on the order from large to small of the confidence values, sort each sampling point to obtain the sampling point arrangement sequence corresponding to the target item, and determine the sampling points arranged in the first target number of positions in the sampling point arrangement sequence corresponding to the target item as the original sampling points corresponding to the target item; Randomly select one from the original sampling points corresponding to the target item as the target sampling point corresponding to the target item, and determine the position of the target sampling point corresponding to the target item in the three - dimensional room model as the original position information of the target item in the three - dimensional room model. Based on the order from large to small of the confidence values, sort each sampling point to obtain the sampling point arrangement sequence corresponding to the target item, and determine the sampling points arranged in the first target number of positions in the sampling point arrangement sequence corresponding to the target item as the original sampling points corresponding to the target item;
[0011] According to a three - dimensional indoor scene generation method provided by the present invention, based on the type information of the target item, correct the original position information of the target item in the three - dimensional room model to obtain the Based on the type information of the target item, correct the original position information of the target item in the three - dimensional room model to obtain the original position information of the target item in the three - dimensional room model, and obtain the The target position information of a target object in the three-dimensional model of the room includes: Based on the type information of the target object, generate the model of the target object at the original position information of the target object in the three-dimensional model of the room; model of the target object; When it is determined that the model of the target object overlaps with the generated spatial structure elements and / or the generated target object models in the three-dimensional model of the room, move the model of the target object along the first direction and / or the second direction until the model of the target object does not overlap with the generated spatial structure elements and the generated target object models in the three-dimensional model of the room. The first direction is the direction parallel to the length direction of the three-dimensional model of the room and away from the overlapping area, and the second direction is the direction parallel to the width direction of the three-dimensional model of the room and away from the overlapping area; Determine the position where the model of the target object is located after being moved as the target position information of the target object in the three-dimensional model of the room.
[0012] According to a three-dimensional indoor scene generation method provided by the present invention, based on the spatial position relationship information corresponding to each target object, obtaining the target object that relies on the spatial position relationship with the wall among each target object as the first target object includes: Convert the format of the target demand information to obtain the target demand information in a standardized format; Based on the standardized spatial position relationship information corresponding to each target object in the standardized format of the target demand information, generate a target spatial layout relationship diagram corresponding to the three-dimensional indoor scene to be generated. Any first node in the target spatial layout relationship diagram represents a target object, each second node in the target spatial layout relationship diagram represents a spatial composition element, the connection line between any two first nodes in the target spatial layout relationship diagram represents the spatial position relationship between the two target objects represented by the two nodes, and the connection line between any first node and any second node in the target spatial layout relationship diagram represents the spatial position relationship between the target object represented by the first node and the spatial element represented by the second node; Based on the target spatial layout relationship diagram, obtain the target object that relies on the spatial position relationship with the wall among each target object as the first target object.
[0013] A method for generating a three-dimensional indoor scene provided by the present invention, the obtaining of the target requirement information includes: Obtaining at least one of an image of the real indoor scene corresponding to the to-be-generated three-dimensional indoor scene in the real world, a sketch for describing the to-be-generated three-dimensional indoor scene, and text information for describing the to-be-generated three-dimensional indoor scene as the original requirement information; Inputting the original requirement information into a pre-trained multi-modal large language model to obtain the target requirement information output by the multi-modal large language model.
[0014] The present invention also provides a three-dimensional indoor scene generation device, including the following modules: An information acquisition module, configured to acquire target requirement information, where the target requirement information includes room information of the to-be-generated three-dimensional indoor scene, type information of each target item to be included in the to-be-generated three-dimensional indoor scene, and spatial position relationship information corresponding to each target item, and the spatial position relationship information corresponding to each target item includes spatial position relationship information between each target item and other target items except each target item and / or spatial position relationship information between each target item and spatial composition elements, and the spatial composition elements include a floor and a wall, and at least one of a ceiling, a door, and a window; An item sorting module, configured to sort each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence; A room generation module, configured to generate a room three-dimensional model corresponding to the to-be-generated three-dimensional indoor scene based on the room information of the to-be-generated three-dimensional indoor scene; An item generation module, configured to generate each target item in the room three-dimensional model in sequence according to the front-to-back order of each target item in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item to obtain a generated three-dimensional indoor scene.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the method for generating a three-dimensional indoor scene as described in any one of the above is implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for generating a three-dimensional indoor scene as described in any one of the above is implemented.
[0017] The present invention also provides a computer program product, including a computer program, which when executed by a processor, implements the three-dimensional indoor scene generation method as described in any one of the above.
[0018] The three-dimensional indoor scene generation method, device, electronic device and storage medium provided by the present invention sort each target item based on the spatial position relationship information corresponding to each target item to be included in the three-dimensional indoor scene to be generated, obtain the target item arrangement sequence, generate the room three-dimensional model corresponding to the three-dimensional indoor scene to be generated based on the room information of the three-dimensional indoor scene to be generated, and then generate each target item in the room three-dimensional model in sequence according to the front-to-back order of each target item in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, so as to obtain the generated three-dimensional indoor scene. It can significantly improve the authenticity and rationality of the spatial layout of the generated three-dimensional indoor scene, achieve a balance between spatial function and aesthetics when generating target items in the room three-dimensional model, improve the visual aesthetics and functional practicality of the generated three-dimensional indoor scene, improve user perception, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is one of the flow diagrams of the three-dimensional indoor scene generation method provided by the present invention.
[0021] Figure 2 is a schematic diagram of the image of the indoor scene corresponding to the three-dimensional indoor scene to be generated in the real world in the three-dimensional indoor scene generation method provided by the present invention.
[0022] Figure 3 is a schematic diagram of the sketch of the three-dimensional indoor scene to be generated in the three-dimensional indoor scene generation method provided by the present invention.
[0023] Figure 4 is the second flow diagram of the three-dimensional indoor scene generation method provided by the present invention.
[0024] Figure 5 is a comparison diagram of the influence of the adaptive layout optimization coefficient on the layout of target items in the room three-dimensional model in the three-dimensional indoor scene generation method provided by the present invention.
[0025] Figure 6It is a schematic structural diagram of the three-dimensional indoor scene generation device provided by the present invention.
[0026] Figure 7 It is a schematic structural diagram of the electronic device provided by the present invention. Specific embodiments
[0027] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.
[0028] In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0029] In the description of the present application, the terms "first", "second", etc. are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, in the description of the present application, " / " indicates at least one of the connected objects, and the character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0030] It should be noted that generating a three-dimensional indoor scene is a complex and challenging task, and the generated three-dimensional indoor scene needs to have the rationality and authenticity of the spatial layout, visual aesthetics and functional practicality. Among them, the rationality of the spatial layout of the three-dimensional indoor scene means that the furniture placement needs to conform to the structure and size of the indoor space. The authenticity of the spatial layout of the three-dimensional indoor scene means that the three-dimensional indoor scene is similar to the real-world indoor environment in terms of physical characteristics, visual effects and user experience. The visual aesthetics of the three-dimensional indoor scene means that the furniture layout needs to consider the line of sight flow and layering to create a pleasant visual effect. The functional practicality of the three-dimensional indoor scene means that the furniture placement can meet the actual use requirements.
[0031] In addition, generating realistic 3D indoor scenes requires a balance between geographic measurement consistency, physical interactivity, and visual authenticity. However, the 3D indoor scenes generated by traditional 3D indoor scene generation methods in related technologies have low rationality and authenticity. Therefore, how to generate 3D indoor scenes more reasonably and realistically is a technical problem that needs to be solved in this field.
[0032] In this regard, the present invention provides a three-dimensional indoor scene generation method. The three-dimensional indoor scene generation method provided by the present invention can generate a three-dimensional indoor scene with higher authenticity and rationality based on at least one of an image, a sketch, and a text description of a real indoor scene. The three-dimensional indoor scene generation method provided by the present invention integrates a multi-node interactive generation channel, can extract multi-dimensional scene information from input information, and organize the multi-dimensional scene information into a structured format, and then based on the multi-dimensional scene information in the structured format, construct a spatial relationship network to represent the location of objects, so as to ensure the consistency of the indoor scene layout, thereby improving the authenticity and rationality of the generated three-dimensional indoor scene spatial layout. The improved three-dimensional indoor scene of the present invention also introduces an adaptive layout optimization algorithm, which can achieve a balance between spatial function and aesthetics when generating objects in the three-dimensional indoor scene, thereby improving the visual aesthetics and functional practicality of the generated three-dimensional indoor scene.
[0033] Combine the following Figures 1-5 The invention describes a three-dimensional indoor scene generation method.
[0034] Figure 1 is one of the flow charts of the method for generating a three-dimensional indoor scene provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101, obtaining target demand information, the target demand information including room information of the three-dimensional indoor scene to be generated, type information of each target object to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target object, the spatial position relationship information corresponding to each target object includes spatial position relationship information between each target object and other target objects except each target object and / or spatial position relationship information between each target object and space constituent elements, the space constituent elements including floors and walls, and at least one of ceilings, doors and windows.
[0035] It should be noted that the execution subject of the embodiment of the present invention is a three-dimensional indoor scene generation device. The three-dimensional indoor scene generation device can be configured in electronic devices such as computers or servers.
[0036] Specifically, the three-dimensional indoor scene to be generated is the generation object of the three-dimensional indoor scene generation method provided by the present invention. The above-mentioned three-dimensional indoor scene to be generated can be a real indoor scene objectively existing in the real world, or can be designed by the user based on actual needs.
[0037] In the embodiments of the present invention, the information required to generate the above-mentioned three-dimensional indoor scene to be generated can be determined as the target requirement information. The above-mentioned target requirement information can be determined based on the actual generation requirements of the above-mentioned three-dimensional indoor scene to be generated.
[0038] It should be noted that the room information of the three-dimensional indoor scene to be generated in the embodiments of the present invention can be used to describe the room structure and / or room type of the three-dimensional indoor scene to be generated. The above-mentioned room information can include, but is not limited to, at least one of the type information of the room, the size information of the room, the position information of the doors and windows in the room, and the size information of the doors and windows in the room.
[0039] It should be noted that in the embodiments of the present invention, the items that need to be included in the above-mentioned three-dimensional indoor scene to be generated can be determined as the target items. The type information of the target items can be used to describe the types of the target items. The types of the target items in the embodiments of the present invention can include, but are not limited to, furniture and home furnishings. Among them, furniture refers to the utensils used in human daily life and social activities, which have functions such as sitting, lying, leaning, storing, and partitioning. The furniture in the embodiments of the present invention can include, but is not limited to, single sofas, double sofas, triple sofas, coffee tables, desks, single beds, double beds, wardrobes, chairs, benches, cabinets, and bookshelves, etc. Home furnishings refer to various movable ornaments, artworks, and practical items placed in the family or living space to create a comfortable, beautiful, artistic, and personalized living environment. The home furnishings in the embodiments of the present invention can include, but is not limited to, cups, books, vases, kettles, potted plants, and carpets, etc.
[0040] It should be noted that the spatial position relationship information between any target item and other target items other than the above-mentioned target items in the embodiments of the present invention can be used to describe the spatial position relationship between the above-mentioned target item and other target items other than the above-mentioned target items. The spatial position relationship between the above-mentioned target item and another target item other than the above-mentioned target item can include, but is not limited to, being located above, below, in front of, behind, on the left, on the right, face to face, and back to back, etc. For example, the coffee table is located in front of the sofa, or the kettle is located above the coffee table.
[0041] It should be noted that the spatial composition elements in the embodiments of the present invention refer to the basic elements that make up the indoor building space. The spatial composition elements in the embodiments of the present invention may include, but are not limited to, at least one of a floor, a wall, a ceiling, a door, and a window.
[0042] In the embodiments of the present invention, the spatial position relationship information between any target object and the spatial composition elements can be used to describe the spatial position relationship between the above-mentioned target object and the above-mentioned spatial composition elements. The spatial position relationship between the above-mentioned target object and the above-mentioned spatial composition elements may include, but are not limited to, relying on, hanging, and placing, etc. For example, a sofa relies on a wall, or a chandelier hangs below a ceiling.
[0043] In the embodiments of the present invention, the target demand information can be obtained in various ways. For example, in the embodiments of the present invention, the target demand information can be obtained based on the input of the user, or, in the embodiments of the present invention, deep learning technology can also be used to obtain the target demand information. The specific manner of obtaining the target demand information in the embodiments of the present invention is not limited.
[0044] As an optional embodiment, obtaining the target demand information includes: obtaining at least one of an image of the real indoor scene corresponding to the three-dimensional indoor scene to be generated in the real world, a sketch for describing the three-dimensional indoor scene to be generated, and text information for describing the three-dimensional indoor scene to be generated, as the original demand information.
[0045] It should be noted that the three-dimensional indoor scene to be generated in the embodiments of the present invention may be an indoor scene objectively existing in the real world. The image of the real indoor scene corresponding to the three-dimensional indoor scene to be generated may be obtained by photographing the real indoor scene corresponding to the three-dimensional indoor scene to be generated in the real world using an image sensor.
[0046] Figure 2 is a schematic diagram of the image of the indoor scene corresponding to the three-dimensional indoor scene to be generated in the real world in the three-dimensional indoor scene generation method provided by the present invention. The image of the real indoor scene corresponding to the three-dimensional indoor scene to be generated in the real world is as Figure 2 shown.
[0047] The user can also draw a sketch for describing the three-dimensional indoor scene to be generated based on the actual needs or the real indoor scene corresponding to the three-dimensional indoor scene to be generated.
[0048] Figure 3 is a schematic diagram of the sketch for the three-dimensional indoor scene to be generated in the three-dimensional indoor scene generation method provided by the present invention. The sketch for the three-dimensional indoor scene to be generated is as Figure 3 shown.
[0049] The user can also write text information for describing the to-be-generated three-dimensional indoor scene based on actual needs or the real indoor scene corresponding to the to-be-generated three-dimensional indoor scene above.
[0050] For example, the text information for describing the to-be-generated three-dimensional indoor scene may include "There is a sofa placed against the wall in the room, a potted plant is placed on the right side of the sofa, a coffee table is placed in front of the sofa, and a cup and a book are placed on the coffee table."
[0051] In the embodiments of the present invention, at least one of the image of the real indoor scene corresponding to the to-be-generated three-dimensional indoor scene in the real world, the sketch for describing the to-be-generated three-dimensional indoor scene, and the text information for describing the to-be-generated three-dimensional indoor scene can be obtained in various ways as the original requirement information corresponding to the to-be-generated three-dimensional indoor scene. For example, in the embodiments of the present invention, based on the user's input, at least one of the image of the real indoor scene corresponding to the to-be-generated three-dimensional indoor scene in the real world, the sketch for describing the to-be-generated three-dimensional indoor scene, and the text information for describing the to-be-generated three-dimensional indoor scene can be obtained as the original requirement information.
[0052] Input the original requirement information into the pre-trained multimodal large language model to obtain the target requirement information output by the multimodal large language model.
[0053] Figure 4 It is the second flowchart of the three-dimensional indoor scene generation method provided by the present invention. As Figure 4 shown, after obtaining the original requirement information it is possible to input the above original requirement information into a pre-trained multimodal large language model (Multimodal Large Language Models, abbreviated as MLLMs) and use predefined prompt information Based on the above prompt information the above pre-trained multimodal large language model can perform information extraction on the above original requirement information, so as to obtain the target requirement information output by the above pre-trained multimodal large language model The formula is expressed as follows: Wherein, represents the pre-trained multimodal large language model; represents the room information of the to-be-generated three-dimensional indoor scene; represents the type information of each target item that needs to be included in the to-be-generated three-dimensional indoor scene; represents the spatial position relationship information corresponding to each target item.
[0054] Optionally, the predefined prompt information in the embodiments of the present invention may include "You are an experienced room designer. Please help me analyze the given information and output it in the specified format: '1. Room information:...; 2. Item list:...; 3. Spatial relationship between items:...' It should be noted that the pre-trained multi-modal large language model in the embodiments of the present invention is a new type of artificial intelligence technology that combines the natural language processing ability of large language models (LLMs for short) with the understanding and generation ability of data in other modalities (such as vision, audio, etc.). The pre-trained multi-modal large language model has the ability to understand and generate various types of data (such as text, images, videos, audio, etc.) through self-supervised learning on a large number of unlabeled multi-modal data sets.
[0055] The pre-trained multi-modal large language model in the embodiments of the present invention can be determined based on actual needs. There is no specific limitation on the pre-trained multi-modal large language model in the embodiments of the present invention.
[0056] It should be noted that if the above pre-trained multi-modal large language model fails to extract the room information of the three-dimensional indoor scene to be generated from the above original demand information, or the extracted room information is incomplete, the predefined room information can be determined as the room information of the three-dimensional indoor scene to be generated. Among them, the above predefined room information can be determined based on prior knowledge and / or actual situations. For example, the above predefined room information may include that the length of the room is 10 meters, the width is 7 meters, and the height is 3 meters.
[0057] In the embodiments of the present invention, by obtaining at least one of the images, sketches, and text information corresponding to the three-dimensional indoor scene to be generated in the real world as the original demand information, it is possible to make full use of information in multiple modalities to understand and describe the three-dimensional indoor scene to be generated. By inputting the original demand information into the pre-trained multi-modal large language model, the original demand information can be automatically parsed and the target demand information can be output, avoiding the cumbersome and subjective nature of manual parsing, improving the efficiency and accuracy of demand parsing, enhancing the ability of demand parsing. Users can choose appropriate information forms according to their own needs and preferences to describe the three-dimensional indoor scene to be generated, thereby generating a three-dimensional indoor scene that better meets the user's expectations, and can provide a more accurate data basis for subsequent three-dimensional indoor scene generation.
[0058] Step 102: Sort the target items based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence.
[0059] Specifically, after obtaining the target demand information, based on the spatial position relationship information corresponding to each target item that needs to be included in the to-be-generated three-dimensional indoor scene, each target item can be sorted through at least one of numerical calculation, quantity statistics, conditional judgment, and deep learning technology to obtain a target item arrangement sequence.
[0060] As an optional embodiment, sorting each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence includes: obtaining, based on the spatial position relationship information corresponding to each target item, the target items whose spatial position relationship with the wall is reliance as the first target items, and determining the other target items among each target item except the first target items as the second target items.
[0061] It should be noted that in the stage of generating target items in the three-dimensional room model, as the number of generated target item models in the three-dimensional room model increases, the risk of collision between different target items also increases. Determining the positions of target items in the three-dimensional room model is crucial for avoiding the overlap of target items in the generated three-dimensional room scene.
[0062] In this regard, an adaptive layout optimization coefficient is introduced in the embodiments of the present invention to determine the original position information of target items in the three-dimensional room model, and then by dynamically adjusting the adaptive layout optimization coefficient, the best generation position can be determined for the target item models to be generated next as the number of target item models in the three-dimensional room model increases.
[0063] Moreover, by preferentially generating the models of the target items whose spatial position relationship with the wall is reliance (i.e., the models of the first target items) in the three-dimensional room model of the present application, the overlap of target item models in the three-dimensional room model can be effectively avoided.
[0064] Specifically, based on the spatial position relationship information corresponding to each target item, the target items whose spatial position relationship with the wall is reliance among each target item can be screened as the first target items, and then the other target items among each target item except the first target items can be determined as the second target items.
[0065] As an optional embodiment, obtaining, based on the spatial position relationship information corresponding to each target item, the target items whose spatial position relationship with the wall is reliance as the first target items includes: performing format conversion on the target demand information to obtain the target demand information in a standardized format.
[0066] Specifically, obtain the target demand information After that, the target demand information Perform format standardization on the target requirement information Standardize it into the JSON format to obtain the target requirement information in the standardized format .
[0067] Based on the spatial position relationship information in the standardized format corresponding to each target item in the target requirement information in the standardized format, generate the target spatial layout relationship diagram corresponding to the three-dimensional indoor scene to be generated. Any first node in the target spatial layout relationship diagram represents a target item, and each second node in the target spatial layout relationship diagram represents a spatial composition element. The connection line between any two first nodes in the target spatial layout relationship diagram represents the spatial position relationship between the two target items represented by the two nodes. The connection line between any first node and any second node in the target spatial layout relationship diagram represents the spatial position relationship between the target item represented by any first node and the spatial element represented by any second node.
[0068] It should be noted that due to the complexity and diversity of the indoor scene, it is difficult to concisely and accurately describe the spatial position relationship between items. Therefore, in the embodiments of the present invention, the target spatial layout relationship diagram corresponding to the three-dimensional indoor scene to be generated can be generated based on the above-mentioned target requirement information in the standardized format.
[0069] It should be noted that as Figure 4 shown, the target spatial layout relationship diagram in the embodiments of the present invention is a directed graph. The oval icon in the target spatial layout relationship diagram represents the first node, and the square icon represents the second node.
[0070] In the embodiments of the present invention, the spatial position relationship between any two first nodes in the above-mentioned target spatial layout relationship diagram can be represented by a triple. For example, the triple can represent the target node represented by the th first node in the above-mentioned target spatial layout relationship diagram and the target node represented by the th first node The spatial position relationship between them is .
[0071] In the embodiments of the present invention, the spatial position relationship between any first node and any second node in the above-mentioned target spatial layout relationship diagram can also be represented by a triple. For example, the triple can represent the target node represented by the th first node in the above-mentioned target spatial layout relationship diagram and the spatial composition element represented by the th second node The spatial position relationship between them is .
[0072] It should be noted that when generating the above-mentioned target space layout relationship diagram based on the target requirement information in the above standardized format in the embodiments of the present invention, the spatial position relationship between the first node and the second node can also be supplemented based on predefined spatial position relationship rules.
[0073] Among them, the above-mentioned spatial position relationship rules at least include: for any target item, when the spatial position relationship between the target item and the floor is not included in the above-mentioned target requirement information, the spatial position relationship between the target item and the floor is determined to be placed on the floor.
[0074] Based on the target space layout relationship diagram, obtain the target items among the target items whose spatial position relationship with the wall is to lean on, as the first target items.
[0075] Specifically, after obtaining the above-mentioned target space layout relationship diagram, based on the above-mentioned target space layout relationship diagram, through data screening, obtain the target items among the target items whose spatial position relationship with the wall is to lean on as the first target items.
[0076] For example, as Figure 4 shown in the target items, the spatial position relationship between the sofa and the wall is to lean on, and the spatial position relationship between the potted plant and the wall is to lean on. Then, the sofa and the potted plant can be determined as the first target items, and the coffee table, cup, and book other than the sofa can be determined as the second target items.
[0077] Based on the spatial position relationship information corresponding to each second target item, obtain the sum of the number of target items and spatial composition elements having a spatial position relationship with each second target item, as the constraint quantity corresponding to each second target item.
[0078] After obtaining the above-mentioned target space layout relationship diagram, based on the above-mentioned target space layout relationship diagram, obtain the number of other nodes connected with the first node corresponding to each second target item as the starting point, as the constraint quantity corresponding to each second target item.
[0079] For example, as Figure 4 shown in the target items, the potted plant, coffee table, cup, and book are all second target items. The number of other nodes connected with the first node corresponding to the potted plant as the starting point is 2, the number of other nodes connected with the first node corresponding to the coffee table as the starting point is 2, the number of other nodes connected with the first node corresponding to the cup as the starting point is 1, and the number of other nodes connected with the first node corresponding to the book as the starting point is 1. Then, the constraint quantity corresponding to the potted plant is 2, the constraint quantity corresponding to the coffee table is 2, the constraint quantity corresponding to the cup is 1, and the constraint quantity corresponding to the book is 1.
[0080] In the embodiment of the present invention, by performing format conversion on the target requirement information to obtain the target requirement information in a standardized format, it helps to unify the information expression form, reduce parsing errors caused by format differences, thereby improving the accuracy and efficiency of information processing. Generating a target space layout relationship diagram based on the target requirement information in a standardized format can transform the abstract spatial position relationship into an intuitive graphical representation, making the spatial layout relationship clearer and easier to understand, and facilitating subsequent analysis and processing. By constructing the target space layout relationship diagram, the relative positions and dependency relationships between various target items can be clearly displayed, providing a clearer and more accurate data basis for the subsequent generation of a three-dimensional indoor scene.
[0081] After adding the first target item to the blank queue, each second target item is sequentially added to the blank queue in descending order of the constraint quantity to obtain a target item arrangement sequence.
[0082] Among them, when the quantity of the first target items is multiple, the arrangement order of the first target items in the target item arrangement sequence is randomly determined; when the constraint quantities corresponding to multiple second target items are the same, the arrangement order of the multiple second target items in the target item sorting queue is randomly determined.
[0083] In the embodiment of the present invention, by determining the target item with a spatial position relationship of relying on the wall as the first target item, and then generating the first target item first in the three-dimensional room model, it can avoid the overlap of target items in the generated three-dimensional room scene. Also, by obtaining the constraint quantity corresponding to each second target item, the second target items can be generated in the three-dimensional room model in descending order of the constraint quantity. By preferentially generating the second target items with larger constraint quantities, it can further avoid the overlap of target items in the generated three-dimensional room scene, and can significantly improve the rationality and authenticity of the generated three-dimensional indoor scene.
[0084] Step 103: Generate a room three-dimensional model corresponding to the to-be-generated three-dimensional indoor scene based on the room information of the to-be-generated three-dimensional indoor scene.
[0085] After obtaining the target requirement information, a room three-dimensional model corresponding to the to-be-generated three-dimensional indoor scene can also be generated by using a three-dimensional modeling tool based on the room information of the to-be-generated three-dimensional indoor scene.
[0086] For example, in the embodiments of the present invention, a program content generation software (such as Blender) can be used to create the above-mentioned three-dimensional room model, and its application programming interface covering semantic, relationship, and scene generation functions can be utilized to facilitate the construction of the above-mentioned three-dimensional room model while minimizing redundant tasks. The process of creating the above-mentioned three-dimensional room model first generates spatial composition elements according to the program, including the floor and walls, and at least one of the ceiling, doors, and windows. The above-mentioned spatial composition elements establish the spatial boundaries and basic structures of the above-mentioned three-dimensional room model.
[0087] Optionally, in the case where the above-mentioned three-dimensional room model includes multiple rooms, a room adjacency graph can also be generated to define the number, type, and connectivity of the rooms. The above-mentioned room adjacency graph can be used to guide the generation of the three-dimensional scenes of each room, determine the logical organization and connection between different rooms, thereby providing a clear spatial framework for the room structure and laying a foundation for the generation of subsequent target items.
[0088] Step 104: Based on the type information of each target item and the spatial position relationship information corresponding to each target item, in the order of the target items from front to back in the target item arrangement sequence, each target item is sequentially generated in the three-dimensional room model to obtain the generated three-dimensional indoor scene.
[0089] As an optional embodiment, based on the type information of each target item and the spatial position relationship information corresponding to each target item, in the order of the target items from front to back in the target item arrangement sequence, sequentially generating each target item in the three-dimensional room model includes: determining whether the th target item in the target item arrangement sequence is the first target item or the second target item, where is a positive integer starting from 1.
[0090] When it is determined that the th target item is the first target item, based on the adaptive layout optimization coefficient corresponding to the th target item, the original position information of the th target item in the three-dimensional room model is calculated.
[0091] Based on the type information of the th target item, the original position information of the th target item in the three-dimensional room model is corrected to obtain the target position information of the th target item in the three-dimensional room model.
[0092] Based on the type information of the th target item, the th target item is generated at the target position information of the The target position information of a target item, based on the offset between the target position information and the original position information of the target item in the three-dimensional room model, update the adaptive layout optimization coefficient corresponding to the target item, and use the updated adaptive layout optimization coefficient corresponding to the target item as the adaptive layout optimization coefficient corresponding to the target item.
[0093] In the case where the maximum value is not reached, increase by 1, and return to execute the step of determining whether the target item in the target item arrangement sequence is the first target item or the second target item. In the embodiments of the present invention, each time a model of the first target item is generated in the three-dimensional room model, based on the dynamically updated adaptive layout optimization coefficient, the original generation position of the first target item is flexibly adjusted, so as to achieve a better layout effect. By combining the correction of the original generation position of the first target item based on the type information of the first target item, it is possible to better ensure the rationality and authenticity of the model of the target item in the three-dimensional room model, improve the user experience and satisfaction, and by means of cyclic iteration, each target item in the target item arrangement sequence is processed in turn, which can significantly improve the processing efficiency, reduce manual intervention, and at the same time ensure the coherence and consistency of the layout.
[0094] As an optional embodiment, the adaptive layout optimization coefficient corresponding to the target item includes: the first adaptive layout optimization sub-coefficient corresponding to the target item and the second adaptive layout optimization sub-coefficient corresponding to the target item.
[0095] Based on the adaptive layout optimization coefficient corresponding to the target item, calculate the original position information of the target item in the three-dimensional room model, including: calculate the product of the first adaptive layout optimization sub-coefficient corresponding to the target item and the first distance corresponding to each sampling point in the three-dimensional room model as the first intermediate result of each sampling point corresponding to the target item, calculate the product of the second adaptive layout optimization sub-coefficient corresponding to the target item and the second distance corresponding to each sampling point, the
[0096] Based on the adaptive layout optimization coefficient corresponding to the target item, calculate the original position information of the target item in the three-dimensional room model, including: calculate the product of the first adaptive layout optimization sub-coefficient corresponding to the target item and the first distance corresponding to each sampling point in the three-dimensional room model as the first intermediate result of each sampling point corresponding to the target item, calculate the product of the second adaptive layout optimization sub-coefficient corresponding to the target item and the second distance corresponding to each sampling point, calculate the product of the first adaptive layout optimization sub-coefficient corresponding to the target item and the first distance corresponding to each sampling point in the three-dimensional room model as the first intermediate result of each sampling point corresponding to the target item, calculate the product of the second adaptive layout optimization sub-coefficient corresponding to the target item and the second distance corresponding to each sampling point, calculate the product of the second adaptive layout optimization sub-coefficient corresponding to the target item and the second distance corresponding to each sampling point, The second intermediate result of each sampling point corresponding to a target object, where the first distance corresponding to each sampling point is the distance between each sampling point and the wall in the three-dimensional model of the room, and the second distance corresponding to each sampling point is the average distance between each sampling point and the generated target object model in the three-dimensional model of the room within a preset range centered on each sampling point.
[0097] Calculate the sum of the first intermediate result and the second intermediate result of each sampling point corresponding to the th target object, and use it as the confidence value of each sampling point corresponding to the th target object.
[0098] Sort the sampling points in descending order based on the confidence value to obtain the sampling point arrangement sequence corresponding to the th target object. Determine the sampling points ranked in the top target number positions in the sampling point arrangement sequence corresponding to the th target object as the original sampling points corresponding to the th target object.
[0099] Randomly select one from the original sampling points corresponding to the th target object as the target sampling point corresponding to the th target object. Based on the position of the target sampling point corresponding to the th target object in the three-dimensional model of the room, determine the original position information of the th target object in the three-dimensional model of the room.
[0100] It should be noted that in the embodiments of the present invention, the sampling points in the three-dimensional model of the room can be determined based on prior knowledge and / or actual situations. The sampling points in the three-dimensional model of the room can be evenly distributed on the floor surface and / or wall surface of the three-dimensional model of the room. The distribution density of the sampling points in the three-dimensional model of the room can also be determined based on prior knowledge and / or actual situations.
[0101] Specifically, in the embodiments of the present invention, can be used to represent the first adaptive layout optimization sub-coefficient corresponding to the th target object, and can be used to represent the second adaptive layout optimization sub-coefficient corresponding to the th target object.
[0102] It should be noted that the first adaptive layout optimization sub-coefficient corresponding to the th target object and the second adaptive layout optimization sub-coefficient corresponding to the th target object satisfy
[0103] For the th sampling point in the three-dimensional model of the room, the confidence value of the th target item corresponding to the th sampling point can be calculated based on the following formula : where represents the first distance corresponding to the th sampling point; represents the second distance corresponding to the th sampling point; represents the radius of a preset range centered on the th sampling point; , represents the total number of sampling points in the three-dimensional model of the room.
[0104] It should be noted that the radius of the preset range centered on the th sampling point can be determined based on prior knowledge and / or actual conditions. In the embodiments of the present invention, the specific value of the radius of the preset range centered on the th sampling point is not limited.
[0105] It should be noted that the number of targets in the embodiments of the present invention can be determined based on prior knowledge and / or actual conditions. For example, the value range of the above-mentioned number of targets can be from 8 to 12. In the embodiments of the present invention, the specific value of the above-mentioned number of targets is not limited.
[0106] It should be noted that in the embodiments of the present invention, the position of the target sampling point corresponding to the th target item in the three-dimensional model of the room can be determined as the original position of the center point of the th target item in the three-dimensional model of the room.
[0107] Combined with the dynamically updated first adaptive layout optimization sub-coefficient and second adaptive layout optimization sub-coefficient, as well as the distance between the sampling points and the walls and the average distance between the sampling points and the generated target item models in the three-dimensional model of the room, the embodiments of the present invention can more accurately obtain the confidence of each sampling point in the three-dimensional model of the room when generating the first target item each time. Furthermore, based on the above confidence, the original position information of the first target item in the three-dimensional model of the room can be obtained more reasonably, and various factors of the spatial layout, including spatial openness and relative positions between items, can be comprehensively considered when laying out the first target item in the three-dimensional model of the room, which can further improve the rationality and authenticity of the generated three-dimensional indoor scene.
[0108] As an optional embodiment, based on the type information of the th target object, correct the original position information of the th target object in the three-dimensional room model to obtain the target position information of the th target object in the three-dimensional room model, including: based on the type information of the th target object, generate a model of the th target object at the original position information of the th target object in the three-dimensional room model.
[0109] When it is determined that the model of the th target object overlaps with the generated spatial structure elements and / or the generated target object models in the three-dimensional room model, move the model of the th target object along the first direction and / or the second direction until the model of the th target object does not overlap with the generated spatial structure elements and the generated target object models in the three-dimensional room model. The first direction is the direction parallel to the length direction of the three-dimensional room model and away from the overlapping area, and the second direction is the direction parallel to the width direction of the three-dimensional room model and away from the overlapping area.
[0110] Determine the position where the model of the th target object is located after moving as the target position information of the th target object in the three-dimensional room model.
[0111] It should be noted that after moving the model of the th target object, the position where the center point of the model of the th target object is located can be determined as the target position of the th target object in the three-dimensional room model.
[0112] Figure 5 is a comparison chart of the influence of the adaptive layout optimization coefficient on the layout of target objects in the three-dimensional room model provided by the present invention. As Figure 5 shown, when the adaptive layout optimization coefficient is different, the target objects in the three-dimensional room model are different.
[0113] After determining the target position information of the th target object in the three-dimensional room model, the offset between the target position information and the original position information of the th target object in the three-dimensional room model can be calculated , and the first adaptive layout optimization sub-coefficient corresponding to the th target object is calculated through the following formula and the second adaptive layout optimization sub - coefficient corresponding to the th target item : Wherein, represents the proportionality factor of the control variation.
[0114] As an optional embodiment, after determining that the th target item in the target item arrangement sequence is the first target item or the second target item, the method further includes: when determining that the th target item is the second target item, based on the type information of the th target item and the corresponding spatial position relationship information, generating the th target item in the room three - dimensional model.
[0115] When has not reached the maximum value, increase by 1, and return to execute the step of determining whether the th target item in the target item arrangement sequence is the first target item or the second target item.
[0116] In the embodiments of the present invention, by sorting each target item based on the spatial position relationship information corresponding to each target item that needs to be included in the to - be - generated three - dimensional indoor scene, obtaining the target item arrangement sequence, generating the room three - dimensional model corresponding to the to - be - generated three - dimensional indoor scene based on the room information of the to - be - generated three - dimensional indoor scene, and then generating each target item in the room three - dimensional model in sequence according to the order of each target item from front to back in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, the generated three - dimensional indoor scene is obtained. This can significantly improve the authenticity and rationality of the spatial layout of the generated three - dimensional indoor scene, can achieve a balance between spatial function and aesthetics when generating target items in the room three - dimensional model, can improve the visual aesthetics and functional practicality of the generated three - dimensional indoor scene, can improve user perception, and has broad application prospects.
[0117] Figure 6 is a schematic structural diagram of the three - dimensional indoor scene generation device provided by the present invention. The following describes the three - dimensional indoor scene generation device provided by the present invention in conjunction with Figure 6 The three - dimensional indoor scene generation device described below can be mutually corresponding and referred to the three - dimensional indoor scene generation method provided by the present invention described above. As Figure 6As shown in the figure, the device includes: an information acquisition module 601, an item sorting module 602, a room generation module 603, and an item generation module 604.
[0118] The information acquisition module 601 is used to acquire target requirement information, where the target requirement information includes room information of the three-dimensional indoor scene to be generated, type information of each target item to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes the spatial position relationship information between each target item and other target items except each target item and / or the spatial position relationship information between each target item and spatial composition elements. The spatial composition elements include the floor and the wall, and at least one of the ceiling, the door, and the window.
[0119] The item sorting module 602 is used to sort each target item based on the spatial position relationship information corresponding to each target item, and obtain a target item arrangement sequence.
[0120] The room generation module 603 is used to generate a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated based on the room information of the three-dimensional indoor scene to be generated.
[0121] The item generation module 604 is used to generate each target item in the room three-dimensional model in sequence according to the order of each target item from front to back in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, and obtain the generated three-dimensional indoor scene.
[0122] Specifically, the information acquisition module 601, the item sorting module 602, the room generation module 603, and the item generation module 604 are electrically connected.
[0123] In the three-dimensional indoor scene generation device in the embodiment of the present invention, by sorting each target item based on the spatial position relationship information corresponding to each target item to be included in the three-dimensional indoor scene to be generated, obtaining a target item arrangement sequence, generating a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated based on the room information of the three-dimensional indoor scene to be generated, and then generating each target item in the room three-dimensional model in sequence according to the order of each target item from front to back in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, the generated three-dimensional indoor scene can be obtained. This can significantly improve the authenticity and rationality of the spatial layout of the generated three-dimensional indoor scene, achieve a balance between spatial function and aesthetics when generating target items in the room three-dimensional model, improve the visual aesthetics and functional practicability of the generated three-dimensional indoor scene, improve user perception, and has broad application prospects.
[0124] Figure 7 An entity structure schematic diagram of an electronic device is illustrated. As Figure 7 shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740. Among them, the processor 710, the communications interface 720, and the memory 730 complete mutual communication through the communication bus 740. The processor 710 may call logical instructions in the memory 730 to execute a three-dimensional indoor scene generation method, which includes: obtaining target requirement information, where the target requirement information includes room information of the three-dimensional indoor scene to be generated, type information of each target item to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes spatial position relationship information between each target item and other target items except each target item and / or spatial position relationship information between each target item and spatial composition elements. The spatial composition elements include a floor and a wall, and at least one of a ceiling, a door, and a window; sorting each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence; generating a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated based on the room information of the three-dimensional indoor scene to be generated; and generating each target item in the room three-dimensional model in sequence according to the order of each target item from front to back in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, to obtain the generated three-dimensional indoor scene.
[0125] In addition, when the logical instructions in the above-mentioned memory 730 can be implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0126] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the three-dimensional indoor scene generation method provided by each of the above methods. The method includes: obtaining target requirement information, where the target requirement information includes room information of the three-dimensional indoor scene to be generated, type information of each target item to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes spatial position relationship information between each target item and other target items except each target item and / or spatial position relationship information between each target item and spatial composition elements. The spatial composition elements include a floor and a wall, and at least one of a ceiling, a door, and a window; sorting each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence; generating a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated based on the room information of the three-dimensional indoor scene to be generated; and generating each target item in the room three-dimensional model in sequence according to the front-to-back order of each target item in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, so as to obtain a generated three-dimensional indoor scene.
[0127] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the three-dimensional indoor scene generation method provided by each of the above methods. The method includes: obtaining target requirement information, where the target requirement information includes room information of the three-dimensional indoor scene to be generated, type information of each target item to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes spatial position relationship information between each target item and other target items except each target item and / or spatial position relationship information between each target item and spatial composition elements. The spatial composition elements include a floor and a wall, and at least one of a ceiling, a door, and a window; sorting each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence; generating a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated based on the room information of the three-dimensional indoor scene to be generated; and generating each target item in the room three-dimensional model in sequence according to the front-to-back order of each target item in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item, so as to obtain a generated three-dimensional indoor scene.
[0128] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0129] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some 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 invention.
Claims
1. A method for generating a three-dimensional indoor scene, characterized in that Including: Obtain target requirement information, where the target requirement information includes room information of the three-dimensional indoor scene to be generated, type information of each target item to be included in the three-dimensional indoor scene to be generated, and spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes spatial position relationship information between each target item and other target items except each target item and / or spatial position relationship information between each target item and spatial composition elements. The spatial composition elements include a floor and a wall, and at least one of a ceiling, a door, and a window; Based on the spatial position relationship information corresponding to each target item, sort each target item to obtain a target item arrangement sequence; Based on the room information of the three-dimensional indoor scene to be generated, generate a room three-dimensional model corresponding to the three-dimensional indoor scene to be generated; Based on the type information of each target item and the spatial position relationship information corresponding to each target item, in the order of each target item from front to back in the target item arrangement sequence, generate each target item in the room three-dimensional model in sequence to obtain a generated three-dimensional indoor scene.
2. The three-dimensional indoor scene generation method according to claim 1, wherein, The step of, based on the spatial position relationship information corresponding to each target item, sorting each target item to obtain a target item arrangement sequence includes: Based on the spatial position relationship information corresponding to each target item, obtain target items whose spatial position relationship with the wall is to lean on as first target items, and determine other target items except the first target items among each target item as second target items; Based on the spatial position relationship information corresponding to each second target item, obtain the sum of the number of target items and spatial composition elements having a spatial position relationship with each second target item as the constraint number corresponding to each second target item; After adding the first target items to an empty queue, add each second target item to the empty queue in the order from largest to smallest of the constraint numbers to obtain the target item arrangement sequence; Wherein, when the number of the first target items is multiple, the arrangement order of each first target item in the target item arrangement sequence is randomly determined; when the constraint numbers corresponding to multiple second target items are the same, the arrangement order of the multiple second target items in the target item sorting queue is randomly determined.
3. The three-dimensional indoor scene generation method according to claim 2, wherein The step of, based on the type information of each target item and the spatial position relationship information corresponding to each target item, in the order of each target item from front to back in the target item arrangement sequence, generating each target item in the room three-dimensional model in sequence includes: Determine whether the th target item in the target item arrangement sequence is the first target item or the second target item, where the is a positive integer starting from 1; When it is determined that the th target item is the first target item, based on the adaptive layout optimization coefficient corresponding to the th target item, calculate the original position information of the th target item in the three-dimensional model of the room; Based on the type information of the th target item, correct the original position information of the th target item in the three-dimensional room model to obtain the target position information of the th target item in the three-dimensional room model; Based on the type information of the th target item, generate the target position information of the th target item at the target position information of the th target item in the three-dimensional room model. Update the th target item corresponding adaptive layout optimization coefficient based on the offset between the target position information and the original position information of the th target item in the three-dimensional room model. Determine the updated th target item corresponding adaptive layout optimization coefficient as the th target item corresponding adaptive layout optimization coefficient; In the case where the maximum value is not reached, increase by 1, and return to execute the step of determining that the th target item in the target item arrangement sequence is the first target item or the second target item.
4. The three-dimensional indoor scene generation method according to claim 3, wherein The adaptive layout optimization coefficient corresponding to the th target item includes: the first adaptive layout optimization sub - coefficient corresponding to the th target item and the second adaptive layout optimization sub - coefficient corresponding to the th target item; Based on the adaptive layout optimization coefficient corresponding to the th target item, calculate the original position information of the th target item in the three-dimensional model of the room, including: Calculate the product of the first adaptive layout optimization sub - coefficient corresponding to the th target item and the first distance corresponding to each sampling point in the three - dimensional room model as the first intermediate result of each sampling point corresponding to the th target item. Calculate the product of the second adaptive layout optimization sub - coefficient corresponding to the th target item and the second distance corresponding to each sampling point, and the second intermediate result of each sampling point corresponding to the th target item. The first distance corresponding to each sampling point is the distance between each sampling point and the wall in the three - dimensional room model, and the second distance corresponding to each sampling point is the average distance between each sampling point and the generated target item models in the three - dimensional room model within a preset range centered on each sampling point; Calculate the sum of the first intermediate result and the second intermediate result of each sampling point corresponding to the th target item as the confidence value of each sampling point corresponding to the th target item; Sort each of the sampling points in descending order based on the confidence value to obtain the sampling point arrangement sequence corresponding to the th target item. Determine the sampling points ranked in the top target number positions in the sampling point arrangement sequence corresponding to the th target item as the original sampling points corresponding to the th target item; Randomly select one from the original sampling points corresponding to the th target item as the target sampling point corresponding to the th target item. Based on the position of the target sampling point corresponding to the th target item in the 3D model of the room, determine the original position information of the th target item in the 3D model of the room.
5. The three-dimensional indoor scene generation method according to claim 3, wherein, Based on the type information of the th target item, correct the original position information of the th target item in the three-dimensional room model to obtain the target position information of the th target item in the three-dimensional room model, including: Based on the type information of the th target item, generate a model of the th target item at the original position information of the th target item in the three-dimensional model of the room; When it is determined that the model of the th target object overlaps with the generated spatial structure elements and / or the generated target object models in the three-dimensional room model, move the model of the th target object in the first direction and / or the second direction until the model of the th target object does not overlap with the generated spatial structure elements and the generated target object models in the three-dimensional room model. The first direction is the direction parallel to the length direction of the three-dimensional room model and away from the overlapping area, and the second direction is the direction parallel to the width direction of the three-dimensional room model and away from the overlapping area; Determine the position where the model of the th target object is located after moving as the target position information of the th target object in the 3D model of the room.
6. The three-dimensional indoor scene generation method according to claim 2, wherein The step of, based on the spatial position relationship information corresponding to each target item, obtaining target items whose spatial position relationship with the wall is to lean on as first target items includes: Perform format conversion on the target demand information to obtain the target demand information in a standardized format; Based on the spatial position relationship information in the standardized format corresponding to each target item in the target demand information in the standardized format, generate a target spatial layout relationship diagram for the to-be-generated three-dimensional indoor scene. Any first node in the target spatial layout relationship diagram represents a target item, and each second node in the target spatial layout relationship diagram represents a spatial composition element. The connection line between any two first nodes in the target spatial layout relationship diagram represents the spatial position relationship between the two target items represented by the two nodes. The connection line between any first node and any second node in the target spatial layout relationship diagram represents the spatial position relationship between the target item represented by the first node and the spatial element represented by the second node; Based on the target spatial layout relationship diagram, obtain the target items among the target items that rely on the spatial position relationship with the wall as the first target items.
7. The three-dimensional indoor scene generation method according to any one of claims 1 to 6, characterized in that The obtaining of the target demand information includes: Obtain at least one of the image of the real indoor scene corresponding to the to-be-generated three-dimensional indoor scene in the real world, the sketch for describing the to-be-generated three-dimensional indoor scene, and the text information for describing the to-be-generated three-dimensional indoor scene as the original demand information; Input the original demand information into the pre-trained multi-modal large language model to obtain the target demand information output by the multi-modal large language model.
8. A three-dimensional indoor scene generation device, characterized in that, It includes: An information acquisition module for acquiring target demand information, where the target demand information includes the room information of the to-be-generated three-dimensional indoor scene, the type information of each target item to be included in the to-be-generated three-dimensional indoor scene, and the spatial position relationship information corresponding to each target item. The spatial position relationship information corresponding to each target item includes the spatial position relationship information between each target item and other target items except each target item and / or the spatial position relationship information between each target item and the spatial composition elements. The spatial composition elements include the floor and the wall, and at least one of the ceiling, the door, and the window; An item sorting module for sorting each target item based on the spatial position relationship information corresponding to each target item to obtain a target item arrangement sequence; A room generation module for generating a room three-dimensional model corresponding to the to-be-generated three-dimensional indoor scene based on the room information of the to-be-generated three-dimensional indoor scene; An item generation module for generating each target item in the room three-dimensional model in sequence according to the order of each target item from front to back in the target item arrangement sequence based on the type information of each target item and the spatial position relationship information corresponding to each target item to obtain the generated three-dimensional indoor scene.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the three-dimensional indoor scene generation method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the three-dimensional indoor scene generation method according to any one of claims 1 to 7.