A method and system for constructing a 3D model of a television housing
The 3D model and texture image of the TV casing are generated through user input text and large language model, which solves the time-consuming problem of the traditional modeling process and improves the modeling efficiency and intelligence.
Patent Information
- Application Number
- CN202410659200.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The 3D modeling process of traditional TV casing requires professional software and a lot of time. In particular, texture mapping is cumbersome and time-consuming, resulting in low modeling efficiency and affecting the project cycle.
Natural language preprocessing is performed through user input text, a large language model is used to generate scene description text, and 3D modeling software is used to automatically generate a 3D model of the TV housing. Image generation technology is used to create texture images and fuse them into the model surface.
Intelligent modeling and texture addition are realized, significantly improving modeling efficiency and simplifying the 3D model construction process of TV casing.
Smart Images

Figure CN118247440B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of television production, and more specifically, relates to a method and system for constructing a 3D model of a television shell. Background Art
[0002] The first stage of TV production is modeling, especially the modeling of the TV shell, which often needs to be modified to cater to the latest screen models;
[0003] The traditional 3D modeling process requires professional modeling software, relies on the design experience of engineers, and takes a lot of time to complete. In particular, the texture mapping of the TV shell needs to be debugged in combination with different scenes, which is tedious and time-consuming. Therefore, the modeling efficiency has always been relatively low, which greatly affects the project cycle. Summary of the invention
[0004] The main purpose of the present invention is to provide a method for constructing a 3D model of a TV shell, aiming to automatically construct a 3D model of a TV shell based on a user's input text and add texture to improve modeling efficiency; at the same time, a system for constructing a 3D model of a TV shell is also provided.
[0005] According to a first aspect of the present invention, there is provided a method for constructing a 3D model of a television housing, comprising the following steps:
[0006] Step 1: Obtain a first input text from a user, and perform natural language preprocessing on the first input text to form a basic text;
[0007] Step 2: Perform vector search on the basic text based on the large language model to generate scene description text;
[0008] Step 3: Select 3D modeling software, and the 3D modeling software performs modeling according to the scene description text to generate a 3D model of the TV shell;
[0009] Step 4: Obtain the second input text of the user, generate a texture image according to the second input text, and fuse the texture image to the surface of the 3D model of the TV housing.
[0010] In the above-mentioned method for constructing a 3D model of a TV case, in step 1, natural language preprocessing includes removing special characters and punctuation marks of the first input text, and converting the letters in the first input text into lowercase letters, and then using a word segmentation tool or a word segmentation library to segment the first input text to form a sequence of words or phrases, thereby forming a basic text.
[0011] In the above-mentioned method for constructing a 3D model of a TV housing, in step 2, a vector search is performed in the database according to the words or phrases in the basic text, the corresponding parameter categories are obtained, and the parameters of each parameter category are filled in to form a scene description text.
[0012] In the above-mentioned method for constructing a 3D model of a television housing, at least one parameter is pre-filled in a parameter category.
[0013] In the above-mentioned method for constructing a 3D model of a television housing, a plurality of candidate parameters are pre-filled in one parameter category.
[0014] In the above-mentioned method for constructing a 3D model of a TV shell, in step 3, a knowledge base is preset, and the knowledge base contains a python code corresponding to each parameter. The large language model automatically generates a modeling script based on the python code, and the modeling script controls the 3D modeling software to automatically model.
[0015] According to a second aspect of the present invention, there is provided a TV housing 3D model building system for implementing the method described in the first aspect, comprising a task assignment agent, a text scene agent, a modeling agent and a texture agent;
[0016] Task dispatching agent: obtains the first input text and the second input text of the user, sends the first input text to the text scene agent, and sends the second input text to the texture agent;
[0017] Text scene agent: performs natural language preprocessing on the first input text to form a basic text, performs vector search on the basic text based on a large language model, and generates a scene description text;
[0018] Modeling agent: select 3D modeling software, and the 3D modeling software performs modeling according to the scene description text to generate a 3D model of the TV shell;
[0019] Texture proxy: Generate a texture image according to the second input text, and fuse the texture image to the surface of the TV shell 3D model.
[0020] In the above-mentioned TV case 3D model construction system, the text scene agent includes a preprocessing unit, which removes special characters and punctuation marks of the first input text, and converts the letters in the first input text into lowercase letters, and then uses a word segmentation tool or a word segmentation library to segment the first input text to form a sequence of words or phrases, thereby forming a basic text.
[0021] In the above-mentioned TV case 3D model construction system, the text scene agent includes a vector search unit, which performs a vector search in the database according to the words or phrases in the basic text, obtains the corresponding parameter categories, and fills in the parameters of each parameter category to form a scene description text.
[0022] In the above-mentioned TV shell 3D model construction system, it also includes a knowledge base, which contains python code corresponding to each parameter. The modeling agent includes a script generation unit, which uses a large language model and combines python code to automatically generate a modeling script. The modeling script controls the 3D modeling software to automatically model.
[0023] One of the above technical solutions of the present invention has at least one of the following advantages or beneficial effects:
[0024] The present invention can obtain the user's input text, and perform natural language preprocessing to form a basic text, and then use a large language model to perform in-depth analysis on the basic text and perform vector search to generate a scene description text, select a suitable 3D modeling software, and the 3D modeling software automatically generates a 3D model of a TV shell according to the scene description text, and combines the image generation technology to generate a texture image, and maps the texture image to the surface of the 3D model of the TV shell; based on this, intelligent modeling can be performed and textures can be added to improve modeling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a flow chart of a method for constructing a 3D model of a television housing of the present invention;
[0026] Figure 2 It is a schematic diagram of a system for constructing a 3D model of a television housing of the present invention. DETAILED DESCRIPTION
[0027] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0028] The traditional 3D modeling process requires professional modeling software, relying on the design experience of engineers, and taking a lot of time to complete. In particular, the texture mapping of the TV shell needs to be debugged in combination with different scenes, which is tedious and time-consuming. Therefore, the modeling efficiency has always been relatively low, which greatly affects the project cycle.
[0029] The present application proposes a method for constructing a 3D model of a television shell, which obtains user input text and performs natural language preprocessing to form a basic text, then uses a large language model to perform in-depth analysis on the basic text and conduct vector search to generate a scene description text, selects a suitable 3D modeling software, and the 3D modeling software automatically generates a 3D model of the television shell according to the scene description text, and combines image generation technology to generate a texture image, and maps the texture image to the surface of the 3D model of the television shell; based on this, intelligent modeling and texture addition can be performed to improve modeling efficiency.
[0030] Reference Figure 1 As shown, the method for constructing a 3D model of a TV housing includes the following steps:
[0031] Step 1: Obtain the user's first input text, perform natural language preprocessing on the first input text, and form a basic text.
[0032] Specifically, after obtaining the first input text, a preliminary semantic analysis is performed first. Keywords or phrases are extracted from the first input text based on word frequency and TF-IDF algorithm. The grammatical structure of the sentence is analyzed, including the relationship between sentence components, such as subject-predicate-object relationship, attributive-adverbial-complement relationship, etc. The vocabulary, syntactic structure and contextual information of the text are comprehensively considered to infer and understand the meaning of the sentence. Special characters and punctuation marks are then removed, and the letters in them are uniformly converted into lowercase letters. Then, a word segmentation tool or word segmentation library is used to segment the first input text to form a sequence of words or phrases, and then a basic text is formed. It is determined whether to create a new model or modify the model.
[0033] In this embodiment, jieba or spaCy word segmentation library can be used to perform word segmentation.
[0034] For example, the first input text is "I want to design a modern-style TV casing, which should be simple and elegant in appearance"; the basic text formed after natural language preprocessing is "Design a modern-style TV casing with a simple and elegant appearance", and a new model is judged based on the word "design".
[0035] Step 2: Perform vector search on the basic text based on the large language model to generate scene description text.
[0036] The large language model may be GPT, which performs vector search in a related database based on words in the basic text to obtain corresponding parameter categories and fill in parameters of each parameter category;
[0037] Based on vector search, a parameter category is pre-populated with at least one parameter, which can be the parameter with the highest frequency in the parameter category; at the same time, each parameter category provides multiple alternative parameters, which can give users more choices;
[0038] Furthermore, users can also add parameter categories and fill in parameters by themselves.
[0039] For example, based on the basic text "Design a TV shell with a modern style and simple and elegant appearance", GPT will perform a vector search in the TV shell related database. The parameter categories obtained can be shape, color, size, material, characteristics, etc. The generated scene description text is:
[0040] “Shape: Rectangle (Rounded rectangle, smooth curves, thin borders);
[0041] Color: Dark Gray (Space Silver, Carbon Black, Pearl White);
[0042] Size: Medium size (light and thin design, large screen, mini and portable);
[0043] Material: Metallic texture (high-gloss plastic, matte coating, glass panel);
[0044] Features: Simple and stylish (elegant lines, exquisite craftsmanship, delicate touch). ”
[0045] Of course, in practice, parameters can be more precise, parameter categories can be more refined, GPT can be used for pre-training, and a large number of TV shell scene description text data sets can be used to train semantic analysis capabilities. Semantic analysis can be more accurate, and key information can be captured through the attention mechanism to better understand the user's modeling needs. It can also learn the description patterns of different models from rich data, better handle parameter categories and parameters, and improve the generation quality of scene description text.
[0046] Moreover, data enhancement technology can be introduced to supplement the scene description text to make the scene description text more diverse.
[0047] Step 3: Select 3D modeling software, and use the 3D modeling software to model the TV shell based on the scene description text.
[0048] Specifically, a knowledge base is preset, which contains Python codes corresponding to each parameter. GPT automatically generates a modeling script based on the Python code, and the modeling script controls the 3D modeling software to automatically model.
[0049] For example, the python code for a rectangle is import bpy; in this embodiment, Blender modeling software is used, and the script for creating an object based on a rectangle is as follows;
[0050] Clear all objects: bpy.ops.object.select_all(action='SELECT')
[0051] bpy.ops.object.delete()
[0052] Create a mesh data block: mesh_data = bpy.data.meshes.new(name="RectangularMesh")
[0053] Create a rectangular plane: vertices = [(0, 0, 0), # bottom left
[0054] (1, 0, 0), # bottom right
[0055] (1, 1, 0), # top right
[0056] (0, 1, 0)] # Top left
[0057] edges = [(0, 1), (1, 2), (2, 3), (3, 0)] # The edges of the rectangle
[0058] faces = [(0, 1, 2, 3)] # One face, the rectangle itself
[0059] mesh_data.from_pydata(vertices, edges, faces)
[0060] Update the mesh: mesh_data.update()
[0061] Create an object and associate this mesh data-block with it:
[0062] rect_object = bpy.data.objects.new("RectangularObject", mesh_data)
[0063] Link the newly created object to the current collection: bpy.context.collection.objects.link(rect_object)
[0064] Select the newly created object: rect_object.select_set(True)
[0065] Set up the view to see the new object:
[0066] bpy.context.view_layer.objects.active = rect_object
[0067] bpy.ops.object.mode_set(mode='EDIT')
[0068] bpy.ops.mesh.select_all(action='SELECT')
[0069] bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"use_normal_flip":False, "mirror":False}, TRANSFORM_OT_translate={"value":(0, 0, 1)}) #Example: extrude a rectangle to create
[0070] Build a small cube
[0071] bpy.ops.object.mode_set(mode='OBJECT')
[0072] Therefore, using the Python programming language, and through different combinations of parameters and calling different Python codes, GPT can generate the corresponding modeling scripts, execute the modeling scripts in the background through the subprocess package, and automatically generate a 3D model of the TV shell in Blender.
[0073] Of course, after the 3D modeling is automatically completed, the user can further propose needs and make further adjustments and optimizations to the generated 3D model.
[0074] Step 4: Obtain the second input text of the user, generate a texture image according to the second input text, and fuse the texture image to the surface of the 3D model of the TV housing.
[0075] Specifically, after obtaining the user's second input text, the large language model is used to perform semantic analysis on the second input text, and the keywords in the second input text are extracted, especially the adjectives for texture description. Then, the DALL-E2 and Stable Diffusion tools are used to generate texture images in combination with the keywords.
[0076] Style transfer techniques, such as Neural Style Transfer, can be used to synthesize the generated TV case texture image with a predefined artistic style or reference image to enhance the artistic sense and visual appeal of the texture;
[0077] Use pre-trained convolutional neural network (CNN) models, such as VGG16 or ResNet, to extract deep features of the generated TV shell texture image; use image segmentation algorithms, such as U-Net, to segment the TV shell texture image into different regions and identify key texture parts, such as borders, logos, and details; and facilitate the subsequent combination of the texture image with the TV shell 3D model;
[0078] Using deep learning to generate normal maps, texture images can better simulate the concave and convex feeling of the TV shell surface, so that the texture can be more realistically integrated into the 3D model. Based on the depth information, by matching the geometric features of the texture, such as concave and convex and normal direction, the texture image is intelligently mapped to the surface of the TV shell 3D model to maintain geometric consistency.
[0079] Using a color model, such as the LAB color space, adjust the color and saturation of the texture to ensure that it coordinates with the overall scene and the color of the TV casing 3D model.
[0080] In this embodiment, the texture effect of the surface of the 3D model of the TV housing can be previewed in real time.
[0081] In this embodiment, combined with a generative adversarial network, after the texture image is fused to the surface of the 3D model of the TV housing, multiple texture variants are generated in real time so that the user can choose a favorite style.
[0082] Reference Figure 2 As shown, according to a second aspect of the present invention, a system for constructing a 3D model of a TV housing is provided, comprising a task assignment agent 1, a text scene agent 2, a modeling agent 3 and a texture agent 4;
[0083] Task dispatching agent 1: obtains the user's first input text and second input text, sends the first input text to the text scene agent 2, and sends the second input text to the texture agent 4.
[0084] Text scene agent 2: The text scene agent 2 includes a preprocessing unit 21 and a vector search unit 22;
[0085] The preprocessing unit 21 removes special characters and punctuation marks from the first input text, converts letters in the first input text into lowercase letters, and then uses a word segmentation tool or a word segmentation library to segment the first input text to form a sequence of words or phrases, thereby forming a basic text;
[0086] The vector search unit 22 performs a vector search in the database according to the words or phrases in the basic text, obtains the corresponding parameter category, and fills in the parameters of each parameter category to form a scene description text;
[0087] The scene description text needs to be introduced into the sequence-to-sequence model. Through the encoder-decoder structure, the basic text is mapped into the text sequence of the scene description to improve the semantic coherence. Deep learning technology is used for semantic analysis, and the key information is captured through the attention mechanism to help the agent better understand the user's modeling needs.
[0088] The database includes rules and vocabulary for TV shells. By maintaining the rules and vocabulary, the consistency of the generated TV shell scene description text in structure and grammar is ensured.
[0089] Modeling agent 3: selects 3D modeling software, and the 3D modeling software performs modeling according to the scene description text to generate a 3D model of the TV shell;
[0090] Specifically, it also includes a knowledge base 5, which contains a python code corresponding to each parameter, and the modeling agent 3 includes a script generation unit 31, which uses a large language model and combines the python code to automatically generate a modeling script, and the modeling script controls the 3D modeling software to automatically model;
[0091] The large language model plays a decisive role in automatically generating modeling scripts in combination with Python code. Meta-learning technology needs to be introduced so that the modeling agent 3 can improve its adaptability by learning modeling experience in different scenarios and quickly generate 3D models that meet the requirements.
[0092] Texture agent 4: Generates a texture image according to the second input text, and fuses the texture image to the surface of the TV shell 3D model.
[0093] In the later stage of the system, a user feedback and adjustment mechanism will be added. Based on real-time user feedback and through model update strategies, the meta-learning network will be continuously optimized to make the modeling agent 3 more intelligent and adaptable when facing new scenarios.
[0094] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for constructing a 3D model of a television housing, characterized in that: The following steps are involved: Step 1: Obtain a first input text from a user and perform natural language preprocessing on the first input text; The natural language preprocessing includes removing special characters and punctuation marks from the first input text, converting letters in the first input text into lowercase letters, and then using a word segmentation tool or a word segmentation library to segment the first input text to form a sequence of words or phrases, thereby forming a basic text; Step 2: Perform vector search on the basic text based on the large language model; According to the words or phrases in the basic text, a vector search is performed in the database to obtain the corresponding parameter category, and the parameters of each parameter category are filled to form a scene description text; Step 3: Select 3D modeling software, and the 3D modeling software performs modeling according to the scene description text to generate a 3D model of the TV shell; Step 4: Obtain the second input text of the user, generate a texture image according to the second input text, and fuse the texture image to the surface of the 3D model of the TV housing.
2. The method for constructing a 3D model of a TV housing according to claim 1, characterized in that: A parameter category is pre-populated with at least one parameter.
3. The method for constructing a 3D model of a TV housing according to claim 2, characterized in that: A parameter category is pre-populated with multiple candidate parameters.
4. The method for constructing a 3D model of a TV housing according to claim 1, characterized in that: In step 3, a knowledge base is preset, which contains Python codes corresponding to each parameter. The large language model automatically generates a modeling script based on the Python code, and the modeling script controls the 3D modeling software to automatically perform modeling.
5. A TV housing 3D model building system for implementing the method described in any one of claims 1 to 4, characterized in that: Includes task dispatching agent, text scene agent, modeling agent and texture agent; Task dispatching agent: obtains the first input text and the second input text of the user, sends the first input text to the text scene agent, and sends the second input text to the texture agent; Text scene agent: performing natural language preprocessing on the first input text, the text scene agent includes a preprocessing unit and a vector search unit, the preprocessing unit removes special characters and punctuation marks of the first input text, and uniformly converts letters in the first input text into lowercase letters, and then uses a word segmentation tool or a word segmentation library to segment the first input text to form a sequence of words or phrases, thereby forming a basic text, and the vector search unit performs a vector search in a database according to the words or phrases in the basic text, obtains corresponding parameter categories, and fills in parameters of each parameter category to form a scene description text; Modeling agent: select 3D modeling software, and the 3D modeling software performs modeling according to the scene description text to generate a 3D model of the TV shell; Texture proxy: Generate a texture image according to the second input text, and fuse the texture image to the surface of the TV shell 3D model.
6. The TV housing 3D model building system according to claim 5, characterized in that: It also includes a knowledge base, which contains python code corresponding to each parameter. The modeling agent includes a script generation unit, which uses a large language model and combines the python code to automatically generate a modeling script, and the modeling script controls the 3D modeling software to automatically model.
Citation Information
Patent Citations
Online TV customization system and customization method thereof
CN107230138A
Language description-based house type design method, device and system
CN112417539A
Building template instantiation modeling method based on point cloud data
CN115033967A
Text-to-image generation method and device based on common sense guidance
CN116662596A
Diffusion image generation method and system based on retrieval and segmentation enhancement
CN117725247A
