Data processing method and device, electronic equipment and storage medium
By using 3D object tracking equipment and special effects editor for automatic parsing and format conversion, a simplified virtual try-on experience is achieved. Users only need to import resource files and drag them to nodes, and the special effects editor will automatically render the try-on image, solving the problem of complexity in existing virtual try-on technologies.
Patent Information
- Application Number
- CN202111044347.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-07
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2041-09-07
AI Technical Summary
The existing virtual try-on function is complex to implement and difficult for users to operate.
The system acquires the 3D model resource file of the wearable object through a 3D object tracking device, and uses a special effects editor to automatically parse and convert the format to generate a suitable target file. Users only need to drag and drop the file to the preset node, and the special effects editor will automatically add rendering components to realize the virtual try-on of the wearable object.
It simplifies user operations and improves the convenience and efficiency of virtual try-on, allowing users to quickly create virtual try-on effects for physical items around them.
Smart Images

Figure CN115775310B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the continuous development of augmented reality technology, users can use electronic devices, such as applications on terminals, to achieve a virtual try-on effect. For example, they can try on shoes, clothes, jewelry, etc., allowing them to select products they like without leaving home.
[0003] However, the implementation of the virtual try-on function is currently quite complex. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this disclosure provide a data processing method, apparatus, electronic device, and storage medium that enable virtual try-on for the subject.
[0005] In a first aspect, embodiments of this disclosure provide a data processing method applied to a special effects editor, the method comprising:
[0006] In response to the import operation of the resource file of the try-on object, the resource file is processed to obtain a target file whose file format is adapted to the special effects editor;
[0007] In response to the operation of dragging and dropping the target file to a preset node in the effects editor, a rendering component is added to the preset node;
[0008] The rendering component renders a try-on image of the model of the subject being dressed on a preset part of the model.
[0009] Secondly, embodiments of this disclosure also provide a data processing apparatus, the apparatus comprising:
[0010] The processing module is used to respond to the import operation of the resource file of the try-on object, process the resource file, and obtain the target file whose file format is adapted to the special effects editor;
[0011] The first adding module is used to add a rendering component to the preset node in response to the operation of dragging and dropping the target file to the preset node of the special effects editor;
[0012] The rendering module is used to render a try-on image of the model of the try-on object being worn on a preset part of the model based on the rendering component.
[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method as described above.
[0017] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the data processing method described above.
[0018] The technical solution provided in this disclosure has at least the following advantages compared with the prior art:
[0019] The data processing method provided in this embodiment responds to the import operation of the resource file of the try-on object, processes the resource file to obtain a target file whose file format is adapted to the special effects editor; responds to the operation of dragging and dropping the target file to a preset node of the special effects editor, adds a rendering component to the preset node; and renders a try-on image of the model of the try-on object being worn on a preset part of the model based on the rendering component. That is, the user only needs to import the resource file of the try-on object into the special effects editor, and the special effects editor will automatically parse and convert the resource file to obtain a target file adapted to the special effects editor. Then, the user drags and drops the target file to a preset node of the special effects editor, and the special effects editor automatically adds a rendering component to the preset node and renders a try-on image of the model of the try-on object being worn on a preset part of the model, realizing virtual try-on of the try-on object and simplifying the user operation. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0021] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present disclosure;
[0022] Figure 2 This is one method of processing resource files in this embodiment of the disclosure;
[0023] Figure 3 This is a schematic diagram of a left foot node and a right foot node in an embodiment of this disclosure;
[0024] Figure 4 This is a schematic diagram illustrating a virtual try-on effect in an embodiment of this disclosure;
[0025] Figure 5 This is a schematic diagram of the structure of a data processing device according to an embodiment of the present disclosure;
[0026] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0029] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0032] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0033] Figure 1This is a flowchart illustrating a data processing method according to an embodiment of the present disclosure. The method can be executed by a data processing device, which can be implemented in software and / or hardware. This device can be configured in an electronic device, such as a display terminal, specifically including but not limited to smartphones, PDAs, tablets, portable wearable devices, smart home devices (e.g., table lamps), and other electronic devices with a display screen.
[0034] like Figure 1 As shown, the method may specifically include the following steps:
[0035] Step 110: In response to the import operation of the resource file of the try-on object, process the resource file to obtain a target file whose file format is adapted to the special effects editor.
[0036] The resource file for the trial wear object is a 3D format file obtained by tracking the physical object using a 3D object tracking device. The 3D object tracking device refers to a device that runs a 3D object tracking algorithm. 3D object tracking algorithms are commonly used in computer vision and are widely applied in fields such as video surveillance, human-computer interaction, and autonomous driving.
[0037] The resource files for the try-on object refer to the files that store the 3D model of the try-on object. By obtaining the 3D model and related resources (such as texture resources) of the try-on object based on a 3D object tracking algorithm, the efficiency of obtaining the 3D model is improved, the difficulty of obtaining the 3D model is reduced, and the manpower cost of modeling is saved.
[0038] Taking shoes as an example, a 3D object tracking device is used to track the left and right shoes separately to obtain 3D resource files for the left and right shoe models. These 3D resource files are typically USDZ files. USDZ is a file format used for augmented reality on the iOS platform, serving 3D information. The USDZ file itself acts as a container, containing a large number of tools needed for a computer to open and correctly display its content. In other words, the USDZ file is the resource foundation for 3D rendering. Besides the 3D shoe model, the resource files for the left and right shoes also include texture resources. Textures, a computer graphics term, refer to the texture resources used when rendering 3D models. With textures, patterns, color schemes, and other designs can be drawn on the 3D model, and the texture and bumps in the details of the 3D model can be simulated. In summary, the user uses a 3D Object Tracking device to collect left and right shoe USDZ files containing shoe models, textures, and other resources.
[0039] After obtaining the USDZ file, users simply need to import it into the effects editor. When the effects editor detects the import, it automatically parses and converts the file format to match the editor's target file. A USDZ file can be considered a compressed file containing multiple resources. Decompression reveals texture and model resources, allowing for the extraction of detailed resources. The model resources have their own defined data structures. iOS supports opening and exporting USDZ files as OBJ files, and third-party executables support exporting them as FBX files. For common model file formats (e.g., OBJ, FBX), an official file parsing library is provided. Therefore, the library's interface can be used to parse model files of specified formats, extracting detailed data such as vertex positions, texture coordinates, and normals. This extracted data can then be used to construct new data structures to match model resource objects for different engines. When a user imports the resource file of the object to be tried on into the effects editor, the effects editor can determine its file format based on the file extension. Then, it uses the interface provided by the corresponding file parsing library to parse the file and extract detailed model data. For example, the effects editor can integrate third-party USDZ and FBX parsing libraries. When the user imports a USDZ file, the effects editor first converts it to an FBX file using the USDZ parsing library, and then parses the FBX file using the FBX parsing library to extract detailed model data. Based on this extracted data, a data structure adapted to the effects editor is constructed. The final result is a model file and texture file adapted to the effects editor. Throughout this process, the user only needs to import the resource file; they do not need to participate in file parsing or format conversion, thus simplifying the user experience.
[0040] In general, the processing of the resource file to obtain a target file with a file format adapted to the effects editor includes:
[0041] The resource file is converted to a first format using a first preset file parsing program table interface, resulting in a resource file in the first format. This involves converting a USDZ file to an FBX file using a USDZ parsing library. The first format resource file is then parsed using a second preset file parsing program table interface to obtain at least two key points of the resource objects included in the first format resource file. This involves extracting model detail data from the FBX file using an FBX parsing library. Based on these at least two key points, a target file with a file format adapted to the effects editor is generated. The target file includes a texture sub-file and a model sub-file of the try-on object.
[0042] Correspondingly, see reference as follows Figure 2 This diagram illustrates a process of processing resource files to obtain target files with file formats adapted to the effects editor. The user imports a USDZ file. The effects editor uses the USDZ parsing library `usdzparser` to convert the USDZ file into an FBX file (i.e., a model file) and a PNG file (texture file). Using the FBX parsing library `fbxparser`, it extracts detailed model data from the FBX file and constructs a local model structure (mesh) adapted to the effects editor. Using the PNG parsing library `pngreader`, it converts resources in the PNG file into local resource textures adapted to the effects editor. A mesh is a common structure in 3D models. The surface of a 3D model is typically composed of multiple interconnected triangular faces, each consisting of three nodes and three edges. Therefore, a 3D model can be understood as being composed of nodes and edges; the set of nodes and edges that constitute a 3D model is the mesh.
[0043] Step 120: In response to the operation of dragging and dropping the target file to a preset node of the effects editor, add a rendering component to the preset node.
[0044] For example, in response to the operation of dragging and dropping the target file to a preset node in the effects editor, adding a rendering component to the preset node includes:
[0045] The set rendering component is loaded into the preset node, and the model sub-file is passed into the rendering component to establish a reference relationship between the rendering component and the model sub-file; a preset material resource file sub-node is created, and a reference relationship between the preset material resource file and the rendering component is established; in response to the operation of dragging and dropping the texture sub-file to the preset material resource file sub-node, a reference relationship between the texture sub-file and the preset material resource file is established.
[0046] The rendering component requires two resources: a model resource (the model sub-file) and a material resource (the preset material resource file). When the user drags the target file to a preset node in the effects editor, the effects editor automatically adds a rendering component to the preset node and passes the model sub-file to the rendering component as a reference resource. Simultaneously, a preset material resource file sub-node is created. The user then needs to drag and drop texture sub-files to this sub-node to establish a reference relationship between the texture sub-files and the preset material resource file. The rendering effect of the 3D model is determined by the material resource referenced by the rendering component. The effects editor provides PBR materials, meaning the preset material resource can be a PBR material. PBR materials can be configured to create various physical effects such as metal spheres, textiles, and wood products, including the texture of shoes.
[0047] Step 130: Render a try-on image of the model of the try-on object wearing the model on a preset part based on the rendering component.
[0048] Taking shoes as an example to illustrate the above process, the user uses a 3D Object Tracking device to acquire USDZ files of the left and right shoes, containing shoe models, textures, and other resources. The user imports the USDZ files of the left and right shoes into the effects editor. The effects editor processes the left shoe's USDZ file to obtain the target file for the left shoe, and processes the right shoe's USDZ file to obtain the target file for the right shoe. Then, the user drags the target file of the left shoe to the left foot node in the effects editor, and drags the target file of the right shoe to the right foot node in the effects editor. The effects editor adds rendering components to the left and right foot nodes respectively, and creates a rendering group for the left foot node. The system establishes a reference relationship between the rendering component of the right foot node and the model sub-file of the left foot node, and a reference relationship between the rendering component of the right foot node and the model sub-file of the right foot node. Simultaneously, it creates PBR material resources for both the left and right foot nodes. The user then drags and drops the texture sub-file of the left foot node to the corresponding PBR material resource location to establish a reference relationship between the PBR material resource and the texture sub-file of the left foot node; similarly, the user drags and drops the texture sub-file of the right foot node to the corresponding PBR material resource location to establish a reference relationship between the PBR material resource and the texture sub-file of the right foot node. For example, see... Figure 3 The diagram shows a left foot node and a right foot node, including a left foot node 310, a left foot model 311, a right foot node 320, and a right foot model 321. In summary, users only need to drag and drop the corresponding resource file of the shoe to the corresponding node to see a virtual try-on image of the shoe. This is convenient for users and allows them to quickly create a virtual try-on effect of nearby physical shoes, with low operational difficulty.
[0049] In some implementations, the data processing method further includes: in response to dragging the target file to a preset node of the effects editor, adding a pose component to the preset node and establishing a reference relationship between the pose component and a preset foot detection algorithm, so that the foot position and posture determined based on the preset foot detection algorithm are transmitted to the pose component; wherein, the preset foot detection algorithm is used to determine the real-time position and posture of the foot based on video frames; the pose component is used to provide the rendering position during rendering. For example, if the fitting area is no longer a fixed foot model, but a user's foot captured in real time by a camera, then the pose component needs to provide the rendering position of the 3D shoe model according to the preset foot detection algorithm.
[0050] In some implementations, to achieve a more realistic virtual try-on effect and improve the fit between the shoe model and the foot model, it is necessary to align the coordinate origins of the shoe model and the foot model. Specifically, the step of rendering a try-on image of the model of the try-on object on a preset part of the model based on the rendering component includes: correcting the coordinate origin of the shoe model based on the coordinate origin applied by the preset foot detection algorithm to adjust the fit between the shoe model and the foot model. Specifically, a cuboid outline that can surround the shoe 3D model can be determined based on thousands of vertex data of the shoe 3D model. Based on the ratio between the cuboid outline of the shoe 3D model and the cuboid outline of the foot model, the scaling factor that the shoe 3D model should be determined is determined. At the same time, based on the offset of the cuboid outline of the shoe 3D model relative to the coordinate origin, the position that the shoe 3D model should be corrected is determined, and this position is provided to the pose component to render a 3D model of the shoe that fits the size of the foot model, thereby improving the fit between the shoe 3D model and the foot model.
[0051] In some implementations, to achieve a more realistic virtual try-on effect, the effects editor integrates a calf model to provide occlusion relationships during rendering, making the virtual try-on effect more realistic. Specifically, in response to the operation of dragging and dropping the target file to a preset node in the effects editor, a calf model is added to the preset node, and the calf model is used to provide occlusion relationships during rendering. For example, refer to... Figure 4 The diagram shows a virtual try-on effect, which includes the effect of calves being covered by a calf model, making the virtual try-on effect more realistic.
[0052] In some implementations, to enable virtual try-on functionality on the client side, the method further includes: generating a try-on effect file package based on the preset node. The try-on effect file package includes at least one of the following: a shoe texture sub-file, a shoe model sub-file, a material resource file, a calf model, a rendering component, a pose component, and reference relationships between the rendering component and each of the aforementioned files. For example, the material resource file references the texture sub-file, the rendering component references the model sub-file and the material resource file, and the pose component references a foot detection algorithm, etc.; uploading the try-on effect file package to the server allows the server and client to cooperate to implement the virtual try-on functionality on the client side based on the try-on effect file package. Specifically, during virtual try-on on the client side, the pose component acquires the user's foot position and posture in real time, and the rendering component renders the 3D model of the shoe based on the user's foot position and posture.
[0053] The data processing method provided in this embodiment allows users to simply import the resource file of the try-on object into the effects editor. The effects editor will automatically parse and convert the resource file to obtain a target file that is compatible with the effects editor. Then, the user drags and drops the target file to a preset node in the effects editor. The effects editor will automatically add a rendering component to the preset node and render a try-on image of the model of the try-on object being worn on a preset part of the model, thus realizing virtual try-on of the try-on object and simplifying user operation.
[0054] Figure 5 This is a schematic diagram of the structure of a data processing device according to an embodiment of this disclosure. Figure 5 As shown, the data processing device specifically includes: a processing module 510, a first adding module 520, and a rendering module 530.
[0055] The processing module 510 is used to process the resource file in response to the import operation of the resource file of the try-on object to obtain a target file whose file format is adapted to the special effects editor; the first adding module 520 is used to add a rendering component to the preset node in response to the operation of dragging and dropping the target file to the preset node of the special effects editor; the rendering module 530 is used to render a try-on image of the model of the try-on object wearing the model of the try-on object on the preset part of the model based on the rendering component.
[0056] Optionally, the resource file of the fitting object is a three-dimensional file obtained by tracking the physical body of the fitting object using a three-dimensional object tracking device.
[0057] Optionally, the processing module 510 includes: a conversion unit, configured to convert the format of the resource file into a first format based on a first preset file parsing program table interface to obtain a resource file of the first format; a parsing unit, configured to parse the resource file of the first format based on a second preset file parsing program table interface to obtain at least two key points of the resource objects included in the resource file of the first format; and a generation unit, configured to generate a target file whose file format is adapted to the special effects editor based on the at least two key points, wherein the target file includes a texture sub-file and a model sub-file of the try-on object.
[0058] Optionally, the first adding module 520 includes: a loading unit, used to load a set rendering component into the preset node and pass the model sub-file into the rendering component to establish a reference relationship between the rendering component and the model sub-file; a creation unit, used to create a preset material resource file sub-node and establish a reference relationship between the preset material resource file and the rendering component; and a creation unit, used to establish a reference relationship between the texture sub-file and the preset material resource file in response to the operation of dragging and dropping the texture sub-file into the preset material resource file sub-node.
[0059] Optionally, the fitting object includes shoes, the model of the fitting object includes a left shoe model and a right shoe model, the preset part model includes a left foot model and a right foot model; the resource file includes a left foot resource file and a right foot resource file, and the target file includes a left foot target file and a right foot target file.
[0060] Optionally, the first adding module 520 is specifically used to: add a rendering component to the left foot node in response to the operation of dragging the target file of the left foot to the left foot node of the special effects editor; and add a rendering component to the right foot node in response to the operation of dragging the target file of the right foot to the right foot node of the special effects editor.
[0061] Optionally, the device further includes: a second adding module, configured to add a pose component to the preset node in response to an operation of dragging and dropping the target file to a preset node of the effects editor, and establish a reference relationship between the pose component and a preset foot detection algorithm, so that the foot position and pose determined based on the preset foot detection algorithm are transmitted to the pose component; wherein, the preset foot detection algorithm is used to determine the foot position and pose based on video frames; and the pose component is used to provide a rendering position during rendering.
[0062] Optionally, the rendering module 530 is specifically used to: correct the coordinate origin of the shoe model based on the coordinate origin of the preset foot detection algorithm, so as to improve the fit between the shoe model and the foot model.
[0063] Optionally, the device further includes a third adding module, configured to add a calf model to the preset node in response to an operation of dragging the target file to a preset node of the effects editor, the calf model being used to provide occlusion relationships during rendering.
[0064] Optionally, the device further includes: a generation module, used to generate a try-on effect file package based on the preset node, the try-on effect file package including at least one of the following: a shoe texture sub-file, a shoe model sub-file, a material resource file, a calf model, a rendering component, a pose component, and the reference relationship between the rendering component and each of the files; and an upload module, used to upload the try-on effect file package to the server, so that the server and the client cooperate to realize the virtual try-on function on the client based on the try-on effect file package.
[0065] The data processing apparatus provided in this embodiment allows users to simply import the resource file of the try-on object into the effects editor. The effects editor will automatically parse and convert the resource file to obtain a target file adapted to the effects editor. Then, the user can drag and drop the target file to a preset node in the effects editor. The effects editor will automatically add a rendering component to the preset node and render a try-on image of the model of the try-on object being worn on a preset part of the model, thus realizing virtual try-on of the try-on object and simplifying user operation.
[0066] The data processing apparatus provided in this disclosure embodiment can execute the steps in the data processing method provided in this disclosure method embodiment, and has the execution steps and beneficial effects, which will not be repeated here.
[0067] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device 600 in the embodiments of this disclosure. The electronic device 600 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0068] like Figure 6As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes to implement the methods of embodiments as described in this disclosure, based on a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of electronic device 600. The processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0069] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0070] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the methods as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0071] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0072] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0073] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0074] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
[0075] In response to the import operation of the resource file of the try-on object, the resource file is processed to obtain a target file whose file format is adapted to the special effects editor; in response to the operation of dragging and dropping the target file to a preset node of the special effects editor, a rendering component is added to the preset node; and a try-on image of the model of the try-on object being worn on a preset part of the model is rendered based on the rendering component.
[0076] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0077] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0078] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0079] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0080] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0081] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0082] According to one or more embodiments of this disclosure, this disclosure provides a data processing method, including: in response to an import operation of a resource file of a try-on object, processing the resource file to obtain a target file whose file format is adapted to the special effects editor; in response to an operation of dragging and dropping the target file to a preset node of the special effects editor, adding a rendering component to the preset node; and rendering a try-on image of the model of the try-on object being worn on a preset part of the model based on the rendering component.
[0083] According to one or more embodiments of this disclosure, in the data processing method provided in this disclosure, optionally, the resource file of the try-on object is a three-dimensional format file obtained by tracking the physical body of the try-on object based on a three-dimensional object tracking device.
[0084] According to one or more embodiments of this disclosure, in the data processing method provided in this disclosure, optionally, processing the resource file to obtain a target file whose file format is adapted to the special effects editor includes: converting the format of the resource file to a first format based on a first preset file parsing program table interface to obtain a resource file of the first format; parsing the resource file of the first format based on a second preset file parsing program table interface to obtain at least two key points of the resource objects included in the resource file of the first format; and generating a target file whose file format is adapted to the special effects editor based on the at least two key points, wherein the target file includes a texture sub-file and a model sub-file of the try-on object.
[0085] According to one or more embodiments of this disclosure, in the data processing method provided in this disclosure, optionally, the step of adding a rendering component to the preset node in response to the operation of dragging the target file to a preset node of the effects editor includes: loading the set rendering component to the preset node and passing the model sub-file to the rendering component to establish a reference relationship between the rendering component and the model sub-file; creating a preset material resource file sub-node and establishing a reference relationship between the preset material resource file and the rendering component; and establishing a reference relationship between the texture sub-file and the preset material resource file in response to the operation of dragging the texture sub-file to the preset material resource file sub-node.
[0086] According to one or more embodiments of this disclosure, in the data processing method provided in this disclosure, optionally, the try-on object includes shoes, the model of the try-on object includes a left shoe model and a right shoe model, the preset part model includes a left foot model and a right foot model; the resource file includes a left foot resource file and a right foot resource file, and the target file includes a left foot target file and a right foot target file.
[0087] According to one or more embodiments of this disclosure, in the data processing method provided in this disclosure, optionally, adding a rendering component to the preset node in response to the operation of dragging the target file to the preset node of the special effects editor includes: adding a rendering component to the left foot node in response to the operation of dragging the target file of the left foot to the left foot node of the special effects editor; and adding a rendering component to the right foot node in response to the operation of dragging the target file of the right foot to the right foot node of the special effects editor.
[0088] According to one or more embodiments of this disclosure, the data processing method provided in this disclosure may optionally further include: in response to the operation of dragging and dropping the target file to a preset node of the effects editor, adding a pose component to the preset node, and establishing a reference relationship between the pose component and a preset foot detection algorithm, so that the foot position and pose determined based on the preset foot detection algorithm are transmitted to the pose component; wherein, the preset foot detection algorithm is used to determine the foot position and pose based on video frames; and the pose component is used to provide a rendering position during rendering.
[0089] According to one or more embodiments of this disclosure, in the data processing method provided in this disclosure, optionally, the step of rendering a try-on image of the model of the try-on object being worn on a preset part of the model based on the rendering component includes: correcting the coordinate origin of the shoe model based on the coordinate origin applied by the preset foot detection algorithm, so as to improve the fit between the shoe model and the foot model.
[0090] According to one or more embodiments of this disclosure, the data processing method provided in this disclosure may optionally further include: in response to the operation of dragging the target file to a preset node of the special effects editor, adding a calf model to the preset node, the calf model being used to provide occlusion relationships during rendering.
[0091] According to one or more embodiments of this disclosure, the data processing method provided in this disclosure may optionally further include: generating a try-on effect file package based on the preset node, wherein the try-on effect file package includes at least one of the following: a texture sub-file of the shoe, a model sub-file of the shoe, a material resource file, a calf model, a rendering component, a pose component, and a reference relationship between the rendering component and each of the files; uploading the try-on effect file package to a server, so that the server and the client cooperate to implement a virtual try-on function on the client based on the try-on effect file package.
[0092] According to one or more embodiments of this disclosure, this disclosure provides a data processing apparatus, including: a processing module, configured to process the resource file in response to an import operation of a resource file of a try-on object, to obtain a target file whose file format is adapted to the special effects editor; a first adding module, configured to add a rendering component to the preset node in response to an operation of dragging and dropping the target file to a preset node of the special effects editor; and a rendering module, configured to render a try-on image of the model of the try-on object being worn on a preset part of the model based on the rendering component.
[0093] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the resource file of the try-on object is a three-dimensional format file obtained by tracking the physical body of the try-on object based on a three-dimensional object tracking device.
[0094] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the processing module includes: a conversion unit, configured to convert the format of the resource file into a first format based on a first preset file parsing program table interface to obtain a resource file of the first format; a parsing unit, configured to parse the resource file of the first format based on a second preset file parsing program table interface to obtain at least two key points of the resource object included in the resource file of the first format; and a generation unit, configured to generate a target file whose file format is adapted to the special effects editor based on the at least two key points, the target file including a texture sub-file and a model sub-file of the try-on object.
[0095] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the first adding module includes: a loading unit, configured to load a set rendering component to the preset node and pass the model sub-file to the rendering component to establish a reference relationship between the rendering component and the model sub-file; a creating unit, configured to create a preset material resource file sub-node and establish a reference relationship between the preset material resource file and the rendering component; and an establishing unit, configured to establish a reference relationship between the texture sub-file and the preset material resource file in response to an operation of dragging and dropping the texture sub-file to the preset material resource file sub-node.
[0096] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the try-on object includes shoes, the model of the try-on object includes a left shoe model and a right shoe model, the preset part model includes a left foot model and a right foot model; the resource file includes a left foot resource file and a right foot resource file, and the target file includes a left foot target file and a right foot target file.
[0097] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the first adding module is specifically used to: add a rendering component to the left foot node in response to the operation of dragging the target file of the left foot to the left foot node of the special effects editor; and add a rendering component to the right foot node in response to the operation of dragging the target file of the right foot to the right foot node of the special effects editor.
[0098] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the apparatus further includes: a second adding module, configured to add a pose component to the preset node in response to an operation of dragging and dropping the target file to a preset node of the effects editor, and establish a reference relationship between the pose component and a preset foot detection algorithm, so that the foot position and pose determined based on the preset foot detection algorithm are transmitted to the pose component; wherein, the preset foot detection algorithm is used to determine the foot position and pose based on video frames; the pose component is used to provide a rendering position during rendering.
[0099] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the rendering module is specifically used to: correct the coordinate origin of the shoe model based on the coordinate origin of the preset foot detection algorithm, so as to improve the fit between the shoe model and the foot model.
[0100] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the apparatus further includes: a third adding module, configured to add a calf model to the preset node in response to an operation of dragging the target file to a preset node of the effects editor, the calf model being used to provide occlusion relationships during rendering.
[0101] According to one or more embodiments of this disclosure, in the data processing apparatus provided in this disclosure, optionally, the apparatus further includes: a generation module, configured to generate a try-on effect file package based on the preset node, the try-on effect file package including at least one of the following: a shoe texture sub-file, a shoe model sub-file, a material resource file, a calf model, a rendering component, a pose component, and a reference relationship between the rendering component and each of the files; and an upload module, configured to upload the try-on effect file package to a server, so that the server and the client cooperate to implement a virtual try-on function on the client based on the try-on effect file package.
[0102] According to one or more embodiments of this disclosure, this disclosure provides an electronic device, including:
[0103] One or more processors;
[0104] Memory, used to store one or more programs;
[0105] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the data processing methods provided in this disclosure.
[0106] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements a data processing method as described in any of the present disclosure.
[0107] This disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the data processing method described above.
[0108] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0109] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0110] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A data processing method, characterized in that, The method includes: In response to the import operation of the resource file of the try-on object, the resource file is processed to obtain the target file that is compatible with the special effects editor; In response to the operation of dragging and dropping the target file to a preset node in the effects editor, a rendering component is added to the preset node; Based on the rendering component and the target file, render a try-on image of the model of the try-on object wearing the model on a preset part; The step of processing the resource file to obtain a target file whose file format is adapted to the effects editor includes: The resource file is converted to a first format to obtain a resource file in the first format; The resource file of the first format is parsed to obtain at least two key points of the resource objects included in the resource file of the first format; Based on the at least two key points, a target file with a file format adapted to the special effects editor is generated. The target file includes a texture sub-file and a model sub-file of the try-on object. The step of adding a rendering component to the preset node in response to the operation of dragging and dropping the target file to the preset node of the effects editor includes: The preset rendering component is loaded into the preset node, and the model sub-file is passed into the rendering component to establish a reference relationship between the rendering component and the model sub-file; Create a child node for a preset material resource file and establish a reference relationship between the preset material resource file and the rendering component; In response to the operation of dragging and dropping the texture sub-file to the preset material resource file sub-node, a reference relationship is established between the texture sub-file and the preset material resource file.
2. The method according to claim 1, characterized in that, The resource file of the fitting object is a three-dimensional file obtained by tracking the physical body of the fitting object using a three-dimensional object tracking device.
3. The method according to claim 1, characterized in that, Based on the first preset file parsing program table interface, the format of the resource file is converted into a first format to obtain a resource file in the first format; The resource file of the first format is parsed based on the second preset file parsing program table interface to obtain at least two key points of the resource objects included in the resource file of the first format.
4. The method according to any one of claims 1-3, characterized in that, The fitting object includes shoes, and the model of the fitting object includes a left shoe model and a right shoe model. The preset part model includes a left foot model and a right foot model. The resource files include a left foot resource file and a right foot resource file, and the target files include a left foot target file and a right foot target file.
5. The method according to claim 4, characterized in that, The step of adding a rendering component to the preset node in response to the operation of dragging and dropping the target file to the preset node in the effects editor includes: In response to the operation of dragging the target file of the left foot to the left foot node of the effects editor, a rendering component is added to the left foot node; In response to the operation of dragging the target file of the right foot to the right foot node of the effects editor, a rendering component is added to the right foot node.
6. The method according to claim 4, characterized in that, Also includes: In response to the operation of dragging and dropping the target file to a preset node of the effects editor, a pose component is added to the preset node, and a reference relationship is established between the pose component and a preset foot detection algorithm, so that the foot position and pose determined based on the preset foot detection algorithm are transmitted to the pose component. The preset foot detection algorithm is used to determine the foot position and pose based on video frames; the pose component is used to provide the rendering position during rendering.
7. The method according to claim 6, characterized in that, The step of rendering a try-on image of the model of the subject being dressed on a preset part of the model based on the rendering component includes: The coordinate origin of the shoe model is corrected based on the coordinate origin of the preset foot detection algorithm to adjust the fit between the shoe model and the foot model.
8. The method according to claim 4, characterized in that, Also includes: In response to the operation of dragging and dropping the target file to a preset node in the effects editor, a calf model is added to the preset node. The calf model is used to provide occlusion relationships during rendering.
9. The method according to claim 4, characterized in that, Also includes: A try-on effect file package is generated based on the preset nodes. The try-on effect file package includes at least one of the following: a texture sub-file of the shoe, a model sub-file of the shoe, a material resource file, a calf model, a rendering component, a pose component, and the reference relationship between the rendering component and each of the files. The virtual try-on effect file package is uploaded to the server so that the server and the client can cooperate to implement the virtual try-on function on the client based on the virtual try-on effect file package.
10. A data processing apparatus, characterized in that, include: The processing module is used to respond to the import operation of the resource file of the try-on object, process the resource file, and obtain the target file that adapts the file format to the special effects editor; The first adding module is used to add a rendering component to the preset node in response to the operation of dragging and dropping the target file to the preset node of the special effects editor; The rendering module is used to render a try-on image of the model of the try-on object being worn on a preset part of the model, based on the rendering component and the target file; The processing module includes: A conversion unit is used to convert the format of the resource file into a first format to obtain a resource file in the first format; The parsing unit is used to parse the resource file of the first format and obtain at least two key points of the resource objects included in the resource file of the first format; A generation unit is used to generate a target file whose file format is adapted to the special effects editor based on the at least two key points. The target file includes a texture sub-file and a model sub-file of the try-on object. The first adding module includes: The loading unit is used to load the set rendering component into the preset node and pass the model sub-file into the rendering component to establish a reference relationship between the rendering component and the model sub-file; A creation unit is used to create a preset material resource file sub-node and establish a reference relationship between the preset material resource file and the rendering component; A creation unit is used to establish a reference relationship between the texture sub-file and the preset material resource file in response to the operation of dragging and dropping the texture sub-file to the preset material resource file sub-node.
11. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Assessing clothing style and fit using 3D models of customers
US10664903B1
Method and system of virtual footwear try-on with improved occlusion
US20200065991A1