Video super-resolution processing method, device, electronic device and storage medium
By adopting a round-trip optimization strategy of local timing in video super-resolution processing, and using feature extraction of the current and target video frames to generate super-resolution features, the real-time and memory problems caused by the bidirectional recurrent convolution network are solved, and efficient video processing is achieved. Super-resolution processing.
Patent Information
- Application Number
- CN202210265415.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-03-17
AI Technical Summary
Among existing video super-resolution processing methods, the bidirectional circular convolution network results in poor real-time output of super-resolution results and requires large memory overhead.
Using the round-trip optimization strategy of local timing, during forward propagation in the super-resolution network, the N video frames before and after the current video frame are used as target video frames, the current and target hidden layer features are extracted, and super-resolution features are generated to achieve Real-time video super-resolution processing and save memory requirements.
It improves the real-time performance of video super-resolution processing and significantly reduces memory requirements, avoiding the twice video length memory overhead required by bidirectional recurrent convolutional networks.
Smart Images

Figure CN114612307B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device, computer-readable storage medium, and computer program product for super-resolution processing of a video. Background Art
[0002] Video super-resolution is to fill in the missing details from low resolution to high resolution by using the complementary information between input frames. With the development of the short video era, video super-resolution technology has been widely used in video enhancement on the server side.
[0003] In the related art, a bidirectional circular convolutional network (such as BasicVSR, GOVSR) can be used to process the super-resolution task of the video. The bidirectional circular convolutional network will first perform forward hidden layer feature propagation, that is, propagate from the starting frame to the ending frame of the video, and transmit the network output result of the past moment to the next moment. After the forward propagation is completed, the forward network output result of each moment is stored. Then, the reverse hidden layer feature propagation is performed, that is, propagation from the ending frame to the starting frame of the video. After the reverse propagation is completed, the reverse network output result of each moment is stored. Finally, the super-resolution result corresponding to each moment is generated based on the forward network output result and the reverse network output result corresponding to each moment. However, since the method based on the bidirectional circular convolutional network needs to perform forward propagation and reverse propagation in sequence to obtain the super-resolution result, the real-time output of the super-resolution result is affected. Summary of the invention
[0004] The present disclosure provides a video super-resolution processing method, device, electronic device, computer-readable storage medium and computer program product to at least solve the problem of poor real-time output of super-resolution results in related technologies. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a method for super-resolution processing of a video is provided, comprising:
[0006] Performing forward propagation on the video to be processed through a super-resolution network, and obtaining, for a current video frame in the video to be processed, a current hidden layer feature corresponding to the current video frame and a target hidden layer feature corresponding to a target video frame, wherein the target video frame includes at least one of N video frames before the current video frame and N video frames after the current video frame, where N is an arbitrary positive integer;
[0007] Extracting the target hidden layer features to obtain a target space feature map;
[0008] Extracting the current hidden layer features to obtain a current spatial feature map;
[0009] Generate a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and an initial super-resolution video frame obtained by processing the current spatial feature map;
[0010] A super-resolution video frame of the current video frame is obtained according to the super-resolution feature.
[0011] In one embodiment, generating the super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map includes:
[0012] Extracting the target hidden layer features to obtain a temporal feature graph corresponding to the target video frame;
[0013] The target space feature map is transformed by using the time series feature map to obtain a transformed feature map;
[0014] Generate a super-resolution feature corresponding to the current video frame according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame.
[0015] In one embodiment, extracting the target hidden layer features to obtain a temporal feature graph corresponding to the target video frame includes:
[0016] Extract the target hidden layer features through a first feature extraction network to obtain a first time series feature map from the target video frame to a future time point;
[0017] The target hidden layer features are extracted through a second feature extraction network to obtain a second temporal feature map from the target video frame to the past time.
[0018] In one embodiment, the step of transforming the target space feature map using the temporal feature map to obtain a transformed feature map includes:
[0019] In the case where the target video frame is the N-frame video frame before the current video frame, a first weighted sum of N first temporal feature maps of the N-frame video frame before the current video frame is obtained, and a difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum is obtained as the transformation feature map;
[0020] In the case where the target video frame is the Nth video frame after the current video frame, obtaining a second weighted sum of N second temporal feature maps of the Nth video frame after the current video frame, and obtaining a difference between the target spatial feature map corresponding to the Nth video frame after the current video frame and the second weighted sum as the transformed feature map;
[0021] When the target video frame is N video frames before and N video frames after the current video frame, the difference between the target spatial feature map corresponding to the Nth video frame before the current video frame and the first weighted sum, and the difference between the target spatial feature map corresponding to the Nth video frame after the current video frame and the second weighted sum are used as the transformation feature map.
[0022] In one embodiment, the first feature extraction network and the second feature extraction network have the same network structure and different network parameters;
[0023] The network structure includes multiple layers of residual modules connected in sequence.
[0024] In one embodiment, generating the super-resolution feature corresponding to the current video frame according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame includes:
[0025] Splicing the transformation feature map, the current spatial feature map and the initial super-resolution video frame to obtain a first splicing feature;
[0026] Feature extraction is performed on the first splicing feature to obtain the super-resolution feature.
[0027] In one embodiment, generating the super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map includes:
[0028] Performing alignment processing on the current spatial feature map and the target spatial feature map;
[0029] Splicing the aligned current spatial feature map, the target spatial feature map, and the initial super-resolution video frame to obtain a second splicing feature;
[0030] Feature extraction is performed on the second splicing feature to obtain the super-resolution feature.
[0031] In one embodiment, the aligning the current spatial feature map and the target spatial feature map includes:
[0032] Generate a current optical flow map corresponding to the current spatial feature map, and a target optical flow map corresponding to the target spatial feature map;
[0033] According to the current optical flow map and the target optical flow map, the current spatial feature map and the target spatial feature map are aligned.
[0034] According to a second aspect of an embodiment of the present disclosure, a video super-resolution processing device is provided, comprising:
[0035] A first feature generation module is configured to perform forward propagation on the to-be-processed video through a super-resolution network, and obtain, for a current video frame in the to-be-processed video, a current hidden layer feature corresponding to the current video frame and a target hidden layer feature corresponding to a target video frame, wherein the target video frame includes at least one of N video frames before the current video frame and N video frames after the current video frame, where N is an arbitrary positive integer;
[0036] A feature map generation module is configured to perform feature extraction on the target hidden layer features to obtain a target space feature map;
[0037] A feature extraction module is configured to perform feature extraction on the current hidden layer features to obtain a current spatial feature map;
[0038] A second feature generation module is configured to generate a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and an initial super-resolution video frame obtained by processing the current spatial feature map;
[0039] The super-resolution processing module is configured to obtain a super-resolution video frame of the current video frame according to the super-resolution feature.
[0040] In one embodiment, the second feature generation module includes:
[0041] A first feature extraction unit is configured to perform feature extraction on the target hidden layer feature to obtain a temporal feature graph corresponding to the target video frame;
[0042] A transformation unit is configured to perform a transformation process on the target space feature map using the temporal feature map to obtain a transformation feature map;
[0043] The feature generation unit is configured to generate a super-resolution feature corresponding to the current video frame according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame.
[0044] In one embodiment, the first feature extraction unit includes:
[0045] A first feature extraction subunit is configured to perform feature extraction on the target hidden layer features through a first feature extraction network to obtain a first temporal feature map from the target video frame to a future time point;
[0046] The second feature extraction subunit is configured to perform feature extraction on the target hidden layer features through a second feature extraction network to obtain a second temporal feature map from the target video frame to the past moment.
[0047] In one embodiment, the transformation unit is configured to execute, when the target video frame is the N-frame video frame before the current video frame, obtaining a first weighted sum of N first temporal feature maps of the N-frame video frames before the current video frame, and obtaining the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum as the transformation feature map; when the target video frame is the N-frame video frame after the current video frame, obtaining a second weighted sum of N second temporal feature maps of the N-frame video frames after the current video frame, and obtaining the difference between the target spatial feature map corresponding to the N-th video frame after the current video frame and the second weighted sum as the transformation feature map; when the target video frame is the N-frame video frame before and the N-frame video frame after the current video frame, taking the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum, and taking the difference between the target spatial feature map corresponding to the N-th video frame after the current video frame and the second weighted sum as the transformation feature map.
[0048] In one of the embodiments, the first feature extraction network and the second feature extraction network have the same network structure and different network parameters; the network structure includes multiple layers of sequentially connected residual modules.
[0049] In one embodiment, the feature generation unit includes:
[0050] A splicing subunit is configured to perform splicing of the transformation feature map, the current spatial feature map and the initial super-resolution video frame to obtain a first splicing feature;
[0051] The third feature extraction subunit is configured to perform feature extraction on the first splicing feature to obtain the super-resolution feature.
[0052] In one embodiment, the second feature generation module includes:
[0053] An alignment unit, configured to perform alignment processing on the current spatial feature map and the target spatial feature map;
[0054] A splicing unit is configured to perform splicing and alignment on the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame to obtain a second splicing feature;
[0055] The second feature extraction unit is configured to perform feature extraction on the second splicing feature to obtain the super-resolution feature.
[0056] In one of the embodiments, the alignment unit is configured to generate a current optical flow map corresponding to the current spatial feature map and a target optical flow map corresponding to the target spatial feature map; and align the current spatial feature map and the target spatial feature map according to the current optical flow map and the target optical flow map.
[0057] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0058] processor;
[0059] a memory for storing instructions executable by the processor;
[0060] The processor is configured to execute the instructions to implement the video super-resolution processing method as described in any one of the embodiments of the first aspect above.
[0061] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the super-resolution processing method of a video as described in any one of the embodiments of the first aspect.
[0062] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product includes instructions, and when the instructions are executed by a processor of an electronic device, the electronic device is enabled to perform the super-resolution processing method of a video as described in any one of the embodiments of the first aspect.
[0063] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0064] By setting the step size N, where N is an arbitrary positive integer, in the process of the super-resolution network forward propagating the processed video, at least one of the N video frames before the current video frame and the N video frames after the current video frame is used as the target video frame; according to the current hidden layer features of the current video frame, the current spatial feature map is generated; according to the target hidden layer features of the target video frame, the target spatial feature map is obtained; based on the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map, the super-resolution feature corresponding to the current video frame is generated; according to the super-resolution feature, the super-resolution video frame of the current video frame is obtained, so that the local timing round-trip optimization strategy with a step size of N can be adopted to realize real-time super-resolution processing of the current video frame, thereby improving the real-time performance of the super-resolution processing of the video. In addition, the method based on the bidirectional recurrent convolutional network in the related art needs to store the network output results of the forward propagation and the network output results of the reverse propagation separately, which requires a memory twice the length of the video, and the memory overhead is large. The use of the local timing round-trip strategy disclosed in the present invention can also greatly save memory requirements.
[0065] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0067] Figure 1 FIG. 1 is a schematic diagram showing a super-resolution process in a related art.
[0068] Figure 2 The present invention is a flowchart of a method for super-resolution processing of a video according to an exemplary embodiment.
[0069] Figure 3 The figure is a flowchart showing a step of generating super-resolution features according to an exemplary embodiment.
[0070] Figure 4 It is a schematic diagram showing a method of generating a temporal feature graph and a spatial feature graph according to an exemplary embodiment.
[0071] Figure 5 is a schematic structural diagram of a residual module according to an exemplary embodiment.
[0072] Figure 6 The figure is a flowchart showing another step of generating super-resolution features according to an exemplary embodiment.
[0073] Figure 7The present invention is a flowchart of a method for super-resolution processing of a video according to an exemplary embodiment.
[0074] Figure 8 The figure is a schematic diagram of image comparison according to an exemplary embodiment.
[0075] Fig. 9 The invention is a block diagram of a video super-resolution processing device according to an exemplary embodiment.
[0076] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment.
[0077] Fig.11 is a block diagram of another electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0078] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0079] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0080] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0081] In the related art, in the scenario of super-resolution processing of videos, in order to make full use of the complementary information of time series, the framework of bidirectional recurrent convolutional network is adopted by many algorithms. Figure 1, the bidirectional recurrent convolutional network will perform forward propagation and reverse propagation on the video in sequence. Forward propagation, that is, propagation from the starting frame to the ending frame, transmits the network output result of the past video frame to the next video frame; reverse propagation, that is, propagation from the ending frame to the starting frame, transmits the network output result of the future video frame to the previous video frame. After the forward propagation is completed, all the intermediate results obtained by the forward propagation processing need to be stored. Then, the reverse propagation processing is performed again. After the reverse propagation is completed, all the intermediate results obtained by the reverse propagation processing are stored. Finally, the super-resolution result of each frame is obtained based on the intermediate results of the forward propagation and the intermediate results of the reverse propagation. In other words, for a video sequence of length M, the framework of the bidirectional recurrent convolutional network needs to open up 2M memory for calculation, which makes it difficult to deploy in actual scenarios. In addition, since the super-resolution result of each frame can only be obtained after both the forward propagation and the reverse propagation are completed, the real-time performance of the super-resolution result of each frame is poor.
[0082] In order to solve the problem, the present disclosure provides a video super-resolution processing method based on local time series round trip, and the video super-resolution processing method is applied to electronic devices. A trained super-resolution network is pre-deployed in the electronic device, and the super-resolution network can be a unidirectional circular convolution network. The electronic device forward propagates the video to be processed through the super-resolution network, and obtains the current hidden layer features corresponding to the current video frame and the target hidden layer features corresponding to the target video frame for the current video frame in the video to be processed. The target video frame includes at least one of the N video frames before the current video frame and the N video frames after the current video frame, and N is an arbitrary positive integer. The electronic device extracts the target hidden layer features to obtain a target spatial feature map; extracts the current hidden layer features to obtain a current spatial feature map; generates a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map; obtains the super-resolution video frame of the current video frame according to the super-resolution feature, and then obtains the super-resolution video frame corresponding to each video frame in the video to be processed, and generates a super-resolution video.
[0083] The electronic device may be a terminal or a server. The terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0084] Figure 2is a flowchart of a method for super-resolution processing of a video according to an exemplary embodiment. Figure 2 As shown, the video super-resolution processing method is used in an electronic device and includes the following steps.
[0085] In step S210, the video to be processed is forward propagated through the super-resolution network, and for the current video frame in the video to be processed, the current hidden layer features corresponding to the current video frame and the target hidden layer features corresponding to the target video frame are obtained.
[0086] Among them, the video to be processed is the video to be processed by super-resolution, for example, the video collected in real time by the terminal or image acquisition device; the video pre-stored in the local database or server, for example, film and television videos, short videos shot and uploaded by users, etc.
[0087] The target video frame includes at least one of the N video frames before the current video frame and the N video frames after the current video frame, and N is an arbitrary positive integer. It can be understood that if N is greater than 1, the target hidden layer features of the target video frame include N hidden layer features corresponding to the N target video frames.
[0088] It can be understood that, when the super-resolution network performs forward propagation processing on the processed video, and the target video frame is the N video frames before the current video frame, when the current video frame belongs to any frame from the start frame to the Nth frame, the actual target video frame is less than N frames. When the super-resolution network performs forward propagation processing on the processed video, and the target video frame is the N video frames after the current video frame, when the current video frame belongs to any frame from the last N frames to the end frame, the actual target video frame is less than N frames.
[0089] Specifically, the super-resolution network can be a unidirectional recurrent convolutional network, which is used to perform forward propagation processing on the video to be processed. The unidirectional recurrent convolutional network includes an input layer, a hidden layer, and an output layer. After the video to be processed is input into the super-resolution network, for the current video frame in the video to be processed, the super-resolution network inputs the hidden layer features of the current video frame and the previous frame of the current video frame into the hidden layer to obtain the current hidden layer features corresponding to the current video frame. Similarly, for the target video frame in the video to be processed, the super-resolution network inputs the hidden layer features of the target video frame and the previous frame of the target video frame into the hidden layer to obtain the target hidden layer features corresponding to the target video frame.
[0090] In step S220, feature extraction is performed on the target hidden layer features to obtain a target space feature map.
[0091] Specifically, a third feature extraction network is pre-deployed in the electronic device, and the third feature extraction network can be any one of a residual network, a convolutional neural network, etc. After obtaining the target hidden layer features of the target video frame through the super-resolution network, the electronic device inputs the target hidden layer features into the third feature extraction network, and extracts the target hidden layer features through the third feature extraction network to obtain a target spatial feature map.
[0092] In step S230, feature extraction is performed on the current hidden layer features to obtain a current spatial feature map.
[0093] Specifically, after obtaining the current hidden layer features of the current video frame through the super-resolution network, the electronic device inputs the current hidden layer features into the third feature extraction network, extracts features of the current hidden layer features through the third feature extraction network, and obtains the current spatial feature map.
[0094] In step S240, a super-resolution feature corresponding to the current video frame is generated according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map.
[0095] Specifically, the electronic device performs super-resolution processing on the current spatial feature map to obtain an initial super-resolution video frame of the current hidden layer feature. Super-resolution processing can be implemented by sub-pixel convolution, deconvolution, etc. Then, the initial super-resolution video frame is optimized using the current spatial feature map and the target spatial feature map to obtain the super-resolution feature corresponding to the current video frame. In an example, the current spatial feature map and the target spatial feature map can be spliced with the initial super-resolution video frame to obtain the super-resolution feature of the current video frame.
[0096] In step S250, a super-resolution video frame of the current video frame is obtained according to the super-resolution feature.
[0097] Specifically, the electronic device performs super-resolution processing on the super-resolution feature of the current video frame to obtain a super-resolution video frame of the current video frame. After processing each video frame in the video to be processed according to steps S210 to S250, a super-resolution video frame corresponding to each video frame can be obtained, thereby generating a super-resolution video corresponding to the video to be processed.
[0098] In the above-mentioned video super-resolution processing method, by setting the step size N, N is an arbitrary positive integer, in the process of the super-resolution network forward propagating the processed video, at least one of the N video frames before the current video frame and the N video frames after the current video frame is used as the target video frame; according to the current hidden layer features of the current video frame, the current spatial feature map is generated; according to the target hidden layer features of the target video frame, the target spatial feature map is obtained; based on the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map, the super-resolution feature corresponding to the current video frame is generated; according to the super-resolution feature, the super-resolution video frame of the current video frame is obtained, so that the local timing round-trip optimization strategy with a step size of N can be adopted to realize real-time super-resolution processing of the current video frame, thereby improving the real-time performance of the super-resolution processing of the video. In addition, the method based on the bidirectional recurrent convolutional network in the related art needs to store the network output results of the forward propagation and the network output results of the reverse propagation separately, which requires a memory twice the length of the video, and the memory overhead is large. The use of the local timing round-trip strategy disclosed in the present invention can also greatly save memory requirements.
[0099] In an exemplary embodiment, a method for generating super-resolution features is described. Figure 3 As shown, in step S240, a super-resolution feature corresponding to the current video frame is generated according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map. This can be specifically achieved by the following steps:
[0100] In step S310, feature extraction is performed on target hidden layer features to obtain a temporal feature map corresponding to the target video frame.
[0101] Specifically, a time series feature extraction network may be pre-deployed in the electronic device. The time series feature extraction network and the third feature extraction network may use the same network structure but have different network parameters; or different network structures may be used. The time series feature extraction network, the super-resolution network, and the third feature extraction network may be trained synchronously.
[0102] After the electronic device obtains the target hidden layer features of the target video frame through the super-resolution network, it can also simultaneously input the target hidden layer features into the temporal feature extraction network while processing the target hidden layer features through the third feature extraction network, and process the target hidden layer features through the temporal feature extraction network to obtain the temporal feature graph corresponding to the target video frame. The temporal feature graph reflects the temporal feature difference between the target hidden layer features and the past video frames and / or future video frames.
[0103] In step S320, the target space feature map is transformed using the temporal feature map to obtain a transformed feature map.
[0104] Among them, the transformation processing can be achieved by subtraction, multiplication, addition, preset functions, etc., depending on the specific situation. Its purpose is to transform the timing characteristics of the target video frame to the current video frame so that the target video frame can fully provide information that is helpful for enhancing the current video frame.
[0105] Specifically, when the target video frame is the previous frame and / or the next frame of the current video frame, the electronic device can use the temporal feature map of the previous video frame to transform the target spatial feature map of the previous video frame to obtain the previous frame transformation feature map. Use the temporal feature map of the next video frame to transform the target spatial feature map of the next video frame to obtain the next frame transformation feature map, and use the previous frame transformation feature map and / or the next frame transformation feature map as the transformation feature map corresponding to the current video frame.
[0106] In the case where the target video frame is the previous multiple frames and / or the next multiple frames of the current video frame, the electronic device can transform the target spatial feature map of each video frame using the timing feature map of each video frame in units of each frame to obtain a corresponding transformation feature map. It is also possible to transform a certain frame of the continuous multiple video frames using the timing feature map of the continuous multiple video frames in units of multiple frames to obtain a corresponding transformation feature map. In an example, the target video frame is the first N (N is greater than 1) frames of the current video frame t, and the timing feature map of the N target video frames can be used to transform the target spatial feature map of the tNth frame of the video frame to obtain a corresponding transformation feature map.
[0107] In step S330, a super-resolution feature corresponding to the current video frame is generated according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame.
[0108] Specifically, the electronic device uses the transformation feature map and the current spatial feature map to optimize the initial super-resolution video frame to obtain the super-resolution features corresponding to the current video frame. In one example, the transformation feature map, the current spatial feature map and the initial super-resolution video frame can be spliced to obtain the super-resolution features of the current video frame. It is understandable that there may be multiple transformation feature maps, and the electronic device uses multiple transformation feature maps and the current spatial feature map to optimize the initial super-resolution video frame to obtain the super-resolution features corresponding to the current video frame.
[0109] In this embodiment, by using the temporal feature map of the target video frame to transform the target spatial feature map of the target video frame, it is possible to enable the current video frame to use the feature information of past video frames and / or future video frames based on a lightweight network structure without using a bidirectional recurrent convolutional network, thereby helping to improve the real-time and accuracy of super-resolution processing of the video.
[0110] In an exemplary embodiment, feature extraction is performed on target hidden layer features to obtain a temporal feature map corresponding to a target video frame, including: extracting feature of the target hidden layer features through a first feature extraction network to obtain a first temporal feature map from the target video frame to a future time; extracting feature of the target hidden layer features through a second feature extraction network to obtain a second temporal feature map from the target video frame to a past time.
[0111] Specifically, the above-mentioned temporal feature extraction network may include a first feature extraction network and a second feature extraction network. The first feature extraction network, the second feature extraction network, the third feature extraction network, and the super-resolution network may be deployed independently and trained synchronously. Among them, the first feature extraction network, the second feature extraction network, and the third feature extraction network may adopt the same network structure but have different network parameters; or different network structures may be adopted.
[0112] After the electronic device obtains the target hidden layer features of the target video frame through the super-resolution network, it can simultaneously input the target hidden layer features into the first feature extraction network and the second feature extraction network respectively while processing the target hidden layer features through the third feature extraction network. The target hidden layer features are processed by the first feature extraction network to obtain the first temporal feature map corresponding to the target video frame. The first temporal feature map reflects the temporal feature difference between the target video frame and the future. The target hidden layer features are processed by the second feature extraction network to obtain the second temporal feature map corresponding to the target video frame. The second temporal feature map reflects the temporal feature difference from the target video frame to the past.
[0113] Similarly, refer to Figure 4 After the electronic device obtains the current hidden layer features of the current video frame through the super-resolution network, it can simultaneously input the current hidden layer features into the first feature extraction network and the second feature extraction network respectively while processing the current hidden layer features through the third feature extraction network. The first time series feature map corresponding to the current video frame is obtained through the first feature extraction network. The second time series feature map corresponding to the current video frame is obtained through the second feature extraction network.
[0114] In this embodiment, step S320, using the temporal feature map to transform the target space feature map to obtain a transformed feature map, can be specifically implemented in the following manner:
[0115] (1) When the target video frame is the N-frame video frame before the current video frame, obtain the first weighted sum of the N first temporal feature maps of the N-frame video frame before the current video frame, and obtain the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum as the transformation feature map, so as to realize the transformation of the video frame at time tN to the current video frame t. This can be achieved by the following formula:
[0116]
[0117] in, represents the transformation feature map; S t-N Represents the target space feature map corresponding to the Nth video frame before the current video frame; F t-i Represents the first temporal feature graph of the i-th video frame before the current video frame.
[0118] (2) When the target video frame is the Nth video frame after the current video frame, obtain the second weighted sum of the N second temporal feature maps of the Nth video frame after the current video frame, and obtain the difference between the target spatial feature map corresponding to the Nth video frame after the current video frame and the second weighted sum as the transformation feature map. This can be achieved by the following formula:
[0119]
[0120] in, represents the transformation feature map; S t+N represents the target space feature map corresponding to the Nth video frame after the current video frame; P t+i Represents the second temporal feature graph of the i-th video frame after the current video frame.
[0121] (3) When the target video frame is the N video frames before and after the current video frame, the difference between the target spatial feature map corresponding to the Nth video frame before the current video frame and the first weighted sum, and the difference between the target spatial feature map corresponding to the Nth video frame after the current video frame and the second weighted sum are used as the transformation feature map. Referring to the above formula, and are all used as transformation feature maps.
[0122] In an example, if the target video frame includes a previous video frame and a next video frame of the current video frame, the transformation feature map can be obtained by the following formula:
[0123]
[0124]
[0125] in, Represents the transformed feature map generated by the previous video frame; S t-1 Represents the target spatial feature map of the previous video frame; F t-1 A first temporal feature map representing a previous video frame; Represents the transformed feature map generated by the next video frame; S t+1 Represents the target spatial feature map of the next video frame; P t+1 A second temporal feature map representing the next video frame.
[0126] In this embodiment, by transforming the temporal feature map and spatial feature map of the video frame before and / or after the current video frame to the current video frame, on the one hand, the current video frame can obtain sufficient past and / or future feature information, and the real-time super-resolution can be achieved under the premise of ensuring the quality of super-resolution. Figure 1 In the related art, optical flow estimation is usually used to align the network output results of forward propagation and backward propagation. The embodiment of the present disclosure adopts the estimation and transformation strategy of the time series feature map, which can improve the speed of feature alignment.
[0127] In an exemplary embodiment, the first feature extraction network and the second feature extraction network have the same network structure and different network parameters; the network structure includes multiple layers (for example, two layers) of residual modules connected in sequence. Of course, including one layer of residual modules is also feasible. Figure 5 As shown, the residual module includes a first convolution layer (2D convolution layer), a linear rectification layer (ReLU), and a second convolution layer connected in sequence. Among them, the 2D (two-dimensional) convolution layer can be a convolution layer of a 3x3 convolution kernel.
[0128] In this embodiment, the target hidden layer features are extracted through the first feature extraction network to obtain the first time series feature map from the target video frame to the future moment, which can be specifically achieved in the following manner: after obtaining the target hidden layer features, the target hidden layer features are input into the first feature extraction network, and the target hidden layer features are skip-connected through the residual module, wherein the skip-connection processing refers to connecting the results of the outputs of different layers. The target hidden layer features are processed through the first convolutional layer, the linear rectification layer, and the second convolutional layer in the residual module. The target hidden layer features after the skip connection processing and the target hidden layer features after the residual module processing are fused to obtain the first time series features.
[0129] Accordingly, the specific implementation method of obtaining the second temporal feature map of the target video frame through the second feature extraction network is similar to the implementation method of obtaining the first temporal feature map of the target video frame through the first feature extraction network, and will not be repeated here.
[0130] In this embodiment, by adopting a feature extraction network based on a residual module, on the one hand, the performance of the feature extraction network can be improved to obtain higher accuracy; on the other hand, the convergence speed of the network can be increased during network training, thereby improving the network training efficiency.
[0131] In an exemplary embodiment, in step S330, a super-resolution feature corresponding to the current video frame is generated according to the transformation feature map, the current spatial feature map and the initial super-resolution video frame, including: splicing the transformation feature map, the current spatial feature map and the initial super-resolution video frame to obtain a first splicing feature; and performing feature extraction on the first splicing feature to obtain a super-resolution feature.
[0132] Specifically, the network structure of the network used for feature extraction of the first splicing feature can be the same as any one of the first feature extraction network, the second feature extraction network, and the third feature extraction network, but with different network parameters; different network structures can also be used. After obtaining the transformation feature map, the current spatial feature map, and the initial super-resolution video frame, the electronic device splices the transformation feature map, the current spatial feature map, and the initial super-resolution video frame in the feature dimension to obtain the first splicing feature. Then, feature extraction is performed on the first splicing feature to obtain a super-resolution feature, so that the transformation feature map, the current spatial feature map, and the initial super-resolution video frame can be better integrated, so that the transformation feature map at the past and / or future moment can better enhance the current video frame.
[0133] In an exemplary embodiment, another method for generating super-resolution features is described. Figure 6 As shown, in step S240, a super-resolution feature corresponding to the current video frame is generated according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map. This can be specifically achieved by the following steps:
[0134] In step S610, the current spatial feature map and the target spatial feature map are aligned.
[0135] In step S620, the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame after the splicing alignment process are spliced to obtain a second splicing feature.
[0136] In step S630, feature extraction is performed on the second splicing feature to obtain a super-resolution feature.
[0137] Among them, the network structure of the network used for feature extraction of the second splicing feature can be the same as any one of the first feature extraction network, the second feature extraction network, and the third feature extraction network mentioned above, but with different network parameters; different network structures can also be used.
[0138] Specifically, after obtaining the current spatial feature map and the target spatial feature map, the electronic device can align the current spatial feature map and the target spatial feature map by any of the methods such as the optical flow method and the direct method. Then, the aligned current spatial feature map, the aligned target spatial feature map and the initial super-resolution video frame are spliced in the feature dimension to obtain a second splicing feature. Finally, feature extraction is performed on the first splicing feature to obtain a super-resolution feature, so that the transformation feature map, the current spatial feature map and the initial super-resolution video frame can be better integrated, so that the transformation feature map at the past and / or future moment can better enhance the current video frame.
[0139] In this embodiment, by adopting a local round-trip optimization strategy with a step size of N, the current video frame can obtain feature information of past and / or future video frames without using a bidirectional recurrent convolutional network, thereby achieving real-time super-resolution processing of the video while ensuring super-resolution accuracy. In addition, the local time-series round-trip strategy of this embodiment can also greatly save memory requirements.
[0140] In an exemplary embodiment, in step S610, the current spatial feature map and the target spatial feature map are aligned, which can be specifically implemented in the following manner:
[0141] Specifically, the electronic device estimates the current optical flow map corresponding to the current video frame, estimates the target optical flow map corresponding to the target video frame, and aligns the target spatial feature map to the current spatial feature map based on the x and y offsets of each pixel of the current optical flow map, thereby achieving alignment processing of the target spatial feature map and the current spatial feature map.
[0142] Figure 7 is a flowchart of a method for super-resolution processing of a video according to an exemplary embodiment. Figure 7 As shown, the following steps are included.
[0143] In step S702, the video to be processed is forward propagated through the super-resolution network, and the current hidden layer features corresponding to the current video frame and the target hidden layer features corresponding to the target video frame are obtained for the current video frame in the video to be processed. The super-resolution network is a unidirectional recurrent convolutional network. The target video frame includes N video frames before the current video frame and N video frames after the current video frame, where N is an arbitrary positive integer.
[0144] In step S704, after obtaining the target hidden layer features, the target hidden layer features are extracted through the first feature extraction network to obtain a first temporal feature map from the target video frame to the future moment. The target hidden layer features are extracted through the second feature extraction network to obtain a second temporal feature map from the target video frame to the past moment. The target hidden layer features are extracted through the third extraction network to obtain a target spatial feature map of the target video features.
[0145] In step S706, after obtaining the current hidden layer features, the current hidden layer features are feature extracted by the first feature extraction network to obtain a first temporal feature map from the current video frame to the future moment. The current hidden layer features are feature extracted by the second feature extraction network to obtain a second temporal feature map from the current video frame to the past moment. The current hidden layer features are feature extracted by the third extraction network to obtain a current spatial feature map of the current video features.
[0146] In step S708, a transformation feature map is generated according to the target spatial feature map, the first temporal feature map and the second temporal feature map of the target video frame.
[0147] Specifically, when N is 1, the difference between the target spatial feature map of the previous frame of the current video frame and the first temporal feature map is obtained, and the difference between the target spatial feature map of the next frame of the current video frame and the second temporal feature map is obtained as the transformation feature map.
[0148] When N is greater than 1, obtain the first weighted sum of the N first temporal feature maps of the N video frames before the current video frame, and obtain the second weighted sum of the N second temporal feature maps of the N video frames after the current video frame. The difference between the target space feature map corresponding to the Nth video frame before the current video frame and the first weighted sum, and the difference between the target space feature map corresponding to the Nth video frame after the current video frame and the second weighted sum are used as the transformation feature map.
[0149] In step S710, the transformation feature map, the current spatial feature map and the initial super-resolution video frame are spliced to obtain a first splicing feature; feature extraction is performed on the first splicing feature to obtain a super-resolution feature of the current video frame.
[0150] In step S712, sub-pixel convolution processing is performed on the super-resolution feature of the current video frame to obtain a super-resolution video frame of the current video frame. After each video frame in the video frame to be processed is processed, a super-resolution video of the video to be processed is obtained.
[0151] The super-resolution processing method disclosed in the present invention was tested on Vid4 (a video data set) and UDM10 (a video data set), and the PSNR (Peak Signal to Noise Ratio) index was used as an evaluation. Finally, the optical flow method in the related art was used to obtain 28.57dB (decibel) and 40.08dB on Vid4 and UDM10, respectively, and the time consumption was 163ms (milliseconds). The super-resolution method disclosed in the present invention obtained 28.96dB and 40.36dB on Vid4 and UDM10, respectively, and the time consumption was 75 milliseconds. It can be seen that the super-resolution processing method disclosed in the present invention has higher super-resolution performance and less time consumption than the related art.
[0152] Figure 8 A schematic diagram showing an image processed by the super-resolution processing method disclosed in the present invention is shown. Figure 8 It can be seen that the super-resolution processing method disclosed in the present invention can restore results close to the real high resolution.
[0153] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.
[0155] Fig. 9 FIG. 1 is a block diagram of a video super-resolution processing device X00 according to an exemplary embodiment. Fig. 9 The device includes a first feature generation module X02, a feature map generation module X04, a feature extraction module X06, a second feature generation module X08, and a super-resolution processing module X10.
[0156] The first feature generation module X02 is configured to perform forward propagation on the processed video through the super-resolution network, and obtain the current hidden layer features corresponding to the current video frame and the target hidden layer features corresponding to the target video frame for the current video frame in the processed video, the target video frame includes at least one of the N video frames before the current video frame and the N video frames after the current video frame, N is an arbitrary positive integer; the feature map generation module X04 is configured to perform feature extraction on the target hidden layer features to obtain the target spatial feature map; the feature extraction module X06 is configured to perform feature extraction on the current hidden layer features to obtain the current spatial feature map; the second feature generation module X08 is configured to generate the super-resolution features corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame obtained by processing the current spatial feature map; the super-resolution processing module X10 is configured to execute according to the super-resolution features to obtain the super-resolution video frame of the current video frame.
[0157] In an exemplary embodiment, the second feature generation module X08 includes: a first feature extraction unit, configured to perform feature extraction on the target hidden layer features to obtain a temporal feature map corresponding to the target video frame; a transformation unit, configured to perform transformation processing on the target spatial feature map using the temporal feature map to obtain a transformation feature map; a feature generation unit, configured to generate a super-resolution feature corresponding to the current video frame based on the transformation feature map, the current spatial feature map and the initial super-resolution video frame.
[0158] In an exemplary embodiment, the first feature extraction unit includes: a first feature extraction subunit, configured to perform feature extraction on the target hidden layer features through a first feature extraction network, and obtain a first temporal feature map from the target video frame to the future moment; a second feature extraction subunit, configured to perform feature extraction on the target hidden layer features through a second feature extraction network, and obtain a second temporal feature map from the target video frame to the past moment.
[0159] In an exemplary embodiment, the transformation unit is configured to execute, when the target video frame is N video frames before the current video frame, obtaining a first weighted sum of N first temporal feature maps of N video frames before the current video frame, and obtaining the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum as a transformation feature map; when the target video frame is N video frames after the current video frame, obtaining a second weighted sum of N second temporal feature maps of N video frames after the current video frame, and obtaining the difference between the target spatial feature map corresponding to the N-th video frame after the current video frame and the second weighted sum as a transformation feature map; when the target video frame is N video frames before and N video frames after the current video frame, taking the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum, and taking the difference between the target spatial feature map corresponding to the N-th video frame after the current video frame and the second weighted sum as the transformation feature map.
[0160] In an exemplary embodiment, the first feature extraction network and the second feature extraction network have the same network structure and different network parameters; the network structure includes multiple layers of sequentially connected residual modules.
[0161] In an exemplary embodiment, the feature generation unit includes: a splicing subunit, configured to perform splicing of a transformation feature map, a current spatial feature map and an initial super-resolution video frame to obtain a first splicing feature; and a third feature extraction subunit, configured to perform feature extraction on the first splicing feature to obtain a super-resolution feature.
[0162] In an exemplary embodiment, the second feature generation module X08 includes: an alignment unit, configured to perform alignment processing on the current spatial feature map and the target spatial feature map; a splicing unit, configured to perform splicing of the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame after the alignment processing to obtain a second splicing feature; and a second feature extraction unit, configured to perform feature extraction on the second splicing feature to obtain a super-resolution feature.
[0163] In an exemplary embodiment, the alignment unit is configured to generate a current optical flow map corresponding to the current spatial feature map and a target optical flow map corresponding to the target spatial feature map; and align the current spatial feature map and the target spatial feature map according to the current optical flow map and the target optical flow map.
[0164] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0165] Fig.101 is a block diagram of an electronic device Z00 for super-resolution processing of a video according to an exemplary embodiment. For example, the electronic device Z00 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0166] Reference Fig.10 The electronic device Z00 may include one or more of the following components: a processing component Z02, a memory Z04, a power component Z06, a multimedia component Z08, an audio component Z10, an input / output (I / O) interface Z12, a sensor component Z14, and a communication component Z16.
[0167] The processing component Z02 generally controls the overall operation of the electronic device Z00, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component Z02 may include one or more processors Z20 to execute instructions to complete all or part of the steps of the above-described method. In addition, the processing component Z02 may include one or more modules to facilitate interaction between the processing component Z02 and other components. For example, the processing component Z02 may include a multimedia module to facilitate interaction between the multimedia component Z08 and the processing component Z02.
[0168] The memory Z04 is configured to store various types of data to support operations on the electronic device Z00. Examples of such data include instructions for any application or method operating on the electronic device Z00, contact data, phone book data, messages, pictures, videos, etc. The memory Z04 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
[0169] The power supply assembly Z06 provides power to various components of the electronic device Z00. The power supply assembly Z06 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device Z00.
[0170] The multimedia component Z08 includes a screen that provides an output interface between the electronic device Z00 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component Z08 includes a front camera and / or a rear camera. When the electronic device Z00 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0171] The audio component Z10 is configured to output and / or input audio signals. For example, the audio component Z10 includes a microphone (MIC), and when the electronic device Z00 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory Z04 or sent via the communication component Z16. In some embodiments, the audio component Z10 also includes a speaker for outputting an audio signal.
[0172] I / O interface Z12 provides an interface between processing component Z02 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0173] The sensor assembly Z14 includes one or more sensors for providing various aspects of status assessment for the electronic device Z00. For example, the sensor assembly Z14 can detect the open / closed state of the electronic device Z00, the relative positioning of the components, such as the display and keypad of the electronic device Z00, and the sensor assembly Z14 can also detect the position change of the electronic device Z00 or the components of the electronic device Z00, the presence or absence of contact between the user and the electronic device Z00, the orientation or acceleration / deceleration of the device Z00 and the temperature change of the electronic device Z00. The sensor assembly Z14 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly Z14 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly Z14 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0174] The communication component Z16 is configured to facilitate wired or wireless communication between the electronic device Z00 and other devices. The electronic device Z00 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component Z16 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component Z16 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0175] In an exemplary embodiment, the electronic device Z00 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0176] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory Z04 including instructions, and the above instructions can be executed by a processor Z20 of the electronic device Z00 to complete the above method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0177] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions. The instructions can be executed by the processor Z20 of the electronic device Z00 to implement the above method.
[0178] Fig.11 FIG. 1 is a block diagram of another electronic device S00 for performing super-resolution processing on a video according to an exemplary embodiment. For example, the electronic device S00 may be a server. Fig.11 The electronic device S00 includes a processing component S20, which further includes one or more processors, and a memory resource represented by a memory S22 for storing instructions executable by the processing component S20, such as an application. The application stored in the memory S22 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component S20 is configured to execute the instructions to perform the above method.
[0179] The electronic device S00 may further include: a power supply component S24 configured to perform power management of the electronic device S00, a wired or wireless network interface S26 configured to connect the electronic device S00 to a network, and an input / output (I / O) interface S28. The electronic device S00 may operate based on an operating system stored in the memory S22, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD or the like.
[0180] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory S22 including instructions, and the above instructions can be executed by a processor of the electronic device S00 to complete the above method. The storage medium can be a computer-readable storage medium, for example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0181] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions. The instructions can be executed by a processor of the electronic device S00 to complete the above method.
[0182] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments, which will not be described one by one here.
[0183] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0184] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A video super-resolution processing method, characterized in that: include: Performing forward propagation on the video to be processed through a super-resolution network, and obtaining, for a current video frame in the video to be processed, a current hidden layer feature corresponding to the current video frame and a target hidden layer feature corresponding to a target video frame, wherein the target video frame includes at least one of N video frames before the current video frame and N video frames after the current video frame, where N is an arbitrary positive integer; Extracting the target hidden layer features to obtain a target space feature map; Extracting the current hidden layer features to obtain a current spatial feature map; Generate a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and an initial super-resolution video frame obtained by processing the current spatial feature map; A super-resolution video frame of the current video frame is obtained according to the super-resolution feature.
2. The video super-resolution processing method according to claim 1, characterized in that: The generating a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and an initial super-resolution video frame obtained by processing the current spatial feature map includes: Extracting the target hidden layer features to obtain a temporal feature graph corresponding to the target video frame; The target space feature map is transformed by using the time series feature map to obtain a transformed feature map; Generate a super-resolution feature corresponding to the current video frame according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame.
3. The video super-resolution processing method according to claim 2, characterized in that: The step of extracting the target hidden layer features to obtain a temporal feature graph corresponding to the target video frame includes: Extract the target hidden layer features through a first feature extraction network to obtain a first time series feature map from the target video frame to a future time point; The target hidden layer features are extracted through a second feature extraction network to obtain a second temporal feature map from the target video frame to the past time.
4. The video super-resolution processing method according to claim 3, characterized in that: The step of transforming the target space feature map using the time series feature map to obtain a transformed feature map includes: In the case where the target video frame is the N-frame video frame before the current video frame, a first weighted sum of N first temporal feature maps of the N-frame video frame before the current video frame is obtained, and a difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum is obtained as the transformation feature map; In the case where the target video frame is the Nth video frame after the current video frame, obtaining a second weighted sum of N second temporal feature maps of the Nth video frame after the current video frame, and obtaining a difference between the target spatial feature map corresponding to the Nth video frame after the current video frame and the second weighted sum as the transformed feature map; When the target video frame is N video frames before and N video frames after the current video frame, the difference between the target spatial feature map corresponding to the Nth video frame before the current video frame and the first weighted sum, and the difference between the target spatial feature map corresponding to the Nth video frame after the current video frame and the second weighted sum are used as the transformation feature map.
5. The video super-resolution processing method according to claim 3, characterized in that: The first feature extraction network and the second feature extraction network have the same network structure and different network parameters; The network structure includes multiple layers of residual modules connected in sequence.
6. The video super-resolution processing method according to claim 2, characterized in that: The step of generating a super-resolution feature corresponding to the current video frame according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame includes: Splicing the transformation feature map, the current spatial feature map and the initial super-resolution video frame to obtain a first splicing feature; Feature extraction is performed on the first splicing feature to obtain the super-resolution feature.
7. The video super-resolution processing method according to claim 1, characterized in that: The generating a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map and an initial super-resolution video frame obtained by processing the current spatial feature map comprises: Performing alignment processing on the current spatial feature map and the target spatial feature map; Splicing the aligned current spatial feature map, the target spatial feature map, and the initial super-resolution video frame to obtain a second splicing feature; Feature extraction is performed on the second splicing feature to obtain the super-resolution feature.
8. The video super-resolution processing method according to claim 7, characterized in that: The aligning process of the current spatial feature map and the target spatial feature map includes: Generate a current optical flow map corresponding to the current spatial feature map, and a target optical flow map corresponding to the target spatial feature map; According to the current optical flow map and the target optical flow map, the current spatial feature map and the target spatial feature map are aligned.
9. A video super-resolution processing device, characterized in that: include: A first feature generation module is configured to perform forward propagation on the to-be-processed video through a super-resolution network, and obtain, for a current video frame in the to-be-processed video, a current hidden layer feature corresponding to the current video frame and a target hidden layer feature corresponding to a target video frame, wherein the target video frame includes at least one of N video frames before the current video frame and N video frames after the current video frame, where N is an arbitrary positive integer; A feature map generation module is configured to perform feature extraction on the target hidden layer features to obtain a target space feature map; A feature extraction module is configured to perform feature extraction on the current hidden layer features to obtain a current spatial feature map; A second feature generation module is configured to generate a super-resolution feature corresponding to the current video frame according to the current spatial feature map, the target spatial feature map, and an initial super-resolution video frame obtained by processing the current spatial feature map; The super-resolution processing module is configured to obtain a super-resolution video frame of the current video frame according to the super-resolution feature.
10. The video super-resolution processing device according to claim 9, characterized in that: The second feature generation module comprises: A first feature extraction unit is configured to perform feature extraction on the target hidden layer feature to obtain a temporal feature graph corresponding to the target video frame; A transformation unit is configured to perform a transformation process on the target space feature map using the temporal feature map to obtain a transformation feature map; The feature generation unit is configured to generate a super-resolution feature corresponding to the current video frame according to the transformed feature map, the current spatial feature map and the initial super-resolution video frame.
11. The video super-resolution processing device according to claim 10, characterized in that: The first feature extraction unit comprises: A first feature extraction subunit is configured to perform feature extraction on the target hidden layer features through a first feature extraction network to obtain a first temporal feature map from the target video frame to a future time point; The second feature extraction subunit is configured to perform feature extraction on the target hidden layer features through a second feature extraction network to obtain a second temporal feature map from the target video frame to the past moment.
12. The video super-resolution processing device according to claim 11, characterized in that: The transformation unit is configured to execute, when the target video frame is the N-frame video frame before the current video frame, obtaining a first weighted sum of N first temporal feature maps of the N-frame video frames before the current video frame, and obtaining the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum as the transformation feature map; when the target video frame is the N-frame video frame after the current video frame, obtaining a second weighted sum of N second temporal feature maps of the N-frame video frames after the current video frame, and obtaining the difference between the target spatial feature map corresponding to the N-th video frame after the current video frame and the second weighted sum as the transformation feature map; when the target video frame is the N-frame video frame before and the N-frame video frame after the current video frame, taking the difference between the target spatial feature map corresponding to the N-th video frame before the current video frame and the first weighted sum, and taking the difference between the target spatial feature map corresponding to the N-th video frame after the current video frame and the second weighted sum as the transformation feature map.
13. The video super-resolution processing device according to claim 11, characterized in that: The first feature extraction network and the second feature extraction network have the same network structure and different network parameters; the network structure includes multiple layers of sequentially connected residual modules.
14. The video super-resolution processing device according to claim 10, characterized in that: The feature generation unit comprises: A splicing subunit is configured to perform splicing of the transformation feature map, the current spatial feature map and the initial super-resolution video frame to obtain a first splicing feature; The third feature extraction subunit is configured to perform feature extraction on the first splicing feature to obtain the super-resolution feature.
15. The video super-resolution processing device according to claim 9, characterized in that: The second feature generation module comprises: An alignment unit, configured to perform alignment processing on the current spatial feature map and the target spatial feature map; A splicing unit is configured to perform splicing and alignment on the current spatial feature map, the target spatial feature map, and the initial super-resolution video frame to obtain a second splicing feature; The second feature extraction unit is configured to perform feature extraction on the second splicing feature to obtain the super-resolution feature.
16. The video super-resolution processing device according to claim 15, characterized in that: The alignment unit is configured to generate a current optical flow map corresponding to the current spatial feature map and a target optical flow map corresponding to the target spatial feature map; According to the current optical flow map and the target optical flow map, the current spatial feature map and the target spatial feature map are aligned.
17. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the video super-resolution processing method as described in any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the video super-resolution processing method as described in any one of claims 1 to 8.
19. A computer program product, comprising instructions, characterized in that: When the instruction is executed by a processor of an electronic device, the electronic device is enabled to execute the video super-resolution processing method as described in any one of claims 1 to 8.
