Frame insertion method and device, electronic equipment and storage medium
Through deep learning and convolutional neural networks, combined with time domain information transfer and subtitle protection modules, the problem of uneven frame rate conversion intervals and poor visual effects in existing video frame insertion technology is solved, and uniform and smooth video frame insertion is achieved. Improves user experience and meets the real-time needs of mobile devices.
Patent Information
- Application Number
- CN202410938805.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing video frame insertion technology has uneven intervals during frame rate conversion, resulting in poor visual effects. Moreover, traditional methods cannot meet the real-time and arbitrary frame rate upsampling requirements of mobile terminal devices. There are limitations in motion compensation algorithms and hardware performance. limit.
Using deep learning methods, convolutional neural networks and interpolation networks are used for real-time frame rate upsampling at any magnification, combined with time domain information transfer and subtitle protection modules, to achieve uniform and smooth frame interpolation processing of videos, improving visual effects and user experience.
It achieves uniform and smooth video frame insertion, improves visual effects and user viewing experience, meets real-time and arbitrary frame rate upsampling requirements on mobile devices, and reduces flicker defects caused by single frame errors.
Smart Images

Figure CN118741179A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of video frame insertion, and in particular, relates to a frame insertion method and device, an electronic device, and a storage medium. Background Art
[0002] Video interpolation is a method of increasing the frame rate of a video by inserting new frames between video frames. It is widely used in television, movies, games and other fields. The core goal of interpolation is to improve the smoothness and visual effects of the video, making fast-moving images look more coherent and natural. Interpolation is widely used in television, movies, games and other fields, especially in high-speed motion images, where interpolation is particularly important.
[0003] With the improvement of hardware performance and the optimization of algorithms, interpolation technology has been widely used on various devices. From high-definition TVs to virtual reality devices, the application scope of interpolation technology continues to expand, meeting users' demand for high frame rate videos. In short, video interpolation technology significantly improves the frame rate and viewing experience of videos by inserting new frames between video frames. Its wide application in various scenarios demonstrates its importance in improving visual effects and enhancing user experience. Summary of the invention
[0004] The purpose of the present disclosure is to provide a frame insertion method and device, an electronic device and a storage medium, so as to solve the problems of uneven frame insertion intervals and poor visual effects in the prior art.
[0005] In a first aspect, an embodiment of the present disclosure provides a frame insertion method. The frame insertion method includes: obtaining an input source, an input frame rate of the input source, and an output frame rate; obtaining corresponding frame insertion configuration information according to the input frame rate, the output frame rate, and the frame insertion configuration, wherein the frame insertion configuration information is associated with the frame insertion for realizing frame rate conversion from the input frame rate to the output frame rate; and performing frame insertion processing on the input source using the frame insertion configuration information to obtain a target source having the output frame rate.
[0006] In an implementation of the first aspect, obtaining interpolation configuration information according to the input frame rate, the output frame rate and the interpolation configuration includes: analyzing according to the input frame rate and the output frame rate to obtain the interpolation configuration; obtaining corresponding compensation frame information according to the interpolation configuration and the input frame rate and the output frame rate; and obtaining the interpolation configuration information using the compensation frame information and the interpolation configuration.
[0007] In an implementation of the first aspect, analyzing according to the input frame rate and the output frame rate to obtain the interpolation configuration includes: obtaining a corresponding interpolation network model and a number of calls according to a ratio of the output frame rate to the input frame rate; and obtaining the interpolation configuration according to the input frame rate, the output frame rate, the interpolation network model and the number of calls.
[0008] In an implementation of the first aspect, using the interpolation configuration information to perform interpolation processing on the input source to obtain a target source with the output frame rate includes: performing interpolation processing between a current frame and a next frame of the input source according to the interpolation configuration information to obtain a target source with the output frame rate.
[0009] In an implementation of the first aspect, the interpolation method further includes: acquiring inter-frame motion information between frames of the input source according to the input source; and performing motion compensation of interpolation processing using the inter-frame motion information and the interpolation configuration information.
[0010] In an implementation of the first aspect, obtaining inter-frame motion information between frames of the input source according to the input source includes: obtaining an interpolation ratio using the interpolation configuration information; obtaining an interpolation moment between frames according to the interpolation ratio; and predicting the motion between frames of the input source using a convolutional neural network to obtain the inter-frame motion information at the interpolation moment.
[0011] In an implementation of the first aspect, using a convolutional neural network to predict the motion between frames of the input source to obtain the inter-frame motion information at the interpolation moment includes: obtaining an interpolated frame according to the interpolation configuration information, the interpolated frame including a reference frame and a non-reference frame; downsampling the current frame and the previous frame to obtain multiple layers of current frames and previous frames with different resolutions; inputting the current frame and the previous frame into the current layer of convolutional neural network to output the inter-frame motion information of the reference frame of the current layer, and the inter-frame motion information of the non-reference frame; and inputting the inter-frame motion information of the reference frame of the current layer, the inter-frame motion information of the non-reference frame, and the current frame and the previous frame of the resolution of the next layer into the next layer of convolutional neural network to output the inter-frame motion information of the reference frame of the next layer, and the inter-frame motion information of the non-reference frame.
[0012] In an implementation of the first aspect, the current frame and the previous frame are spliced and input into the current layer convolutional neural network to output the inter-frame motion information of the reference frame of the current layer and the inter-frame motion information of the non-reference frame, including: using the current layer convolutional neural network to obtain the optical flow and mask of the reference frame of the current layer and the offset and mask of the non-reference frame; obtaining the optical flow of the non-reference frame according to the optical flow of the reference frame and the offset of the non-reference frame; and obtaining the inter-frame motion information of the reference frame according to the optical flow and mask of the reference frame, and obtaining the inter-frame motion information of the non-reference frame according to the optical flow and offset of the non-reference frame.
[0013] In an implementation manner of the first aspect, the interpolation method further includes: using inter-frame motion information at a current moment as input for acquiring inter-frame motion information at a next moment, so as to transmit time domain information of the input source.
[0014] In an implementation manner of the first aspect, the frame insertion method further includes: using an encoder to obtain motion vectors between frames of the input source to obtain inter-frame basic motion information of the input source.
[0015] In an implementation of the first aspect, the interpolation method further includes: detecting the input source using an image detection network to obtain a foreground area of the input source; and performing protection processing on the foreground area of the input source according to a location of the foreground area of the input source.
[0016] In an implementation manner of the first aspect, the frame insertion method further includes: determining a real frame rate of the video of the input source, so as to use the real frame rate as the input frame rate.
[0017] In a second aspect, the embodiments of the present disclosure provide a frame insertion device. The frame insertion device includes: an input parameter module configured to obtain an input source, an input frame rate of the input source, and an output frame rate; an interpolation configuration module configured to obtain corresponding interpolation configuration information according to the input frame rate, the output frame rate, and the interpolation configuration, wherein the interpolation configuration information is associated with an interpolation that implements frame rate conversion from the input frame rate to the output frame rate; and an interpolation processing module configured to perform interpolation processing on the input source using the interpolation configuration information to obtain a target source having the output frame rate.
[0018] In an implementation of the second aspect, the interpolation processing module is configured to: obtain the foreground area of the Nth frame as the current frame through the first processing unit and perform protection processing on the foreground area, downsample the Nth frame through the second processing unit, and obtain inter-frame motion information of the N-1th frame and the Nth frame through the third processing unit; and obtain the inter-frame motion information of the N-2th frame and the N-1th frame through the third processing unit, and perform motion compensation on the N-2th frame and the N-1th frame using the inter-frame motion information of the N-2th frame and the N-1th frame through the second processing unit, where N is an integer greater than 2.
[0019] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory configured to store an executable program; and a processor configured to execute the program so that the electronic device performs the frame insertion method according to any one of the first aspects.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the frame insertion method according to any one of the first aspects.
[0021] According to the embodiment of the present disclosure, the input source, input frame rate, and output frame rate can obtain the corresponding interpolation configuration information, and the interpolation configuration information is used to implement smooth interpolation processing of the input source to obtain the target source. This interpolation method can achieve uniform and smooth interpolation of the video, improve the visual effect, and enhance the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Shown is a schematic diagram of an application scenario of the interpolation method described in the present disclosure.
[0023] Figure 2 Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0024] Figure 3 Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0025] Figure 4 Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0026] Figure 5 Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0027] Fig. 6A Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0028] Figure 6BShown is a schematic diagram of obtaining inter-frame motion information according to an embodiment of the present disclosure.
[0029] Figure 7 Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0030] Figure 8 Shown is a flowchart of the frame insertion method described in an embodiment of the present disclosure.
[0031] Fig. 9 Shown is a schematic diagram of the structure of the frame insertion device described in an embodiment of the present disclosure.
[0032] Fig.10 Shown is a structural schematic diagram of the frame insertion processing module described in an embodiment of the present disclosure.
[0033] Fig.11 Shown is a schematic diagram of the structure of an electronic device described in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The following is an explanation of the embodiments of the present disclosure by specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0035] It should be noted that the illustrations provided in the following embodiments are only used to schematically illustrate the basic concept of the present disclosure. Therefore, the drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0036] With the rapid development of the consumer electronics industry in recent years, the size and resolution of electronic product screens have become larger and larger. However, due to the limitations of transmission bandwidth and historical shooting technology, the frame rate of most local and streaming online videos is 30 frames or less (mostly 24 / 25 / 30 frames). Videos with these frame rates are prone to dragging and freezing when played on mainstream playback devices with a refresh rate of 60 frames, affecting the visual viewing experience.
[0037] Currently commonly used solutions can usually only handle interpolation at a power of 2 multiple, and cannot meet upsampling requirements of any frame rate specifications. For example, for interpolation from 25 to 60 frames, simple 2x interpolation cannot meet specification requirements. Some solutions use a linear combination of interpolation at a power of 2 multiple, such as 4 times 2x and 1 time 4x combination cycles from 25 to 60 frames, but the overall time interval is not uniform enough, and the visual effect appears to be fast and slow. Some solutions can support interpolation at any time point between two frames, but inserting multiple frames requires multiple repeated calls, which does not meet the real-time requirements of mobile terminals.
[0038] In addition, traditional interpolation technology mainly relies on motion compensation algorithms, which generate new intermediate frames by estimating the motion vectors between adjacent frames. However, this method has significant limitations. First, the processing power of the motion compensation algorithm is limited, especially in scenes with fast motion and drastic changes, because simple linear models cannot accurately match nonlinear motion, and therefore cannot accurately capture the motion trajectory. This causes the generated intermediate frames to appear blurry, ghosting, and dislocation, which seriously affects the visual effect of the video. Secondly, due to the limitations of hardware performance, practical applications often require a trade-off between frame rate improvement and processing time, and cannot achieve a smooth and uniform interpolation effect.
[0039] In addition, most deep learning interpolation solutions do not take into account the computing power constraints of mobile terminal devices and cannot be deployed on general mobile terminals, which greatly limits the actual application scenarios of this technology.
[0040] At least in view of the above problems, an embodiment of the present disclosure provides a frame interpolation method. The frame interpolation method includes: obtaining an input source, an input frame rate and an output frame rate of the input source; obtaining corresponding frame interpolation configuration information according to the input frame rate, the output frame rate and the frame interpolation configuration, wherein the frame interpolation configuration information is associated with the frame interpolation for realizing frame rate conversion from the input frame rate to the output frame rate; and performing frame interpolation processing on the input source using the frame interpolation configuration information to obtain a target source having the output frame rate.
[0041] In the embodiment of the present disclosure, the input source, input frame rate, and output frame rate can obtain the corresponding interpolation configuration information, and the interpolation configuration information is used to implement smooth interpolation processing of the input source to obtain the target source. This interpolation method can achieve uniform and smooth interpolation of the video, improve the visual effect, and enhance the user's viewing experience.
[0042] In the disclosed embodiment, a method for real-time arbitrary frame rate upsampling using deep learning on a mobile device is proposed. In order to achieve real-time performance and arbitrary frame rate upsampling on a mobile device, it is proposed to combine interpolation neural networks with multiple different interpolation magnifications to achieve this. For example, this case chooses to achieve this by combining 4x and 5x networks. A 4x network refers to a network that outputs 3 intermediate frames (t+0.25 / t+0.5 / t+0.75 frames) whenever two frames (t frame and t+1 frame) are input, and the overall frame rate can be increased by 4 times. Similarly, a 5x network refers to a network that outputs 4 intermediate frames (t+0.2 / t+0.4 / t+0.6 / t+0.8 frames) whenever two frames (t frame and t+1 frame) are input, and the overall frame rate can be increased by 5 times. The reason for using these two magnifications is that using only these two magnifications can already meet the interpolation magnification requirements of current common videos. It should be understood that the proposed network structure is not only applicable to 4x and 5x interpolation networks, but is theoretically applicable to any Nx (N is a positive integer) network structure design, so the network that can be used for combination is not limited to 4x and 5x networks.
[0043] In the disclosed embodiment, in order to make the interpolated frame more coherent and smooth in the time domain, a time domain information transmission path is added to the interpolated frame network, and the motion amount output by the previous frame network is added as additional information to the input of the current frame, so that the network can selectively refer to the motion information of the previous moment according to the actual situation, reducing the flickering defects caused by single frame errors. At the same time, the motion vector output by the decoder is combined to improve the problem of motion vector initialization and improve the robustness of the network.
[0044] In the disclosed embodiment, in the logo and subtitle area, since the subtitle and logo are usually static, there is often a large difference in the movement of the foreground and background, which is prone to motion defects. By introducing an additional logo and subtitle protection module, a neural network is used to detect the logo and subtitle area in the current frame, and the area information is passed to the interpolation network, thereby protecting the logo and subtitle.
[0045] Figure 1 Shown is a schematic diagram of an application scenario of the interpolation method described in the present disclosure. The terminal device and the cloud server can communicate, and the communication method is not limited to wired or wireless. In some embodiments, the interpolation method described in the present disclosure can be executed only by the terminal device, and the terminal device and the cloud server communicate other data except the interpolation method. In this embodiment, the interpolation method described in the present disclosure can be executed by a system chip in the terminal device, and the system chip may include a CPU, an NPU, and a GPU, etc. In other embodiments, the interpolation method described in the present disclosure can be jointly executed by the terminal device and the cloud server.
[0046] The terminal device may be mobile or fixed. For example, the terminal device may be a wireless terminal or a wired terminal. The wireless terminal may refer to a device with wireless transceiver function, which can be deployed indoors and outdoors. The terminal device may be a mobile phone, a tablet computer, a laptop computer, etc., which is not limited here. The cloud server may include one or more servers, or one or more processing nodes, or one or more virtual machines running on the server. The cloud server may also be called a server cluster, a management platform, a data processing center, etc., which is not limited in the embodiments of the present disclosure.
[0047] The technical solutions in the embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present disclosure.
[0048] The following embodiments of the present disclosure provide a frame insertion method. Figure 2 The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Figure 2 As shown, the frame insertion method includes steps S11 to S13.
[0049] Step S11, obtaining an input source, an input frame rate of the input source, and an output frame rate. The output frame rate of the input source is a low frame rate, and the output frame rate is a high frame rate.
[0050] Step S12, obtaining corresponding interpolation configuration information according to the input frame rate, the output frame rate and the interpolation configuration, wherein the interpolation configuration information is associated with an interpolation frame for implementing frame rate conversion from the input frame rate to the output frame rate. The interpolation configuration information is used to determine an interpolation frame of an input source, and interpolate the input source according to the interpolation frame of the input source to obtain a target source having the output frame rate.
[0051] Step S13: performing frame interpolation processing on the input source using the frame interpolation configuration information to obtain a target source having the output frame rate.
[0052] In the embodiment of the present disclosure, the input source, input frame rate, and output frame rate can obtain the corresponding interpolation configuration information, and the interpolation configuration information is used to implement smooth interpolation processing of the input source to obtain the target source. This interpolation method can achieve uniform and smooth interpolation of the video, improve the visual effect, and enhance the user's viewing experience.
[0053] Figure 3 The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Figure 3 As shown, the step S12 includes steps S121 to S123.
[0054] Step S121, analyzing the input frame rate and the output frame rate to obtain an interpolation configuration.
[0055] Step S122: acquiring corresponding compensation frame information according to the interpolation configuration, the input frame rate, and the output frame rate.
[0056] Step S123: Acquire the interpolation frame configuration information using the compensation frame information and the interpolation frame configuration.
[0057] In some possible implementations, the interpolation configuration includes the interpolation network model used and the number of calls. The corresponding compensation frame information of the input source can be obtained based on the interpolation network model used, the number of calls, the input frame rate and the output frame rate. The compensation frame information and the interpolation configuration are together used as the interpolation configuration information to implement interpolation processing of the input source from the input frame rate to the output frame rate.
[0058] In some other possible implementations, assuming that the interpolation network library stores n interpolation network models with different magnifications, in order to achieve the conversion of input and output frame rates, the calculation formula for the number of calls is:
[0059]
[0060] Among them, k i is the magnification of the i-th interpolation network model, t i is the number of calls of the i-th interpolation network model, r in Input frame rate, r out is the output frame rate.
[0061] It should be noted that the above calculation formula for the number of calls can theoretically achieve uniform interpolation when n is large enough, but it requires maintaining enough interpolation network models with different magnifications to achieve this.
[0062] Figure 4 The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Figure 4 As shown, the step S121 includes steps S1211 to S1212.
[0063] Step S1211, obtaining a corresponding interpolation network model and a call count according to the ratio of the output frame rate to the input frame rate.
[0064] Step S1212, obtaining the interpolation configuration according to the input frame rate, the output frame rate, the interpolation network model and the number of calls.
[0065] In some possible implementations, the input frame rate of conventional streaming media videos is usually 24, 25, 30 or 60 FPS (Frames Per Second). The output frame rate is usually 60 or 120 FPS. For example, interpolation processing is performed using a 4x interpolation network model and a 5x interpolation network model. For the two frames t and t+1 of the 4x interpolation network model, the three middle frames t+0.25, t+0.5 and t+0.75 are output, which can increase the overall frame rate by 4 times. For the two frames t and t+1 of the 5x interpolation network model, the three middle frames t+0.2, t+0.4, t+0.6 and t+0.8 are output, which can increase the overall frame rate by 5 times. Interpolation frames are frames obtained using the interpolation network model for insertion between frames, and interpolation frames are frames used when interpolation processing is actually performed. The following will use several common input frame rates and output frame rates to explain how to obtain interpolation configuration information.
[0066] The input frame rate is 60FPS and the output frame rate is 60FPS: no interpolation is required.
[0067] The input frame rate is 60FPS and the output frame rate is 120FPS: a 4x interpolation network model is used. For the current frame n and the next frame n+1, the 4x interpolation network model is used to obtain interpolation frames at time n+0.25, n+0.5, and n+0.75, and the interpolation frames at time n+0.25 and n+0.75 are discarded, and the interpolation frame at time n+0.5 is retained as the interpolation frame. One frame is added every 1 frame, and the input source is interpolated to obtain the target source with an output frame rate of 120FPS.
[0068] The input frame rate is 30FPS and the output frame rate is 60FPS: a 4x interpolation network model is used. The specific method is similar to the interpolation method of input frame rate 60FPS and output frame rate 120FPS.
[0069] The input frame rate is 30 FPS and the output frame rate is 120 FPS: Use a 4x interpolation network model to obtain interpolation frames at times n+0.25, n+0.5, and n+0.75 as interpolation frames, perform interpolation processing on the input source, and obtain a target source with an output frame rate of 120 FPS.
[0070] The input frame rate is 25FPS and the output frame rate is 60FPS: In theory, the time interval for uniform interpolation from 25FPS to 60FPS is 25 / 60≈0.417, so the 4x and 5x interpolation network models are used alternately to achieve an interpolation time interval close to 0.417, and the picture is smooth in actual use. Using the 5-fold interpolation network model, the interpolation frames at moments n+0.2, n+0.4, n+0.6, and n+0.8 are obtained, and the interpolation frames at moments n+0.2 and n+0.6 are discarded, and the interpolation frames at moments n+0.4 and n+0.8 are retained as interpolation frames; using the 4-fold interpolation network model, the interpolation frames at moments n+0.25, n+0.5, and n+0.75 are obtained, and the interpolation frames at moments n+0.5 are discarded, and the interpolation frames at moments n+0.25 and n+0.75 are retained as interpolation frames; using the 5-fold interpolation network model, the interpolation frames at moments n+0.2, n+0.4, n+0.6, and n+0.8 are obtained, and the interpolation frames at moments n+0.4 and n+0.8 are discarded, and the interpolation frames at moments n+0.2 and n+0.6 are retained as interpolation frames; using the 5-fold interpolation network model The network model is used to obtain interpolated frames at moments n+0.2, n+0.4, n+0.6, and n+0.8, and the interpolated frames at moments n+0.2 and n+0.6 are discarded, and the interpolated frames at moments n+0.4 and n+0.8 are retained as interpolated frames; then the 5-fold interpolation network model is used to obtain interpolated frames at moments n+0.2, n+0.4, n+0.6, and n+0.8, and the interpolated frames at moments n+0.4 and n+0.8 are discarded, and the interpolated frames at moments n+0.2 and n+0.6 are retained as interpolated frames, thereby achieving interpolation processing with interpolated frames at moments 0.4, 0.8, 1.25, 1.75, 2.2, 2.6, 3.0, 3.4, 3.8, 4.2, and 4.6 from moments 0 to 5, and 11 frames are added every 5 frames to obtain the target source with an output frame rate of 60FPS.
[0071] Input frame rate is 25FPS, output frame rate is 120FPS: Similar to the interpolation method with an input frame rate of 25FPS and an output frame rate of 120FPS, every 5 calls are a round, 4 of which use the 5-fold interpolation network model, and 1 uses the 4-fold interpolation network model. All interpolation frames are retained as interpolation frames, and every 5 frames are interpolated into 24 frames. For example: from time 0 to 5, interpolation processing is performed with interpolation frames at time 0.2, 0.4, 0.6, 0.8, 1.2, 1.4, 1.6, 1.8, 2.2, 2.4, 2.6, 2.8, 3.2, 3.4, 3.6, 3.8, 4.25, 4.5, 4.75, and 19 frames are added every 5 frames to obtain the target source with an output frame rate of 120FPS.
[0072] The input frame rate is 24FPS and the output frame rate is 60FPS: Using the 5-fold interpolation network model, interpolation frames at time n+0.2, n+0.4, n+0.6 and n+0.8 are obtained, and the interpolation frames at time n+0.2 and n+0.6 are discarded, and the interpolation frames at time n+0.4 and n+0.8 are retained as interpolation frames; then the 5-fold interpolation network model is used to obtain interpolation frames at time n+0.2, n+0.4, n+0.6 and n+0.8, and the interpolation frames at time n+0.4 and n+0.8 are discarded, and the interpolation frames at time n+0.2 and n+0.6 are retained as interpolation frames. The interpolation processing is implemented from time 0 to time 2 with the interpolation frames at time 0.4, 0.8, 1.2, and 1.6, and 4 frames are added every 2 frames to obtain the target source with an output frame rate of 60FPS.
[0073] The input frame rate is 24FPS and the output frame rate is 120FPS: Use the 5x interpolation network model to obtain interpolation frames at times n+0.2, n+0.4, n+0.6, and n+0.8, retain the interpolation frames at all times as interpolation frames, and perform interpolation processing from time 0 to time 1 with interpolation frames at times 0.2, 0.4, 0.6, and 0.8. Add 4 frames for every 1 frame to obtain the target source with an output frame rate of 120FPS.
[0074] It should be noted that the above is only the interpolation configuration information of the conventional interpolation frame rate according to the technical solution of the embodiment of the present disclosure, and the specific manner of implementing smooth interpolation between the input frame rate and the output frame rate of the present disclosure is not limited thereto.
[0075] In one embodiment of the present disclosure, using the interpolation configuration information to perform interpolation processing on the input source to obtain a target source with the output frame rate includes: performing interpolation processing between a current frame and a next frame of the input source according to the interpolation configuration information to obtain the target source.
[0076] In some other possible implementations, in order to achieve smooth interpolation between the input frame rate and the output frame rate, interpolation processing is performed on a group of frames that can be repeatedly implemented, wherein the starting frame in the group of frames is the current frame and the ending frame is the next frame, and the interpolation processing is repeated to obtain a target source with the output frame rate.
[0077] Figure 5 The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Figure 5 As shown, the frame insertion method further includes steps S14 to S15.
[0078] Step S14: acquiring inter-frame motion information between frames of the input source according to the input source.
[0079] Step S15: performing motion compensation of interpolation processing by using the inter-frame motion information and the interpolation configuration information.
[0080] In some possible implementations, inter-frame motion information between frames of the input source is obtained according to the input source, and interpolation compensation is performed according to the inter-frame motion information. The calculation formula for interpolation compensation is:
[0081] I n =M*Warp(I0,F n→0 )+(1-M)*Warp(I1,F n→1 ),
[0082] Among them, 1 and 0 represent the current moment and the previous moment respectively, n is a moment between 0 and 1, Warp is the reverse interpolation function, I n is the interpolation frame at time n, I0 is the input frame at the previous time, I1 is the input frame at the current time, and F n→0 is the optical flow from time n to time 0, and M is the mask.
[0083] Fig. 6A The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Fig. 6A As shown, the step S14 includes steps S141 to S143.
[0084] Step S141, using the interpolation configuration information to obtain an interpolation magnification, wherein the interpolation magnification is a magnification of an interpolation network model, such as a 4x interpolation network model or a 5x interpolation network model.
[0085] Step S142, obtaining interpolation time between frames according to the interpolation magnification.
[0086] Step S143, using a convolutional neural network to predict the motion between the frames of the input source to obtain the inter-frame motion information at the interpolation moment.
[0087] In some possible implementations, the interpolation ratio is obtained according to the interpolation configuration information, and the interpolation network model used for interpolation can be obtained. The interpolation time between frames is obtained according to the adopted interpolation network model and the input frame rate and the output frame rate. The motion between frames of the input source is predicted using a convolutional neural network, and the optical flow and mask between the frames are obtained. The inter-frame motion information at the interpolation time is obtained using the optical flow and mask between the frames.
[0088] In some other possible implementations, Figure 6B The diagram is a schematic diagram of obtaining inter-frame motion information according to an embodiment of the present disclosure. Figure 6BAs shown, taking the 4x interpolation network model as an example, the interpolation moments are the interpolation frames at the moments n+0.25, n+0.5 and n+0.75 of the 4x interpolation network model. The current frame n and the previous frame n-1 represent the image frames at the moments t=1 and t=0 respectively. The current frame and the previous frame are respectively sampled twice by 1 / 2. The 1 / 4 downsampled current frame and the previous frame are predicted using the first stage convolutional neural network network to obtain the inter-frame motion information at the moments n+0.25, n+0.5 and n+0.75. The 1 / 4 downsampled current frame and the previous frame are spliced with the inter-frame motion information predicted by the first stage convolutional neural network and then input into the second stage convolutional neural network network. The convolutional neural network of the second stage is used to predict the current frame and the previous frame with 1 / 2 downsampling, and the inter-frame motion information at the moments n+0.25, n+0.5 and n+0.75 is obtained. The current frame and the previous frame with 1 / 2 downsampling are spliced with the inter-frame motion information predicted by the convolutional neural network of the first stage and then input into the convolutional neural network of the third stage. The convolutional neural network of the third stage is used to predict the current frame and the previous frame, and the inter-frame motion information at the moments n+0.25, n+0.5 and n+0.75 is obtained. The inter-frame motion information at the interpolation moment can be obtained by splicing the current frame and the previous frame with the inter-frame motion information predicted by the convolutional neural network of the third stage.
[0089] It should be noted that the above is only a possible implementation method of the embodiment of the present disclosure, and the present disclosure is not limited thereto.
[0090] Figure 7 The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Figure 7 As shown, the step S143 includes steps S1431 to S1434.
[0091] Step S1431, obtaining interpolated frames according to the interpolation configuration information, wherein the interpolated frames include reference frames and non-reference frames. The reference frame is any frame interpolated between two frames by the interpolation network model, and the non-reference frame is other frames except the reference frame when the interpolation network model interpolates between two frames.
[0092] Step S1432, downsampling the current frame and the previous frame to obtain multiple layers of the current frame and the previous frame with different resolutions.
[0093] Step S1433, inputting the current frame and the previous frame into the current layer convolutional neural network to output the inter-frame motion information of the reference frame of the current layer and the inter-frame motion information of the non-reference frame.
[0094] Step S1434, input the inter-frame motion information of the reference frame of the current layer, the inter-frame motion information of the non-reference frame, and the current frame and the previous frame of the resolution of the next layer into the next layer of convolutional neural network network to output the inter-frame motion information of the reference frame of the next layer, and the inter-frame motion information of the non-reference frame.
[0095] In some possible implementations, the required interpolation network model is obtained according to the interpolation configuration information, and the reference frame and non-reference frame of the interpolated frame are obtained according to the interpolation network model. Taking the 4x interpolation network model as an example, the middle moment n+0.5 is the reference frame, and the moments n+0.25 and n+0.75 are non-reference frames. The current frame and the previous frame are downsampled twice to obtain three layers of current frames and previous frames with different resolutions, namely the current frame and previous frame of the original resolution, the current frame and previous frame of 1 / 2 resolution, and the current frame and previous frame of 1 / 4 resolution. The 1 / 4 current frame and the previous frame are input into the convolutional neural network of the current layer to output the inter-frame motion information of the reference frame at the moment n+0.5 of the current layer, and the inter-frame motion information of the non-reference frame at the moments n+0.25 and n+0.75. The inter-frame motion information of the reference frame at time n+0.5 of the current layer, the inter-frame motion information of the non-reference frames at times n+0.25 and n+0.75, and the current frame and previous frame of the next layer with 1 / 2 resolution are input into the next layer of convolutional neural network to output the inter-frame motion information of the reference frame at time n+0.5 of the next layer, and the inter-frame motion information of the non-reference frames at times n+0.25 and n+0.75. The present disclosure is not limited to this.
[0096] Figure 8 The flowchart of the frame insertion method according to the embodiment of the present disclosure is shown as follows: Figure 8 As shown, the step S1433 includes steps S14331 to S14333.
[0097] Step S14331, using the current layer convolutional neural network to obtain the optical flow and mask of the reference frame of the current layer and the offset and mask of the non-reference frame.
[0098] Step S14332: Acquire the optical flow of the non-reference frame according to the optical flow of the reference frame and the offset of the non-reference frame.
[0099] Step S14333: acquiring inter-frame motion information of the reference frame according to the optical flow and mask of the reference frame, and acquiring inter-frame motion information of the non-reference frame according to the optical flow and offset of the non-reference frame.
[0100] In some possible implementations, taking the 4x interpolation network model as an example, the current layer convolutional neural network is used to obtain the optical flow and mask of the reference frame at the current layer at time n+0.5, and the offset and mask of the non-reference frame at times n+0.25 and n+0.75. The optical flow of the non-reference frame at times n+0.25 and n+0.75 is obtained based on the optical flow of the reference frame at time n+0.5 and the offset of the non-reference frame at times n+0.25 and n+0.75. The inter-frame motion information of the reference frame is obtained based on the optical flow and mask of the reference frame at time n+0.5, and the inter-frame motion information of the non-reference frame is obtained based on the optical flow and offset of the non-reference frame at times n+0.25 and n+0.75. The calculation formula for the optical flow of the non-reference frame is:
[0101] F 0.25→0 =(0.5+Δ 0.25→0 )×F 0.5→0
[0102] F 0.25→1 =(1.5+Δ 0.25→1 )×F 0.5→1
[0103] F 0.75→0 =(1.5+Δ 0.75→0 )×F 0.5→0 ,
[0104] F 0.75→1 =(0.5+Δ 0.75→1 )×F 0.5→1
[0105] Among them, F 0.5→0 is the optical flow of frame 0.5→0, F 0.5→1 is the optical flow of 0.5→1 frame, Δ is the offset, F 0.25→0 and F 0.25→1 is the optical flow of the non-reference frame at time n+0.25, F 0.75→0 and F 0.75→1 It is the offset of the non-reference frame at time n+0.75.
[0106] Assuming that the previous frame and the current frame move at a uniform speed, the optical flow of the 0.25→0 frame should be half of the optical flow of the 0.5→0 frame, with an offset of Δ 0.25→0 For the reference frame, two optical flows and one mask are predicted using a convolutional neural network, and for the non-reference frame, two offsets and one mask are predicted using the convolutional neural network.
[0107] In some other possible implementations, the input of the current frame and the previous frame into the current layer convolutional neural network to output the inter-frame motion information of the reference frame of the current layer and the inter-frame motion information of the non-reference frame in the embodiment of the present disclosure is not limited to the 4-fold interpolation network model, and can be extended to any integer multiple interpolation network model. Taking the 5-fold interpolation network model as an example, the current frame and the previous frame are input, and the moment n+0.4 is selected as the reference frame, and the moments n+0.2, n+0.6 and n+0.8 are selected as non-reference frames, so as to use the convolutional neural network to predict the inter-frame motion information of the reference frame and the non-reference frame. Taking any n-fold interpolation network model as an example, if n is an even number, the interpolation frame at the moment n+0.5 is selected as the reference frame, and if n is an odd number, the interpolation frame close to the moment n+0.5 is selected as the reference frame. Assuming that the reference frame is b, the calculation formula for the optical flow at time t relative to time k (k is time 0 or time 1) is:
[0108]
[0109] F t→k is the optical flow at time t relative to time k, Δ t→k is the offset between time t and time k, F b→k is the optical flow at time b relative to time k.
[0110] In an embodiment of the present disclosure, the frame insertion method further includes: using the inter-frame motion information at the current moment as input for acquiring the inter-frame motion information at the next moment, so as to transmit the time domain information of the input source.
[0111] In some possible implementations, inter-frame motion information at time n and time n+1 is obtained, and the inter-frame motion information at time n and time n+1 is used as input for obtaining inter-frame motion information at time n+1 and time n+2, so as to transmit the time domain information of the input source.
[0112] In the disclosed embodiment, using the inter-frame motion information at the current moment as input for obtaining the inter-frame motion information at the next moment can increase the stability of the time domain and prevent a flickering visual effect caused by an error in the convolutional neural network prediction of a certain frame.
[0113] In an embodiment of the present disclosure, the frame insertion method further includes: using an encoder to obtain motion vectors between frames of the input source to obtain inter-frame basic motion information of the input source.
[0114] In some possible implementations, an encoder is used to obtain motion vectors between frames of the input source as reference motion information between frames, so as to obtain inter-frame motion information of frames of the input source.
[0115] In one embodiment of the present disclosure, the interpolation method further includes: detecting the input source using an image detection network to obtain a foreground area of the input source; and performing protection processing on the foreground area of the input source according to a location of the foreground area of the input source.
[0116] In some possible implementations, in order to prevent static subtitles and logos from moving with the background in videos with large background motion, the input source is detected using an image detection network to obtain the foreground area of the input source. When using a convolutional neural network to predict inter-frame motion information, the optical flow of the foreground area during the first-stage convolutional neural network prediction corresponding to the current frame and the previous frame with 1 / 4 downsampling and the optical flow during the second-stage convolutional neural network prediction corresponding to the current frame and the previous frame with 1 / 2 downsampling are set to 0 to eliminate large motions in the foreground area, and only the optical flow predicted by the third-stage convolutional neural network corresponding to the original current frame and the previous frame is used as the motion result of the foreground area to protect the foreground area.
[0117] In an embodiment of the present disclosure, the frame insertion method further includes: determining a real frame rate of the video of the input source, so as to use the real frame rate as the input frame rate.
[0118] In some possible implementations, the actual frame rate and true frame rate of some videos may be different due to secondary processing of the video sources in the current network. For example, a video with an actual frame rate of 60fps may have a true frame rate of only 30fps, and each frame in the actual video is repeated once, that is, the arrangement of 0-0-1-1-2-2-3-3-… appears. Before inserting frames using the interpolation method, the true frame rate is first determined, and then interpolation is performed based on the true frame rate and the current frame rate.
[0119] At the nth time, input the nth frame and the n-1th frame to determine the similarity of the two frames. The similarity determination includes but is not limited to the difference between the histograms of the nth frame and the n-1th frame. When the similarity between the two frames is less than a certain threshold, the two frames are determined to be the same, recorded as S (Same), otherwise the two frames are considered different, recorded as D (Different).
[0120] For the first N frames, only the similarity marks of two frames are counted and recorded. After N marks are recorded, the real frame rate of the video source can be determined based on the recorded rules, including but not limited to:
[0121] a) The actual frame rate is 60fps. If there is an SD loop in the logo arrangement, the actual frame rate is 30fps;
[0122] b) The actual frame rate is 30fps. If a DDDDDS cycle appears in the logo arrangement, the actual frame rate is 25fps;
[0123] c) The actual frame rate is 30fps. If a DDDDS cycle appears in the logo arrangement, the actual frame rate is 24fps.
[0124] For frames after the Nth frame, if the same identification cycle rule is still maintained, if the current frame is an S frame, skip this frame and proceed to the judgment of the next frame; if the current frame is a D frame, use the current frame and the previous D frame to adopt the interpolation method described in the present disclosure.
[0125] Fig. 9 The structure diagram of the frame insertion device according to the embodiment of the present disclosure is shown as follows: Fig. 9 As shown, the frame insertion device 100 includes an input parameter module 110 , a frame insertion configuration module 120 and a frame insertion processing module 130 .
[0126] The input parameter module 110 is configured to obtain an input source, an input frame rate and an output frame rate of the input source.
[0127] The interpolation configuration module 120 is configured to obtain corresponding interpolation configuration information according to the input frame rate, the output frame rate and the interpolation configuration, wherein the interpolation configuration information is associated with the interpolation for implementing frame rate conversion from the input frame rate to the output frame rate.
[0128] The interpolation processing module 130 is configured to perform interpolation processing on the input source by using the interpolation configuration information to obtain a target source with the output frame rate.
[0129] It should be noted that the actions or steps performed by the modules 110 to 130 included in the frame interpolation device 100 may correspond one-to-one to the steps in the frame interpolation method in the above-described embodiments, and will not be described in detail herein. Fig.10 The structure diagram of the frame insertion processing module according to the embodiment of the present disclosure is shown as follows: Fig.10 As shown, the interpolation processing module 130 includes a first processing unit 131 , a second processing unit 132 and a third processing unit 133 .
[0130] In some embodiments, the interpolation processing module 130 is configured to obtain the foreground area of the Nth frame as the current frame through the first processing unit 131 and perform protection processing on the foreground area, perform downsampling processing on the Nth frame through the second processing unit 132, and obtain inter-frame motion information of the N-1th frame and the Nth frame through the third processing unit 133. In addition, the interpolation processing module 130 is configured to obtain inter-frame motion information of the N-2th frame and the N-1th frame through the third processing unit 133, and perform motion compensation on the N-2th frame and the N-1th frame using the inter-frame motion information of the N-2th frame and the N-1th frame through the second processing unit 132, where N is an integer greater than 2.
[0131] In some possible implementations, the interpolation device 100 may be included in a chip. In other possible implementations, the interpolation device 100 may include a chip. In some embodiments, the first processing unit 131 is a CPU, the second processing unit 132 is a GPU, and the third processing unit 133 is an NPU. The execution of each frame can be divided into two parts: the Nth frame and the N-1th frame and the N-1th frame and the N-2th frame. The two parts are executed in parallel in an asynchronous manner, and different hardware resources are called respectively to maximize utilization.
[0132] In some possible implementations, the foreground area of the Nth frame as the current frame is obtained by the first processing unit 131 and the foreground area is protected, the Nth frame is downsampled by the second processing unit, and the inter-frame motion information of the N-1th frame and the Nth frame is obtained by the third processing unit. Image detection networks such as NCNN or MNN can be called on the CPU for implementation. The data input by the Nth frame is downsampled by 1 / 2 and 1 / 4 using the GPU, and the inter-frame motion information is obtained using the first stage convolutional neural network corresponding to the 1 / 4 downsampled Nth frame and the N-1th frame and the second stage convolutional neural network corresponding to the 1 / 2 downsampled Nth frame and the N-1th frame.
[0133] In some possible implementations, the inter-frame motion information of the N-2 frame and the N-1 frame is obtained by the third processing unit 133, and the inter-frame motion information of the N-2 frame and the N-1 frame is used by the second processing unit to perform motion compensation on the N-2 frame and the N-1 frame, where N is an integer greater than 2. The NPU is directly called to obtain the third-stage convolutional neural network corresponding to the N-1 frame and the N-2 frame to obtain the inter-frame motion information, and the GPU is called to perform motion compensation on the N-2 frame and the N-1 frame using the inter-frame motion information of the N-2 frame and the N-1 frame, where N is an integer greater than 2.
[0134] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices or methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units 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 devices or modules or units, which can be electrical, mechanical or other forms.
[0135] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure. For example, the functional modules / units in the various embodiments of the present disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0136] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0137] The embodiment of the present disclosure also provides an electronic device. Fig.11 The structure diagram of the electronic device 300 according to the embodiment of the present disclosure is shown. Figure 3 As shown, in this embodiment, the electronic device 300 includes a memory 310 and a processor 320 .
[0138] The memory 310 is used to store computer programs; the memory 310 includes: ROM, RAM, disk, USB flash drive, memory card or optical disk and other media that can store program codes.
[0139] Specifically, the memory 310 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The electronic device 300 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 310 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0140] The processor 320 is connected to the memory 310, and is used to execute the computer program stored in the memory 310, so that the electronic device 300 executes the frame insertion method described in any embodiment of the present disclosure.
[0141] In some embodiments, the processor 320 may be a general-purpose processor, including a central processing unit (CPU) and a network processor (NP). In other embodiments, the processor 320 may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0142] In this embodiment, the electronic device 300 may further include a display 330. The display 330 is communicatively connected with the memory 310 and the processor 320, and is used to display a graphical user interface (GUI) interaction interface related to the frame insertion method described in the embodiment of the present disclosure.
[0143] The embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the frame insertion method described in any embodiment of the present disclosure is implemented.
[0144] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0145] The above embodiments are merely illustrative of the principles and effects of the present disclosure, and are not intended to limit the present disclosure. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present disclosure. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present disclosure shall still be covered by the claims of the present disclosure.
Claims
1. A frame insertion method, characterized in that: include: Obtaining an input source, an input frame rate, and an output frame rate of the input source; Acquire corresponding interpolation frame configuration information according to the input frame rate, the output frame rate and the interpolation frame configuration, wherein the interpolation frame configuration information is associated with an interpolation frame for implementing frame rate conversion from the input frame rate to the output frame rate; as well as The input source is subjected to frame interpolation processing by using the frame interpolation configuration information to obtain a target source having the output frame rate.
2. The frame insertion method according to claim 1, characterized in that: Acquiring corresponding interpolation frame configuration information according to the input frame rate, the output frame rate and the interpolation frame configuration includes: Analyze according to the input frame rate and the output frame rate to obtain a frame insertion configuration; Acquire corresponding compensation frame information according to the interpolation configuration, the input frame rate, and the output frame rate; and The interpolation frame configuration information is acquired using the compensation frame information and the interpolation frame configuration.
3. The frame insertion method according to claim 2, characterized in that: Analyzing the input frame rate and the output frame rate to obtain the interpolation configuration includes: Obtaining a corresponding interpolation network model and a call count according to a ratio of the output frame rate to the input frame rate; and The interpolation configuration is obtained according to the input frame rate, the output frame rate, the interpolation network model, and the number of calls.
4. The frame insertion method according to claim 1, characterized in that: Performing frame interpolation processing on the input source by using the frame interpolation configuration information to obtain a target source having the output frame rate includes: Perform frame interpolation processing between the current frame and the next frame of the input source according to the frame interpolation configuration information to obtain a target source with the output frame rate.
5. The frame insertion method according to claim 1, characterized in that: Also includes: Acquire inter-frame motion information between frames of the input source according to the input source; as well as The inter-frame motion information and the interpolation configuration information are used to perform motion compensation for interpolation processing.
6. The frame insertion method according to claim 5, characterized in that: Acquiring inter-frame motion information between frames of the input source according to the input source includes: Obtaining an interpolation ratio using the interpolation configuration information; Acquire interpolation time between frames according to the interpolation magnification; and A convolutional neural network is used to predict the motion between frames of the input source to obtain inter-frame motion information at the interpolation moment.
7. The frame insertion method according to claim 6, characterized in that: Using a convolutional neural network to predict the motion between frames of the input source to obtain the inter-frame motion information at the interpolation moment includes: Acquire an interpolation frame according to the interpolation frame configuration information, where the interpolation frame includes a reference frame and a non-reference frame; Downsample the current frame and the previous frame to obtain multiple layers of the current frame and the previous frame with different resolutions; Inputting the current frame and the previous frame into a convolutional neural network of a current layer to output inter-frame motion information of the reference frame of the current layer and inter-frame motion information of the non-reference frame; and The inter-frame motion information of the reference frame of the current layer, the inter-frame motion information of the non-reference frame, and the current frame and the previous frame of the resolution of the next layer are input into the next layer of convolutional neural network to output the inter-frame motion information of the reference frame of the next layer, and the inter-frame motion information of the non-reference frame.
8. The frame insertion method according to claim 7, characterized in that: The current frame and the previous frame are spliced and input into the current layer convolutional neural network to output the inter-frame motion information of the reference frame of the current layer and the inter-frame motion information of the non-reference frame, including: Using the current layer convolutional neural network to obtain the optical flow and mask of the reference frame of the current layer and the offset and mask of the non-reference frame; Acquire the optical flow of the non-reference frame according to the optical flow of the reference frame and the offset of the non-reference frame; and The inter-frame motion information of the reference frame is obtained according to the optical flow and the mask of the reference frame, and the inter-frame motion information of the non-reference frame is obtained according to the optical flow and the offset of the non-reference frame.
9. The frame insertion method according to claim 7, characterized in that: Also includes: The inter-frame motion information at the current moment is used as input for obtaining the inter-frame motion information at the next moment, so as to transmit the time domain information of the input source.
10. The frame insertion method according to claim 1, characterized in that: Also includes: The encoder is used to obtain motion vectors between frames of the input source to obtain inter-frame basic motion information of the input source.
11. The frame insertion method according to claim 1, characterized in that: Also includes: Detecting the input source using an image detection network to obtain a foreground area of the input source; The foreground area of the input source is protected according to the location of the foreground area of the input source.
12. The frame insertion method according to claim 1, characterized in that: Also includes: A real frame rate is determined for the video of the input source, so as to use the real frame rate as the input frame rate.
13. A frame insertion device, characterized in that: include: An input parameter module, configured to obtain an input source, an input frame rate of the input source, and an output frame rate; an interpolation configuration module, configured to obtain corresponding interpolation configuration information according to the input frame rate, the output frame rate and the interpolation configuration, wherein the interpolation configuration information is associated with an interpolation for implementing frame rate conversion from the input frame rate to the output frame rate; as well as The interpolation processing module is configured to perform interpolation processing on the input source using the interpolation configuration information to obtain a target source with the output frame rate.
14. The frame insertion device according to claim 13, characterized in that: The interpolation processing module is configured as follows: The foreground area of the Nth frame as the current frame is obtained by the first processing unit and the foreground area is protected, the Nth frame is downsampled by the second processing unit, and the inter-frame motion information of the N-1th frame and the Nth frame is obtained by the third processing unit; as well as The inter-frame motion information of the N-2 frame and the N-1 frame is obtained by the third processing unit, and the inter-frame motion information of the N-2 frame and the N-1 frame is used by the second processing unit to perform motion compensation on the N-2 frame and the N-1 frame, where N is an integer greater than 2.
15. An electronic device, characterized in that: include: a memory configured to store an executable program; as well as The processor is configured to execute the program to enable the electronic device to perform the interpolation method according to any one of claims 1 to 12.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed, the frame interpolation method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Image processing apparatus
CN101079246A
Video frame rate conversion method and device
CN105578207A
Video frame up-sampling and down-sampling methods and devices and video live broadcast method and system
CN111263193A
Video frame insertion method and system capable of inserting any frame rate
CN112954395A
Video frame insertion method and device, equipment, medium and product
CN114007135A
