Frame insertion method and system based on edge information and multi-scale cross-fusion network
Through the frame insertion method based on edge information and multi-scale cross-fusion network, it solves the problem of unnatural interpolation results in the existing technology in complex motion and occlusion scenes, and achieves high-quality and efficient video frame rate improvement.
Patent Information
- Application Number
- CN202310912141.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-07-24
AI Technical Summary
Existing video frame interpolation technology is difficult to generate natural and high-quality interpolation results when processing complex motion and occlusion scenes. Traditional methods have problems with artifacts and distortion, especially in real-time and high-resolution processing.
A frame insertion method based on edge information and multi-scale cross-fusion network is adopted, and the frame distortion operation is performed through the cooperation of feature extractor and adaptive flow. It is combined with the multi-scale cross-fusion network to generate high-quality interpolated frames, using U-Net architecture and convolution The block attention module reduces information loss and compensates for the information loss during downsampling through the edge feature enhancement module.
It improves the video frame rate and quality, can handle complex motion and occlusion scenes more effectively, generates natural and high-quality interpolation results, and enhances the ability to model spatiotemporal relationships.
Smart Images

Figure CN116895037B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a frame insertion method and system based on edge information and a multi-scale cross-fusion network. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Video frame interpolation is a technique that synthesizes one or more intermediate frames that do not originally exist between two consecutive input frames to improve the smoothness and clarity of the video. As a research hotspot in the field of video processing, it is widely used in animation production, generation of high-quality slow-motion effects, video frame rate conversion, new perspective synthesis and other fields. Although there are many studies on video frame interpolation technology, there are still many challenges in dealing with scenes containing complex motion and occlusion. For example, when fast-moving objects, occlusions, blurs and other situations appear in the video, traditional methods usually produce unnatural artifacts or distortions.
[0004] In recent years, with the development of deep learning technology and computing hardware, many new learning-based VFI methods have emerged, which use deep neural networks to achieve video frame interpolation. These methods are generally divided into three categories: flow-based methods, kernel-based methods, and methods that combine the two.
[0005] The core idea of flow-based methods is to use the motion information between corresponding entities in consecutive frames to estimate the position and shape of entities in the intermediate frames. However, this method usually requires estimating the optical flow between two input frames, which is a computationally intensive and inaccurate task. When the optical flow estimation is inaccurate, they cannot accurately handle complex motion and occlusion, resulting in unsatisfactory interpolation results. Moreover, it often cannot achieve real-time or high-resolution performance, which limits its potential in video enhancement and applications.
[0006] Kernel-based methods synthesize intermediate frames by performing convolution operations on local patches around each output pixel. However, it is limited to processing motions smaller than the kernel size. It cannot effectively handle large motion scenes when the motion amplitude exceeds the convolution kernel size, resulting in blurring and distortion in the generated results. In addition, kernel-based methods that rely only on local information for frame interpolation may ignore global context and spatiotemporal correlations, resulting in unnatural interpolation results. Summary of the invention
[0007] In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides a frame insertion method and system based on edge information and a multi-scale cross-fusion network.
[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0009] A first aspect of the present invention provides a frame insertion method based on edge information and a multi-scale cross-fusion network, comprising:
[0010] Obtain two consecutive frames of images of the video to be interpolated, and perform cropping and scale transformation on the obtained two consecutive frames of images to obtain a cropped original-scale image and a scale-transformed image;
[0011] The original scale image is input into the feature extractor for feature extraction, and the extracted features are enhanced using a feature enhancement module based on edge information to obtain enhanced features;
[0012] After the enhanced features are scaled, pixel-level parameters are extracted for the enhanced features and the scaled features, and then adaptive stream collaboration is used to perform frame warping operations on the cropped original-scale image and the scaled image according to the extracted pixel-level parameters to obtain warped frames of three scales.
[0013] The warped frames at three scales are input into a multi-scale cross-fusion network to synthesize interpolated frames;
[0014] The feature extractor is designed based on the U-Net architecture and includes: an encoder, a decoder and a convolutional block attention module; the encoder and the decoder are connected through the convolutional block attention module; the encoder and the decoder are respectively used to extract the encoding features and decoding features of different resolutions of the original scale image; the convolutional block attention module is used to cascade the encoding features and decoding features of the same dimension;
[0015] The method uses a feature enhancement module based on edge information to enhance the extracted features, including: using the feature enhancement module based on edge information to synthesize the encoding features extracted by the encoder into edge features, and then fusing the edge features with the decoding features of different dimensions extracted by the decoder to obtain multiple preliminary enhanced feature maps; finally, splicing and convolving the multiple preliminary enhanced feature maps to obtain the final enhanced features.
[0016] A second aspect of the present invention provides a frame insertion system based on edge information and a multi-scale cross-fusion network, comprising:
[0017] The image acquisition module is configured to: acquire two consecutive frames of images of the video to be interpolated, crop and scale the acquired two consecutive frames of images, and obtain a cropped original scale image and a scale-transformed image;
[0018] The feature enhancement module is configured to: input the original scale image into the feature extractor to extract features, and enhance the extracted features using the feature enhancement module based on edge information to obtain an enhanced feature map;
[0019] The feature extractor is designed based on the U-Net architecture and includes: an encoder, a decoder and a convolutional block attention module; the encoder and the decoder are connected through the convolutional block attention module; the encoder and the decoder are respectively used to extract the encoding features and decoding features of different resolutions of the original scale image; the convolutional block attention module is used to cascade the encoding features and decoding features of the same dimension;
[0020] The method of enhancing the extracted features by using the feature enhancement module based on edge information includes: synthesizing the encoding features extracted by the encoder into edge features by using the feature enhancement module based on edge information, and then fusing the edge features with the decoding features of different dimensions extracted by the decoder to obtain a plurality of initially enhanced feature maps; and finally concatenating and convolving the plurality of initially enhanced feature maps to obtain a final enhanced feature map.
[0021] The frame warping module is configured to: after scaling the enhanced features, respectively extract pixel-level parameters of the enhanced features and the scale-transformed features, and then use adaptive stream collaboration to perform frame warping operations on the cropped original-scale image and the scale-transformed image according to the extracted pixel-level parameters to obtain warped frames of three scales;
[0022] The interpolation frame synthesis module is configured to: input the warped frames of three scales into a multi-scale cross-fusion network to synthesize the interpolation frames.
[0023] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in a frame insertion method based on edge information and a multi-scale cross-fusion network as described in the first aspect of the present invention.
[0024] The fourth aspect of the present invention provides an electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a frame insertion method based on edge information and a multi-scale cross-fusion network as described in the first aspect of the present invention are implemented.
[0025] One or more of the above technical solutions have the following beneficial effects:
[0026] (1) Given two consecutive frames I0 and I1 as input, the method is used to generate a non-existent intermediate frame I tTo improve the smoothness and clarity of the video, where 0 < t < 1. To improve the system performance and minimize information loss, the overall framework of the video frame interpolation system is constructed based on the U-Net architecture, and the Convolutional Block Attention Module (CBAM) is used in the U-Net architecture to replace the traditional skip connection to establish the relationship between the encoder and the decoder.
[0027] (2) To further enhance the features, the present invention proposes a feature enhancement module based on edge information. This module uses the encoded features to synthesize edge features and fuses them with the decoded features of different dimensions for feature enhancement. The enhanced features are concatenated along the channel dimension and a convolution operation is performed to obtain the final enhanced features. The subsequent three groups of sub-networks estimate the image parameters based on this, and then use Adaptive Flow Collaboration (AdaCoF) to complete the warping operation of the input frames at three scales. Finally, the warped frames at the three scales are input into different branches of the multi-scale cross-fusion network proposed by the present invention to synthesize high-quality interpolation results.
[0028] (3) The present invention integrates the feature enhancement module based on edge information into the U-Net architecture to compensate for the information lost during the continuous downsampling process and obtain a more complete feature map. Then, a multi-scale cross-fusion frame synthesis network composed of three GridNet branches is used to generate high-quality interpolation frames. In the middle of the synthesis network architecture, the features are exchanged and fused between the three branches, enhancing the network's ability to model the spatio-temporal relationship and the detailed changes between video frames. The feature enhancement module based on edge information proposed by the present invention enables the model to obtain a more complete feature map, thereby effectively improving the video frame rate and quality.
[0029] Advantages of additional aspects of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The specification drawings forming a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.
[0031] Figure 1 It is a flowchart of the frame interpolation method based on edge information and multi-scale cross-fusion network for the first embodiment.
[0032] Figure 2 It is a schematic structural diagram of the Convolutional Block Attention Module (CBAM) for the first embodiment.
[0033] Figure 3 It is a schematic structural diagram of the feature fusion module for the first embodiment.
[0034] Figure 4 FIG. 1 is a schematic diagram of a subnetwork structure of the first embodiment.
[0035] Figure 5 FIG. 1 is a schematic diagram of the GridNet network structure of the first embodiment.
[0036] Figure 6 Schematic diagram of the residual block structure inside the GridNet network of the first embodiment. DETAILED DESCRIPTION
[0037] Embodiment 1
[0038] like Figure 1 As shown, this embodiment discloses a frame insertion method based on edge information and a multi-scale cross-fusion network, including:
[0039] Step 1: obtain two consecutive frames of the video to be interpolated, crop and scale the obtained two consecutive frames to obtain a cropped original scale image and a scale-transformed image;
[0040] Step 2: Input the original scale image into the feature extractor for feature extraction, and use the feature enhancement module based on edge information to enhance the extracted features to obtain enhanced features;
[0041] Step 3: After the enhanced features are scaled, pixel-level parameters are extracted for the enhanced features and the scaled features respectively, and then adaptive stream collaboration is used to perform frame warping operations on the cropped original-scale image and the scaled image according to the extracted pixel-level parameters to obtain warped frames of three scales;
[0042] Step 4: Input the warped frames of the three scales into the multi-scale cross-fusion network to synthesize the interpolated frames.
[0043] In step 1, randomly cropping the acquired two consecutive frames of images includes: randomly cropping the two original frames of images respectively to obtain 256×256 image blocks;
[0044] The scale transformation of the cropped image includes: upsampling and downsampling the cropped image blocks to obtain image blocks of twice the scale and half the scale, respectively, and the scale-transformed image blocks are used for subsequent frame warping operations.
[0045] In step 2, the feature extractor is a feature extractor based on the internal cascade of the encoder and decoder; this embodiment designs a feature extractor based on the U-Net architecture, including: an encoder, a decoder, and a convolutional block attention module, and the encoder and the decoder are connected through a convolutional block attention module (CBAM); this embodiment uses a convolutional block attention module (CBAM) instead of a traditional skip connection to establish a connection between the encoder and the decoder, reduce information loss and perform feature enhancement.
[0046] The encoder and decoder are used to extract encoding features and decoding features of different resolutions of the image, respectively; the convolutional block attention module is used to cascade encoding features and decoding features of the same dimension.
[0047] The edge feature enhancement module based on edge information is used to synthesize edge features using encoding features, and then fuse the edge features with decoding features of different dimensions to obtain multiple preliminary enhanced feature maps; finally, the multiple preliminary enhanced feature maps are spliced and convolved to obtain the final enhanced features.
[0048] Step 201: In this embodiment, the step of extracting features using a feature extractor includes:
[0049] Step 2011. Input the original scaled image into the feature extractor to obtain encoding features and decoding features of different resolutions;
[0050] It should be noted that in this embodiment, the encoder is composed of 5 convolutional layers and 5 average pooling layers. After the first convolutional layer, the feature is 32-dimensional, after the second convolutional layer, the feature is 64-dimensional, and so on. The dimension of the feature map increases exponentially until the feature reaches 512 dimensions; the resolution of the encoded feature is reduced to half of the original after each pooling layer. In the decoder part, the feature dimension gradually decreases from 512 dimensions until the feature reaches 64 dimensions.
[0051] Step 2012. Between the encoding features and the decoding features of the same dimension, a convolutional block attention module (CBAM) is used to extract a weight map for the encoding features, and feature enhancement is performed by pixel-level multiplication to obtain enhanced encoding features;
[0052] Step 2013: The enhanced coding features are fused with the decoding features in the corresponding dimensions through pixel-level addition to obtain cascaded decoding features.
[0053] Specifically, the convolutional block attention module (CBAM) can adaptively obtain the spatial weight maps and channel weight maps of different layers of the entire encoder. It extracts the weight maps and enhances the encoded features of different dimensions to preserve motion and occlusion information. Figure 2The detailed architecture of CBAM is shown, which contains two sub-modules: Channel Attention Module (CAM) and Spatial Attention Module (SAM).
[0054] The channel attention module (CAM) includes: a parallel average pooling module and a maximum pooling module and a sigmoid activation function; the channel information in the encoding feature F is aggregated in parallel by the average pooling module and the maximum pooling module, and then the aggregated channel information is passed through the sigmoid activation function to obtain a channel attention feature map; the channel attention feature map F C The intermediate feature map F' obtained by pixel-by-pixel multiplication with the encoded feature F is used as the input of the spatial attention module (SAM);
[0055] The spatial attention module (SAM) includes parallel average pooling and maximum pooling layers, channel concatenation layers, convolutional layers, and sigmoid functions;
[0056] The average pooling layer and the maximum pooling layer aggregate the statistical information of a channel respectively, and then two feature maps are obtained based on the channel concatenation layer. Finally, the channel is reduced to one channel through the convolution layer, and the spatial attention feature map Fs is generated using the sigmoid function. The spatial attention feature map Fs and the output F' of the channel attention module (CAM) are multiplied pixel by pixel to obtain the enhanced encoding feature F″.
[0057] Among them, the two stages of the Convolutional Block Attention Module (CBAM) can be expressed as:
[0058]
[0059]
[0060]
[0061] Among them, M c and M s They represent the channel attention module (CAM) and the spatial attention module (SAM), respectively, and CBAM is the attention module of the entire convolutional block. W0 and W1 represent the weights of the two 1×1 convolutions in the first row of the first stage, and the convolution layers in the two rows share weights. 7×7 represents the weight of the 7×7 convolutional layer in the spatial attention module, F and F' represent the inputs of CAM and SAM, while σ(·) and * represent the sigmoid function and convolution operation, and denote element-wise addition and multiplication, respectively. AvgPool(·) and MaxPool(·) denote average pooling and maximum pooling, respectively.
[0062] Step 202: Feature enhancement module based on edge information.
[0063] In this embodiment, the steps of implementing feature enhancement using the feature enhancement module based on edge information include:
[0064] Step 2021. Upsample the highest dimensional encoding feature to make it have the same size as the lowest dimensional encoding feature, and concatenate the two features and perform three 1×1 convolutions to synthesize the edge feature;
[0065] Step 2022. Upsample the decoded features of different dimensions to the size of the edge features respectively, fuse the edge features with the decoded features of different dimensions respectively, and perform three convolution operations to obtain an enhanced feature map;
[0066] Step 2023. Concatenate the enhanced feature maps along the channel dimension and perform a convolution operation to obtain the final enhanced features.
[0067] Specifically, in order to further enhance the features, this embodiment integrates a feature enhancement module based on edge information on the basis of the U-Net architecture. When extracting feature maps in the U-Net architecture, each downsampling will lose some edge information that cannot be retrieved from upsampling. Therefore, this embodiment attempts to synthesize edge information using encoding features and fuse them with decoding features of different dimensions for feature enhancement to better alleviate this problem.
[0068] When synthesizing edge features, since the resolution of high-dimensional features is low and the edge information contained therein is relatively rough, this embodiment uses the lowest-dimensional coding features rich in spatial details and structural information to synthesize edge features. However, although the underlying features can capture edge information, they contain a lot of noise and redundant information, which will affect the definition and accuracy of the edge. Therefore, it is not enough to rely solely on the lowest-dimensional features to generate edge features. Therefore, this embodiment uses the highest-dimensional coding features to guide the lowest-dimensional features to generate fine edge features, because the highest-level features can provide more semantic and global information and filter out some noise and redundant edges.
[0069] The synthesis process of edge information is expressed in mathematical form as follows:
[0070] E f =γ(F h ,F l )
[0071] Among them, F h and l Represent the lowest dimension encoding feature and the highest dimension encoding feature respectively, E f represents edge features, and γ is the feature fusion module.
[0072] like Figure 3As shown in the figure, in the Feature Fusion Module (FFM), the smaller resolution coding feature is first upsampled so that the two coding features have the same size. Then, the two coding features are concatenated and subjected to three 3×3 convolutions to obtain the final fused fine edge feature.
[0073] The generated fine edge features are fused with the cascaded decoded features of different dimensions to compensate for the information loss in the downsampling process, and a preliminary enhanced feature map is obtained in the process of fusion features. Finally, the preliminary enhanced features are concatenated along the channel dimension and subjected to a convolution operation to obtain the final enhanced features. This process can be expressed by the following formula:
[0074] F e1 =γ(E f ,F1)
[0075] F e2 =γ(E f ,F2)
[0076] F e3 =γ(E f ,F3)
[0077] F e4 =γ(E f ,F4)
[0078] F E =conv(cat[F e1 ,F e2 ,F e3 ,F e4 ])
[0079] Among them, F i (i=1,2,3,4) represents the decoding features of different dimensions, F ei (i=1,2,3,4) represents the initial enhanced features, conv(·) represents the convolution operation, and cat[·] represents the feature concatenation operation. The final enhanced feature F E It is used to estimate pixel-level parameters of each target pixel on input frames of different resolutions.
[0080] In step 3, the multi-scale frame warping operation based on enhanced features includes the following steps:
[0081] Step 301: scale the enhanced features to obtain enhanced features at twice the scale and half the scale, and then use the enhanced original scale features and the scale-transformed features as inputs to three groups of sub-networks. The three groups of sub-networks estimate the horizontal and vertical offset vectors of each target pixel on each scale input frame and the weight of the convolution kernel of each target pixel.
[0082] Step 302: Adaptive stream collaboration is used as a warping module, which uses an offset vector to expand the motion sampling range, and each pixel does not share weights to warp the input images of three scales into output images;
[0083] Step 303: Perform pixel-level operations to obtain warped frames at three scales.
[0084] Specifically, the obtained enhanced features are passed through three groups of sub-networks to estimate the pixel-level parameters of each target pixel on the input frames of different scales, and the adaptive stream collaboration is used to perform the distortion operation on the input frame, and finally the distorted frames of three scales are obtained. Among them, the estimated offset vector of each target pixel is used to expand the sampling position of the information, and the weight of each pixel is no longer shared. The operation can be mathematically expressed by the following equation:
[0085]
[0086] Among them, (i, j) is the target pixel, K is the size of the convolution kernel, and W is m, (i,j) is the weight of the (m,n)th convolution kernel at the target pixel (i,j), (α m, ,β m, ) is an offset vector that can point to any position outside the grid point, and d is the dilation value.
[0087] like Figure 4 The figure shows a structural diagram of a group of sub-networks in this embodiment. Each group of sub-networks contains six branches for estimating the pixel-level parameters required to perform the distortion operation on two input frames. (α, β) represents the offset vectors in the horizontal and vertical directions, and ω represents the weight of the convolution kernel.
[0088] The first branch in the subnetwork includes a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, an upsampling layer, and a deep over-parameterized convolution layer, which are connected in sequence;
[0089] The second branch structure, the fourth branch structure and the fifth branch structure in the sub-network are the same as the structure of the first branch in the sub-network;
[0090] The third branch structure in the subnetwork includes a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, an upsampling layer, a deep over-parameterized convolution layer, and a softmax activation function connected in sequence; the sixth branch structure in the subnetwork is the same as the third branch structure.
[0091] The other two groups of sub-networks have the same structure as this group of sub-networks, except for the different parameters.
[0092] In step 4, synthesizing the difference frame using a multi-scale cross-fusion network includes the following steps:
[0093] Step 401: input the three-scale warped frames into different branches of the multi-scale cross-fusion network;
[0094] Step 402: In the middle of the architecture, features are exchanged and merged between branches that process warped frames of different scales;
[0095] Step 403: Get the output of each branch and combine them to generate the final interpolation result.
[0096] Specifically, in order to generate high-quality output frames, this embodiment constructs a multi-scale cross-fusion frame synthesis network consisting of three branches. A GridNet with three rows and six columns is used as the basic unit of the synthesis network. Each branch is a GridNet with three rows and six columns, where each row consists of six residual blocks with a channel attention mechanism, and each column is connected to different rows through downsampling or upsampling, such as Figure 5 shown.
[0097] The warped frames of three scales are used as the input of the synthesis network and fed to different branches respectively. At the encoder side of GridNet, global features and semantic information are extracted from the image, which can be expressed mathematically as:
[0098]
[0099]
[0100]
[0101] Among them, F i (i=-1,0,1) are the intermediate features of half scale, original scale, and double scale respectively, I′ i (i=-1,0,1) are the warped frames of three scales, Represents the encoder parts of the three GridNet branches, which can convert the input warped frames into low-resolution feature maps.
[0102] In the middle of the synthetic network architecture, the intermediate features of the original scale branch are downsampled and fused with the features of the small scale branch, and upsampled and fused with the features of the large scale branch. In this way, the small and large scale branches can also use the feature information of the original scale branch. In addition, the features of the small and large scale branches are upsampled and downsampled respectively and then fused with the features of the original scale branch, so that the original scale branch can obtain more detailed and global information.
[0103] The fusion strategy in the middle of the architecture is defined as follows:
[0104] F -1 =DS(F 0 )+F -1
[0105] F 0 =DS(F 1 )+US(F -1 )+F 0
[0106] F 1 =US(F 0 )+F 1
[0107] in, i (i=-1,0,1) represents the features after fusion of three scales, DS(·) and US(·) represent the upsampling and downsampling processes respectively.
[0108] Finally, take the output of each branch and combine them to generate the final interpolated frame. Its operation can be mathematically represented by the following equation:
[0109]
[0110] Among them, I t represents the final interpolation result, B represents the output block, which is used to fuse the outputs of the three branches; and The decoder part represents the three branches that can recover the low-resolution features into a high-resolution output image.
[0111] It is understandable that the feature extractor and the multi-scale cross-fusion network in this embodiment are trained. This embodiment uses the Vimeo-90k dataset as a training set, which is a large-scale, high-quality video processing dataset. Vimeo-90k contains 51,312 sets of three-frame video clips with a resolution of 256*448, where the first and third frames are used as input, and the second frame is used as a real frame to fine-tune the training results. In addition, this embodiment randomly crops the dataset to obtain image blocks with a resolution of 256*256, and increases data diversity by randomly flipping samples horizontally and vertically and disrupting the time order. The test set is the common open source datasets Midd l ebury, DAVI S and UCF101.
[0112] Embodiment 2
[0113] This embodiment discloses a frame insertion system based on edge information and a multi-scale cross-fusion network, including:
[0114] The image acquisition module is configured to: acquire two consecutive frames of images of the video to be interpolated, crop and scale the acquired two consecutive frames of images, and obtain a cropped original scale image and a scale-transformed image;
[0115] The feature enhancement module is configured to: input the original scale image into the feature extractor to extract features, and enhance the extracted features using the feature enhancement module based on edge information to obtain enhanced features;
[0116] The feature extractor is designed based on the U-Net architecture and includes: an encoder, a decoder and a convolutional block attention module; the encoder and the decoder are connected through the convolutional block attention module; the encoder and the decoder are respectively used to extract the encoding features and decoding features of different resolutions of the original scale image; the convolutional block attention module is used to cascade the encoding features and decoding features of the same dimension;
[0117] The method of enhancing the extracted features by using the feature enhancement module based on edge information includes: synthesizing the encoding features extracted by the encoder into edge features by using the feature enhancement module based on edge information, and then fusing the edge features with the decoding features of different dimensions extracted by the decoder to obtain a plurality of initially enhanced feature maps; and finally concatenating and convolving the plurality of initially enhanced feature maps to obtain the final enhanced features;
[0118] The frame warping module is configured to: after scaling the enhanced features, respectively extract pixel-level parameters of the enhanced features and the scale-transformed features, and then use adaptive stream collaboration to perform frame warping operations on the cropped original-scale image and the scale-transformed image according to the extracted pixel-level parameters to obtain warped frames of three scales;
[0119] The interpolation frame synthesis module is configured to: input the warped frames of three scales into a multi-scale cross-fusion network to synthesize the interpolation frames.
[0120] Embodiment 3
[0121] The purpose of this embodiment is to provide a computer-readable storage medium.
[0122] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a frame insertion method based on edge information and a multi-scale cross-fusion network as described in Embodiment 1 of the present disclosure.
[0123] Embodiment 4
[0124] The purpose of this embodiment is to provide an electronic device.
[0125] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a frame insertion method based on edge information and a multi-scale cross-fusion network as described in Embodiment 1 of the present disclosure are implemented.
[0126] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0127] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0128] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A frame insertion method based on edge information and multi-scale cross-fusion network, characterized in that: include: Obtain two consecutive frames of images of the video to be interpolated, and perform cropping and scale transformation on the obtained two consecutive frames of images to obtain a cropped original-scale image and a scale-transformed image; The original scale image is input into the feature extractor for feature extraction, and the extracted features are enhanced using a feature enhancement module based on edge information to obtain enhanced features; After the enhanced features are scaled, pixel-level parameters are extracted for the enhanced features and the scaled feature maps, and then adaptive stream collaboration is used to perform frame warping operations on the cropped original-scale image and the scaled image according to the extracted pixel-level parameters to obtain warped frames of three scales. The warped frames at three scales are input into a multi-scale cross-fusion network to synthesize interpolated frames; The feature extractor is designed based on the U-Net architecture and includes: an encoder, a decoder and a convolutional block attention module; the encoder and the decoder are connected through the convolutional block attention module; the encoder and the decoder are respectively used to extract the encoding features and decoding features of different resolutions of the original scale image; the convolutional block attention module is used to cascade the encoding features and decoding features of the same dimension; The method of enhancing the extracted features by using the feature enhancement module based on edge information includes: synthesizing the encoding features extracted by the encoder into edge features by using the feature enhancement module based on edge information, and then fusing the edge features with the decoding features of different dimensions extracted by the decoder to obtain a plurality of initially enhanced feature maps; and finally concatenating and convolving the plurality of initially enhanced feature maps to obtain the final enhanced features; The frame warping operation comprises: The enhanced features are scaled to obtain enhanced features at twice the scale and half the scale. The enhanced original scale features and the scaled features are then used as inputs of three groups of sub-networks. The three groups of sub-networks are used to estimate the horizontal and vertical offset vectors of each target pixel on each scale input frame and the weight of the convolution kernel of each target pixel. Adaptive stream collaboration is used as a warping module, which uses an offset vector to expand the motion sampling range and each pixel does not share weights to warp the input images of three scales into the output image; Perform pixel-level operations to obtain warped frames at three scales; The three groups of sub-networks have the same structure but different parameters, and each group of sub-networks includes six branches; The first branch in the subnetwork includes a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, an upsampling layer, and a deep over-parameterized convolution layer, which are connected in sequence; The second branch structure, the fourth branch structure and the fifth branch structure in the sub-network are the same as the structure of the first branch in the sub-network; The third branch structure in the subnetwork includes a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, an upsampling layer, a deep over-parameterized convolution layer, and a softmax activation function, which are connected in sequence; The sixth branch structure in the subnetwork is the same as the third branch structure; The multi-scale cross-fusion network consists of three branches, each of which is a GridNet structure with three rows and six columns, each row consists of six residual blocks with a channel attention mechanism, and each column is connected to different rows through downsampling or upsampling; The method of inputting the three-scale warped frames into a multi-scale cross-fusion network to synthesize an interpolated frame includes: The warped frames of three scales are input into different branches respectively. The intermediate features of the original scale branch are downsampled and fused with the intermediate features of the small scale branch to obtain the output of the small scale branch. The intermediate features of the small scale branch and the large scale branch are upsampled and downsampled respectively and then fused with the intermediate features of the original scale branch to obtain the output of the original scale branch. The outputs of the three branches are combined to generate the final interpolated frame.
2. A frame insertion method based on edge information and multi-scale cross-fusion network as claimed in claim 1, characterized in that: The cropping and scale transformation of the acquired two consecutive frames of images include: randomly cropping the two consecutive frames of images to obtain image blocks of preset sizes, and upsampling and downsampling the cropped image blocks to obtain image blocks of different scales.
3. A frame insertion method based on edge information and multi-scale cross-fusion network as claimed in claim 1, characterized in that: The convolutional block attention module is used to cascade the coding features and decoding features of the same dimension, including: between the coding features and decoding features of the same dimension, using the convolutional block attention module to extract a weight map for the coding features, and performing feature enhancement on the weight map through pixel-level multiplication to obtain enhanced coding features; The enhanced coding features are fused with the decoding features in the corresponding dimensions through pixel-level addition to obtain the cascaded decoding features.
4. A frame insertion method based on edge information and multi-scale cross-fusion network as claimed in claim 3, characterized in that: The convolutional block attention module includes a cascaded channel attention module and a spatial attention module; The channel attention module includes a parallel average pooling module and a maximum pooling module and a sigmoid activation function; The input encoding features are aggregated through the average pooling module and the maximum pooling module in parallel to obtain the channel information. The aggregated channel information is activated by the sigmoid function to obtain the channel attention feature map. The intermediate feature map obtained by multiplying the input encoding features and the channel attention feature map pixel by pixel is used as the input of the spatial attention module. The spatial attention module includes a parallel average pooling layer and a maximum pooling layer as well as a channel splicing layer, a convolution layer and a sigmoid function; The average pooling layer and the maximum pooling layer aggregate the statistical information of a channel respectively, and then obtain two feature maps based on the channel splicing layer. Finally, the channel is reduced to one channel through the convolution layer, and the sigmoid function is used to generate a spatial attention feature map. The spatial attention feature map obtains enhanced encoding features through pixel-by-pixel multiplication operations.
5. A frame insertion method based on edge information and multi-scale cross-fusion network as claimed in claim 1, characterized in that: The feature enhancement module based on edge information is used to synthesize the encoding features extracted by the encoder into edge features, including: The highest-dimensional encoding feature of the encoder is upsampled to make it the same size as the lowest-dimensional encoding feature, and then the lowest-dimensional encoding feature is concatenated with the upsampled highest-dimensional encoding feature. The concatenated features are convolved to synthesize edge features.
6. A frame insertion system based on edge information and multi-scale cross-fusion network, characterized in that: include: The image acquisition module is configured to: acquire two consecutive frames of images of the video to be interpolated, crop and scale the acquired two consecutive frames of images, and obtain a cropped original scale image and a scale-transformed image; The feature enhancement module is configured to: input the original scale image into the feature extractor to extract features, and enhance the extracted features using the feature enhancement module based on edge information to obtain enhanced features; The feature extractor is designed based on the U-Net architecture and includes: an encoder, a decoder and a convolutional block attention module; the encoder and the decoder are connected through the convolutional block attention module; the encoder and the decoder are respectively used to extract the encoding features and decoding features of different resolutions of the original scale image; the convolutional block attention module is used to cascade the encoding features and decoding features of the same dimension; The method of enhancing the extracted features by using the feature enhancement module based on edge information includes: synthesizing the encoding features extracted by the encoder into edge features by using the feature enhancement module based on edge information, and then fusing the edge features with the decoding features of different dimensions extracted by the decoder to obtain a plurality of initially enhanced feature maps; and finally concatenating and convolving the plurality of initially enhanced feature maps to obtain the final enhanced features; The frame warping module is configured to: after scaling the enhanced features, respectively extract pixel-level parameters of the enhanced features and the scale-transformed features, and then use adaptive stream collaboration to perform frame warping operations on the cropped original-scale image and the scale-transformed image according to the extracted pixel-level parameters to obtain warped frames of three scales; The frame warping operation comprises: The enhanced features are scaled to obtain enhanced features at twice the scale and half the scale. The enhanced original scale features and the scaled features are then used as inputs of three groups of sub-networks. The three groups of sub-networks are used to estimate the horizontal and vertical offset vectors of each target pixel on each scale input frame and the weight of the convolution kernel of each target pixel. Adaptive stream collaboration is used as a warping module, which uses an offset vector to expand the motion sampling range and each pixel does not share weights to warp the input images of three scales into the output image; Perform pixel-level operations to obtain warped frames at three scales; The three groups of sub-networks have the same structure but different parameters, and each group of sub-networks includes six branches; The first branch in the subnetwork includes a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, an upsampling layer, and a deep over-parameterized convolution layer, which are connected in sequence; The second branch structure, the fourth branch structure and the fifth branch structure in the sub-network are the same as the structure of the first branch in the sub-network; The third branch structure in the subnetwork includes a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, a deep over-parameterized convolution layer, a linear rectification function, an upsampling layer, a deep over-parameterized convolution layer, and a softmax activation function, which are connected in sequence; The sixth branch structure in the subnetwork is the same as the third branch structure; The interpolation frame synthesis module is configured to: input the warped frames of three scales into a multi-scale cross-fusion network to synthesize the interpolation frames; The multi-scale cross-fusion network consists of three branches, each of which is a GridNet structure with three rows and six columns, each row consists of six residual blocks with a channel attention mechanism, and each column is connected to different rows through downsampling or upsampling; The method of inputting the three-scale warped frames into a multi-scale cross-fusion network to synthesize an interpolated frame includes: The warped frames of three scales are input into different branches respectively. The intermediate features of the original scale branch are downsampled and fused with the intermediate features of the small scale branch to obtain the output of the small scale branch. The intermediate features of the small scale branch and the large scale branch are upsampled and downsampled respectively and then fused with the intermediate features of the original scale branch to obtain the output of the original scale branch. The outputs of the three branches are combined to generate the final interpolated frame.
7. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the frame insertion method based on edge information and a multi-scale cross-fusion network as described in any one of claims 1 to 5 are implemented.
8. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the frame insertion method based on edge information and a multi-scale cross-fusion network as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Video frame insertion method and device, training method and device, electronic equipment and storage medium
CN115002379A
Frame insertion method and system based on cyclic residual convolution and over-parameterized convolution
CN115170402A
