Data processing method, device and equipment

By generating a training sample data set containing shadows and reflections in the rendering engine to train the object segmentation model, the problem of inaccurate object segmentation in the case of shadows and reflections in the existing technology is solved, and the segmentation accuracy and model robustness are improved.

CN118735937APending Publication Date: 2024-10-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310357421.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing object segmentation technology cannot accurately extract objects when faced with shadows or reflections in images, resulting in low segmentation accuracy.

Method used

The object segmentation model is trained by using a rendering engine to generate a training sample dataset, including cases of shadows and reflections, to improve the model's robustness and segmentation accuracy.

Benefits of technology

It improves the accuracy and robustness of the object segmentation model in the case of shadows or reflections, reduces the cost and time of obtaining training sample data sets, and enhances the wide application of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735937A_ABST
    Figure CN118735937A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and equipment, and the method comprises the steps: carrying out the recording of motion video data containing a target virtual object when a rendering engine drives the target virtual object through a motion data file; generating object image information of a target virtual object through illumination information in scene configuration information configured by a rendering engine, and taking action video data containing the object image information as video data to be rendered; in the sample environment space, performing rendering processing on the to-be-rendered video data and a scene background image in the scene configuration information through a rendering engine, obtaining a training sample data set containing a sample background image of the scene background image in a sample environment space, a sample object image of the target virtual object in the sample environment space and sample video data; and performing iterative training on the initial object segmentation model through the training sample data set to obtain a target object segmentation model. According to the invention, the accuracy of object segmentation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device and equipment. Background Art

[0002] Object segmentation (also known as object cutout, such as portrait cutout) refers to the technology of extracting an object (such as a person) in an image from the background with high precision. This technology is widely used in mixed reality, image editing, creative synthesis or movie special effects production.

[0003] The inventors have found in practice that when faced with situations such as shadows or reflections of related objects in images, existing object segmentation technologies will have residual problems in the shadows or reflections, that is, they cannot accurately extract the required objects, resulting in low object segmentation accuracy. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus and device, which can efficiently generate a training sample data set with object image information, and further improve the accuracy of object segmentation through an object segmentation model trained by the training sample data set.

[0005] On the one hand, an embodiment of the present application provides a data processing method, including:

[0006] When the action data file for driving the target virtual object is obtained, the action data file is imported into the rendering engine, and when the rendering engine drives the target virtual object through the action data file, the action video data containing the target virtual object is recorded;

[0007] Obtaining scene configuration information configured by the rendering engine, generating object image information of the target virtual object in the action video data through the illumination information in the scene configuration information, and using the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space;

[0008] In the sample environment space, the rendering engine performs rendering processing on the video data to be rendered and the scene background image in the scene configuration information to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image;

[0009] The sample background image, the sample object image and the sample video data are used as a training sample data set for training an initial object segmentation model. The initial object segmentation model is iteratively trained using the training sample data set to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space.

[0010] On the one hand, an embodiment of the present application provides a data processing method, including:

[0011] When the target video data of the target object located in the target environment space is obtained, a target object segmentation model for image processing of the target video data is obtained; the target object segmentation model is obtained by iteratively training the initial object segmentation model through the training sample data set; the training sample data set is obtained by rendering the video data to be rendered and the scene background image in the scene configuration information configured by the rendering engine in the sample environment space through the rendering engine; the training sample data set includes the sample background image of the scene background image in the sample environment space, the sample object image of the target virtual object in the sample environment space, and the sample video data associated with the target virtual object and the sample background image; the rendering engine is used to record and obtain the action video data containing the target virtual object when driving the target virtual object through the action data file associated with the target virtual object; the video data to be rendered refers to the object image information of the target virtual object in the action video data generated by the lighting information in the scene configuration information, and the action video data containing the object image information of the target virtual object;

[0012] The target video data is input into the target object segmentation model, and the target object image of the target object in the target environment space is extracted from the target video data through the target object segmentation model.

[0013] An embodiment of the present application provides a data processing device, including:

[0014] The object driving module is used to import the action data file into the rendering engine when the action data file for driving the target virtual object is obtained, and when the rendering engine drives the target virtual object through the action data file, the action video data containing the target virtual object is recorded;

[0015] An image generation module is used to obtain scene configuration information configured by a rendering engine, generate object image information of a target virtual object in the action video data through illumination information in the scene configuration information, and use the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space;

[0016] An image rendering module is used to render the video data to be rendered and the scene background image in the scene configuration information in the sample environment space through a rendering engine to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image;

[0017] The model training module is used to use sample background images, sample object images and sample video data as training sample data sets for training the initial object segmentation model, and iteratively train the initial object segmentation model through the training sample data sets to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space.

[0018] The device further comprises:

[0019] The object generation module is used to import the initial virtual object into the rendering engine when an initial virtual object provided by a virtual object generator associated with the rendering engine is obtained, and the rendering engine generates a target virtual object corresponding to the initial virtual object.

[0020] Among them, the object generation module includes:

[0021] An asset loading unit, used for loading the virtual wearable asset of the initial virtual object through the rendering engine when the initial virtual object is imported into the rendering engine;

[0022] The asset mapping unit is used to perform asset reorganization mapping on the virtual wearable assets of the initial virtual object in the rendering engine to obtain a target virtual object corresponding to the initial virtual object.

[0023] The number of initial virtual objects is M, one initial virtual object corresponds to a group of virtual wearable assets, and a group of virtual wearable assets includes one or more virtual wearable objects; M is a positive integer; the M initial virtual objects include the i-th initial virtual object, and i is a positive integer less than or equal to M;

[0024] The asset mapping unit includes:

[0025] The size matching subunit is used to obtain the wearing size of the i-th initial virtual object in the rendering engine, and use the virtual wearing object matching the wearing size in the M groups of virtual wearing assets as the matching wearing asset;

[0026] The asset reorganization subunit is used to obtain the asset type of the matching wearable asset, perform asset reorganization on the virtual wearable object in the matching wearable asset based on the asset type of the matching wearable asset, and perform attribute transformation on the matching wearable asset after asset reorganization to obtain N groups of reorganized wearable assets; N is a positive integer greater than 1;

[0027] The asset replacement subunit is used to replace the virtual wearable assets of the i-th initial virtual object based on the N groups of reorganized wearable assets to obtain a target virtual object corresponding to the i-th initial virtual object.

[0028] The device further comprises:

[0029] The posture estimation module is used to obtain a posture estimation model associated with the original video data when the original video data containing the action object is obtained; the original video data is input into the posture estimation model, and the posture of the action object in the original video data is estimated by the posture estimation model to obtain the action data of the action object; based on the action data of the action object, a motion data file for driving the target virtual object is generated.

[0030] Among them, the object driver module includes:

[0031] A position determination unit, used to determine key point position information of a target virtual object based on the action data carried in the action data file;

[0032] The posture adjustment unit is used to record action video data containing the target virtual object through a virtual camera configured by the rendering engine when the rendering engine adjusts the posture of the target virtual object through key point position information.

[0033] Among them, the image generation module includes:

[0034] A light source configuration unit, configured to configure a scene light source having a lighting position and a lighting intensity in the sample environment space in response to a light source configuration operation for the sample environment space where the target virtual object is located, in response to the light source configuration operation for the sample environment space where the target virtual object is located, when outputting the action video data on a configuration interface associated with the rendering engine;

[0035] A building material configuration unit, configured to configure scene building materials with reflective intensity in the sample environment space in response to a building material configuration operation for the sample environment space;

[0036] A background configuration unit, configured to configure a scene background image in the sample environment space in response to a background configuration operation for the sample environment space;

[0037] The information determination unit is used to use the illumination position, illumination intensity and reflection intensity as illumination information, and determine the scene configuration information based on the illumination information and the scene background image.

[0038] The configuration interface includes a first area for displaying the target virtual object and the sample environment space and a second area for performing scene configuration; the second area includes a light source adding control;

[0039] A light source configuration unit is specifically used to output a scene light source for adding to the sample environment space on the first area in response to an add operation for adding a control for the light source in the second area, and to output a third area for adjusting parameters of the scene light source on the configuration interface; to determine the lighting position of the scene light source in response to a position adjustment operation for the scene light source in the first area; to determine the lighting intensity of the scene light source in response to an intensity adjustment operation for an editable text box in the third area; and to add the scene light source with the lighting position and lighting intensity to the sample environment space.

[0040] Among them, the image generation module includes:

[0041] The lighting processing unit is used to perform lighting processing on the target virtual object in the action video data based on the lighting information in the scene configuration information when the light and shadow state of the scene light source in the sample environment space is configured to be enabled, so as to generate object image information of the target virtual object; and use the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space.

[0042] The model training module includes:

[0043] An object segmentation unit, used to input the sample background image and the sample video data into an initial object segmentation model, and extract a predicted object image of a target virtual object in a sample environment space from the sample video data through the initial object segmentation model;

[0044] The parameter adjustment unit is used to adjust the network parameters in the initial object segmentation model based on the predicted object image and the sample object image to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space.

[0045] An embodiment of the present application provides a data processing device, including:

[0046] A model acquisition module is used to acquire a target object segmentation model for image processing of the target video data when the target video data of the target object located in the target environment space is acquired; the target object segmentation model is obtained by iteratively training the initial object segmentation model through the training sample data set; the training sample data set is obtained by rendering the video data to be rendered and the scene background image in the scene configuration information configured by the rendering engine in the sample environment space through the rendering engine; the training sample data set includes a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; the rendering engine is used to record and obtain action video data containing the target virtual object when driving the target virtual object through the action data file associated with the target virtual object; the video data to be rendered refers to the object image information of the target virtual object in the action video data generated through the illumination information in the scene configuration information, and the action video data containing the object image information of the target virtual object;

[0047] The object segmentation module is used to input the target video data into the target object segmentation model, and extract the target object image of the target object in the target environment space from the target video data through the target object segmentation model.

[0048] Among them, the target object segmentation model includes a target encoder and a target decoder;

[0049] The object segmentation module includes:

[0050] An image stitching unit is used to obtain a target background image corresponding to a target environment space and a video frame image associated with a target object and the target background image from the target video data, and stitch the target background image and the video frame image to obtain an image to be processed;

[0051] A feature extraction unit is used to input the image to be processed into a target encoder, and extract features of the image to be processed through the target encoder to obtain image features of the image to be processed;

[0052] a mask generation unit, configured to input the image features into a target decoder, and when the target decoder obtains a prediction mask associated with the target object through the image features, generate a foreground mask based on the prediction mask and the image features;

[0053] The object extraction unit is used to extract a target object image of the target object in the target environment space from the video frame image included in the target video data based on the foreground mask.

[0054] An embodiment of the present application provides a computer device, including: a processor and a memory;

[0055] The processor is connected to the memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

[0056] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.

[0057] In one aspect, the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the present application.

[0058] In an embodiment of the present application, when an action data file for driving a target virtual object is obtained, the action data file can be imported into a rendering engine, and then when the rendering engine drives the target virtual object through the action data file, action video data containing the target virtual object is recorded; further, scene configuration information configured by the rendering engine is obtained, and then object image information of the target virtual object in the action video data is generated through the lighting information in the scene configuration information, so that the action video data containing the object image information of the target virtual object can be used as the video data to be rendered of the target virtual object in the sample environment space; in the sample environment space, the rendering engine can render the video data to be rendered and the scene background image in the scene configuration information to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; at this time, the sample background image, the sample object image, and the sample video data can be used as a training sample data set for training an initial object segmentation model, and the initial object segmentation model can be iteratively trained through the training sample data set to finally obtain a target object segmentation model for image processing of the target video data of the target object located in the target environment space. It can be seen that the embodiments of the present application can efficiently generate a large number of training sample data sets with object image information such as shadows or reflections based on the rendering engine and virtual objects, thereby improving the efficiency of obtaining the required training sample data sets and reducing the cost of obtaining the training sample data sets. In addition, since the object segmentation model (i.e., the target object segmentation model) trained by the training sample data set can learn the ability to correct errors in situations such as shadows or reflections, the robustness of the object segmentation model can be improved, and the accuracy of object segmentation can be improved when performing image processing through the object segmentation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of the present application;

[0061] Figure 2 is a schematic diagram of generating a training sample data set provided by an embodiment of the present application;

[0062] Figure 3This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 1 ;

[0063] Figure 4 is a schematic diagram of a scene of posture estimation provided by an embodiment of the present application;

[0064] Figure 5 This is a schematic diagram of a scenario configuration provided by an embodiment of the present application. Figure 1 ;

[0065] Figure 6 This is a schematic diagram of a scenario configuration provided by an embodiment of the present application. Figure 2 ;

[0066] Figure 7 is a schematic diagram of image data generated by a rendering engine provided in an embodiment of the present application;

[0067] Figure 8 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 2 ;

[0068] Fig. 9 is a schematic diagram of a scene of object segmentation provided in an embodiment of the present application;

[0069] Fig.10 is a schematic diagram of a game scene based on object segmentation provided in an embodiment of the present application;

[0070] Fig.11 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Figure 1 ;

[0071] Fig.12 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Figure 2 ;

[0072] Fig.13 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] 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 present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0074] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0075] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0076] The solution provided in the embodiment of the present application relates to computer vision technology in the field of artificial intelligence. It is understandable that computer vision technology (Computer Vision, CV) is a science that studies how to make machines "see". Further, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further do graphic processing to make computer processing more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology generally includes data processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning and map construction, automatic driving, intelligent transportation and other technologies, and also includes common biometric recognition technologies such as face recognition and fingerprint recognition. In the embodiment of the present application, computer vision technology can be used to obtain action data files for driving target virtual objects from raw video data, and image processing is performed on target video data.

[0077] The scheme provided in the embodiment of the present application relates to machine learning technology in the field of artificial intelligence. It is understandable that machine learning (ML) is a multi-field cross-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. Specializes in how computers simulate or realize human learning behavior, in order to acquire new knowledge or skills, and reorganize the existing knowledge structure to continuously improve its performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its application is spread across all fields of artificial intelligence. Machine learning generally includes artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning. In the embodiment of the present application, the target object segmentation model and the posture estimation model are both AI models based on machine learning technology, wherein the target object segmentation model can be used to extract the target object image of the target object in the target environment space from the target video data, and the posture estimation model can be used to estimate the posture of the action object in the original video data.

[0078] See also Figure 1 , Figure 1 Schematic diagram of a system architecture provided by an embodiment of the present application. Figure 1 As shown, the system architecture may include a service server 100 and a terminal device cluster, wherein the terminal device cluster may include one or more terminal devices, and the number of terminal devices in the terminal device cluster is not limited here. Figure 1 As shown, the multiple terminal devices in the terminal device cluster may specifically include: terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n, wherein there may be a communication connection between the terminal device clusters, for example, there is a communication connection between terminal device 200a and terminal device 200b, and there is a communication connection between terminal device 200a and terminal device 200c. At the same time, any terminal device in the terminal device cluster may have a communication connection with the business server 100, so that each terminal device in the terminal device cluster can exchange data with the business server 100 through the communication connection, for example, there is a communication connection between terminal device 200a and the business server 100. The above-mentioned communication connection does not limit the connection method, and may be directly or indirectly connected through a wired communication method, or directly or indirectly connected through a wireless communication method, or through other methods, which are not limited in this application.

[0079] Each terminal device in the terminal device cluster may include: smart phones, tablet computers, laptop computers, desktop computers, wearable devices (such as smart watches, smart bracelets), smart homes, head-mounted devices (such as VR (Virtual Reality) helmets, VR glasses, etc.), smart car-mounted smart terminals. It should be understood that Figure 1 Each terminal device in the terminal device cluster shown in FIG. 1 may be installed with an application client. When the application client runs in each terminal device, it may be respectively connected to the above-mentioned Figure 1 Data is exchanged between the business servers 100 shown. The application client may include an entertainment client (e.g., a game client, a live broadcast client), a multimedia client (e.g., a short video client), a tool client (e.g., an image editing client, a video production client), a social client, an instant messaging client (e.g., a conference client), a car client, a smart home client, and other application clients with the function of displaying data information such as text, images, audio, and video. The application client may be an independent client or an embedded sub-client integrated in a client (e.g., a social client, a multimedia client, etc.), which is not limited here. Taking the game client as an example, the business server 100 may be a collection of multiple servers such as a background server and a data processing server corresponding to the game client. Therefore, each terminal device can transmit data with the business server 100 through the game client. For example, the somatosensory game needs to replace the real background taken by the player (i.e., the game user) himself with the virtual background in the game, so as to achieve a better immersive experience. Therefore, in some embodiments, the game client corresponding to the somatosensory game can send the motion video (such as a dance video) of the corresponding player to the business server 100 when the motion video is collected by a related acquisition device (such as a mobile phone camera). Then, the business server 100 can extract the human body in the motion video as a high-grained foreground through a trained object segmentation model (such as a human body cutout model) (i.e., object segmentation), so as to perform background replacement, and return the game screen after the background replacement to the game client for output display, so that the player can immersively experience dancing with the virtual idol in the game.

[0080] The business server 100 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The number of business servers may be one or more, a terminal device may be connected to a business server, and each business server may obtain data uploaded by the terminal device connected to it.

[0081] It is understandable that in actual business scenarios (for example, game scenarios), it is easy to obtain images or videos with shadows (such as foot shadows, wall shadows) or reflections (such as ground reflections) when facing different lighting conditions. In order to improve the robustness of the object segmentation model in such situations, the embodiment of the present application provides an object segmentation model performance improvement solution based on a rendering engine and a virtual object synthetic training sample data set, which can obtain the accurate cutouts corresponding to the required objects under different lighting conditions. Among them, in view of the problems that the existing data sets lack shadows or reflections, are small in number, have low acquisition efficiency, and high costs, the embodiment of the present application can efficiently generate a large number of required data sets, that is, it can batch generate comprehensive scenes with different backgrounds, different lighting, and different objects according to demand to simulate various situations in real scenes, and render data sets with shadows or reflections for model training.

[0082] For easier understanding, please refer to Figure 2 , Figure 2 is a schematic diagram of generating a training sample data set provided by an embodiment of the present application. The method provided by the embodiment of the present application can be executed by a computer device, which includes but is not limited to a terminal device (for example, Figure 1 Any terminal device in the terminal device cluster shown, such as terminal device 200a) or a service server (for example, Figure 1 The business server 100 shown in the figure is not limited here. A rendering engine (such as Unreal Engine) can be run on the computer device. It can be understood that the core of the embodiment of the present application is to use the rendering engine to generate the required environment space and the corresponding training sample data set, so as to improve the robustness of the object segmentation model in the real scene.

[0083] like Figure 2 As shown, the virtual objects (including Figure 2The target virtual object and the initial virtual object in the training sample data set may include but are not limited to the whole or part of virtual characters (also known as digital people), animals, plants, objects, etc. For ease of understanding and distinction, a virtual object with complete content may be referred to as a whole virtual object (e.g., a complete virtual character), and a virtual object with partial content may be referred to as a local virtual object (e.g., the head, hairstyle, clothing, etc. of a virtual character). In the embodiment of the present application, the virtual object used to synthesize the training sample data set may be referred to as a target virtual object. The target virtual object here may include any one or more of the whole virtual object and the local virtual object terminal. There is no limitation here. In actual application, the content of the target virtual object may be determined according to specific business needs. For example, when a complete object needs to be extracted from an image, the target virtual object may be set to the whole virtual object, and when a part of an object needs to be extracted from an image, the target virtual object may be set to the local virtual object, or the obtained whole virtual object and the local virtual object associated therewith may be used as the target virtual object. Among them, the target virtual object may be obtained by changing the initial virtual object provided by the virtual object generator, thereby increasing the diversity of virtual objects in the obtained training sample data set. Taking the virtual object as a digital human as an example, the purpose of batch generating digital humans with multiple different appearances (i.e., target digital humans) can be achieved by changing the hairstyle, clothes, shoes, etc. of the existing digital human (i.e., the initial digital human, such as the digital human model provided by the Meta Human Creator (MHC), which can also be called the MetaHuman model, which is similar to a real person) in the rendering engine. Among them, the number of initial virtual objects can be one or more, and correspondingly, the number of generated target virtual objects can be multiple, and the number of target virtual objects is greater than the number of initial virtual objects. The embodiment of the present application does not limit the number of initial virtual objects and the number of target virtual objects.

[0084] In addition, in order to simulate the motion of real objects (i.e., real people, animals, plants, objects, etc.), the embodiment of the present application can drive the aforementioned target virtual object by action data file, so as to obtain the action video data of the target virtual object including multiple actions (such as walking, running, jumping, lifting arms, kicking legs, etc.) and appearance, and the embodiment of the present application does not limit the action content and file format described by the action data file. It can be understood that the action data file can be obtained from the original video data with various actions, such as can obtain corresponding action data files by carrying out posture estimation (such as adopting monocular posture estimation algorithm) to the original video data. The original video data here can include the video data obtained from the Internet and the video data taken by the user himself, etc., and the embodiment of the present application does not limit the source of the original video data, for example, the dancing short video collected from each business platform (such as video platform) can be used as the original video data.

[0085] Among them, the rendering engine in the embodiment of the present application is a complete set of development tools, which can be used to transform the relevant virtual wearable assets of virtual objects (such as digital people's hairstyles, clothes, shoes, pendants, etc.), use the above-mentioned action data files to drive the target virtual objects and configure the sample environment space where the target virtual objects are located (such as building a virtual space containing light sources, backgrounds, floors, walls or other objects), and render to generate corresponding training sample data sets. For example, in some embodiments, the rendering engine can specifically be Unreal Engine 5 (abbreviated as UE5).

[0086] Based on this, in an embodiment of the present application, when an action data file for driving a target virtual object is obtained, the action data file can be imported into a rendering engine, and then when the rendering engine drives the target virtual object through the action data file, action video data containing the target virtual object is recorded; further, scene configuration information configured by the rendering engine can be obtained, and then object image information (such as shadows, reflections, etc.) of the target virtual object in the action video data can be generated through the lighting information in the scene configuration information, so that the action video data containing the object image information of the target virtual object can be used as the video data to be rendered of the target virtual object in the sample environment space; in the sample environment space In the method, the rendering engine can be used to render the video data to be rendered and the scene background image in the scene configuration information to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; subsequently, the sample background image, the sample object image, and the sample video data can be used as a training sample data set for training an initial object segmentation model, and the initial object segmentation model can be iteratively trained using the training sample data set to finally obtain a target object segmentation model for image processing of target video data of a target object located in the target environment space.

[0087] It is understandable that Figure 2 As shown, before the rendering engine performs rendering, the following can be randomly selected and fixed: virtual objects (including object attributes of virtual objects (such as gender) and virtual wearable assets such as clothes and pendants, that is, the target virtual objects corresponding to the initial virtual objects generated by the rendering engine), virtual object actions (that is, the actions described in the action data file, which are used to drive the target virtual objects), the number of light sources (that is, the number of scene light sources configured in the sample environment space), building material materials (that is, the materials of scene building materials such as floors and walls configured in the sample environment space, which can be reflective materials or light-absorbing materials), scene background images (that is, the images used as the background in the sample environment space), and camera positions (that is, the positions of the virtual cameras set in the sample environment space), etc. Subsequently, any one or more parameters of the lighting position, lighting intensity, and reflective intensity of the scene building materials corresponding to the scene light source can be changed during the rendering process (i.e., different lighting positions, lighting intensities, and reflective intensities can be set), thereby simulating a real scene with shadows or reflections, and rendering the background data without target virtual objects (i.e., sample background images), video data with target virtual objects and backgrounds (i.e., sample video data), and object cutout data without backgrounds (i.e., sample object images) can be generated through the rendering engine. Among them, the lighting position, lighting intensity, and reflective intensity here can be used as the lighting information in the scene configuration information to generate object image information such as shadows and reflections of the target virtual objects.

[0088] Wherein, the above-mentioned target video data may include video data obtained from the Internet and video data taken by the user himself, etc., and the source of the target video data is not limited in the embodiment of the present application.Similarly, the target object here may refer to the whole or part of a virtual object or a real object, which is not limited here, and correspondingly, the target environment space where the target object is located may be a virtual space or a real space.Similar to the training sample data set, the target video data may include background data without the target object (i.e., the target background image corresponding to the target environment space) and video data with the target object and the background (i.e., video frame images associated with the target object and the target background image), for example, the target background image may be first shot by a camera or other acquisition device, and then a video of the target object (such as a certain person) entering the target environment space at the same position may be shot.It can be understood that the target object may also produce corresponding shadows or reflections (i.e., the object image information of the target object) in the target environment space, therefore, when the target object segmentation model obtained by the training of the above-mentioned training sample data set performs image processing on the target video data, even if the target video data contains shadows or reflections, the accurate cutout (i.e., the aforementioned target object image) corresponding to the target object in the target environment space can be obtained. In addition, the embodiments of the present application may also refer to entity objects (such as individual users, corporate users, or organizations, etc.) that have image processing requirements as business objects.

[0089] It can be seen that the embodiments of the present application can efficiently generate a large number of training sample data sets with object image information such as shadows or reflections based on the rendering engine and virtual objects, thereby improving the efficiency of obtaining the required training sample data sets and reducing the cost of obtaining the training sample data sets. In addition, since the object segmentation model (i.e., the target object segmentation model) trained by the training sample data set can learn the ability to correct errors in situations such as shadows or reflections, the robustness of the object segmentation model can be improved, and the accuracy of object segmentation can be improved when performing image processing through the object segmentation model.

[0090] It is understandable that, optionally, the above method can be executed by a terminal device, for example, a rendering engine can be run on the terminal device (such as the aforementioned terminal device 200a), and after the required training sample data set is generated by the rendering engine, the initial object segmentation model can be further iteratively trained by the training sample data set to obtain the target object segmentation model. Optionally, the above method can also be executed by a business server, for example, a rendering engine can be run on the business server (such as the aforementioned business server 100), and after the required training sample data set is generated by the rendering engine, the initial object segmentation model can be further iteratively trained by the training sample data set to obtain the target object segmentation model. Alternatively, optionally, the above method may be jointly executed by a terminal device and a business server. For example, a rendering engine may be run on the terminal device (such as the aforementioned terminal device 200a). After the required training sample data set is generated by the rendering engine, the training sample data set may be sent to a business server (such as the aforementioned business server 100). The business server iteratively trains the initial object segmentation model using the training sample data set to obtain a target object segmentation model. Subsequently, the terminal device may obtain the target object segmentation model from the business server side so as to perform image processing on the target video data locally. Alternatively, the terminal device may send the target video data to the business server, and the business server may perform image processing on the target video data using the target object segmentation model.

[0091] It should be noted that the method provided in the embodiment of the present application can be applied to various business scenarios with object segmentation (or object cutout) requirements, such as games, video production, image editing, and instant messaging. The segmentation results focus on the edge contours of the object. For example, for portrait cutouts, the accuracy of the contours of hair, clothes, soles of feet, etc. can be shown. In addition, the method provided in the embodiment of the present application can also be extended to other business scenarios that require a large number of data sets, and the specific business scenarios will not be listed one by one here.

[0092] For example, in a game scenario, the trained target object segmentation model can be embedded in the target game (such as a somatosensory game), and the game user (such as user A1) can collect the target video data through the acquisition device associated with the terminal device (for example, the above-mentioned terminal device 200c) held by the game user (such as a camera installed on the terminal device, or a camera connected to the terminal device), and input the target video data (such as video data B1) into the associated target object segmentation model (such as object segmentation model Z1) for object segmentation, and then the real background therein can be replaced with the virtual background in the target game, thereby achieving a better immersive experience. In addition, the aforementioned target object segmentation model is used to solve the problem of residual cutouts in shadows or reflections, thereby providing game users with high-precision cutout results, thereby improving the quality of the game.

[0093] It can be understood that the above-mentioned target game can be cloud gaming, which can also be called gaming on demand, and is an online gaming technology based on cloud computing technology. In the operation mode of cloud gaming, cloud gaming is not run in the terminal devices (such as smart phones, personal computers or wearable devices, etc.) held by game users, but in cloud servers, and the cloud servers render the scenes in the game as audio and video streams, and the cloud servers transmit the rendered audio and video streams to the terminal devices through the network, so that the terminal devices can directly play the audio and video streams. Based on the above description, it can be seen that cloud gaming has the following advantages: it does not require high computing and processing capabilities of the terminal devices held by game users (for example, the terminal devices do not need to have powerful graphics computing and data processing capabilities, but only need to have basic streaming media playback capabilities and the ability to obtain game user input commands and send them to the cloud server), and the development of cloud gaming does not need to consider the adaptability of hardware, etc., which enables cloud gaming to gradually achieve large-scale development. In addition, the target games can be classified according to the gameplay, and can be divided into: role-playing game (RPG), shooting game and action game (ACT), etc.

[0094] It should be understood that when the above-mentioned target game is a cloud game, the computer device (for example, the above-mentioned business server 100) can be a cloud server associated with the cloud game. That is to say, in the cloud game scenario, the cloud server renders the virtual background / objects / objects in the target game, and finally the obtained audio and video stream can be sent to the terminal device held by the game user for output.

[0095] For another example, in a video scenario, the trained target object segmentation model can be embedded in a video production client. The video producer (such as user A2) can use the video production client on the terminal device he holds (for example, the above-mentioned terminal device 200a) to input the target video data used for video production (such as video data B2) into the associated target object segmentation model (such as object segmentation model Z2) for object segmentation. The accurate cutout results (such as the extracted related object images) can be used for special effects production, creative synthesis, etc. to obtain the required video data, thereby reducing the cost of video production and improving the efficiency and quality of video production.

[0096] For another example, in an instant messaging scenario, in order to provide a 3D (short for Three Dimensions) virtual space with link perception and sharing features, or an interactive, immersive and collaborative world, a computer device (e.g., the above-mentioned terminal device 200b) can obtain the target video data (e.g., video data B3) generated when a user (e.g., user A3) conducts instant messaging (e.g., video calls, video conferences, etc.) through an installed application client (e.g., an instant messaging client), and can input the video data B3 into an associated target object segmentation model (e.g., object segmentation model Z3) for object segmentation, and then the real background therein can be replaced with a specified virtual background, or the user A3 therein can be mapped to a corresponding virtual image, thereby enriching the display method of instant messaging and improving the display quality during instant messaging.

[0097] In addition, optionally, it can be understood that the embodiments of the present application can also support the use of acquisition devices such as cameras to capture object action video data with shadows or reflections in real scenes, and perform artificial object segmentation (i.e., artificial cutout) on the object action video data, so as to obtain the required training sample data set. Specifically, the object action video data of the sample object located in the initial environment space can be collected by the acquisition device. The object action video data may include an initial background image corresponding to the initial environment space, and an object background image associated with the sample object and the initial background image. The object background image is subjected to object segmentation to obtain the initial object image of the sample object in the initial environment space, and then the initial video data and the initial object image can be used as a training sample data set for training the initial object segmentation model.

[0098] It should be noted that when the computer device in the embodiment of the present application obtains target video data and other data associated with the business object, it can display a prompt interface or pop-up window. The prompt interface or pop-up window is used to prompt the business object that it is currently collecting target video data and other data (for example, a pop-up window is output to prompt the business object that it currently needs to turn on the camera to shoot, or needs to obtain the target video data by reading the local memory). Only after the business object issues a confirmation operation on the prompt interface or pop-up window, the relevant steps of data acquisition are started, otherwise it ends.

[0099] It is understandable that in the specific implementation of the present application, data related to business objects such as target video data is involved. When the embodiments in the present application are applied to specific products or technologies, it is necessary to obtain the permission or consent of the business object, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0100] The computer device generates a training sample data set through a rendering engine, iteratively trains the initial object segmentation model through the training sample data set to obtain a target object segmentation model, and performs image processing on the target video data through the target object segmentation model. For a specific implementation method, please refer to the following Figure 3-Figure 10 The description in the corresponding embodiment.

[0101] See also Figure 3 , Figure 3 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 1 . It can be understood that the method provided in the embodiment of the present application can be executed by a computer device, where the computer device can be a terminal device or a service server, and a rendering engine is running on the computer device. For ease of understanding, the embodiment of the present application takes the computer device as an example of a terminal device to illustrate the specific process of generating a training sample data set in the terminal device. Figure 3 As shown, the method may at least include the following steps S101 to S104:

[0102] Step S101, when an action data file for driving a target virtual object is obtained, the action data file is imported into a rendering engine, and when the rendering engine drives the target virtual object through the action data file, action video data containing the target virtual object is recorded;

[0103] It is understandable that the terminal device can generate a variety of high-fidelity virtual objects driven by action data files with the help of the virtual object generator and the action data files obtained by posture estimation. First, the terminal device can first obtain the initial virtual object provided by the virtual object generator associated with the rendering engine, and then the initial virtual object can be imported into the rendering engine (for example, the material editing tool (Quixel Bridge) in the Unreal Engine can be used to import the initial virtual object), and then the rendering engine generates the target virtual object corresponding to the initial virtual object. In other words, since the number of initial virtual objects provided by the virtual object generator is small, the initial virtual object can be changed in appearance through the rendering engine, thereby obtaining a target virtual object with a variety of appearances, which can improve the robustness of the target object segmentation model obtained by subsequent training. For example, in some embodiments, when the virtual object is desired to be a virtual character, a meta-digital human generator (i.e., MHC) can be used as a virtual object generator, so that the digital human model (i.e., initial digital human) provided by the meta-digital human generator can be downloaded as the initial virtual object. However, since the number of digital human models provided by the meta-digital human generator is small, the expression of the character's hairstyle, clothes, etc. is limited, and the efficiency of manually making a new digital human using the meta-digital human generator is low, the digital human model's hairstyle, clothes, shoes and other virtual wearable assets can be further replaced using a rendering engine (such as UE5), so that more target digital humans can be generated, that is, the appearance and number of digital humans can be enriched.

[0104] Among them, when the initial virtual object is imported into the rendering engine, the virtual wearable assets of the initial virtual object can be loaded through the rendering engine, and then the virtual wearable assets of the initial virtual object can be reorganized and mapped in the rendering engine, so as to obtain the target virtual object corresponding to the initial virtual object. It can be understood that, taking a virtual character as an example, the virtual wearable assets of the initial virtual object can include one or more virtual wearable objects, where the virtual wearable objects may include but are not limited to head virtual wearable objects such as hairstyles, hats, and helmets (also referred to as first-class virtual wearable assets), upper body virtual wearable objects such as tops and scarves (also referred to as second-class virtual wearable assets), lower body virtual wearable objects such as pants and skirts (also referred to as third-class virtual wearable assets), foot virtual wearable objects such as shoes and socks (also referred to as fourth-class virtual wearable assets), full-body virtual wearable objects such as jumpsuits, backpacks, luggage, pendants, and props (also referred to as fifth-class virtual wearable assets), etc., and the embodiments of the present application do not limit this. Since the virtual wearable assets of the initial virtual object can be separated and replaced, for the initial digital person, it is equivalent to making a combined mapping of the initial digital person's hairstyle, clothes and other virtual wearable assets in the rendering engine. The reason for mapping is that different digital people have different body shapes and statures. Correspondingly, the sizes of virtual wearable assets of different digital people may be different. Therefore, it is necessary to match the statures of different digital people with virtual wearable assets, so that the virtual wearable assets of the corresponding initial digital person can be replaced when the match is successful.

[0105] In one embodiment, it is assumed that the number of the above-mentioned initial virtual objects is M, and one initial virtual object corresponds to a group of virtual wearable assets, and a group of virtual wearable assets includes one or more virtual wearable objects; M is a positive integer; the M initial virtual objects include the i-th initial virtual object, and i is a positive integer less than or equal to M; for ease of understanding, the i-th initial virtual object is taken as an example for explanation, and the specific process of asset reorganization mapping of the virtual wearable assets of the i-th initial virtual object in the rendering engine can be: in the rendering engine, the wearing size of the i-th initial virtual object is obtained, and the virtual wearable objects matching the wearing size in the M groups of virtual wearable assets are used as matching wearable assets; further, the asset type of the matching wearable asset is obtained, and the virtual wearable objects in the matching wearable assets are asset reorganized based on the asset type of the matching wearable asset, and the matching wearable assets after asset reorganization can be attributed to obtain N groups of reorganized wearable assets; here N is a positive integer greater than 1; then, the virtual wearable assets of the i-th initial virtual object can be replaced based on the N groups of reorganized wearable assets, so as to obtain the target virtual object corresponding to the i-th initial virtual object.

[0106] Among them, the wear size refers to the size of the virtual wearable asset that matches the body shape and figure of the initial virtual object. For example, the wearable size can be divided into the first wearable size (such as small size), the second wearable size (such as medium size), the third wearable size (such as large size), etc. according to the body shape from small to large. The asset type of the matching wearable asset can include one or more of the above-mentioned first category of virtual wearable assets, second category of virtual wearable assets, third category of virtual wearable assets, fourth category of virtual wearable assets, and fifth category of virtual wearable assets, which are not limited here. In addition, each virtual wearable object is configured with its own asset attributes, and the asset attributes here may include the texture, color, etc. of the virtual wearable object, such as the color of the hairstyle, the texture of the clothes, etc. For example, assuming that the i-th initial virtual object is the initial virtual object X, and the virtual wearable assets of the initial virtual object X include hairstyle C1, top D1, pants E1, and shoes F, when the wearing size of the initial virtual object X is the first wearing size, the virtual wearable objects with a wearing size greater than or equal to the first wearing size in the M groups of virtual wearable assets can be used as matching wearable assets Y. Assuming that the matching wearable assets Y include first-category virtual wearable assets (such as hairstyle C1 and hairstyle C2), second-category virtual wearable assets (such as top D1 and top D2), third-category virtual wearable assets (such as pants E1 and skirt E2), and fourth-category virtual wearable assets ( For example, if the virtual wearable objects in the matching wearable asset Y are hairstyles C1, C2, tops D1, D2, pants E1, skirt E2, and shoes F, the assets can be reorganized according to their asset types. For example, hairstyle C1, tops D1, skirt E2, and shoes F can be combined; hairstyle C2, tops D2, pants E1, and shoes F can be combined; and the matching wearable assets after asset reorganization can be further transformed in attributes. For example, the texture or color of any one or more virtual wearable objects in hairstyle C1+tops D1+skirt E2+shoes F can be transformed to obtain corresponding multiple groups of reorganized wearable assets. Assuming that the total number of reorganized wearable assets finally obtained is 10 groups (i.e., N=10 as mentioned above), namely, reorganized wearable asset N1, reorganized wearable asset N2, reorganized wearable asset N3, ..., reorganized wearable asset N10, then the virtual wearable assets (i.e., hairstyle C1, top D1, pants E1, and shoes F) of the initial virtual object X can be randomly replaced with any one or more groups of reorganized wearable assets N1 to reorganized wearable assets N10 in the rendering engine, so as to obtain one or more target virtual objects corresponding to the initial virtual object X.

[0107] In some embodiments, UE5 can be used as a rendering engine, and the UE5 development tool unreal.EditorAssetLibrary.load_asset(path) can be used to load virtual wear assets with relative paths into memory. By establishing a combined mapping of virtual wear assets including hairstyles, tops, pants, shoes, etc., it is possible to automatically and randomly change the hairstyles, tops, pants, and shoes of high-fidelity digital humans in the UE game engine, thereby achieving the purpose of batch generating a variety of different digital humans.

[0108] It is understandable that when the initial virtual object is a virtual animal, a virtual plant or a virtual object, its virtual wearable assets (such as the hair, clothing, pendants, etc. of virtual animals, decorations, clothing, etc. of virtual plants, decorations, packaging, etc. of virtual objects) can also be replaced through the rendering engine, or its own object properties (including the texture, color, etc. of the initial virtual object, such as the texture of virtual items such as tables) or the asset properties of related virtual wearable assets (including the texture, color, etc. of virtual wearable assets, such as the color of hair) can be transformed, so as to obtain target virtual objects with diverse appearances and abundant quantities.

[0109] In addition, it can be understood that, in order to produce action video data with multiple actions at the same time, the embodiment of the present application can input the original video data containing the action object into the neural network and post-processing (such as using a monocular posture estimation algorithm) to estimate the action data of the action object in batches, thereby obtaining the action data file for driving the above-mentioned target virtual object (such as the target digital human). Wherein, the type of the action object is consistent with the type of the above-mentioned virtual object, that is, when the virtual object is a virtual person / animal / plant / object, correspondingly, the action object can be a virtual or real person / animal / plant / object, and the action object is in motion, for example, when the action object is a person or an animal, it can have one or more of the actions of walking, running, jumping, raising arms, kicking legs, etc.; when the action object is a plant, it can have actions such as swinging and blooming; when the action object is an object, it can have actions such as moving, lifting, rotating, etc., and the embodiment of the present application does not limit the specific action content of the action object. The original video data here may include video data containing action objects obtained from the Internet and video data containing action objects shot by users themselves, etc. The embodiment of the present application does not limit the source and content of the original video data. For example, short dancing videos collected from various business platforms (such as video platforms) can be used as original video data. Specifically, when the original video data containing action objects are obtained, the terminal device can obtain a posture estimation model associated with the original video data, and then the original video data can be input into the posture estimation model. The posture estimation model is used to estimate the posture of the action object in the original video data, and the action data of the action object can be obtained. Subsequently, based on the action data of the action object, an action data file for driving the target virtual object can be generated.

[0110] Among them, the action data file contains rich and natural and realistic detail information, which can describe the hierarchical structure of the action object (such as the skeleton structure of the human body) and the motion information at each time point (such as the action data corresponding to each frame in the aforementioned original video data, which can also be called action data frame). In addition, it can also include some motion constraint information, such as the physical constraints of the action, action characteristics, etc. The file format of the action data file can be any one of the file formats such as BVH (BioVisionHierarchy), ASF / AMC (Acclaim Skeleton File / Acclaim Motion Capture data), C3D (Convolutional 3D), CSM, HTR, etc., which is not limited here. Among them, BVH is a common human motion capture file format. In some embodiments, action data files in other formats can be converted into action data files in BVH format. It is understandable that the action data file has strong reusability, and the data it carries can be used to reproduce the corresponding motion situation. Therefore, in the embodiment of the present application, the rendering engine can drive the target virtual object according to the hierarchical structure and motion information in the action data file, so that the target virtual object produces corresponding actions (such as jumping, turning in circles, etc.), and the action video data containing the target virtual object can be recorded by the virtual camera configured by the rendering engine. Since the above-mentioned action data file can be obtained in advance (such as by performing posture estimation on the action object in the original video data through the posture estimation model), the efficiency of obtaining the action video data containing the target virtual object can be effectively improved; in addition, by driving the target virtual object through the action data file to simulate the real object motion scene, the diversity of the target virtual object can be increased, thereby improving the robustness of the subsequent target object segmentation model in the cutout under different actions of the target object.

[0111] Among them, the posture estimation model can be an AI model composed of a deep neural network as the basic architecture, and the specific network structure of the posture estimation model is not limited here. In order to finally synthesize a large number of virtual objects with rich appearance, varied movements, and similar to real objects, the embodiment of the present application can utilize a posture estimation model based on a monocular posture estimation algorithm (also known as a monocular motion capture method) to obtain different motion data files from massive raw video data obtained from various channels, which are used to drive the target virtual object to obtain a target virtual object with multiple movements to simulate the motion scene of the real object. For ease of understanding, please refer to Figure 4 , Figure 4 is a schematic diagram of a posture estimation scenario provided by an embodiment of the present application. Figure 4As shown, assuming that the video data 40a is the original video data, the object 40b contained in the video data 40a is a moving object. After the video data 40a containing the object 40b is input into a pre-trained posture estimation model (such as the posture estimation model 40c), the motion features of the object 40b can be extracted from the video data 40a by the posture estimation model 40c, and then the motion data of the object 40b (such as the motion data 40d) can be generated according to the extracted motion features. The motion data here can be used to describe the motion posture of the object 40b at a certain moment. Optionally, when the object 40b is a virtual character or a real person, its motion data can be specifically the key point rotation information (also known as the posture parameter) of the object 40b, which can be used to represent the displacement and rotation angle of each key point on the object 40b. It can be understood that the key point here can be the joint point defined in the joint point tree associated with the object 40b. Except for the root joint point of the joint point tree, each of the remaining joint points has a corresponding parent joint point, that is, the key point rotation information includes the rotation angle of each joint point relative to its parent joint point. Among them, the joint point tree associated with the object 40b can be used to describe the hierarchical structure of the object 40b (such as the skeleton structure of the object 40b), for example, the joint point tree and the name of each joint point, the relative position between the joint points, etc. can be defined according to the hierarchical relationship. In addition, optionally, the object shape information (also known as shape parameters, used to describe the shape of the object 40b, such as the height, fatness, etc. of the object 40b) and the camera parameter information (including the translation, rotation, focal length and other parameters corresponding to the camera used to collect the video data 40a) of the object 40b can also be generated according to the action characteristics of the object 40b. These two parameters and the above-mentioned posture parameters can together constitute the SMPL (Skinned Multi-Person Linear) parameters of the object 40b, which can be used to drive the specified virtual object. It can be understood that since it is necessary to perform posture estimation on each frame of the video data 40a, multiple groups of action data based on time sequence arrangement can be finally obtained, and the specific number of action data is not limited here. Furthermore, a corresponding action data file can be generated based on the obtained multiple sets of action data and the hierarchical structure of object 40b, so that the actions of object 40b (such as a series of dance movements) can be described in an orderly manner. The action data file can be represented by a specified file format (such as BVH format), which is not limited to the embodiment of the present application.

[0112] Based on this, when the rendering engine drives the target virtual object through the imported action data file, the action video data containing the target virtual object can be recorded, and the specific process can be: first, based on the hierarchical structure (for example, the skeleton structure of the object 40b) and the action data (for example, the key point rotation information of the object 40b) carried in the action data file, the key point position information of the target virtual object (such as the target digital human) can be determined, and the key point position information here refers to the three-dimensional coordinate information of the key point of the target virtual object; then, when the rendering engine adjusts the posture of the target virtual object through the key point position information, the action video data containing the target virtual object can be recorded through the virtual camera configured by the rendering engine. In other words, the rendering engine can map the relevant action data to the skeleton structure composed of key points (such as joint points) (which can be determined by the skeleton structure of the moving object), that is, the position of the key point of the target virtual object can be adjusted frame by frame according to the key point position information obtained, and at the same time, the skin of the target virtual object is bound to its skeleton structure, so that the position change of the key point will also drive the skin to deform, thereby presenting a realistic and smooth movement. In addition, in order to show the integrity of time and space in the video, one or more virtual cameras can be configured in the virtual space (i.e., the sample environment space) where the target virtual object is located through the rendering engine, and the number of virtual cameras is not limited here. It should be noted that, unlike real cameras, there is no mutual obstruction between virtual cameras in the virtual space, and in the process of virtual shooting, the virtual camera is usually invisible in the virtual field space. Therefore, the virtual camera can be controlled by the rendering engine to record the entire posture adjustment process (i.e., virtual shooting). For example, the virtual camera can be controlled to move and shoot between different virtual objects, or virtual cameras in different positions can be switched to achieve shooting from different perspectives, so that action video data containing the target virtual object can be obtained. It can be understood that the target virtual object in the action video data has the characteristics of rich appearance (such as different target digital people have different hairstyles, clothes, etc.) and changeable actions (such as target digital people have different actions), and the target virtual object at this time can be represented by a specified file format (such as FBX file format, a popular 3D data exchange format).

[0113] It can be understood that after driving the target virtual object through the action data file to simulate the motion scene of the real object, the target virtual object can have a diversity of appearance (such as clothing, hairstyle, etc.) and actions (such as walking, jumping, etc.), thereby improving the richness and authenticity of the final training sample data set. Compared with the existing data sets with a single role and a few types of actions, the embodiment of the present application can improve the target object segmentation model trained by the training sample data set, and the robustness of the object segmentation performance in real scenes with different objects and different actions, so that the accuracy of the cutout results and the wide application of the cutout can be improved through the target object segmentation model.

[0114] Step S102, obtaining scene configuration information configured by the rendering engine, generating object image information of the target virtual object in the action video data through the illumination information in the scene configuration information, and using the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space;

[0115] It is understandable that the embodiment of the present application can set different scene configuration information (such as background, lighting, etc.) for the target virtual object through the rendering engine, thereby simulating a real scene with shadows or reflections, and can generate a corresponding training sample data set through rendering. Figure 2 As described in the corresponding embodiment, scene configuration information refers to configuration information associated with the sample environment space where the target virtual object is located, and may include but is not limited to parameter information related to scene light sources, scene building materials, scene background images, virtual cameras, etc. configured in the sample environment space.

[0116] In one embodiment, corresponding scene configuration information can be obtained through interactive operations of a configuration interface related to the rendering engine. Specifically, when action video data is output on a configuration interface associated with the rendering engine, on the configuration interface, in response to a light source configuration operation for a sample environment space where a target virtual object is located, a scene light source with a lighting position and a lighting intensity can be configured in the sample environment space. The scene light source here may include but is not limited to one or more of a spotlight (SpotLight), a rectangular light source (RectLight), a point light source, a directional light source, etc., and the corresponding lighting position and lighting intensity can be set according to business needs or randomly set. The light source type, the number of light sources, and the specific values ​​of the lighting position and the lighting intensity of the scene light source are not limited here. Similarly, in response to the building material configuration operation for the sample environment space, scene building materials with reflective intensity can be configured in the sample environment space, wherein the scene building materials here may include but are not limited to floors, walls, ceilings, windows, mirrors, doors, etc., and the reflectiveness of the scene building materials can be determined by setting the material of the scene building materials (such as reflective materials or light-absorbing materials). When the material of a certain scene building material (such as the floor) is a reflective material, its reflective intensity can be further set. The specific value of the reflective intensity is not limited here. Similarly, in response to the background configuration operation for the sample environment space, a scene background image is configured in the sample environment space. The scene background image here can be an image downloaded from the Internet or saved locally, thereby enriching the selection of data set backgrounds. In addition, depending on the business scenario, images with different contents can be selected as scene background images. For example, for game scenes that mainly occur in indoor environments such as bedrooms and living rooms, the required scene background images can be limited to design drawings, photos, etc. of places such as living rooms and bedrooms containing objects such as sofas and televisions. Furthermore, the above-mentioned lighting position, lighting intensity, and reflection intensity can be used as lighting information, and then the scene configuration information can be determined based on the lighting information and the scene background image. It can be understood that in addition to the above-mentioned lighting information and the scene background image, the scene configuration information can also include the camera position of the virtual camera configured in the sample environment space, the number of light sources of the scene light source, etc., and the specific content of the scene configuration information is not limited here.

[0117] For easier understanding, please also refer to Figure 5 , Figure 5 This is a schematic diagram of a scenario configuration provided by an embodiment of the present application. Figure 1 .like Figure 5As shown, interface 501 is an exemplary configuration interface associated with the rendering engine. Assuming that the virtual object 501a is the target virtual object mentioned above, and the environment space 501b where the virtual object 501a is located is the sample environment space mentioned above, the virtual space where the virtual object 501a is located can be further enriched through interface 501 (i.e., the scene configuration is performed for the environment space 501b). It can be understood that the interface 501 may include a first area (such as area 501c on the interface 501) for displaying a target virtual object (such as virtual object 501a) and a sample environment space (such as environment space 501b where virtual object 501a is located), so that the user can observe the corresponding effects in real time during the scene configuration process; in addition, the interface 501 may also include a second area for scene configuration (such as area 501d on the interface 501), and the second area may include one or more business controls for scene configuration, so the second area may generally be a toolbar area on the interface 501, wherein the second area may include a light source adding control, which can be used to configure a scene light source with a lighting position and a lighting intensity in the environment space 501b; the light source adding control may be a business control directly displayed in the second area, or the light source adding control may also be a hidden control in a control hidden list associated with a business control in the second area, and the embodiments of the present application do not limit this. For example, in one embodiment, assuming that the light source adding control is a hidden control in a control hidden list, then as Figure 5 As shown, the terminal device can respond to a trigger operation (such as a click operation) for a scene adding control 501e in area 501d, and output a control hidden list 501f associated with the scene adding control 501e on the interface 501, wherein the control hidden list 501f may include one or more controls for adding related objects (such as light sources, shapes, etc.) in the sample environment space, which may include a light source adding control; further, in response to an adding operation (such as a click operation) for a light source adding control in the second area (such as control 501g located in the control hidden list 501f), a scene light source for adding to the sample environment space can be output on the first area, and a third area for adjusting parameters of the scene light source can be output on the configuration interface. For example, in response to the adding operation for control 501g, a light source option list 501h can be further output on the interface 501, and the light source option list 501h can include light source confirmation controls corresponding to a plurality of light source types (such as directional light source, point light source, spot light source, rectangular light source, etc.), and in response to the confirmation operation of one of the light source confirmation controls, the light source having the light source type corresponding to the light source confirmation control can be used as the scene light source. For another example, optionally, control 501g (i.e., light source adding control) can be directly displayed in area 501d, and can be directly triggered at this time.

[0118] Taking the addition of a spotlight source as an example, in response to a confirmation operation (such as a click operation) on the light source confirmation control 501i corresponding to the spotlight source, a spotlight source (such as spotlight source 1, i.e., the light source 502a shown in the interface 502) for adding to the environment space 501b (i.e., the sample environment space) can be output on the area 501c (i.e., the first area) of the interface 502 (i.e., the configuration interface) as a scene light source. At the same time, an area 502b (i.e., the third area) for adjusting parameters of the light source 502a can be output on the interface 502, including but not limited to adjustments and configurations of the light source position, rotation angle, scaling, light intensity, whether it affects the scene, whether it casts shadows, and other aspects of the light source 502a.

[0119] Among them, the terminal device can determine the illumination position of the scene light source in response to the position adjustment operation for the scene light source in the first area, and the illumination position of the scene light source can be determined by its light source position and rotation angle. For example, as shown in interface 502, area 501c can include a position adjustment control (such as control 502c) and a rotation adjustment control (such as control 502d) associated with the position adjustment operation, wherein the position adjustment control can be used to configure the light source position of the scene light source in the sample environment space, and the rotation adjustment control can be used to configure the rotation angle of the scene light source in the sample environment space. Based on this, the terminal device can respond to the trigger operation (such as a click operation) for the position adjustment control, and display a position adjustment mark (such as mark 502e) at the display position where the light source 502a is located. For example, a three-dimensional coordinate system icon can be used as a position adjustment mark, and the specific content of the position adjustment mark is not limited here; it can be understood that the position adjustment mark here can be used to indicate that the current light source 502a is in the position adjustment mode; and then the light source 502a can be moved to the specified light source position in response to the adjustment operation (such as a drag operation) for the position adjustment mark. Similarly, the terminal device can respond to a trigger operation (such as a click operation) on the rotation adjustment control and display a rotation adjustment mark at the display position of the light source 502a. For example, a fan icon can be used as the rotation adjustment mark. The specific content of the rotation adjustment mark is not limited here. It can be understood that the rotation adjustment mark here can be used to indicate that the current light source 502a is in the rotation adjustment mode; and then, in response to an adjustment operation (such as a rotation operation) on the rotation adjustment mark, the light source 502a can be adjusted to a specified rotation angle.

[0120] In addition, the terminal device may determine the illumination intensity of the scene light source in response to the intensity adjustment operation on the editable text box in the third area; finally, the scene light source with the above illumination position and illumination intensity may be added to the sample environment space. Figure 5As shown in the interface 502, area 502b (i.e., the third area) may include a text box 502f (i.e., an editable text box). The terminal device may respond to an editing operation on the text box 502f, display the intensity value input through the editing operation in the text box 502f, and may configure the light intensity of the light source 502a based on the input intensity value.

[0121] It is understandable that after adding a scene light source to the sample environment space, it is necessary to further configure the light and shadow state of the scene light source in the sample environment space (such as whether the scene light source has an impact in the sample environment space, whether it will cast a shadow, etc.) in order to simulate different lighting conditions and generate the shadows or reflections required for the training sample data set. Specifically, when the light and shadow state of the scene light source in the sample environment space is configured to be enabled, the target virtual object in the action video data can be illuminated based on the lighting information in the aforementioned scene configuration information (including lighting position, lighting intensity, and reflection intensity), thereby generating object image information (including shadows, reflections, etc.) of the target virtual object; further, the action video data containing the object image information of the target virtual object can be used as the video data to be rendered of the target virtual object in the sample environment space.

[0122] The light and shadow state of the scene light source in the sample environment space includes two parts, namely, whether the scene light source has an impact in the sample environment space (it can be understood as whether the scene light source has an impact on the entire sample environment space and whether it contributes to global illumination. If it has an impact, a reflection effect may appear on the virtual objects or objects in the sample environment space), and whether the scene light source casts a shadow on the virtual objects or objects in the sample environment space (it can be understood as whether the virtual objects or objects in the sample environment space will have a shadow or not). Only when the scene light source has an impact in the sample environment space and casts a shadow, the corresponding light and shadow state is enabled. For ease of understanding, please refer to the above again. Figure 5 ,like Figure 5As shown, the third area (such as area 502b) may include a light source impact control (such as control 502g) and a shadow projection control (such as control 502i). The terminal device may highlight the light source impact control in the third area in response to the enabling operation of the light source impact control, indicating that the scene light source will have an impact in the sample environment space and contribute to the global illumination, that is, the light source impact control is similar to the switch of the scene light source in the sample environment space; the embodiment of the present application does not limit the method of highlighting, for example, the corresponding quick configuration mark (also referred to as the first quick configuration mark) may be displayed near the light source impact control, or the light source impact control may be enlarged, or the light source impact control may be displayed in a specific position (for example, at the very front of the third area), etc. As shown in interface 502, an exemplary method of using a quick configuration identifier (such as identifier 502h) to highlight a light source affecting control (such as control 502g) is shown. In addition to the identifier style adopted by identifier 502h (i.e., a check mark “√”), the first quick configuration identifier can also adopt different identifier styles such as solid dots, small circles, switches, rectangles, triangles, and highlighted area colors. In actual products, a suitable identifier style can be selected according to product needs. In addition, highlighting can also be achieved by enlarging the light source affecting control, and the embodiment of the present application does not limit the method of highlighting.

[0123] Similarly, in response to the enabling operation for the shadow projection control, the terminal device can highlight the shadow projection control on the third area, indicating whether the scene light source will cast a shadow on the virtual object or object in the sample environment space; the embodiment of the present application does not limit the way of highlighting, for example, the corresponding quick configuration mark (also referred to as the second quick configuration mark) can be displayed near the shadow projection control, or the shadow projection control can be enlarged, or the shadow projection control can be displayed in a specific position (for example, displayed at the front of the third area). As shown in interface 502, an exemplary method of using a quick configuration mark (such as mark 502j) to highlight the light source influence control (such as control 502i) is shown. In addition to the mark style (i.e., tick "√") adopted by mark 502j, the second quick configuration mark can also adopt different mark styles such as solid dots, small circles, switches, rectangles, triangles, and highlight area colors. In actual products, appropriate mark styles can be selected according to product needs. In addition, the shadow projection control can also be magnified to achieve highlighting, and the embodiment of the present application does not limit the way of highlighting.

[0124] It can be understood that when both the light source impact control (such as control 502g) and the shadow casting control (such as control 502i) are highlighted, the light and shadow state of the scene light source in the sample environment space is configured to be enabled. Figure 5 As shown in the interface 502, when both the control 502g and the control 502i are highlighted, it means that the light and shadow state of the light source 502a in the environment space 501b is enabled. Then, after the virtual object 501a is illuminated based on the relevant 1 illumination information, the object image information of the virtual object 501a (such as the shadow 502k of the virtual object 501a) can be generated, so that the subsequently generated training sample data set can make up for the scenes where the current public data set lacks shadows and reflections, thereby improving the robustness of the object segmentation model in real scenes.

[0125] In addition, optionally, when a new scene light source is added in the sample environment space, the corresponding light source impact controls and shadow casting controls may be highlighted by default, or may not be highlighted, which is not limited here.

[0126] It can be understood that the specific operation method of configuring scene building materials and scene background images with reflective intensity in the sample environment space is similar to the operation method of configuring the scene light source described above. For example, see Figure 6 , Figure 6 This is a schematic diagram of a scenario configuration provided by an embodiment of the present application. Figure 2 .like Figure 6 As shown, interface 601 is an exemplary configuration interface associated with the rendering engine. Assuming that virtual object 601a is the target virtual object, and environment space 601b where virtual object 601a is located is the sample environment space, the environment space 601b can be further enriched through interface 601, such as configuring a scene background image in environment space 601b. Figure 5 According to the description in the corresponding embodiment, the interface 601 may include a first area (such as area 601c on the interface 601) for displaying a target virtual object (such as virtual object 601a) and a sample environment space (such as environment space 601b where virtual object 601a is located); in addition, the interface 601 may also include a second area (such as area 601d on the interface 601) for scene configuration, wherein the second area may include a plane configuration control that can be used to configure a scene background image in the environment space 601b; the plane configuration control may be a business control directly displayed in the second area, or the plane configuration control may also be a hidden control in a control hidden list associated with a business control in the second area, which is not limited in the embodiments of the present application. For example, Figure 6As shown, the terminal device can respond to a trigger operation (such as a click operation) on a target business control in area 601d, and output a control hidden list 601e associated with the target business control on the interface 601, and the control hidden list 601e can include an object placement control (such as control 601f); further, in response to a trigger operation on the object placement control, a geometric object option list 601g can be further output on the interface 601, and the geometric object option list 601g can include geometric confirmation controls corresponding to a variety of geometric object types (such as cubes, spheres, cylinders, planes, etc.), and in response to a confirmation operation on the geometric confirmation control 601h, the scene plane (Plane) corresponding to the geometric confirmation control 601h can be added to the sample environment space, and then in response to a background adding operation on the scene plane, the required scene background image can be added to the scene plane and displayed in the first area (such as area 601c), for example, as shown in FIG. Figure 6 As shown in the interface 602 in , the image 602a can be added to the environment space 601b as a scene background image.

[0127] It can be understood that the operations involved in all embodiments of the present application (such as the above-mentioned light source configuration operation, building material configuration operation, background configuration operation, etc.) may include but are not limited to gesture operations, voice signal input operations, etc.; wherein, gesture operations may include but are not limited to: single-click operations, double-click operations (such as clicking the same position in the interface twice in a short time (such as 3 seconds)), long press operations (such as performing continuous pressing operations on any position in the interface), sliding operations (such as fast sliding operations in different directions, sliding operations in preset shapes (such as sliding tracks of "S" shape or "L line", etc.), drag operations, etc.; voice signal input operations may refer to the operation of collecting voice signals in the physical environment for indicating the display of a certain interface through the microphone of the terminal device. The specific form of the trigger operation is not limited here.

[0128] It should be noted that "display" and "output" in all embodiments of the present application can be expressed as a jump switch of the interface, or it can be expressed as opening up a new area in the current interface, such as creating a pop-up window, or displaying a hidden area in the current interface, etc., and there is no limitation here.

[0129] It should be noted that the interfaces and controls shown in all the embodiments of this application are merely some forms of expression for reference. In actual business scenarios, developers can make relevant designs based on product requirements. This application does not limit the specific forms of the interfaces and controls involved.

[0130] In addition, in addition to supporting the manual configuration method described above, the rendering engine can also support automatic configuration methods. For example, the rendering engine can run specified business scripts (such as Python scripts) to achieve automatic configuration of scene light sources, scene building materials, scene background images and other content. For example, taking the automatic configuration of scene light sources as an example, the rendering engine can automatically add M1 spotlights and M2 rectangular light sources in the sample environment space, where M1 and M2 are both positive integers, and the lighting position range and lighting intensity range of each scene light source can be specified in the relevant business script. The rendering engine can then obtain the lighting position range of the spotlight from the business script, and randomly generate lighting positions corresponding to the M1 spotlights within the lighting position range. Similarly, the rendering engine can obtain the lighting intensity range of the spotlight (e.g., 100000d-250000cd) from the business script, and randomly generate lighting intensities corresponding to the M1 spotlights within the lighting intensity range. Similarly, the rendering engine can obtain the lighting position range of the rectangular light source from the business script, and randomly generate lighting positions corresponding to the M2 rectangular light sources within the lighting position range. Similarly, the rendering engine can obtain the lighting intensity range of the rectangular light source (e.g., 4000cd-16000cd) from the business script, and randomly generate lighting intensities corresponding to the M2 rectangular light sources within the lighting intensity range.

[0131] Step S103, in the sample environment space, rendering the video data to be rendered and the scene background image in the scene configuration information is performed by a rendering engine to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image;

[0132] It can be understood that the embodiments of the present application can generate images under different backgrounds, different virtual objects, and different shadow and reflection conditions by adjusting the corresponding rendering parameters, and can use the layered rendering function in the rendering engine to obtain accurate cutouts corresponding to target virtual objects in different environments. In particular, training sample data sets under shadow and reflection conditions can be generated in batches, so that the trained object segmentation model has better robustness in this case.

[0133] Specifically, in the sample environment space, the terminal device can render the above-obtained video data to be rendered and the scene background image in the scene configuration information through a rendering engine, so as to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image. It can be understood that when the video data to be rendered and the scene background image are rendered, the spatial content in the entire sample environment space (including the imported video data to be rendered, the scene background image, and the scene building materials (optional) added to the sample environment space, such as the floor) is pre-configured, so the target virtual object and other content in the sample environment space (such as the scene background image, the floor and other scene building materials) are separated. For the convenience of distinction, the embodiment of the present application can divide the spatial content in the sample environment space into two main parts, that is, the target virtual object contained in the video data to be rendered is called the foreground content, and the content in the sample environment space other than the target virtual object (including the scene background image, the scene building materials, etc.) is called the background content. Based on this, the embodiment of the present application can first render the background content separately to obtain the sample background image of the scene background image in the sample environment space. Specifically, the object state of the target virtual object in the sample environment space can be configured as a hidden state through the rendering engine (such as configured through the movie rendering queue (Movie Render Queue) in the UE). That is to say, the rendering engine can first hide the target virtual object (i.e., hide the foreground content) when rendering the background content separately. At this time, the object image information of the target virtual object will also be hidden accordingly to obtain pure background content, and then the background content can be rendered to obtain the sample background image of the scene background image in the sample environment space. At this time, the sample background image only contains the information of the background content and does not contain the target virtual object. It can be understood that the sample background image is not the same image as the aforementioned scene background image, because the sample background image also contains some other content configured in the sample environment space (such as scene building materials such as floors). In addition, the number of sample background images obtained by rendering the same background content can be one frame, which can save the data volume of the training sample data set while meeting the training requirements.

[0134] Furthermore, the embodiment of the present application can obtain a sample object image of the target virtual object in the sample environment space and sample video data associated with the target virtual object and the sample background image through the layered rendering function in the rendering engine. In some embodiments (such as when the rendering engine is UE), layered rendering can be achieved by configuring stencil layers (Stencil Layers, which can be referred to as Layer), that is, custom content with an Alpha channel (also called a transparency channel) can be output through the stencil layer. Specifically, the object state of the target virtual object in the sample environment space can be changed from the aforementioned hidden state to the display state through the rendering engine, and the complete spatial content can be displayed in the sample environment space at this time; further, in order to realize layered rendering, the embodiment of the present application can set two template layers through the rendering engine, namely the first template layer and the second template layer, and the content that needs to be layered rendered can be added to different template layers respectively, for example, the target virtual object can be added to the first template layer (such as myLayer1), and all the spatial content in the sample environment space (that is, the video data to be rendered containing the target virtual object and its object image information, as well as the remaining scene background images, scene building materials and other background content) is added to the second template layer (such as myLayer2), which is equivalent to extracting the target virtual object separately through different template layers; then, the content in the first template layer and the content in the second template layer can be rendered respectively through the rendering engine to obtain corresponding sequence frames (for example, the movie rendering queue in the UE can be specified to only output the content contained in the template layer). For example, by rendering the target virtual object in the first template layer through the rendering engine, the first sequence of frames corresponding to the target virtual object can be obtained (with an Alpha channel), and then the obtained first sequence of frames is used as the sample object image of the target virtual object in the sample environment space. It can be understood that the sample object image can contain some details associated with the sample environment space, such as the reflection generated by the clothing of the target virtual object when it is affected by the scene light source. In addition, as mentioned above, it can be seen that the target virtual object is driven by an action data file containing multiple frames of action data, so the number of sample object images finally rendered is also multiple frames, and one frame of sample object image can describe the action of the target virtual object at a certain moment. Similarly, by rendering all spatial contents in the second template layer through the rendering engine, the second sequence of frames corresponding to the spatial content can be obtained, and then the obtained second sequence of frames is used as the sample video data associated with the target virtual object and the sample background image. It can be understood that the number of second sequence frames contained in the sample video data is the same as the number of sample object images, so each frame of sample object image can be used as the object cutout data of the second sequence frame at the corresponding moment.

[0135] For example, see also Figure 7 , Figure 7Schematic diagram of image data generated by a rendering engine provided in an embodiment of the present application. Figure 7 As shown, image 701 may be an exemplary frame (i.e., the second sequence frame) in the sample video data. It can be seen that the rendered synthesized image 701 may have the corresponding background, characters (i.e., virtual object 701a) and shadows (such as shadow 701b of virtual object 701a), while image 702 may be an exemplary sample object image (i.e., the first sequence frame), that is, the accurate cutout separated by the rendering engine. It can be seen that the obtained image 702 does not contain the aforementioned shadow 701b.

[0136] From the above, we can see that layered rendering through the rendering engine can accurately extract the contour of the target virtual object without being affected by the shadow of the sole of the foot, etc., and does not require manual clipping as in the traditional method. Therefore, a highly accurate ground truth (i.e., the true value) can be efficiently obtained to supervise the object segmentation model. At the same time, when the edge contour of the clipping is known to be accurate, a large number of data sets with shadows or reflections can be synthesized, so that the object segmentation model can learn the ability to correct errors in situations with shadows or reflections.

[0137] In some embodiments, the resolution of the sample video data synthesized by the above method can be 720p*1280p, and the playback speed can be 30fps; and the sample background image and sample video data in the same sample environment space can belong to the same comprehensive video data, and the first frame in the comprehensive video data can be the sample background image (i.e., the target virtual object is hidden when rendering the first frame in the comprehensive video data), and the subsequent frames are sample video data (i.e., the target virtual object is displayed when rendering subsequent frames other than the first frame in the comprehensive video data). In addition, the sample background image, the sample object image, and the images in the sample video data can all be represented in a specified picture format, such as RGBA (i.e., Red, Green, Blue, Alpha, representing red channel, green channel, blue channel, and transparency channel, respectively) picture format.

[0138] It should be noted that before the rendering engine performs layered rendering, the camera position of the virtual camera needs to be configured so that images of various perspectives (such as sample video data of various perspectives and corresponding sample object images) can be rendered. The embodiment of the present application does not limit the camera position of the virtual camera.

[0139] Step S104, using the sample background image, the sample object image and the sample video data as a training sample data set for training an initial object segmentation model, iteratively training the initial object segmentation model through the training sample data set to obtain a target object segmentation model for performing image processing on target video data of a target object located in a target environment space.

[0140] It can be understood that the embodiments of the present application can use the sample background images, sample object images and sample video data obtained above as training sample data sets for training the initial object segmentation model. The total amount of data in the training sample data set is not limited here. For example, in some embodiments, the training sample data set can provide a large number of training samples (such as 440,000 frames) with a resolution of about 448*448. The initial object segmentation model can then be iteratively trained using the training sample data set to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space. Specifically, the terminal device can input the sample background image and sample video data into the initial object segmentation model, and extract the predicted object image of the target virtual object in the sample environment space from the sample video data through the initial object segmentation model. Among them, the embodiment of the present application does not limit the network structure of the initial object segmentation model. For example, in one embodiment, the initial object segmentation model may include an initial encoder and an initial decoder; based on this, the sample background image and the sample frame image in the sample video data can be spliced ​​to obtain a sample spliced ​​image; then the sample spliced ​​image can be input into the initial encoder in the initial object segmentation model, and the sample spliced ​​image is extracted by the initial encoder to obtain the sample image feature of the sample spliced ​​image; then the sample image feature can be input into the initial decoder, and when the initial decoder obtains the sample mask associated with the target virtual object through the sample image feature, a sample mask is generated based on the sample mask and the sample image feature; further, based on the sample mask, the predicted object image of the target virtual object in the sample environment space can be extracted from the sample frame image included in the sample video data. Subsequently, the network parameters in the initial object segmentation model can be adjusted based on the predicted object image and the sample object image to obtain a target object segmentation model for image processing of the target video data of the target object located in the target environment space. Among them, a loss function can be generated based on the predicted object image and the sample object image, and then the network parameters in the initial object segmentation model can be adjusted through the loss function to obtain the target object segmentation model. The specific process of image processing the target video data through the target object segmentation model can be found in the subsequent Figure 8 The description in the corresponding embodiment.

[0141] As can be seen from the above, the embodiments of the present application can efficiently generate a large number of training sample data sets with object image information such as shadows or reflections based on the rendering engine and virtual objects, thereby improving the efficiency of obtaining the required training sample data sets and reducing the cost of obtaining the training sample data sets. In addition, the object segmentation model (i.e., the target object segmentation model) trained by the training sample data set can learn the ability to correct errors in situations with shadows or reflections, etc., and reduce the problem of reduced segmentation accuracy of the object segmentation model due to the introduction of shadows or reflections after an object enters the scene, resulting in a difference from the starting background, thereby improving the robustness of the object segmentation model, and further improving the accuracy of object segmentation when performing image processing through the object segmentation model.

[0142] See also Figure 8 , Figure 8 This is a flow diagram of a data processing method provided in an embodiment of the present application. Figure 2 It is understood that the method provided in the embodiment of the present application can be executed by a computer device, where the computer device can be a terminal device or a service server, and the computer device runs a target object segmentation model. Figure 3 The computer devices using the rendering engine in the corresponding embodiments may be the same or different, and this is not limited here. For ease of understanding, the present application embodiment takes the computer device as an example of a terminal device to illustrate the specific process of image processing of target video data by using the target object segmentation model in the terminal device. Figure 8 As shown, the method may at least include the following steps S201-S202:

[0143] Step S201, when target video data of a target object located in a target environment space is acquired, a target object segmentation model for performing image processing on the target video data is acquired;

[0144] It is understandable that the terminal device can obtain the target video data of the target object located in the target environment space, where the target object can be either a virtual object or a real object, and accordingly, the target environment space can be a virtual environment or a real environment, and the target video data can be from the Internet or locally, which is not limited here. In addition, a target object segmentation model for image processing of the target video data can be further obtained. It is understandable that when the target object segmentation model is trained by the terminal device, the terminal device can directly load and use the target object segmentation model; when the target object segmentation model is trained by other devices different from the terminal device, the terminal device can obtain the target video data from other devices.

[0145] Among them, the target object segmentation model is obtained by iteratively training the initial object segmentation model through the training sample data set; the training sample data set is obtained after the rendering engine renders the video data to be rendered and the scene background image in the scene configuration information configured by the rendering engine in the sample environment space; the training sample data set includes the sample background image of the scene background image in the sample environment space, the sample object image of the target virtual object in the sample environment space, and the sample video data associated with the target virtual object and the sample background image; the rendering engine is used to record the action video data containing the target virtual object when driving the target virtual object through the action data file associated with the target virtual object; the video data to be rendered refers to the object image information of the target virtual object in the action video data generated by the lighting information in the scene configuration information, and the action video data containing the object image information of the target virtual object. The specific implementation process here can be found in the above Figure 3 The corresponding embodiments will not be described in detail here.

[0146] Step S202: input the target video data into a target object segmentation model, and extract a target object image of the target object in the target environment space from the target video data through the target object segmentation model.

[0147] It can be understood that the terminal device can input the target video data into the target object segmentation model, and extract the target object image of the target object in the target environment space from the target video data through the target object segmentation model. Since the impact of different shadows or reflection conditions on the segmentation results is taken into account during model training, the target object segmentation model has good robustness. Accordingly, the target object image extracted by the target object segmentation model will not extract the shadow, reflection, etc. of the target object, thereby improving the accuracy of object segmentation.

[0148] In one embodiment, the target object segmentation model includes a target encoder and a target decoder, wherein the target encoder can extract the corresponding features through the convolution layer and become a variable suitable for machine understanding. The whole process can be abstracted as the process of encoding the picture; and the decoding process of the target decoder is to convert the high-dimensional features into the meaning that humans can understand. Specifically, the terminal device can first obtain the target background image corresponding to the target environment space and the video frame image associated with the target object and the target background image from the target video data, that is, the target video data can be composed of the target background image without the target object and the video frame image with the target object. Therefore, in some embodiments, the unmanned background (i.e., the target background image) can be shot at the same location by the same device (such as a mobile phone), and then a video (i.e., a video frame image) after the target object enters at the same location can be shot to obtain the target video data. Further, the target background image and the video frame image are spliced ​​to obtain the image to be processed, wherein image splicing (i.e., concatenate) specifically refers to the merging of the corresponding channel numbers of the target background image and the video frame image, that is, the number of features (channels) describing the image itself is increased, and the information under each feature is not increased. The image to be processed can then be input into a target encoder, and features of the image to be processed can be extracted through the target encoder to obtain image features of the image to be processed; the image features can then be input into a target decoder, and when the target decoder obtains a prediction mask associated with the target object through the image features, a foreground mask can be generated based on the prediction mask and the image features; further, based on the foreground mask, a target object image of the target object in the target environment space can be extracted from the video frame image contained in the target video data.

[0149] Among them, the foreground mask (alpha matte), also known as foreground transparency or transparency mask, is the result of foreground-background separation and is a grayscale image. The grayscale value of each pixel represents the degree to which each pixel of the original image (i.e., the above-mentioned video frame image) belongs to the foreground object. White represents that a certain pixel is definitely in the foreground, and black represents that a certain pixel is definitely in the background.

[0150] For easier understanding, please also refer to Fig. 9 , Fig. 9 Schematic diagram of a scene of object segmentation provided by an embodiment of the present application. Fig. 9As shown, the target object segmentation model can be composed of an encoder and two decoders, wherein encoder 90A can be used as the above-mentioned target encoder, and decoder 90B and decoder 90C can be used as the aforementioned target decoders. In an embodiment of the present application, encoder 90A can use a deep neural network as an infrastructure to extract features of a picture, and the specific network structure of encoder 90A is not limited here. For example, the input image 901 can be used as the aforementioned target background image, and image 902 is associated with image 901 and object 902a (i.e., the target object), and can be used as the aforementioned video frame image. Then encoder 90A can extract features from the image to be processed obtained after image splicing of image 901 and image 902, thereby obtaining corresponding image features 903. In addition, decoder 90B can be specifically a semantic segmentation decoder, and decoder 90C can be specifically an object segmentation decoder. Decoder 90B can predict a rough mask 904 through image features 903 extracted by encoder 90A as a prediction mask associated with object 902a. The use of a semantic segmentation decoder can enhance the network's acquisition of semantic information about the target object to enhance the robustness of the model. The mask 904 and the corresponding features in the image features 903 can then be concatenated together to each layer of decoder 90C. At the same time, the image features 903 are also input into the decoder after the pooling operation. In the encoder 90C, the decoder 90C can generate a corresponding mask 905 as a foreground mask according to the mask 904 and the image feature 903, and then the mask 905 can be applied to the aforementioned image 902, and finally a refined cutout result can be output as an image 906 (i.e., the target object image). By comparing the image 902 and the image 906, it can be seen that in the case of shadows in the image (such as the shadow of the sole of the object 902a in the image 902), the target object segmentation model trained by the training sample data set provided in the embodiment of the present application can achieve object segmentation with high accuracy.

[0151] Among them, in training Fig. 9 When the object segmentation model shown in the figure is used, the encoder 90A and the decoder 90B can be first trained as a semantic segmentation model, and then the network parameters of the encoder 90A can be fixed, and the decoder 90C can be trained with the segmentation features extracted from the encoder 90A. That is, when performing model training, the encoder 90A and the decoder 90B can be trained first, and then the decoder 90C can be trained to finally obtain the desired target object segmentation model. It can be understood that the embodiment of the present application can also support having different Fig. 9 The object segmentation model of the network structure shown is not listed here one by one.

[0152] It is understandable that the object segmentation model trained by the training sample data set provided by the embodiment of the present application can be applied to any business scenario with object segmentation requirements, such as games, video production, image editing, instant messaging, etc. For ease of understanding, the game scenario is used as an example for explanation. Fig.10 , Fig.10 Schematic diagram of a game scene based on object segmentation provided by an embodiment of the present application. In the game scene, the trained object segmentation model can be arbitrarily embedded in a somatosensory game (or other game) that requires game user character cutouts, such as Fig.10 As shown, the somatosensory game needs to replace the real background collected by the acquisition device associated with the terminal device held by the game user with the virtual background in the game, so as to achieve a better immersive experience. Therefore, the terminal device held by the game user first needs to use the associated acquisition device (such as the camera 102a installed on the terminal device) to shoot the unmanned background to obtain image 101a (i.e., the target background image in the above target video data), and then shoot a video of a person (i.e., the above target object) entering the same position to obtain video data 102a (i.e., the video frame image in the above target video data). Furthermore, the trained object segmentation model 102b (i.e., the above target object segmentation model) can be used to obtain an accurate cutout of the human body (i.e., the above target object image) from the video data 102a, as shown in image 103a. At the same time, the object segmentation model can also be inferred together with the human joint point detection model to realize the subsequent game logic judgment. For example, the object segmentation model 102b can be used to perform object segmentation first, and the range of the target object in the image can be determined. Then, the image 103a obtained by the object segmentation is processed by the human joint point detection model to detect the joint points of the character, which is conducive to the detection of the human joint points. Further, when necessary, the joint point data (such as joint point coordinate information) output by the human joint point detection model can be used to drive the virtual image specified in the game. It can be seen that object segmentation (or cutout) can be used as an intermediate process to assist the prediction of joint points and improve the accuracy of joint point detection.

[0153] As can be seen from the above, the embodiments of the present application can efficiently generate a large number of training sample data sets with object image information such as shadows or reflections based on the rendering engine and virtual objects, thereby improving the efficiency of obtaining the required training sample data sets and reducing the cost of obtaining the training sample data sets. In addition, the object segmentation model trained by the training sample data set can learn the ability to correct errors in situations with shadows or reflections, etc., and reduce the problem of reduced segmentation accuracy of the object segmentation model due to the introduction of shadows or reflections after an object enters the scene, resulting in a difference from the starting background, thereby improving the robustness of the object segmentation model, and further improving the accuracy of object segmentation when performing image processing through the object segmentation model.

[0154] See also Fig.11 , is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application Figure 1 .like Fig.11 As shown, the data processing device 1 may be a computer program (including program code) running on a computer device, for example, the data processing device 1 is an application software; the device may be used to execute the corresponding steps in the data processing method provided in the embodiment of the present application. Fig.11 As shown, the data processing device 1 may include: an object driving module 11, an image generating module 12, an image rendering module 13, a model training module 14, an object generating module 15, and a posture estimating module 16;

[0155] The object driving module 11 is used to import the action data file into the rendering engine when the action data file for driving the target virtual object is obtained, and when the rendering engine drives the target virtual object through the action data file, the action video data containing the target virtual object is recorded;

[0156] The object driving module 11 may include: a position determining unit 111 and a posture adjusting unit 112;

[0157] A position determination unit 111, configured to determine key point position information of a target virtual object based on the action data carried in the action data file;

[0158] The posture adjustment unit 112 is used to record action video data containing the target virtual object through a virtual camera configured by the rendering engine when the rendering engine adjusts the posture of the target virtual object through the key point position information.

[0159] The specific functional implementation of the position determination unit 111 and the posture adjustment unit 112 can be found in the above Figure 3 The step S101 in the corresponding embodiment will not be described in detail here.

[0160] An image generation module 12 is used to obtain scene configuration information configured by a rendering engine, generate object image information of a target virtual object in the action video data through illumination information in the scene configuration information, and use the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space;

[0161] The image generation module 12 may include: a light source configuration unit 121, a building material configuration unit 122, a background configuration unit 123, an information determination unit 124, and a lighting processing unit 125;

[0162] A light source configuration unit 121, configured to configure a scene light source having a lighting position and a lighting intensity in the sample environment space in response to a light source configuration operation for the sample environment space where the target virtual object is located, in response to the light source configuration operation for the sample environment space where the target virtual object is located, when outputting the action video data on the configuration interface associated with the rendering engine;

[0163] The configuration interface includes a first area for displaying the target virtual object and the sample environment space and a second area for performing scene configuration; the second area includes a light source adding control;

[0164] The light source configuration unit 121 is specifically used to output a scene light source for adding to the sample environment space in the first area in response to an adding operation for adding a control for the light source in the second area, and output a third area for adjusting parameters of the scene light source on the configuration interface; determine the illumination position of the scene light source in response to a position adjustment operation for the scene light source in the first area; determine the illumination intensity of the scene light source in response to an intensity adjustment operation for an editable text box in the third area; and add the scene light source with the illumination position and illumination intensity to the sample environment space;

[0165] A building material configuration unit 122, configured to configure scene building materials with reflective intensity in the sample environment space in response to a building material configuration operation for the sample environment space;

[0166] A background configuration unit 123, configured to configure a scene background image in the sample environment space in response to a background configuration operation for the sample environment space;

[0167] An information determining unit 124, configured to use the illumination position, illumination intensity, and reflection intensity as illumination information, and determine scene configuration information based on the illumination information and the scene background image;

[0168] The lighting processing unit 125 is used to perform lighting processing on the target virtual object in the action video data based on the lighting information in the scene configuration information when the light and shadow state of the scene light source in the sample environment space is configured to be enabled, and generate object image information of the target virtual object; and use the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space.

[0169] The specific functional implementation of the light source configuration unit 121, the building material configuration unit 122, the background configuration unit 123, the information determination unit 124, and the illumination processing unit 125 can be referred to above. Figure 3 The step S102 in the corresponding embodiment will not be described in detail here.

[0170] An image rendering module 13 is used to render the scene background image in the scene configuration information and the video data to be rendered in the sample environment space through a rendering engine to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image;

[0171] The model training module 14 is used to use the sample background image, the sample object image and the sample video data as the training sample data set for training the initial object segmentation model, and iteratively train the initial object segmentation model through the training sample data set to obtain the target object segmentation model for image processing of the target video data of the target object located in the target environment space.

[0172] The model training module 14 may include: an object segmentation unit 141 and a parameter adjustment unit 142;

[0173] The object segmentation unit 141 is used to input the sample background image and the sample video data into the initial object segmentation model, and extract the predicted object image of the target virtual object in the sample environment space from the sample video data through the initial object segmentation model;

[0174] The parameter adjustment unit 142 is used to adjust the network parameters in the initial object segmentation model based on the predicted object image and the sample object image to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space.

[0175] The specific functional implementation of the object segmentation unit 141 and the parameter adjustment unit 142 can be found in the above Figure 3 Step S104 in the corresponding embodiment will not be described in detail here.

[0176] The object generation module 15 is used to import the initial virtual object into the rendering engine when obtaining the initial virtual object provided by the virtual object generator associated with the rendering engine, so that the rendering engine generates a target virtual object corresponding to the initial virtual object.

[0177] The object generation module 15 may include: an asset loading unit 151 and an asset mapping unit 152;

[0178] An asset loading unit 151 is used to load the virtual wearable asset of the initial virtual object through the rendering engine when the initial virtual object is imported into the rendering engine;

[0179] The asset mapping unit 152 is used to perform asset reorganization mapping on the virtual wearable assets of the initial virtual object in the rendering engine to obtain a target virtual object corresponding to the initial virtual object.

[0180] The number of initial virtual objects is M, one initial virtual object corresponds to a group of virtual wearable assets, and a group of virtual wearable assets includes one or more virtual wearable objects; M is a positive integer; the M initial virtual objects include the i-th initial virtual object, and i is a positive integer less than or equal to M;

[0181] The asset mapping unit 152 may include: a size matching subunit 1521, an asset reorganization subunit 1522, and an asset replacement subunit 1523;

[0182] The size matching subunit 1521 is used to obtain the wearing size of the i-th initial virtual object in the rendering engine, and use the virtual wearing object matching the wearing size in the M groups of virtual wearing assets as the matching wearing asset;

[0183] The asset reorganization subunit 1522 is used to obtain the asset type of the matching wearable asset, perform asset reorganization on the virtual wearable object in the matching wearable asset based on the asset type of the matching wearable asset, and perform attribute transformation on the matching wearable asset after asset reorganization to obtain N groups of reorganized wearable assets; N is a positive integer greater than 1;

[0184] The asset replacement subunit 1523 is used to replace the virtual wearable assets of the i-th initial virtual object based on the N groups of reorganized wearable assets to obtain a target virtual object corresponding to the i-th initial virtual object.

[0185] The specific functional implementation of the size matching subunit 1521, the asset reorganization subunit 1522, and the asset replacement subunit 1523 can be found in the above Figure 3 The step S101 in the corresponding embodiment will not be described in detail here.

[0186] The specific functional implementation of the asset loading unit 151 and the asset mapping unit 152 can be found in the above Figure 3 The step S101 in the corresponding embodiment will not be described in detail here.

[0187] The posture estimation module 16 is used to obtain a posture estimation model associated with the original video data when the original video data containing the action object is obtained; the original video data is input into the posture estimation model, and the posture of the action object in the original video data is estimated by the posture estimation model to obtain the action data of the action object; based on the action data of the action object, a motion data file for driving the target virtual object is generated.

[0188] The specific functional implementation of the object driving module 11, the image generation module 12, the image rendering module 13, the model training module 14, the object generation module 15, and the posture estimation module 16 can be found in the above Figure 3 Steps S101 to S104 in the corresponding embodiment will not be described in detail here. In addition, the description of the beneficial effects of the same method will not be described in detail.

[0189] See also Fig.12 , is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application Figure 2 .like Fig.12 As shown, the data processing device 2 may be a computer program (including program code) running on a computer device, for example, the data processing device 2 is an application software; the device may be used to execute the corresponding steps in the data processing method provided in the embodiment of the present application. Fig.12 As shown, the data processing device 2 may include: a model acquisition module 21, an object segmentation module 22;

[0190] The model acquisition module 21 is used to acquire a target object segmentation model for image processing of the target video data when the target video data of the target object located in the target environment space is acquired; the target object segmentation model is obtained by iteratively training the initial object segmentation model through the training sample data set; the training sample data set is obtained by rendering the video data to be rendered and the scene background image in the scene configuration information configured by the rendering engine in the sample environment space through the rendering engine; the training sample data set includes the sample background image of the scene background image in the sample environment space, the sample object image of the target virtual object in the sample environment space, and the sample video data associated with the target virtual object and the sample background image; the rendering engine is used to record and obtain the action video data containing the target virtual object when driving the target virtual object through the action data file associated with the target virtual object; the video data to be rendered refers to the object image information of the target virtual object in the action video data generated by the lighting information in the scene configuration information, and the action video data containing the object image information of the target virtual object;

[0191] The object segmentation module 22 is used to input the target video data into the target object segmentation model, and extract the target object image of the target object in the target environment space from the target video data through the target object segmentation model.

[0192] Among them, the target object segmentation model includes a target encoder and a target decoder;

[0193] The object segmentation module 22 may include: an image stitching unit 221, a feature extraction unit 222, a mask generation unit 223, and an object extraction unit 224;

[0194] An image stitching unit 221 is used to obtain a target background image corresponding to a target environment space and a video frame image associated with a target object and the target background image from the target video data, and stitch the target background image and the video frame image to obtain an image to be processed;

[0195] A feature extraction unit 222 is used to input the image to be processed into a target encoder, and perform feature extraction on the image to be processed through the target encoder to obtain image features of the image to be processed;

[0196] The mask generation unit 223 is used to input the image features to the target decoder, and when the target decoder obtains the prediction mask associated with the target object through the image features, generate a foreground mask based on the prediction mask and the image features;

[0197] The object extraction unit 224 is used to extract a target object image of the target object in the target environment space from the video frame image included in the target video data based on the foreground mask.

[0198] The specific functional implementation of the image stitching unit 221, the feature extraction unit 222, the mask generation unit 223, and the object extraction unit 224 can be found in the above Figure 8 Step S202 in the corresponding embodiment will not be described in detail here.

[0199] The specific functional implementation of the model acquisition module 21 and the object segmentation module 22 can be found in the above Figure 8 Steps S201 and S202 in the corresponding embodiment will not be described in detail here. In addition, the description of the beneficial effects of the same method will not be described in detail.

[0200] See also Fig.13 , is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.13 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Fig.13 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0201] In such Fig.13 In the computer device 1000 shown in the figure, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to execute the above Figure 3 , Figure 8 The description of the data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here.

[0202] In addition, it should be pointed out that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 and the data processing device 2 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 3 , Figure 8 The description of the data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0203] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0204] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above Figure 3 , Figure 8 Any method provided by the corresponding embodiment. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0205] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0206] 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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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.

[0207] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, characterized in that: include: When an action data file for driving a target virtual object is obtained, the action data file is imported into a rendering engine, and when the rendering engine drives the target virtual object through the action data file, action video data containing the target virtual object is recorded; Acquire scene configuration information configured by the rendering engine, generate object image information of the target virtual object in the action video data through illumination information in the scene configuration information, and use the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space; In the sample environment space, the rendering engine performs rendering processing on the video data to be rendered and the scene background image in the scene configuration information to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; The sample background image, the sample object image and the sample video data are used as a training sample data set for training an initial object segmentation model. The initial object segmentation model is iteratively trained using the training sample data set to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space.

2. The method according to claim 1, characterized in that Also includes: When an initial virtual object provided by a virtual object generator associated with the rendering engine is acquired, the initial virtual object is imported into the rendering engine, and the rendering engine generates a target virtual object corresponding to the initial virtual object.

3. The method according to claim 2, characterized in that The step of importing the initial virtual object into the rendering engine, and generating a target virtual object corresponding to the initial virtual object by the rendering engine, comprises: When the initial virtual object is imported into the rendering engine, a virtual wearable asset of the initial virtual object is loaded through the rendering engine; In the rendering engine, asset reorganization mapping is performed on the virtual wearable assets of the initial virtual object to obtain a target virtual object corresponding to the initial virtual object.

4. The method according to claim 3, characterized in that The number of the initial virtual objects is M, one initial virtual object corresponds to a group of virtual wearable assets, and a group of virtual wearable assets includes one or more virtual wearable objects; M is a positive integer; The M initial virtual objects include the i-th initial virtual object, where i is a positive integer less than or equal to M; In the rendering engine, asset reorganization mapping is performed on the virtual wearable assets of the initial virtual object to obtain a target virtual object corresponding to the initial virtual object, including: In the rendering engine, the wearing size of the i-th initial virtual object is obtained, and the virtual wearing object matching the wearing size in the M groups of virtual wearing assets is used as a matching wearing asset; Acquire the asset type of the matching wearable asset, reorganize the virtual wearable object in the matching wearable asset based on the asset type of the matching wearable asset, and transform the attributes of the matching wearable asset after the asset reorganization to obtain N groups of reorganized wearable assets; N is a positive integer greater than 1; The virtual wearable assets of the i-th initial virtual object are replaced based on the N groups of reorganized wearable assets to obtain a target virtual object corresponding to the i-th initial virtual object.

5. The method according to claim 1, characterized in that Also includes: When original video data containing an action object is obtained, a posture estimation model associated with the original video data is obtained; The original video data is input into the posture estimation model, the posture of the action object in the original video data is estimated by the posture estimation model to obtain the action data of the action object, and based on the action data of the action object, an action data file for driving the target virtual object is generated.

6. The method according to claim 1, characterized in that When the rendering engine drives the target virtual object through the action data file, recording and obtaining action video data containing the target virtual object includes: Determining key point position information of the target virtual object based on the action data carried in the action data file; When the rendering engine adjusts the posture of the target virtual object through the key point position information, the action video data containing the target virtual object is recorded through the virtual camera configured by the rendering engine.

7. The method according to claim 1, characterized in that The obtaining of scene configuration information configured by the rendering engine includes: When outputting the action video data on a configuration interface associated with the rendering engine, on the configuration interface, in response to a light source configuration operation for a sample environment space where the target virtual object is located, a scene light source having a lighting position and a lighting intensity is configured in the sample environment space; In response to a building material configuration operation for the sample environment space, configuring scene building materials with reflective intensity in the sample environment space; In response to a background configuration operation for the sample environment space, configuring a scene background image in the sample environment space; The lighting position, the lighting intensity and the reflected light intensity are used as lighting information, and scene configuration information is determined based on the lighting information and the scene background image.

8. The method according to claim 7, characterized in that The configuration interface includes a first area for displaying the target virtual object and the sample environment space and a second area for performing scene configuration; the second area includes a light source adding control; The step of configuring a scene light source having a lighting position and a lighting intensity in the sample environment space in response to a light source configuration operation for the sample environment space where the target virtual object is located comprises: In response to an adding operation for adding a control for the light source in the second area, outputting a scene light source for adding to the sample environment space on the first area, and outputting a third area for adjusting parameters of the scene light source on the configuration interface; In response to a position adjustment operation on the scene light source in the first area, determining an illumination position of the scene light source; In response to an intensity adjustment operation on the editable text box in the third area, determining the illumination intensity of the scene light source; A scene light source having the light position and the light intensity is added in the sample environment space.

9. The method according to claim 7, characterized in that: The step of generating object image information of the target virtual object in the action video data by using the illumination information in the scene configuration information, and using the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space, comprises: When the light and shadow state of the scene light source in the sample environment space is configured to be an enabled state, based on the illumination information in the scene configuration information, illumination processing is performed on the target virtual object in the action video data to generate object image information of the target virtual object; The action video data containing the object image information of the target virtual object is used as the video data to be rendered of the target virtual object in the sample environment space.

10. The method according to claim 1, characterized in that The iterative training of the initial object segmentation model by the training sample data set to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space includes: Inputting the sample background image and the sample video data into the initial object segmentation model, and extracting the predicted object image of the target virtual object in the sample environment space from the sample video data through the initial object segmentation model; Based on the predicted object image and the sample object image, the network parameters in the initial object segmentation model are adjusted to obtain a target object segmentation model for performing image processing on target video data of a target object located in a target environment space.

11. A data processing method, characterized in that: include: When target video data of a target object located in a target environment space is obtained, a target object segmentation model for performing image processing on the target video data is obtained; the target object segmentation model is obtained by iteratively training an initial object segmentation model through a training sample data set; the training sample data set is obtained in a sample environment space after a rendering engine performs rendering processing on the video data to be rendered and a scene background image in scene configuration information configured by the rendering engine; the training sample data set includes a sample background image of the scene background image in the sample environment space, a sample object image of a target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; The rendering engine is used to record and obtain action video data containing the target virtual object when driving the target virtual object through the action data file associated with the target virtual object; the video data to be rendered refers to the action video data containing the object image information of the target virtual object in the action video data generated by the lighting information in the scene configuration information; The target video data is input into the target object segmentation model, and a target object image of the target object in the target environment space is extracted from the target video data through the target object segmentation model.

12. The method according to claim 11, characterized in that The target object segmentation model includes a target encoder and a target decoder; The step of inputting the target video data into the target object segmentation model, and extracting a target object image of the target object in the target environment space from the target video data through the target object segmentation model, comprises: Acquire a target background image corresponding to the target environment space and a video frame image associated with the target object and the target background image from the target video data, and perform image stitching on the target background image and the video frame image to obtain an image to be processed; Inputting the image to be processed into the target encoder, performing feature extraction on the image to be processed by the target encoder to obtain image features of the image to be processed; Inputting the image feature to the target decoder, and when the target decoder obtains a prediction mask associated with the target object through the image feature, generating a foreground mask based on the prediction mask and the image feature; Based on the foreground mask, a target object image of the target object in the target environment space is extracted from the video frame image included in the target video data.

13. A data processing device, characterized in that: include: An object driving module, configured to import an action data file for driving a target virtual object into a rendering engine when an action data file for driving the target virtual object is obtained, and to record action video data containing the target virtual object when the rendering engine drives the target virtual object through the action data file; An image generation module, used to obtain scene configuration information configured by the rendering engine, generate object image information of the target virtual object in the action video data through the illumination information in the scene configuration information, and use the action video data containing the object image information of the target virtual object as the video data to be rendered of the target virtual object in the sample environment space; An image rendering module is used to render the video data to be rendered and the scene background image in the scene configuration information in the sample environment space through the rendering engine to obtain a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; A model training module is used to use the sample background image, the sample object image and the sample video data as a training sample data set for training an initial object segmentation model, and iteratively train the initial object segmentation model through the training sample data set to obtain a target object segmentation model for image processing of target video data of a target object located in a target environment space.

14. A data processing device, characterized in that: include: A model acquisition module is used to acquire a target object segmentation model for image processing of the target video data when target video data of the target object located in the target environment space is acquired; the target object segmentation model is obtained by iteratively training the initial object segmentation model through a training sample data set; the training sample data set is obtained after rendering the video data to be rendered and the scene background image in the scene configuration information configured by the rendering engine through a rendering engine in the sample environment space; the training sample data set includes a sample background image of the scene background image in the sample environment space, a sample object image of the target virtual object in the sample environment space, and sample video data associated with the target virtual object and the sample background image; The rendering engine is used to record and obtain action video data containing the target virtual object when driving the target virtual object through the action data file associated with the target virtual object; the video data to be rendered refers to the action video data containing the object image information of the target virtual object in the action video data generated by the lighting information in the scene configuration information; The object segmentation module is used to input the target video data into the target object segmentation model, and extract the target object image of the target object in the target environment space from the target video data through the target object segmentation model.

15. A computer device, characterized in that: include: Processor and memory; The processor is connected to the memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 12.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 12.

17. A computer program product, characterized in that The computer program product comprises computer instructions, which are stored in a computer-readable storage medium. The computer instructions are suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Image processing system for virtual reality

    CN121392098A