Cross-feature-scale intelligent video encoding method, system, device and storage medium
By transforming the reference frame into multiple feature scale spaces during video coding, extracting multi-scale features and generating cross-scale motion information, the problem of inaccurate prediction of violent motion areas in the existing technology is solved, and more accurate inter-frame prediction of video is achieved. Prediction and encoding effects.
Patent Information
- Application Number
- CN202111468504.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-03
AI Technical Summary
Existing video coding technology cannot accurately predict the motion relationship between video frames in areas with severe motion, resulting in poor coding results.
By transforming the reference frame into multiple feature scale spaces, extract multi-scale reference features, and use autoencoders to generate cross-scale motion information, generate cross-scale motion displacement vectors and weight maps, perform weighted prediction, and calculate residuals to reconstruct video frames. .
It achieves more content-adaptive prediction results, can more accurately handle videos with different motion content, compensate for high-resolution prediction errors, and guides predictions through implicit transmission of weight maps to generate prediction results more suitable for video content.
Smart Images

Figure CN114173135B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video compression coding, and in particular to a cross-feature-scale intelligent video coding method, system, device and storage medium. Background Art
[0002] Video compression coding is an important technology in the electronic information age, and is very important for reducing video transmission bandwidth and storage consumption. Video compression essentially achieves effective information representation by controlling the relationship between bit rate (the size of binary data required to represent the video) and distortion (the difference between the restored image video and the original image video). Simply put, the higher the bit rate, the smaller the compression distortion of the original video. However, at the same time, due to the higher bit rate, the storage space or transmission bandwidth required for the compressed video is also larger.
[0003] The end-to-end video coding framework based on artificial intelligence network conceptually divides video coding into two main steps, for example, see document 1 (Lu G, et al. DVC: an end-to-end deep video compression framework. CVPR2019), including: Step 1, encoding the motion displacement vectors describing the motion displacement vectors between adjacent video frames, and predicting the video frame to be encoded by decoding the motion displacement vectors. Step 2, after obtaining a prediction result for the current video frame to be encoded, compress the content that has not been predicted, that is, the so-called residual after prediction.
[0004] In document 1, the motion displacement vector between video frames is expressed in the form of optical flow, and the optical flow is compressed by deep image compression technology, and the predicted residual is compressed by similar deep image compression technology. In other words, the commonly used method is to express the motion information between video frames and the predicted residual in the form of images, and then encode and compress them respectively using image compressors. Commonly used deep image compressors can be found in document 2 (Ballé J, Minnen D, Singh S, et al. Variational image compression with a scale hyperprior [J]. ICLR, 2018.).
[0005] However, it is not enough to represent the motion relationship between video frames only by optical flow. For example, accurate optical flow cannot be used to make predictions in areas with more intense motion. Summary of the invention
[0006] The purpose of the present invention is to provide a cross-feature-scale intelligent video encoding method, system, device and storage medium, which are suitable for intelligent video encoding tasks and can produce more content-adaptive prediction results, thereby improving the encoding effect.
[0007] The objective of the present invention is achieved through the following technical solutions:
[0008] A cross-feature scale intelligent video encoding method, comprising:
[0009] The reference frame is transformed into multiple feature scale spaces, and features are extracted from the reference frame of each feature scale space to obtain multi-scale reference features;
[0010] The multi-scale reference features of the reference frame are linked to the features of the current coded frame, motion information is implicitly generated and transmitted through an autoencoder, a cross-scale motion displacement vector and a cross-scale weight map are generated through the decoded motion information, a multi-scale sampling result is obtained by sampling the multi-scale reference features through the cross-scale motion displacement vector, and the multi-scale sampling result is weighted by the cross-scale weight map to obtain the prediction feature of the current coded frame;
[0011] The predicted features of the current coded frame are used to calculate the residual of the feature dimension and reconstruct the current coded frame.
[0012] A cross-feature-scale intelligent video coding system, the system comprising:
[0013] A multi-scale reference feature extraction unit, used to transform the reference frame into multiple feature scale spaces, and extract features from the reference frame of each feature scale space to obtain multi-scale reference features;
[0014] A cross-scale weighted prediction unit is used to connect the multi-scale reference features of the reference frame with the features of the current coded frame, implicitly generate motion information through an autoencoder and transmit it, generate a cross-scale motion displacement vector and a cross-scale weight map through the decoded motion information, sample the multi-scale reference features through the cross-scale motion displacement vector to obtain a multi-scale sampling result, and weight the multi-scale sampling results using the cross-scale weight map to obtain a prediction feature of the current coded frame;
[0015] The reconstruction unit is used to calculate the residual of the feature dimension using the prediction features of the current coding frame and reconstruct the current coding frame.
[0016] A processing device, comprising: one or more processors; a memory for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0018] A readable storage medium stores a computer program, which implements the above method when the computer program is executed by a processor.
[0019] It can be seen from the technical solution provided by the present invention that 1) it is possible to construct prediction feature sources at different scales to better predict videos with different motion contents. 2) the motion vectors across scales are transmitted, and can be sampled from multi-scale reference sources to generate prediction results at a single scale. 3) the cross-scale prediction is guided by implicitly transmitting a cross-scale weight map, that is, a new weighted prediction mechanism in a single reference frame prediction scenario. Through this weighted prediction mechanism, the sampling results at different scales can be fused to produce prediction results that are more suitable for the video content. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0021] Figure 1 A flowchart of a cross-feature-scale intelligent video encoding method provided by an embodiment of the present invention;
[0022] Figure 2 A schematic diagram of reference frames of three characteristic scale spaces obtained by transformation provided in an embodiment of the present invention;
[0023] Figure 3 A schematic diagram showing a multi-scale reference frame and a prediction target for cross-scale sampling prediction provided by an embodiment of the present invention;
[0024] Figure 4 A schematic diagram of a cross-feature-scale intelligent video encoding method provided by an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of a cross-feature-scale intelligent video coding system provided by an embodiment of the present invention;
[0026] Figure 6 A schematic diagram of a processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0028] First, the terms that may be used in this article are explained as follows:
[0029] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0030] The cross-feature-scale intelligent video coding scheme provided by the present invention is described in detail below. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in the field. If no specific conditions are specified in the embodiments of the present invention, the conventional conditions in the field or the conditions recommended by the manufacturer shall be followed.
[0031] Embodiment 1
[0032] like Figure 1 As shown, a cross-feature scale intelligent video encoding method mainly includes the following steps:
[0033] Step 1: transform the reference frame into multiple feature scale spaces, and extract features from the reference frame of each feature scale space to obtain multi-scale reference features.
[0034] In the embodiment of the present invention, the reference frame is a previously reconstructed video frame, which serves as a prediction source.
[0035] In an embodiment of the present invention, a reference frame is transformed into multiple feature scale spaces through a feature pyramid network to obtain reference frames of multiple feature scale spaces; the reference frames of multiple feature scale spaces are input into a downsampling network (such as a downsampling convolution with a step size of 2) to obtain multi-scale reference features.
[0036] like Figure 2 As shown in Figure 1, examples of reference frames of three feature scale spaces obtained by transformation are shown. Assuming that the resolution of the reference frame is H*W, H and W are the length and width of the input video respectively, then Figure 2 The scales shown from top to bottom are H / 2*W / 2, H / 4*W / 4, and H / 8*W / 8. It should be noted that the specific scale size and the number of scales can be set according to actual conditions or experience; in addition, although the reference frame is usually RGB three-channel data, that is, the data format of H*W*3, the reference feature channel of the present invention can consider more dimensions, such as H / 2*W / 2*128.
[0037] Step 2: Concatenate the multi-scale reference features of the reference frame with the features of the current video frame to be encoded, and then implicitly generate and transmit motion information through an autoencoder. After the decoded motion information passes through a linear transformation layer, a cross-scale motion displacement vector and a cross-scale weight map are generated at the same time. The cross-scale motion displacement vector is sampled in the multi-scale reference features to obtain a multi-scale sampling result, and the multi-scale sampling result is weighted using the cross-scale weight map to obtain the prediction feature of the current encoded frame.
[0038] In the embodiment of the present invention, the original features of the reference frame can directly input the reference frame into the downsampling network, and the obtained features are the original features of the reference frame.
[0039] In an embodiment of the present invention, motion information can be encoded and transmitted by a motion information encoder (Motion Encoder / Decoder), and the motion information can be decoded by a motion information decoding end (Motion Decoder). The motion information passes through a linear transformation layer to generate a cross-scale motion displacement vector and a cross-scale weight map composed of the weight value of each sampling point.
[0040] like Figure 3 As shown in the figure, the point in the lower right corner of the L1, L2, and L3 scales is a visualization result of the motion displacement vector. They will sample multiple points in the multi-scale reference feature source to predict the features of the black dot in the rightmost part of the image.
[0041] In the above solution of the embodiment of the present invention, by learning the multi-scale features of the reference frame and the cross-scale weighted prediction technology, the prediction features of the current coded frame can be accurately obtained.
[0042] The above solution of the embodiment of the present invention is extremely effective for the prediction of a single reference frame, but can also be extended to the prediction of a larger number of reference frames.
[0043] Step 3: Calculate the residual of the feature dimension using the predicted features of the current coded frame, and reconstruct the current coded frame.
[0044] like Figure 4 As shown, the complete encoding process is demonstrated. represents the reference frame. represents multi-scale reference features; X t Indicates the current frame, that is, the video frame that needs to be encoded. t Indicates the current coded frame X tThe feature of (can be obtained through a commonly used downsampling network), Motion Encoder / Decoder is a motion encoder (for example, it can be implemented by the image encoder in the aforementioned document 2), is the output of Motion Encoder (encoding end of motion information), motion information M t is the output of Motion Decoder (the decoding end of motion information); motion information M t The cross-scale motion displacement vector and cross-scale weight map can be generated simultaneously by changing the channel dimension through a linear transformation layer. In other words, the motion information includes both the cross-scale motion vector and the cross-scale weight map. Since the cross-scale weight map can functionally control the accuracy of motion estimation through different feature scales, the cross-scale weight map here can also be considered as part of the motion information. If the motion is smooth, a higher estimation accuracy is required, and the corresponding weight value assigned to the high-resolution scale will be larger. After obtaining the motion displacement vector and the cross-scale weight map, the multi-scale reference feature map is combined to obtain the motion displacement vector and the cross-scale weight map. Perform cross-scale weighted prediction to obtain the predicted feature of the current coded frame. Its spatial resolution is usually H / 2*W / 2, which is the current coded frame X r Half the resolution. Afterwards, the predicted features of the current coded frame are used to calculate the residual of the feature dimension Obtain the decoded residual through the residual encoder / decoder Combined with the prediction features of the current coded frame Get reconstruction features Rebuild the feature Through the upsampling transformation network, the reconstructed video frame is obtained
[0045] The main core of the above scheme of the embodiment of the present invention is: 1) implicit transmission of motion information through motion codec. 2) Weighted prediction algorithm applicable to single reference frame. Innovatively construct multiple reference sources through single reference frame, implicitly transmit motion information, and obtain cross-scale motion displacement vector and cross-scale sampling weight map through decoded motion information at the same time, so as to realize content-adaptive video inter-frame prediction coding.
[0046] The above solution of the present invention is aimed at video encoding tasks, and uses an artificial intelligence network to perform motion modeling adaptively based on video content, so as to better utilize previous (decoded) video frames to predict the video frames to be encoded. Compared with the prior art, the above solution of the present invention mainly achieves the following beneficial effects:
[0047] 1) The present invention can construct prediction feature sources at different scales to better predict videos with different motion contents. For example, in areas with relatively gentle motion, it is more suitable to use reference feature sources with high resolution (features at L1 scale) for prediction. In areas with relatively intense motion or where there is no effective reference source, low-resolution reference feature sources (features at L3 scale) can be used to supplement, which can make up for the prediction error caused by high-resolution prediction.
[0048] 2) In the present invention, cross-scale motion vectors are transmitted, and can be sampled from multi-scale reference sources to generate a single-scale prediction result.
[0049] 3) In the present invention, the cross-scale prediction is guided by implicitly transmitting the cross-scale weight map, that is, a new weighted prediction mechanism in the single reference frame prediction scenario. Through this weighted prediction mechanism, we can fuse the sampling results at different scales to produce a prediction result that is more suitable for the video content.
[0050] In summary, the above solution provided by the embodiment of the present invention is suitable for intelligent video encoding tasks and can generate more content-adaptive prediction results.
[0051] Embodiment 2
[0052] The present invention also provides a cross-feature scale intelligent video coding system, which is mainly used to implement the method provided in the above embodiment, such as Figure 5 As shown, the system mainly includes:
[0053] A multi-scale reference feature extraction unit, used to transform the reference frame into multiple feature scale spaces, and extract features from the reference frame of each feature scale space to obtain multi-scale reference features;
[0054] A cross-scale weighted prediction unit is used to connect the multi-scale reference features of the reference frame with the features of the current coded frame, and then implicitly generate motion information through an autoencoder and transmit it, generate a cross-scale motion displacement vector and a cross-scale weight map after the decoded motion information passes through a linear transformation layer, sample the multi-scale reference features through the cross-scale motion displacement vector to obtain a multi-scale sampling result, and weight the multi-scale sampling result using the cross-scale weight map to obtain a prediction feature of the current coded frame;
[0055] The reconstruction unit is used to calculate the residual of the feature dimension using the prediction features of the current coding frame and reconstruct the current coding frame.
[0056] In the embodiment of the present invention, the step of transforming the reference frame into multiple feature scale spaces and extracting features from the reference frame in each feature scale space to obtain multi-scale reference features includes:
[0057] The reference frame is transformed into multiple feature scale spaces through a feature pyramid network to obtain reference frames of multiple feature scale spaces;
[0058] The reference frames of multiple feature scale spaces are input into the downsampling network to obtain multi-scale reference features.
[0059] In the embodiment of the present invention, the channel dimension of the motion information is changed through a linear transformation layer to generate a cross-scale motion displacement vector and a cross-scale weight map composed of the weight value of each sampling point.
[0060] In the embodiment of the present invention, the step of calculating the residual of the feature dimension by using the prediction feature of the current coded frame and reconstructing the current coded frame includes:
[0061] The residual of the feature dimension is calculated using the predicted features of the current coded frame:
[0062]
[0063] Among them, F t Indicates the current coded frame X t Features, Represents the prediction features of the current coded frame, R t represents the residual;
[0064] Obtain the decoded residual through the residual codec Combined with the prediction features of the current coded frame Get reconstruction features
[0065] Rebuild the feature Through the upsampling transformation network, the reconstructed video frame is obtained
[0066] Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0067] Embodiment 3
[0068] The present invention also provides a processing device, such as Figure 6As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided in the aforementioned embodiments.
[0069] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.
[0070] In the embodiment of the present invention, the specific types of the memory, input device and output device are not limited; for example:
[0071] The input device may be a touch screen, an image acquisition device, a physical button or a mouse, etc.;
[0072] The output device may be a display terminal;
[0073] The memory may be a random access memory (RAM) or a non-volatile memory, such as a disk memory.
[0074] Embodiment 4
[0075] The present invention also provides a readable storage medium storing a computer program, which implements the method provided in the above embodiment when the computer program is executed by a processor.
[0076] In the embodiment of the present invention, the readable storage medium is a computer-readable storage medium and can be set in the aforementioned processing device, for example, as a memory in the processing device. In addition, the readable storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk, etc., which can store program codes.
[0077] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A cross-feature scale intelligent video coding method, characterized in that: include: The reference frame is transformed into multiple feature scale spaces, and features are extracted from the reference frame of each feature scale space to obtain multi-scale reference features; The multi-scale reference features of the reference frame are linked to the features of the current coded frame, motion information is implicitly generated and transmitted through an autoencoder, a cross-scale motion displacement vector and a cross-scale weight map are generated through the decoded motion information, a multi-scale sampling result is obtained by sampling the multi-scale reference features through the cross-scale motion displacement vector, and the multi-scale sampling result is weighted by the cross-scale weight map to obtain the prediction feature of the current coded frame; Calculate the residual of the feature dimension using the predicted features of the current coded frame, and reconstruct the current coded frame; The step of transforming the reference frame into multiple feature scale spaces and extracting features from the reference frame in each feature scale space to obtain multi-scale reference features includes: The reference frame is transformed into multiple feature scale spaces through a feature pyramid network to obtain reference frames of multiple feature scale spaces; Input the reference frames of multiple feature scale spaces into the downsampling network to obtain multi-scale reference features; The generating a cross-scale motion displacement vector and a cross-scale weight map by using the decoded motion information comprises: Through the linear transformation layer, the channel dimension of the motion information is changed to generate a cross-scale motion displacement vector and a cross-scale weight map composed of the weight value of each sampling point.
2. The cross-feature-scale intelligent video encoding method according to claim 1, characterized in that: The step of calculating the residual of the feature dimension by using the prediction feature of the current coding frame and reconstructing the current coding frame includes: The residual of the feature dimension is calculated using the predicted features of the current coded frame: Among them, F t Indicates the current coded frame X t Features, Represents the prediction features of the current coded frame, R t represents the residual; Obtain the decoded residual through the residual codec Combined with the prediction features of the current coded frame Get reconstruction features Rebuild the feature Through the upsampling transformation network, the reconstructed video frame is obtained 3. A cross-feature scale intelligent video coding system, characterized in that: The system includes: A multi-scale reference feature extraction unit, used to transform the reference frame into multiple feature scale spaces, and extract features from the reference frame of each feature scale space to obtain multi-scale reference features; A cross-scale weighted prediction unit is used to connect the multi-scale reference features of the reference frame with the features of the current coded frame, implicitly generate motion information through an autoencoder and transmit it, generate a cross-scale motion displacement vector and a cross-scale weight map through the decoded motion information, sample the multi-scale reference features through the cross-scale motion displacement vector to obtain a multi-scale sampling result, and weight the multi-scale sampling results using the cross-scale weight map to obtain a prediction feature of the current coded frame; A reconstruction unit, used to calculate the residual of the feature dimension using the prediction feature of the current coding frame, and reconstruct the current coding frame; The step of transforming the reference frame into multiple feature scale spaces and extracting features from the reference frame in each feature scale space to obtain multi-scale reference features includes: The reference frame is transformed into multiple feature scale spaces through a feature pyramid network to obtain reference frames of multiple feature scale spaces; Input the reference frames of multiple feature scale spaces into the downsampling network to obtain multi-scale reference features; The generating a cross-scale motion displacement vector and a cross-scale weight map by using the decoded motion information comprises: Through the linear transformation layer, the channel dimension of the motion information is changed to generate a cross-scale motion displacement vector and a cross-scale weight map composed of the weight value of each sampling point.
4. The cross-feature-scale intelligent video coding system according to claim 3, characterized in that: The step of calculating the residual of the feature dimension by using the prediction feature of the current coding frame and reconstructing the current coding frame includes: The residual of the feature dimension is calculated using the predicted features of the current coded frame: Among them, F t Indicates the current coded frame X t Features, Represents the prediction features of the current coded frame, R t represents the residual; Obtain the decoded residual through the residual codec Combined with the prediction features of the current coded frame Get reconstruction features Rebuild the feature Through the upsampling transformation network, the reconstructed video frame is obtained 5. A processing device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 2.
6. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Video coding method and apparatus using multi-layer based weighted prediction
CN101208958A
Video coding with fine granularity spatial scalability
CN101366283A
