Terminal device and image super-resolution method
By splitting the image super-resolution processing process into pipelined processing on the terminal device and configuring appropriate chunking methods and processing algorithms, the problem of high frame rate and low power consumption on the terminal device is solved, and efficient images are achieved Super resolution technology application.
Patent Information
- Application Number
- CN202310533602.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-15
AI Technical Summary
The existing neural network-based image super-resolution technology is difficult to achieve high frame rate and low power consumption on terminal devices at the same time, mainly due to the computing power limitations of NPU and GPU.
By splitting the super-resolution processing process into pipelined processing, multiple sub-images in each frame are super-resolution processing in turn, and the complexity of the chunking method and super-resolution processing algorithm are configured by the scheduling module to reduce the frequency of the NPU Requirements, while improving the post-processing efficiency of GPUs, achieving a balance between high frame rate and low power consumption.
It effectively reduces the power consumption of terminal devices, while improving the speed and efficiency of super-resolution processing, achieving high frame rate and low power consumption on terminal devices, and improving user experience.
Smart Images

Figure CN118967439A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to a terminal device and an image super-resolution method. Background Art
[0002] Image super-resolution technology (or image super-resolution technology) is a technology that processes low-resolution images rendered by a graphics processing unit (GPU) into high-resolution images for display. This method usually reads low-resolution game images and some auxiliary information, and uses traditional interpolation algorithms or neural network algorithms to achieve high-resolution image reconstruction. One of the use scenarios of image super-resolution technology is user gaming scenarios, and it has been widely used on personal computers, such as NVIDIA's Deep Learning Super-Sampling (DLSS) technology and AMD's Fidelityfx Super Resolution (FSR) technology.
[0003] However, the existing neural network-based image super-resolution technology has high requirements on the computing power of GPU and neural network processing unit (NPU), and requires users to configure independent graphics card devices. Therefore, when the technology is adapted to terminal devices, it is difficult to achieve high frame rate (Frame Per Second, FPS) and low power consumption at the same time due to the computing power limitations of NPU and GPU on the terminal devices. Summary of the invention
[0004] The embodiments of the present application provide a terminal device and an image super-resolution method, which can achieve the effects of high frame rate and low power consumption on the terminal device at the same time.
[0005] In a first aspect, the present application provides a terminal device, comprising: a scheduling module for sending multiple sub-images contained in a current frame to a neural network processor NPU, wherein the current frame is a low-resolution image obtained after low-resolution rendering by a graphics processor GPU; and the NPU is used to perform super-resolution processing on the multiple sub-images in sequence according to a preset order.
[0006] From the technical effect point of view, the present application divides the super-resolution processing of each frame into super-resolution processing of each sub-image on the frame in turn (pipelined super-resolution processing). Compared with the super-resolution processing process based on frames in the prior art, the amount of tasks processed by the NPU at a single time in the present application is significantly smaller, so that the NPU can run at a lower frequency, that is, when the frame rate remains unchanged, the power consumption of the terminal device can be effectively reduced. In addition, if the NPU operating frequency is appropriately increased and / or a super-resolution processing algorithm of appropriate complexity is selected (that is, the algorithm complexity should not be too high), the speed of the super-resolution processing process can be increased, thereby achieving a high frame rate effect on the terminal device, and then achieving a higher frame rate and lower power consumption at the same time, that is, achieving a dynamic balance between the frame rate and power consumption on the terminal device. That is, the present application can achieve the effects of high frame rate and low power consumption at the same time after the super-resolution technology is applied to the terminal device.
[0007] In a feasible implementation, the scheduling module is also used to configure a blocking method for the current frame and the complexity of a super-resolution processing algorithm; wherein the multiple sub-images are obtained after block processing according to the blocking method, and the image quality of the image obtained after the super-resolution processing is related to the complexity of the super-resolution processing algorithm.
[0008] The scheduling unit is a hardware module on the terminal device that is independent of the GPU and the CPU, or a hardware module integrated in the GPU or the CPU.
[0009] The block division method includes setting the size of the sub-image.
[0010] Among them, the configuration of the super-resolution processing algorithm can be displayed on the user interface as different image quality options provided by the graphics card program. For example, the high-quality image quality option in the user interface corresponds to a complex super-resolution processing algorithm, and the low-quality image quality option corresponds to a simple super-resolution processing algorithm.
[0011] From the technical effect point of view, the scheduling of the super-resolution processing process through the hardware scheduling unit can greatly improve the efficiency of the super-resolution processing process and reduce the latency. At the same time, the efficiency of super-resolution processing can be further improved by configuring the block mode to adapt to the size of the cache on the terminal device. In addition, by providing super-resolution processing algorithms of different complexity, it can meet the user's demand for image quality in different scenarios, with good adaptability.
[0012] In a feasible implementation, after each of the sub-images is subjected to the super-resolution processing, a high-resolution image corresponding to each of the sub-images is obtained; the GPU is used to perform post-processing on the high-resolution images corresponding to each of the sub-images in sequence according to the preset order to obtain a display image corresponding to each of the sub-images; wherein the post-processing includes halo effects, motion blur and depth of field effects.
[0013] In a feasible implementation manner, after each of the sub-images is subjected to the super-resolution processing, a weight matrix corresponding to each of the sub-images is obtained; the GPU is also used to sequentially fuse each of the sub-images, the sub-image corresponding to each of the sub-images in the previous frame, and the weight matrix corresponding to each of the sub-images, and post-process the fused high-resolution image to obtain a display image corresponding to each of the sub-images; wherein the post-processing includes halo effects, motion blur, and depth of field effects.
[0014] From the technical effect point of view, it is compatible with the pipeline super-resolution processing process in the aforementioned embodiment. For each sub-image in each frame, the GPU also uses a pipeline method to perform post-processing, which improves the processing efficiency on the GPU and reduces latency. At the same time, the result obtained by the above super-resolution processing process can be a weight matrix or a high-resolution sub-image, that is, the block super-resolution processing process provided by this application can be flexibly adapted to different processing flows and has good compatibility.
[0015] In a feasible implementation, the multiple sub-images include a first sub-image, and the first sub-image corresponds to the second sub-image in the previous frame; the position of the first sub-image in the current frame is the same as the position of the second sub-image in the previous frame, and the previous frame is a high-resolution image obtained after the super-resolution processing and the post-processing.
[0016] From the technical effect point of view, in the above-mentioned process of fusing the first sub-image, the accuracy and image quality of the fused image are improved by using the second sub-image corresponding to the position of the first sub-image in the previous frame.
[0017] In a feasible implementation manner, the terminal device further includes: a display configured to sequentially display a display image corresponding to each of the sub-images according to the preset order.
[0018] From the technical effect point of view, it is compatible with the pipelined super-resolution processing and pipelined post-processing process in the aforementioned embodiment, and the display unit also performs pipelined display, so that the current frame is displayed correctly and completely on the display unit, and the user is unaware of the entire block-by-block pipeline display process.
[0019] In a feasible implementation manner, the GPU is further used to pre-process the current frame before the NPU performs the super-resolution processing on the current frame; wherein the pre-processing includes screen space reflection and screen space ambient light occlusion.
[0020] From the perspective of technical effects, for the pre-processing process that cannot be performed in blocks, the present application adjusts the pre-processing process to be performed before the super-resolution processing, that is, the pre-processing process is performed in frames before the super-resolution processing, so that the image finally displayed on the display unit has better picture quality and improves the user experience.
[0021] In a feasible implementation manner, after completing the low-resolution rendering of the current frame, the GPU starts the low-resolution rendering of the next frame; the priority of the low-resolution rendering is lower than the priority of the post-processing task.
[0022] From the technical effect point of view, by making the GPU perform post-processing tasks (or called post-processing rendering) first, the continuity of the super-resolution-post-processing-display process of each sub-image can be effectively improved. It can be seen that although this solution performs block super-resolution on the current frame, the processing process of each sub-image is still fast and continuous, and the user is not aware of it. That is, this application achieves high frame rate and low power consumption on the terminal device while effectively ensuring the user's visual experience.
[0023] In a feasible implementation manner, the scheduling module is specifically used to send the first storage address of the first sub-image and the second storage address of the second sub-image to the NPU; the NPU is specifically used to obtain the first sub-image and the second sub-image according to the first storage address and the second storage address, respectively, and use the second sub-image to perform the super-resolution processing on the first sub-image to obtain a high-resolution image corresponding to the first sub-image or a corresponding weight matrix.
[0024] From a technical perspective, the scheduling module is used to allocate the storage addresses of the data required for super-resolution processing, thereby improving the efficiency of the super-resolution processing process and reducing latency.
[0025] In a feasible implementation, the scheduling module is also used to send auxiliary parameters corresponding to each of the sub-images to the NPU, and the auxiliary parameters are used for the super-resolution processing of each of the sub-images, and the auxiliary parameters include a motion vector map, a depth map and global brightness information.
[0026] From a technical effect point of view, this application will also use auxiliary information such as motion vector maps during the super-resolution process to improve the accuracy of the processing results.
[0027] In a feasible implementation manner, any two adjacent sub-images among the multiple sub-images partially overlap or do not overlap.
[0028] From the technical effect point of view, the super-resolution process of the multiple sub-images obtained by dividing the current frame can be performed in sequence according to the position of each sub-image in the current frame, or in other sequences, which is flexible. At the same time, the edges of two adjacent sub-images in the multiple sub-images obtained after division can overlap to a certain extent, and then be appropriately cropped during the subsequent display process to improve the fault tolerance of the super-resolution process.
[0029] In a feasible implementation manner, the NPU and the GPU are independent processing units or the NPU is integrated into the GPU.
[0030] From the perspective of technical effects, the implementation methods of NPU and GPU on terminal devices are not restricted and have good flexibility.
[0031] In the second aspect, the present application provides an image super-resolution method, which includes: sending multiple sub-images contained in a current frame to a neural network processor NPU through a scheduling module, wherein the current frame is a low-resolution image obtained after low-resolution rendering by a graphics processor GPU; according to a preset order, the NPU performs super-resolution processing on the multiple sub-images in turn.
[0032] In a feasible implementation, the method further includes: configuring the blocking method of the current frame and the complexity of the super-resolution processing algorithm through the scheduling module; wherein the multiple sub-images are obtained after block processing according to the blocking method, and the image quality of the image obtained after the super-resolution processing is related to the complexity of the super-resolution processing algorithm.
[0033] In a feasible implementation manner, after each of the sub-images is subjected to the super-resolution processing, a high-resolution image corresponding to each of the sub-images is obtained; the method further includes: according to the preset order, the GPU performs post-processing on the high-resolution images corresponding to each of the sub-images in turn to obtain a display image corresponding to each of the sub-images; wherein the post-processing includes halo effects, motion blur and depth of field effects.
[0034] In a feasible implementation manner, after each of the sub-images is subjected to the super-resolution processing, a weight matrix corresponding to each of the sub-images is obtained; the method further includes: according to the preset order, the GPU sequentially fuses each of the sub-images, the sub-image corresponding to each of the sub-images in the previous frame, and the weight matrix corresponding to each of the sub-images, and post-processes the fused high-resolution image to obtain a display image corresponding to each of the sub-images; wherein the post-processing includes halo effects, motion blur, and depth of field effects.
[0035] In a feasible implementation, the multiple sub-images include a first sub-image, and the first sub-image corresponds to the second sub-image in the previous frame; the position of the first sub-image in the current frame is the same as the position of the second sub-image in the previous frame, and the previous frame is a high-resolution image obtained after the super-resolution processing.
[0036] In a feasible implementation manner, the method further includes: displaying the display image corresponding to each of the sub-images in sequence on a display according to the preset sequence.
[0037] In a feasible implementation, the method further includes: before the NPU performs the super-resolution processing on the current frame, the GPU pre-processes the current frame; wherein the pre-processing includes screen space reflection and screen space ambient light occlusion.
[0038] In a feasible implementation manner, after completing the low-resolution rendering of the current frame, the GPU starts the low-resolution rendering of the next frame; the priority of the low-resolution rendering is lower than the priority of the post-processing.
[0039] In a feasible implementation, the method further includes: the scheduling module sends auxiliary parameters corresponding to each sub-image to the NPU, the auxiliary parameters are used for the super-resolution processing of each sub-image, and the auxiliary parameters include a motion vector map, a depth map and global brightness information.
[0040] In a feasible implementation manner, any two adjacent sub-images among the multiple sub-images partially overlap or do not overlap.
[0041] In a feasible implementation manner, the NPU and the GPU are independent processing units or the NPU is integrated into the GPU.
[0042] In the third aspect, an embodiment of the present application provides a chip system, which includes at least one processor, a memory and an interface circuit, wherein the memory, the interface circuit and the at least one processor are interconnected through lines, and instructions are stored in the at least one memory; when the instructions are executed by the processor, any method described in the above second aspect is implemented.
[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed, the method described in any one of the second aspects above is implemented.
[0044] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed, the method described in any one of the above second aspects is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The following is an introduction to the drawings used in the embodiments of the present application.
[0046] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0047] Figure 2 A specific implementation method of a scheduling module provided in an embodiment of the present application;
[0048] Figure 3a-Figure 3b Two specific examples of block division methods are provided for the embodiments of the present application;
[0049] Figure 4 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application;
[0051] Figure 6 A schematic diagram of the execution flow of each module in a terminal device provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of a process of obtaining an intermediate result when performing image super-resolution processing on a current frame provided in an embodiment of the present application;
[0053] Figure 8 A schematic diagram of a data interaction process between modules in a terminal device provided in an embodiment of the present application;
[0054] Fig. 9 A schematic diagram of the processing sequence of sub-images contained in each frame by each module in a terminal device provided in an embodiment of the present application;
[0055] Fig.10 A flowchart of an image super-resolution method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0057] The terms "first", "second", "third" and "fourth" in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0058] The following are the professional terms involved in this application:
[0059] (1) Super Resolution Processing: It can also be referred to as super-resolution processing. It refers to a method of restoring a high-resolution image from a low-resolution image or image sequence. The current super-resolution methods include: interpolation-based methods, reconstruction-based methods, and learning-based (i.e., deep learning) methods. The super-resolution processing process in this application uses a deep learning method, and this application does not limit the deep learning model of super-resolution processing.
[0060] (2) Cache: A level in the computer memory system, located between the main memory and the processor, added to bridge the processing speed difference between the two. Compared with the main memory, the cache has a faster access speed but a smaller capacity. Cache can also be usually divided into multiple layers. The closer the level is to the CPU, the smaller the capacity and the faster the access speed.
[0061] See also Figure 1 , Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 1 As shown, the terminal device includes a scheduling module and a neural network processor NPU.
[0062] The following will be combined Figure 1 To describe the process of the terminal device executing the image super-resolution method, the details are as follows:
[0063] The scheduling module is used to send multiple sub-images contained in the current frame to the NPU, where the current frame is a low-resolution image obtained after low-resolution rendering by the GPU. The NPU performs super-resolution processing on the multiple sub-images in sequence according to a preset order.
[0064] Among them, the scheduling module can be in the form of hardware or software. When the scheduling module is implemented in hardware, it can be an independent hardware module, or a hardware module integrated in other hardware (such as CPU or GPU, etc.). When the scheduling module is implemented in software, it can be in the form of a program or software thread in the operating system on the terminal device, which is not limited in this application.
[0065] See also Figure 2 , Figure 2 A specific implementation of a scheduling module provided in an embodiment of the present application.
[0066] like Figure 2 As shown, the scheduling module includes a configuration module and a task queue. Among them, the configuration module is used to configure the super-resolution processing parameters, including the block division method of the current frame and the complexity of the super-resolution processing algorithm. That is, the scheduling module can be used to configure the block division method of the current frame and the complexity of the super-resolution processing algorithm.
[0067] Optionally, the super-resolution processing parameters in the configuration module can be configured through game setting options in the user interface or GPU driver, etc.
[0068] After the super-resolution processing parameters are configured, the current frame can be processed in a block-by-block manner to obtain multiple sub-images contained in the current frame. At the same time, when the NPU performs super-resolution processing on each sub-image, the NPU calls the super-resolution processing algorithm configured in the configuration module to perform super-resolution processing.
[0069] The complexity of the super-resolution processing algorithm is related to the image quality obtained after the super-resolution processing. Optionally, the higher the complexity of the super-resolution processing algorithm, the better the image quality obtained after the super-resolution processing.
[0070] Further, optionally, the super-resolution processing algorithm is divided into three levels: simple, medium and complex, corresponding to three algorithms of different complexity. The user interface includes three image quality options: low, medium and high. Among them, the super-resolution processing algorithm corresponding to low image quality is simple, the super-resolution processing algorithm corresponding to medium image quality is medium, and the super-resolution processing algorithm corresponding to high image quality is complex.
[0071] Further, optionally, the algorithm used for super-resolution processing is a neural network algorithm.
[0072] Optionally, the above-mentioned block division method specifically includes setting the size of each sub-image obtained after block division, or setting the shape of each sub-image obtained after block division, etc., which is not limited in the present application.
[0073] For example, the above-mentioned blocking method may be configured by setting the shape of each sub-image after blocking processing to be a square.
[0074] After the above super-resolution processing parameters are configured through the configuration module, the scheduling module will generate super-resolution processing tasks for each sub-image in the current frame in the task queue in a preset order based on parameters such as the size of each sub-image after block processing, and send the super-resolution processing tasks of each sub-image to the GPU in sequence according to the order in the queue.
[0075] Specifically, the following takes the first sub-image in the current frame as an example to describe the process of the scheduling module sending the super-resolution processing task to the NPU:
[0076] The scheduling module sends the storage address of the first sub-image, the storage address of the second sub-image corresponding to the first sub-image in the previous frame, the storage address of the super-resolution processing algorithm configured above, and the storage address of the auxiliary parameters to the NPU.
[0077] The position of the first sub-image in the current frame is the same as or similar to the position of the second sub-image in the previous frame, and the previous frame is a high-resolution image obtained through super-resolution processing or super-resolution processing and post-processing.
[0078] The first sub-image is any sub-image among the multiple sub-images in the current frame.
[0079] After the NPU receives the super-resolution processing task of each sub-image sent by the scheduling module, the NPU performs super-resolution processing on each sub-image in sequence according to a preset order, that is, the NPU performs super-resolution processing on one sub-image at a time.
[0080] The preset order is also the order of the super-resolution processing tasks of each sub-image in the task queue in the scheduling module.
[0081] The following takes the first sub-image as an example to describe the specific process of NPU performing super-resolution processing each time:
[0082] The NPU obtains the first sub-image, the second sub-image, auxiliary parameters and the configured super-resolution processing algorithm through the storage address sent by the scheduling module, inputs the first sub-image, the second sub-image and the auxiliary parameters into the algorithm, and performs super-resolution processing on the first sub-image through the second sub-image.
[0083] The auxiliary parameters include a motion vector map, a depth map, and global brightness information.
[0084] Optionally, for each sub-image in the current frame, the auxiliary parameters used in super-resolution processing are the motion vector map, depth map and global brightness information of the current frame, or the motion vector map, depth map and global brightness information of the sub-image.
[0085] Optionally, the terminal device may be a mobile terminal device such as a mobile phone, a personal computer, or a tablet, which is not limited in the present application.
[0086] Optionally, any two sub-images among the multiple sub-images obtained after the current frame is processed by block processing partially overlap or do not overlap.
[0087] Figure 3a-Figure 3b Two specific examples of block division methods are provided in the embodiments of the present application.
[0088] Figure 3a This is an example of a block division method provided in an embodiment of the present application. Any two sub-images among the multiple sub-images obtained by this block division method partially overlap. Figure 3a As shown in the figure, the solid line border represents the size of the current frame, and the dotted line border represents the size of the current frame after the block processing. After the block processing, the current frame is divided into 9 sub-images (sub-images 1-9). Figure 3a The shaded portion in is the overlapped portion between adjacent sub-images, and the portion between the border and the dotted border is the filled portion. Optionally, the pixel value of each pixel point in the filled portion may be 0.
[0089] Among them, sub-image 1 partially overlaps with adjacent sub-image 2, sub-image 4 and sub-image 5, and sub-image 5 partially overlaps with each of the remaining sub-images. The overlapping relationship between the remaining sub-images will not be repeated here.
[0090] Figure 3bThis is an example of another block division method provided in the embodiment of the present application. There is no overlap between any two sub-images among the multiple sub-images obtained by this block division method. Figure 3b As shown, after this block division method, the current frame is divided into 9 sub-images, and the borders of any two connected sub-images overlap, and the images have no overlapping parts.
[0091] See also Figure 4 , Figure 4 A schematic diagram of another terminal device provided in an embodiment of the present application, as a Figure 1 Supplement to the specific structure of the terminal equipment shown. Figure 4 The terminal equipment shown is compared to Figure 1 The terminal device shown also includes a GPU, which is used to continue processing the results obtained after the NPU super-resolution processing.
[0092] Specifically, depending on the results obtained by the NPU super-resolution processing, the subsequent processing of the GPU is divided into two methods:
[0093] (1) When the result of super-resolution processing of each sub-image is a high-resolution image corresponding to each sub-image, the GPU performs post-processing on the high-resolution image corresponding to each sub-image in sequence according to a preset order to obtain a display image corresponding to each sub-image. Specifically, taking the first sub-image as an example, after the NPU completes super-resolution processing on the first sub-image, the GPU starts to perform post-processing on the first sub-image to obtain a display image corresponding to the first sub-image.
[0094] (2) When the result of super-resolution processing of each sub-image is a weight matrix corresponding to each sub-image, the GPU processes each sub-image in the following order in sequence: fuses each sub-image, the sub-image corresponding to each sub-image in the previous frame, and the weight matrix corresponding to each sub-image to obtain a high-resolution image corresponding to each sub-image; then the GPU performs post-processing on the high-resolution image corresponding to each sub-image to obtain a display image corresponding to each sub-image. Specifically, taking the first sub-image as an example, the GPU fuses the first sub-image, the second sub-image, and the weight matrix corresponding to the first sub-image to obtain a high-resolution image corresponding to the first sub-image, and then performs post-processing on the high-resolution image corresponding to the first sub-image to obtain a display image corresponding to the first sub-image.
[0095] Among them, the above post-processing includes halo effect, motion blur and depth of field effect.
[0096] See also Figure 5 , Figure 5 A schematic diagram of the structure of another terminal device provided in an embodiment of the present application, as a Figure 4Supplement to the specific structure of the terminal equipment shown. Figure 5 The terminal equipment shown is compared to Figure 4 The terminal device shown also includes a display.
[0097] After the GPU performs post-processing on each sub-image in turn to obtain a display image corresponding to each sub-image, the display displays the display image corresponding to each sub-image in turn.
[0098] For the above Figure 1 , Figure 4 and Figure 5 The terminal device shown in FIG. 1 also includes a storage unit and a cache unit.
[0099] The storage unit is used to store the current frame and the auxiliary parameters, etc., and is a memory on the terminal device. Optionally, the storage unit is a dynamic random access memory (DRAM) or the like.
[0100] The cache unit is used to store the sub-images being processed by super-resolution, auxiliary parameters, and the high-resolution images or weight matrices obtained after the sub-images are processed by super-resolution. It is a cache on the terminal device. Optionally, the cache unit is a static random access memory (SRAM) or the like.
[0101] Optionally, before the NPU sequentially performs super-resolution processing on sub-images included in the current frame, the GPU pre-processes the current frame.
[0102] Specifically, the GPU preprocesses the current frame as a whole. Optionally, the preprocessing includes screen space reflection and screen space ambient occlusion.
[0103] In the above embodiments, after the GPU finishes low-resolution rendering of the current frame, the GPU starts low-resolution rendering of the next frame. The low-resolution rendering is performed as a whole in units of frames.
[0104] Among them, the priority of low-resolution rendering in the GPU is lower than the priority of the aforementioned post-processing. Specifically, when the GPU is performing low-resolution rendering of the next frame, whenever the NPU completes super-resolution processing of a sub-image in the current frame, the GPU will pause the low-resolution rendering of the next frame and start post-processing of this sub-image. After the post-processing is completed, the GPU starts to continue the low-resolution rendering of the next frame.
[0105] Optionally, the NPU and GPU in the above embodiments are independent processing units or the NPU is integrated in the GPU. When the NPU is integrated in the GPU, the processing process of the GPU in the above embodiments is implemented by the part of the GPU except the NPU.
[0106] See also Figure 6 , Figure 6 A schematic diagram of the execution flow of each module in a terminal device provided in an embodiment of the present application is described by taking the first sub-image and the last sub-image in the current frame as an example, where the first sub-image and the last sub-image refer to the first sub-image to be processed with super-resolution and the last sub-image to be processed with super-resolution in the current frame, respectively.
[0107] like Figure 6 As shown, the scheduling module first executes step S610: issuing a low-resolution rendering task. Specifically, the scheduling module can send the storage address of the current frame to the GPU. After receiving the storage address, the GPU performs low-resolution rendering on the current frame, and after completing the task, executes step S620: notifying the completion of rendering. After the scheduling module receives the notification, it executes step S630: issuing the first sub-image super-resolution processing task. After the NPU receives the task, it starts super-resolution processing on the first sub-image, and after the super-resolution processing of the first sub-image is completed, the NPU executes step S640: notifying the completion of the super-resolution task. After the scheduling module receives the notification, it executes step S650: issuing the first sub-image post-processing task. After receiving the task, the GPU starts post-processing the super-resolution processing result of the first sub-image, and after the post-processing is completed, it executes step S660: notifying the completion of post-processing. After receiving the notification, the scheduling module executes step S670: outputting the rendering result of the first sub-image for display. Among them, the rendering result is the display image in the aforementioned embodiment. Then, the remaining sub-images are processed in turn according to the above processing of the first sub-image (step S630-step S670). For the last sub-image in the current frame, the processing is as follows: Figure 6 Steps S680 to S6120 are the same as the processing process of the first sub-image, and will not be repeated here.
[0108] Specifically, Figure 6 The specific execution process of each step can be found in the description of the above embodiment and will not be repeated here.
[0109] at the same time, Figure 6 The embodiment omits the process of configuring the super-resolution processing parameters in the current frame preprocessing and scheduling module. For details, please refer to the description in the aforementioned embodiment, which will not be repeated here.
[0110] See also Figure 7 , Figure 7 A schematic diagram of a process of obtaining an intermediate result when performing image super-resolution processing on a current frame provided in an embodiment of the present application.
[0111] like Figure 7 As shown, the image super-resolution processing process of the current frame includes:
[0112] First, the current frame is rendered at a low resolution, preprocessed, and divided into blocks to obtain the current frame after division (low-resolution image). Figure 7 As shown, the current frame after segmentation includes four sub-images (sub-images ①-④). Figure 7 Taking sub-image ① in the current frame as an example, its super-resolution processing and post-processing process are described. The processing of the remaining sub-images in the current frame is the same, so it is omitted. Among them, the previous frame also contains four sub-images, and the positions of the sub-images with the same number in the previous frame and the current frame are the same (that is, the position of sub-image ① in the previous frame is the same as the position of sub-image ① in the current frame, ... The position of sub-image ④ in the previous frame is the same as the position of sub-image ④ in the current frame).
[0113] The super-resolution processing and post-processing process of sub-image ① in the current frame is specifically as follows: sub-image ① in the previous frame is used to perform super-resolution processing on sub-image ① in the current frame to obtain a processing result (as can be seen from the above embodiment, the processing result is a high-resolution image or weight matrix corresponding to sub-image ① in the current frame). The GPU then performs post-processing on the processing result to obtain a display image corresponding to sub-image ①, and finally outputs the display image to the display for display.
[0114] Specifically, the specific implementation of the above processing process can refer to the description in the above embodiments, which will not be repeated here.
[0115] See also Figure 8 , Figure 8 A schematic diagram of the data interaction process between modules in a terminal device provided in an embodiment of the present application is described by taking the current frame and any sub-image i in the current frame as an example.
[0116] like Figure 8As shown, the scheduling module executes step ①: notifies the current frame to be rendered at low resolution, preprocessed, and segmented. After receiving the notification, the NPU performs low-resolution rendering, preprocessing, and segmentation on the current frame to obtain the current frame after segmentation, and executes step ②: stores the current frame after segmentation and auxiliary parameters. The scheduling module executes step ③: issues the super-resolution task of sub-image i. After receiving the task, the NPU first reads the sub-image i and the auxiliary parameters from the storage unit and stores them in the cache unit, and then executes step ④: obtains the sub-image i and the auxiliary parameters. The NPU uses the sub-image i, the auxiliary parameters, and the sub-image corresponding to the sub-image i in the previous frame ( Figure 8 The GPU performs super-resolution processing on the sub-image i (not shown) to obtain the processing result of the sub-image i (the high-resolution image or weight matrix corresponding to the sub-image i). The NPU executes step ⑤: stores the high-resolution image or weight matrix corresponding to the sub-image i. The GPU executes step ⑥: obtains the high-resolution image or weight matrix corresponding to the sub-image i. Then, the GPU performs post-processing on the sub-image i based on the acquired data to obtain the display image corresponding to the sub-image i, and executes step ⑦: outputs the display image corresponding to the sub-image i. Finally, the display displays the display image corresponding to the sub-image i.
[0117] Specifically, the specific implementation process of the above steps can refer to the description in the above embodiments, which will not be repeated here.
[0118] See also Fig. 9 , Fig. 9 A schematic diagram of the processing sequence of sub-images contained in each frame by each module in a terminal device provided in an embodiment of the present application.
[0119] Fig. 9 The processing order of each module on the terminal device is described by taking four consecutive frames in time sequence (i.e., frame A, frame B, frame C, and frame D) as the object. Among them, frame A, frame B, frame C, and frame D are the nth frame, n+1th frame, n+2th frame, and n+3th frame in time sequence respectively. After block processing, each frame contains 3 sub-images, such as Fig. 9 As shown, frame A contains sub-images A1-A3, frame B contains sub-images B1-B3, frame C contains sub-images C1-C3, and frame D contains sub-images D1-D3.
[0120] like Fig. 9 As shown, first, the NPU performs super-resolution processing on the three sub-images contained in frame A in sequence, as shown in FIG. Fig. 9 As shown, the processing order is sub-image A1, sub-image A2 and sub-image A3. Fig. 9 The process of preprocessing frame A in the GPU is omitted. When the NPU performs super-resolution processing on sub-images A1-A3 in sequence, the GPU preprocesses the next frame of frame A (i.e., frame B). Fig. 9As can be seen from the figure, after the super-resolution processing of sub-image A1 is completed, the GPU will suspend the pre-processing process of the B frame and start the post-processing process of the sub-image A1 (i.e., the two processing methods corresponding to the different super-resolution processing results in the above embodiments are not repeated here). The time required for the post-processing of the sub-image A1 is shown by the dotted line part of the B frame pre-processing timing. After the post-processing of the sub-image A1 is completed, the GPU continues to perform the pre-processing of the B frame. At the same time, Fig. 9 As shown, after the post-processing of sub-image A1 is completed, the display starts to display the display image corresponding to sub-image A1. Similarly, the NPU, GPU and display sequentially perform the above processing of sub-images A2 and A3 according to the above processing of sub-image A1.
[0121] like Fig. 9 As shown, the above processing process is expressed in time sequence as follows: the NPU performs super-resolution processing on the sub-image in each frame in sequence according to a preset order, the GPU performs post-processing on the sub-image in each frame in sequence according to a preset order, and the display displays the display image corresponding to the sub-image in each frame in sequence according to a preset order. For each sub-image, a pipeline processing process from NPU to GPU to display is formed. In this way, the workload of each module on the terminal device is reduced, so that each module can run at a low frequency, thereby reducing the power consumption of the terminal device. In this low-frequency working mode, the operating frequency of each module can be appropriately increased, which can improve the processing speed and efficiency of each module, thereby achieving the effect of improving the frame rate, that is, the technical effects of low power consumption and high frame rate can be achieved simultaneously through this application.
[0122] After the above processing of frame A is completed, each module on the terminal device starts to perform corresponding processing on frame B, frame C and frame D in sequence. For details, see Fig. 9 , I will not go into details here.
[0123] See also Fig.10 , Fig.10 The following is a flow chart of an image super-resolution method provided in an embodiment of the present application. Fig. 9 As shown, the method includes step S1010 and step S1020.
[0124] Step S1010: sending multiple sub-images contained in the current frame to the neural network processor NPU through the scheduling module, wherein the current frame is a low-resolution image obtained after low-resolution rendering by the graphics processor GPU.
[0125] Step S1020: The NPU performs super-resolution processing on the multiple sub-images in sequence according to a preset order.
[0126] In a feasible implementation, the method further includes: configuring the blocking method of the current frame and the complexity of the super-resolution processing algorithm through the scheduling module; wherein the multiple sub-images are obtained after block processing according to the blocking method, and the image quality of the image obtained after the super-resolution processing is related to the complexity of the super-resolution processing algorithm.
[0127] In a feasible implementation manner, after each of the sub-images is subjected to the super-resolution processing, a high-resolution image corresponding to each of the sub-images is obtained; the method further includes: according to the preset order, the GPU performs post-processing on the high-resolution images corresponding to each of the sub-images in turn to obtain a display image corresponding to each of the sub-images; wherein the post-processing includes halo effects, motion blur and depth of field effects.
[0128] In a feasible implementation manner, after each of the sub-images is subjected to the super-resolution processing, a weight matrix corresponding to each of the sub-images is obtained; the method further includes: according to the preset order, the GPU sequentially fuses each of the sub-images, the sub-image corresponding to each of the sub-images in the previous frame, and the weight matrix corresponding to each of the sub-images, and post-processes the fused high-resolution image to obtain a display image corresponding to each of the sub-images; wherein the post-processing includes halo effects, motion blur, and depth of field effects.
[0129] In a feasible implementation, the multiple sub-images include a first sub-image, and the first sub-image corresponds to the second sub-image in the previous frame; the position of the first sub-image in the current frame is the same as the position of the second sub-image in the previous frame, and the previous frame is a high-resolution image obtained after the super-resolution processing.
[0130] In a feasible implementation manner, the method further includes: displaying the display image corresponding to each of the sub-images in sequence on a display according to the preset sequence.
[0131] In a feasible implementation, the method further includes: before the NPU performs the super-resolution processing on the current frame, the GPU pre-processes the current frame; wherein the pre-processing includes screen space reflection and screen space ambient light occlusion.
[0132] In a feasible implementation manner, after completing the low-resolution rendering of the current frame, the GPU starts the low-resolution rendering of the next frame; the priority of the low-resolution rendering is lower than the priority of the post-processing.
[0133] In a feasible implementation, the method further includes: the scheduling module sends auxiliary parameters corresponding to each sub-image to the NPU, the auxiliary parameters are used for the super-resolution processing of each sub-image, and the auxiliary parameters include a motion vector map, a depth map and global brightness information.
[0134] In a feasible implementation manner, any two adjacent sub-images among the multiple sub-images partially overlap or do not overlap.
[0135] In a feasible implementation manner, the NPU and the GPU are independent processing units or the NPU is integrated into the GPU.
[0136] Specifically, the above Fig.10 The specific execution process of each step in the embodiment can refer to the description in the corresponding embodiment above, which will not be repeated here.
[0137] An embodiment of the present application provides a chip system, which includes at least one processor, a memory and an interface circuit, wherein the memory, the interface circuit and the at least one processor are interconnected via lines, and instructions are stored in the at least one memory; when the instructions are executed by the processor, part or all of the steps of any one of the above-mentioned image super-resolution methods are implemented.
[0138] An embodiment of the present application provides a computer storage medium, which stores a computer program. When the computer program is executed, part or all of the steps of any one of the above-mentioned image super-resolution methods can be implemented.
[0139] An embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed by a processor, part or all of the steps of any one of the above-mentioned image super-resolution methods are implemented.
[0140] In the above embodiments, the description of each embodiment has its own emphasis. For the parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited to the described order of actions, because according to this application, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0141] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0142] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A terminal device, characterized in that: The terminal device comprises: A scheduling module is used to send multiple sub-images contained in the current frame to the neural network processor NPU, where the current frame is a low-resolution image obtained after low-resolution rendering by the graphics processor GPU; The NPU is used to perform super-resolution processing on the multiple sub-images in sequence according to a preset order.
2. The device according to claim 1, characterized in that The scheduling module is also used for: Configuring a block division method for the current frame and the complexity of a super-resolution processing algorithm; The plurality of sub-images are obtained after block processing according to the block processing method, and the image quality of the image obtained after the super-resolution processing is related to the complexity of the super-resolution processing algorithm.
3. The device according to claim 1 or 2, characterized in that After each of the sub-images is subjected to the super-resolution processing, a high-resolution image corresponding to each of the sub-images is obtained; the GPU is used for: According to the preset sequence, post-processing is performed on the high-resolution image corresponding to each of the sub-images in turn to obtain a display image corresponding to each of the sub-images; The post-processing includes halo effect, motion blur and depth of field effect.
4. The device according to claim 1 or 2, characterized in that After each of the sub-images is subjected to the super-resolution processing, a weight matrix corresponding to each of the sub-images is obtained; and the GPU is further used for: According to the preset order, each of the sub-images, the sub-image corresponding to each of the sub-images in the previous frame, and the weight matrix corresponding to each of the sub-images are sequentially fused, and the fused high-resolution image is post-processed to obtain a display image corresponding to each of the sub-images; The post-processing includes halo effect, motion blur and depth of field effect.
5. The device according to claim 4, characterized in that The multiple sub-images include a first sub-image, and the first sub-image corresponds to the second sub-image in the previous frame; The position of the first sub-image in the current frame is the same as the position of the second sub-image in the previous frame, and the previous frame is a high-resolution image obtained after the super-resolution processing.
6. The device according to any one of claims 1 to 5, characterized in that The terminal device further includes: A display is used to display the display image corresponding to each of the sub-images in sequence according to the preset order.
7. The device according to any one of claims 1 to 6, characterized in that The GPU is also used to: Before the NPU performs the super-resolution processing on the current frame, pre-processing the current frame; The preprocessing includes screen space reflection and screen space ambient occlusion.
8. The device according to any one of claims 3 to 7, characterized in that After completing the low-resolution rendering of the current frame, the GPU starts to perform the low-resolution rendering on the next frame; The priority of the low-resolution rendering is lower than the priority of the post-processing.
9. The device according to any one of claims 1 to 8, characterized in that The scheduling module is also used for: The auxiliary parameters corresponding to each of the sub-images are sent to the NPU, where the auxiliary parameters are used for the super-resolution processing of each of the sub-images, and the auxiliary parameters include a motion vector map, a depth map, and global brightness information.
10. The device according to any one of claims 1 to 9, characterized in that Any two adjacent sub-images among the multiple sub-images partially overlap or do not overlap.
11. The device according to any one of claims 1 to 10, characterized in that The NPU and the GPU are independent processing units or the NPU is integrated in the GPU.
12. An image super-resolution method, characterized in that: The method comprises: Sending multiple sub-images contained in the current frame to the neural network processor NPU through the scheduling module, wherein the current frame is a low-resolution image obtained after low-resolution rendering by the graphics processor GPU; According to a preset order, the NPU performs super-resolution processing on the multiple sub-images in sequence.
13. The method according to claim 12, characterized in that The method further comprises: The scheduling module configures the block division method of the current frame and the complexity of the super-resolution processing algorithm; The plurality of sub-images are obtained after block processing according to the block processing method, and the image quality of the image obtained after the super-resolution processing is related to the complexity of the super-resolution processing algorithm.
14. The method according to claim 12 or 13, characterized in that After each of the sub-images is subjected to the super-resolution processing, a high-resolution image corresponding to each of the sub-images is obtained; the method further comprises: According to the preset sequence, the GPU sequentially post-processes the high-resolution image corresponding to each of the sub-images to obtain a display image corresponding to each of the sub-images; The post-processing includes halo effect, motion blur and depth of field effect.
15. The method according to claim 12 or 13, characterized in that After each of the sub-images is subjected to the super-resolution processing, a weight matrix corresponding to each of the sub-images is obtained; the method further comprises: According to the preset order, the GPU sequentially fuses each of the sub-images, the sub-image corresponding to each of the sub-images in the previous frame, and the weight matrix corresponding to each of the sub-images, and post-processes the fused high-resolution image to obtain a display image corresponding to each of the sub-images; The post-processing includes halo effect, motion blur and depth of field effect.
16. The method according to claim 15, characterized in that The multiple sub-images include a first sub-image, and the first sub-image corresponds to the second sub-image in the previous frame; The position of the first sub-image in the current frame is the same as the position of the second sub-image in the previous frame, and the previous frame is a high-resolution image obtained after the super-resolution processing.
17. The method according to any one of claims 12 to 16, characterized in that: The method further comprises: According to the preset sequence, the display image corresponding to each of the sub-images is displayed in sequence by the display.
18. The method according to any one of claims 12 to 16, characterized in that: The method further comprises: Before the NPU performs the super-resolution processing on the current frame, the GPU performs pre-processing on the current frame; The preprocessing includes screen space reflection and screen space ambient occlusion.
19. The method according to any one of claims 14 to 18, characterized in that After completing the low-resolution rendering of the current frame, the GPU starts to perform the low-resolution rendering on the next frame; The priority of the low-resolution rendering is lower than the priority of the post-processing.
20. The method according to any one of claims 12 to 19, characterized in that The method further comprises: The scheduling module sends auxiliary parameters corresponding to each of the sub-images to the NPU, and the auxiliary parameters are used for the super-resolution processing of each of the sub-images. The auxiliary parameters include a motion vector map, a depth map, and global brightness information.
21. The method according to any one of claims 12 to 20, characterized in that Any two adjacent sub-images among the multiple sub-images partially overlap or do not overlap.
22. The method according to any one of claims 12 to 21, characterized in that The NPU and the GPU are independent processing units or the NPU is integrated in the GPU.
23. A chip system, characterized in that: The chip system includes at least one processor, a memory and an interface circuit. The memory, the interface circuit and the at least one processor are interconnected by lines. Instructions are stored in the at least one memory. When the instructions are executed by the processor, any method described in claims 12-22 is implemented.
24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method described in any one of claims 12 to 22 is implemented.
25. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed, the method according to any one of claims 12 to 22 is implemented.
Citation Information
Cited By
Terminal device and image super-resolution method
EP4697257A1
Terminal device and image super-resolution method
WO2024230751A1
