WO2024066689A1 - Model processing method, and apparatus - Google Patents

Model processing method, and apparatus Download PDF

Info

Publication number
WO2024066689A1
WO2024066689A1 PCT/CN2023/108396 CN2023108396W WO2024066689A1 WO 2024066689 A1 WO2024066689 A1 WO 2024066689A1 CN 2023108396 W CN2023108396 W CN 2023108396W WO 2024066689 A1 WO2024066689 A1 WO 2024066689A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional model
scene
target
instance
dimensional
Prior art date
Application number
PCT/CN2023/108396
Other languages
French (fr)
Chinese (zh)
Inventor
宋晗
肖艺
鲍文
柳跃天
曾柏伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024066689A1 publication Critical patent/WO2024066689A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Definitions

  • the embodiments of the present application relate to the field of media technology, and in particular to a model processing method and device.
  • Three-dimensional reconstruction technology refers to the establishment of a mathematical model suitable for computer representation and processing of three-dimensional objects. It is the basis for processing, operating and analyzing its properties in a computer environment. It is also a key technology for establishing virtual reality in computers to express the objective world.
  • Three-dimensional reconstruction technology can reconstruct the real scene in three dimensions using the data of the real scene to obtain a three-dimensional model of the real scene.
  • the embodiment of the present application provides a model processing method and device, which can obtain a three-dimensional model with a high degree of similarity to the scene. To achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
  • an embodiment of the present application provides a model processing method, the method comprising: first obtaining a first three-dimensional model of a target instance in a scene and an image of the scene. Then, according to the first three-dimensional model of the target instance and the image of the scene, a target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models.
  • the target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the instance is located, and the target instance is any object or background in the scene.
  • the model processing method provided in the embodiment of the present application can match a target second three-dimensional model with the same style and similar geometry as the object or background from multiple three-dimensional models through the image of the scene and the three-dimensional model of any object or background in the scene.
  • the model processing method provided in the embodiment of the present application not only considers the geometric shape of each instance in the scene but also considers the style type of the scene when performing three-dimensional reconstruction of the real scene, so as to be able to produce a three-dimensional model with high similarity to the scene (consistent scene style and similar geometry).
  • the style type of the scene may be determined according to the image of the scene, and then a target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene.
  • the embodiment of the present application can determine the style type of the scene through the image of the scene, and then determine a three-dimensional model that matches the geometric shape of the scene target instance and has the same style type as the scene where the target instance is located from multiple second three-dimensional models according to the style type of the scene and the first three-dimensional model of the target instance. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
  • an image of the scene may be input into a first network to determine the style type of the scene.
  • an image of the scene may be input into the first network to determine the style type of the scene from a plurality of preset style types.
  • the embodiment of the present application can determine the style type of the scene by inputting the image of the scene into the first network capable of determining the style type of the scene, and then determine a three-dimensional model that matches the geometric shape of the scene target instance and is the same as the style type of the scene where the target instance is located from multiple second three-dimensional models according to the style type of the scene and the first three-dimensional model of the target instance. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
  • the first three-dimensional model may be a point cloud model or a mesh model.
  • the plurality of second three-dimensional models may include a computer aided design (CAD) model, a pore (a three-dimensional drawing software) model, a SolidWorks (a three-dimensional drawing software) model or a UG (a three-dimensional drawing software) model.
  • CAD computer aided design
  • pore a three-dimensional drawing software
  • SolidWorks a three-dimensional drawing software
  • UG a three-dimensional drawing software
  • the image of the scene may be a key frame image of the scene, wherein the key frame image of the scene is an image required to generate a Mesh model of the scene.
  • the image of the scene above may be a red, green, blue (RGB) image of the scene.
  • RGB red, green, blue
  • the first three-dimensional model of the target instance and the style type of the scene may be input into a second network to determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models.
  • the embodiment of the present application can determine the style type of the scene through the image of the scene, and then input the style type of the scene and the first three-dimensional model of the target instance in the scene into the second network to match a three-dimensional model that matches the geometric shape of the target instance of the scene and has the same style type as the scene where the target instance is located from multiple second three-dimensional models. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, it is possible to obtain a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape).
  • a segmentation operation may be performed on the first three-dimensional model of the scene to obtain the first three-dimensional model of the target instance, where the segmentation operation includes semantic segmentation and/or instance segmentation.
  • semantic segmentation assigns a category to each pixel in the image, but does not distinguish between objects in the same category.
  • Instance segmentation classifies objects in the same category.
  • Semantic segmentation can be used to segment instances of different categories in a scene. For example, semantic segmentation can be used to segment the sofa and table in a scene.
  • Instance segmentation can be used to segment instances of the same category in a scene.
  • semantic segmentation can be used to segment chairs of different categories in a scene, such as dividing chairs into office chairs and dining chairs.
  • the method may further include: determining the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
  • multiple second three-dimensional models determined based on multiple three-dimensional models without material information and multiple instance images may include multiple second three-dimensional models with the same geometric shapes but different style types and multiple second three-dimensional models with the same style type but different geometric shapes.
  • the method may further include: determining the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information, the plurality of instance images and style classification codes, wherein the style classification codes are used to characterize the style types of the plurality of second three-dimensional models determined.
  • a plurality of three-dimensional models without material information, a plurality of instance images and style classification codes may be input into a network training model to output a plurality of second three-dimensional models.
  • the style classification code is input into the network training, and the obtained 3D model is also a 3D model of the style type corresponding to the style classification code.
  • the network can be trained to predict the corresponding material classification for each morphological part of the model based on the input style code and the 3D model without material (such as a CAD model), and then generate a high-realistic CAD model of a specified style.
  • the 3D model without material such as a CAD model
  • the style code of the desired style classification need to be input to output a 3D model of the specified style with material information. In this way, a large number of 3D models without material information can be assigned materials according to style classification.
  • 3D models of furniture such as sofas, TV cabinets, wardrobes, dining tables and coffee tables without material information, as well as images of multiple furniture and Chinese-style style classification codes, and then obtain 3D models of Chinese-style sofas, TV cabinets, wardrobes, dining tables and coffee tables through network training.
  • the second three-dimensional model of the scene may be generated according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
  • the first three-dimensional model of each instance in the first three-dimensional model of the scene may be replaced with the target second three-dimensional model of each instance to obtain the second three-dimensional model of the scene.
  • the target position of the target instance can be determined according to the image of the scene, and then the first three-dimensional model of the target instance in the first three-dimensional model of the scene is deleted, and then the target second three-dimensional model of the target instance is set at the target position of the target instance to generate the second three-dimensional model of the scene.
  • the target position is used to indicate the position of the first three-dimensional model of the target instance in the first three-dimensional model of the scene.
  • the method provided in the embodiment of the present application can replace the first 3D model of each instance in the first 3D model of the scene with a target second 3D model that is similar in geometry to the instance and consistent with the scene style type.
  • the model obtains a second 3D model of the scene. Since the 3D reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a 3D model with high similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
  • the method may further include: determining the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
  • multiple second three-dimensional models determined based on multiple three-dimensional models without material information and multiple instance images may include multiple second three-dimensional models with the same geometric shapes but different style types and multiple second three-dimensional models with the same style type but different geometric shapes.
  • the method may further include: receiving an editing operation, the editing operation being used to instruct editing of a target instance in the second three-dimensional model of the scene, and in response to the editing operation, editing the target instance in the second three-dimensional model of the scene.
  • the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
  • a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation.
  • the 3D model obtained in the embodiment of the present application is more flexible.
  • the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
  • the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
  • the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
  • the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
  • the three-dimensional position of the target second three-dimensional model of the target instance may be determined. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance. The three-dimensional position is used to indicate the position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • each instance of the second 3D model of the scene can determine the 3D position of the target second 3D model of the target instance through replacement operation. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted, and then the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the target instance in the three-dimensional model individually.
  • the three-dimensional model obtained in the embodiment of the present application is more flexible.
  • an embodiment of the present application provides another model processing method, the method comprising: receiving an editing operation.
  • editing a target instance in a second three-dimensional model of the scene is used to indicate editing a target instance in the second three-dimensional model of the scene
  • the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene
  • the target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models by a first three-dimensional model of the target instance of the scene and an image of the scene
  • the target second three-dimensional model is a three-dimensional model that matches the geometry of the target instance and is of the same style type as the scene where the target instance is located
  • the target instance is any object or background in the scene.
  • the model processing method provided in the embodiment of the present application can obtain a second three-dimensional model of the scene through a three-dimensional model of an instance that is consistent in style and similar in geometry to the instance in the scene (i.e., the object and the background).
  • the model processing method provided in the embodiment of the present application not only considers the geometric shape of each instance in the scene but also considers the style type of the scene when performing three-dimensional reconstruction of the real scene, so that a three-dimensional model with a high degree of similarity to the scene (consistent in scene style and similar in geometry) can be obtained.
  • the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
  • a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation.
  • the 3D model obtained in the embodiment of the present application is more flexible.
  • the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
  • the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
  • the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
  • the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
  • the three-dimensional position of the target second three-dimensional model of the target instance can be determined. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance. The three-dimensional position is used to indicate the target second three-dimensional model of the target instance. The position of the second 3D model within the second 3D model of the scene.
  • the three-dimensional model obtained by the related technology is a whole, and each object in the three-dimensional model cannot be edited separately.
  • each instance of the second three-dimensional model of the scene can determine the three-dimensional position of the target second three-dimensional model of the target instance through a replacement operation, and then delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene, and then set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the target instance in the three-dimensional model separately.
  • the three-dimensional model obtained in the embodiment of the present application is more flexible.
  • an embodiment of the present application provides a model processing device, which includes: a transceiver unit and a processing unit.
  • the transceiver unit is used to obtain a first three-dimensional model of a target instance in a scene and an image of the scene, wherein the target instance is any object or background in the scene.
  • the processing unit is used to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene, wherein the target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the target instance is located.
  • the processing unit is specifically used to: determine the style type of the scene based on the image of the scene; and determine the target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the style type of the scene.
  • the processing unit is specifically configured to: input the image of the scene into a first network to determine the style type of the scene.
  • the processing unit is specifically configured to: input the first three-dimensional model of the target instance and the style type of the scene into a second network to determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models.
  • the transceiver unit is specifically configured to: perform a segmentation operation on the first three-dimensional model of the scene to obtain the first three-dimensional model of the target instance, wherein the segmentation operation includes semantic segmentation and/or instance segmentation.
  • the processing unit is further configured to: determine the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
  • the processing unit is further configured to: generate a second three-dimensional model of the scene according to the first three-dimensional model of the scene and a target second three-dimensional model of the target instance.
  • the processing unit is specifically configured to: determine a target position of the target instance according to the image of the scene, the target position being used to indicate a position of a first three-dimensional model of the target instance in a first three-dimensional model of the scene, delete the first three-dimensional model of the target instance in the first three-dimensional model of the scene, and set a target second three-dimensional model of the target instance at the target position of the target instance to generate a second three-dimensional model of the scene.
  • the transceiver unit is further used to: receive an editing operation, where the editing operation is used to instruct editing of a target instance in the second three-dimensional model of the scene.
  • the processing unit is further configured to edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
  • the editing operation includes a moving operation, and the moving operation is used to instruct to move a target instance in the second three-dimensional model of the scene.
  • the processing unit is specifically configured to: in response to the movement operation, move a target second three-dimensional model of a target instance in a second three-dimensional model of the scene from a first position to a second position.
  • the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
  • the processing unit is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
  • the editing operation includes a replacement operation, and the replacement operation is used to instruct to replace a target instance in the second three-dimensional model of the scene with a preset instance.
  • the processing unit is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
  • the processing unit is specifically used to: determine a three-dimensional position of the target second three-dimensional model of the target instance, where the three-dimensional position is used to indicate a position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. Delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. The three-dimensional position of the preset instance is set as the target second three-dimensional model.
  • an embodiment of the present application provides another model processing device, which includes: a transceiver unit and a processing unit.
  • the transceiver unit is used to receive an editing operation.
  • the processing unit is used to edit a target instance in the second three-dimensional model of the scene in response to the editing operation.
  • the editing operation is used to indicate the target instance in the second three-dimensional model of the editing scene
  • the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene
  • the target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models by a first three-dimensional model of the target instance of the scene and an image of the scene
  • the target second three-dimensional model is a three-dimensional model that matches the geometry of the target instance and has the same style type as the scene where the target instance is located, and the target instance is any object or background in the scene.
  • the editing operation includes a moving operation, and the moving operation is used to instruct to move a target instance in the second three-dimensional model of the scene.
  • the processing unit is specifically configured to: in response to the movement operation, move a target second three-dimensional model of a target instance in a second three-dimensional model of the scene from a first position to a second position.
  • the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
  • the processing unit is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
  • the editing operation includes a replacement operation, and the replacement operation is used to instruct to replace a target instance in the second three-dimensional model of the scene with a preset instance.
  • the processing unit is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
  • the processing unit is specifically configured to: determine a three-dimensional position of a target second three-dimensional model of the target instance, the three-dimensional position being used to indicate a position of the target second three-dimensional model of the target instance in a second three-dimensional model of a scene; delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene; and set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance.
  • an embodiment of the present application further provides a model processing device, which includes: at least one processor, when the at least one processor executes program code or instructions, it implements the method described in the above first aspect or any possible implementation method thereof.
  • the model processing device may further include at least one memory, and the at least one memory is used to store the program code or instruction.
  • an embodiment of the present application further provides a chip, comprising: an input interface, an output interface, and at least one processor.
  • the chip further comprises a memory.
  • the at least one processor is used to execute the code in the memory, and when the at least one processor executes the code, the chip implements the method described in the first aspect or any possible implementation thereof.
  • the above chip may also be an integrated circuit.
  • an embodiment of the present application further provides a computer-readable storage medium for storing a computer program, wherein the computer program includes methods for implementing the method described in the above-mentioned first aspect or any possible implementation thereof.
  • an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the method described in the first aspect or any possible implementation thereof.
  • the model processing device, computer storage medium, computer program product and chip provided in this embodiment are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the method provided above and will not be repeated here.
  • FIG1 is a schematic diagram of the structure of a model processing system provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the structure of a model processing device provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a flow chart of a model processing method provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of an editing page provided in an embodiment of the present application.
  • FIG7 is a flow chart of another model processing method provided in an embodiment of the present application.
  • FIG8 is a flow chart of another model processing method provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of the structure of another model processing device provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of the structure of another model processing device provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application.
  • a and/or B in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist.
  • a and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
  • first and second and the like in the description and drawings of the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
  • Three-dimensional reconstruction technology refers to the establishment of a mathematical model suitable for computer representation and processing of three-dimensional objects. It is the basis for processing, operating and analyzing its properties in a computer environment. It is also a key technology for establishing virtual reality in computers to express the objective world.
  • Three-dimensional reconstruction technology can reconstruct the real scene in three dimensions using the data of the real scene to obtain a three-dimensional model of the real scene.
  • an embodiment of the present application provides a model processing method that can obtain a three-dimensional model with a high degree of similarity to the scene.
  • the method can be applied to a model processing system.
  • Fig. 1 shows a possible existence form of the above model processing system.
  • the above model processing system includes: a model processing device and a plurality of electronic devices.
  • the electronic device is used to determine a first three-dimensional model of a scene based on data collected by a sensor, and transmit the first three-dimensional model of the scene and an image of the scene to a model processing device.
  • the electronic device can collect data such as the posture of the electronic device, the image of the scene (such as a key frame RGB image, a depth map of the scene) through a sensor and use these data as input to reconstruct the Mesh model of the scene and extract the vertex data of the scene in the Mesh model of the scene. Then, the vertex data of the scene is used as input to output the first three-dimensional model of the scene. Finally, the image of the scene and the first three-dimensional model of the scene are uploaded to the model processing device through the network transmission unit.
  • data such as the posture of the electronic device, the image of the scene (such as a key frame RGB image, a depth map of the scene) through a sensor and use these data as input to reconstruct the Mesh model of the scene and extract the vertex data of the scene in the Mesh model of the scene. Then, the vertex data of the scene is used as input to output the first three-dimensional model of the scene. Finally, the image of the scene and the first three-dimensional model of the scene are uploaded to the model processing device through
  • a model processing device is used to execute the model processing method provided in the embodiment of the present application.
  • the electronic device is also used to receive user operations and edit (such as move, delete and replace) instances in the three-dimensional model of the scene according to the user operations.
  • edit such as move, delete and replace
  • the electronic device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • FIG. 2 shows a possible existence form of the electronic device mentioned above.
  • the electronic device may include: a sensor unit, a computing unit, a storage unit and a network transmission unit.
  • the sensor unit may include: a visual sensor, a depth sensor and other sensors.
  • Visual sensor used to obtain image information of the scene.
  • the visual sensor may be a camera or other device with a visual acquisition function.
  • Depth sensor used to obtain scene depth information.
  • the depth sensor can be an indirect time of flight (Indirect Time of Fly, iToF), a direct time of flight (Direct Time of Fly, dToF) or other device with visual acquisition function.
  • Indirect Time of Fly, iToF Indirect Time of Fly, iToF
  • Direct Time of Fly, dToF Direct Time of Fly
  • the network transmission unit is used for communicating and exchanging data with other devices (such as a model processing device or other electronic devices).
  • the network transmission unit may include a Wireless Fidelity (WiFi) communication unit, a 4th generation mobile communication technology (4G) communication unit, a 5th generation mobile communication technology (5G) communication unit and other communication units.
  • WiFi Wireless Fidelity
  • 4G 4th generation mobile communication technology
  • 5G 5th generation mobile communication technology
  • a computing unit is used to run the operating system of the electronic device and use a reconstruction algorithm to reconstruct the scene based on the data collected by the sensor of the electronic device (such as using a real-time Mesh reconstruction algorithm to reconstruct the scene), and use a depth estimation method (such as a monocular depth estimation method) to obtain the depth information of the image based on the image information of the scene.
  • a reconstruction algorithm to reconstruct the scene based on the data collected by the sensor of the electronic device
  • a depth estimation method such as a monocular depth estimation method
  • the computing unit may include a central processing unit (CPU), a graphics processing unit (GPU), a cache, and registers.
  • CPU central processing unit
  • GPU graphics processing unit
  • cache a cache
  • the storage unit is used to store data of the electronic device.
  • the storage unit may include internal storage and external storage.
  • FIG3 shows a possible existence form of the above-mentioned model processing device.
  • the model processing device may include: a computing unit, a storage unit and a network transmission unit.
  • a computing unit is used to execute the model processing method provided in the embodiment of the present application.
  • the network transmission unit is used for communicating and exchanging data with other devices (such as other electronic devices).
  • a storage unit for data of the model processing device for data of the model processing device.
  • FIG4 shows another possible existence form of the electronic device mentioned above.
  • the electronic device may include: a computing unit, a storage unit, a display unit, an interaction unit and a network transmission unit.
  • the computing unit is used to run the operating system of the electronic device and edit (such as move, delete and replace) the three-dimensional model of the scene according to the user operation (instruction).
  • the storage unit is used to store data of the electronic device.
  • the network transmission unit is used for communicating and exchanging data with other devices (such as a model processing device or other electronic devices).
  • Display unit used for visual display.
  • the display unit may be a display screen.
  • the interaction unit is used to receive user instructions.
  • the interaction unit may receive the user instruction through the interaction operation device.
  • the above-mentioned interactive operation device may include a device with interactive operation function such as a mouse, a keyboard or a touch screen.
  • FIG5 shows a model processing method provided by an embodiment of the present application.
  • the method can be executed by a model processing device in the above-mentioned model processing system. As shown in FIG5 , the method includes:
  • S501 Acquire a first three-dimensional model of a target instance in a scene and an image of the scene.
  • the target instance is any object or background in the scene.
  • the model processing device may receive a first three-dimensional model of a target instance in a scene and an image of the scene sent by an electronic device.
  • the model processing device can collect the posture of the model processing device, the image of the scene (such as the key frame RGB image of the scene), the depth map, etc. as input through the sensor unit, and output the Mesh model of the scene. Then, the computing unit outputs the first three-dimensional model of the target instance in the scene according to the vertex data of the Mesh model of the scene. Thus, the first three-dimensional model of the target instance in the scene and the image of the scene are obtained.
  • the above-mentioned model processing device can be a mobile terminal.
  • the embodiment of the present application only uses a mobile terminal and does not require more complicated operations to obtain the first three-dimensional model of the scene or the target instance in the scene.
  • the vertex data of the Mesh model is used to obtain the first three-dimensional model of the scene.
  • It can effectively solve the problems of incomplete reconstruction of weak texture areas by traditional algorithms and missing reconstructed objects due to incomplete scanning areas.
  • the first three-dimensional model may be a point cloud model or a mesh model.
  • the image of the scene may be a key frame image of the scene, wherein the key frame image of the scene is an image required to generate a Mesh model of the scene.
  • the image of the scene may be an RGB image of the scene.
  • a segmentation operation may be performed on the first three-dimensional model of the scene to obtain a first three-dimensional model of the target instance in the scene, and the segmentation operation includes semantic segmentation and/or instance segmentation.
  • semantic segmentation assigns a category to each pixel in the image, but does not distinguish between objects in the same category.
  • Instance segmentation classifies objects in the same category.
  • Semantic segmentation can be used to segment instances of different categories in a scene. For example, semantic segmentation can be used to segment the sofa and table in a scene.
  • Instance segmentation can be used to segment instances of the same category in a scene.
  • semantic segmentation can be used to segment chairs of different categories in a scene, such as dividing chairs into office chairs and dining chairs.
  • S502 Determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the image of the scene.
  • the target second three-dimensional model of the target instance is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the above instance is located.
  • the target second three-dimensional model of the target instance may also be a three-dimensional model that matches the geometric shape of the target instance and has the same style type and the same item category as the scene where the above instance is located.
  • the style type of the scene may be determined according to the image of the scene, and then a target second 3D model of the target instance is determined from a plurality of second 3D models according to the first 3D model of the target instance and the style type of the scene.
  • the embodiment of the present application can determine the style type of the scene through the image of the scene, and then determine a three-dimensional model that matches the geometric shape of the scene target instance and has the same style type as the scene where the target instance is located from multiple second three-dimensional models according to the style type of the scene and the first three-dimensional model of the target instance. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
  • the above style types may include classical style, modern style, business style, Chinese style, Nordic style, Japanese style, etc.
  • the plurality of second three-dimensional models may include a CAD model, a pore model, a SolidWorks model or a UG model.
  • the target second three-dimensional model of the target instance may be determined from a plurality of CAD models according to the style type of the scene and the first three-dimensional model of the target instance.
  • the style type of the scene can be determined as Chinese style based on the image of the scene. Then, the geometric shape of the target instance is determined based on the first three-dimensional model of the target instance. Then, based on the style type of the scene and the geometric shape of the target instance, a second three-dimensional model of Chinese style matching the geometric shape of the target instance is matched in a model library containing multiple second three-dimensional models.
  • the image of the scene may be input into a first network to determine the style type of the scene.
  • a first network using a ResNext (an image classification network structure) network architecture as a backbone can be used to take an image of a scene as input and output a style classification of the scene.
  • ResNext an image classification network structure
  • the specific method for determining the target second three-dimensional model of the target instance from multiple second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene can be processed by any method that can be thought of by a person skilled in the art, and the embodiment of the present application does not specifically limit this.
  • the first three-dimensional model of the target instance and the style type of the scene can be input into the second network to determine the target second three-dimensional model of the target instance from multiple second three-dimensional models.
  • a target instance in a scene the following describes how to input the first 3D model of the target instance and the style type of the scene into a second network to determine a target second 3D model of the target instance from multiple second 3D models.
  • the first 3D model of the target instance is input into the geometric encoding network (such as Point Autoencoder) in the second network to obtain the geometric encoding of the target instance.
  • the Euclidean distance between the geometric morphology encoding and the geometric morphology encoding of the target instance is calculated, and then N (such as 10) second 3D models with the smallest distance are used as replacement candidate second 3D models.
  • each replacement candidate second 3D model is projected onto the 2D image to obtain the corresponding front view, top view, and left view.
  • the Intersection over Union (IOU) is calculated with the semantic segmentation map containing the target instance, and the second 3D model with the highest multi-view IOU average is determined as the target second 3D model of the target instance.
  • model processing method is based on a three-dimensional model retrieval and matching algorithm with style consistency, which can solve the shortcomings of inconsistent styles of different instances (such as furniture) in the reconstructed scene, resulting in poor coordination of the reconstructed scene model.
  • the overall scene style will be determined to be business style through scene style matching.
  • the traditional style chair will be replaced with the business style one, ensuring the style consistency of the reconstructed scene.
  • the model processing method provided in the embodiment of the present application can match a target second three-dimensional model with the same style and similar geometry as the object or background from multiple three-dimensional models through the image of the scene and the three-dimensional model of any object or background in the scene.
  • the model processing method provided in the embodiment of the present application not only considers the geometric shape of each instance in the scene but also considers the style type of the scene when performing three-dimensional reconstruction of the real scene, so as to obtain a three-dimensional model with high similarity to the scene (consistent scene style and similar geometry).
  • the method provided in the embodiment of the present application may further include:
  • S503 Generate a second three-dimensional model of the scene according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
  • the first three-dimensional model of each instance in the first three-dimensional model of the scene may be replaced with the target second three-dimensional model of each instance to obtain the second three-dimensional model of the scene.
  • the target position of the target instance can be determined according to the image of the scene, and then the first three-dimensional model of the target instance in the first three-dimensional model of the scene is deleted, and then the target second three-dimensional model of the target instance is set at the target position of the target instance to generate the second three-dimensional model of the scene.
  • the target position is used to indicate the position of the first three-dimensional model of the target instance in the first three-dimensional model of the scene.
  • the method provided in the embodiment of the present application can replace the first three-dimensional model of each instance in the first three-dimensional model of the above scene with a target second three-dimensional model that is similar to the instance geometry and consistent with the scene style type. Then, the second three-dimensional model of the scene is obtained through the three-dimensional model of the instance. Since the three-dimensional reconstruction of the real scene not only considers the geometry of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometry) can be obtained.
  • the specific method for determining the target position of the above-mentioned target instance based on the image of the above-mentioned scene can be processed by any method that can be thought of by a person skilled in the art, and the embodiments of the present application do not specifically limit this.
  • a voting (Canonical Voting) algorithm can be used to obtain the oriented bounding box (Oriented Bounding Box) of the first three-dimensional model of each instance, and then the pose of the target instance in the camera coordinate system is determined based on the image of the scene (the key frame RGB image of the scene), and then the pose of the target instance in the camera coordinate system is converted into the pose of the world coordinate system.
  • the target instance can be back-projected to find the corresponding predicted oriented bounding box (Oriented Bounding Box) to determine the target position of the target instance.
  • the target second three-dimensional model of the target instance can be resized to be similar to the size of the bounding box of the instance, and the point cloud in the bounding box in the first three-dimensional model of the scene can be erased, and the model of the target instance can be placed in the first three-dimensional model of the scene according to the bounding box.
  • Each instance in the first three-dimensional model of the scene is processed as above, and a reconstructed new combined scene model (ie, the second three-dimensional model of the scene) can be output.
  • the method may further include:
  • S504 Determine the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the plurality of instance images.
  • the multiple instances mentioned above include at least two instances of different style types.
  • the three-dimensional models of a Chinese-style sofa, a business-style sofa, a Chinese-style tea table, and a business-style tea table can be obtained based on the three-dimensional models of a sofa and a tea table without material information and the images of Chinese-style and business-style instances.
  • multiple second three-dimensional models determined based on multiple three-dimensional models without material information and multiple instance images may include multiple second three-dimensional models with the same geometric shapes but different style types and multiple second three-dimensional models with the same style type but different geometric shapes.
  • the plurality of second three-dimensional models may be determined based on a plurality of three-dimensional models without material information, a plurality of instance images, and style classification codes.
  • the style classification codes are used to characterize the style categories of the plurality of second three-dimensional models determined. type.
  • a plurality of three-dimensional models without material information, a plurality of instance images and style classification codes may be input into a network training model to output a plurality of second three-dimensional models.
  • the style classification code is input into the network training, and the obtained 3D model is also a 3D model of the style type corresponding to the style classification code.
  • the network can be trained to predict the corresponding material classification for each morphological part of the model based on the input style code and the 3D model without material (such as a CAD model), and then generate a high-realistic CAD model of a specified style.
  • the 3D model without material such as a CAD model
  • the style code of the desired style classification need to be input to output a 3D model of the specified style with material information. In this way, a large number of 3D models without material information can be assigned materials according to style classification.
  • 3D models of furniture such as sofas, TV cabinets, wardrobes, dining tables and coffee tables without material information, as well as images of multiple furniture and Chinese-style style classification codes, and then obtain 3D models of Chinese-style sofas, TV cabinets, wardrobes, dining tables and coffee tables through network training.
  • the above-mentioned editing operation is used to indicate the target instance in the second three-dimensional model of the editing scene.
  • the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
  • a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation.
  • the 3D model obtained in the embodiment of the present application is more flexible.
  • the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
  • the user can select the dining table in the three-dimensional model of the house with the mouse, and move the dining table in the three-dimensional model of the house with the mouse.
  • the user can modify the three-dimensional coordinates (x, y, z) of the table through the keyboard to move table 1 in the second three-dimensional model of the scene in the second three-dimensional model of the scene.
  • the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
  • the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
  • the user can delete the sofa 1 in the second three-dimensional model of the scene by clicking the delete symbol “X” on the right side of the screen with the mouse.
  • the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
  • the three-dimensional position of the target second three-dimensional model of the target instance may be determined, and the three-dimensional position is used to indicate the position of the target second three-dimensional model of the instance in the second three-dimensional model of the scene. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
  • the three-dimensional model obtained by the related technology is a whole, and each object in the three-dimensional model cannot be edited separately.
  • each instance of the second three-dimensional model of the scene can determine the three-dimensional position of the target second three-dimensional model of the target instance through a replacement operation, and then delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene, and then set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the above target instance in the three-dimensional model separately.
  • the three-dimensional model obtained in the embodiment of the present application is more flexible.
  • FIG. 7 shows another model processing method provided by an embodiment of the present application.
  • the method may be executed by an electronic device in the above-mentioned model processing system. As shown in FIG. 7 , the method includes:
  • S701 Receive an editing operation.
  • the editing operation is used to instruct editing of a target instance in the second three-dimensional model of the scene.
  • the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
  • the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
  • the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
  • a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation.
  • the 3D model obtained in the embodiment of the present application is more flexible.
  • the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
  • the user can select the dining table in the three-dimensional model of the house with the mouse, and move the dining table in the three-dimensional model of the house with the mouse.
  • the user can modify the three-dimensional coordinates (x, y, z) of the table through the keyboard to move table 1 in the second three-dimensional model of the scene in the second three-dimensional model of the scene.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
  • the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
  • the user can delete the sofa 1 in the second three-dimensional model of the scene by clicking the delete symbol “X” on the right side of the screen with the mouse.
  • the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
  • the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately.
  • the model processing method provided in the embodiment of the present application since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation.
  • the 3D model obtained by the embodiment of the present application is more flexible.
  • the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
  • the three-dimensional position of the target second three-dimensional model of the target instance may be determined, and the three-dimensional position is used to indicate the position of the target second three-dimensional model of the instance in the second three-dimensional model of the scene. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
  • the three-dimensional model obtained by the related technology is a whole, and each object in the three-dimensional model cannot be edited separately.
  • each instance of the second three-dimensional model of the scene can determine the three-dimensional position of the target second three-dimensional model of the target instance through a replacement operation, and then delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene, and then set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the above target instance in the three-dimensional model separately.
  • the three-dimensional model obtained in the embodiment of the present application is more flexible.
  • the method may further include:
  • the electronic device may receive the second three-dimensional model of the scene sent by other devices (such as a model processing apparatus or other devices).
  • devices such as a model processing apparatus or other devices.
  • the electronic device may download the second three-dimensional model of the scene from a server, wherein the server is used to store the second three-dimensional model of the scene generated by the model processing device.
  • FIG8 shows another model processing method provided in an embodiment of the present application.
  • the method is applicable to the above-mentioned model processing system. As shown in FIG8 , the method includes:
  • a first electronic device sends a first three-dimensional model of a target instance in a scene and an image of the scene to a model processing device.
  • the model processing device receives the first three-dimensional model of the target instance in the scene and the image of the scene sent by the first electronic device.
  • the first electronic device can collect the posture of the electronic device, the image of the scene (such as the key frame RGB image of the scene), the depth map, etc. as input through the sensor unit, and output the Mesh model of the scene. Then, the computing unit outputs the first three-dimensional model of the target instance in the scene according to the vertex data of the Mesh model of the scene. Thus, the first three-dimensional model of the target instance in the scene and the image of the scene are obtained. Then, the first three-dimensional model of the target instance in the scene and the image of the scene are sent to the model processing device through the network transmission unit.
  • S801 can refer to the specific implementation of S501 in the above model processing method, which will not be repeated here.
  • the model processing device determines a target second three-dimensional model of the target instance in the scene from multiple second three-dimensional models according to the first three-dimensional model of the target instance in the scene and the image of the scene.
  • the model processing device may determine the style type of the scene according to the image of the scene, and then determine the target second 3D model of the target instance from multiple second 3D models according to the first 3D model of the target instance and the style type of the scene.
  • S802 can refer to the specific implementation of S502 in the above model processing method, which will not be repeated here.
  • the model processing device generates a second three-dimensional model of the scene according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
  • the model processing device may determine the target position of each of the above instances based on the image of the above scene. Delete the first three-dimensional model of each of the above instances in the first three-dimensional model of the above scene. Set the target second three-dimensional model of each instance at the position of each of the above instances. The target position is used to indicate the position of the first three-dimensional model of the instance in the first three-dimensional model of the scene.
  • S803 can refer to the specific implementation of S502 in the above model processing method, which will not be repeated here.
  • the model processing device sends a second three-dimensional model of the scene to the second electronic device.
  • the second electronic device downloads the second three-dimensional model of the scene from the model processing device.
  • the second electronic device may send a download request for the second three-dimensional model of the scene to the model processing device through the network transmission unit and receive the second three-dimensional model of the scene sent by the model processing device through the network transmission unit.
  • S804 can refer to the specific implementation of S701 in the above model processing method, which will not be repeated here.
  • the second electronic device receives and edits the target instance in the second three-dimensional model of the scene in response to the editing operation.
  • the second electronic device may receive a move operation, and in response to the move operation, move the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the first position to the second position, wherein the move operation is used to indicate moving the target instance in the second three-dimensional model of the scene.
  • the second electronic device may receive a deletion operation, and in response to the deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the three-dimensional scene.
  • the deletion operation is used to indicate the deletion of the target instance in the second three-dimensional model of the scene.
  • the second electronic device may receive a replacement operation, and in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
  • S805 can refer to the specific implementation of S704 in the above model processing method, which will not be repeated here.
  • the model processing device for executing the above-mentioned model processing method will be introduced below in conjunction with FIG. 9 .
  • the model processing device includes hardware and/or software modules corresponding to the execution of each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
  • the embodiment of the present application can divide the model processing device into functional modules according to the above method example.
  • each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
  • the above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
  • FIG9 shows a possible composition diagram of the model processing device involved in the above embodiment.
  • the model processing device 900 may include: a transceiver unit 901 and a processing unit 902 .
  • Processing unit 902 is used to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene, wherein the target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the target instance is located.
  • the target instance is any object or background in the scene.
  • the processing unit 902 is specifically used to: determine the style type of the scene based on the image of the scene; determine the target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the style type of the scene.
  • the processing unit 902 is specifically configured to: input the image of the scene into a first network to determine the style type of the scene.
  • the processing unit 902 is specifically configured to: input the first three-dimensional model of the target instance and the style type of the scene into a second network to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models.
  • the transceiver unit 901 is specifically used to: perform a segmentation operation on the first three-dimensional model of the scene to obtain the first three-dimensional model of the target instance, where the segmentation operation includes semantic segmentation and/or instance segmentation.
  • the processing unit 902 is further configured to determine the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
  • the processing unit 902 is further configured to generate a second three-dimensional model of the scene according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
  • the processing unit 902 is specifically used to: determine a target position of the target instance according to the image of the scene, the target position being used to indicate a position of a first three-dimensional model of the target instance in the first three-dimensional model of the scene. Delete the first three-dimensional model of the target instance in the first three-dimensional model of the scene. Set a target second three-dimensional model of the target instance at the target position of the target instance to generate a second three-dimensional model of the scene.
  • processing unit 902 is further configured to: edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
  • the editing operation includes a moving operation, wherein the moving operation is used to indicate moving a portion of the second three-dimensional model of the scene. Target instance.
  • the processing unit 902 is specifically configured to: in response to the movement operation, move a target second three-dimensional model of a target instance in the second three-dimensional model of the scene from a first position to a second position.
  • the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
  • the processing unit 902 is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
  • the editing operation includes a replacement operation, and the replacement operation is used to indicate replacing a target instance in the second three-dimensional model of the scene with a preset instance.
  • the processing unit 902 is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
  • the processing unit 902 is specifically configured to: determine a three-dimensional position of a target second three-dimensional model of the target instance, the three-dimensional position being used to indicate a position of the target second three-dimensional model of the target instance in a second three-dimensional model of a scene. Delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. Set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance.
  • Figure 10 shows another possible composition diagram of the model processing device involved in the above embodiment.
  • the model processing device 1000 may include: a transceiver unit 1001 and a processing unit 1002.
  • the transceiver unit 1001 is used to receive an editing operation.
  • the processing unit 1002 is configured to edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
  • the editing operation is used to indicate the target instance in the second three-dimensional model of the editing scene
  • the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene
  • the target second three-dimensional model of the target instance is determined from multiple second three-dimensional models by the first three-dimensional model of the target instance of the scene and the image of the scene
  • the target second three-dimensional model is a three-dimensional model that matches the geometry of the target instance and has the same style type as the scene where the target instance is located
  • the target instance is any object or background in the scene.
  • the editing operation includes a moving operation, and the moving operation is used to instruct to move a target instance in the second three-dimensional model of the scene.
  • the processing unit 1002 is specifically configured to: in response to the moving operation, move a target second three-dimensional model of a target instance in a second three-dimensional model of the scene from a first position to a second position.
  • the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
  • the processing unit 1002 is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
  • the editing operation includes a replacement operation, and the replacement operation is used to instruct to replace a target instance in the second three-dimensional model of the scene with a preset instance.
  • the processing unit 1002 is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
  • the processing unit 1002 is specifically used to: determine a three-dimensional position of a target second three-dimensional model of the target instance, the three-dimensional position being used to indicate a position of the target second three-dimensional model of the target instance in a second three-dimensional model of a scene. Delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. Set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance.
  • FIG11 shows a schematic diagram of the structure of a chip 1100.
  • the chip 1100 includes one or more processors 1101 and an interface circuit 1102.
  • the chip 1100 may also include a bus 1103.
  • the processor 1101 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above message processing method may be completed by an integrated logic circuit of hardware in the processor 1101 or by instructions in the form of software.
  • the processor 1101 may be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a processor.
  • the general purpose processor may be a microprocessor or any conventional processor.
  • the interface circuit 1102 can be used to send or receive data, instructions or information.
  • the processor 1101 can use the data, instructions or other information received by the interface circuit 1102 to process, and can send the processing completion information through the interface circuit 1102.
  • the chip also includes a memory, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor.
  • a portion of the memory may also include a non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory stores executable software modules or data structures
  • the processor can perform corresponding operations by calling operation instructions stored in the memory (the operation instructions can be stored in the operating system).
  • the chip can be used in the model processing device involved in the embodiment of the present application.
  • the interface circuit 1102 can be used to output the execution result of the processor 1101.
  • the message processing method provided in one or more embodiments of the embodiment of the present application can refer to the aforementioned embodiments, which will not be repeated here.
  • processor 1101 and the interface circuit 1102 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.
  • the electronic device 100 may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a model processing device, or a chip or functional module in a model processing device.
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • model processing device or a chip or functional module in a model processing device.
  • FIG12 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • controller a memory
  • video codec a digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus.
  • the processor 110 can be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate via a CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate via a DSI interface to implement the display function of the electronic device 100.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger can be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through ISP, camera 193, touch sensor, video codec, GPU, display screen 194 and application processor.
  • ISP is used to process the data fed back by camera 193.
  • the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens.
  • the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • ISP can be set in camera 193.
  • the camera 193 is used to capture still images or videos.
  • an optical image is generated through a lens and projected onto a photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor.
  • CMOS complementary metal oxide semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. It should be understood that in the description of the embodiments of the present application, an image in RGB format is used as an example for introduction, and the embodiments of the present application do not limit the image format.
  • the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital videos.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG Moving Picture Experts Group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the internal memory 121 can be used to store computer executable program codes, which include instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the button 190 includes a power button, a volume button, etc.
  • the button 190 can be a mechanical button. It can also be a touch button.
  • the electronic device 100 can receive button input and generate key signal input related to the user settings and function control of the electronic device 100.
  • the motor 191 can generate a vibration prompt.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the electronic device 100 can be a chip system or a device with a similar structure as shown in Figure 12.
  • the chip system can be composed of chips, or it can include chips and other discrete devices.
  • the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation.
  • the message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation.
  • the component structure shown in Figure 12 does not constitute a limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than those shown in Figure 12, or combine certain components, or arrange the components differently.
  • the processor and transceiver described in the present application can be implemented in an integrated circuit (IC), an analog IC, a radio frequency integrated circuit, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc.
  • the processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
  • CMOS complementary metal oxide semiconductor
  • NMOS N-type metal oxide semiconductor
  • PMOS P-type metal oxide semiconductor
  • BJT bipolar junction transistor
  • BiCMOS bipolar CMOS
  • SiGe silicon germanium
  • GaAs gallium arsenide
  • An embodiment of the present application also provides a model processing device, which includes: at least one processor, when the at least one processor executes program code or instructions, it implements the above-mentioned related method steps to implement the message processing method in the above-mentioned embodiment.
  • the device may further include at least one memory, and the at least one memory is used to store the program code or instruction.
  • An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored.
  • the model processing device executes the above-mentioned related method steps to implement the message processing method in the above-mentioned embodiment.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the message processing method in the above-mentioned embodiment.
  • the embodiment of the present application also provides a model processing device, which can be a chip, an integrated circuit, a component or a module.
  • the device may include a connected processor and a memory for storing instructions, or the device includes at least one processor for obtaining instructions from an external memory.
  • the processor can execute instructions so that the chip executes the message processing method in the above-mentioned method embodiments.
  • the size of the serial numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above methods in each embodiment of the present application.
  • the aforementioned storage media include: USB flash drives, mobile hard drives, read-only memories (Read Only Memory), etc. Only Memory, ROM), Random Access Memory (Random Access Memory, RAM), disks or optical disks, etc. that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present application relates to the technical field of media. Disclosed in the embodiments of the present application are a model processing method and an apparatus, which can obtain three-dimensional models having relatively high similarities with scenes. The method comprises: first acquiring a first three-dimensional model of a target instance in a scene and an image of the scene; and then, according to the first three-dimensional model of the target instance and the image of the scene, determining from a plurality of second three-dimensional models a target second three-dimensional model of the target instance, the target second three-dimensional model of the target instance being a three-dimensional model matched with the target instance in respect of the geometric shape and having the same style and type as the scene in which the instance is located, and the target instance being any one object or background in the scene.

Description

模型处理方法和装置Model processing method and device
本申请要求于2022年09月29日提交中国专利局、申请号为202211197410.0、申请名称为“模型处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the China Patent Office on September 29, 2022, with application number 202211197410.0 and application name “Model Processing Method and Device”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请实施例涉及媒体技术领域,尤其涉及模型处理方法和装置。The embodiments of the present application relate to the field of media technology, and in particular to a model processing method and device.
背景技术Background technique
三维重建技术是指对三维物体建立适合计算机表示和处理的数学模型,是在计算机环境下对其进行处理、操作和分析其性质的基础,也是在计算机中建立表达客观世界的虚拟现实的关键技术。Three-dimensional reconstruction technology refers to the establishment of a mathematical model suitable for computer representation and processing of three-dimensional objects. It is the basis for processing, operating and analyzing its properties in a computer environment. It is also a key technology for establishing virtual reality in computers to express the objective world.
三维重建技术可以通过真实场景的数据对真实场景进行三维重建得到真实场景的三维模型。Three-dimensional reconstruction technology can reconstruct the real scene in three dimensions using the data of the real scene to obtain a three-dimensional model of the real scene.
然而,相关三维重建技术在对真实场景进行三维重建时仅考虑了场景的几何结构,导致重建得到真实场景的三维模型与实际的真实场景差别较大。However, related 3D reconstruction technologies only consider the geometric structure of the scene when performing 3D reconstruction of the real scene, resulting in a significant difference between the reconstructed 3D model of the real scene and the actual real scene.
发明内容Summary of the invention
本申请实施例提供了模型处理方法和装置,能够得到与场景相似度较高的三维模型。为达到上述目的,本申请实施例采用如下技术方案:The embodiment of the present application provides a model processing method and device, which can obtain a three-dimensional model with a high degree of similarity to the scene. To achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
第一方面,本申请实施例提供了一种模型处理方法,该方法包括:首先获取场景中目标实例的第一三维模型和所述场景的图像。然后根据所述目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定所述目标实例的目标第二三维模型。其中,所述目标第二三维模型是与所述目标实例的几何形状匹配且与所述实例所在场景的风格类型相同的三维模型,所述目标实例为所述场景中的任一物体或背景。In a first aspect, an embodiment of the present application provides a model processing method, the method comprising: first obtaining a first three-dimensional model of a target instance in a scene and an image of the scene. Then, according to the first three-dimensional model of the target instance and the image of the scene, a target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models. The target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the instance is located, and the target instance is any object or background in the scene.
可以看出,本申请实施例提供过的模型处理方法,可以通过场景的图像和场景中任一物体或背景的三维模型从多个三维模型中匹配与该物体或背景风格相同且几何形状类似的目标第二三维模型。相较于相关三维重建技术在对真实场景进行三维重建时仅考虑了场景的几何结构,本申请实施例提供模型处理方法在对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the model processing method provided in the embodiment of the present application can match a target second three-dimensional model with the same style and similar geometry as the object or background from multiple three-dimensional models through the image of the scene and the three-dimensional model of any object or background in the scene. Compared with the related three-dimensional reconstruction technology that only considers the geometric structure of the scene when performing three-dimensional reconstruction of the real scene, the model processing method provided in the embodiment of the present application not only considers the geometric shape of each instance in the scene but also considers the style type of the scene when performing three-dimensional reconstruction of the real scene, so as to be able to produce a three-dimensional model with high similarity to the scene (consistent scene style and similar geometry).
在一种可能的实现方式中,可以根据所述场景的图像确定所述场景的风格类型。然后根据所述目标实例的第一三维模型和所述场景的风格类型从多个第二三维模型中确定所述目标实例的目标第二三维模型。In a possible implementation, the style type of the scene may be determined according to the image of the scene, and then a target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene.
可以看出,本申请实施例可以通过场景的图像确定所述场景的风格类型,然后根据场景的风格类型和目标实例的第一三维模型从多个第二三维模型中确定与场景目标实例的几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型。由于对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the embodiment of the present application can determine the style type of the scene through the image of the scene, and then determine a three-dimensional model that matches the geometric shape of the scene target instance and has the same style type as the scene where the target instance is located from multiple second three-dimensional models according to the style type of the scene and the first three-dimensional model of the target instance. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
在一种可能的实现方式中,可以将所述场景的图像输入第一网络以确定所述场景的风格类型。In a possible implementation, an image of the scene may be input into a first network to determine the style type of the scene.
例如,可以将所述场景的图像输入第一网络以从多个预设风格类型中确定上述场景的风格类型。For example, an image of the scene may be input into the first network to determine the style type of the scene from a plurality of preset style types.
可以看出,本申请实施例可以通过将场景的图像输入到能够判断场景风格类型的第一网络,从而确定所述场景的风格类型,然后根据场景的风格类型和目标实例的第一三维模型从多个第二三维模型中确定与场景目标实例的几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型。由于对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the embodiment of the present application can determine the style type of the scene by inputting the image of the scene into the first network capable of determining the style type of the scene, and then determine a three-dimensional model that matches the geometric shape of the scene target instance and is the same as the style type of the scene where the target instance is located from multiple second three-dimensional models according to the style type of the scene and the first three-dimensional model of the target instance. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
可选地,上述第一三维模型可以为点云模型或面元(Mesh)模型。Optionally, the first three-dimensional model may be a point cloud model or a mesh model.
可选地,上述多个第二三维模型可以包括计算机辅助设计(computer aided design,CAD)模型、pore(一种三维绘图软件)模型、SolidWorks(一种三维绘图软件)模型或UG(一种三维绘图软件) 模型。Optionally, the plurality of second three-dimensional models may include a computer aided design (CAD) model, a pore (a three-dimensional drawing software) model, a SolidWorks (a three-dimensional drawing software) model or a UG (a three-dimensional drawing software) model. Model.
可选地,上述场景的图像可以为场景的关键帧图像。其中,场景的关键帧图像是生成场景的Mesh模型所需的图像。Optionally, the image of the scene may be a key frame image of the scene, wherein the key frame image of the scene is an image required to generate a Mesh model of the scene.
可选地,上述场景的图像可以为场景的红绿蓝(red green blue,RGB)图像。Optionally, the image of the scene above may be a red, green, blue (RGB) image of the scene.
在一种可能的实现方式中,可以将所述目标实例的第一三维模型和所述场景的风格类型输入第二网络以从多个第二三维模型中确定所述目标实例的目标第二三维模型。In a possible implementation manner, the first three-dimensional model of the target instance and the style type of the scene may be input into a second network to determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models.
可以看出,本申请实施例可以通过场景的图像确定所述场景的风格类型,然后将场景的风格类型和场景中目标实例的第一三维模型输入到第二网络中以从多个第二三维模型中匹配与场景的目标实例的几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型。由于对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the embodiment of the present application can determine the style type of the scene through the image of the scene, and then input the style type of the scene and the first three-dimensional model of the target instance in the scene into the second network to match a three-dimensional model that matches the geometric shape of the target instance of the scene and has the same style type as the scene where the target instance is located from multiple second three-dimensional models. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, it is possible to obtain a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape).
在一种可能的实现方式中,可以对所述场景的第一三维模型进行分割操作以得到所述目标实例的第一三维模型,所述分割操作包括语义分割和/或实例分割。In a possible implementation, a segmentation operation may be performed on the first three-dimensional model of the scene to obtain the first three-dimensional model of the target instance, where the segmentation operation includes semantic segmentation and/or instance segmentation.
需要说明的是,语义分割会为图像中的每个像素分配一个类别,但是同一类别之间的对象不会区分。而实例分割是对同一类别之间的物体进行分类。It should be noted that semantic segmentation assigns a category to each pixel in the image, but does not distinguish between objects in the same category. Instance segmentation, on the other hand, classifies objects in the same category.
通过语义分割可以对场景中不同类别实例进行分割。例如,通过语义分割可以对场景中的沙发和桌子进行分割。Semantic segmentation can be used to segment instances of different categories in a scene. For example, semantic segmentation can be used to segment the sofa and table in a scene.
通过实例分割可以对场景中同一类别实例进行分割。例如,通过语义分割可以对场景中的不同类别的椅子进行分割。如将椅子分给办公椅和餐椅。Instance segmentation can be used to segment instances of the same category in a scene. For example, semantic segmentation can be used to segment chairs of different categories in a scene, such as dividing chairs into office chairs and dining chairs.
在一种可能的实现方式中,该方法还可以包括:根据多个无材质信息的三维模型和多个实例的图像确定所述多个第二三维模型。其中,所述多个实例至少包括两个风格类型不同的实例。In a possible implementation, the method may further include: determining the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
需要说明的是,根据多个无材质信息的三维模型和多个实例的图像确定的多个第二三维模型中,可以包括几何形状相同但风格类型不同的多个第二三维模型和风格类型相同但几何形状不同的多个第二三维模型。It should be noted that the multiple second three-dimensional models determined based on multiple three-dimensional models without material information and multiple instance images may include multiple second three-dimensional models with the same geometric shapes but different style types and multiple second three-dimensional models with the same style type but different geometric shapes.
在一种可能的实现方式中,该方法还可以包括:根据多个无材质信息的三维模型、多个实例的图像和风格分类编码确定所述多个第二三维模型。其中,风格分类编码用于表征确定得到的多个第二三维模型的风格类型。In a possible implementation, the method may further include: determining the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information, the plurality of instance images and style classification codes, wherein the style classification codes are used to characterize the style types of the plurality of second three-dimensional models determined.
示例性地,可以将多个无材质信息的三维模型、多个实例的图像和风格分类编码输入到网络训练模型中输出多个第二三维模型。Exemplarily, a plurality of three-dimensional models without material information, a plurality of instance images and style classification codes may be input into a network training model to output a plurality of second three-dimensional models.
需要说明的是,将风格分类编码一同输入网络训练,得到的三维模型也是该风格分类编码对应风格类型的三维模型。这样即可训练网络根据输入的风格编码和无材质的三维模型(如CAD模型),对模型的各个形态学部分,预测对应的材质分类,进而生成指定风格的高真实感CAD模型。在网络的推理阶段,只需输入为无材质的三维模型(如CAD模型)以及期望的风格分类的风格编码,即可输出指定风格的,且赋予了材质信息的三维模型。从而,可以对大量无材质信息的三维模型进行按风格分类的材质赋予。It should be noted that the style classification code is input into the network training, and the obtained 3D model is also a 3D model of the style type corresponding to the style classification code. In this way, the network can be trained to predict the corresponding material classification for each morphological part of the model based on the input style code and the 3D model without material (such as a CAD model), and then generate a high-realistic CAD model of a specified style. In the reasoning stage of the network, only the 3D model without material (such as a CAD model) and the style code of the desired style classification need to be input to output a 3D model of the specified style with material information. In this way, a large number of 3D models without material information can be assigned materials according to style classification.
例如,可以输入无材质信息的沙发、电视柜、衣柜、餐桌茶几等家具的三维模型,以及多个家具的图像以及中式风格的风格分类编码,然后通过网络训练得到中式风格的沙发、电视柜、衣柜、餐桌茶几等家具的三维模型。For example, you can input 3D models of furniture such as sofas, TV cabinets, wardrobes, dining tables and coffee tables without material information, as well as images of multiple furniture and Chinese-style style classification codes, and then obtain 3D models of Chinese-style sofas, TV cabinets, wardrobes, dining tables and coffee tables through network training.
在一种可能的实现方式中,可以根据所述场景的第一三维模型和所述目标实例的目标第二三维模型生成所述场景的第二三维模型。In a possible implementation manner, the second three-dimensional model of the scene may be generated according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
例如,可以将场景的第一三维模型中每一实例的第一三维模型替换为每一实例的目标第二三维模型以得到场景的第二三维模型。For example, the first three-dimensional model of each instance in the first three-dimensional model of the scene may be replaced with the target second three-dimensional model of each instance to obtain the second three-dimensional model of the scene.
在一种可能的实现方式中,可以根据所述场景的图像确定所述目标实例的目标位置,然后删除所述场景的第一三维模型中所述目标实例的第一三维模型,之后在所述目标实例的目标位置设置所述目标实例的目标第二三维模型以生成所述场景的第二三维模型。其中,所述目标位置用于指示所述目标实例的第一三维模型在所述场景的第一三维模型中的位置。In a possible implementation, the target position of the target instance can be determined according to the image of the scene, and then the first three-dimensional model of the target instance in the first three-dimensional model of the scene is deleted, and then the target second three-dimensional model of the target instance is set at the target position of the target instance to generate the second three-dimensional model of the scene. The target position is used to indicate the position of the first three-dimensional model of the target instance in the first three-dimensional model of the scene.
可以看出,本申请实施例提供的方法,可以通过将所述场景的第一三维模型中每一实例的第一三维模型替换为与实例几何形状类似且与场景风格类型一致的目标第二三维模型。之后通过实例的三维 模型得到场景的第二三维模型。由于对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the method provided in the embodiment of the present application can replace the first 3D model of each instance in the first 3D model of the scene with a target second 3D model that is similar in geometry to the instance and consistent with the scene style type. The model obtains a second 3D model of the scene. Since the 3D reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a 3D model with high similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
在一种可能的实现方式中,该方法还可以包括:根据多个无材质信息的三维模型和多个实例的图像确定所述多个第二三维模型。其中,所述多个实例至少包括两个风格类型不同的实例。In a possible implementation, the method may further include: determining the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
需要说明的是,根据多个无材质信息的三维模型和多个实例的图像确定的多个第二三维模型中,可以包括几何形状相同但风格类型不同的多个第二三维模型和风格类型相同但几何形状不同的多个第二三维模型。It should be noted that the multiple second three-dimensional models determined based on multiple three-dimensional models without material information and multiple instance images may include multiple second three-dimensional models with the same geometric shapes but different style types and multiple second three-dimensional models with the same style type but different geometric shapes.
在一种可能的实现方式中,该方法还可以包括:接收编辑操作,所述编辑操作用于指示编辑所述场景的第二三维模型中的目标实例。响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。In a possible implementation, the method may further include: receiving an editing operation, the editing operation being used to instruct editing of a target instance in the second three-dimensional model of the scene, and in response to the editing operation, editing the target instance in the second three-dimensional model of the scene.
可选地,所述编辑操作可以包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation manner, in response to the movement operation, a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过移动操作在场景的第二三维模型中移动,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation. Compared with the 3D model obtained by the related technology, the 3D model obtained in the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中央的餐桌为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的餐桌,并通过移动触摸屏幕的手指使房屋的三维模型中的餐桌在房屋的三维模型中移动。For example, taking the target instance as the dining table in the center of the house, the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
可选地,所述编辑操作可以包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, in response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过删除操作单独删除的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation. Compared with the 3D model obtained by the related art, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋的沙发为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的沙发,将其拖移至三维模型外,从而删除房屋的三维模型中的沙发。For example, taking the target instance as a sofa in a house, the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
可选地,所述编辑操作可以包括替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,可以响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation manner, in response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation. Compared with the 3D model obtained by the related technology, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中的中式风格茶几为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的中式风格茶几,并通过长按屏幕进入三维模型库,然后从三维模型库中选择现代风格茶几,将房屋的三维场景中的中式风格茶几替换为现代风格茶几。For example, taking the target instance as a Chinese-style tea table in a house, the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
在一种可能的实现方式中,可以确定所述目标实例的目标第二三维模型的三维位置。然后删除所述场景的第二三维模型中目标实例的目标第二三维模型。之后在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。其中,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置。In a possible implementation, the three-dimensional position of the target second three-dimensional model of the target instance may be determined. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance. The three-dimensional position is used to indicate the position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作确定目标实例的目标第二三维模型的三维位置, 然后删除场景的第二三维模型中目标实例的目标第二三维模型,之后在目标实例的目标第二三维模型的三维位置设置预设实例的目标第二三维模型,从而对三维模型中所述目标实例进行单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can determine the 3D position of the target second 3D model of the target instance through replacement operation. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted, and then the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the target instance in the three-dimensional model individually. Compared with the three-dimensional model obtained by the related technology, the three-dimensional model obtained in the embodiment of the present application is more flexible.
第二方面,本申请实施例提供了另一种模型处理方法,该方法包括:接收编辑操作。响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。其中,所述编辑操作用于指示编辑场景的第二三维模型中的目标实例,所述场景的第二三维模型包括所述场景中目标实例的目标第二三维模型,所述目标实例的目标第二三维模型由所述场景的目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定得到,所述目标第二三维模型是与所述目标实例几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型,所述目标实例为所述场景中的任一物体或背景。In a second aspect, an embodiment of the present application provides another model processing method, the method comprising: receiving an editing operation. In response to the editing operation, editing a target instance in a second three-dimensional model of the scene. The editing operation is used to indicate editing a target instance in the second three-dimensional model of the scene, the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene, the target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models by a first three-dimensional model of the target instance of the scene and an image of the scene, the target second three-dimensional model is a three-dimensional model that matches the geometry of the target instance and is of the same style type as the scene where the target instance is located, and the target instance is any object or background in the scene.
可以看出,本申请实施例提供过的模型处理方法,可以通过与场景中实例(即物体和背景)风格一致且几何形状类似的实例的三维模型得到场景的第二三维模型。相较于相关三维重建技术在对真实场景进行三维重建时仅考虑了场景的几何结构,本申请实施例提供模型处理方法在对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the model processing method provided in the embodiment of the present application can obtain a second three-dimensional model of the scene through a three-dimensional model of an instance that is consistent in style and similar in geometry to the instance in the scene (i.e., the object and the background). Compared with the related three-dimensional reconstruction technology that only considers the geometric structure of the scene when performing three-dimensional reconstruction of the real scene, the model processing method provided in the embodiment of the present application not only considers the geometric shape of each instance in the scene but also considers the style type of the scene when performing three-dimensional reconstruction of the real scene, so that a three-dimensional model with a high degree of similarity to the scene (consistent in scene style and similar in geometry) can be obtained.
可选地,所述编辑操作可以包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation manner, in response to the movement operation, a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过移动操作在场景的第二三维模型中移动,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation. Compared with the 3D model obtained by the related technology, the 3D model obtained in the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中央的餐桌为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的餐桌,并通过移动触摸屏幕的手指使房屋的三维模型中的餐桌在房屋的三维模型中移动。For example, taking the target instance as the dining table in the center of the house, the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
可选地,所述编辑操作可以包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, in response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过删除操作单独删除的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation. Compared with the 3D model obtained by the related art, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋的沙发为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的沙发,将其拖移至三维模型外,从而删除房屋的三维模型中的沙发。For example, taking the target instance as a sofa in a house, the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
可选地,所述编辑操作可以包括替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,可以响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation manner, in response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation. Compared with the 3D model obtained by the related technology, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中的中式风格茶几为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的中式风格茶几,并通过长按屏幕进入三维模型库,然后从三维模型库中选择现代风格茶几,将房屋的三维场景中的中式风格茶几替换为现代风格茶几。For example, taking the target instance as a Chinese-style tea table in a house, the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
在一种可能的实现方式中,可以确定所述目标实例的目标第二三维模型的三维位置。然后删除所述场景的第二三维模型中目标实例的目标第二三维模型。之后在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。其中,所述三维位置用于指示所述目标实例的目标 第二三维模型在场景的第二三维模型中的位置。In a possible implementation, the three-dimensional position of the target second three-dimensional model of the target instance can be determined. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance. The three-dimensional position is used to indicate the target second three-dimensional model of the target instance. The position of the second 3D model within the second 3D model of the scene.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作确定目标实例的目标第二三维模型的三维位置,然后删除场景的第二三维模型中目标实例的目标第二三维模型,之后在目标实例的目标第二三维模型的三维位置设置预设实例的目标第二三维模型,从而对三维模型中所述目标实例进行单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the three-dimensional model obtained by the related technology is a whole, and each object in the three-dimensional model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second three-dimensional model of the scene is obtained by combining the three-dimensional models of each instance in the scene, each instance of the second three-dimensional model of the scene can determine the three-dimensional position of the target second three-dimensional model of the target instance through a replacement operation, and then delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene, and then set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the target instance in the three-dimensional model separately. Compared with the three-dimensional model obtained by the related technology, the three-dimensional model obtained in the embodiment of the present application is more flexible.
第三方面,本申请实施例提供了一种模型处理装置,该模型处理装置包括:收发单元和处理单元。所述收发单元,用于获取场景中目标实例的第一三维模型和所述场景的图像,所述目标实例为所述场景中的任一物体或背景。所述处理单元,用于根据所述目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定所述目标实例的目标第二三维模型,所述目标第二三维模型是与所述目标实例的几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型。In a third aspect, an embodiment of the present application provides a model processing device, which includes: a transceiver unit and a processing unit. The transceiver unit is used to obtain a first three-dimensional model of a target instance in a scene and an image of the scene, wherein the target instance is any object or background in the scene. The processing unit is used to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene, wherein the target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the target instance is located.
在一种可能的实现方式中,所述处理单元具体用于:根据所述场景的图像确定所述场景的风格类型;根据所述目标实例的第一三维模型和所述场景的风格类型从多个第二三维模型中确定所述目标实例的目标第二三维模型。In a possible implementation, the processing unit is specifically used to: determine the style type of the scene based on the image of the scene; and determine the target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the style type of the scene.
在一种可能的实现方式中,所述处理单元具体用于:将所述场景的图像输入第一网络以确定所述场景的风格类型。In a possible implementation manner, the processing unit is specifically configured to: input the image of the scene into a first network to determine the style type of the scene.
在一种可能的实现方式中,所述处理单元具体用于:将所述目标实例的第一三维模型和所述场景的风格类型输入第二网络以从多个第二三维模型中确定所述目标实例的目标第二三维模型。In a possible implementation, the processing unit is specifically configured to: input the first three-dimensional model of the target instance and the style type of the scene into a second network to determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models.
在一种可能的实现方式中,所述收发单元具体用于:对所述场景的第一三维模型进行分割操作以得到所述目标实例的第一三维模型,所述分割操作包括语义分割和/或实例分割。In a possible implementation, the transceiver unit is specifically configured to: perform a segmentation operation on the first three-dimensional model of the scene to obtain the first three-dimensional model of the target instance, wherein the segmentation operation includes semantic segmentation and/or instance segmentation.
在一种可能的实现方式中,所述处理单元还用于:根据多个无材质信息的三维模型和多个实例的图像确定所述多个第二三维模型,所述多个实例至少包括两个风格类型不同的实例。In a possible implementation, the processing unit is further configured to: determine the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
在一种可能的实现方式中,所述处理单元还用于:根据所述场景的第一三维模型和所述目标实例的目标第二三维模型生成所述场景的第二三维模型。In a possible implementation manner, the processing unit is further configured to: generate a second three-dimensional model of the scene according to the first three-dimensional model of the scene and a target second three-dimensional model of the target instance.
在一种可能的实现方式中,所述处理单元具体用于:根据所述场景的图像确定所述目标实例的目标位置,所述目标位置用于指示所述目标实例的第一三维模型在所述场景的第一三维模型中的位置。删除所述场景的第一三维模型中所述目标实例的第一三维模型。在所述目标实例的目标位置设置所述目标实例的目标第二三维模型以生成所述场景的第二三维模型。In a possible implementation, the processing unit is specifically configured to: determine a target position of the target instance according to the image of the scene, the target position being used to indicate a position of a first three-dimensional model of the target instance in a first three-dimensional model of the scene, delete the first three-dimensional model of the target instance in the first three-dimensional model of the scene, and set a target second three-dimensional model of the target instance at the target position of the target instance to generate a second three-dimensional model of the scene.
在一种可能的实现方式中,所述收发单元还用于:接收编辑操作,所述编辑操作用于指示编辑所述场景的第二三维模型中的目标实例。In a possible implementation manner, the transceiver unit is further used to: receive an editing operation, where the editing operation is used to instruct editing of a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元,还用于响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。In a possible implementation, the processing unit is further configured to edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
可选地,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a moving operation, and the moving operation is used to instruct to move a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元具体用于:响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation manner, the processing unit is specifically configured to: in response to the movement operation, move a target second three-dimensional model of a target instance in a second three-dimensional model of the scene from a first position to a second position.
可选地,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元具体用于:响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, the processing unit is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
可选地,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a replacement operation, and the replacement operation is used to instruct to replace a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,所述处理单元具体用于:响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation manner, the processing unit is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
在一种可能的实现方式中,所述处理单元具体用于:确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置。删除所述场景的第二三维模型中目标实例的目标第二三维模型。在所述目标实例的目标第二三维模型 的三维位置设置所述预设实例的目标第二三维模型。In a possible implementation, the processing unit is specifically used to: determine a three-dimensional position of the target second three-dimensional model of the target instance, where the three-dimensional position is used to indicate a position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. Delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. The three-dimensional position of the preset instance is set as the target second three-dimensional model.
第四方面,本申请实施例提供了另一种模型处理装置,该模型处理装置包括:收发单元和处理单元。所述收发单元,用于接收编辑操作。所述处理单元,用于响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。其中,所述编辑操作用于指示编辑场景的第二三维模型中的目标实例,所述场景的第二三维模型包括所述场景中目标实例的目标第二三维模型,所述目标实例的目标第二三维模型由所述场景的目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定得到,所述目标第二三维模型是与所述目标实例几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型,所述目标实例为所述场景中的任一物体或背景。In a fourth aspect, an embodiment of the present application provides another model processing device, which includes: a transceiver unit and a processing unit. The transceiver unit is used to receive an editing operation. The processing unit is used to edit a target instance in the second three-dimensional model of the scene in response to the editing operation. The editing operation is used to indicate the target instance in the second three-dimensional model of the editing scene, and the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene, and the target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models by a first three-dimensional model of the target instance of the scene and an image of the scene, and the target second three-dimensional model is a three-dimensional model that matches the geometry of the target instance and has the same style type as the scene where the target instance is located, and the target instance is any object or background in the scene.
可选地,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a moving operation, and the moving operation is used to instruct to move a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元具体用于:响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation manner, the processing unit is specifically configured to: in response to the movement operation, move a target second three-dimensional model of a target instance in a second three-dimensional model of the scene from a first position to a second position.
可选地,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元具体用于:响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, the processing unit is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
可选地,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a replacement operation, and the replacement operation is used to instruct to replace a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,所述处理单元具体用于:响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation manner, the processing unit is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
在一种可能的实现方式中,所述处理单元具体用于:确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置。删除所述场景的第二三维模型中目标实例的目标第二三维模型。在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。In a possible implementation, the processing unit is specifically configured to: determine a three-dimensional position of a target second three-dimensional model of the target instance, the three-dimensional position being used to indicate a position of the target second three-dimensional model of the target instance in a second three-dimensional model of a scene; delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene; and set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance.
第五方面,本申请实施例还提供一种模型处理装置,该模型处理装置包括:至少一个处理器,当所述至少一个处理器执行程序代码或指令时,实现上述第一方面或其任意可能的实现方式中所述的方法。In a fifth aspect, an embodiment of the present application further provides a model processing device, which includes: at least one processor, when the at least one processor executes program code or instructions, it implements the method described in the above first aspect or any possible implementation method thereof.
可选地,该模型处理装置还可以包括至少一个存储器,该至少一个存储器用于存储该程序代码或指令。Optionally, the model processing device may further include at least one memory, and the at least one memory is used to store the program code or instruction.
第六方面,本申请实施例还提供一种芯片,包括:输入接口、输出接口、至少一个处理器。可选地,该芯片还包括存储器。该至少一个处理器用于执行该存储器中的代码,当该至少一个处理器执行该代码时,该芯片实现上述第一方面或其任意可能的实现方式中所述的方法。In a sixth aspect, an embodiment of the present application further provides a chip, comprising: an input interface, an output interface, and at least one processor. Optionally, the chip further comprises a memory. The at least one processor is used to execute the code in the memory, and when the at least one processor executes the code, the chip implements the method described in the first aspect or any possible implementation thereof.
可选地,上述芯片还可以为集成电路。Optionally, the above chip may also be an integrated circuit.
第七方面,本申请实施例还提供一种计算机可读存储介质,用于存储计算机程序,该计算机程序包括用于实现上述第一方面或其任意可能的实现方式中所述的方法。In a seventh aspect, an embodiment of the present application further provides a computer-readable storage medium for storing a computer program, wherein the computer program includes methods for implementing the method described in the above-mentioned first aspect or any possible implementation thereof.
第八方面,本申请实施例还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机实现上述第一方面或其任意可能的实现方式中所述的方法。In an eighth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the method described in the first aspect or any possible implementation thereof.
本实施例提供的模型处理装置、计算机存储介质、计算机程序产品和芯片均用于执行上文所提供的方法,因此,其所能达到的有益效果可参考上文所提供的方法中的有益效果,此处不再赘述。The model processing device, computer storage medium, computer program product and chip provided in this embodiment are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the method provided above and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请实施例的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
图1为本申请实施例提供的一种模型处理系统的结构示意图;FIG1 is a schematic diagram of the structure of a model processing system provided in an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的结构示意图;FIG2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
图3为本申请实施例提供的一种模型处理装置的结构示意图;FIG3 is a schematic diagram of the structure of a model processing device provided in an embodiment of the present application;
图4为本申请实施例提供的另一种电子设备的结构示意图; FIG4 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
图5为本申请实施例提供的一种模型处理方法的流程示意图;FIG5 is a schematic diagram of a flow chart of a model processing method provided in an embodiment of the present application;
图6为本申请实施例提供的一种编辑页面的示意图;FIG6 is a schematic diagram of an editing page provided in an embodiment of the present application;
图7为本申请实施例提供的另一种模型处理方法的流程示意图;FIG7 is a flow chart of another model processing method provided in an embodiment of the present application;
图8为本申请实施例提供的又一种模型处理方法的流程示意图;FIG8 is a flow chart of another model processing method provided in an embodiment of the present application;
图9为本申请实施例提供的另一种模型处理装置的结构示意图;FIG9 is a schematic diagram of the structure of another model processing device provided in an embodiment of the present application;
图10为本申请实施例提供的又一种模型处理装置的结构示意图;FIG10 is a schematic diagram of the structure of another model processing device provided in an embodiment of the present application;
图11为本申请实施例提供的一种芯片的结构示意图;FIG11 is a schematic diagram of the structure of a chip provided in an embodiment of the present application;
图12为本申请实施例提供的又一种电子设备的结构示意图。FIG. 12 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请实施例一部分实施例,而不是全部的实施例。基于本申请实施例中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请实施例保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
本申请实施例的说明书以及附图中的术语“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理,而不是用于描述对象的特定顺序。The terms "first" and "second" and the like in the description and drawings of the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
此外,本申请实施例的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选的还包括其他没有列出的步骤或单元,或可选的还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
需要说明的是,本申请实施例的描述中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优先或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the description of the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as having priority or advantage over other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。In the description of the embodiments of the present application, unless otherwise specified, “plurality” means two or more.
三维重建技术是指对三维物体建立适合计算机表示和处理的数学模型,是在计算机环境下对其进行处理、操作和分析其性质的基础,也是在计算机中建立表达客观世界的虚拟现实的关键技术。Three-dimensional reconstruction technology refers to the establishment of a mathematical model suitable for computer representation and processing of three-dimensional objects. It is the basis for processing, operating and analyzing its properties in a computer environment. It is also a key technology for establishing virtual reality in computers to express the objective world.
三维重建技术可以通过真实场景的数据对真实场景进行三维重建得到真实场景的三维模型。Three-dimensional reconstruction technology can reconstruct the real scene in three dimensions using the data of the real scene to obtain a three-dimensional model of the real scene.
然而相关三维重建技术在对真实场景进行三维重建时仅考虑了场景的几何结构,导致重建得到真实场景的三维模型与真实场景差别较大。However, related 3D reconstruction technologies only consider the geometric structure of the scene when performing 3D reconstruction of the real scene, resulting in a significant difference between the reconstructed 3D model of the real scene and the real scene.
为此,本申请实施例提供了一种模型处理方法,能够得到与场景相似度较高的三维模型,该方法可以应用于模型处理系统。To this end, an embodiment of the present application provides a model processing method that can obtain a three-dimensional model with a high degree of similarity to the scene. The method can be applied to a model processing system.
图1示出了上述模型处理系统的一种可能的存在形式。如图1所示,上述模型处理系统包括:模型处理装置和多个电子设备。Fig. 1 shows a possible existence form of the above model processing system. As shown in Fig. 1, the above model processing system includes: a model processing device and a plurality of electronic devices.
电子设备,用于根据传感器采集的数据确定场景的第一三维模型,以及向模型处理装置传输场景的第一三维模型和场景的图像。The electronic device is used to determine a first three-dimensional model of a scene based on data collected by a sensor, and transmit the first three-dimensional model of the scene and an image of the scene to a model processing device.
例如,电子设备可以通过传感器采集电子设备的位姿、场景的图像(如关键帧RGB图像、场景的深度图)等数据并将这些数据作为输入,重建出场景的Mesh模型,并提取出场景的Mesh模型中的场景的顶点数据。然后将场景的顶点数据作为输入输出场景的第一三维模型。最后,通过网络传输单元将场景的图像和场景的第一三维模型上传至模型处理装置。For example, the electronic device can collect data such as the posture of the electronic device, the image of the scene (such as a key frame RGB image, a depth map of the scene) through a sensor and use these data as input to reconstruct the Mesh model of the scene and extract the vertex data of the scene in the Mesh model of the scene. Then, the vertex data of the scene is used as input to output the first three-dimensional model of the scene. Finally, the image of the scene and the first three-dimensional model of the scene are uploaded to the model processing device through the network transmission unit.
模型处理装置,用于执行本申请实施例提供的模型处理方法。A model processing device is used to execute the model processing method provided in the embodiment of the present application.
电子设备,还用于接收用户操作,以及根据用户操作对场景的三维模型中的实例进行编辑(如移动、删除和替换)。The electronic device is also used to receive user operations and edit (such as move, delete and replace) instances in the three-dimensional model of the scene according to the user operations.
可选地,上述电子设备可以为手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)。 Optionally, the electronic device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
图2示出了上述电子设备的一种可能的存在形式,如图2所示,该电子设备可以包括:传感器单元、计算单元、存储单元和网络传输单元。FIG. 2 shows a possible existence form of the electronic device mentioned above. As shown in FIG. 2 , the electronic device may include: a sensor unit, a computing unit, a storage unit and a network transmission unit.
可选地,上述传感器单元可以包括:视觉传感器、深度传感器以及其他传感器。Optionally, the sensor unit may include: a visual sensor, a depth sensor and other sensors.
视觉传感器,用于获取场景的图像信息。Visual sensor, used to obtain image information of the scene.
可选地,上述视觉传感器可以为相机或其他具有视觉采集功能的设备。Optionally, the visual sensor may be a camera or other device with a visual acquisition function.
深度传感器,用于获取场景深度信息。Depth sensor, used to obtain scene depth information.
可选地,上述深度传感器可以为间接测量飞行时间(Indirect Time of Fly,iToF)、直接测量飞行时间(Direct Time of Fly,dToF)或其他具有视觉采集功能的设备。Optionally, the depth sensor can be an indirect time of flight (Indirect Time of Fly, iToF), a direct time of flight (Direct Time of Fly, dToF) or other device with visual acquisition function.
网络传输单元,用于与其他设备(如与模型处理装置或其他电子设备)进行通信和数据交换。The network transmission unit is used for communicating and exchanging data with other devices (such as a model processing device or other electronic devices).
可选地,网络传输单元可以包括无线保真(WirelessFidelity,WiFi)通信单元、第四代移动通信技术(the 4th generation mobile communication technology,4G)通信单元、第五代移动通信技术(the 5th generation mobile communication technology,5G)通信单元以及其他通信单元。Optionally, the network transmission unit may include a Wireless Fidelity (WiFi) communication unit, a 4th generation mobile communication technology (4G) communication unit, a 5th generation mobile communication technology (5G) communication unit and other communication units.
计算单元,用于运行电子设备的操作系统并使用重建算法根据电子设备传感器采集的数据重建对场景进行重建(如采用实时Mesh重建算法对场景进行重建),以及使用深度估计方法(如单目深度估计方法)根据场景的图像信息,获取图像的深度信息。A computing unit is used to run the operating system of the electronic device and use a reconstruction algorithm to reconstruct the scene based on the data collected by the sensor of the electronic device (such as using a real-time Mesh reconstruction algorithm to reconstruct the scene), and use a depth estimation method (such as a monocular depth estimation method) to obtain the depth information of the image based on the image information of the scene.
可选地,计算单元可以包括中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、缓存和寄存器。Optionally, the computing unit may include a central processing unit (CPU), a graphics processing unit (GPU), a cache, and registers.
存储单元,用于存储电子设备的数据。The storage unit is used to store data of the electronic device.
可选地,存储单元可以包括内部存储和外部存储。Optionally, the storage unit may include internal storage and external storage.
图3示出了上述模型处理装置的一种可能的存在形式,如图3所示,该模型处理装置可以包括:计算单元、存储单元和网络传输单元。FIG3 shows a possible existence form of the above-mentioned model processing device. As shown in FIG3 , the model processing device may include: a computing unit, a storage unit and a network transmission unit.
计算单元,用于执行本申请实施例提供的模型处理方法。A computing unit is used to execute the model processing method provided in the embodiment of the present application.
网络传输单元,用于与其他设备(如与其他电子设备)进行通信和数据交换。The network transmission unit is used for communicating and exchanging data with other devices (such as other electronic devices).
存储单元,用于模型处理装置的数据。A storage unit for data of the model processing device.
图4示出了上述电子设备的另一种可能的存在形式,如图4所示,该电子设备可以包括:计算单元、存储单元、显示单元、交互单元和网络传输单元。FIG4 shows another possible existence form of the electronic device mentioned above. As shown in FIG4 , the electronic device may include: a computing unit, a storage unit, a display unit, an interaction unit and a network transmission unit.
计算单元,用于运行电子设备操作系统以及根据用户操作(指令)对场景的三维模型进行编辑(如移动、删除和替换)。The computing unit is used to run the operating system of the electronic device and edit (such as move, delete and replace) the three-dimensional model of the scene according to the user operation (instruction).
存储单元,用于存储电子设备的数据。The storage unit is used to store data of the electronic device.
网络传输单元,用于与其他设备(如与模型处理装置或其他电子设备)进行通信和数据交换。The network transmission unit is used for communicating and exchanging data with other devices (such as a model processing device or other electronic devices).
显示单元,用于可视化显示。Display unit, used for visual display.
可选地,显示单元可以为显示屏。Optionally, the display unit may be a display screen.
交互单元,用于接收用户指令。The interaction unit is used to receive user instructions.
在一种可能的实现方式中,交互单元可以通过交互操作设备接收用户指令。In a possible implementation, the interaction unit may receive the user instruction through the interaction operation device.
可选地,上述交互操作设备可以包括鼠标、键盘或触控屏等具有交互操作功能的设备。Optionally, the above-mentioned interactive operation device may include a device with interactive operation function such as a mouse, a keyboard or a touch screen.
图5示出了本申请实施例提供的一种模型处理方法,该方法可以由上述模型处理系统中的模型处理装置执行,如图5所示,该方法包括:FIG5 shows a model processing method provided by an embodiment of the present application. The method can be executed by a model processing device in the above-mentioned model processing system. As shown in FIG5 , the method includes:
S501、获取场景中目标实例的第一三维模型和场景的图像。S501: Acquire a first three-dimensional model of a target instance in a scene and an image of the scene.
其中,上述目标实例为上述场景中的任一物体或背景。The target instance is any object or background in the scene.
示例性地,模型处理装置可以接收电子设备发送的场景中目标实例的第一三维模型和场景的图像。Exemplarily, the model processing device may receive a first three-dimensional model of a target instance in a scene and an image of the scene sent by an electronic device.
又示例性地,模型处理装置可以通过传感器单元采集模型处理装置的位姿、场景的图像(如场景的关键帧RGB图像)、深度图等作为输入,输出场景的Mesh模型。然后通过计算单元根据场景的Mesh模型的顶点数据,输出场景中目标实例的第一三维模型。由此获取场景中目标实例的第一三维模型和场景的图像。As another example, the model processing device can collect the posture of the model processing device, the image of the scene (such as the key frame RGB image of the scene), the depth map, etc. as input through the sensor unit, and output the Mesh model of the scene. Then, the computing unit outputs the first three-dimensional model of the target instance in the scene according to the vertex data of the Mesh model of the scene. Thus, the first three-dimensional model of the target instance in the scene and the image of the scene are obtained.
上述模型处理装置可以为移动终端,相比于相关技术的基于特殊仪器(激光扫描仪、全景相机等)的重建方法得到场景或场景中目标实例的第一三维模型,本申请实施例仅使用移动终端,不需要更复杂的操作就可以得到场景或场景中目标实例的第一三维模型。The above-mentioned model processing device can be a mobile terminal. Compared with the reconstruction method based on special instruments (laser scanner, panoramic camera, etc.) in the related technology to obtain the first three-dimensional model of the scene or the target instance in the scene, the embodiment of the present application only uses a mobile terminal and does not require more complicated operations to obtain the first three-dimensional model of the scene or the target instance in the scene.
使用Mesh模型的顶点数据得到场景的第一三维模型,相比于相关技术基于多视角立体匹配的算法, 可以有效解决传统算法在弱纹理区域重建不完整、以及由于扫描区域不完整导致的重建物体缺失等问题。The vertex data of the Mesh model is used to obtain the first three-dimensional model of the scene. Compared with the related technology based on multi-view stereo matching algorithm, It can effectively solve the problems of incomplete reconstruction of weak texture areas by traditional algorithms and missing reconstructed objects due to incomplete scanning areas.
可选地,上述第一三维模型可以为点云模型或面元(Mesh)模型。Optionally, the first three-dimensional model may be a point cloud model or a mesh model.
可选地,上述场景的图像可以为场景的关键帧图像。其中,场景的关键帧图像是生成场景的Mesh模型所需的图像。Optionally, the image of the scene may be a key frame image of the scene, wherein the key frame image of the scene is an image required to generate a Mesh model of the scene.
可选地,上述场景的图像可以为场景的RGB图像。Optionally, the image of the scene may be an RGB image of the scene.
在一种可能的实现方式中,可以对上述场景的第一三维模型进行分割操作以得到上述场景中目标实例的第一三维模型,上述分割操作包括语义分割和/或实例分割。In a possible implementation, a segmentation operation may be performed on the first three-dimensional model of the scene to obtain a first three-dimensional model of the target instance in the scene, and the segmentation operation includes semantic segmentation and/or instance segmentation.
需要说明的是,语义分割会为图像中的每个像素分配一个类别,但是同一类别之间的对象不会区分。而实例分割是对同一类别之间的物体进行分类。It should be noted that semantic segmentation assigns a category to each pixel in the image, but does not distinguish between objects in the same category. Instance segmentation, on the other hand, classifies objects in the same category.
通过语义分割可以对场景中不同类别实例进行分割。例如,通过语义分割可以对场景中的沙发和桌子进行分割。Semantic segmentation can be used to segment instances of different categories in a scene. For example, semantic segmentation can be used to segment the sofa and table in a scene.
通过实例分割可以对场景中同一类别实例进行分割。例如,通过语义分割可以对场景中的不同类别的椅子进行分割。如将椅子分给办公椅和餐椅。Instance segmentation can be used to segment instances of the same category in a scene. For example, semantic segmentation can be used to segment chairs of different categories in a scene, such as dividing chairs into office chairs and dining chairs.
S502、根据目标实例的第一三维模型和场景的图像从多个第二三维模型中确定目标实例的目标第二三维模型。S502: Determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the image of the scene.
其中,目标实例的目标第二三维模型是与目标实例的几何形状匹配且与上述实例所在场景的风格类型相同的三维模型。The target second three-dimensional model of the target instance is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the above instance is located.
可选地,目标实例的目标第二三维模型也可以是与目标实例的几何形状匹配且与上述实例所在场景的风格类型相同、物品类别相同的三维模型。Optionally, the target second three-dimensional model of the target instance may also be a three-dimensional model that matches the geometric shape of the target instance and has the same style type and the same item category as the scene where the above instance is located.
在一种可能的实现方式中,可以根据上述场景的图像确定上述场景的风格类型。然后根据上述目标实例的第一三维模型和上述场景的风格类型从多个第二三维模型中确定上述目标实例的目标第二三维模型。In a possible implementation, the style type of the scene may be determined according to the image of the scene, and then a target second 3D model of the target instance is determined from a plurality of second 3D models according to the first 3D model of the target instance and the style type of the scene.
可以看出,本申请实施例可以通过场景的图像确定上述场景的风格类型,然后根据场景的风格类型和目标实例的第一三维模型从多个第二三维模型中确定与场景目标实例的几何形状匹配且与上述目标实例所在场景的风格类型相同的三维模型。由于对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the embodiment of the present application can determine the style type of the scene through the image of the scene, and then determine a three-dimensional model that matches the geometric shape of the scene target instance and has the same style type as the scene where the target instance is located from multiple second three-dimensional models according to the style type of the scene and the first three-dimensional model of the target instance. Since the three-dimensional reconstruction of the real scene not only considers the geometric shape of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometric shape) can be obtained.
上述风格类型可以包括古典风格、现代风格、商务风格、中式风格、北欧风格、日式风格等。The above style types may include classical style, modern style, business style, Chinese style, Nordic style, Japanese style, etc.
可选地,上述多个第二三维模型可以包括CAD模型、pore模型、SolidWorks模型或UG模型。Optionally, the plurality of second three-dimensional models may include a CAD model, a pore model, a SolidWorks model or a UG model.
示例性地,可以根据上述场景的风格类型和上述目标实例的第一三维模型从多个CAD模型中确定上述目标实例的目标第二三维模型。Exemplarily, the target second three-dimensional model of the target instance may be determined from a plurality of CAD models according to the style type of the scene and the first three-dimensional model of the target instance.
示例性地,可以根据上述场景的图像确定上述场景的风格类型为中式风格。然后根据目标实例的第一三维模型确定目标实例的几何形状。之后根据上述场景的风格类型和目标实例的几何形状,在包含有多个第二三维模型的模型库中匹配中式风格且与目标实例几何形状匹配的第二三维模型。Exemplarily, the style type of the scene can be determined as Chinese style based on the image of the scene. Then, the geometric shape of the target instance is determined based on the first three-dimensional model of the target instance. Then, based on the style type of the scene and the geometric shape of the target instance, a second three-dimensional model of Chinese style matching the geometric shape of the target instance is matched in a model library containing multiple second three-dimensional models.
需要说明的是,根据上述场景的图像确定上述场景的风格类型的具体方法可以采用本领域技术人员能够想到的任何一种方法进行处理,本申请实施例对此不作具体限定。It should be noted that the specific method for determining the style type of the above scene based on the image of the above scene can be processed by any method that can be thought of by those skilled in the art, and the embodiments of the present application do not specifically limit this.
在一种可能的实现方式中,可以将上述场景的图像输入第一网络以确定上述场景的风格类型。In a possible implementation, the image of the scene may be input into a first network to determine the style type of the scene.
例如,可以根据采用ResNext(一种图像分类网络结构)网络架构作为主干的第一网络,以场景的图像作为输入,输出场景的风格分类。For example, a first network using a ResNext (an image classification network structure) network architecture as a backbone can be used to take an image of a scene as input and output a style classification of the scene.
需要说明的是,根据上述目标实例的第一三维模型和上述场景的风格类型从多个第二三维模型中确定上述目标实例的目标第二三维模型的具体方法可以采用本领域技术人员能够想到的任何一种方法进行处理,本申请实施例对此不作具体限定。例如,可以将上述目标实例的第一三维模型和上述场景的风格类型输入第二网络以从多个第二三维模型中确定上述目标实例的目标第二三维模型。It should be noted that the specific method for determining the target second three-dimensional model of the target instance from multiple second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene can be processed by any method that can be thought of by a person skilled in the art, and the embodiment of the present application does not specifically limit this. For example, the first three-dimensional model of the target instance and the style type of the scene can be input into the second network to determine the target second three-dimensional model of the target instance from multiple second three-dimensional models.
下面以场景中的目标实例为例,介绍如何将上述目标实例的第一三维模型和上述场景的风格类型输入第二网络以从多个第二三维模型中确定上述目标实例的目标第二三维模型。Taking a target instance in a scene as an example, the following describes how to input the first 3D model of the target instance and the style type of the scene into a second network to determine a target second 3D model of the target instance from multiple second 3D models.
首先,将目标实例的第一三维模型输入第二网络中的几何形态编码网络(如Point Autoencoder),得到目标实例的几何形态编码。并根据第二三维模型库中与场景风格类型相同的多个第二三维模型的 几何形态编码与目标实例的几何形态编码之间的欧几里得距离,之后将距离最小的N个(如10个)第二三维模型作为替换候选第二三维模型。First, the first 3D model of the target instance is input into the geometric encoding network (such as Point Autoencoder) in the second network to obtain the geometric encoding of the target instance. The Euclidean distance between the geometric morphology encoding and the geometric morphology encoding of the target instance is calculated, and then N (such as 10) second 3D models with the smallest distance are used as replacement candidate second 3D models.
之后将每个替换候选第二三维模型分别投影到2D图片,得到对应的正视图、俯视图、左视图。然后与包含目标实例的语义分割图计算重叠度(Intersection over Union,IOU),将多视角IOU平均值最高的第二三维模型确定为目标实例的目标第二三维模型。After that, each replacement candidate second 3D model is projected onto the 2D image to obtain the corresponding front view, top view, and left view. Then, the Intersection over Union (IOU) is calculated with the semantic segmentation map containing the target instance, and the second 3D model with the highest multi-view IOU average is determined as the target second 3D model of the target instance.
需要说明的是,本申请实施例提供的模型处理方法基于风格一致性的三维模型检索与匹配算法,可以解决重建场景中不同实例(如家具)风格不一致,导致重建场景模型协调性差等缺点。It should be noted that the model processing method provided in the embodiment of the present application is based on a three-dimensional model retrieval and matching algorithm with style consistency, which can solve the shortcomings of inconsistent styles of different instances (such as furniture) in the reconstructed scene, resulting in poor coordination of the reconstructed scene model.
例如,整体是商务风格的场景中,有一把传统风格的椅子,这样看起来很不协调。经过本申请实施例提供的模型处理方法处理后,通过场景风格匹配,会把整体场景风格判定为商务风格。按当前算法,在模型检索和替换时,就会将传统风格的椅子替换成商务风格,保证了重建场景的风格一致性。For example, in a scene with a business style, there is a traditional style chair, which looks inconsistent. After being processed by the model processing method provided in the embodiment of the present application, the overall scene style will be determined to be business style through scene style matching. According to the current algorithm, during model retrieval and replacement, the traditional style chair will be replaced with the business style one, ensuring the style consistency of the reconstructed scene.
可以看出,本申请实施例提供过的模型处理方法,可以通过场景的图像和场景中任一物体或背景的三维模型从多个三维模型中匹配与该物体或背景风格相同且几何形状类似的目标第二三维模型。相较于相关三维重建技术在对真实场景进行三维重建时仅考虑了场景的几何结构,本申请实施例提供模型处理方法在对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the model processing method provided in the embodiment of the present application can match a target second three-dimensional model with the same style and similar geometry as the object or background from multiple three-dimensional models through the image of the scene and the three-dimensional model of any object or background in the scene. Compared with the related three-dimensional reconstruction technology that only considers the geometric structure of the scene when performing three-dimensional reconstruction of the real scene, the model processing method provided in the embodiment of the present application not only considers the geometric shape of each instance in the scene but also considers the style type of the scene when performing three-dimensional reconstruction of the real scene, so as to obtain a three-dimensional model with high similarity to the scene (consistent scene style and similar geometry).
可选地,本申请实施例提供的方法还可以包括:Optionally, the method provided in the embodiment of the present application may further include:
S503、根据上述场景的第一三维模型和上述目标实例的目标第二三维模型生成上述场景的第二三维模型。S503: Generate a second three-dimensional model of the scene according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
例如,可以将场景的第一三维模型中每一实例的第一三维模型替换为每一实例的目标第二三维模型以得到场景的第二三维模型。For example, the first three-dimensional model of each instance in the first three-dimensional model of the scene may be replaced with the target second three-dimensional model of each instance to obtain the second three-dimensional model of the scene.
在一种可能的实现方式中,可以根据上述场景的图像确定上述目标实例的目标位置,然后删除上述场景的第一三维模型中上述目标实例的第一三维模型,之后在上述目标实例的目标位置设置上述目标实例的目标第二三维模型以生成上述场景的第二三维模型。其中,上述目标位置用于指示上述目标实例的第一三维模型在上述场景的第一三维模型中的位置。In a possible implementation, the target position of the target instance can be determined according to the image of the scene, and then the first three-dimensional model of the target instance in the first three-dimensional model of the scene is deleted, and then the target second three-dimensional model of the target instance is set at the target position of the target instance to generate the second three-dimensional model of the scene. The target position is used to indicate the position of the first three-dimensional model of the target instance in the first three-dimensional model of the scene.
可以看出,本申请实施例提供的方法,可以通过将上述场景的第一三维模型中每一实例的第一三维模型替换为与实例几何形状类似且与场景风格类型一致的目标第二三维模型。之后通过实例的三维模型得到场景的第二三维模型。由于对真实场景进行三维重建时不仅考虑场景内各实例的几何形状还考虑了场景的风格类型,从而能够与场景相似度较高(场景风格一致且几何形状类似)的三维模型。It can be seen that the method provided in the embodiment of the present application can replace the first three-dimensional model of each instance in the first three-dimensional model of the above scene with a target second three-dimensional model that is similar to the instance geometry and consistent with the scene style type. Then, the second three-dimensional model of the scene is obtained through the three-dimensional model of the instance. Since the three-dimensional reconstruction of the real scene not only considers the geometry of each instance in the scene but also the style type of the scene, a three-dimensional model with a high degree of similarity to the scene (consistent scene style and similar geometry) can be obtained.
需要说明的是,根据上述场景的图像确定上述目标实例的目标位置的具体方法可以采用本领域技术人员能够想到的任何一种方法进行处理,本申请实施例对此不作具体限定。例如,可以使用投票(Canonical Voting)算法,获取每个实例的第一三维模型的带朝向的包围盒(Oriented Bounding Box),然后根据场景的图像(场景的关键帧RGB图像)确定目标实例在相机坐标系位姿,之后将目标实例在相机坐标系位姿转成世界坐标系位姿,最后根据场景的图像目标实例经过反投影后可以找到对应预测的带朝向的包围盒(Oriented Bounding Box)以确定目标实例的目标位置。之后可以对目标实例的目标第二三维模型进行尺寸调整与使其与实例的包围盒大小相似,并抹除场景的第一三维模型中包围盒中的点云,将目标实例的模型根据包围盒放置于场景的第一三维模型之中。It should be noted that the specific method for determining the target position of the above-mentioned target instance based on the image of the above-mentioned scene can be processed by any method that can be thought of by a person skilled in the art, and the embodiments of the present application do not specifically limit this. For example, a voting (Canonical Voting) algorithm can be used to obtain the oriented bounding box (Oriented Bounding Box) of the first three-dimensional model of each instance, and then the pose of the target instance in the camera coordinate system is determined based on the image of the scene (the key frame RGB image of the scene), and then the pose of the target instance in the camera coordinate system is converted into the pose of the world coordinate system. Finally, according to the image of the scene, the target instance can be back-projected to find the corresponding predicted oriented bounding box (Oriented Bounding Box) to determine the target position of the target instance. After that, the target second three-dimensional model of the target instance can be resized to be similar to the size of the bounding box of the instance, and the point cloud in the bounding box in the first three-dimensional model of the scene can be erased, and the model of the target instance can be placed in the first three-dimensional model of the scene according to the bounding box.
对上述场景的第一三维模型中的每个实例都经过以上处理,可以输出重建后的新组合的场景模型(即场景的第二三维模型)。Each instance in the first three-dimensional model of the scene is processed as above, and a reconstructed new combined scene model (ie, the second three-dimensional model of the scene) can be output.
可选地,该方法还可以包括:Optionally, the method may further include:
S504、根据多个无材质信息的三维模型和多个实例的图像确定上述多个第二三维模型。S504: Determine the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the plurality of instance images.
其中,上述多个实例至少包括两个风格类型不同的实例。The multiple instances mentioned above include at least two instances of different style types.
例如,可以根据无材质信息的沙发和茶几三维模型以及中式风格和商务风格实例的图像,得到中式风格沙发、商务风格沙发、中式风格茶几和商务风格茶几的三维模型。For example, the three-dimensional models of a Chinese-style sofa, a business-style sofa, a Chinese-style tea table, and a business-style tea table can be obtained based on the three-dimensional models of a sofa and a tea table without material information and the images of Chinese-style and business-style instances.
需要说明的是,根据多个无材质信息的三维模型和多个实例的图像确定的多个第二三维模型中,可以包括几何形状相同但风格类型不同的多个第二三维模型和风格类型相同但几何形状不同的多个第二三维模型。It should be noted that the multiple second three-dimensional models determined based on multiple three-dimensional models without material information and multiple instance images may include multiple second three-dimensional models with the same geometric shapes but different style types and multiple second three-dimensional models with the same style type but different geometric shapes.
在一种可能的实现方式中,可以根据多个无材质信息的三维模型、多个实例的图像和风格分类编码确定上述多个第二三维模型。其中,风格分类编码用于表征确定得到的多个第二三维模型的风格类 型。In a possible implementation, the plurality of second three-dimensional models may be determined based on a plurality of three-dimensional models without material information, a plurality of instance images, and style classification codes. The style classification codes are used to characterize the style categories of the plurality of second three-dimensional models determined. type.
示例性地,可以将多个无材质信息的三维模型、多个实例的图像和风格分类编码输入到网络训练模型中输出多个第二三维模型。Exemplarily, a plurality of three-dimensional models without material information, a plurality of instance images and style classification codes may be input into a network training model to output a plurality of second three-dimensional models.
需要说明的是,将风格分类编码一同输入网络训练,得到的三维模型也是该风格分类编码对应风格类型的三维模型。这样即可训练网络根据输入的风格编码和无材质的三维模型(如CAD模型),对模型的各个形态学部分,预测对应的材质分类,进而生成指定风格的高真实感CAD模型。在网络的推理阶段,只需输入为无材质的三维模型(如CAD模型)以及期望的风格分类的风格编码,即可输出指定风格的,且赋予了材质信息的三维模型。从而,可以对大量无材质信息的三维模型进行按风格分类的材质赋予。It should be noted that the style classification code is input into the network training, and the obtained 3D model is also a 3D model of the style type corresponding to the style classification code. In this way, the network can be trained to predict the corresponding material classification for each morphological part of the model based on the input style code and the 3D model without material (such as a CAD model), and then generate a high-realistic CAD model of a specified style. In the reasoning stage of the network, only the 3D model without material (such as a CAD model) and the style code of the desired style classification need to be input to output a 3D model of the specified style with material information. In this way, a large number of 3D models without material information can be assigned materials according to style classification.
例如,可以输入无材质信息的沙发、电视柜、衣柜、餐桌茶几等家具的三维模型,以及多个家具的图像以及中式风格的风格分类编码,然后通过网络训练得到中式风格的沙发、电视柜、衣柜、餐桌茶几等家具的三维模型。For example, you can input 3D models of furniture such as sofas, TV cabinets, wardrobes, dining tables and coffee tables without material information, as well as images of multiple furniture and Chinese-style style classification codes, and then obtain 3D models of Chinese-style sofas, TV cabinets, wardrobes, dining tables and coffee tables through network training.
S505、接收并响应于编辑操作。S505: Receive and respond to the editing operation.
其中,上述编辑操作用于指示编辑场景的第二三维模型中的目标实例。The above-mentioned editing operation is used to indicate the target instance in the second three-dimensional model of the editing scene.
可选地,所述编辑操作可以包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation manner, in response to the movement operation, a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过移动操作在场景的第二三维模型中移动,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation. Compared with the 3D model obtained by the related technology, the 3D model obtained in the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中央的餐桌为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的餐桌,并通过移动触摸屏幕的手指使房屋的三维模型中的餐桌在房屋的三维模型中移动。For example, taking the target instance as the dining table in the center of the house, the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
又示例性地,以目标实例为房屋中央的餐桌为例,用户可以通过鼠标选中房屋的三维模型中的餐桌,并通过鼠标使房屋的三维模型中的餐桌在房屋的三维模型中移动。As another example, taking the target instance as a dining table in the center of a house, the user can select the dining table in the three-dimensional model of the house with the mouse, and move the dining table in the three-dimensional model of the house with the mouse.
又示例性地,如图6所示,以目标实例为场景中的桌子1为例,用户可以通过键盘修改桌子的三维坐标(x,y,z)使场景的第二三维模型中的桌子1在场景的第二三维模型中移动。Also exemplarily, as shown in FIG6 , taking the target instance as table 1 in the scene, the user can modify the three-dimensional coordinates (x, y, z) of the table through the keyboard to move table 1 in the second three-dimensional model of the scene in the second three-dimensional model of the scene.
可选地,所述编辑操作可以包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, in response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过删除操作单独删除的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation. Compared with the 3D model obtained by the related art, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋的沙发为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的沙发,将其拖移至三维模型外,从而删除房屋的三维模型中的沙发。For example, taking the target instance as a sofa in a house, the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
又示例性地,如图6所示,以目标实例为场景中的沙发1为例,用户可以通过鼠标点击屏幕右侧的删除符号“X”删除场景的第二三维模型中的沙发1。As another example, as shown in FIG6 , taking the target instance as the sofa 1 in the scene, the user can delete the sofa 1 in the second three-dimensional model of the scene by clicking the delete symbol “X” on the right side of the screen with the mouse.
可选地,所述编辑操作可以包括替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,可以响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation manner, in response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。 It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation. Compared with the 3D model obtained by the related technology, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中的中式风格茶几为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的中式风格茶几,并通过长按屏幕进入三维模型库,然后从三维模型库中选择现代风格茶几,将房屋的三维场景中的中式风格茶几替换为现代风格茶几。For example, taking the target instance as a Chinese-style tea table in a house, the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
在一种可能的实现方式中,可以确定上述目标实例的目标第二三维模型的三维位置,上述三维位置用于指示实例的目标第二三维模型在场景的第二三维模型中的位置。然后删除上述场景的第二三维模型中上述目标实例的目标第二三维模型。之后在上述目标实例的目标第二三维模型的三维位置设置上述预设实例的目标第二三维模型。In a possible implementation, the three-dimensional position of the target second three-dimensional model of the target instance may be determined, and the three-dimensional position is used to indicate the position of the target second three-dimensional model of the instance in the second three-dimensional model of the scene. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作确定目标实例的目标第二三维模型的三维位置,然后删除场景的第二三维模型中目标实例的目标第二三维模型,之后在目标实例的目标第二三维模型的三维位置设置预设实例的目标第二三维模型,从而对三维模型中上述目标实例进行单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the three-dimensional model obtained by the related technology is a whole, and each object in the three-dimensional model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second three-dimensional model of the scene is obtained by combining the three-dimensional models of each instance in the scene, each instance of the second three-dimensional model of the scene can determine the three-dimensional position of the target second three-dimensional model of the target instance through a replacement operation, and then delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene, and then set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the above target instance in the three-dimensional model separately. Compared with the three-dimensional model obtained by the related technology, the three-dimensional model obtained in the embodiment of the present application is more flexible.
图7示出了本申请实施例提供的另一种模型处理方法,该方法可以由上述模型处理系统中的电子设备执行,如图7所示,该方法包括:FIG. 7 shows another model processing method provided by an embodiment of the present application. The method may be executed by an electronic device in the above-mentioned model processing system. As shown in FIG. 7 , the method includes:
S701、接收编辑操作。S701: Receive an editing operation.
其中,编辑操作用于指示编辑所述场景的第二三维模型中的目标实例。The editing operation is used to instruct editing of a target instance in the second three-dimensional model of the scene.
可选地,所述编辑操作可以包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a moving operation, where the moving operation is used to instruct moving a target instance in the second three-dimensional model of the scene.
可选地,所述编辑操作可以包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a deleting operation, where the deleting operation is used to instruct deleting a target instance in the second three-dimensional model of the scene.
可选地,所述编辑操作可以包括替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation may include a replacement operation for indicating replacing a target instance in the second three-dimensional model of the scene with a preset instance.
S702、响应于编辑操作,对场景的第二三维模型中目标实例进行编辑。S702: In response to the editing operation, edit the target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation manner, in response to the movement operation, a target second three-dimensional model of a target instance in the second three-dimensional model of the scene may be moved from a first position to a second position.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过移动操作在场景的第二三维模型中移动,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be moved in the second 3D model of the scene through a move operation. Compared with the 3D model obtained by the related technology, the 3D model obtained in the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中央的餐桌为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的餐桌,并通过移动触摸屏幕的手指使房屋的三维模型中的餐桌在房屋的三维模型中移动。For example, taking the target instance as the dining table in the center of the house, the user can select the dining table in the three-dimensional model of the house by touching the screen with a finger, and move the dining table in the three-dimensional model of the house by moving the finger touching the screen.
又示例性地,以目标实例为房屋中央的餐桌为例,用户可以通过鼠标选中房屋的三维模型中的餐桌,并通过鼠标使房屋的三维模型中的餐桌在房屋的三维模型中移动。As another example, taking the target instance as a dining table in the center of a house, the user can select the dining table in the three-dimensional model of the house with the mouse, and move the dining table in the three-dimensional model of the house with the mouse.
又示例性地,如图6所示,以目标实例为场景中的桌子1为例,用户可以通过键盘修改桌子的三维坐标(x,y,z)使场景的第二三维模型中的桌子1在场景的第二三维模型中移动。Also exemplarily, as shown in FIG6 , taking the target instance as table 1 in the scene, the user can modify the three-dimensional coordinates (x, y, z) of the table through the keyboard to move table 1 in the second three-dimensional model of the scene in the second three-dimensional model of the scene.
在一种可能的实现方式中,可以响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, in response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be deleted from the second three-dimensional model of the scene.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过删除操作单独删除的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related art is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be deleted separately through the deletion operation. Compared with the 3D model obtained by the related art, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋的沙发为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的沙发,将其拖移至三维模型外,从而删除房屋的三维模型中的沙发。For example, taking the target instance as a sofa in a house, the user can touch the screen with a finger to select the sofa in the three-dimensional model of the house and drag it outside the three-dimensional model, thereby deleting the sofa in the three-dimensional model of the house.
又示例性地,如图6所示,以目标实例为场景中的沙发1为例,用户可以通过鼠标点击屏幕右侧的删除符号“X”删除场景的第二三维模型中的沙发1。As another example, as shown in FIG6 , taking the target instance as the sofa 1 in the scene, the user can delete the sofa 1 in the second three-dimensional model of the scene by clicking the delete symbol “X” on the right side of the screen with the mouse.
在一种可能的实现方式中,可以响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。 In a possible implementation manner, in response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene may be replaced with the target second three-dimensional model of the preset instance.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the 3D model obtained by the related technology is a whole, and each object in the 3D model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second 3D model of the scene is obtained by combining the 3D models of each instance in the scene, each instance of the second 3D model of the scene can be replaced separately through a replacement operation. Compared with the 3D model obtained by the related technology, the 3D model obtained by the embodiment of the present application is more flexible.
示例性地,以目标实例为房屋中的中式风格茶几为例,用户可以通过手指触摸屏幕选中房屋的三维模型中的中式风格茶几,并通过长按屏幕进入三维模型库,然后从三维模型库中选择现代风格茶几,将房屋的三维场景中的中式风格茶几替换为现代风格茶几。For example, taking the target instance as a Chinese-style tea table in a house, the user can select the Chinese-style tea table in the three-dimensional model of the house by touching the screen with his finger, enter the three-dimensional model library by long pressing the screen, and then select a modern-style tea table from the three-dimensional model library to replace the Chinese-style tea table in the three-dimensional scene of the house with a modern-style tea table.
在一种可能的实现方式中,可以确定上述目标实例的目标第二三维模型的三维位置,上述三维位置用于指示实例的目标第二三维模型在场景的第二三维模型中的位置。然后删除上述场景的第二三维模型中上述目标实例的目标第二三维模型。之后在上述目标实例的目标第二三维模型的三维位置设置上述预设实例的目标第二三维模型。In a possible implementation, the three-dimensional position of the target second three-dimensional model of the target instance may be determined, and the three-dimensional position is used to indicate the position of the target second three-dimensional model of the instance in the second three-dimensional model of the scene. Then, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted. Then, the target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
需要说明的是,相关技术得到的三维模型是一个整体,三维模型中的各物体不可单独编辑。而本申请实施例提供的模型处理方法中由于场景的第二三维模型是由场景中各实例的三维模型组合得到的,因此场景的第二三维模型各个实例是可以通过替换操作确定目标实例的目标第二三维模型的三维位置,然后删除场景的第二三维模型中目标实例的目标第二三维模型,之后在目标实例的目标第二三维模型的三维位置设置预设实例的目标第二三维模型,从而对三维模型中上述目标实例进行单独替换的,相较于相关技术得到的三维模型本申请实施例得到的三维模型更具有灵活性。It should be noted that the three-dimensional model obtained by the related technology is a whole, and each object in the three-dimensional model cannot be edited separately. In the model processing method provided in the embodiment of the present application, since the second three-dimensional model of the scene is obtained by combining the three-dimensional models of each instance in the scene, each instance of the second three-dimensional model of the scene can determine the three-dimensional position of the target second three-dimensional model of the target instance through a replacement operation, and then delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene, and then set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance, so as to replace the above target instance in the three-dimensional model separately. Compared with the three-dimensional model obtained by the related technology, the three-dimensional model obtained in the embodiment of the present application is more flexible.
可选地,该方法还可以包括:Optionally, the method may further include:
S703、获取场景的第二三维模型。S703: Obtain a second three-dimensional model of the scene.
示例性地,电子设备可以接收其他设备(如模型处理装置或其他设备)发送的场景的第二三维模型。Exemplarily, the electronic device may receive the second three-dimensional model of the scene sent by other devices (such as a model processing apparatus or other devices).
又例如,电子设备可以从用于服务器中下载场景的第二三维模型。其中,上述服务器用于存储模型处理装置生成的场景的第二三维模型。For another example, the electronic device may download the second three-dimensional model of the scene from a server, wherein the server is used to store the second three-dimensional model of the scene generated by the model processing device.
图8示出了本申请实施例提供的又一种模型处理方法,该方法适用于上述模型处理系统,如图8所示,该方法包括:FIG8 shows another model processing method provided in an embodiment of the present application. The method is applicable to the above-mentioned model processing system. As shown in FIG8 , the method includes:
S801、第一电子设备向模型处理装置发送场景中目标实例的第一三维模型和场景的图像。S801. A first electronic device sends a first three-dimensional model of a target instance in a scene and an image of the scene to a model processing device.
相应地,模型处理装置接收第一电子设备发送的场景中目标实例的第一三维模型和场景的图像。Correspondingly, the model processing device receives the first three-dimensional model of the target instance in the scene and the image of the scene sent by the first electronic device.
示例性地,第一电子设备可以通过传感器单元采集电子设备的位姿、场景的图像(如场景的关键帧RGB图像)、深度图等作为输入,输出场景的Mesh模型。然后通过计算单元根据场景的Mesh模型的顶点数据,输出场景中目标实例的第一三维模型。由此获取场景中目标实例的第一三维模型和场景的图像。然后通过网络传输单元向模型处理装置发送场景中目标实例的第一三维模型和场景的图像。Exemplarily, the first electronic device can collect the posture of the electronic device, the image of the scene (such as the key frame RGB image of the scene), the depth map, etc. as input through the sensor unit, and output the Mesh model of the scene. Then, the computing unit outputs the first three-dimensional model of the target instance in the scene according to the vertex data of the Mesh model of the scene. Thus, the first three-dimensional model of the target instance in the scene and the image of the scene are obtained. Then, the first three-dimensional model of the target instance in the scene and the image of the scene are sent to the model processing device through the network transmission unit.
S801的具体实现方式可以参照上述模型处理方法中S501的具体实现方式,在此就不再赘述。The specific implementation of S801 can refer to the specific implementation of S501 in the above model processing method, which will not be repeated here.
S802、模型处理装置根据场景中目标实例的第一三维模型和场景的图像从多个第二三维模型中确定场景中目标实例的目标第二三维模型。S802: The model processing device determines a target second three-dimensional model of the target instance in the scene from multiple second three-dimensional models according to the first three-dimensional model of the target instance in the scene and the image of the scene.
示例性地,模型处理装置可以根据上述场景的图像确定上述场景的风格类型。然后根据上述目标实例的第一三维模型和上述场景的风格类型从多个第二三维模型中确定上述目标实例的目标第二三维模型。Exemplarily, the model processing device may determine the style type of the scene according to the image of the scene, and then determine the target second 3D model of the target instance from multiple second 3D models according to the first 3D model of the target instance and the style type of the scene.
S802的具体实现方式可以参照上述模型处理方法中的S502的具体实现方式,在此就不再赘述。The specific implementation of S802 can refer to the specific implementation of S502 in the above model processing method, which will not be repeated here.
S803、模型处理装置根据场景的第一三维模型和目标实例的目标第二三维模型生成场景的第二三维模型。S803: The model processing device generates a second three-dimensional model of the scene according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
示例性地,模型处理装置可以根据上述场景的图像确定上述每一实例的目标位置。删除上述场景的第一三维模型中上述每一实例的第一三维模型。在上述每一实例的位置设置每一实例的目标第二三维模型。其中,目标位置用于指示实例的第一三维模型在场景的第一三维模型中的位置。Exemplarily, the model processing device may determine the target position of each of the above instances based on the image of the above scene. Delete the first three-dimensional model of each of the above instances in the first three-dimensional model of the above scene. Set the target second three-dimensional model of each instance at the position of each of the above instances. The target position is used to indicate the position of the first three-dimensional model of the instance in the first three-dimensional model of the scene.
S803的具体实现方式可以参照上述模型处理方法中的S502的具体实现方式,在此就不再赘述。The specific implementation of S803 can refer to the specific implementation of S502 in the above model processing method, which will not be repeated here.
S804、模型处理装置向第二电子设备发送场景的第二三维模型。S804: The model processing device sends a second three-dimensional model of the scene to the second electronic device.
相应地,第二电子设备从模型处理装置中下载场景的第二三维模型。Correspondingly, the second electronic device downloads the second three-dimensional model of the scene from the model processing device.
示例性地,第二电子设备可以通过网络传输单元向模型处理装置发送场景的第二三维模型下载请求并通过网络传输单元接收模型处理装置发送的场景的第二三维模型。 Exemplarily, the second electronic device may send a download request for the second three-dimensional model of the scene to the model processing device through the network transmission unit and receive the second three-dimensional model of the scene sent by the model processing device through the network transmission unit.
S804的具体实现方式可以参照上述模型处理方法中的S701的具体实现方式,在此就不再赘述。The specific implementation of S804 can refer to the specific implementation of S701 in the above model processing method, which will not be repeated here.
S805、第二电子设备接收并响应编辑操作对场景的第二三维模型中目标实例进行编辑。S805: The second electronic device receives and edits the target instance in the second three-dimensional model of the scene in response to the editing operation.
示例性地,第二电子设备可以接收移动操作,响应于上述移动操作,将上述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。其中,上述移动操作用于指示移动上述场景的第二三维模型中的目标实例。Exemplarily, the second electronic device may receive a move operation, and in response to the move operation, move the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the first position to the second position, wherein the move operation is used to indicate moving the target instance in the second three-dimensional model of the scene.
又示例性地,第二电子设备可以接收删除操作,响应于删除操作,将上述场景的第二三维模型中目标实例的目标第二三维模型从上述三维场景中删除。其中,上述删除操作用于指示删除上述场景的第二三维模型中的目标实例。In another exemplary embodiment, the second electronic device may receive a deletion operation, and in response to the deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the three-dimensional scene. The deletion operation is used to indicate the deletion of the target instance in the second three-dimensional model of the scene.
又示例性地、第二电子设备可以接收替换操作,响应于上述替换操作,将上述场景的第二三维模型中的目标实例的目标第二三维模型替换为上述预设实例的目标第二三维模型。Also illustratively, the second electronic device may receive a replacement operation, and in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
S805的具体实现方式可以参照上述模型处理方法中的S704的具体实现方式,在此就不再赘述。The specific implementation of S805 can refer to the specific implementation of S704 in the above model processing method, which will not be repeated here.
下面将结合图9介绍用于执行上述模型处理方法的模型处理装置。The model processing device for executing the above-mentioned model processing method will be introduced below in conjunction with FIG. 9 .
可以理解的是,模型处理装置为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。It is understandable that, in order to realize the above functions, the model processing device includes hardware and/or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
本申请实施例可以根据上述方法示例对模型处理装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the model processing device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图9示出了上述实施例中涉及的模型处理装置的一种可能的组成示意图,如图9所示,该模型处理装置900可以包括:收发单元901和处理单元902。In the case of dividing each functional module according to each function, FIG9 shows a possible composition diagram of the model processing device involved in the above embodiment. As shown in FIG9 , the model processing device 900 may include: a transceiver unit 901 and a processing unit 902 .
收发单元901,用于获取场景中目标实例的第一三维模型和上述场景的图像。The transceiver unit 901 is used to obtain a first three-dimensional model of a target instance in a scene and an image of the scene.
处理单元902,用于根据上述目标实例的第一三维模型和上述场景的图像从多个第二三维模型中确定上述目标实例的目标第二三维模型,上述目标第二三维模型是与上述目标实例的几何形状匹配且与上述目标实例所在场景的风格类型相同的三维模型。Processing unit 902 is used to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene, wherein the target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the target instance is located.
其中,上述目标实例为上述场景中的任一物体或背景。The target instance is any object or background in the scene.
在一种可能的实现方式中,上述处理单元902具体用于:根据上述场景的图像确定上述场景的风格类型;根据上述目标实例的第一三维模型和上述场景的风格类型从多个第二三维模型中确定上述目标实例的目标第二三维模型。In a possible implementation, the processing unit 902 is specifically used to: determine the style type of the scene based on the image of the scene; determine the target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the style type of the scene.
在一种可能的实现方式中,上述处理单元902具体用于:将上述场景的图像输入第一网络以确定上述场景的风格类型。In a possible implementation, the processing unit 902 is specifically configured to: input the image of the scene into a first network to determine the style type of the scene.
在一种可能的实现方式中,上述处理单元902具体用于:将上述目标实例的第一三维模型和上述场景的风格类型输入第二网络以从多个第二三维模型中确定上述目标实例的目标第二三维模型。In a possible implementation, the processing unit 902 is specifically configured to: input the first three-dimensional model of the target instance and the style type of the scene into a second network to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models.
在一种可能的实现方式中,上述收发单元901具体用于:对上述场景的第一三维模型进行分割操作以得到上述目标实例的第一三维模型,上述分割操作包括语义分割和/或实例分割。In a possible implementation, the transceiver unit 901 is specifically used to: perform a segmentation operation on the first three-dimensional model of the scene to obtain the first three-dimensional model of the target instance, where the segmentation operation includes semantic segmentation and/or instance segmentation.
在一种可能的实现方式中,上述处理单元902还用于:根据多个无材质信息的三维模型和多个实例的图像确定上述多个第二三维模型,上述多个实例至少包括两个风格类型不同的实例。In a possible implementation, the processing unit 902 is further configured to determine the plurality of second three-dimensional models according to the plurality of three-dimensional models without material information and the images of the plurality of instances, wherein the plurality of instances include at least two instances of different style types.
在一种可能的实现方式中,上述处理单元902还用于:根据上述场景的第一三维模型和上述目标实例的目标第二三维模型生成上述场景的第二三维模型。In a possible implementation, the processing unit 902 is further configured to generate a second three-dimensional model of the scene according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
在一种可能的实现方式中,上述处理单元902具体用于:根据上述场景的图像确定上述目标实例的目标位置,上述目标位置用于指示上述目标实例的第一三维模型在上述场景的第一三维模型中的位置。删除上述场景的第一三维模型中上述目标实例的第一三维模型。在上述目标实例的目标位置设置上述目标实例的目标第二三维模型以生成上述场景的第二三维模型。In a possible implementation, the processing unit 902 is specifically used to: determine a target position of the target instance according to the image of the scene, the target position being used to indicate a position of a first three-dimensional model of the target instance in the first three-dimensional model of the scene. Delete the first three-dimensional model of the target instance in the first three-dimensional model of the scene. Set a target second three-dimensional model of the target instance at the target position of the target instance to generate a second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元902还用于:响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。In a possible implementation, the processing unit 902 is further configured to: edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
可选地,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的 目标实例。Optionally, the editing operation includes a moving operation, wherein the moving operation is used to indicate moving a portion of the second three-dimensional model of the scene. Target instance.
在一种可能的实现方式中,所述处理单元902具体用于:响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation, the processing unit 902 is specifically configured to: in response to the movement operation, move a target second three-dimensional model of a target instance in the second three-dimensional model of the scene from a first position to a second position.
可选地,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元902具体用于:响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, the processing unit 902 is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
可选地,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a replacement operation, and the replacement operation is used to indicate replacing a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,所述处理单元902具体用于:响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation, the processing unit 902 is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
在一种可能的实现方式中,所述处理单元902具体用于:确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置。删除所述场景的第二三维模型中目标实例的目标第二三维模型。在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。In a possible implementation, the processing unit 902 is specifically configured to: determine a three-dimensional position of a target second three-dimensional model of the target instance, the three-dimensional position being used to indicate a position of the target second three-dimensional model of the target instance in a second three-dimensional model of a scene. Delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. Set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance.
在采用对应各个功能划分各个功能模块的情况下,图10示出了上述实施例中涉及的模型处理装置的另一种可能的组成示意图,如图10所示,该模型处理装置1000可以包括:收发单元1001和处理单元1002。In the case of dividing each functional module according to each function, Figure 10 shows another possible composition diagram of the model processing device involved in the above embodiment. As shown in Figure 10, the model processing device 1000 may include: a transceiver unit 1001 and a processing unit 1002.
收发单元1001,用于接收编辑操作。The transceiver unit 1001 is used to receive an editing operation.
处理单元1002,用于响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。The processing unit 1002 is configured to edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
其中,所述编辑操作用于指示编辑场景的第二三维模型中的目标实例,所述场景的第二三维模型包括所述场景中目标实例的目标第二三维模型,所述目标实例的目标第二三维模型由所述场景的目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定得到,所述目标第二三维模型是与所述目标实例几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型,所述目标实例为所述场景中的任一物体或背景。In which, the editing operation is used to indicate the target instance in the second three-dimensional model of the editing scene, the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene, the target second three-dimensional model of the target instance is determined from multiple second three-dimensional models by the first three-dimensional model of the target instance of the scene and the image of the scene, the target second three-dimensional model is a three-dimensional model that matches the geometry of the target instance and has the same style type as the scene where the target instance is located, and the target instance is any object or background in the scene.
可选地,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a moving operation, and the moving operation is used to instruct to move a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元1002具体用于:响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In a possible implementation, the processing unit 1002 is specifically configured to: in response to the moving operation, move a target second three-dimensional model of a target instance in a second three-dimensional model of the scene from a first position to a second position.
可选地,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a deleting operation, and the deleting operation is used to indicate deleting a target instance in the second three-dimensional model of the scene.
在一种可能的实现方式中,所述处理单元1002具体用于:响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In a possible implementation manner, the processing unit 1002 is specifically configured to: in response to a deletion operation, delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene from the second three-dimensional model of the scene.
可选地,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例。Optionally, the editing operation includes a replacement operation, and the replacement operation is used to instruct to replace a target instance in the second three-dimensional model of the scene with a preset instance.
在一种可能的实现方式中,所述处理单元1002具体用于:响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In a possible implementation, the processing unit 1002 is specifically configured to: in response to the replacement operation, replace the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance.
在一种可能的实现方式中,所述处理单元1002具体用于:确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置。删除所述场景的第二三维模型中目标实例的目标第二三维模型。在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。In a possible implementation, the processing unit 1002 is specifically used to: determine a three-dimensional position of a target second three-dimensional model of the target instance, the three-dimensional position being used to indicate a position of the target second three-dimensional model of the target instance in a second three-dimensional model of a scene. Delete the target second three-dimensional model of the target instance in the second three-dimensional model of the scene. Set the target second three-dimensional model of the preset instance at the three-dimensional position of the target second three-dimensional model of the target instance.
本申请实施例还提供了一种芯片。图11示出了一种芯片1100的结构示意图。芯片1100包括一个或多个处理器1101以及接口电路1102。可选的,上述芯片1100还可以包含总线1103。The embodiment of the present application further provides a chip. FIG11 shows a schematic diagram of the structure of a chip 1100. The chip 1100 includes one or more processors 1101 and an interface circuit 1102. Optionally, the chip 1100 may also include a bus 1103.
处理器1101可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述报文处理方法的各步骤可以通过处理器1101中的硬件的集成逻辑电路或者软件形式的指令完成。The processor 1101 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above message processing method may be completed by an integrated logic circuit of hardware in the processor 1101 or by instructions in the form of software.
可选地,上述的处理器1101可以是通用处理器、数字信号处理(digital signal processing,DSP)器、集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate  array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Optionally, the processor 1101 may be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a processor. The general purpose processor may be a microprocessor or any conventional processor.
接口电路1102可以用于数据、指令或者信息的发送或者接收,处理器1101可以利用接口电路1102接收的数据、指令或者其他信息,进行加工,可以将加工完成信息通过接口电路1102发送出去。The interface circuit 1102 can be used to send or receive data, instructions or information. The processor 1101 can use the data, instructions or other information received by the interface circuit 1102 to process, and can send the processing completion information through the interface circuit 1102.
可选的,芯片还包括存储器,存储器可以包括只读存储器和随机存取存储器,并向处理器提供操作指令和数据。存储器的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。Optionally, the chip also includes a memory, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory (NVRAM).
可选的,存储器存储了可执行软件模块或者数据结构,处理器可以通过调用存储器存储的操作指令(该操作指令可存储在操作系统中),执行相应的操作。Optionally, the memory stores executable software modules or data structures, and the processor can perform corresponding operations by calling operation instructions stored in the memory (the operation instructions can be stored in the operating system).
可选的,芯片可以使用在本申请实施例涉及的模型处理装置中。可选的,接口电路1102可用于输出处理器1101的执行结果。关于本申请实施例的一个或多个实施例提供的报文处理方法可参考前述各个实施例,这里不再赘述。Optionally, the chip can be used in the model processing device involved in the embodiment of the present application. Optionally, the interface circuit 1102 can be used to output the execution result of the processor 1101. The message processing method provided in one or more embodiments of the embodiment of the present application can refer to the aforementioned embodiments, which will not be repeated here.
需要说明的,处理器1101、接口电路1102各自对应的功能既可以通过硬件设计实现,也可以通过软件设计来实现,还可以通过软硬件结合的方式来实现,这里不作限制。It should be noted that the corresponding functions of the processor 1101 and the interface circuit 1102 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.
图12为本申请实施例提供的一种电子设备的结构示意图,电子设备100可以为手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、模型处理装置或者模型处理装置中的芯片或者功能模块。12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a model processing device, or a chip or functional module in a model processing device.
示例性地,图12是本申请实施例提供的一例电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG12 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
其中,I2C接口是一种双向同步串行总线,处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中, 处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。Among them, the I2C interface is a bidirectional synchronous serial bus. The processor 110 can be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100. The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, The processor 110 and the camera 193 communicate via a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via a DSI interface to implement the display function of the electronic device 100.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,触摸传感器、视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through ISP, camera 193, touch sensor, video codec, GPU, display screen 194 and application processor.
其中,ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。Among them, ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。实例通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号,应理解,在本申请实施例的描述中,以RGB格式的图像为例进行介绍,本申请实施例对图像格式不作限定。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. In an example, an optical image is generated through a lens and projected onto a photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. It should be understood that in the description of the embodiments of the present application, an image in RGB format is used as an example for introduction, and the embodiments of the present application do not limit the image format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。 The button 190 includes a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device 100 can receive button input and generate key signal input related to the user settings and function control of the electronic device 100. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.
需要指出的是,电子设备100可以是芯片系统或有图12中类似结构的设备。其中,芯片系统可以由芯片构成,也可以包括芯片和其他分立器件。本申请的各实施例之间涉及的动作、术语等均可以相互参考,不予限制。本申请的实施例中各个设备之间交互的消息名称或消息中的参数名称等只是一个示例,具体实现中也可以采用其他的名称,不予限制。此外,图12中示出的组成结构并不构成对该电子设备100的限定,除图12所示部件之外,该电子设备100可以包括比图12所示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It should be pointed out that the electronic device 100 can be a chip system or a device with a similar structure as shown in Figure 12. Among them, the chip system can be composed of chips, or it can include chips and other discrete devices. The actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation. In addition, the component structure shown in Figure 12 does not constitute a limitation on the electronic device 100. In addition to the components shown in Figure 12, the electronic device 100 may include more or fewer components than those shown in Figure 12, or combine certain components, or arrange the components differently.
本申请中描述的处理器和收发器可实现在集成电路(integrated circuit,IC)、模拟IC、射频集成电路、混合信号IC、专用集成电路(application specific integrated circuit,ASIC)、印刷电路板(printed circuit board,PCB)、电子设备等上。该处理器和收发器也可以用各种IC工艺技术来制造,例如互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)、N型金属氧化物半导体(nMetal-oxide-semiconductor,NMOS)、P型金属氧化物半导体(positive channel metal oxide semiconductor,PMOS)、双极结型晶体管(Bipolar Junction Transistor,BJT)、双极CMOS(BiCMOS)、硅锗(SiGe)、砷化镓(GaAs)等。The processor and transceiver described in the present application can be implemented in an integrated circuit (IC), an analog IC, a radio frequency integrated circuit, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
本申请实施例还提供一种模型处理装置,该装置包括:至少一个处理器,当上述至少一个处理器执行程序代码或指令时,实现上述相关方法步骤实现上述实施例中的报文处理方法。An embodiment of the present application also provides a model processing device, which includes: at least one processor, when the at least one processor executes program code or instructions, it implements the above-mentioned related method steps to implement the message processing method in the above-mentioned embodiment.
可选地,该装置还可以包括至少一个存储器,该至少一个存储器用于存储该程序代码或指令。Optionally, the device may further include at least one memory, and the at least one memory is used to store the program code or instruction.
本申请实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在模型处理装置上运行时,使得模型处理装置执行上述相关方法步骤实现上述实施例中的报文处理方法。An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on a model processing device, the model processing device executes the above-mentioned related method steps to implement the message processing method in the above-mentioned embodiment.
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的报文处理方法。The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the message processing method in the above-mentioned embodiment.
本申请实施例还提供一种模型处理装置,这个装置具体可以是芯片、集成电路、组件或模块。具体的,该装置可包括相连的处理器和用于存储指令的存储器,或者该装置包括至少一个处理器,用于从外部存储器获取指令。当装置运行时,处理器可执行指令,以使芯片执行上述各方法实施例中的报文处理方法。The embodiment of the present application also provides a model processing device, which can be a chip, an integrated circuit, a component or a module. Specifically, the device may include a connected processor and a memory for storing instructions, or the device includes at least one processor for obtaining instructions from an external memory. When the device is running, the processor can execute instructions so that the chip executes the message processing method in the above-mentioned method embodiments.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件,或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其他的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其他的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
上述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read  Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above methods in each embodiment of the present application. The aforementioned storage media include: USB flash drives, mobile hard drives, read-only memories (Read Only Memory), etc. Only Memory, ROM), Random Access Memory (Random Access Memory, RAM), disks or optical disks, etc. that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。 The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (39)

  1. 一种模型处理方法,其特征在于,包括:A model processing method, characterized by comprising:
    获取场景中目标实例的第一三维模型和所述场景的图像,所述目标实例为所述场景中的任一物体或背景;Acquire a first three-dimensional model of a target instance in a scene and an image of the scene, wherein the target instance is any object or background in the scene;
    根据所述目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定所述目标实例的目标第二三维模型,所述目标第二三维模型是与所述目标实例的几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型。A target second three-dimensional model of the target instance is determined from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene. The target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the target instance is located.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定所述目标实例的目标第二三维模型,包括:The method according to claim 1, characterized in that the step of determining a target second three-dimensional model of the target instance from a plurality of second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene comprises:
    根据所述场景的图像确定所述场景的风格类型;determining a style type of the scene based on the image of the scene;
    根据所述目标实例的第一三维模型和所述场景的风格类型从多个第二三维模型中确定所述目标实例的目标第二三维模型。A target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述场景的图像确定所述场景的风格类型,包括:The method according to claim 2, characterized in that determining the style type of the scene according to the image of the scene comprises:
    将所述场景的图像输入第一网络以确定所述场景的风格类型。An image of the scene is input into a first network to determine the style type of the scene.
  4. 根据权利要求2或3所述的方法,其特征在于,所述根据所述目标实例的第一三维模型和所述场景的风格类型从多个第二三维模型中确定所述目标实例的目标第二三维模型,包括:The method according to claim 2 or 3, characterized in that the step of determining a target second three-dimensional model of the target instance from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene comprises:
    将所述目标实例的第一三维模型和所述场景的风格类型输入第二网络以从多个第二三维模型中确定所述目标实例的目标第二三维模型。The first three-dimensional model of the target instance and the style type of the scene are input into a second network to determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述获取场景中目标实例的第一三维模型,包括:The method according to any one of claims 1 to 4, characterized in that the step of obtaining a first three-dimensional model of a target instance in a scene comprises:
    对所述场景的第一三维模型进行分割操作以得到所述目标实例的第一三维模型,所述分割操作包括语义分割和/或实例分割。A segmentation operation is performed on the first three-dimensional model of the scene to obtain a first three-dimensional model of the target instance, wherein the segmentation operation includes semantic segmentation and/or instance segmentation.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, characterized in that the method further comprises:
    根据多个无材质信息的三维模型和多个实例的图像确定所述多个第二三维模型,所述多个实例至少包括两个风格类型不同的实例。The plurality of second three-dimensional models are determined according to a plurality of three-dimensional models without material information and images of a plurality of instances, wherein the plurality of instances include at least two instances of different style types.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 6, characterized in that the method further comprises:
    根据所述场景的第一三维模型和所述目标实例的目标第二三维模型生成所述场景的第二三维模型。A second three-dimensional model of the scene is generated according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
  8. 根据权利要求7所述的方法,所述根据获取场景的第一三维模型和所述目标实例的目标第二三维模型确定所述场景的第二三维模型,包括:According to the method of claim 7, determining the second three-dimensional model of the scene based on acquiring the first three-dimensional model of the scene and the target second three-dimensional model of the target instance comprises:
    根据所述场景的图像确定所述目标实例的目标位置,所述目标位置用于指示所述目标实例的第一三维模型在所述场景的第一三维模型中的位置;Determine a target position of the target instance according to the image of the scene, wherein the target position is used to indicate a position of the first three-dimensional model of the target instance in the first three-dimensional model of the scene;
    删除所述场景的第一三维模型中所述目标实例的第一三维模型;Deleting the first three-dimensional model of the target instance in the first three-dimensional model of the scene;
    在所述目标实例的目标位置设置所述目标实例的目标第二三维模型以生成所述场景的第二三维模型。A target second three-dimensional model of the target instance is set at a target position of the target instance to generate a second three-dimensional model of the scene.
  9. 根据权利要求7或8所述的方法,其特征在于,所述方法还包括:The method according to claim 7 or 8, characterized in that the method further comprises:
    接收编辑操作,所述编辑操作用于指示编辑所述场景的第二三维模型中的目标实例;receiving an editing operation, wherein the editing operation is used to instruct editing of a target instance in a second three-dimensional model of the scene;
    响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。In response to the editing operation, the target instance in the second three-dimensional model of the scene is edited.
  10. 根据权利要求9所述的方法,其特征在于,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例,所述响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑,包括:The method according to claim 9, wherein the editing operation comprises a moving operation, the moving operation is used to indicate moving a target instance in the second three-dimensional model of the scene, and the editing of the target instance in the second three-dimensional model of the scene in response to the editing operation comprises:
    响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In response to the moving operation, a target second three-dimensional model of a target instance in a second three-dimensional model of the scene is moved from a first position to a second position.
  11. 根据权利要求9或10所述的方法,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例,所述响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑,包括:According to the method of claim 9 or 10, the editing operation includes a deletion operation, the deletion operation is used to indicate deletion of the target instance in the second three-dimensional model of the scene, and the editing of the target instance in the second three-dimensional model of the scene in response to the editing operation comprises:
    响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第 二三维模型中删除。In response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is removed from the first Delete the 2D and 3D models.
  12. 根据权利要求9至11中任一项所述的方法,其特征在于,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例,所述响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑,包括:The method according to any one of claims 9 to 11, characterized in that the editing operation includes a replacement operation, the replacement operation is used to indicate replacing a target instance in the second three-dimensional model of the scene with a preset instance, and the editing of the target instance in the second three-dimensional model of the scene in response to the editing operation comprises:
    响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is replaced with the target second three-dimensional model of the preset instance.
  13. 根据权利要求12所述的方法,其特征在于,所述将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型,包括:The method according to claim 12, characterized in that replacing the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance comprises:
    确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置;Determine a three-dimensional position of a target second three-dimensional model of the target instance, where the three-dimensional position is used to indicate a position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene;
    删除所述场景的第二三维模型中目标实例的目标第二三维模型;Deleting a target second three-dimensional model of a target instance in a second three-dimensional model of the scene;
    在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。The target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
  14. 一种模型处理方法,其特征在于,包括:A model processing method, characterized by comprising:
    接收编辑操作,所述编辑操作用于指示编辑场景的第二三维模型中的目标实例,所述场景的第二三维模型包括所述场景中目标实例的目标第二三维模型,所述目标实例的目标第二三维模型由所述场景的目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定得到,所述目标第二三维模型是与所述目标实例几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型,所述目标实例为所述场景中的任一物体或背景;receiving an editing operation, the editing operation being used to instruct editing of a target instance in a second three-dimensional model of a scene, the second three-dimensional model of the scene comprising a target second three-dimensional model of the target instance in the scene, the target second three-dimensional model of the target instance being determined from a plurality of second three-dimensional models by using a first three-dimensional model of the target instance of the scene and an image of the scene, the target second three-dimensional model being a three-dimensional model that matches a geometric shape of the target instance and has the same style type as the scene where the target instance is located, and the target instance is any object or background in the scene;
    响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。In response to the editing operation, the target instance in the second three-dimensional model of the scene is edited.
  15. 根据权利要求14所述的方法,其特征在于,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例,所述响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑,包括:The method according to claim 14, wherein the editing operation comprises a moving operation, the moving operation is used to indicate moving a target instance in the second three-dimensional model of the scene, and the editing of the target instance in the second three-dimensional model of the scene in response to the editing operation comprises:
    响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In response to the moving operation, a target second three-dimensional model of a target instance in a second three-dimensional model of the scene is moved from a first position to a second position.
  16. 根据权利要求14或15所述的方法,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例,所述响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑,包括:According to the method of claim 14 or 15, the editing operation includes a deletion operation, the deletion operation is used to indicate deletion of the target instance in the second three-dimensional model of the scene, and in response to the editing operation, editing the target instance in the second three-dimensional model of the scene comprises:
    响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted from the second three-dimensional model of the scene.
  17. 根据权利要求14至16中任一项所述的方法,其特征在于,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例,所述响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑,包括:The method according to any one of claims 14 to 16, characterized in that the editing operation includes a replacement operation, the replacement operation is used to indicate replacing a target instance in the second three-dimensional model of the scene with a preset instance, and the editing of the target instance in the second three-dimensional model of the scene in response to the editing operation comprises:
    响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is replaced with the target second three-dimensional model of the preset instance.
  18. 根据权利要求17所述的方法,其特征在于,所述将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型,包括:The method according to claim 17, characterized in that replacing the target second three-dimensional model of the target instance in the second three-dimensional model of the scene with the target second three-dimensional model of the preset instance comprises:
    确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置;Determine a three-dimensional position of a target second three-dimensional model of the target instance, where the three-dimensional position is used to indicate a position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene;
    删除所述场景的第二三维模型中目标实例的目标第二三维模型;Deleting a target second three-dimensional model of a target instance in a second three-dimensional model of the scene;
    在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。The target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
  19. 一种模型处理装置,其特征在于,包括:收发单元和处理单元;A model processing device, characterized in that it comprises: a transceiver unit and a processing unit;
    所述收发单元,用于获取场景中目标实例的第一三维模型和所述场景的图像,所述目标实例为所述场景中的任一物体或背景;The transceiver unit is used to obtain a first three-dimensional model of a target instance in a scene and an image of the scene, wherein the target instance is any object or background in the scene;
    所述处理单元,用于根据所述目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定所述目标实例的目标第二三维模型,所述目标第二三维模型是与所述目标实例的几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型。The processing unit is used to determine a target second three-dimensional model of the target instance from multiple second three-dimensional models based on the first three-dimensional model of the target instance and the image of the scene, wherein the target second three-dimensional model is a three-dimensional model that matches the geometric shape of the target instance and has the same style type as the scene where the target instance is located.
  20. 根据权利要求19所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 19, characterized in that the processing unit is specifically used to:
    根据所述场景的图像确定所述场景的风格类型; determining a style type of the scene based on the image of the scene;
    根据所述目标实例的第一三维模型和所述场景的风格类型从多个第二三维模型中确定所述目标实例的目标第二三维模型。A target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models according to the first three-dimensional model of the target instance and the style type of the scene.
  21. 根据权利要求20所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 20, characterized in that the processing unit is specifically used to:
    将所述场景的图像输入第一网络以确定所述场景的风格类型。An image of the scene is input into a first network to determine the style type of the scene.
  22. 根据权利要求19或20所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 19 or 20, characterized in that the processing unit is specifically used for:
    将所述目标实例的第一三维模型和所述场景的风格类型输入第二网络以从多个第二三维模型中确定所述目标实例的目标第二三维模型。The first three-dimensional model of the target instance and the style type of the scene are input into a second network to determine a target second three-dimensional model of the target instance from a plurality of second three-dimensional models.
  23. 根据权利要求19至22中任一项所述的装置,其特征在于,所述收发单元具体用于:The device according to any one of claims 19 to 22, characterized in that the transceiver unit is specifically used for:
    对所述场景的第一三维模型进行分割操作以得到所述目标实例的第一三维模型,所述分割操作包括语义分割和/或实例分割。A segmentation operation is performed on the first three-dimensional model of the scene to obtain a first three-dimensional model of the target instance, wherein the segmentation operation includes semantic segmentation and/or instance segmentation.
  24. 根据权利要求19至23中任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 19 to 23, characterized in that the processing unit is further used for:
    根据多个无材质信息的三维模型和多个实例的图像确定所述多个第二三维模型,所述多个实例至少包括两个风格类型不同的实例。The plurality of second three-dimensional models are determined according to a plurality of three-dimensional models without material information and images of a plurality of instances, wherein the plurality of instances include at least two instances of different style types.
  25. 根据权利要求19至24中任一项所述的装置,其特征在于,所述处理单元还用于:The device according to any one of claims 19 to 24, characterized in that the processing unit is further used for:
    根据所述场景的第一三维模型和所述目标实例的目标第二三维模型生成所述场景的第二三维模型。A second three-dimensional model of the scene is generated according to the first three-dimensional model of the scene and the target second three-dimensional model of the target instance.
  26. 根据权利要求25所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 25, characterized in that the processing unit is specifically used to:
    根据所述场景的图像确定所述目标实例的目标位置,所述目标位置用于指示所述目标实例的第一三维模型在所述场景的第一三维模型中的位置;Determine a target position of the target instance according to the image of the scene, wherein the target position is used to indicate a position of the first three-dimensional model of the target instance in the first three-dimensional model of the scene;
    删除所述场景的第一三维模型中所述目标实例的第一三维模型;Deleting the first three-dimensional model of the target instance in the first three-dimensional model of the scene;
    在所述目标实例的目标位置设置所述目标实例的目标第二三维模型以生成所述场景的第二三维模型。A target second three-dimensional model of the target instance is set at a target position of the target instance to generate a second three-dimensional model of the scene.
  27. 根据权利要求25或26所述的装置,其特征在于,所述收发单元还用于:The device according to claim 25 or 26, characterized in that the transceiver unit is also used for:
    接收编辑操作,所述编辑操作用于指示编辑所述场景的第二三维模型中的目标实例;receiving an editing operation, wherein the editing operation is used to instruct editing of a target instance in a second three-dimensional model of the scene;
    所述处理单元,还用于响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。The processing unit is further configured to edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
  28. 根据权利要求27所述的装置,其特征在于,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例,所述处理单元具体用于:The apparatus according to claim 27, wherein the editing operation comprises a moving operation, the moving operation is used to indicate moving a target instance in the second three-dimensional model of the scene, and the processing unit is specifically used to:
    响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In response to the moving operation, a target second three-dimensional model of a target instance in a second three-dimensional model of the scene is moved from a first position to a second position.
  29. 根据权利要求27或28所述的装置,其特征在于,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例,所述处理单元具体用于:The device according to claim 27 or 28, characterized in that the editing operation includes a deletion operation, the deletion operation is used to indicate deletion of the target instance in the second three-dimensional model of the scene, and the processing unit is specifically used to:
    响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted from the second three-dimensional model of the scene.
  30. 根据权利要求27至29中任一项所述的装置,其特征在于,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例,所述处理单元具体用于:The apparatus according to any one of claims 27 to 29, characterized in that the editing operation includes a replacement operation, the replacement operation is used to indicate replacing a target instance in the second three-dimensional model of the scene with a preset instance, and the processing unit is specifically used to:
    响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is replaced with the target second three-dimensional model of the preset instance.
  31. 根据权利要求30所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 30, characterized in that the processing unit is specifically used to:
    确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置;Determine a three-dimensional position of a target second three-dimensional model of the target instance, where the three-dimensional position is used to indicate a position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene;
    删除所述场景的第二三维模型中目标实例的目标第二三维模型;Deleting a target second three-dimensional model of a target instance in a second three-dimensional model of the scene;
    在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。The target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
  32. 一种模型处理装置,其特征在于,包括:收发单元和处理单元;A model processing device, characterized in that it comprises: a transceiver unit and a processing unit;
    所述收发单元,用于接收编辑操作,所述编辑操作用于指示编辑场景的第二三维模型中的目标实例,所述场景的第二三维模型包括所述场景中目标实例的目标第二三维模型,所述目标实例的目标第二三维模型由所述场景的目标实例的第一三维模型和所述场景的图像从多个第二三维模型中确定得到,所述目标第二三维模型是与所述目标实例几何形状匹配且与所述目标实例所在场景的风格类型相同的三维模型,所述目标实例为所述场景中的任一物体或背景;The transceiver unit is used to receive an editing operation, wherein the editing operation is used to instruct to edit a target instance in a second three-dimensional model of a scene, wherein the second three-dimensional model of the scene includes a target second three-dimensional model of the target instance in the scene, wherein the target second three-dimensional model of the target instance is determined from a plurality of second three-dimensional models by using a first three-dimensional model of the target instance of the scene and an image of the scene, wherein the target second three-dimensional model is a three-dimensional model that matches a geometric shape of the target instance and has the same style type as the scene where the target instance is located, and the target instance is any object or background in the scene;
    所述处理单元,用于响应于所述编辑操作,对所述场景的第二三维模型中目标实例进行编辑。 The processing unit is used to edit the target instance in the second three-dimensional model of the scene in response to the editing operation.
  33. 根据权利要求32所述的装置,其特征在于,所述编辑操作包括移动操作,所述移动操作用于指示移动所述场景的第二三维模型中的目标实例,所述处理单元具体用于:The apparatus according to claim 32, wherein the editing operation comprises a moving operation, the moving operation being used to indicate moving a target instance in the second three-dimensional model of the scene, and the processing unit being specifically used to:
    响应于所述移动操作,将所述场景的第二三维模型中目标实例的目标第二三维模型从第一位置移动至第二位置。In response to the moving operation, a target second three-dimensional model of a target instance in a second three-dimensional model of the scene is moved from a first position to a second position.
  34. 根据权利要求32或33所述的装置,其特征在于,所述编辑操作包括删除操作,所述删除操作用于指示删除所述场景的第二三维模型中的目标实例,所述处理单元具体用于:The device according to claim 32 or 33, characterized in that the editing operation includes a deletion operation, the deletion operation is used to indicate deletion of the target instance in the second three-dimensional model of the scene, and the processing unit is specifically used to:
    响应于删除操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型从所述场景的第二三维模型中删除。In response to the deletion operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is deleted from the second three-dimensional model of the scene.
  35. 根据权利要求32至34中任一项所述的装置,其特征在于,所述编辑操作包括替换操作,所述替换操作用于指示用预设实例替换所述场景的第二三维模型中的目标实例,所述处理单元具体用于:The apparatus according to any one of claims 32 to 34, characterized in that the editing operation includes a replacement operation, the replacement operation is used to indicate replacing a target instance in the second three-dimensional model of the scene with a preset instance, and the processing unit is specifically used to:
    响应于所述替换操作,将所述场景的第二三维模型中的目标实例的目标第二三维模型替换为所述预设实例的目标第二三维模型。In response to the replacement operation, the target second three-dimensional model of the target instance in the second three-dimensional model of the scene is replaced with the target second three-dimensional model of the preset instance.
  36. 根据权利要求35所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 35, characterized in that the processing unit is specifically used to:
    确定所述目标实例的目标第二三维模型的三维位置,所述三维位置用于指示所述目标实例的目标第二三维模型在场景的第二三维模型中的位置;Determine a three-dimensional position of a target second three-dimensional model of the target instance, where the three-dimensional position is used to indicate a position of the target second three-dimensional model of the target instance in the second three-dimensional model of the scene;
    删除所述场景的第二三维模型中目标实例的目标第二三维模型;Deleting a target second three-dimensional model of a target instance in a second three-dimensional model of the scene;
    在所述目标实例的目标第二三维模型的三维位置设置所述预设实例的目标第二三维模型。The target second three-dimensional model of the preset instance is set at the three-dimensional position of the target second three-dimensional model of the target instance.
  37. 一种模型处理装置,包括至少一个处理器和存储器,其特征在于,所述至少一个处理器执行存储在存储器中的程序或指令,以使得所述模型处理装置实现上述权利要求1至18中任一项所述的方法。A model processing device comprises at least one processor and a memory, wherein the at least one processor executes a program or instruction stored in the memory so that the model processing device implements the method described in any one of claims 1 to 18.
  38. 一种计算机可读存储介质,用于存储计算机程序,其特征在于,当所述计算机程序在计算机或处理器运行时,使得所述计算机或所述处理器实现上述权利要求1至18中任一项所述的方法。A computer-readable storage medium for storing a computer program, characterized in that when the computer program is executed on a computer or a processor, the computer or the processor implements the method described in any one of claims 1 to 18.
  39. 一种计算机程序产品,所述计算机程序产品中包含指令,其特征在于,当所述指令在计算机或处理器上运行时,使得所述计算机或所述处理器实现上述权利要求1至18中任一项所述的方法。 A computer program product, comprising instructions, wherein when the instructions are executed on a computer or a processor, the computer or the processor implements the method according to any one of claims 1 to 18.
PCT/CN2023/108396 2022-09-29 2023-07-20 Model processing method, and apparatus WO2024066689A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211197410.0A CN117830577A (en) 2022-09-29 2022-09-29 Model processing method and device
CN202211197410.0 2022-09-29

Publications (1)

Publication Number Publication Date
WO2024066689A1 true WO2024066689A1 (en) 2024-04-04

Family

ID=90475908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/108396 WO2024066689A1 (en) 2022-09-29 2023-07-20 Model processing method, and apparatus

Country Status (2)

Country Link
CN (1) CN117830577A (en)
WO (1) WO2024066689A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200250879A1 (en) * 2019-02-05 2020-08-06 X Development Llc Scene recognition using volumetric substitution of real world objects
CN113436338A (en) * 2021-07-14 2021-09-24 中德(珠海)人工智能研究院有限公司 Three-dimensional reconstruction method and device for fire scene, server and readable storage medium
CN114708385A (en) * 2022-03-29 2022-07-05 网易(杭州)网络有限公司 Virtual building assembly method and device, electronic equipment and storage medium
CN114723883A (en) * 2022-03-31 2022-07-08 广州极飞科技股份有限公司 Three-dimensional scene reconstruction method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200250879A1 (en) * 2019-02-05 2020-08-06 X Development Llc Scene recognition using volumetric substitution of real world objects
CN113436338A (en) * 2021-07-14 2021-09-24 中德(珠海)人工智能研究院有限公司 Three-dimensional reconstruction method and device for fire scene, server and readable storage medium
CN114708385A (en) * 2022-03-29 2022-07-05 网易(杭州)网络有限公司 Virtual building assembly method and device, electronic equipment and storage medium
CN114723883A (en) * 2022-03-31 2022-07-08 广州极飞科技股份有限公司 Three-dimensional scene reconstruction method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN117830577A (en) 2024-04-05

Similar Documents

Publication Publication Date Title
WO2021031819A1 (en) Image processing method and electronic device
JP7482242B2 (en) Facial expression transfer model training method, facial expression transfer method and device, computer device and program
WO2021238943A1 (en) Gif picture generation method and apparatus, and electronic device
JP2020529084A (en) Image processing method, equipment and storage medium
US11895567B2 (en) Lending of local processing capability between connected terminals
US11703941B2 (en) Information processing system, information processing method, and program
US11935294B2 (en) Real time object surface identification for augmented reality environments
WO2019237745A1 (en) Facial image processing method and apparatus, electronic device and computer readable storage medium
KR20120033246A (en) Image processing apparatus, image processing method, and computer program
CN112562019A (en) Image color adjusting method and device, computer readable medium and electronic equipment
US11995750B2 (en) Electronic device and method of providing user interface for emoji editing while interworking with camera function by using said electronic device
CN104396234B (en) Transmission of video and reconstruct
KR102546016B1 (en) Systems and methods for providing personalized video
CN110290426B (en) Method, device and equipment for displaying resources and storage medium
WO2022048373A1 (en) Image processing method, mobile terminal, and storage medium
CN108961375A (en) A kind of method and device generating 3-D image according to two dimensional image
CN109167914A (en) A kind of image processing method and mobile terminal
CN115484403B (en) Video recording method and related device
CN113763242A (en) Image processing method and device and computer readable storage medium
KR101011194B1 (en) Mobile apparatus with a picture conversion and drawing function and method of the same
WO2024066689A1 (en) Model processing method, and apparatus
US20080122867A1 (en) Method for displaying expressional image
WO2021170127A1 (en) Method and apparatus for three-dimensional reconstruction of half-length portrait
WO2021244040A1 (en) Facial expression editing method and electronic device
WO2024119997A1 (en) Illumination estimation method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23869936

Country of ref document: EP

Kind code of ref document: A1