Video frame processing method, device, computer equipment and storage medium

By extracting and weighting the multi-scale feature information of the video frame, it solves the blur problem in the captured video, improves the clarity and accuracy of the video frame, adapts to different blur levels, and achieves efficient video frame reconstruction.

CN114419517BActive Publication Date: 2024-09-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210100894.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2024-09-27
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively handle blur problems caused by device jitter or rapid movement of objects when shooting videos, affecting video clarity and accuracy.

Method used

By obtaining the video frame sequence, extracting feature information at multiple scales, performing weighted fusion, reconstructing based on the similarity between the blurred video frame and other video frames, and using the video frame processing model for training to improve the reconstruction quality.

Benefits of technology

It improves the clarity and accuracy of reconstructed video frames, adapts to video frames with different blur levels, reduces computational complexity, and improves shooting experience and recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419517B
    Figure CN114419517B
Patent Text Reader

Abstract

The embodiments of the present application disclose a video frame processing method, device, computer equipment and storage medium, which belong to the field of computer technology. The method includes: obtaining a video frame sequence, extracting first feature information of multiple scales from each video frame, and fusing multiple first feature information corresponding to the same video frame to obtain second feature information; based on the similarity between the second feature information of multiple video frames and the second feature information of blurred video frames, weighted fusion of the second feature information of multiple video frames is performed to obtain the first fused feature information corresponding to the blurred video frame; based on the first fused feature information, the blurred video frame is reconstructed. The method provided in the embodiments of the present application takes into account the influence of the multi-scale feature information of the blurred video frame and the multi-scale feature information of other video frames associated with the blurred video frame to adapt to the different blur levels of the video frame and ensure the clarity and accuracy of the reconstructed video frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a video frame processing method, apparatus, computer equipment, and storage medium. Background Art

[0002] In recent years, video shooting has become more and more popular among users. However, when users shoot with a camera, the video may be blurred due to the shaking of the camera or the rapid movement of the object being shot. Therefore, it is necessary to process the blurred video frames in the video. Summary of the invention

[0003] The embodiments of the present application provide a video frame processing method, apparatus, computer equipment and storage medium, which can ensure the clarity and accuracy of the reconstructed video frames. The technical solution is as follows:

[0004] On the one hand, a video frame processing method is provided, the method comprising:

[0005] Acquire a video frame sequence, wherein the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame;

[0006] Extracting first feature information of multiple scales from each video frame, and fusing multiple first feature information corresponding to the same video frame to obtain second feature information;

[0007] Based on the similarity between the second feature information of the multiple video frames and the second feature information of the blurred video frame, weighted fusion is performed on the second feature information of the multiple video frames to obtain first fused feature information corresponding to the blurred video frame;

[0008] The blurred video frame is reconstructed based on the first fusion feature information.

[0009] In a possible implementation manner, the fused feature information at the n-1th scale is a matrix; and the decoding process is performed on the fused feature information at the n-1th scale to obtain the first feature information at the n-1th scale, including:

[0010] Segmenting the fused feature information of the n-1th scale to obtain a plurality of third local matrices, wherein the third local matrix includes features at a plurality of positions;

[0011] For each feature, based on a plurality of features in a third local matrix where the feature is located and position features of the plurality of features, the feature is updated, wherein the position feature indicates a position of the corresponding feature in the third local matrix;

[0012] The updated features of the same third local matrix form a fourth local matrix;

[0013] Based on the positions of the plurality of third local matrices in the fusion feature information of the n-1th scale, splicing the plurality of fourth local matrices to obtain a second splicing matrix;

[0014] Based on the second splicing matrix, first feature information at the n-1th scale is determined.

[0015] In another possible implementation, before performing weighted fusion on the second feature information of the multiple video frames based on the similarity between the second feature information of the multiple video frames and the second feature information of the blurred video frame to obtain the first fused feature information corresponding to the blurred video frame, the method further includes:

[0016] For target feature information in a plurality of second feature information, based on the similarity between the plurality of second feature information and the target feature information, weighted fusion is performed on the plurality of second feature information to obtain second fused feature information, wherein the target feature information is any first feature information in the plurality of first feature information;

[0017] The second fused feature information is fused with the target feature information, and the fused feature information is determined as the updated feature information of the target feature information.

[0018] In another possible implementation, the method further includes:

[0019] Obtaining a second loss value based on an image difference between the labeled video frame and the predicted video frame;

[0020] The step of training the video frame processing model based on the first loss value includes:

[0021] The video frame processing model is trained based on the first loss value and the second loss value.

[0022] In another aspect, a video frame processing device is provided, the device comprising:

[0023] An acquisition module, used for acquiring a video frame sequence, wherein the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame;

[0024] A fusion module is used to extract first feature information of multiple scales from each video frame, and fuse multiple first feature information corresponding to the same video frame to obtain second feature information;

[0025] The fusion module is further configured to perform weighted fusion on the second feature information of the multiple video frames based on the similarity between the second feature information of the multiple video frames and the second feature information of the blurred video frame to obtain first fused feature information corresponding to the blurred video frame;

[0026] A reconstruction module is used to reconstruct the blurred video frame based on the first fusion feature information.

[0027] In a possible implementation, the fusion module includes:

[0028] a transforming unit, configured to transform, for each of the plurality of first feature information corresponding to any video frame, other first feature information except the first feature information of a target scale to the target scale, wherein the target scale is a maximum scale among the plurality of scales;

[0029] The fusion unit is used to fuse the multiple transformed first feature information to obtain the second feature information of the video frame.

[0030] In another possible implementation, the fusion unit is used to splice the multiple transformed first feature information to obtain spliced ​​feature information; and perform convolution processing on the spliced ​​feature information to obtain the second feature information of the video frame.

[0031] In another possible implementation, the number of the multiple scales is 2, and the fusion module includes:

[0032] an extraction unit, configured to perform feature extraction on each video frame of the plurality of video frames to obtain fourth feature information of the video frame;

[0033] an encoding unit, configured to encode the fourth feature information to obtain encoded feature information of a first scale;

[0034] A dimension reduction unit, used to reduce the dimension of the coding feature information of the first scale to obtain the coding feature information of the second scale;

[0035] A decoding unit, configured to decode the encoded feature information of the second scale to obtain first feature information of the second scale;

[0036] The decoding unit is further used to perform dimension upgrading on the first feature information of the second scale to obtain the dimension upgraded feature information of the first scale, and decode the dimension upgraded feature information of the first scale and the encoded feature information of the first scale to obtain the first feature information of the first scale.

[0037] In another possible implementation, the number of the multiple scales is n, where n is an integer greater than 2, and the fusion module includes:

[0038] an extraction unit, configured to perform feature extraction on each video frame of the plurality of video frames to obtain fourth feature information of the video frame;

[0039] an encoding unit, configured to encode the fourth feature information to obtain encoded feature information of a first scale;

[0040] The encoding unit is further used to reduce the dimension and encode the encoding feature information of the first scale to obtain the encoding feature information of the second scale, until the encoding feature information of the n-1th scale is obtained;

[0041] A dimension reduction unit, used to reduce the dimension of the coding feature information of the n-1th scale to obtain the coding feature information of the nth scale;

[0042] A decoding unit, configured to decode the encoded feature information of the n-th scale to obtain first feature information of the n-th scale;

[0043] The decoding unit is further used to perform dimension upgrading on the first feature information of the nth scale to obtain the dimension upgraded feature information of the n-1th scale, decode the dimension upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale to obtain the first feature information of the n-1th scale, until the first feature information of the first scale is obtained.

[0044] In another possible implementation, the encoding feature information of the first scale is a matrix; the encoding unit is used to reduce the dimension of the encoding feature information of the first scale to obtain the reduced dimension feature information of the second scale; the reduced dimension feature information is segmented to obtain multiple first local matrices, the first local matrix includes features at multiple positions; for each feature, based on multiple features in the first local matrix where the feature is located and position features of the multiple features, the feature is updated, the position feature indicates the position of the corresponding feature in the first local matrix; the multiple features after the same first local matrix is ​​updated constitute a second local matrix; based on the positions of the multiple first local matrices in the reduced dimension feature information, the multiple second local matrices are spliced ​​to obtain a first spliced ​​matrix; based on the first spliced ​​matrix, the encoding feature information of the second scale is determined.

[0045] In another possible implementation, the encoding unit is used to, for each first local matrix, fuse multiple features in the first local matrix with corresponding position features respectively to obtain multiple first fused features; for each feature in the first local matrix, based on the similarity between the first fused feature corresponding to the feature and the multiple first fused features, perform weighted fusion on the multiple first fused features, and determine the feature obtained by the weighted fusion as the feature after the feature is updated.

[0046] In another possible implementation manner, the encoding unit is used to determine the first splicing matrix as the encoding feature information of the second scale.

[0047] In another possible implementation, the device further includes:

[0048] A transformation module, configured to perform position transformation on features in the dimension reduction feature information based on a first position transformation matrix to obtain updated dimension reduction feature information;

[0049] The encoding unit is used to perform position transformation on the features in the first splicing matrix based on a second position transformation matrix, and determine the transformed feature matrix as the encoded feature information of the second scale, wherein the second position transformation matrix is ​​an inverse transformation matrix of the first position transformation matrix.

[0050] In another possible implementation manner, the decoding unit is used to fuse the dimension-upgraded feature information of the n-1th scale with the encoded feature information of the n-1th scale to obtain the fused feature information of the n-1th scale; and decode the fused feature information of the n-1th scale to obtain the first feature information of the n-1th scale.

[0051] In another possible implementation, the fused feature information at the n-1th scale is a matrix; the decoding unit is used to segment the fused feature information at the n-1th scale to obtain multiple third local matrices, and the third local matrix includes features at multiple positions; for each feature, based on multiple features in the third local matrix where the feature is located and position features of the multiple features, the feature is updated, and the position feature indicates the position of the corresponding feature in the third local matrix; the multiple features updated from the same third local matrix constitute a fourth local matrix; based on the positions of the multiple third local matrices in the fused feature information at the n-1th scale, the multiple fourth local matrices are spliced ​​to obtain a second spliced ​​matrix; based on the second spliced ​​matrix, the first feature information at the n-1th scale is determined.

[0052] In another possible implementation, the fusion module is used to perform weighted fusion on the target feature information in the multiple second feature information based on the similarity between the multiple second feature information and the target feature information to obtain second fused feature information, where the target feature information is any first feature information in the multiple first feature information; fuse the second fused feature information with the target feature information, and determine the fused feature information as the updated feature information of the target feature information.

[0053] In another possible implementation, the video frame processing device is implemented based on a video frame processing model, and the device further includes:

[0054] The acquisition module is further used to acquire a sample video frame sequence, wherein the sample video frame sequence includes a plurality of continuous sample video frames, wherein the plurality of sample video frames include a sample blurred video frame, and acquire a label video frame corresponding to the sample blurred video frame;

[0055] A processing module, configured to process the sample video frames in the sample video frame sequence based on the video frame processing model to obtain a predicted video frame corresponding to the sample blurred video frame;

[0056] An extraction module, used for performing feature extraction on the labeled video frame and the predicted video frame respectively based on an image contrast model to obtain fifth feature information of the labeled video frame and sixth feature information of the predicted video frame;

[0057] A determination module is used to obtain a feature difference between the fifth feature information and the sixth feature information based on an image contrast model, and determine the feature difference as the first loss value.

[0058] A training module is used to train the video frame processing model based on the first loss value.

[0059] In another possible implementation, the acquisition module is further used to acquire a second loss value based on an image difference between the label video frame and the predicted video frame;

[0060] The training module is used to train the video frame processing model based on the first loss value and the second loss value.

[0061] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the video frame processing method described in the above aspects.

[0062] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the video frame processing method described in the above aspects.

[0063] On the other hand, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the operations performed by the video frame processing method as described in the above aspects are implemented.

[0064] The method, apparatus, computer device and storage medium provided by the embodiments of the present application not only consider the multi-scale feature information of the blurred video frame when reconstructing the blurred video frame, but also consider the influence of the multi-scale feature information of other video frames associated with the blurred video frame. The feature information obtained by fusing the multi-scale feature information of multiple video frames is fused again according to the degree of association with the blurred video frame, so that the obtained fused feature information contains the multi-scale feature information of multiple video frames to adapt to the different blurriness of the video frame. The blurred video frame is reconstructed based on the fused feature information to weaken the blurriness of the video frame and ensure the clarity and accuracy of the reconstructed video frame. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 It is a structural diagram of an implementation environment provided by an embodiment of the present application;

[0067] Figure 2 is a flowchart of a video frame processing method provided by an embodiment of the present application;

[0068] Figure 3 is a flowchart of another video frame processing method provided by an embodiment of the present application;

[0069] Figure 4 This is a flow chart of updating each second feature information provided by an embodiment of the present application;

[0070] Figure 5 is a schematic diagram of updating the second feature information of the second video frame provided by an embodiment of the present application;

[0071] Figure 6This is a flow chart of obtaining third fusion feature information provided by an embodiment of the present application;

[0072] Figure 7 is a flowchart of extracting first feature information of multiple scales provided by an embodiment of the present application;

[0073] Figure 8 This is a flow chart for obtaining the second coding feature information provided by an embodiment of the present application;

[0074] Fig. 9 This is another flow chart for obtaining the second coding feature information provided by an embodiment of the present application;

[0075] Fig.10 It is a comparison diagram of the dimension reduction feature information before and after updating provided by an embodiment of the present application;

[0076] Fig.11 It is a flowchart of decoding the dimension-raising feature information of the n-1th scale and the coded feature information of the n-1th scale provided by an embodiment of the present application;

[0077] Fig.12 This is another flowchart of decoding the dimension-raising feature information of the n-1th scale and the encoded feature information of the n-1th scale provided by an embodiment of the present application;

[0078] Fig.13 is another flowchart for extracting first feature information of multiple scales provided by an embodiment of the present application;

[0079] Fig.14 It is a flow chart of training a video frame processing model provided by an embodiment of the present application;

[0080] Fig.15 It is a flowchart of processing a video frame based on a video frame processing model provided in an embodiment of the present application;

[0081] Fig.16 This is a flow chart for updating feature information provided by an embodiment of the present application;

[0082] Fig.17 It is a schematic diagram of the computational complexity and peak signal-to-noise ratio of a video frame processing method provided in an embodiment of the present application;

[0083] Fig.18 is a schematic diagram of image comparison provided in an embodiment of the present application;

[0084] Fig.19 is a structural schematic diagram of a video frame processing device provided in an embodiment of the present application;

[0085] Fig. 20is a structural schematic diagram of a video frame processing device provided in an embodiment of the present application;

[0086] Fig.21 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0087] Fig. 22 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0088] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0089] The terms "first", "second", "third", "fourth", "fifth", "sixth", etc. used in this application may be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, the first feature information may be referred to as the second feature information, and similarly, the second feature information may be referred to as the first feature information.

[0090] The terms "at least one", "a plurality of", "each", and "any" used in this application include one, two, or more than two, a plurality of includes two or more than two, each refers to each of the corresponding plurality, and any refers to any one of the plurality. For example, a plurality of video frames includes three video frames, and each refers to each of the three video frames, and any refers to any one of the three video frames, which may be the first, the second, or the third.

[0091] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0092] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0093] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D (3-Dimension) technology, virtual reality, augmented reality and map construction.

[0094] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0095] The solution provided in the embodiment of the present application is based on artificial intelligence machine learning technology, which can train a video frame processing model and implement a video frame processing method based on the trained video frame processing model.

[0096] The video frame processing method provided in the embodiment of the present application is executed by a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal and an aircraft, etc., but is not limited to this.

[0097] In one possible implementation, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.

[0098] In one possible implementation, the computer device is provided as a server. Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network.

[0099] The terminal 101 is used to shoot a video, obtain a video frame sequence from the shot video, the video frame sequence includes a plurality of continuous video frames, the plurality of video frames include a blurred video frame, and send the video frame sequence to the server 102 through a network connection with the server 102. The server 102 is used to reconstruct the blurred video frame based on the video frame sequence, return the reconstructed video frame to the terminal 101, and the terminal 101 updates the video based on the reconstructed video frame and plays the updated video.

[0100] In a possible implementation, a target application provided by server 102 is installed on terminal 101, and terminal 101 can implement functions such as video frame processing and data transmission through the target application. Optionally, the target application is a target application in the operating system of terminal 101, or a target application provided by a third party. For example, the target application is a video processing application, which has the function of video frame processing. Of course, the video processing application can also have other functions, such as video playback function, shopping function, navigation function, etc. Optionally, server 102 is a background server of the target application or a cloud server that provides cloud computing and cloud storage services.

[0101] Figure 2 is a flowchart of a video frame processing method provided by an embodiment of the present application, the method is executed by a computer device, such as Figure 2 As shown, the method includes:

[0102] 201. A computer device obtains a video frame sequence, where the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame.

[0103] The video frame sequence is a video frame sequence included in any video, and the multiple continuous video frames included in the video frame sequence are all video frames in the video. In the video frame sequence, the multiple video frames are arranged in chronological order in the video frames. The image included in the blurred video frame is blurred, and the blurred video frame is any video frame in the multiple video frames. For example, the blurred video frame is the first video frame in the multiple continuous video frames, or the last video frame, or other video frames in the multiple video frames, and this application does not limit this.

[0104] 202. The computer device extracts first feature information of multiple scales from each video frame, and fuses multiple first feature information corresponding to the same video frame to obtain second feature information.

[0105] Among them, multiple scales are used to represent the size of the feature information, and the scale is a two-dimensional scale or a three-dimensional scale. The first feature information can be represented in any form, for example, the first feature information is represented in the form of a matrix. For example, the first feature information is a two-dimensional matrix or a three-dimensional matrix. When the multiple scales are two-dimensional scales and the first feature information is a two-dimensional matrix, the two-dimensional scale is the size of the two-dimensional matrix; when the multiple scales are two-dimensional scales and the first feature information is a three-dimensional matrix, the two-dimensional scale is the size of any two dimensions in the three-dimensional matrix, such as the two-dimensional scale is H×W, and the dimension of the three-dimensional matrix is ​​d×H×W; when the multiple scales are three-dimensional scales and the first feature information is a three-dimensional matrix, the three-dimensional scale is the size of the three-dimensional matrix.

[0106] In the embodiment of the present application, each video frame corresponds to first feature information of multiple scales, and the first feature information of each scale is used to characterize the corresponding video frame. The first feature information of different scales contains different features in the video frame.

[0107] For each video frame, multiple first feature information corresponding to the video frame are fused to obtain the second feature information of the video frame. According to the above method, the second feature information of each video frame can be obtained. Since each second feature information is obtained by fusing the first feature information of multiple scales of the corresponding video frame, the second feature information contains the multi-scale feature information of the corresponding video frame, enriching the amount of information in the second feature information.

[0108] 203. The computer device performs weighted fusion on the second feature information of the multiple video frames based on the similarity between the second feature information of the multiple video frames and the second feature information of the blurred video frame to obtain first fused feature information corresponding to the blurred video frame.

[0109] The similarity between the second feature information of any video frame and the second feature information of the blurred video frame indicates the degree of association between the video frame and the blurred video frame.

[0110] In an embodiment of the present application, multiple consecutive video frames in the same video are associated with each other. According to the degree of association between each video frame and the blurred video frame, the second feature information of the multiple video frames is weightedly fused to obtain the first fused feature information corresponding to the blurred video frame, so that the first fused feature information not only includes the features of the blurred video frame but also includes the features of other video frames associated with the blurred video frame, and, according to the degree of association between other video frames and the blurred video frame, the features of other video frames are integrated to enrich the features included in the first fused feature information.

[0111] 204. The computer device reconstructs the blurred video frame based on the first fusion feature information.

[0112] Since the first fused feature information incorporates features contained in multiple video frames, the blurred video frame is reconstructed through the first fused feature information so as to take into account the influence of other video frames associated with the blurred video frame, thereby reconstructing a video frame corresponding to the blurred video frame, and making the clarity of the reconstructed video frame greater than the clarity of the blurred video frame.

[0113] The method provided in the embodiment of the present application not only considers the multi-scale feature information of the blurred video frame, but also considers the influence of the multi-scale feature information of other video frames associated with the blurred video frame when reconstructing the blurred video frame. The feature information obtained by fusing the multi-scale feature information of multiple video frames is fused again according to the degree of association with the blurred video frame, so that the obtained fused feature information contains the multi-scale feature information of multiple video frames to adapt to the different blurriness of the video frame. The blurred video frame is reconstructed based on the fused feature information to weaken the blurriness of the video frame and ensure the clarity and accuracy of the reconstructed video frame.

[0114] exist Figure 2 On the basis of the illustrated embodiment, the second feature information of each video frame is also updated according to the second feature information of the multiple video frames to enhance the temporal connection between the multiple video frames, and then the blurred video frame is reconstructed. This process is detailed in the following embodiment.

[0115] Figure 3 is a flowchart of a video frame processing method provided by an embodiment of the present application, the method is executed by a computer device, such as Figure 3 As shown, the method includes:

[0116] 301. A computer device obtains a video frame sequence, where the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame.

[0117] In a possible implementation, the video frame sequence includes 2k+1 consecutive video frames, k is a positive integer, and the blurred video frame is the k+1th video frame among the 2k+1 video frames.

[0118] In the embodiment of the present application, the video frames included in the video frame sequence are arranged in the time order of the video frames in the video frame. For any video frame in the video, the multiple video frames before the video frame and the multiple video frames after the video frame are associated with the video frame. In order to ensure the accuracy of the subsequent reconstruction of the video frame, the acquired video frame sequence includes the video frames before the blurred video frame and the video frames after the blurred video frame.

[0119] For example, the video frame sequence includes 5 video frames, the blurred video frame is the third video frame among the 5 video frames, and the video frame sequence includes 2 video frames before the blurred video frame and 2 video frames after the blurred video frame.

[0120] In some embodiments, the method of obtaining the video frame sequence includes: based on a blurred video frame in a target video, obtaining at least one video frame adjacent to the blurred video frame from the target video, and generating the video frame sequence based on the obtained video frame.

[0121] After determining the blurred video frame in the target video, a plurality of video frames continuous with the blurred video frame are determined based on the blurred video frame, thereby obtaining a video frame sequence.

[0122] Optionally, the method of obtaining blurred video frames from the target video includes: performing image quality detection on the video frames in the target video, and determining the video frames in the target video that do not meet the clarity conditions as blurred video frames; or, manually specifying blurred video frames from the target video, which is not limited in this application.

[0123] 302. The computer device extracts first feature information of multiple scales from each video frame.

[0124] In a possible implementation, multiple scales are arranged in order from large to small or from small to large, and the larger scale of two adjacent scales is twice the smaller scale.

[0125] In a possible implementation, for each video frame, first feature information of multiple scales corresponding to the video frame is obtained in an order of multiple scales from small to large or from large to small.

[0126] 303. The computer device transforms the other first feature information except the first feature information of the target scale to the target scale for the multiple first feature information corresponding to any video frame.

[0127] The target scale is the maximum scale among the multiple scales. For any video frame, the multiple first feature information corresponding to the video frame belongs to multiple different scales, and the other first feature information except the first feature information of the target scale among the multiple first feature information is transformed into the target scale, that is, the multiple first feature information after transformation all belong to the target scale, and the multiple first feature information after transformation are of the same scale, so that the multiple first feature information after transformation can be subsequently fused.

[0128] In a possible implementation, when transforming other first feature information to the target scale, upsampling is used for transformation, or other methods are used for transformation, which is not limited in the present application.

[0129] 304. The computer device fuses the multiple first feature information after the transformation of the video frame to obtain second feature information of the video frame.

[0130] Since the transformed multiple first feature information belong to the same scale, that is, they all belong to the target scale, the transformed multiple first feature information can be directly fused to obtain the second feature information of the video frame. According to the above steps 303-304, the multiple first feature information of each video frame is processed to obtain the second feature information of each video frame.

[0131] In some embodiments, step 304 includes: splicing the transformed multiple first feature information to obtain spliced ​​feature information, and performing convolution processing on the spliced ​​feature information to obtain second feature information of the video frame.

[0132] The multiple first feature information after the video frame transformation is processed by adopting the method of splicing first and then convolution, so as to fully integrate the feature information of multiple scales of the video frame and improve the accuracy of the second feature information.

[0133] Optionally, the scale of the second feature information is the target scale. For example, the transformed multiple first feature information are all matrices of d×H×W, the concatenated feature information obtained by concatenating the transformed multiple first feature information is a matrix of 3d×H×W, and the concatenated feature information is convoluted to obtain the second feature information of d×H×W.

[0134] It should be noted that the embodiment of the present application adopts the method of first scaling and then fusion to obtain the second feature information of the video frame, while in another embodiment, there is no need to execute steps 303-304, but other methods are adopted to fuse multiple first feature information corresponding to the same video frame to obtain the second feature information.

[0135] 305. The computer device performs weighted fusion on the target feature information in the multiple second feature information based on the similarity between the multiple second feature information and the target feature information to obtain second fused feature information.

[0136] The target feature information is any first feature information among multiple first feature information. The similarity between any second feature information and the target feature information indicates the degree of association between the second feature information and the target feature information, and can also indicate the degree of association between the video frame corresponding to the second feature information and the video frame corresponding to the target feature information. According to the similarity between the multiple second feature information and the target feature information, the multiple second feature information are weightedly fused, so that the fused second fused feature information not only contains the second feature information of the corresponding video frame, but also incorporates the feature information of other video frames associated with the video frame.

[0137] 306. The computer device fuses the second fused feature information with the target feature information, and determines the fused feature information as the updated feature information of the target feature information.

[0138] Among them, the updated feature information of the target feature information is the updated feature information of the video frame corresponding to the target feature information. According to the above steps 305-306, each second feature information is updated to obtain the updated feature information of each second feature information, that is, the updated feature information of multiple video frames is obtained. Through the second feature information of multiple video frames, the second feature information of each video frame is updated respectively to enhance the temporal connection between the feature information of multiple video frames and enhance the correlation between the updated feature information of multiple video frames. In addition, after weighted fusion of multiple second feature information is performed to obtain the second fused feature information corresponding to the target feature information, the fused feature information is fused with the target feature information to ensure that the updated feature information obtained matches the video frame corresponding to the target feature information, that is, to ensure the accuracy of the updated feature information.

[0139] like Figure 4 As shown, after obtaining the second feature information of multiple video frames, an attention mechanism is used, such as an attention model, which is an MSA (Multi-Scale Attention Network), and each second feature information is updated according to the above steps 305-306 to obtain the updated feature information of each second feature information. When updating each second feature information, the temporal relationship between the features at the same position in different second feature information is taken into account, such as Figure 5 As shown, when the second feature information of the second video frame is updated, the second feature information of the first video frame and the third video frame is taken into consideration to enhance the temporal connection between the updated feature information of multiple video frames.

[0140] 307. The computer device performs weighted fusion on the updated feature information of the multiple video frames based on the similarity between the updated feature information of the multiple video frames and the updated feature information of the blurred video frame to obtain first fused feature information corresponding to the blurred video frame.

[0141] The similarity between the updated feature information of any video frame and the updated feature information of the blurred video frame indicates the degree of association between the video frame and the blurred video frame.

[0142] 308. The computer device reconstructs the blurred video frame based on the first fusion feature information.

[0143] Since the first fused feature information incorporates feature information of multiple scales of multiple video frames, the amount of information contained in the first fused feature information is enriched. When reconstructing blurred video frames based on the first fused feature information, the influence of other video frames can be taken into account, thereby improving the clarity of the reconstructed video frames and ensuring the accuracy of the reconstructed video frames.

[0144] In a possible implementation, convolution processing is performed on the first fused feature information to obtain a reconstructed video frame.

[0145] Among them, a Pixel Shuffle (pixel reorganization) method can be adopted to perform convolution processing on the first fused feature information to reconstruct a new video frame corresponding to the blurred video frame.

[0146] In a possible implementation, step 308 includes: fusing the first fused feature information with the updated feature information of the blurred video frame to obtain third fused feature information, and reconstructing the blurred video frame based on the third fused feature information.

[0147] After obtaining the first fused feature information corresponding to the blurred video frame, the first fused feature information is fused again with the updated feature information of the blurred video frame, so that the obtained third fused feature information matches the blurred video frame, and the accuracy of the obtained third fused feature information is ensured, so as to ensure the clarity and accuracy of the subsequently reconstructed video frame. Figure 6 As shown, after obtaining the updated feature information of multiple second feature information, the attention mechanism is used to obtain the first fused feature information according to the above step 307, and the first fused feature information is fused with the updated feature information of the blurred video frame to obtain more accurate third fused feature information.

[0148] It should be noted that, after obtaining the second feature information of each video frame, the embodiment of the present application first updates the second feature information of each video frame based on the second feature information of multiple video frames, and then obtains the first fused feature information with the updated second feature information of multiple video frames. In another embodiment, there is no need to perform the above steps 305-306, but the second feature information of multiple video frames is directly weightedly fused based on the similarity between the second feature information of multiple video frames and the second feature information of the blurred video frame to obtain the first fused feature information.

[0149] In one possible implementation, the process of reconstructing a blurred video frame by directly obtaining the first fused feature information using the second feature information of multiple video frames includes: fusing the first fused feature information with the second feature information of the blurred video frame to obtain fourth fused feature information, and reconstructing the blurred video frame based on the fourth fused feature information.

[0150] The method provided in the embodiment of the present application not only considers the multi-scale feature information of the blurred video frame, but also considers the influence of the multi-scale feature information of other video frames associated with the blurred video frame when reconstructing the blurred video frame. The feature information obtained by fusing the multi-scale feature information of multiple video frames is fused again according to the degree of association with the blurred video frame, so that the obtained fused feature information contains the multi-scale feature information of multiple video frames to adapt to the different blurriness of the video frame. The blurred video frame is reconstructed based on the fused feature information to weaken the blurriness of the video frame and ensure the clarity and accuracy of the reconstructed video frame.

[0151] Moreover, after obtaining the second feature information of each video frame, the second feature information of each video frame is updated respectively based on the second feature information of multiple video frames to improve the temporal continuity between the feature information of multiple video frames, so as to improve the accuracy of the updated feature information of each video frame, so as to ensure the clarity and accuracy of the subsequently reconstructed video frames.

[0152] Moreover, after obtaining the first fused feature information corresponding to the blurred video frame, the first fused feature information is fused again with the updated feature information of the blurred video frame so that the obtained third fused feature information matches the blurred video frame, thereby ensuring the accuracy of the obtained third fused feature information and ensuring the clarity and accuracy of the subsequently reconstructed video frame.

[0153] In the above Figure 2 or Figure 3 On the basis of the embodiment shown in FIG. 1 , when the number of the multiple scales is n, where n is an integer greater than 2, first feature information of the multiple scales is extracted from the video frame in an ascending order of the multiple scales, such as Figure 7 As shown, the process of extracting first feature information of multiple scales from each video frame includes:

[0154] 701. The computer device performs feature extraction on each video frame among the multiple video frames to obtain fourth feature information of the video frame.

[0155] The fourth feature information is used to characterize the video frame, and the fourth feature information can be represented in any form, for example, the fourth feature information is represented in the form of a matrix.

[0156] In one possible implementation, step 701 includes: segmenting the video frame to obtain multiple image blocks, performing feature extraction on each image block to obtain feature information of each image block; and splicing the feature information of the multiple image blocks based on the positions of the multiple image blocks in the video frame to obtain fourth feature information of the video frame.

[0157] By adopting the method of first segmentation and then fusion to obtain the fourth feature information of the video frame, there is no need to directly extract features from large-size video frames, thereby reducing the computational complexity.

[0158] Optionally, if the feature information of each image block is a matrix, the feature information of the multiple image blocks is spliced ​​into a matrix according to the positions of the multiple image blocks in the video frame, and the spliced ​​matrix is ​​determined as the fourth feature information of the video frame.

[0159] 702. The computer device encodes the fourth feature information to obtain encoded feature information of a first scale.

[0160] The encoding feature information of the first scale may be represented in any form. For example, the feature information of the first scale is represented in the form of a matrix, and the matrix is ​​a two-dimensional matrix or a three-dimensional matrix.

[0161] Since the fourth feature information is used to characterize the video frame, the fourth feature information is encoded to enhance the connection between the features in the fourth feature information and enhance the characterization capability of the encoded feature information for the video frame.

[0162] In a possible implementation, the fourth feature information belongs to the first scale, and encoding the fourth feature information only improves the representation capability of the feature information for the video frame without transforming the scale of the feature information.

[0163] 703. The computer device performs dimension reduction and encoding on the coded feature information of the first scale to obtain coded feature information of the second scale, until obtaining coded feature information of the n-1th scale.

[0164] In the embodiment of the present application, the coding feature information of multiple scales is obtained in sequence according to the order of multiple scales from large to small, the first scale is the largest scale among the multiple scales, and the scales gradually decrease from the first scale to the n-1th scale. The coding feature information of the first scale is reduced in dimension to obtain the feature information of the second scale, and is encoded again to further enhance the characterization capability of the feature information of the second scale for the video frame. According to the above method of obtaining the coding feature information of the second scale, the coding feature information of the next scale is continued to be obtained until the coding feature information of the n-1th scale is obtained.

[0165] For example, the coded feature information of the second scale is reduced in dimension and encoded to obtain the coded feature information of the third scale; the coded feature information of the third scale is reduced in dimension and encoded to obtain the coded feature information of the fourth scale.

[0166] 704. The computer device performs dimension reduction on the coding feature information of the n-1th scale to obtain coding feature information of the nth scale.

[0167] The coded feature information of the n-1th scale is reduced in dimension to obtain feature information of the nth scale, and the obtained feature information of the nth scale is used as the coded feature information of the nth scale.

[0168] 705. The computer device decodes the encoded feature information of the nth scale to obtain first feature information of the nth scale.

[0169] The nth encoded feature information is decoded to enhance the connection between features in the feature information, thereby enhancing the representation capability of the encoded feature information for the video frame.

[0170] In the embodiment of the present application, when the feature information is decoded, only the connection between the features in the feature information is enhanced, and the scale of the feature information is not transformed.

[0171] 706. The computer device performs dimension upscaling on the first feature information of the nth scale to obtain dimension upscaling feature information of the n-1th scale; decodes the dimension upscaling feature information of the n-1th scale and the encoded feature information of the n-1th scale to obtain the first feature information of the n-1th scale, until the first feature information of the first scale is obtained.

[0172] Among the n scales, the nth scale is the smallest scale among the n scales, the first scale is the largest scale among the multiple scales, and the scales gradually decrease from the first scale to the n-1th scale.

[0173] In the embodiment of the present application, the first feature information of multiple scales is obtained in order from small to large. In addition, the first feature information of other scales except the first feature information of the nth scale is obtained based on the first feature information of the adjacent small scale and the encoding feature information of the current scale, so as to enhance the representation capability of the first feature information of multiple scales to the video frame.

[0174] By upgrading the first feature information of the nth scale, and based on the upgraded feature information of the n-1th scale and the coded feature information of the n-1th scale, the first feature information of the n-1th scale is obtained. Based on this, based on the first feature information of the n-1th scale and the coded feature information of the n-2th scale, the coded feature information of the n-3th scale is obtained, until the first feature information of the 1st scale is obtained.

[0175] For example, when n is 3, the encoded feature information of the third scale is decoded to obtain the first feature information of the third scale; the first feature information of the third scale is dimensionally upgraded to obtain the dimensionally upgraded feature information of the second scale, the dimensionally upgraded feature information of the second scale and the encoded feature information of the second scale are decoded to obtain the first feature information of the second scale; the first feature information of the second scale is dimensionally upgraded to obtain the dimensionally upgraded feature information of the first scale, the dimensionally upgraded feature information of the first scale and the encoded feature information of the first scale are decoded to obtain the first feature information of the first scale.

[0176] It should be noted that the above Figure 7 The illustrated embodiment is described by taking any video frame as an example. For multiple video frames, the first feature information of n scales of each video frame can be obtained according to the above steps 701 to 706.

[0177] The method provided in the embodiment of the present application, for each video frame in multiple video frames, starts from the fourth feature information of the video frame, and adopts multiple encoding and multiple decoding methods to obtain the first feature information of multiple scales of each video frame, so as to enhance the characterization ability of each first feature information for the video frame, thereby improving the accuracy of the first feature information of multiple scales of each video frame.

[0178] Moreover, when obtaining the first feature information of other scales except the first feature information of the nth scale, it is obtained based on the first feature information of adjacent small scales and the encoded feature information of the current scale, so as to enhance the representation capability of the first feature information of multiple scales for the video frame.

[0179] Above Figure 7 On the basis of the embodiment shown, after reducing the dimension of the first scale coding feature information, the reduced dimension feature information is first divided into multiple local matrices for updating, and then fused to obtain the second coding feature information. Figure 8 As shown, the process of obtaining the second encoding feature information includes:

[0180] 801. The computer device performs dimension reduction on the encoded feature information of the first scale to obtain the dimension reduction feature information of the second scale.

[0181] The two scales are smaller than the first scale. When reducing the dimension of the coding feature information, a variety of dimensionality reduction methods can be adopted, for example, Embedding-Reduction (a dimensionality reduction process) is adopted to reduce the dimension of the coding feature information.

[0182] In a possible implementation, the first scale is twice the second scale.

[0183] For example, the encoded feature information of the first scale is a three-dimensional matrix with a dimension of d×H×W, and the reduced-dimensional feature information of the second scale obtained by dimensionality reduction is also a three-dimensional matrix with a dimension of

[0184] 802. The computer device segments the dimension reduction feature information of the second scale to obtain a plurality of first local matrices.

[0185] In the embodiment of the present application, the dimension reduction feature information of the second scale is a matrix, and the dimension reduction feature information is segmented to obtain multiple first local matrices. Each first local matrix includes features at multiple positions, for example, the first local matrix is ​​a two-dimensional matrix or a three-dimensional matrix, and the multiple features included in the first local matrix are all one-dimensional eigenvalues, then the first local matrix is ​​a two-dimensional matrix; the multiple features included in the first local matrix are all vectors, then the first local matrix is ​​a three-dimensional matrix.

[0186] In a possible implementation, the sizes of the multiple first local matrices are the same, that is, the number of features at multiple positions included in each first local matrix is ​​the same.

[0187] In one possible implementation, when the reduced-dimensionality feature information is a three-dimensional feature matrix, the multiple first local matrices obtained by segmenting the reduced-dimensionality feature information are also three-dimensional feature matrices; or, when the reduced-dimensionality feature information is a two-dimensional feature matrix, the multiple first local matrices obtained by segmenting the reduced-dimensionality feature information are also two-dimensional feature matrices.

[0188] For example, the reduced-dimensional feature information is a three-dimensional feature matrix, the dimension of the three-dimensional feature matrix is ​​d×H×W, and each first local matrix obtained by segmentation is also a three-dimensional feature matrix, the dimension of each first local matrix is ​​d×p×p, that is, the H×W dimension in the reduced-dimensional feature information is only divided into multiple p×p dimensions, and the d dimension remains unchanged. For another example, the reduced-dimensional feature information is a three-dimensional feature matrix, the dimension of the three-dimensional feature matrix is ​​H×W, and the dimension of each first local matrix is ​​p×p.

[0189] 803. The computer device updates each feature based on a plurality of features in the first local matrix where the feature is located and position features of the plurality of features.

[0190] The position feature indicates the position of the corresponding feature in the first local matrix, and the position feature can be represented in any form, for example, the position feature is represented in the form of a vector or a matrix. For each first local matrix, the first local matrix includes multiple features, and each feature is updated based on the multiple features and the position features of the multiple features, so that each feature not only incorporates its own position feature, but also incorporates other features located in the same first local matrix and the position features of other features, thereby enhancing the association between features at different positions in the same first local matrix.

[0191] In one possible implementation, step 803 includes: for each first local matrix, fusing multiple features in the first local matrix with corresponding position features respectively to obtain multiple first fused features; for each feature in the first local matrix, based on the similarity between the first fused feature corresponding to the feature and the multiple first fused features, performing weighted fusion on the multiple first fused features, and determining the feature obtained by the weighted fusion as the updated feature of the feature.

[0192] Among them, for any feature in the first local matrix, the similarity between the first fused feature corresponding to the feature and multiple first fused features represents the degree of association between the first fused features corresponding to multiple features in the first local feature and the first fused feature corresponding to the feature.

[0193] According to the similarity between the multiple first fused features and the first fused feature corresponding to the feature, the multiple first fused features are weightedly fused, and the feature obtained by the weighted fusion is determined as the updated feature of the feature, so that the features at other positions integrated into the updated feature are fused according to the degree of correlation with other features, thereby improving the accuracy of the updated feature.

[0194] 804. The computer device constructs a second local matrix from the multiple features after updating the same first local matrix.

[0195] For the same first local matrix, the updated features of the multiple features in the first local matrix are obtained, that is, the updated multiple features of the first local matrix are obtained, and the updated multiple features are used to form the second local matrix according to the positions of the multiple features in the first local matrix.

[0196] In a possible implementation, the position features corresponding to the multiple features in each first local feature constitute a position matrix, and the process of updating each feature in the first local feature satisfies the following relationship:

[0197] Z=Flatten(X+LPE)

[0198] Q=ZW q , K=ZW k , V=ZW v

[0199]

[0200] Wherein, X is used to represent any first local matrix, LPE is used to represent the position matrix corresponding to the first local feature, Flatten(·) is used to represent the mapping matrix, which is used to transform the dimension of the feature matrix; Z is used to represent the fusion matrix composed of multiple first fusion features; W q , W k , W v It is used to represent the mapping matrix, which is a constant matrix. Q, K, and V respectively represent the matrices after the fusion matrix Z is mapped and transformed. Attention (Q, K, V) is used to represent the second local matrix composed of multiple updated features. SoftMax (·) is used to represent the logistic regression function, d is used to represent the dimension of each feature in the first local matrix, and T is used to represent the transpose of the matrix.

[0201] 805. The computer device splices the multiple second local matrices based on the positions of the multiple first local matrices in the dimension reduction feature information of the second scale to obtain a first spliced ​​matrix.

[0202] Wherein, a plurality of first local matrices are segmented from the dimension reduction feature information, and different first local matrices have different positions in the dimension reduction feature information. After obtaining the second local matrix corresponding to each first local matrix, the plurality of second local matrices are spliced ​​according to the positions of the plurality of first local matrices in the dimension reduction feature information, ensuring that the positions of the plurality of second local matrices in the first spliced ​​matrix are the same as the positions of the corresponding first local matrices in the dimension reduction feature information, so as to ensure the accuracy of the obtained first spliced ​​matrix.

[0203] In one possible implementation, step 805 includes: performing feature transformation on each second local matrix to obtain updated second local features, and based on the positions of the multiple first local matrices in the dimensionality reduction feature information of the second scale, splicing the updated multiple second local matrices to obtain the first spliced ​​matrix information.

[0204] After obtaining each second local matrix, feature conversion is performed on each second local matrix to map each second local matrix into the target feature space, thereby obtaining multiple updated second local matrices, that is, the multiple updated second local matrices belong to the target feature space. Feature conversion of each second local matrix can be performed in a variety of ways, for example, using Linear Projection (a linear mapping method) or Feed-forward Network (feedforward network) to map each second local matrix into the target feature space to obtain multiple updated second local matrices belonging to the target feature space.

[0205] The embodiment of the present application is to first divide the dimension reduction feature information into multiple local matrices, update the multiple local matrices respectively, and then splice the updated local matrices again to obtain the feature information after the dimension reduction feature information is updated, that is, the first spliced ​​matrix. Since the number of features contained in each local matrix is ​​less than the number of features contained in the dimension reduction feature information, the method of dividing into multiple local matrices and then updating the features in the local matrices respectively makes the number of features involved in updating each local matrix small and the computational complexity low, thereby reducing the computational complexity of updating the dimension reduction feature information.

[0206] In one possible implementation, the computational complexity is positively correlated with the size of the local matrix, that is, the computational complexity satisfies the following relationship:

[0207] o(LTB)=2p 2 HkDJ

[0208] Among them, o(LTB) is used to represent the computational complexity, p represents the size of the local matrix. In the embodiment of the present application, the size of the local matrix is ​​p×p; H and W are the sizes of the reduced-dimensional feature information of the second scale, and d is the feature dimension of each feature in the local matrix.

[0209] 806. The computer device determines the first splicing matrix as the encoding feature information of the second scale.

[0210] Since the dimension reduction feature information belongs to the second scale, that is, the updated first splicing feature also belongs to the second scale, the first splicing matrix is ​​the encoding feature information of the second scale.

[0211] It should be noted that the embodiment of the present application directly uses the first splicing matrix as the coding feature information of the second scale, while in another embodiment, step 806 does not need to be performed, but other methods are adopted to determine the coding feature information of the second scale based on the first splicing matrix.

[0212] In a possible implementation, after obtaining the first splicing matrix, feature transformation is performed on the first splicing matrix to obtain the encoding feature information of the second scale.

[0213] The first splicing matrix is ​​feature transformed to map the first splicing matrix into the target feature space, thereby obtaining the coded feature information of the second scale. There are many methods for feature transformation of the first splicing matrix, for example, using Linear Projection or Feed-forward Network to map the first splicing matrix into the target feature space to obtain the coded feature information of the second scale belonging to the target feature space.

[0214] The method provided in the embodiment of the present application first divides the dimension reduction feature information into multiple local matrices, updates the multiple local matrices respectively, and then splices the updated local matrices again to obtain the updated feature information of the dimension reduction feature information, that is, the first spliced ​​matrix, and uses the first spliced ​​matrix as the coded feature information of the second scale. Since the number of features contained in each local matrix is ​​less than the number of features contained in the dimension reduction feature information, the number of features involved in updating each local matrix is ​​small, and the computational complexity is low, which reduces the computational complexity of updating the dimension reduction feature information, thereby reducing the computational complexity of obtaining multi-scale coded feature information.

[0215] It should be noted that in the above Figure 3 Based on the embodiment shown in the figure, after obtaining the first fusion feature information, it is also possible to Figure 8 In the illustrated embodiment, steps 802-805 update the dimension reduction feature information of the second scale, update the first fused feature information multiple times, and reconstruct the blurred video frame based on the updated first fused feature information. After obtaining the first fused feature information, the first fused feature information is updated multiple times to improve the representation capability of the first fused feature information for the video frame, and further improve the accuracy of the feature information.

[0216] In the above Figure 8 On the basis of the embodiment shown, when encoding the obtained dimensionality reduction information of the second scale, the position of the features in the dimensionality reduction feature information is first transformed, and then the transformed dimensionality reduction feature information is updated by segmentation, and then the position of the features in the updated dimensionality reduction feature information is reversely transformed to improve the correlation between the features in the finally obtained feature information. Fig. 9 As shown, the process of obtaining the second encoding feature information includes:

[0217] 901. The computer device performs dimension reduction on the encoded feature information of the first scale to obtain the dimension reduction feature information of the second scale.

[0218] This step is the same as the above step 801 and will not be repeated here.

[0219] 902. The computer device transforms the positions of the features in the dimensionality reduction feature information based on the first position transformation matrix to obtain updated dimensionality reduction feature information.

[0220] The first position transformation matrix is ​​used to transform the positions of the features contained in the matrix.

[0221] In a possible implementation, the dimension reduction feature information of the second scale is a matrix, and the matrix obtained by multiplying the first position transformation matrix and the dimension reduction feature information is the updated dimension reduction feature information.

[0222] For example, the reduced dimension feature information is a 3×3 matrix, and the reduced dimension feature information is transformed by the first position transformation matrix. The transformed reduced dimension feature information is different from the original reduced dimension feature information. Fig.10 shown.

[0223] 903. The computer device segments the updated reduced-dimensionality feature information to obtain a plurality of first local matrices.

[0224] 904. The computer device updates each feature based on a plurality of features in the first local matrix where the feature is located and position features of the plurality of features.

[0225] 905. The computer device constructs a second local matrix from the multiple features after the same first local matrix is ​​updated.

[0226] 906. The computer device splices the multiple second local matrices based on the positions of the multiple first local matrices in the updated dimensionality reduction feature information to obtain a first spliced ​​matrix.

[0227] Steps 903-906 are similar to the above steps 802-805 and will not be repeated here.

[0228] 907. The computer device performs position transformation on the features in the first splicing matrix based on the second position transformation matrix, and determines the transformed feature matrix as the coded feature information of the second scale.

[0229] The second position transformation matrix is ​​the inverse transformation matrix of the first position transformation matrix. After obtaining the first splicing matrix, based on the second position transformation matrix, the features in the first splicing matrix are transformed so that the position of each feature in the transformed feature matrix is ​​the same as the position of each feature in the dimension reduction feature information before it is updated, thereby restoring the position of the feature to ensure the accuracy of the obtained coded feature information.

[0230] In a possible implementation, step 907 includes: performing position transformation on the features in the first concatenated matrix, and then performing feature conversion on the transformed feature matrix to obtain the encoded feature information of the second scale.

[0231] There are many methods for performing feature conversion on the feature matrix obtained by the transformation. For example, LinearProjection or Feed-forward Network is used to map the first concatenated matrix into the target feature space to obtain the encoded feature information of the second scale belonging to the target feature space.

[0232] The method provided in the embodiment of the present application, when encoding the dimensionality reduction feature information, first transforms the position of the features in the dimensionality reduction feature information to obtain updated dimensionality reduction feature information, and then divides the updated dimensionality reduction feature information into multiple first local matrices for updating, so that each updated feature incorporates features at other positions that may not belong to the same local area, thereby improving the long-distance modeling capability and enhancing the correlation between features at different positions in the dimensionality reduction feature information to ensure the accuracy of the obtained encoded feature information.

[0233] It should be noted that the above Figure 8 and Fig. 9 The two methods shown can be combined arbitrarily. For example, after first obtaining the first splicing matrix according to the above steps 801-805, the first splicing matrix is ​​processed according to the above steps 902-907 to obtain the coding feature information of the second scale; or, after first obtaining the first splicing matrix according to the above steps 901-906, the first splicing feature is processed according to the above steps 802-805 to obtain the coding feature information of the second scale.

[0234] It should be noted that the above Figure 8 or Fig. 9 The embodiments shown are all described by taking the encoding feature information of the first scale to obtain the encoding feature information of the second scale as an example. After obtaining the encoding feature information of the second scale, based on the encoding feature information of the second scale, according to the above Figure 8 or Fig. 9In the illustrated embodiment, the coding feature information of the next scale is obtained, until the coding feature information of the n-1th scale is obtained.

[0235] In the above Figure 7 On the basis of the embodiment shown, the dimension-upgraded feature information of the n-1th scale and the coded feature information of the n-1th scale are first fused, and then the fused feature information is first divided into multiple local matrices for updating and then fused to obtain the first feature information of the n-1th scale. Fig.11 As shown, the process of decoding the dimension-raising feature information of the n-1th scale and the coded feature information of the n-1th scale includes:

[0236] 1101. A computer device fuses the dimension-upgraded feature information of the n-1th scale with the coded feature information of the n-1th scale to obtain fused feature information of the n-1th scale.

[0237] Among them, the dimension-upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale can be expressed in any form. For example, the dimension-upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale are both expressed in the form of a matrix. Then, the matrix obtained by adding the dimension-upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale is the fused feature information of the n-1th scale.

[0238] 1102. The computer device segments the fused feature information of the n-1th scale to obtain a plurality of third local matrices.

[0239] The third local matrix includes features at multiple positions. This step is the same as the above step 802 and will not be described in detail here.

[0240] 1103. The computer device updates each feature based on a plurality of features in a third local matrix where the feature is located and position features of the plurality of features.

[0241] The position feature indicates the position of the corresponding feature in the third local matrix. This step is the same as the above step 803 and will not be described in detail here.

[0242] 1104. The computer device constructs a fourth local matrix from the multiple features after the third local matrix is ​​updated.

[0243] This step is the same as the above step 804 and will not be described again here.

[0244] 1105. The computer device splices the multiple fourth local matrices based on the positions of the multiple third local matrices in the fusion feature information of the (n-1)th scale to obtain a second spliced ​​matrix.

[0245] This step is the same as the above step 805 and will not be described again here.

[0246] 1106. The computer device determines the second splicing matrix as the first feature information of the n-1th scale.

[0247] It should be noted that, in the present application, the first feature information is obtained by first fusing the upgraded feature information with the encoded feature information and then decoding them. In another embodiment, there is no need to execute steps 1101-1106, but other methods are adopted to decode the upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale.

[0248] It should be noted that, in the embodiment of the present application, the second stitching matrix is ​​directly used as the first feature information of the n-1th scale, while in another embodiment, step 1106 does not need to be performed, but other methods are adopted to determine the first feature information of the n-1th scale based on the second stitching matrix.

[0249] In a possible implementation, after the second splicing matrix is ​​obtained, feature transformation is performed on the second splicing matrix to obtain the encoding feature information of the n-1th scale.

[0250] The second splicing matrix is ​​feature transformed to map the second splicing matrix into the target feature space, thereby obtaining the coded feature information of the n-1th scale. The first splicing matrix can be feature transformed by a variety of methods, for example, by using Linear Projection or Feed-forward Network to map the first splicing matrix into the target feature space to obtain the coded feature information of the n-1th scale in the target feature space.

[0251] The method provided in the embodiment of the present application first divides the fused feature information of the n-1th scale into multiple local matrices, updates the multiple local matrices respectively, and then splices the updated local matrices again to obtain the updated feature information of the fused feature information of the n-1th scale, that is, the second spliced ​​matrix, and uses the second spliced ​​matrix as the first feature information of the n-1th scale. Since the number of features contained in each local matrix is ​​less than the number of features contained in the dimensionality reduction feature information, the number of features involved in updating each local matrix is ​​small, and the computational complexity is low, which reduces the computational complexity of updating the dimensionality reduction feature information, thereby reducing the computational complexity of obtaining the multi-scale first feature information.

[0252] In the above Fig.11 On the basis of the embodiment shown, before segmenting the fused feature information of the n-1th scale, the features in the fused feature information are first transformed in position, and then segmented into local matrices for encoding, and then the matrix obtained by splicing multiple local matrices is inversely transformed in position to improve the correlation between the features in the feature information finally obtained. Fig.12 As shown, the process of decoding the dimension-raising feature information of the n-1th scale and the coded feature information of the n-1th scale includes:

[0253] 1201. A computer device fuses the dimension-raising feature information of the n-1th scale with the coded feature information of the n-1th scale to obtain fused feature information of the n-1th scale.

[0254] This step is the same as the above step 1101 and will not be repeated here.

[0255] 1202. The computer device transforms the positions of the features in the fused feature information based on the third position transformation matrix to obtain updated fused feature information.

[0256] The third position transformation matrix is ​​used to transform the positions of the features included in the matrix. This step is the same as the above step 902 and will not be described in detail here.

[0257] 1203. The computer device segments the updated fused feature information to obtain a plurality of third local matrices.

[0258] 1204. The computer device updates each feature based on a plurality of features in a third local matrix where the feature is located and position features of the plurality of features.

[0259] 1205. The computer device constructs a fourth local matrix using the multiple features after updating the same third local matrix.

[0260] 1206. The computer device splices the multiple fourth local matrices based on the positions of the multiple third local matrices in the updated fusion feature information to obtain a second spliced ​​matrix.

[0261] The steps 1203-1206 are the same as the above steps 1102-1105 and will not be repeated here.

[0262] 1207. The computer device performs position transformation on the features in the second splicing matrix based on the fourth position transformation matrix, and determines the transformed feature matrix as the first feature information of the n-1th scale.

[0263] Among them, the fourth position transformation matrix is ​​the inverse transformation matrix of the third position transformation matrix. After obtaining the second splicing matrix, based on the fourth position transformation matrix, the features in the second splicing matrix are transformed so that the position of each feature in the transformed feature matrix is ​​the same as the position of each feature in the dimension-raising feature information at the n-1th scale before it is updated, thereby restoring the position of the feature to ensure the accuracy of the obtained first feature information.

[0264] In a possible implementation, step 1207 includes: after performing position transformation on the features in the second concatenated matrix, performing feature conversion on the transformed feature matrix to obtain the encoded feature information of the n-1th scale.

[0265] There are many methods for performing feature conversion on the feature matrix obtained by the transformation. For example, LinearProjection or Feed-forward Network is used to map the second concatenated matrix into the target feature space to obtain the encoded feature information of the n-1th scale in the target feature space.

[0266] The method provided in the embodiment of the present application, after fusing the up-dimensional feature information of the n-1th scale with the coded feature information of the n-1th scale, first transforms the position of the features in the fused feature information of the n-1th scale to obtain updated fused feature information, and then divides the updated fused feature information into multiple third local matrices for updating, so that each updated feature incorporates features at other positions that may not belong to the same local area, thereby improving the long-distance modeling capability and enhancing the correlation between features at different positions in the reduced-dimensional feature information to ensure the accuracy of the obtained first feature information.

[0267] It should be noted that the above Fig.11 and Fig.12 The two decoding processes shown can be combined arbitrarily. For example, after first obtaining the second splicing matrix according to the above steps 1101-1105, the second splicing matrix is ​​processed according to the above steps 1202-1207 to obtain the first feature information of the n-1th scale; or, after first obtaining the second splicing matrix according to the above steps 1201-1206, the second splicing feature is processed according to the above steps 1102-1105 to obtain the first feature information of the n-1th scale.

[0268] It should be noted that the above Fig.11 or Fig.12The embodiments shown in the figure are all described by taking the first feature information of the nth scale to obtain the first feature information of the n-1th scale as an example. After obtaining the first feature information of the n-1th scale, based on the first feature information of the n-1th scale, according to the above Fig.11 or Fig.12 In the illustrated embodiment, the first feature information of the next scale is obtained until the first feature information of the first scale is obtained.

[0269] It should be noted that the above Figure 7 The embodiment shown is described by taking n as an integer greater than 2 as an example, while in another embodiment, the number of the multiple scales is 2. Fig.13 As shown, the process of extracting first feature information of multiple scales from each video frame includes:

[0270] 1301. The computer device performs feature extraction on each video frame among the multiple video frames to obtain fourth feature information of the video frame.

[0271] 1302. The computer device encodes the fourth feature information to obtain encoded feature information of a first scale.

[0272] 1303. The computer device performs dimension reduction on the coding feature information of the first scale to obtain coding feature information of the second scale.

[0273] 1304. The computer device decodes the encoded feature information of the second scale to obtain first feature information of the second scale.

[0274] 1305. The computer device performs dimension upscaling on the first feature information of the second scale to obtain the dimension upscaling feature information of the first scale, and decodes the dimension upscaling feature information of the first scale and the encoded feature information of the first scale to obtain the first feature information of the first scale.

[0275] The steps 1301-1305 are similar to the above Figure 7 The steps in the illustrated embodiment are similar and will not be described in detail here.

[0276] It should be noted that in the above Figure 3 Based on the embodiment shown, the process of processing the video frame is implemented based on the video frame processing model. Prior to this, the video frame processing model needs to be trained, such as Fig.14 As shown in FIG. 1 , the process of training the video frame processing model includes:

[0277] 1401. A computer device obtains a sample video frame sequence, where the sample video frame sequence includes a plurality of continuous sample video frames, where the plurality of sample video frames include a sample blurred video frame, and obtains a label video frame corresponding to the sample blurred video frame.

[0278] The sample video frame sequence is a video frame sequence included in any video, and the sample video frame sequence includes a sample blurred video frame. The clarity of the label video frame is greater than that of the sample blurred video frame. Optionally, the label video frame is a video frame obtained by deblurring the sample blurred video frame. Optionally, the label video frame is obtained by manually deblurring the sample blurred video frame.

[0279] 1402. The computer device processes the sample video frame in the sample video frame sequence based on the video frame processing model to obtain a predicted video frame corresponding to the sample blurred video frame.

[0280] This step is similar to the above Figure 2 or Figure 3 Similar to the embodiment shown in FIG. 1 , based on the video frame processing model, according to the above Figure 2 or Figure 3 In the step of processing multiple sample video frames in the sample video frame sequence, a predicted video frame corresponding to the sample blurred video frame is reconstructed.

[0281] 1403. The computer device performs feature extraction on the labeled video frame and the predicted video frame based on the image contrast model to obtain fifth feature information of the labeled video frame and sixth feature information of the predicted video frame.

[0282] The image comparison model is used to compare the feature information of the image. The fifth feature information is used to characterize the label video frame, and the sixth feature information is used to characterize the predicted video frame.

[0283] 1404. The computer device obtains a feature difference between the fifth feature information and the sixth feature information based on an image contrast model, and determines the feature difference as a first loss value.

[0284] The feature difference represents the difference between the fifth feature information and the sixth feature information. Based on the feature difference, the accuracy of the video frame processing model can be reflected. Therefore, the feature difference is used as the loss value of the training video frame processing model.

[0285] 1405. The computer device trains the video frame processing model based on the first loss value.

[0286] The video frame processing model is trained using the first loss value to improve the accuracy of the video frame processing model.

[0287] In one possible implementation, the process of training the video frame processing model includes: obtaining a second loss value based on the image difference between the labeled video frame and the predicted video frame; and training the video frame processing model based on the first loss value and the second loss value.

[0288] The image difference is used to indicate the degree of image difference between the labeled video frame and the predicted video frame. For example, the image difference is obtained based on the pixel difference between the labeled video frame and the predicted video frame.

[0289] Since both the first loss value and the second loss value can reflect the accuracy of the video frame processing model, the video frame processing model is trained based on the first loss value and the second loss value to improve the accuracy of the video frame processing model.

[0290] The method provided in the embodiment of the present application combines the image contrast model to train the video frame processing model based on the feature difference between the feature information of the predicted video frame output by the video frame processing model and the label video frame, so as to improve the accuracy of the video frame processing model.

[0291] In addition, the image difference between the predicted video frame and the labeled video frame is also taken into consideration. The video frame processing model is trained by combining the image difference and feature difference. The influence of various factors is taken into consideration to further improve the accuracy of the video frame processing model.

[0292] Based on the above Fig.14 The embodiment shown provides a flowchart for processing a video frame based on a video frame processing model, wherein the video frame processing model includes a feature extraction sub-model, a feature update sub-model, a temporal association sub-model, a local update sub-model and a pixel reconstruction sub-model, such as Fig.15 As shown, the process includes:

[0293] 1501. Obtain a video frame sequence, where the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame.

[0294] 1502. For each video frame, based on the feature extraction sub-model, the video frame is divided into multiple image blocks, feature information of each image block is extracted, and based on the positions of the multiple image blocks in the video frame, the feature information of the multiple image blocks is spliced ​​into feature information of the video frame.

[0295] 1503. Update the sub-model based on the feature, according to the above Figure 7 In the illustrated embodiment, first feature information of multiple scales is extracted from each video frame, and second feature information of each video frame is obtained according to the above steps 303 - 304 .

[0296] In one possible implementation, the feature update submodel includes multiple encoding layers, multiple dimensionality reduction layers, multiple dimensionality increase layers, and multiple decoding layers.

[0297] The encoding layer is used to encode the feature information, such as the encoding layer is used to encode the feature information according to the above step 702. The dimension reduction layer is used to reduce the dimension of the feature information, the dimension increase layer is used to increase the dimension of the feature information, and the decoding layer is used to decode the feature information, such as the decoding layer is used to decode the feature information according to the above step 705.

[0298] The feature update submodel is a Transformer-based encoder-decoder (a codec), the encoding layer is LTB (Local Transformer Block, local update network), the dimension reduction layer is Embedding Reduction (dimensionality reduction processing network), the dimension increase layer is Embedding Expansion (expansion processing network), and the decoding layer is LTB. Based on the encoding layer, dimension reduction layer, dimension increase layer and decoding layer included in the feature update submodel, the feature information is updated, such as Fig.16 shown.

[0299] 1504. Based on the temporal correlation sub-model, according to the above steps 305-307, the second feature information of each video frame is updated, and the first fusion feature information corresponding to the blurred video frame is obtained.

[0300] 1505. Based on the local update sub-model, according to the above Figure 8 In the illustrated embodiment, steps 502-505 update the dimension reduction feature information of the second scale, and update the first fused feature information multiple times.

[0301] 1506. Reconstruct the updated feature information based on the pixel recombination sub-model to obtain a target video frame corresponding to the blurred video frame, wherein the clarity of the target video frame is greater than the clarity of the blurred video frame.

[0302] The video frame processing method provided in the embodiment of the present application can be applied to a variety of scenarios, for example, in a photo shooting scenario. The user shoots an object through a terminal to obtain a video, and the user selects any video frame in the video as a blurred video frame through the terminal, and generates a video frame sequence containing blurred video frames, and then according to the video frame processing method provided in the embodiment of the present application, based on the video frame sequence, the blurred video frame is reconstructed to obtain a target video frame, and the blurred video frame in the video is replaced with the target video frame, thereby obtaining an updated video, and the updated video does not contain a blurred video frame, thereby improving the user's shooting experience.

[0303] Another example is applied to recognition scenarios. In face recognition scenarios, it is necessary to shoot a video of the user's face, perform image quality detection on the video frames in the video, determine the blurred video frames in the video, extract a video frame sequence containing the blurred video frames from the video frames, and reconstruct the blurred video frames based on the video frame sequence according to the video frame processing method provided in the embodiment of the present application to obtain a target video frame, replace the blurred video frames in the video with the target video frames to obtain an updated video, and perform face recognition based on the updated video. When there are blurred video frames in the video, there is no need to prompt the user to reshoot, thereby improving the efficiency and accuracy of face recognition.

[0304] In addition, the video frame processing method provided in the embodiment of the present application can also be used as a way to pre-process the video so that other tasks such as target detection and image segmentation can be subsequently performed based on the updated video.

[0305] As shown in Table 1 and Table 2, based on two data sets, the video frame processing method provided in the embodiment of the present application is compared with the video frame processing method in the related art. Among them, the first data set is a DVD (a video) data set, and the second data set is a GOPRO (a video) data set, peak signal to noise ratio (PSNR, Peak Signal to Noise Ratio), structural similarity (SSIM, Structural Similarity). Through the comparison in Table 2, it can be seen that the method provided in the embodiment of the present application has a better processing effect on blurred video frames. And, through Fig.17 It can be seen that the method provided in the embodiment of the present application can reduce the computational complexity (GFLOPs, Giga Floating-point Operations Per second) and can ensure the accuracy of the deblurred video frame. Based on the method provided in the embodiment of the present application and the method in the related art, the same blurred video frame is processed. In the reconstructed multiple video frames, the local area corresponding to a local area in the blurred video frame is determined, and the multiple local areas in the reconstructed multiple video frames are compared, such as Fig.18 As shown. Fig.18 From the comparison of the local areas in the video, it can be seen that the video frame reconstructed by the method provided in the embodiment of the present application has higher clarity.

[0306] Table 1

[0307] Dataset Training set Test Set First Dataset 61 videos, 5708 frames in total 10 videos, 300 frames in total Second dataset 22 videos, 2103 frames in total 11 videos, 1111 frames in total

[0308] Table 2

[0309]

[0310]

[0311] Fig.19 is a structural diagram of a video frame processing device provided in an embodiment of the present application, such as Fig.19 As shown, the device comprises:

[0312] An acquisition module 1901 is used to acquire a video frame sequence, where the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame;

[0313] A fusion module 1902 is used to extract first feature information of multiple scales from each video frame, and fuse multiple first feature information corresponding to the same video frame to obtain second feature information;

[0314] The fusion module 1902 is further configured to perform weighted fusion on the second feature information of the plurality of video frames based on the similarity between the second feature information of the plurality of video frames and the second feature information of the blurred video frame, so as to obtain first fused feature information corresponding to the blurred video frame;

[0315] The reconstruction module 1903 is used to reconstruct the blurred video frame based on the first fusion feature information.

[0316] In one possible implementation, Fig. 20 As shown, the fusion module 1902 includes:

[0317] A transforming unit 1921 is configured to transform, for each of the plurality of first feature information corresponding to any video frame, other first feature information except the first feature information of a target scale to a target scale, where the target scale is a maximum scale among the plurality of scales;

[0318] The fusion unit 1922 is used to fuse the transformed multiple first feature information to obtain the second feature information of the video frame.

[0319] In another possible implementation, the fusion unit 1922 is used to splice the multiple transformed first feature information to obtain spliced ​​feature information; and perform convolution processing on the spliced ​​feature information to obtain second feature information of the video frame.

[0320] In another possible implementation, the number of multiple scales is 2, such as Fig. 20 As shown, the fusion module 1902 includes:

[0321] The extraction unit 1923 is used to extract features of each video frame in the multiple video frames to obtain fourth feature information of the video frame;

[0322] The encoding unit 1924 is used to encode the fourth feature information to obtain encoded feature information of a first scale;

[0323] A dimension reduction unit 1925 is used to reduce the dimension of the coded feature information of the first scale to obtain the coded feature information of the second scale;

[0324] A decoding unit 1926, configured to decode the encoded feature information at the second scale to obtain first feature information at the second scale;

[0325] The decoding unit 1926 is further configured to perform dimension upscaling on the first feature information at the second scale to obtain dimension upscaling feature information at the first scale, and decode the dimension upscaling feature information at the first scale and the encoded feature information at the first scale to obtain the first feature information at the first scale.

[0326] In another possible implementation, the number of the multiple scales is n, where n is an integer greater than 2, such as Fig. 20 As shown, the fusion module 1902 includes:

[0327] The extraction unit 1923 is used to extract features of each video frame in the multiple video frames to obtain fourth feature information of the video frame;

[0328] The encoding unit 1924 is used to encode the fourth feature information to obtain encoded feature information of a first scale;

[0329] The encoding unit 1924 is further used to reduce the dimension and encode the encoding feature information of the first scale to obtain the encoding feature information of the second scale, until the encoding feature information of the n-1th scale is obtained;

[0330] A dimension reduction unit 1925 is used to reduce the dimension of the coding feature information of the n-1th scale to obtain the coding feature information of the nth scale;

[0331] A decoding unit 1926, configured to decode the encoded feature information at the nth scale to obtain first feature information at the nth scale;

[0332] The decoding unit 1926 is further used to upgrade the first feature information of the n-th scale to obtain the upgraded feature information of the n-1-th scale, decode the upgraded feature information of the n-1-th scale and the encoded feature information of the n-1-th scale to obtain the first feature information of the n-1-th scale, until the first feature information of the 1st scale is obtained.

[0333] In another possible implementation, the coded feature information of the first scale is a matrix; the encoding unit 1924 is used to reduce the dimension of the coded feature information of the first scale to obtain the reduced dimension feature information of the second scale; the reduced dimension feature information is segmented to obtain multiple first local matrices, the first local matrix includes features at multiple positions; for each feature, based on multiple features in the first local matrix where the feature is located and the position features of the multiple features, the feature is updated, and the position feature indicates the position of the corresponding feature in the first local matrix; the multiple features after the same first local matrix is ​​updated constitute a second local matrix; based on the positions of the multiple first local matrices in the reduced dimension feature information, the multiple second local matrices are spliced ​​to obtain a first spliced ​​matrix; based on the first spliced ​​matrix, the coded feature information of the second scale is determined.

[0334] In another possible implementation, the encoding unit 1924 is used to fuse, for each first local matrix, multiple features in the first local matrix with corresponding position features, respectively, to obtain multiple first fused features; for each feature in the first local matrix, based on the similarity between the first fused feature corresponding to the feature and the multiple first fused features, perform weighted fusion on the multiple first fused features, and determine the feature obtained by the weighted fusion as the feature after feature update.

[0335] In another possible implementation, the encoding unit 1924 is configured to determine the first splicing matrix as encoding feature information of a second scale.

[0336] In another possible implementation, Fig. 20 As shown, the device also includes:

[0337] A transformation module 1904 is used to perform position transformation on features in the dimension reduction feature information based on the first position transformation matrix to obtain updated dimension reduction feature information;

[0338] The encoding unit 1924 is used to perform position transformation on the features in the first splicing matrix based on the second position transformation matrix, and determine the transformed feature matrix as the encoding feature information of the second scale, where the second position transformation matrix is ​​an inverse transformation matrix of the first position transformation matrix.

[0339] In another possible implementation, the decoding unit 1926 is used to fuse the up-dimensional feature information of the n-1th scale with the encoded feature information of the n-1th scale to obtain fused feature information of the n-1th scale; and decode the fused feature information of the n-1th scale to obtain first feature information of the n-1th scale.

[0340] In another possible implementation, the fused feature information at the n-1th scale is a matrix; the decoding unit 1926 is used to segment the fused feature information at the n-1th scale to obtain multiple third local matrices, the third local matrix including features at multiple positions; for each feature, based on multiple features in the third local matrix where the feature is located and position features of the multiple features, the feature is updated, and the position feature indicates the position of the corresponding feature in the third local matrix; the multiple features after the same third local matrix is ​​updated constitute a fourth local matrix; based on the positions of the multiple third local matrices in the fused feature information at the n-1th scale, the multiple fourth local matrices are spliced ​​to obtain a second spliced ​​matrix; based on the second spliced ​​matrix, the first feature information at the n-1th scale is determined.

[0341] In another possible implementation, the fusion module 1902 is used to perform weighted fusion on the target feature information in the multiple second feature information based on the similarity between the multiple second feature information and the target feature information to obtain second fused feature information, where the target feature information is any first feature information in the multiple first feature information; fuse the second fused feature information with the target feature information, and determine the fused feature information as the feature information after the target feature information is updated.

[0342] In another possible implementation, the video frame processing device is implemented based on a video frame processing model, such as Fig. 20 As shown, the device also includes:

[0343] The acquisition module 1901 is further used to acquire a sample video frame sequence, the sample video frame sequence includes a plurality of continuous sample video frames, the plurality of sample video frames include a sample blurred video frame, and acquire a label video frame corresponding to the sample blurred video frame;

[0344] A processing module 1905 is used to process the sample video frame in the sample video frame sequence based on the video frame processing model to obtain a predicted video frame corresponding to the sample blurred video frame;

[0345] An extraction module 1906 is used to extract features from the labeled video frame and the predicted video frame based on the image contrast model, respectively, to obtain fifth feature information of the labeled video frame and sixth feature information of the predicted video frame;

[0346] The determination module 1907 is used to obtain the feature difference between the fifth feature information and the sixth feature information based on the image contrast model, and determine the feature difference as the first loss value.

[0347] The training module 1908 is used to train the video frame processing model based on the first loss value.

[0348] In another possible implementation, the acquisition module 1901 is further configured to acquire a second loss value based on an image difference between the label video frame and the predicted video frame;

[0349] The training module 1908 is used to train the video frame processing model based on the first loss value and the second loss value.

[0350] It should be noted that: the video frame processing device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the video frame processing device provided in the above embodiment and the video frame processing method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0351] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the video frame processing method of the above embodiment.

[0352] Optionally, the computer device is provided as a terminal. Fig.21 The structure block diagram of a terminal 2100 provided by an exemplary embodiment of the present application is shown. The terminal 2100 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc. The terminal 2100 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, and other names.

[0353] The terminal 2100 includes: a processor 2101 and a memory 2102 .

[0354] The processor 2101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 2101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0355] The memory 2102 may include one or more computer-readable storage media, which may be non-transitory. The memory 2102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2102 is used to store at least one computer program, which is used to be executed by the processor 2101 to implement the video frame processing method provided in the method embodiment of the present application.

[0356] In some embodiments, the terminal 2100 may further optionally include: a peripheral device interface 2103 and at least one peripheral device. The processor 2101, the memory 2102 and the peripheral device interface 2103 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 2103 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 2104, a display screen 2105, a camera assembly 2106, an audio circuit 2107 and a power supply 2108.

[0357] The peripheral device interface 2103 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 2101 and the memory 2102. In some embodiments, the processor 2101, the memory 2102, and the peripheral device interface 2103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2101, the memory 2102, and the peripheral device interface 2103 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0358] The radio frequency circuit 2104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2104 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 2104 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 2104 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 2104 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0359] The display screen 2105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 2105 is a touch display screen, the display screen 2105 also has the ability to collect touch signals on the surface or above the surface of the display screen 2105. The touch signal can be input to the processor 2101 as a control signal for processing. At this time, the display screen 2105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 2105 can be one, arranged on the front panel of the terminal 2100; in other embodiments, the display screen 2105 can be at least two, respectively arranged on different surfaces of the terminal 2100 or in a folding design; in other embodiments, the display screen 2105 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 2100. Even, the display screen 2105 can also be arranged as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 2105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0360] The camera assembly 2106 is used to capture images or videos. Optionally, the camera assembly 2106 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 2106 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0361] The audio circuit 2107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 2101 for processing, or input them into the radio frequency circuit 2104 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 2100. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 2101 or the radio frequency circuit 2104 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 2107 may also include a headphone jack.

[0362] The power supply 2108 is used to power various components in the terminal 2100. The power supply 2108 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 2108 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0363] Those skilled in the art will understand that Fig.21 The structure shown in the figure does not constitute a limitation on the terminal 2100, and the terminal 2100 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.

[0364] Optionally, the computer device is provided as a server. Fig. 22 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 2200 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 2201 and one or more memories 2202, wherein at least one computer program is stored in the memory 2202, and at least one computer program is loaded and executed by the processor 2201 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.

[0365] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the video frame processing method of the above embodiment.

[0366] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the operations performed by the video frame processing method described in the above aspects.

[0367] A person of ordinary skill in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0368] The above description is only an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.

Claims

1. A video frame processing method, characterized in that: The method comprises: Acquire a video frame sequence, wherein the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame; Extracting first feature information of multiple scales from each video frame; For a plurality of first feature information corresponding to any video frame, transform the other first feature information except the first feature information of the target scale to the target scale, where the target scale is the maximum scale among the plurality of scales; Fusing the transformed multiple first feature information to obtain second feature information of the video frame; Based on the similarity between the second feature information of the multiple video frames and the second feature information of the blurred video frame, the attention mechanism is used to perform weighted fusion on the second feature information of the multiple video frames to obtain the first fused feature information corresponding to the blurred video frame. The similarity between the second feature information of any video frame and the blurred video frame indicates the degree of association between the video frame and the blurred video frame. The blurred video frame is reconstructed based on the first fusion feature information.

2. The method according to claim 1, characterized in that The step of fusing the transformed plurality of first feature information to obtain the second feature information of the video frame includes: Splicing the transformed multiple first feature information to obtain spliced ​​feature information; The convolution process is performed on the splicing feature information to obtain second feature information of the video frame.

3. The method according to claim 1, characterized in that The number of the multiple scales is 2, and the step of extracting the first feature information of the multiple scales from each video frame includes: For each video frame of the multiple video frames, extract features of the video frame to obtain fourth feature information of the video frame; Encoding the fourth feature information to obtain encoded feature information of a first scale; Performing dimensionality reduction on the encoding feature information of the first scale to obtain encoding feature information of the second scale; Decoding the encoded feature information at the second scale to obtain first feature information at the second scale; The first feature information of the second scale is dimensionally upgraded to obtain the dimensionally upgraded feature information of the first scale, and the dimensionally upgraded feature information of the first scale and the encoded feature information of the first scale are decoded to obtain the first feature information of the first scale.

4. The method according to claim 1, characterized in that: The number of the multiple scales is n, where n is an integer greater than 2, and the step of extracting the first feature information of the multiple scales from each video frame includes: For each video frame of the multiple video frames, extract features of the video frame to obtain fourth feature information of the video frame; Encoding the fourth feature information to obtain encoded feature information of a first scale; Performing dimension reduction and encoding on the coded feature information of the first scale to obtain coded feature information of the second scale, until obtaining coded feature information of the n-1th scale; Performing dimension reduction on the coding feature information of the n-1th scale to obtain coding feature information of the nth scale; Decoding the encoded feature information at the n-th scale to obtain first feature information at the n-th scale; The first feature information of the nth scale is dimensionally upgraded to obtain the dimensionally upgraded feature information of the n-1th scale, and the dimensionally upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale are decoded to obtain the first feature information of the n-1th scale, until the first feature information of the first scale is obtained.

5. The method according to claim 4, characterized in that The coding feature information of the first scale is a matrix; and the step of reducing the dimension and encoding the coding feature information of the first scale to obtain the coding feature information of the second scale includes: Performing dimension reduction on the encoded feature information of the first scale to obtain dimension reduction feature information of the second scale; Segmenting the dimension-reduced feature information to obtain a plurality of first local matrices, wherein the first local matrices include features at a plurality of positions; For each feature, based on a plurality of features in a first local matrix where the feature is located and position features of the plurality of features, the feature is updated, wherein the position feature indicates a position of the corresponding feature in the first local matrix; The plurality of features after updating the same first local matrix constitute a second local matrix; Based on the positions of the plurality of first local matrices in the dimension reduction feature information, concatenating the plurality of second local matrices to obtain a first concatenated matrix; Based on the first splicing matrix, the encoding feature information of the second scale is determined.

6. The method according to claim 5, characterized in that For each feature, based on a plurality of features in the first local matrix where the feature is located and position features of the plurality of features, updating the feature comprises: For each first local matrix, a plurality of features in the first local matrix are respectively fused with corresponding position features to obtain a plurality of first fused features; For each feature in the first local matrix, based on the similarity between the first fused feature corresponding to the feature and the multiple first fused features, the multiple first fused features are weighted fused, and the feature obtained by the weighted fusion is determined as the updated feature.

7. The method according to claim 5, characterized in that The determining, based on the first splicing matrix, the encoding feature information of the second scale includes: The first concatenation matrix is ​​determined as the encoding feature information of the second scale.

8. The method according to claim 5, characterized in that Before segmenting the dimension reduction feature information to obtain a plurality of first local matrices, the method further includes: Based on the first position transformation matrix, the features in the dimension reduction feature information are transformed to obtain updated dimension reduction feature information; The determining, based on the first splicing matrix, the encoding feature information of the second scale includes: Based on a second position transformation matrix, the features in the first splicing matrix are transformed, and the transformed feature matrix is ​​determined as the encoded feature information of the second scale, and the second position transformation matrix is ​​an inverse transformation matrix of the first position transformation matrix.

9. The method according to claim 4, characterized in that The decoding of the dimension-raising feature information of the n-1th scale and the encoded feature information of the n-1th scale to obtain the first feature information of the n-1th scale includes: Fusing the dimension-raising feature information of the n-1th scale with the encoding feature information of the n-1th scale to obtain fused feature information of the n-1th scale; The fused feature information at the n-1th scale is decoded to obtain first feature information at the n-1th scale.

10. The method according to any one of claims 1 to 9, characterized in that: The video frame processing method is implemented based on a video frame processing model, and the method further includes: Acquire a sample video frame sequence, wherein the sample video frame sequence includes a plurality of continuous sample video frames, wherein the plurality of sample video frames include a sample blurred video frame, and acquire a label video frame corresponding to the sample blurred video frame; Based on the video frame processing model, the sample video frame in the sample video frame sequence is processed to obtain a predicted video frame corresponding to the sample blurred video frame; Based on the image contrast model, feature extraction is performed on the labeled video frame and the predicted video frame respectively to obtain fifth feature information of the labeled video frame and sixth feature information of the predicted video frame; Based on the image contrast model, obtaining a feature difference between the fifth feature information and the sixth feature information, and determining the feature difference as a first loss value; Based on the first loss value, the video frame processing model is trained.

11. A video frame processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a video frame sequence, wherein the video frame sequence includes a plurality of continuous video frames, and the plurality of video frames includes a blurred video frame; A fusion module, used for extracting first feature information of multiple scales from each video frame; The fusion module includes a transformation unit, which is used to transform the first feature information other than the first feature information of the target scale to the target scale for the multiple first feature information corresponding to any video frame, wherein the target scale is the maximum scale among the multiple scales; The fusion module includes a fusion unit, which is used to fuse the transformed multiple first feature information to obtain the second feature information of the video frame; The fusion module is further configured to perform weighted fusion on the second feature information of the multiple video frames based on the similarity between the second feature information of the multiple video frames and the second feature information of the blurred video frame, using an attention mechanism to obtain first fused feature information corresponding to the blurred video frame, and the similarity between the second feature information of any video frame and the blurred video frame indicates the degree of association between the video frame and the blurred video frame; A reconstruction module is used to reconstruct the blurred video frame based on the first fusion feature information.

12. The device according to claim 11, characterized in that The fusion unit is used to splice the transformed multiple first feature information to obtain spliced ​​feature information; and perform convolution processing on the spliced ​​feature information to obtain the second feature information of the video frame.

13. The device according to claim 11, characterized in that The number of the multiple scales is 2, and the fusion module includes: an extraction unit, configured to perform feature extraction on each video frame of the plurality of video frames to obtain fourth feature information of the video frame; an encoding unit, configured to encode the fourth feature information to obtain encoded feature information of a first scale; A dimension reduction unit, used to reduce the dimension of the coding feature information of the first scale to obtain the coding feature information of the second scale; A decoding unit, configured to decode the encoded feature information of the second scale to obtain first feature information of the second scale; The decoding unit is further used to perform dimension upgrading on the first feature information of the second scale to obtain the dimension upgraded feature information of the first scale, and decode the dimension upgraded feature information of the first scale and the encoded feature information of the first scale to obtain the first feature information of the first scale.

14. The device according to claim 11, characterized in that The number of the multiple scales is n, where n is an integer greater than 2, and the fusion module includes: an extraction unit, configured to perform feature extraction on each video frame of the plurality of video frames to obtain fourth feature information of the video frame; an encoding unit, configured to encode the fourth feature information to obtain encoded feature information of a first scale; The encoding unit is further used to reduce the dimension and encode the encoding feature information of the first scale to obtain the encoding feature information of the second scale, until the encoding feature information of the n-1th scale is obtained; A dimension reduction unit, used to reduce the dimension of the coding feature information of the n-1th scale to obtain the coding feature information of the nth scale; A decoding unit, configured to decode the encoded feature information of the n-th scale to obtain first feature information of the n-th scale; The decoding unit is further used to perform dimension upgrading on the first feature information of the nth scale to obtain the dimension upgraded feature information of the n-1th scale, decode the dimension upgraded feature information of the n-1th scale and the encoded feature information of the n-1th scale to obtain the first feature information of the n-1th scale, until the first feature information of the first scale is obtained.

15. The device according to claim 14, characterized in that The encoding feature information of the first scale is a matrix; the encoding unit is used to reduce the dimension of the encoding feature information of the first scale to obtain the reduced dimension feature information of the second scale; the reduced dimension feature information is segmented to obtain multiple first local matrices, the first local matrix includes features at multiple positions; for each feature, based on multiple features in the first local matrix where the feature is located and the position features of the multiple features, the feature is updated, the position feature indicates the position of the corresponding feature in the first local matrix; the multiple features after the same first local matrix is ​​updated constitute a second local matrix; based on the positions of the multiple first local matrices in the reduced dimension feature information, the multiple second local matrices are spliced ​​to obtain a first spliced ​​matrix; based on the first spliced ​​matrix, the encoding feature information of the second scale is determined.

16. The device according to claim 15, characterized in that The encoding unit is used to, for each first local matrix, fuse multiple features in the first local matrix with corresponding position features respectively to obtain multiple first fused features; for each feature in the first local matrix, based on the similarity between the first fused feature corresponding to the feature and the multiple first fused features, perform weighted fusion on the multiple first fused features, and determine the feature obtained by the weighted fusion as the feature after the feature is updated.

17. The device according to claim 15, characterized in that The encoding unit is used to determine the first splicing matrix as the encoding feature information of the second scale.

18. The device according to claim 15, characterized in that The device also includes: A transformation module, configured to perform position transformation on features in the dimension reduction feature information based on a first position transformation matrix to obtain updated dimension reduction feature information; The encoding unit is used to perform position transformation on the features in the first splicing matrix based on a second position transformation matrix, and determine the transformed feature matrix as the encoded feature information of the second scale, wherein the second position transformation matrix is ​​an inverse transformation matrix of the first position transformation matrix.

19. The device according to claim 14, characterized in that The decoding unit is used to fuse the dimension-raising feature information of the n-1th scale with the encoded feature information of the n-1th scale to obtain the fused feature information of the n-1th scale; and decode the fused feature information of the n-1th scale to obtain the first feature information of the n-1th scale.

20. The device according to any one of claims 11 to 19, characterized in that The video frame processing device is implemented based on a video frame processing model, and the device also includes: The acquisition module is further used to acquire a sample video frame sequence, wherein the sample video frame sequence includes a plurality of continuous sample video frames, wherein the plurality of sample video frames include a sample blurred video frame, and acquire a label video frame corresponding to the sample blurred video frame; A processing module, configured to process the sample video frames in the sample video frame sequence based on the video frame processing model to obtain a predicted video frame corresponding to the sample blurred video frame; An extraction module, used for performing feature extraction on the labeled video frame and the predicted video frame respectively based on an image contrast model to obtain fifth feature information of the labeled video frame and sixth feature information of the predicted video frame; a determination module, configured to obtain a feature difference between the fifth feature information and the sixth feature information based on an image contrast model, and determine the feature difference as a first loss value; A training module is used to train the video frame processing model based on the first loss value.

21. A computer device, characterized in that: The computer device includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the video frame processing method according to any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the video frame processing method according to any one of claims 1 to 10.

23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the operations performed by the video frame processing method according to any one of claims 1 to 10 are implemented.