Method for processing video data and method for processing image data
The neural network algorithm is used to perform state separation and interpolation processing on the video, which solves the error interpolation problem of the optical flow interpolation method in complex scenes, improves the efficiency and reliability of video interpolation, and extends to image data processing to achieve efficient interpolation. Effect.
Patent Information
- Application Number
- CN202110187923.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-18
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-02-18
AI Technical Summary
Existing optical flow interpolation methods have the problem of erroneous interpolation in complex scenes, are highly dependent on optical flow estimation, require human knowledge and experience, and have poor scalability.
By separating the states of the video to be processed based on the neural network algorithm, determining the interpolable parts and performing interpolation processing, this avoids optical flow information estimation and improves the efficiency and reliability of interpolation.
The error rate of video interpolation is reduced, the efficiency and reliability of video interpolation are improved, effective processing of complex scenes is achieved, and it is versatile and can be applied to image data processing.
Smart Images

Figure CN114979703B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular, to a method for processing video data and a method for processing image data. Background Art
[0002] With the rapid development of society and technology, people have higher and higher requirements for video quality, but a large number of videos cannot meet users' needs for high definition and high frame rate. Currently, video quality can be improved through related video processing technologies, among which high frame rate of video can be achieved through video interpolation algorithms.
[0003] In the prior art, optical flow information is usually used to guide video interpolation. Video interpolation algorithms play an increasingly important role in improving video frame rate and quality, but the scenes and motions in real videos are too complex, and there are errors in the estimation of optical flow information, so that in these scenes, the results of processing videos based on existing optical flow methods are not ideal.
[0004] The existing algorithms that support video frame insertion at any time have three main problems:
[0005] (1) It is highly dependent on optical flow estimation. Without explicit optical flow estimation results, it cannot be processed. In addition, optical flow estimation has errors in real complex scenes.
[0006] (2) A large amount of reliance on human knowledge and experience, mainly in terms of how to use optical flow estimation information;
[0007] (3) The network model needs to be carefully designed, and the network model can only be applied to video frame insertion and cannot be applied to other aspects, and has poor scalability.
[0008] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0009] The embodiments of the present application provide a method for processing video data and a method for processing image data, so as to at least solve the technical problem that the existing optical flow interpolation method has erroneous interpolation when performing video interpolation.
[0010] According to one aspect of an embodiment of the present application, a method for processing video data is provided, including: obtaining a video to be processed; performing state separation processing on the video to be processed based on a preset neural network algorithm to obtain a first part and a second part of the video to be processed, wherein the first part is a part of the video to be processed where interpolation operations are allowed, and the second part is a part of the video to be processed where interpolation operations are prohibited; performing interpolation processing on the first part to obtain an interpolation part; and performing synthesis processing on the second part and the interpolation part to obtain a target video.
[0011] According to another aspect of an embodiment of the present application, a method for processing video data is also provided, including: displaying a video to be processed in an interactive interface; when the interactive interface receives a separation instruction, obtaining a separation result of the video to be processed, wherein a preset neural network model is used to perform state separation on the video to be processed, and the separation result includes: a first part of the video to be processed in which interpolation operations are allowed, and a second part in which interpolation operations are prohibited; displaying a target video in the interactive interface, wherein the target video is obtained by synthesizing a result of interpolation processing on the first part and the second part.
[0012] According to another aspect of an embodiment of the present application, a method for processing video data is also provided, including: during the playback of a video to be processed, detecting a control instruction sent by a client, wherein the control instruction is used to adjust the frame rate of the video to be processed; based on the control instruction, using a preset neural network algorithm to perform state separation processing on the video to be processed, and interpolating a portion of the video to be processed that allows interpolation to obtain a target video; and feeding the target video back to the client, wherein the client plays the target video.
[0013] According to another aspect of an embodiment of the present application, a method for processing image data is also provided, including: acquiring a plurality of continuously changing images to be processed; performing state separation on the plurality of images to be processed based on a preset neural network model, and performing interpolation processing on parts of the plurality of images to be processed that allow interpolation operations, to obtain a target image; and displaying the target image.
[0014] According to another aspect of an embodiment of the present application, a device for processing image data is also provided, including: an acquisition module, used to acquire a video to be processed; a separation module, used to perform state separation processing on the video to be processed based on a preset neural network algorithm, to obtain a first part and a second part in the video to be processed, wherein the first part is a part of the video to be processed where interpolation operation is allowed, and the second part is a part of the video to be processed where interpolation operation is prohibited; an interpolation module, used to perform interpolation processing on the first part to obtain an interpolation part; and a synthesis module, used to perform synthesis processing on the second part and the interpolation part to obtain a target video.
[0015] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above-mentioned method for processing video data.
[0016] According to another aspect of an embodiment of the present application, a processor is further provided, the processor being used to run a program, wherein the program executes the above-mentioned method for processing video data when running.
[0017] According to another aspect of an embodiment of the present application, a computing device is also provided, including: a processor; and a memory, connected to the processor, for providing the processor with instructions for processing the following processing steps: obtaining a video to be processed; performing state separation processing on the video to be processed based on a preset neural network algorithm to obtain a first part and a second part in the video to be processed, wherein the first part is a part of the video to be processed where interpolation operations are allowed, and the second part is a part of the video to be processed where interpolation operations are prohibited; performing interpolation processing on the first part to obtain an interpolation part; and performing synthesis processing on the second part and the interpolation part to obtain a target video.
[0018] In an embodiment of the present application, a state separation processing method is adopted for the video to be processed. After obtaining the video to be processed, the video to be processed is subjected to state separation processing based on a preset neural network algorithm to obtain a first part of the video to be processed in which interpolation operation is allowed and a second part in which interpolation operation is prohibited, and the first part is interpolated to obtain an interpolation part. Finally, the second part and the interpolation part are synthesized to obtain a target video.
[0019] In the above process, it is not necessary to estimate the optical flow information, thereby avoiding the problem of erroneous interpolation caused by estimating the optical flow information and improving the efficiency of video interpolation. In addition, in the present application, a neural network algorithm is used to separate the state of the video to be processed to determine the interpolable part of the video to be processed. This process does not require human knowledge and experience, thereby improving the reliability of interpolation of the video to be processed. Finally, in addition to processing video data, the solution provided by the present application can also process images with continuous and orderly changes, making the solution provided by the present application universal.
[0020] It can be seen that the solution provided in the present application achieves the purpose of reducing the error rate of video interpolation, thereby achieving the technical effect of improving the efficiency of video interpolation, and further solving the technical problem of erroneous interpolation in the existing optical flow interpolation method when performing video interpolation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 is a schematic diagram of an optional computing device according to an embodiment of the present application;
[0023] Figure 2 is a flowchart of a method for processing video data according to an embodiment of the present application;
[0024] Figure 3is a schematic diagram of an optional neural network model according to an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of an optional U-shaped network structure according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of a structure of an optional synthetic network according to an embodiment of the present application;
[0027] Figure 6 is a flow chart of a method for processing image data according to an embodiment of the present application;
[0028] Figure 7 is an optional framework diagram for processing image data according to an embodiment of the present application;
[0029] Figure 8 is a schematic diagram of a device for processing video data according to an embodiment of the present application;
[0030] Fig. 9 is a structural block diagram of a computing device according to an embodiment of the present application;
[0031] Fig.10 is a flowchart of a method for processing video data according to an embodiment of the present application;
[0032] Fig.11 is a flowchart of a method for processing video data according to an embodiment of the present application;
[0033] Fig.12 This is a framework diagram of an optional method for processing video data according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. 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 comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0037] Video interpolation refers to a method of using an interpolation algorithm to obtain a frame at any time between two consecutive frames of a video.
[0038] Optical flow is a method for analyzing moving images, in which optical flow is the apparent movement of the image brightness pattern, which contains information about the movement of the target and is often used to determine the movement of the target.
[0039] Example 1
[0040] According to an embodiment of the present application, an embodiment of a method for processing video data is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computing device or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computing device (or mobile device) for implementing a method for processing video data. Figure 1 As shown, the computing device 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0042] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computing device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0043] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for processing video data in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned method for processing video data is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computing device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0044] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0045] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of computing device 10 (or mobile device).
[0046] Here, it should be noted that, in some optional embodiments, the above Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or mobile device).
[0047] In addition, the execution subject of the method for processing video data provided in this embodiment may be a terminal device capable of playing videos (eg, a computer, a smart phone, a smart tablet, etc.), or a server.
[0048] Optionally, the clarity and / or frame rate of the local video stored on the terminal device is usually not adjustable. However, by adopting the solution provided in the present application, when a user watches a video stored locally on the terminal device through the terminal device, the user can control the terminal device to interpolate the local video to improve the clarity and / or frame rate of the local video.
[0049] Optionally, when a user watches an online video through a terminal device, the user can send an adjustment instruction for adjusting the clarity and / or frame rate of the online video to the server by operating the terminal device. After receiving the adjustment instruction, the server uses the method provided in this embodiment to interpolate the online video so that the clarity and / or frame rate of the processed online video meets the user's needs.
[0050] It should be noted that, in this embodiment, the server is used as the execution subject for description.
[0051] Optionally, under the above operating environment, this application provides the following Figure 2 The method of processing video data is shown. Figure 2 is a flowchart of a method for processing video data according to Embodiment 1 of the present application, comprising Figure 2 It can be seen that the method includes the following steps:
[0052] Step S202, obtaining the video to be processed.
[0053] Optionally, when the user is watching an online video (i.e., the video to be processed) through a terminal device, the user needs to adjust the clarity of the online video. At this time, the user can click the clarity adjustment control in the client that plays the online video on the terminal device to determine the target clarity. After determining the target clarity, the terminal device sends the clarity adjustment instruction to the server, and the server parses the clarity adjustment instruction to obtain the target clarity and the video information of the online video that needs to adjust the clarity (e.g., video link address, video name, etc.). The server obtains the online video based on the video information, and adjusts the clarity of the online video with the target clarity as the target.
[0054] Step S204: performing state separation processing on the video to be processed based on a preset neural network algorithm to obtain a first part and a second part in the video to be processed.
[0055] In step S204, the first part is the part of the video to be processed where interpolation operation is allowed, and the second part is the part of the video to be processed where interpolation operation is prohibited. It can be seen that through step S204, the video to be processed can be divided into an interpolation-allowable part and a non-interpolation-allowable part.
[0056] It should be noted that in step S204, the server uses a preset neural network algorithm to achieve state separation of the video to be processed. This process does not need to rely on human knowledge and experience. Compared with the existing optical flow method, it improves the reliability of interpolation processing of the video to be processed and avoids the problem of interpolation errors in estimating optical flow information.
[0057] Step S206: perform interpolation processing on the first part to obtain an interpolated part.
[0058] It should be noted that, since the first part is an interpolable part in the video to be processed, the server may perform linear interpolation on the first part to obtain an interpolated part. Optionally, the server may use an existing interpolation algorithm to interpolate the interpolable part in the video to be processed, wherein the interpolation algorithm may be, but is not limited to, SepConv algorithm, SuperSloMo algorithm, DAIN algorithm, BMBC algorithm, RIFE algorithm, QVI algorithm, CyclicGen algorithm, etc.
[0059] Step S208, synthesizing the second part and the interpolation part to obtain a target video.
[0060] It should be noted that, since the state separation processing is performed on the video to be processed in step S204, in order to ensure the integrity of the video, after the interpolation processing is performed on the interpolable part of the video to be processed, it is also necessary to synthesize the interpolation part after the interpolation processing and the prohibited interpolation part to obtain the target video for the user to watch.
[0061] Optionally, after the server synthesizes the second part and the interpolation part to obtain the target video, the server may send the target video to the terminal device so that the terminal device plays the target video. Alternatively, the server may store the target video in the cloud and send the target network link corresponding to the target video to the terminal device, and the terminal device may switch the network link corresponding to the video to be processed to the target network link corresponding to the target video, and play the target video with higher definition through the target network link.
[0062] Based on the scheme defined by the above steps S202 to S208, it can be known that in the embodiment of the present application, a state separation processing method is adopted for the video to be processed. After obtaining the video to be processed, the video to be processed is subjected to state separation processing based on a preset neural network algorithm to obtain a first part of the video to be processed in which interpolation operation is allowed and a second part in which interpolation operation is prohibited, and the first part is interpolated to obtain an interpolation part. Finally, the second part and the interpolation part are synthesized to obtain a target video.
[0063] It is easy to notice that in the above process, it is not necessary to estimate the optical flow information, thereby avoiding the problem of erroneous interpolation caused by estimating the optical flow information and improving the efficiency of video interpolation. In addition, in the present application, a neural network algorithm is used to separate the state of the video to be processed to determine the interpolable part of the video to be processed. This process does not require human knowledge and experience, thereby improving the reliability of interpolation of the video to be processed. Finally, in addition to processing video data, the solution provided by the present application can also process images with continuous and orderly changes, making the solution provided by the present application universal.
[0064] It can be seen that the solution provided in the present application achieves the purpose of reducing the error rate of video interpolation, thereby achieving the technical effect of improving the efficiency of video interpolation, and further solving the technical problem of erroneous interpolation in the existing optical flow interpolation method when performing video interpolation.
[0065] In an optional embodiment, after obtaining the video to be processed, the server performs state separation processing on the video to be processed based on a preset neural network algorithm to obtain the first part and the second part of the video to be processed. Specifically, the server first obtains the first frame image and the second frame image in the video to be processed, and then inputs the first frame image and the second frame image into the first network in a first order, and inputs the first frame image and the second frame image into the second network in a second order, and finally, based on the first network and the second network, performs state separation processing on the first frame image and the second frame image to obtain the first part and the second part. The first frame image and the second frame image are two consecutive adjacent frames of images.
[0066] Optional, Figure 3 A schematic diagram of an optional neural network model is shown, consisting of Figure 3 It can be seen that the neural network model consists of a U-shaped network and a composite network, wherein the U-shaped network includes two sub-networks (the first network and the second network), that is, the first network and the second network mentioned above are both U-shaped networks. It should be noted that the U-shaped network is a network that classifies images as a whole, wherein the U-shaped network has an upsampling and downsampling network structure, where downsampling is used to gradually display environmental information, and upsampling is used to combine the downsampling layer information and the upsampling input information to restore the detail information, and gradually restore the image accuracy.
[0067] It should be noted that the network structures of the first network and the second network are exactly the same, and the convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network, that is, the first network and the second network share weights. Among them, weight sharing means that when the first network and the second network scan an image, the image is scanned by the convolution kernels in the first network and the second network, and the value in the convolution kernel is the weight of the network. In the application, each position in the same image is scanned by the same convolution kernel. Therefore, the weight value is shared when the first network and the second network scan the image.
[0068] In addition, Figure 3 In , the order of images input to the two networks is opposite, that is, the first order of images input to the first network is the reverse of the second order of images input to the second network. Figure 3 In , the order of images input to the first network is (I0, I1), and the order of images input to the second network is (I1, I0). Where I0 and I1 represent two consecutive frames of images in the video to be processed.
[0069] In an optional embodiment, the first network and the second network perform state separation processing on the first frame image and the second frame image to obtain the first part and the second part. Specifically, the server first obtains a preset separation ratio, and in the first network, performs state separation processing on the first frame image and the second frame image based on the preset separation ratio to obtain the third part and the fourth part, and in the second network, performs state separation processing on the first frame image and the second frame image based on the preset separation ratio to obtain the fifth part and the sixth part, wherein the first part includes the third part and the fifth part, and the second part includes the fourth part and the sixth part.
[0070] It should be noted that, in the above process, the state of the video to be processed is separated in the first network and the second network respectively, and the interpolation part and the prohibited interpolation part separated by each network are obtained, among which the third part and the fifth part are the interpolation parts, and the fourth part and the sixth part are the non-interpolation parts.
[0071] Optionally, the server may obtain a preset separation ratio, which is used to determine the proportion of the interpolable part in the video to be processed. The separation ratio may be a fixed value, that is, the same separation ratio is sampled for all videos for state separation. The separation ratio may also be an adaptive ratio, that is, different separation ratios are used for state separation for different videos, for example, the separation ratio is determined according to video parameters such as the image size and resolution of the video to be processed.
[0072] It should be noted that, unlike the traditional U-shaped network, the U-shaped network in the present application can receive additional time t and 1-t as input in the decoding part and act on each layer of the decoding part.
[0073] In an optional embodiment, after obtaining the interpolable part in the video to be processed, the server performs interpolation processing on the interpolable part to obtain the interpolated part. Specifically, the server first obtains the first interpolation time and the second interpolation time, and calculates the product of the first interpolation time and the third part to obtain the first result, and calculates the product of the second interpolation time and the fifth part to obtain the second result, and finally obtains the interpolated part according to the first result and the second result. The sum of the first interpolation time and the second interpolation time is a constant;
[0074] Optional, in Figure 4 In the structural diagram of the U-shaped network shown in the figure, the black rectangle and the white rectangle form a feature layer. According to the preset separation ratio (for example, 50%), the white rectangle is extracted as the interpolable part and the black part is the non-interpolable part. Then, the white rectangle is composed of the interpolable feature layer. For example, Figure 4 The P and Q in compose the interpolable feature layer. Then, the server obtains the interpolation time, multiplies the interpolation time by the interpolable feature layer, and obtains the interpolable part.
[0075] It should be noted that the structure of the U-shaped network is not limited to Figure 4 In the structure shown, the depth and number of channels of the U-shaped network can be set according to actual needs, and are not specifically limited in this embodiment. In addition, in the above process, the interpolation time can also be set according to actual needs. For example, it can be determined according to the original resolution and target resolution of the video to be processed. For two networks (i.e., the first network and the second network), the sum of their corresponding interpolation times is a constant. For example, the first interpolation time corresponding to the first network is t, and the interpolation time corresponding to the second network can be 1-t. In the process of determining the interpolation part in the video to be processed, t is multiplied by the interpolable feature layer in the first network to obtain a first result; 1-t is multiplied by the interpolable feature layer in the second network to obtain a second result. Finally, the interpolation part of the video to be processed can be obtained according to the first result and the second result.
[0076] Further, after the state of the video to be processed is separated in the U-shaped network to obtain the interpolation part, the server synthesizes the part of the video to be processed where the interpolation operation is prohibited and the interpolation part through the synthesis network to obtain the target video. Specifically, the server inputs the second part and the interpolation part into the synthesis network, and synthesizes the second part and the interpolation part based on the synthesis network to obtain the target video (for example, Figure 3 I t ).
[0077] Optional, Figure 5 A schematic diagram of the structure of an optional synthesis network is shown. Figure 5 The synthesis network shown includes a downsampling part, an upsampling part and a side part.
[0078] It should be noted that the structure of the synthetic network is not limited to Figure 5 The network structure shown can be used to set up multiple synthesis networks with different structures in actual applications. As an alternative, when performing synthesis operations on the interpolation part and the part where interpolation operations are prohibited, a suitable synthesis network can be selected for synthesis processing based on the video parameters of the video to be processed. This can not only save the time of video synthesis, improve the efficiency of video synthesis, but also ensure the reliability of video synthesis.
[0079] From the above content, it can be seen that the solution provided by this application uses a deep learning network to learn and decouple the video to be processed, and then only performs linear interpolation operations on the video part corresponding to the interpolable state. In this way, an interpolation algorithm that does not rely on optical flow estimation information and can still obtain interpolation effects at any time is implemented, and has good effects in complex scenes and motion.
[0080] Moreover, the solution for state separation of the video to be processed provided by the present application realizes continuous video interpolation at any time, and no longer needs to rely on error-prone optical flow estimation information and human experience, thereby ensuring the reliability of video interpolation.
[0081] It should be noted that the idea of state separation provided in this application can be applied to processing other continuous and orderly changes, such as image deformation, image stylization and other scenarios, making the solution provided in this application universal.
[0082] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can 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 the present application.
[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method for processing video data according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0084] Example 2
[0085] According to an embodiment of the present application, a method for processing image data is also provided, such as Figure 6 As shown, the method comprises the following steps:
[0086] Step S602: Acquire a plurality of continuously changing images to be processed.
[0087] It should be noted that the essence of the image generation task is to learn a mapping from input to output, in which the image-to-image model framework can be used to achieve the learning of the mapping relationship from input to output. However, in the prior art, the output of the image-to-image model framework is single, that is, given an input, only a unique output can be obtained. But in real scenes, many changes are continuous, for example, the deformation process from a cat image to a dog image, and the process of changing a face image from young to old.
[0088] In this embodiment, the image to be processed is an image that changes in an orderly and continuous manner. The image that changes in an orderly and continuous manner may be a deformed image or a stylized image.
[0089] In addition, it should be noted that the execution subject of this embodiment can be a terminal device (for example, a computer, a smart phone, a smart tablet, etc.) or a server. In this embodiment, the server is used as the execution subject for description.
[0090] Optionally, when viewing an online image (i.e., the above-mentioned image to be processed) through a terminal device, the user needs to adjust the clarity of the online image. At this time, the user can click the clarity adjustment control on the terminal device to determine the target clarity. After determining the target clarity, the terminal device sends the clarity adjustment instruction to the server, and the server parses the clarity adjustment instruction to obtain the target clarity and image information of the online image that needs to adjust the clarity (e.g., image link address, image name, etc.). The server obtains the online image based on the image information, and adjusts the clarity of the online image with the target clarity as the target.
[0091] Step S604, performing state separation on the multiple images to be processed based on a preset neural network model, and performing interpolation processing on the parts of the multiple images to be processed that allow interpolation operations, to obtain a target image.
[0092] In step S604, the state of the image to be processed is separated into a part where interpolation is allowed and a part where interpolation is prohibited. Figure 7 An optional framework diagram for processing image data is shown, comprising Figure 7 It can be seen that after obtaining the image to be processed, the server performs state separation on the image to be processed, and obtains a separation result to divide the image to be processed into a part that allows interpolation and a part that prohibits interpolation. Then, only the part that allows interpolation in the separation result is interpolated to obtain an interpolation result. Finally, synthesis processing is performed to obtain the target image, and the target image is output.
[0093] It should be noted that in step S604, the server uses a preset neural network model to achieve state separation of the image to be processed. This process does not need to rely on human knowledge and experience. Compared with the existing optical flow method, it improves the reliability of interpolation processing of the image to be processed and avoids the problem of interpolation errors in estimating optical flow information.
[0094] Step S606: display the target image.
[0095] Based on the scheme defined by the above steps S602 to S606, it can be known that in an embodiment of the present application, a method of performing state separation processing on a plurality of continuously changing images to be processed is adopted. After obtaining a plurality of continuously changing images to be processed, a state separation processing is performed on the plurality of continuously changing images to be processed based on a preset neural network model, and interpolation processing is performed on the parts of the plurality of images to be processed that allow interpolation operations, so as to obtain a target image, and display the target image.
[0096] It is easy to notice that in the above process, it is not necessary to estimate the optical flow information, thereby avoiding the problem of erroneous interpolation caused by estimating the optical flow information and improving the efficiency of image interpolation. In addition, in the present application, a neural network algorithm is used to separate the state of the image to be processed to determine the interpolable part of the image to be processed. This process does not require human knowledge and experience, thereby improving the reliability of interpolation of the image to be processed. Finally, in addition to processing image data, the solution provided by the present application can also process video data, making the solution provided by the present application universal.
[0097] It can be seen that the solution provided in the present application achieves the purpose of reducing the error rate of image interpolation, thereby achieving the technical effect of improving the efficiency of image interpolation, and further solving the problem of erroneous interpolation existing in the existing optical flow interpolation algorithm when interpolating images.
[0098] In an optional embodiment, after obtaining a plurality of images to be processed, the server performs state separation on the plurality of images to be processed, and performs interpolation processing on the parts of the plurality of images to be processed that allow interpolation operations, to obtain a target image. Specifically, the server performs state separation on the plurality of images to be processed based on a preset neural network model to obtain a first part and a second part, then performs interpolation processing on the first part to obtain an interpolation part, and finally performs synthesis processing on the second part and the interpolation part to obtain a target image. The first part is the part of the plurality of images to be processed that allows interpolation operations, and the second part is the part of the plurality of images to be processed that prohibits interpolation operations.
[0099] It should be noted that, since the first part is an interpolable part in the image to be processed, the server may perform linear interpolation on the first part to obtain an interpolated part. Optionally, the server may use an existing interpolation algorithm to interpolate the interpolable part in the image to be processed, wherein the interpolation algorithm may be, but is not limited to, SepConv algorithm, SuperSloMo algorithm, DAIN algorithm, BMBC algorithm, RIFE algorithm, QVI algorithm, CyclicGen algorithm, etc.
[0100] In addition, it should be noted that, since the state separation processing is performed on the image to be processed in step S604, in order to ensure the integrity of the image, after the interpolation processing is performed on the interpolable part of the image to be processed, it is also necessary to synthesize the interpolation part after the interpolation processing with the part where interpolation is prohibited to obtain the target image for the user to view.
[0101] Optionally, after the server synthesizes the second part and the interpolation part to obtain the target image, the server may send the target image to the terminal device so that the terminal device displays the target image. Alternatively, the server may store the target image in the cloud and send the target network link corresponding to the target image to the terminal device, and the terminal device may switch the network link corresponding to the image to be processed to the target network link corresponding to the target image, and display the target image with higher definition through the target network link.
[0102] It should be noted that the state separation processing, interpolation processing and synthesis processing of the image to be processed in this embodiment are substantially the same as the processing of the video to be processed in Example 1, the only difference is that Example 1 processes video data, while this embodiment processes image data. The specific technical details have been described in Example 1 and will not be repeated here.
[0103] Example 3
[0104] According to an embodiment of the present application, a method for processing video data is also provided, such as Fig.10 As shown, the method comprises the following steps:
[0105] Step S1002: display the video to be processed in the interactive interface.
[0106] Optionally, in step S1002, the interactive interface may be an interactive interface displayed by a terminal device.
[0107] In an optional embodiment, when a user is watching an online video (i.e., the video to be processed) through a terminal device, the user needs to adjust the clarity of the online video. At this time, the user can click the clarity adjustment control in the client that plays the online video on the terminal device to determine the target clarity. After determining the target clarity, the terminal device sends the clarity adjustment instruction to the server, and the server parses the clarity adjustment instruction to obtain the target clarity and the video information of the online video that needs to adjust the clarity (e.g., video link address, video name, etc.). The server obtains the online video based on the video information, and adjusts the clarity of the online video with the target clarity as the target.
[0108] Step S1004, when the interactive interface receives a separation instruction, obtain the separation result of the video to be processed, wherein a preset neural network model is used to perform state separation on the video to be processed, and the separation result includes: a first part of the video to be processed in which interpolation operation is allowed, and a second part in which interpolation operation is prohibited.
[0109] In step S1004, the preset neural network model may be composed of a U-shaped network and a synthetic network, wherein the U-shaped network is used to separate the processed video to obtain a first part and a second part, and interpolate the first part that allows interpolation operations. Optionally, the U-shaped network includes two subnetworks (a first network and a second network), the network structures of the first network and the second network are exactly the same, and the convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network, that is, the first network and the second network share weights. Moreover, the order of images input into the two networks is opposite, that is, the first order of images input into the first network and the second order of images input into the second network are opposite to each other.
[0110] It should be noted that the server uses a preset neural network model to achieve state separation of the video to be processed. This process does not rely on human knowledge and experience. Compared with the existing optical flow method, it improves the reliability of interpolation processing of the video to be processed and avoids the problem of interpolation errors in estimating optical flow information.
[0111] Step S1006, displaying the target video in the interactive interface, wherein the target video is obtained by synthesizing the result of interpolation processing on the first part and the second part.
[0112] It should be noted that, since the state separation processing is performed on the video to be processed in step S1004, in order to ensure the integrity of the video, after the interpolation processing is performed on the interpolable part of the video to be processed, it is also necessary to synthesize the interpolation part after the interpolation processing with the prohibited interpolation part to obtain the target video for the user to watch.
[0113] Based on the scheme defined by the above steps S1002 to S1006, it can be known that in the embodiment of the present application, a state separation processing method is adopted for the video to be processed. After obtaining the video to be processed, the video to be processed is subjected to state separation processing based on a preset neural network algorithm to obtain a first part of the video to be processed in which interpolation operation is allowed and a second part in which interpolation operation is prohibited, and the first part is interpolated to obtain an interpolation part. Finally, the second part and the interpolation part are synthesized to obtain a target video.
[0114] It is easy to notice that in the above process, it is not necessary to estimate the optical flow information, thereby avoiding the problem of erroneous interpolation caused by estimating the optical flow information and improving the efficiency of video interpolation. In addition, in the present application, a neural network algorithm is used to separate the state of the video to be processed to determine the interpolable part of the video to be processed. This process does not require human knowledge and experience, thereby improving the reliability of interpolation of the video to be processed. Finally, in addition to processing video data, the solution provided by the present application can also process images with continuous and orderly changes, making the solution provided by the present application universal.
[0115] It can be seen that the solution provided in the present application achieves the purpose of reducing the error rate of video interpolation, thereby achieving the technical effect of improving the efficiency of video interpolation, and further solving the technical problem of erroneous interpolation in the existing optical flow interpolation method when performing video interpolation.
[0116] In an optional embodiment, in the present application, the terminal device may also respond to a user's selection instruction, determine the part to be displayed from the separation result, and display the part to be displayed.
[0117] Optionally, during the process of the server processing the video to be processed, the terminal device may display the first part and the second part of the video to be processed after the state is separated. The user may choose to display all, or display the first part or the second part, or not display all according to their needs. Optionally, by default, the first part and the second part after the state is separated are not displayed.
[0118] It should be noted that the state separation processing, interpolation processing and synthesis processing of the video to be processed in Example 1 can be applied to this embodiment. The specific technical details have been described in Example 1 and will not be repeated here.
[0119] Example 4
[0120] According to an embodiment of the present application, a method for processing video data is also provided, such as Fig.11 As shown, the method comprises the following steps:
[0121] Step S1102: During the playback of the video to be processed, a control instruction sent by the client is detected, wherein the control instruction is used to adjust the frame rate of the video to be processed.
[0122] In step S1102, the video to be processed may be a short video / live video in an e-commerce live broadcast scenario. For example, in an e-commerce live broadcast selling scenario, the user wants to watch a live video with higher definition. At this time, the user operates the control of adjusting the video frame rate on the client to send a control instruction to adjust the video frame rate to the server, so that the server obtains the control instruction. In addition, the above-mentioned video to be processed may also be a teaching video or a distance education video in an educational scenario, various videos in an entertainment scenario, etc. The corresponding method of generating control instructions is the same as the above method, which will not be repeated here.
[0123] Step S1104, based on the control instruction, a preset neural network algorithm is used to perform state separation processing on the video to be processed, and interpolation processing is performed on the part of the video to be processed that allows interpolation, so as to obtain a target video.
[0124] In an optional embodiment, Fig.12 A framework diagram of an optional method for processing video data is shown, comprising Fig.12 It can be seen that after the client sends the control instruction, the server receives the control instruction, obtains the video to be processed according to the control instruction, and performs state separation on the video to be processed to obtain a separation result, wherein the first part of the separation result is the part that allows interpolation, and the second part is the part that prohibits interpolation, and then the first part that allows interpolation is interpolated to obtain an interpolation result, and finally the second part and the first part are synthesized to obtain the above-mentioned target video.
[0125] Optionally, the neural network model corresponding to the preset neural network algorithm can be composed of a U-shaped network and a synthetic network, wherein the U-shaped network is used to separate the processed video to obtain the first part and the second part, and interpolate the first part that allows interpolation operations. Optionally, the U-shaped network includes two sub-networks (a first network and a second network), the network structures of the first network and the second network are exactly the same, and the convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network, that is, the first network and the second network share weights. Moreover, the order of images input into the two networks is opposite, that is, the first order of images input into the first network and the second order of images input into the second network are opposite to each other.
[0126] It should be noted that the server uses a preset neural network algorithm to achieve state separation of the video to be processed. This process does not rely on human knowledge and experience. Compared with the existing optical flow method, it improves the reliability of interpolation processing of the video to be processed and avoids the problem of interpolation errors in estimating optical flow information.
[0127] Step S1106, feeding back the target video to the client, wherein the client plays the target video.
[0128] Optional, such as Fig.12 As shown, after the server obtains the target video, it outputs the target video to the client. At this time, the video played by the client is the interpolated video.
[0129] Based on the scheme defined by the above steps S1102 to S1106, it can be known that in the embodiment of the present application, a state separation processing method is adopted for the video to be processed. After obtaining the video to be processed, the video to be processed is subjected to state separation processing based on a preset neural network algorithm to obtain a first part of the video to be processed in which interpolation operation is allowed and a second part in which interpolation operation is prohibited, and the first part is interpolated to obtain an interpolation part. Finally, the second part and the interpolation part are synthesized to obtain a target video.
[0130] It is easy to notice that in the above process, it is not necessary to estimate the optical flow information, thereby avoiding the problem of erroneous interpolation caused by estimating the optical flow information and improving the efficiency of video interpolation. In addition, in the present application, a neural network algorithm is used to separate the state of the video to be processed to determine the interpolable part of the video to be processed. This process does not require human knowledge and experience, thereby improving the reliability of interpolation of the video to be processed. Finally, in addition to processing video data, the solution provided by the present application can also process images with continuous and orderly changes, making the solution provided by the present application universal.
[0131] It can be seen that the solution provided in the present application achieves the purpose of reducing the error rate of video interpolation, thereby achieving the technical effect of improving the efficiency of video interpolation, and further solving the technical problem of erroneous interpolation in the existing optical flow interpolation method when performing video interpolation.
[0132] It should be noted that the state separation processing, interpolation processing and synthesis processing of the video to be processed in Example 1 can be applied to this embodiment. The specific technical details have been described in Example 1 and will not be repeated here.
[0133] Example 5
[0134] According to an embodiment of the present application, a device for implementing the above-mentioned method for processing video data is also provided. Figure 8 As shown, the device 80 includes: an acquisition module 801 , a separation module 803 , an interpolation module 805 and a synthesis module 807 .
[0135] Among them, the acquisition module 801 is used to acquire the video to be processed; the separation module 803 is used to perform state separation processing on the video to be processed based on a preset neural network algorithm to obtain the first part and the second part of the video to be processed, wherein the first part is the part of the video to be processed where interpolation operation is allowed, and the second part is the part of the video to be processed where interpolation operation is prohibited; the interpolation module 805 is used to perform interpolation processing on the first part to obtain the interpolation part; the synthesis module 807 is used to perform synthesis processing on the second part and the interpolation part to obtain the target video.
[0136] It should be noted that the acquisition module 801, separation module 803, interpolation module 805 and synthesis module 807 correspond to steps S202 to S208 in Example 1, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the apparatus, can be run in the computing device 10 provided in Example 1.
[0137] Optionally, the separation module includes: a first acquisition module, a first input module, a second input module and a first separation module. The first acquisition module is used to acquire the first frame image and the second frame image in the video to be processed, wherein the first frame image and the second frame image are two consecutive adjacent frames of images; the first input module is used to input the first frame image and the second frame image into the first network in a first order; the second input module is used to input the first frame image and the second frame image into the second network in a second order, wherein the first order and the second order are reversed; the first separation module is used to perform state separation processing on the first frame image and the second frame image based on the first network and the second network to obtain the first part and the second part.
[0138] Optionally, the convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network.
[0139] Optionally, the first separation module includes: a second acquisition module, a second separation module and a third separation module. The second acquisition module is used to acquire a preset separation ratio; the second separation module is used to perform state separation processing on the first frame image and the second frame image based on the preset separation ratio in the first network to obtain the third part and the fourth part; the third separation module is used to perform state separation processing on the first frame image and the second frame image based on the preset separation ratio in the second network to obtain the fifth part and the sixth part, wherein the first part includes the third part and the fifth part, and the second part includes the fourth part and the sixth part.
[0140] Optionally, the interpolation module includes: a third acquisition module, a first calculation module, a second calculation module and a processing module. The third acquisition module is used to acquire a first interpolation time and a second interpolation time, wherein the sum of the first interpolation time and the second interpolation time is a constant; the first calculation module is used to calculate the product of the first interpolation time and the third part to obtain a first result; the second calculation module is used to calculate the product of the second interpolation time and the fifth part to obtain a second result; and the processing module is used to obtain the interpolation part according to the first result and the second result.
[0141] Optionally, the synthesis module includes: a third input module and a synthesis submodule. The third input module is used to input the second part and the interpolation part into the synthesis network; the synthesis submodule is used to perform synthesis processing on the second part and the interpolation part based on the synthesis network to obtain the target video.
[0142] Example 6
[0143] The embodiment of the present application may provide a computing device, which may be any computing device in a computing device group. Optionally, in this embodiment, the computing device may also be replaced by a terminal device such as a mobile terminal.
[0144] Optionally, in this embodiment, the computing device may be located in at least one network device among a plurality of network devices of a computer network.
[0145] In this embodiment, the above-mentioned computing device can execute the program code of the following steps in the method for processing video data: obtaining the video to be processed; performing state separation processing on the video to be processed based on a preset neural network algorithm to obtain a first part and a second part in the video to be processed, wherein the first part is a part of the video to be processed where interpolation operation is allowed, and the second part is a part of the video to be processed where interpolation operation is prohibited; performing interpolation processing on the first part to obtain an interpolation part; performing synthesis processing on the second part and the interpolation part to obtain a target video.
[0146] Optionally, Fig. 9 is a structural block diagram of a computing device according to an embodiment of the present application. Fig. 9 As shown, the computing device 9 may include: one or more (only one is shown in the figure) processors 902 , a memory 904 , and a peripheral interface 906 .
[0147] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the method and device for processing video data in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method for processing video data. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computing device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0148] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the video to be processed; perform state separation processing on the video to be processed based on a preset neural network algorithm to obtain the first part and the second part of the video to be processed, wherein the first part is the part of the video to be processed where interpolation operation is allowed, and the second part is the part of the video to be processed where interpolation operation is prohibited; perform interpolation processing on the first part to obtain the interpolation part; perform synthesis processing on the second part and the interpolation part to obtain the target video.
[0149] Optionally, the processor may also execute program codes of the following steps: obtaining a first frame image and a second frame image in a video to be processed, wherein the first frame image and the second frame image are two consecutive adjacent frames of images; inputting the first frame image and the second frame image into a first network in a first order; inputting the first frame image and the second frame image into a second network in a second order, wherein the first order and the second order are reversed to each other; performing state separation processing on the first frame image and the second frame image based on the first network and the second network to obtain a first part and a second part.
[0150] Optionally, the convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network.
[0151] Optionally, the processor may also execute the program code of the following steps: obtaining a preset separation ratio; in the first network, performing state separation processing on the first frame image and the second frame image based on the preset separation ratio to obtain a third part and a fourth part; in the second network, performing state separation processing on the first frame image and the second frame image based on the preset separation ratio to obtain a fifth part and a sixth part, wherein the first part includes the third part and the fifth part, and the second part includes the fourth part and the sixth part.
[0152] Optionally, the processor may also execute the program code of the following steps: obtaining a first interpolation time and a second interpolation time, wherein the sum of the first interpolation time and the second interpolation time is a constant; calculating the product of the first interpolation time and the third part to obtain a first result; calculating the product of the second interpolation time and the fifth part to obtain a second result; and obtaining the interpolation part according to the first result and the second result.
[0153] Optionally, the processor may also execute program codes of the following steps: inputting the second part and the interpolation part into a synthesis network; and performing synthesis processing on the second part and the interpolation part based on the synthesis network to obtain a target video.
[0154] It can be understood by those skilled in the art that Fig. 9 The structure shown is for illustration only, and the computing device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig. 9 The structure of the electronic device is not limited. For example, the computing device 10 may also include Fig. 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig. 9 Different configurations shown.
[0155] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0156] Example 7
[0157] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for processing video data provided in the first embodiment.
[0158] Optionally, in this embodiment, the above storage medium may be located in any one of the computing devices in the computing device group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0159] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: obtaining a video to be processed; performing state separation processing on the video to be processed based on a preset neural network algorithm to obtain a first part and a second part of the video to be processed, wherein the first part is a part of the video to be processed where interpolation operations are allowed, and the second part is a part of the video to be processed where interpolation operations are prohibited; performing interpolation processing on the first part to obtain an interpolation part; and performing synthesis processing on the second part and the interpolation part to obtain a target video.
[0160] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: obtaining a first frame image and a second frame image in a video to be processed, wherein the first frame image and the second frame image are two consecutive adjacent frames of images; inputting the first frame image and the second frame image into a first network in a first order; inputting the first frame image and the second frame image into a second network in a second order, wherein the first order and the second order are reversed to each other; performing state separation processing on the first frame image and the second frame image based on the first network and the second network to obtain a first part and a second part.
[0161] Optionally, the convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network.
[0162] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining a preset separation ratio; in a first network, performing state separation processing on the first frame image and the second frame image based on the preset separation ratio to obtain a third part and a fourth part; in a second network, performing state separation processing on the first frame image and the second frame image based on the preset separation ratio to obtain a fifth part and a sixth part, wherein the first part includes the third part and the fifth part, and the second part includes the fourth part and the sixth part.
[0163] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining a first interpolation time and a second interpolation time, wherein the sum of the first interpolation time and the second interpolation time is a constant; calculating the product of the first interpolation time and the third part to obtain a first result; calculating the product of the second interpolation time and the fifth part to obtain a second result; and obtaining the interpolation part based on the first result and the second result.
[0164] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: inputting the second part and the interpolation part into a synthesis network; and synthesizing the second part and the interpolation part based on the synthesis network to obtain a target video.
[0165] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0166] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0167] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0168] The units described 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.
[0169] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0171] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing video data, characterized in that: include: Get the video to be processed; Based on a preset neural network algorithm, the state separation process is performed on the video to be processed to obtain a first part and a second part of the video to be processed, wherein the first part is a part of the video to be processed where an interpolation operation is allowed, and the second part is a part of the video to be processed where an interpolation operation is prohibited; Performing interpolation processing on the first part to obtain an interpolation part; Performing synthesis processing on the second part and the interpolation part to obtain a target video; Among them, the preset neural network algorithm includes at least a first network and a second network with the same network structure, and the state separation processing of the video to be processed based on the preset neural network algorithm to obtain the first part and the second part of the video to be processed includes: performing state separation processing on the video to be processed through the first network and the second network to obtain the first part and the second part, wherein the input order of the images in the video to be processed in the first network is opposite to the input order in the second network.
2. The method according to claim 1, characterized in that The state separation process is performed on the video to be processed by the first network and the second network to obtain the first part and the second part, including: Acquire a first frame image and a second frame image in the video to be processed, wherein the first frame image and the second frame image are two consecutive adjacent frames of images; Inputting the first frame image and the second frame image into a first network in a first order; Inputting the first frame image and the second frame image into a second network in a second order, wherein the first order and the second order are reverse to each other; The state separation process is performed on the first frame image and the second frame image based on the first network and the second network to obtain the first part and the second part.
3. The method according to claim 2, characterized in that The convolution kernel parameters of the first network are the same as the convolution kernel parameters of the second network.
4. The method according to claim 2, characterized in that: The first frame image and the second frame image are subjected to the state separation process based on the first network and the second network to obtain the first part and the second part, including: Get the preset separation ratio; In the first network, the state separation process is performed on the first frame image and the second frame image based on the preset separation ratio to obtain a third part and a fourth part; In the second network, the state separation processing is performed on the first frame image and the second frame image based on the preset separation ratio to obtain a fifth part and a sixth part, wherein the first part includes the third part and the fifth part, and the second part includes the fourth part and the sixth part.
5. The method according to claim 4, characterized in that Performing interpolation processing on the first part to obtain an interpolation part includes: Obtaining a first interpolation time and a second interpolation time, wherein a sum of the first interpolation time and the second interpolation time is a constant; Calculating the product of the first interpolation time and the third part to obtain a first result; Calculating the product of the second interpolation time and the fifth part to obtain a second result; The interpolation part is obtained according to the first result and the second result.
6. The method according to claim 1, characterized in that The second part and the interpolation part are synthesized to obtain a target video, including: inputting the second portion and the interpolated portion into a synthesis network; The second part and the interpolation part are synthesized based on the synthesis network to obtain the target video.
7. A method for processing video data, characterized in that: include: Display the video to be processed in the interactive interface; When the interactive interface receives a separation instruction, a separation result of the video to be processed is obtained, wherein the state of the video to be processed is separated by using a preset neural network model, and the separation result includes: a first part of the video to be processed in which an interpolation operation is allowed, and a second part in which an interpolation operation is prohibited; Displaying a target video in the interactive interface, wherein the target video is obtained by synthesizing a result of interpolation processing of the first part and the second part; Among them, the preset neural network model includes at least a first network and a second network with the same network structure, and the state separation of the video to be processed using the preset neural network model includes: performing state separation processing on the video to be processed by the first network and the second network to obtain the first part and the second part, wherein the input order of the images in the video to be processed in the first network is opposite to the input order in the second network.
8. The method according to claim 7, characterized in that The method further comprises: In response to a selection instruction, determining a portion to be displayed from the separation result; The portion to be displayed is displayed.
9. A method for processing video data, characterized in that: include: During the playback of the video to be processed, detecting a control instruction sent by the client, wherein the control instruction is used to adjust the frame rate of the video to be processed; Based on the control instruction, a preset neural network algorithm is used to perform state separation processing on the video to be processed, and an interpolation processing is performed on a portion of the video to be processed that allows interpolation, so as to obtain a target video; Feeding back the target video to the client, wherein the client plays the target video; The preset neural network algorithm at least includes a first network and a second network with the same network structure, and the state separation process of the video to be processed using the preset neural network algorithm includes: The state separation processing is performed on the video to be processed by the first network and the second network to obtain the first part and the second part of the video to be processed, wherein the first part is the part of the video to be processed where interpolation operation is allowed, and the second part is the part of the video to be processed where interpolation operation is prohibited, and the input order of the images in the video to be processed in the first network is opposite to the input order in the second network.
10. A method for processing image data, characterized in that: include: Acquire multiple continuously changing images to be processed; Based on a preset neural network model, the plurality of images to be processed are subjected to state separation, and interpolation processing is performed on the parts of the plurality of images to be processed that allow interpolation operation, so as to obtain a target image; displaying the target image; The preset neural network model at least includes a first network and a second network with the same network structure, and the state separation of the plurality of images to be processed based on the preset neural network model includes: The first network and the second network are used to separate the states of the multiple images to be processed to obtain a first part and a second part of the multiple images to be processed, wherein the first part is a part of the multiple images to be processed where interpolation operation is allowed, and the second part is a part of the multiple images to be processed where interpolation operation is prohibited, and the input order of the multiple images to be processed in the first network is opposite to the input order in the second network.
11. The method according to claim 10, characterized in that Performing interpolation processing on the parts of the plurality of images to be processed that allow interpolation operations to obtain a target image, including: Performing interpolation processing on the first part to obtain an interpolation part; The second part and the interpolation part are synthesized to obtain the target image.
12. A device for processing video data, characterized in that: include: An acquisition module is used to acquire the video to be processed; A separation module, configured to perform state separation processing on the video to be processed based on a preset neural network algorithm to obtain a first part and a second part of the video to be processed, wherein the first part is a part of the video to be processed where interpolation operation is allowed, and the second part is a part of the video to be processed where interpolation operation is prohibited; An interpolation module, used for performing interpolation processing on the first part to obtain an interpolation part; A synthesis module, used for synthesizing the second part and the interpolation part to obtain a target video; In which, the preset neural network algorithm includes at least a first network and a second network with the same network structure, and the separation module is also used to perform state separation processing on the video to be processed based on the preset neural network algorithm through the following steps to obtain the first part and the second part of the video to be processed: performing state separation processing on the video to be processed through the first network and the second network to obtain the first part and the second part, wherein the input order of the images in the video to be processed in the first network is opposite to the input order in the second network.
13. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method for processing video data according to any one of claims 1 to 9.
14. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method for processing video data according to any one of claims 1 to 9 when running.
15. A computing device, characterized in that: include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Get the video to be processed; Based on a preset neural network algorithm, the state separation process is performed on the video to be processed to obtain a first part and a second part of the video to be processed, wherein the first part is a part of the video to be processed where an interpolation operation is allowed, and the second part is a part of the video to be processed where an interpolation operation is prohibited; Performing interpolation processing on the first part to obtain an interpolation part; Performing synthesis processing on the second part and the interpolation part to obtain a target video; Among them, the preset neural network algorithm includes at least a first network and a second network with the same network structure, and the state separation processing of the video to be processed based on the preset neural network algorithm to obtain the first part and the second part of the video to be processed includes: performing state separation processing on the video to be processed through the first network and the second network to obtain the first part and the second part, wherein the input order of the images in the video to be processed in the first network is opposite to the input order in the second network.
