Image rendering method, device, equipment and medium
By pre-encapsulating image processing functions into multiple nodes, users can edit and generate rendering task processing processes, which solves the problems of lack of flexibility and high complexity in traditional rendering technology and achieves flexibility and efficiency in image rendering tasks.
Patent Information
- Application Number
- CN202210956660.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-08-10
AI Technical Summary
Traditional image rendering technology requires software engineers to write code to generate rendering task processing processes, which lacks flexibility and is highly complex, making it difficult for non-professionals to operate.
By pre-packaging image processing functions into multiple image processing nodes, users can edit these nodes to generate rendering task processing processes by inputting instructions, reducing complexity and improving flexibility.
It achieves the flexibility and efficiency of image rendering task processing, allowing users to generate rendering task processing without any programming background, and is suitable for complex cloud rendering tasks.
Smart Images

Figure CN115471596B
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly to image rendering methods, devices, apparatuses, and computer-readable storage media. Background Art
[0002] Image rendering is a very important link in the field of image processing. Through rendering technology, images can have a better visual experience. Therefore, rendering technology has been widely used in recent years. In traditional rendering technology, software engineers statically generate rendering task processing procedures by writing code to process the images to be processed. Whenever the requirements change, software engineers need to rewrite or modify the code to generate a new rendering process. Therefore, in traditional rendering technology, the generation of rendering task processing procedures requires professionals with certain professional skills and the generated rendering task processing procedures lack flexibility. Summary of the invention
[0003] According to an exemplary embodiment of the present disclosure, a scheme for image rendering is provided.
[0004] In a first aspect of the present disclosure, an image rendering method is provided. The method includes obtaining an input instruction from a user for an image processing node, the image processing node being pre-packaged and associated with a given image processing function. The method also includes generating a rendering task processing process including a plurality of the image processing nodes according to the input instruction. The method further includes rendering the user's image to be processed by executing the rendering task processing process.
[0005] In a second aspect of the present disclosure, an image rendering device is provided. The device includes an input instruction acquisition module configured to obtain a user's input instruction for an image processing node, wherein the image processing node is pre-packaged and associated with a given image processing function. The device also includes a rendering task generation module configured to generate a rendering task processing process including a plurality of the image processing nodes according to the input instruction. The device further includes a rendering task execution module configured to render the user's image to be processed by executing the rendering task processing process.
[0006] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and the computer program is executed by a processor to implement the method of the first aspect.
[0008] It should be understood that the contents described in the summary of the present invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be applied;
[0011] Figure 2 A flowchart showing an image rendering process according to some embodiments of the present disclosure;
[0012] Figure 3 A schematic block diagram showing a rendering task processing process according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A flowchart showing interactions between image processing nodes according to some embodiments of the present disclosure is shown;
[0014] Figure 5 A block diagram showing an image rendering apparatus according to some embodiments of the present disclosure; and
[0015] Figure 6 A block diagram of a device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0018] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0023] The term "image" used in the present disclosure includes, but is not limited to, data in the form of pictures, videos, multimedia, etc.
[0024] As discussed in the present disclosure, in traditional rendering technology, when generating a rendering task processing process, a software engineer needs to statically generate the rendering task processing process by writing code to process the image to be processed. Specifically, for a specific image rendering process, the software engineer needs to write a rendering main program, in which the image to be processed is read, the relevant rendering algorithm and / or rendering engine is called, and the rendering result is output.
[0025] It can be seen that in traditional rendering technology, the generation of the rendering task processing process requires professional technicians with certain professional skills to complete, which makes it impossible for technicians without software programming background and users with rendering needs to generate the rendering task processing process themselves.
[0026] Furthermore, with the development of cloud rendering technology, the complexity of rendering tasks has increased, which means that complete image rendering tasks often require a combination of multiple computer vision algorithms and multiple different rendering engines. For example, for virtual live broadcast scenes, the rendering task will at least involve artificial intelligence algorithms for portrait segmentation, facial key point recognition algorithms, beauty effect processing, stylized portrait processing, and three-dimensional background rendering. Furthermore, these computer vision algorithms and rendering engines depend on each other. In other words, the next processing process requires the output of the previous processing process as input. For example, beauty effect processing requires the results of facial key point recognition as input, which undoubtedly further increases the complexity of the processing process for generating rendering tasks.
[0027] In addition, in traditional rendering technology, rendering tasks are written as rendering main programs, which results in the processing logic of rendering tasks being dependent on the code logic of the rendering main program. Generally speaking, a set of code logic can only correspond to a specific rendering task processing process, which requires rewriting or modifying the code to generate a new rendering task processing process whenever the requirements change. It can be seen that the traditional operation of generating rendering task processing processes lacks flexibility.
[0028] Therefore, it is necessary to propose an efficient and flexible image rendering method to improve the traditional image rendering process, especially to improve the traditional generation rendering task processing process.
[0029] According to some implementations of the present disclosure, an image rendering solution is provided. According to the solution of the present disclosure, the image processing functions involved in the image processing process are pre-packaged into multiple image processing nodes, and the user edits the pre-packaged image processing nodes into a rendering task processing process through instructions. In this way, the user can flexibly select and organize the image processing nodes according to the corresponding rendering tasks, thereby greatly reducing the complexity of generating the rendering task processing process and improving the flexibility of generating the rendering task processing process.
[0030] Example Environment
[0031] Figure 1A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. Environment 100 relates to an image processing environment, which includes a computing device 110. In some embodiments, computing device 110 can be a device / apparatus / module on the server side or a device / apparatus / module on the terminal side. Additionally, in some embodiments, computing device 110 is a cloud rendering system or a cloud rendering platform. Alternatively or additionally, computing device 110 is a rendering system or a local rendering platform. It should be understood that in the present disclosure, computing device 110 can be any device / apparatus / module capable of performing rendering tasks. Embodiments of the present disclosure are not limited in this respect.
[0032] like Figure 1 As shown, the computing device 110 and the node system 120 can interact with each other. Figure 1 In a specific embodiment of the present invention, the node system 120 includes L image processing nodes 125-1...125-k,...125-L, where N is an integer greater than 1, and k=1, 2,...L. For ease of discussion, the image processing nodes 125-1...125-k,...125-L may be collectively or individually referred to as image processing nodes 125.
[0033] In some implementations, computing device 110 may receive input instructions, such as Figure 1 The input instructions 130-1 ... 130-k, ... 130-M shown, where M is an integer greater than 1, k = 1, 2, ... M, generate a rendering task processing process 140. For ease of discussion, the input instructions 130-1 ... 130-k, ... 130-M may be collectively or individually referred to as input instructions 130.
[0034] In some embodiments, the input instruction 130 is an input instruction for the image processing node 125 , and the rendering task processing process 140 includes a plurality of image processing nodes 125 .
[0035] In some embodiments, the input instruction 130 may be transmitted to the computing device 110 by wired communication or wireless communication. In some example embodiments, the computing device 110 may also receive the input instruction 130 input by the user through an input device coupled to the computing device 110 (including but not limited to, for example, a mouse, a keyboard, a touch pen, a touch screen, etc.).
[0036] Furthermore, if Figure 1 As shown, the input of the rendering task processing process 140 may be an image to be processed, such as Figure 1 The images to be processed 150-1...150-k,...150-P shown in the figure, where P is an integer greater than 1, k=1, 2,...P, and the rendering result is output, such as Figure 1The rendering results 160-1 ... 160-k, ... 160-N are shown, where N is an integer greater than 1, k = 1, 2, ... N. For ease of discussion, the images to be processed 150-1 ... 150-k, ... 150-P may be collectively or individually referred to as images to be processed 150, and the rendering results 160-1 ... 160-k, ... 160-N may be collectively or individually referred to as rendering results 160.
[0037] In some example embodiments, the computing device 110 may obtain the image to be processed 150 and / or store the rendering result 160 in a database / memory located within the computing device 110 or a database / memory located outside the computing device 110. The embodiments of the present disclosure are not limited in this regard.
[0038] Furthermore, although the computing device 110 and the node system 120 are shown as independent modules, in a real image processing scenario, the computing device 110 and the node system 120 may be located in separate physical entities or in the same physical entity. The embodiments of the present disclosure are not limited in this respect.
[0039] In some embodiments, the rendering task processing 140 is associated with the rendering of a virtual object. As a specific embodiment, the user device 110 may generate a virtual character image and generate a rendering task processing 140 for the virtual character image, such as rendering the background of the virtual character, setting the face shape, hairstyle, clothing, etc. of the virtual character.
[0040] As another specific embodiment, the user device 110 may perform animation and retro processing on the virtual character. As another specific embodiment, the user device 110 renders the environment of the virtual character into different display styles such as pastoral style and retro style. As another specific embodiment, the user device 110 may add virtual props to the virtual task.
[0041] It should be understood that the above specific scenarios are only for illustrative purposes and should not be construed as limiting the scope of protection of the present disclosure.
[0042] Furthermore, it should be understood that Figure 1 Only an exemplary image processing environment is shown. The specific implementation environment may be different according to actual application needs. For example, Figure 1The number and connection relationship of the input instructions 130, image processing nodes 125, node systems 120, images to be processed 150, rendering results 160, computing devices 110, and rendering task processing procedures 140 shown in the figure are only shown for the purpose of explanation and illustration. In other embodiments, the number and connection relationship of the input instructions 130, image processing nodes 125, node systems 120, images to be processed 150, rendering results 160, computing devices 110, and rendering task processing procedures 140 can be changed. Further, in other embodiments, the image processing environment can also include other nodes / modules / devices. The scope of the present disclosure is not limited in this respect.
[0043] Example Process
[0044] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.
[0045] Figure 2 FIG. 2 is a flowchart showing an image processing process 200 according to some embodiments of the present disclosure. For ease of discussion, reference is made to FIG. Figure 1 The image processing process 200 may be implemented at the computing device 110 .
[0046] At block 210, computing device 110 obtains user input instructions 130 for image processing node 125. In some embodiments, image processing node 125 is pre-packaged and associated with a given image processing function.
[0047] In some embodiments, the image processing node 125 is packaged as a plug-in. In this way, the image processing node 125 will have better versatility. Further, the image processing node 125 is packaged in the form of a dynamic link library (DLL). In this way, the image processing node 125 can be dynamically called, thereby further optimizing the resource utilization of the system.
[0048] It should be understood that the above-mentioned exemplary packaging of the image processing node 125 is only for illustrative purposes, and in other embodiments, the image processing node 125 may also be packaged in other forms. The scope of the present disclosure is not limited in this respect.
[0049] Additionally, in some embodiments, the image processing node 125 may be packaged based on an interface specification. Specifically, the interface specification may define parameters related to the packaging of the image processing node 125. In this way, the packaging process of the image processing node 125 may be defined more standardizedly.
[0050] Additionally, in some embodiments, the interface specification may define the type of at least one image processing node. An example of the type of image processing node is a computer vision processing node. In a specific implementation, the computer vision processing node is a node that implements computer vision-related artificial intelligence algorithms, including facial key point recognition, background / person / object segmentation, enhanced display recognition algorithm, background filling, etc.
[0051] Another example of a type of image processing node is a renderer node. In a specific implementation, a renderer node can implement a specific image rendering process, such as two-dimensional rendering, three-dimensional rendering, a commercial rendering engine, a custom rendering engine, and a program / code that implements a specific image processing function.
[0052] Other types of image processing nodes include image input nodes and image output nodes. In this way, the operations and / or processes involved in the image rendering process can be reasonably divided.
[0053] It should be understood that the above examples are merely illustrative and exemplary, and in other embodiments, the type of the image processing node may be defined as other types, such as other data processing processes involved in the image processing process. The embodiments of the present disclosure are not limited in this respect.
[0054] Alternatively or additionally, in some embodiments, the interface specification may further define input parameters of the image processing node 125 corresponding to the type of the image processing node. Alternatively or additionally, in some embodiments, the interface specification may define output parameters of the image processing node 125 corresponding to the type of the image processing node.
[0055] In some embodiments, the interface specification may define input parameters and / or output parameters for the type of the image processing node in the form of JavaScript Object Notation (JSON).
[0056] In some embodiments, depending on the type of image processing node, input parameters and / or output parameters can be defined as numerical types, binary data of images, and other appropriate data types, such as output results of computer vision algorithms or rendering engines.
[0057] As discussed above, the image processing node 125 may be associated with a given image processing function. In a specific embodiment, when the image processing node 125 is a computer vision processing node, the given image processing function may be feature recognition, such as facial key point recognition, etc. In another specific embodiment, when the image processing node 125 is a computer vision processing node, the given image processing function may be object segmentation, such as background segmentation, character segmentation, and object segmentation, etc. When the image processing node 125 is a computer vision processing node, other given image processing functions include augmented reality recognition, stylized rendering, and background filling, etc., wherein the stylized rendering may be animation, retro, etc.
[0058] It should be understood that the image processing functions in the above examples are only for illustrative purposes. In other embodiments, the computer vision processing node can be associated with any other image processing functions. The embodiments of the present disclosure are not limited in this respect.
[0059] In a specific embodiment, when the image processing node 125 is an image input node, its input parameters can be defined as: image data including pictures / videos, the output parameters can be defined as image data, and the function can be described as reading and parsing the image data input by the user, such as the encoding and decoding of pictures and videos.
[0060] In another specific embodiment, when the image processing node 125 is a computer vision processing node, its input parameters can be defined as: image data and special effects rendering resources, the output parameters can be defined as image data, and the function can be described as executing a computer vision algorithm on the input image data, such as, green screen cutout requires input of the original image and output of a segmented image, stylized rendering requires execution of a computer vision algorithm on the input image data to output a stylized image, and a facial key point algorithm requires execution of a computer vision algorithm on the input image data to output face-related point information.
[0061] In another specific embodiment, when the image processing node 125 is an image input node, its input parameters can be defined as: image data including pictures / videos, the output parameters can be defined as image data, and the function can be described as reading and parsing the image data input by the user, for example, the encoding and decoding of pictures and videos.
[0062] In another specific embodiment, when the image processing node 125 is a renderer node, its input parameters can be defined as: image data and effect rendering resources, the output parameters can be defined as image data, and the function can be described as sending the input image data to different rendering engines through methods such as shared memory and / or message interaction, and then receiving the image data processed by the rendering engine.
[0063] In another specific embodiment, when the image processing node 125 is an image output node, its input parameter can be defined as: image data, that is, the output image data of other image processing nodes 125, the output parameter can be defined as image data, and the function can be described as obtaining image data of a single frame, performing picture and / or video encoding, and outputting the encoding result.
[0064] It should be understood that the above specific embodiments are shown only as examples. In other embodiments, the type of image processing node can be defined in other ways. In addition, more or fewer types of image processing nodes can also be defined. The embodiments of the present disclosure are not limited in this respect.
[0065] In this way, the algorithms, rendering engines, etc. involved in the rendering process can be encapsulated into image processing nodes 125, and users can encapsulate specific image processing functions into corresponding image processing nodes 125 according to the parameters defined in the interface specification. Furthermore, when there are new algorithms and / or rendering engines that can be used in the rendering task processing process 140, the new algorithms and / or rendering engines can be encapsulated into corresponding image processing nodes 125 based on the interface specification without performing other adaptive upgrades on the system, thereby achieving good scalability.
[0066] In some embodiments, each image processing node 125 has corresponding configuration parameters, such as a configuration file including the corresponding configuration parameters. One example of a configuration parameter is storage information of the image processing node 125. Another example of a configuration parameter is at least one of a format and a size of an input parameter of the image processing node 125. Yet another example of a configuration parameter is at least one of a format and a size of an output parameter of the image processing node 125.
[0067] In a specific implementation, the configuration parameters of the image processing node 125 can be defined as a configuration file, which defines the relevant parameters of the image processing node 125, for example, the file path of the dynamic link library corresponding to the image processing node 125, the input parameter and / or the format and size of the input parameter, the path of the rendering resource, wherein the path of the rendering resource can be the resource package path of the rendering engine, and the configuration file can be in the form of JSON. As a specific embodiment, it is defined that the input image size is 1920*1080, the input parameter is the format of the facial key point data, the input image size is 1920*1080, and the output image is in png format.
[0068] It should be understood that the configuration parameters of the above examples are only for illustrative purposes. In other embodiments, the configuration parameters may be any parameters associated with creating / calling / initializing / running / uninstalling / destroying the image processing node 125. The embodiments of the present disclosure are not limited in this respect.
[0069] In this way, each image processing node 125 can define corresponding configuration parameters according to its own specific functions. When the image processing node 125 is called, the computing device 110 can obtain all corresponding parameters associated with the image processing node 125.
[0070] In box 220 , the computing node 110 generates a rendering task processing process 140 including a plurality of the image processing nodes 125 according to the input instruction 130 .
[0071] In a specific embodiment, the input instruction 130 is obtained by parsing a configuration file edited by a user. For example, the user edits the configuration file to determine a plurality of required image processing nodes 125 and their dependencies, which are sometimes also referred to as connection relationships or association relationships. The computing device 110 reads and parses the configuration file to generate a rendering task processing process 140.
[0072] Alternatively, in another specific implementation, the computing device 110 receives the user's input instruction 130 by presenting the image processing node 125 to the user. For example, the computing device 110 presents an interactive interface to the user. As an example, the interactive interface may include a selection area for multiple image processing nodes 125 and / or an editing area for the rendering task processing process 140. The user may select the image processing node 125 and / or edit the rendering task processing process 140 by clicking, dragging, inserting, etc. Further, during the interactive process, the computing device 110 may further present interactive options and operation instructions to the user in a temporary menu, a pop-up window, a drop-down menu, a floating box, etc.
[0073] It should be understood that the above specific examples of obtaining user input instructions 130 and / or editing rendering task processing 140 are only for illustrative purposes. In other embodiments, the user can use any existing or future interactive methods to select image processing nodes 125 and / or edit rendering task processing 140. The embodiments of the present disclosure are not limited in this respect.
[0074] Figure 3 FIG. 1 is a schematic block diagram of a rendering task processing process 140 according to some embodiments of the present disclosure. Figure 1 The environment 100 is discussed.
[0075] like Figure 3 As shown, the rendering task processing process 140 is composed of image processing nodes 125-1 to 125-6. Figure 3In a specific embodiment of the present invention, the image processing node 125-1 may be an image input node, the image processing node 125-6 may be an image output node, and the image processing nodes 125-2 to 125-5 may be computer vision processing nodes / renderer nodes.
[0076] In this way, by organizing a plurality of image processing nodes 125 having specific image processing functions into a node graph, the generation process of the rendering task processing process 140 is further simplified.
[0077] It should be understood that Figure 3 Only an example rendering task processing process 140 is shown. Depending on actual application needs, the generated rendering task processing process 140 may be different. For example, Figure 3 The number and connection relationship of the image processing nodes 125 shown in FIG. 1 are for illustration and illustrative purposes only. In other embodiments, the number and connection relationship of the image processing nodes 125 included in the rendering task processing process 140 may be changed. The scope of the present disclosure is not limited in this respect.
[0078] Continue to refer Figure 2 In box 230 , the computing device 110 renders the user's to-be-processed image 150 by executing the rendering task processing process 140 .
[0079] As discussed above, each image processing node 125 may have corresponding configuration parameters. Additionally, in some embodiments, before executing the rendering task processing process 140 , the computing node 110 initializes the corresponding image processing node 125 according to the configuration parameters of the plurality of image processing nodes 125 included in the image processing process 140 .
[0080] During the initialization operation, the computing node 110 may perform different operations for different types of image processing nodes 125. When the corresponding image processing node 125 is a computer vision processing node, the example initialization operation may be to initialize the reasoning engine associated with the computer vision processing node. Alternatively or additionally, when the corresponding image processing node is a computer vision processing node, the example initialization operation may also be to load the reasoning model associated with the computer vision processing node. Alternatively or additionally, when the corresponding image processing node 125 is a computer vision processing node and is packaged in the form of a plug-in, the example initialization operation may also be to load the dynamic link library DLL of the image processing node 125 and initialize the operations required to run the plug-in.
[0081] Alternatively or additionally, when the corresponding image processing node 125 is a renderer node, the example initialization operation may include initializing a rendering environment associated with the renderer node. Alternatively or additionally, when the corresponding image processing node 125 is a renderer node, the example initialization operation may also include starting a rendering engine associated with the renderer node. Alternatively or additionally, when the corresponding image processing node 125 is a renderer node, the example initialization operation may also include loading an image to be rendered.
[0082] It should be understood that the above examples of initialization operations are only used for illustrative purposes. In other embodiments, the initialization operations may include any appropriate operations required before running the image processing node 125. The embodiments of the present disclosure are not limited in this respect.
[0083] In some embodiments, after the rendering task processing 140 is completed, the computing node 110 may also uninstall the corresponding image processing node 125 , which is sometimes referred to as destroying the image processing node 125 .
[0084] During the unloading operation, the computing node 110 may perform different unloading operations for different types of image processing nodes 125. When the corresponding image processing node 125 is a computer vision processing node, an example unloading operation may be unloading an inference engine associated with the computer vision processing node. Alternatively or additionally, when the corresponding image processing node 125 is a computer vision processing node, an example unloading operation may also be unloading an inference model associated with the computer vision processing node.
[0085] Alternatively or additionally, when the corresponding image processing node 125 is a renderer node, the example uninstallation operation may include exiting a rendering engine associated with the renderer node. Alternatively or additionally, when the corresponding image processing node 125 is a renderer node, the example uninstallation operation may also include uninstalling rendering data, etc.
[0086] In this way, system resources can be reclaimed in a timely manner, thereby improving the utilization rate of system resources.
[0087] Will combine Figure 4 The interaction flow chart 400 between the image processing nodes 125 is shown to further describe the life cycle of the image processing node 125. For ease of discussion, refer to Figure 3 The rendering task processing process 140 is discussed.
[0088] In block 410, the image processing node 125-2 is encapsulated. For example, the image processing node 125-2 is a computer vision processing node corresponding to face key point recognition. Based on the definition and provision of the computer vision processing node type in the interface protocol, specific configuration parameters can be defined for the image processing node 125-2. In this way, the image processing node 125 can be defined differentially, so that even for the same functional image processing node 125, different functions can be implemented due to different configuration parameters.
[0089] In block 420, the image processing node 125-2 is initialized. For example, the inference engine and / or inference model associated with facial key point recognition is loaded. Additionally, in some embodiments, the initialization of the image processing node 125-2 may be triggered before / at the beginning of the driving rendering task processing process 140. In this way, the system resources will be called on demand, thereby improving the utilization of system resources.
[0090] In block 430, the image processing node 125-2 receives the input and outputs the result. Figure 4 As shown, in box 432, the image processing node 125-2 completes the setting input, for example, receiving the input data to be processed 150 according to specific configuration parameters such as the size and format of the input parameters. As discussed previously in this disclosure, the input parameters of the image processing node 125 can be image data or the output results of a computer vision algorithm or a rendering engine. In some embodiments, different input parameters can be defined by a key-value mapping relationship. Additionally, in some embodiments, the input parameters of the image processing node 125-2 can be defined in the configuration parameters of the image processing node 125-2, and the parsing of the configuration parameters can be implemented by the image processing node 125-2.
[0091] In block 434, the image processing node 125-2 dynamically updates the image. For example, when the image processing node 125-2 is implemented as a plug-in, the image processing node 125-2 is driven to run. When the input parameter is multi-frame video data, the image processing node 125-2 needs to update the input image in each frame and pass in the update interval time of each frame. For example, when the number of frames per second (Frames Per Second, FPS) is 60, the update interval time of each frame is 16.67ms.
[0092] At block 436, image processing node 125-2 outputs the result to image processing node 125-3. Figure 4 In a specific embodiment of the present invention, the image processing node 125-2 may be a computer vision processing node and the image processing node 125-3 may be a renderer node.
[0093] The image processing node 125-2 periodically executes blocks 432-1 to 342-6 until the rendering task processing process 140 is completed. In some embodiments, when the rendering task processing process 140 is designed as a node graph, the computing device 110 drives the node graph, inputs the image to be processed 150, calls the interface of each node in the node graph, and makes the input image to be processed 150 pass through the processing of each node, and inputs the result of the previous node to the next node. In this way, after all nodes are processed in sequence, the final rendering result 160 is formed. If the rendering task processing process 140 is completed, the image processing node 125-2 will be uninstalled.
[0094] Furthermore, if Figure 4 As shown, the image processing node 125 - 3 also needs to perform similar operations as the image processing node 125 - 2 , such as encapsulation, initialization, input setting, image update, result output, and uninstallation, etc. For the purpose of brevity, this article will not repeat the discussion.
[0095] In this way, the user can flexibly and conveniently generate the rendering task processing process 140 according to the requirements of a specific rendering task.
[0096] Furthermore, according to various implementations of the present disclosure, the processing flow, computer vision algorithm, and rendering engine involved in the rendering task can be encapsulated as an image processing node 125, and the image processing node 125 can be flexibly organized into a multi-functional image processing process 140. In this way, the generation of the rendering task processing process 140 can be independent of code writing, which reduces the difficulty of generating the rendering task processing process 140, so that people without programming knowledge and enterprises and individual users with rendering needs can generate / design corresponding rendering task processing processes 140 according to their respective needs.
[0097] Example devices and equipment
[0098] Figure 5 A block diagram of an apparatus 500 for processing offline rendering tasks according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in a computing device 110. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0099] As shown in the figure, the device 500 includes an input instruction acquisition module 510, which is configured to obtain the user's input instruction 130 for the image processing node 125, and the image processing node 125 is pre-packaged and associated with a given image processing function. The device 500 also includes a rendering task generation module 520, which is configured to generate a rendering task processing process 140 including multiple image processing nodes 125 according to the input instruction 130. The device 500 further includes a rendering task execution module 530, which is configured to render the user's to-be-processed image 150 by executing the rendering task processing process 140.
[0100] In some embodiments, the apparatus 500 further comprises: a packaging module configured to package a specific image processing function according to an interface specification to generate the image processing node 125. In some embodiments, the interface specification defines the type of at least one image processing node 125. Alternatively or additionally, in some embodiments, the interface specification defines input parameters of the image processing node 125 corresponding to the type of the image processing node 125. Alternatively or additionally, in some embodiments, the interface specification defines output parameters of the image processing node 125 corresponding to the type of the image processing node 125.
[0101] In some embodiments, the type of at least one image processing node 125 comprises an image input node. Alternatively or additionally, in some embodiments, the type of at least one image processing node 125 comprises an image output node. Alternatively or additionally, in some embodiments, the type of at least one image processing node 125 comprises a computer vision processing node. Alternatively or additionally, in some embodiments, the type of at least one image processing node 125 comprises a renderer node.
[0102] In some embodiments, the computer vision processing nodes are associated with feature recognition.
[0103] Alternatively or additionally, in some embodiments, the computer vision processing node is associated with feature recognition.
[0104] Alternatively or additionally, in some embodiments, the computer vision processing node is associated with object segmentation.
[0105] Alternatively or additionally, in some embodiments, the computer vision processing node is associated with augmented reality recognition.
[0106] Alternatively or additionally, in some embodiments, the computer vision processing node is associated with stylized rendering.
[0107] Alternatively or additionally, in some embodiments, the computer vision processing node is associated with a background fill.
[0108] In some embodiments, an image processing node 125 in the plurality of image processing nodes 125 has corresponding configuration parameters. In some embodiments, the corresponding configuration parameters indicate storage information of the image processing node 125, such as a storage path. Alternatively or additionally, in some embodiments, the corresponding configuration parameters indicate at least one of a format and a size of an input parameter of the image processing node 125. Alternatively or additionally, in some embodiments, the corresponding configuration parameters indicate at least one of a format and a size of an output parameter of the image processing node 125.
[0109] In some embodiments, the device 500 also includes: an initialization module, which is configured to initialize the corresponding image processing node 125 among the multiple image processing nodes 125 according to the configuration parameters of the multiple image processing nodes 125 included in the image processing process before executing the rendering task processing process 140.
[0110] In some embodiments, the respective image processing node 125 is a computer vision processing node, and wherein initializing the respective image processing node 125 comprises initializing an inference engine associated with the computer vision processing node.
[0111] Alternatively or additionally, in some embodiments, the corresponding image processing node 125 is a computer vision processing node, and wherein initializing the corresponding image processing node 125 includes loading an inference model associated with the computer vision processing node.
[0112] In some embodiments, the corresponding image processing node 125 is a renderer node, and wherein initializing the corresponding image processing node 125 includes initializing a rendering environment associated with the renderer node.
[0113] Alternatively or additionally, in some embodiments, the corresponding image processing node 125 is a renderer node, and wherein initializing the corresponding image processing node 125 includes starting a rendering engine associated with the renderer node.
[0114] In some embodiments, the apparatus 500 further includes: an uninstallation module configured to uninstall a corresponding image processing node 125 among the plurality of image processing nodes 125 after the rendering task processing process 140 is completed.
[0115] In some embodiments, the instruction acquisition module 510 is further configured to parse and obtain the input instruction 130 from the configuration file edited by the user.
[0116] Alternatively or additionally, in some embodiments, the instruction acquisition module 510 is further configured to receive the user's selection of the image processing node 125 by presenting the image processing node 125 to the user.
[0117] In some implementations, the rendering task processing is associated with rendering of a virtual object.
[0118] In some implementations, the virtual object is a virtual character.
[0119] Figure 6 1 shows a block diagram of a computing device / system 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The computing device / system 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The computing device / system 600 shown may be used to implement Figure 1 The computing node 110.
[0120] like Figure 6 As shown, computing device / system 600 is in the form of a general-purpose computing device. Components of computing device / system 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to increase the parallel processing capabilities of computing device / system 600.
[0121] The computing device / system 600 typically includes a plurality of computer storage media. Such media may be any available media accessible to the computing device / system 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the computing device / system 600.
[0122] The computing device / system 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0123] The communication unit 640 enables communication with other computing devices via a communication medium. Additionally, the functions of the components of the computing device / system 600 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the computing device / system 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0124] Input device 650 may be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 may be one or more output devices, such as a display, speaker, printer, etc. Computing device / system 600 may also communicate with one or more external devices (not shown) as needed, such as storage devices, display devices, etc., with one or more devices that allow a user to interact with computing device / system 600, or with any device that allows computing device / system 600 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.) through communication unit 640. Such communication may be performed via an input / output (I / O) interface (not shown).
[0125] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions or a computer program are stored, wherein the computer-executable instructions or the computer program are executed by a processor to implement the method described above.
[0126] According to an exemplary implementation of the present disclosure, a computer program product is also provided. The computer program product is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0127] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0128] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0129] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0130] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0131] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. An image rendering method, comprising: According to the interface specification, a specific image processing function is encapsulated to generate an image processing node, wherein the interface specification defines: at least one image processing node type, The input parameters of the image processing node corresponding to the type of image processing node, An output parameter of the image processing node corresponding to the type of the image processing node; Obtaining a user input instruction for an image processing node, wherein the image processing node is pre-packaged and associated with a given image processing function; Generate a rendering task processing process including a plurality of the image processing nodes according to the input instruction, wherein the rendering task processing process is associated with rendering of a virtual object, the plurality of the image processing nodes include an image input node, an image output node, a computer vision processing node, and a renderer node associated with the computer vision processing node, and wherein the computer vision processing node is a node for implementing a computer vision algorithm, and the renderer node is used to implement an image rendering process; as well as The image to be processed by the user is rendered by executing the rendering task processing process.
2. The method of claim 1, wherein the computer vision processing node is associated with at least one of the following image functions: Feature recognition, Object segmentation, Augmented reality recognition, Stylized rendering, Background fill.
3. The method according to claim 1, wherein an image processing node in the plurality of image processing nodes has a corresponding configuration parameter, and the corresponding configuration parameter indicates at least one of the following: storage information of the image processing node, at least one of the format and size of the input parameter of the image processing node, At least one of a format and a size of an output parameter of the image processing node.
4. The method according to claim 3, further comprising: Before executing the rendering task processing process, a corresponding image processing node among the plurality of image processing nodes is initialized according to configuration parameters of the plurality of image processing nodes included in the image processing process.
5. The method of claim 4, wherein the corresponding image processing node is a computer vision processing node, and wherein initializing the corresponding image processing node comprises at least one of: Initializing an inference engine associated with the computer vision processing node; An inference model associated with the computer vision processing node is loaded.
6. The method of claim 4, wherein the corresponding image processing node is a renderer node, and wherein initializing the corresponding image processing node comprises at least one of: Initializing a rendering environment associated with the renderer node; A rendering engine associated with the renderer node is started.
7. The method according to claim 1, further comprising: After the rendering task processing is completed, a corresponding image processing node among the plurality of image processing nodes is uninstalled.
8. The method according to claim 1, wherein obtaining the input instruction of the user comprises one of the following: Parsing and obtaining the input instruction from the configuration file edited by the user; A selection of the image processing node by the user is received by presenting the image processing node to the user. The method according to claim 1 , wherein the virtual object is a virtual character.
10. An image rendering device, comprising: The encapsulation module is configured to encapsulate a specific image processing function according to an interface specification to generate an image processing node, wherein the interface specification defines: at least one image processing node type, The input parameters of the image processing node corresponding to the type of image processing node, An output parameter of the image processing node corresponding to the type of the image processing node; An input instruction acquisition module, configured to obtain an input instruction from a user for an image processing node, wherein the image processing node is pre-packaged and associated with a given image processing function; A rendering task generation module is configured to generate a rendering task processing process including a plurality of the image processing nodes according to the input instruction, wherein the rendering task processing process is associated with rendering of a virtual object, the plurality of the image processing nodes include an image input node, an image output node, a computer vision processing node, and a renderer node associated with the computer vision processing node, and wherein the computer vision processing node is a node for implementing a computer vision algorithm, and the renderer node is used to implement an image rendering process; as well as The rendering task execution module is configured to render the user's to-be-processed image by executing the rendering task processing process.
11. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit.
12. A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method according to any one of claims 1 to 9.
