A 360-degree video inter-frame mode decision method based on deep learning

Using deep learning methods to make 360° video inter-frame mode decisions, skip redundant detection and optimization mode checks, solve the problem of high complexity of 360° video inter-frame encoding, achieve an efficient encoding process, and reduce computational complexity and Improved coding efficiency.

CN118018740BActive Publication Date: 2024-10-11CHENGDU DURHAM BRAND MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410208011.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-26
Publication Date
2024-10-11
Estimated Expiration
2044-02-26

AI Technical Summary

Technical Problem

When the existing technology processes 360° videos, the redundant detection process of inter-frame modes is complicated, resulting in low coding efficiency and difficulty in meeting the application needs of virtual reality technology.

Method used

A 360-degree video inter-frame mode decision-making method based on deep learning is adopted, using CNN and LNN neural networks for motion state prediction and mode decision-making, skipping unnecessary rate distortion checks, terminating and optimizing mode detection early, and reducing redundant mode detection.

Benefits of technology

The coding complexity is significantly reduced and the coding efficiency is improved. Experiments show that there is only a 2.07% coding efficiency loss while reducing the coding time by 50%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118018740B_ABST
    Figure CN118018740B_ABST
Patent Text Reader

Abstract

The present invention provides a 360-degree video inter-frame mode decision method based on deep learning, comprising: when the predicted probability that the motion state of a CU is a stationary state is greater than or equal to a first set threshold, skipping the rate-distortion check of an MMVD mode, a CIIP mode, an Affine mode, a GPM mode, an AMVP mode and an Intra mode; when the predicted probability that the motion state of a CU is a stationary state is greater than or equal to a second set threshold and less than the first set threshold, skipping the rate-distortion check of an MMVD mode, a CIIP mode, a GPM mode, an AMVP mode and an Intra mode; otherwise, after encoding a Merge mode and an Affine mode, performing early termination prediction to terminate the rate-distortion check of the remaining modes, otherwise performing optimal mode prediction; when the sum of the probabilities of the first few modes in the optimal mode list is greater than a fourth set threshold, terminating the rate-distortion check of the subsequent modes in the list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of video encoding, and in particular to a 360-degree video inter-frame mode decision method based on deep learning. Background Art

[0002] Panoramic video, also known as 360° video, is one of the technologies of immersive virtual reality video. It is usually shot by multiple cameras at multiple angles at the same time, and then the videos from different angles are stitched together using an image stitching algorithm. If the user uses a head-mounted display device, they can watch the panoramic video from all angles by turning their head to get the best viewing experience. 360° video has a wide range of applications in many fields, including virtual tourism, real-time sports event viewing, education and training, virtual reality movies, virtual real estate displays, etc.

[0003] In order to process 360° videos based on the processing and compression algorithms of traditional flat videos, it is necessary to convert 360° videos into flat videos. Currently, there are many mapping methods: Equi-rectangular projection (ERP), Cubemap projection (CMP), Octahedron projection (OHP), Segmented sphere projection (SSP), etc. Among them, ERP is one of the most commonly used mapping methods. After 360° videos are projected onto a 2D plane using the ERP projection format, the two poles are severely stretched, which may cause different features between 360° videos and traditional videos in these stretched areas. When the video compression method used on traditional videos is applied to 360° videos, the effect of video compression may be greatly reduced. And according to the general test conditions of 360° videos, compared with traditional videos, the resolution of 360° videos is 2-8 times that of traditional 1k, 2k flat videos, which also greatly increases the complexity of 360° video encoding.

[0004] The International Telecommunication Union and the International Organization for Standardization have developed a new video compression standard, VVC, which has targeted optimizations for standard dynamic range, high dynamic range, and 360° video, and supports 4K to 16K resolution and VR 360° video. Although the coding efficiency of VVC has been greatly improved compared to the previous generation HEVC, the comprehensive complexity of video coding in VVC's test software VTM has increased by more than ten times compared to HEVC's test software HM. One of the main reasons is that the VTM video encoder has added more mode detection in inter-frame coding, including Merge Mode, Merge Mode with Motion Vector Difference (MMVD), Combined Inter and Intra Prediction (CIIP), Affine Mode, Geometric Partitioning Mode (GPM), Advanced Motion Vector Prediction (AMVP), Intra Mode (AMVP), and more. Mode), etc. Among them, the standard VTM needs to calculate the rate-distortion cost (RDcost) for each mode during inter-frame detection, which is an extremely complex process. The ultra-high resolution of 360-degree video and the complexity of VVC encoding have brought challenges to the application of virtual reality technology. Therefore, how to simplify the redundant detection process of VVC inter-frame mode and speed up the inter-frame encoding speed of 360-degree video is an urgent problem to be solved. Summary of the invention

[0005] In order to solve the problems existing in the background technology, the present invention provides a 360-degree video inter-frame mode decision method based on deep learning, comprising:

[0006] S1: Before encoding the CTU, the CTU in the video frame is predicted to have a motion state using a CNN neural network to obtain a motion state of the coding unit CU; the motion state of the CU includes: static, pseudo-static and dynamic states;

[0007] S2: When the predicted probability that the motion state of the CU is a stationary state is greater than or equal to a first set threshold, the CU is in a stationary state, and the rate-distortion check of the MMVD mode, CIIP mode, Affine mode, GPM mode, AMVP mode, and Intra mode is skipped;

[0008] S3: When the predicted probability that the motion state of the CU is a stationary state is greater than or equal to the second set threshold and less than the first set threshold, the CU is in a pseudo-stationary state, and the rate-distortion check of the MMVD mode, CIIP mode, GPM mode, AMVP mode, and Intra mode is skipped;

[0009] S4: when the prediction result of the CU is a motion state, after encoding the Merge mode and the Affine mode, the first LNN neural network is used to perform early termination prediction; if the probability of early termination is greater than the third set threshold, the rate distortion check of the remaining modes is terminated, otherwise, step S5 is executed;

[0010] S5: Use the second LNN neural network to predict the optimal mode, sort all modes according to the prediction results, and obtain an optimal mode list; when the sum of the probabilities of the first few modes in the optimal mode list being the optimal mode is greater than the fourth set threshold, terminate the rate-distortion check of subsequent modes in the list.

[0011] Preferably, the motion state prediction using a CNN neural network includes:

[0012] Determine the latitude region where the coding tree unit CTU is located, and use different CNN neural networks to predict the motion state of the coding unit CU according to the different latitude regions where the coding tree unit CTU is located; the motion state prediction of the coding unit CU includes: the CTU is composed of 32×32 4×4 CUs, the coding tree unit CTU is input into the CNN neural network, and the motion state prediction results of 32×32 4×4 CUs are output; for CUs of different sizes, the motion state prediction result of the CU is obtained according to the motion state prediction result of the 4×4CU contained therein.

[0013] Preferably, determining the latitude region where the coding tree unit CTU is located comprises: calculating a stretch factor of the CTU according to the pixel coordinates of the center point of the CTU, and dividing the CTU into different latitude regions according to the stretch factor of the CTU;

[0014]

[0015] Among them, H represents the height of the video image frame, y represents the coordinate of the center point of CTU, π represents pi, α represents the stretching factor, and sec() represents the trigonometric function.

[0016] Preferably, the use of the first LNN neural network for early termination prediction includes: dividing the CU into five categories according to the size of the CU, setting early termination thresholds according to different CU categories, and terminating the rate-distortion check of the remaining modes when the early termination probability of the CU is greater than the set early termination threshold, wherein the input of the first LNN neural network is 10 features including the latitude, width, height, parent node mode PMode, rate-distortion cost RDcost of the current CU, quantization parameter QP, whether to use the Merge mode Merge_flag, whether to use the Skip mode Skip_flag, distortion dist and bits fracBits of the CU; and the output is the probability of early termination.

[0017] Preferably, in order to improve the accuracy of the model, an optimized loss function is designed for the first LNN neural network and the second LNN neural network, and the network is trained. The optimized loss function includes:

[0018] F=F1+F2

[0019]

[0020]

[0021] Among them, F represents the optimization loss function, y i represents the label of sample i, the positive class is 1 and the negative class is 0; p i Represents the probability that sample i is predicted as a positive class, RPP i Indicates the predicted current CU mode RDcost, RPM i Indicates the optimal mode RDcost of the current CU.

[0022] Preferably, the dividing the CU into five categories according to the size of the CU comprises:

[0023] The first type of CU includes: CUs with sizes of 128×128, 128×64 and 64×128; the second type of CU includes: CUs with sizes of 64×64, 32×32, 64×32, 32×64, 64×16 and 16×64; the third type of CU includes: CUs with sizes of 64×8, 8×64, 32×16 and 16×32; the fourth type of CU includes: 16×16, 16×8, 8×16, 8×8, 32×8 and 8×3 2; the fifth category CU includes: 64×4, 32×4, 16×4, 8×4, 4×64, 4×32, 4×16 and 4×8 CUs; ​​the early termination threshold for the first category CU is set to 0.75; the early termination threshold for the second category CU is set to 0.8; the early termination threshold for the third category CU is set to 0.7; the early termination threshold for the fourth category CU is set to 0.7; the early termination threshold for the fifth category CU is set to 0.8.

[0024] Preferably, the using the second LNN neural network to perform optimal mode prediction includes:

[0025] The eight features of CU Latitude, Width, Height, PMode, RDcost, QP, and fracBits are extracted as the input of the second LNN neural network, and the output of the second LNN neural network is the prediction result of the optimal mode.

[0026] The present invention has at least the following beneficial effects

[0027] The inter-frame decision acceleration algorithm based on the LNN model of the present invention does not bring a great time burden to the inter-frame coding; secondly, it makes full use of the characteristics of 360-degree video and innovatively uses CNN to train it according to the latitude of CTU; finally, it fully combines the time correlation of inter-frame coding to analyze the motion state of CU to perform different degrees of optimization, so as to avoid the original redundant mode detection process of the standard VTM, greatly reduce the number of modes that need to calculate RD cost, thereby greatly reducing the calculation complexity in the encoding process and improving the encoding efficiency; experiments show that compared with the standard VTM encoder, the present invention has only a 2.07% BDBR coding efficiency loss while reducing the encoding time by 50%. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0029] Figure 2 This is a statistical diagram of the distribution of some CU inter-frame modes of the present invention;

[0030] Figure 3 This is a statistical diagram of the predicted static CU mode proportion data;

[0031] Figure 4 It is a schematic diagram of the structure of the first LNN neural network of the present invention;

[0032] Figure 5 Schematic diagram of the structure of the second LNN neural network of the present invention. DETAILED DESCRIPTION

[0033] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0034] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0035] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0036] See also Figure 1 , 360-degree video requires 4K or 8K or even higher resolution to support its wide field of view. At the same time, the newly introduced multi-tree partitioning of VVC and more types of complex inter-frame mode detection further increase the inter-frame coding complexity of 360-degree video in VVC. In order to reduce the inter-frame coding complexity of 360-degree video, the present invention provides a 360-degree video inter-frame mode decision method based on deep learning, which avoids the redundant mode detection process of the original VTM, including:

[0037] S1: Before encoding the CTU, the CTU in the video frame is predicted to have a motion state using a CNN neural network to obtain a motion state of the coding unit CU; the motion state of the CU includes: static, pseudo-static and dynamic states;

[0038] Preferably, the motion state prediction using a CNN neural network includes:

[0039] Determine the latitude region where the coding tree unit CTU is located, and use different CNN neural networks to predict the motion state of the coding unit CU according to the different latitude regions where the coding tree unit CTU is located; the motion state prediction of the coding unit CU includes: the CTU is composed of 32×32 4×4 CUs, the coding tree unit CTU is input into the CNN neural network, and the motion state prediction results of 32×32 4×4 CUs are output; for CUs of different sizes, the motion state prediction result of the CU is obtained according to the motion state prediction result of the 4×4CU contained therein.

[0040] Determining the latitude region where the coding tree unit CTU is located includes: calculating a stretch factor of the CTU according to the pixel coordinates of the center point of the CTU, and dividing the CTU into different latitude regions according to the stretch factor of the CTU;

[0041]

[0042] Among them, H represents the height of the video image frame, y represents the coordinate of the center point of CTU, π represents pi, α represents the stretching factor, and sec() represents the trigonometric function.

[0043] In the 360-degree video using ERP projection in this embodiment, in the polar region, the pixel is stretched from a point to a line, while in the equatorial region, the pixel is hardly stretched, that is, the stretching degree of different regions is very different, and different degrees of stretching also affect the selection of the division mode. In order to quantify the stretching degree of each region, this embodiment introduces a stretching factor α, where lat represents latitude, y represents the coordinate of the pixel, and H represents the height of the video image frame, then α can be expressed as a formula:

[0044]

[0045] Before encoding, the 360-degree video needs to be downsampled to reduce its resolution to 4432x2216, and upsampled at the decoding end to restore its resolution. Therefore, each frame of the 360-degree video contains at most 17 rows of CTUs, and the stretch factor of each row of CTU can be obtained according to formula (1). Since adjacent CUs have similar stretch factors within a CTU, this embodiment divides the image into different latitude categories according to CTU, as shown in Table 1:

[0046] Table 1 Stretch factors corresponding to CTU at each latitude

[0047] Latitude α 0 10.836 1 3.654 2 2.243 3 1.659 4 1.353 5 1.176 6 1.072 7 1.017 8 1 9 1.017 10 1.072 11 1.176 12 1.353 13 1.659 14 2.243 15 3.654 16 10.836

[0048] In Table 1, the first column Latitude indicates the number of rows of CTU, and the second column α is the stretching factor of the corresponding row CTU. Since the latitude of the polar region is π / 2, the corresponding α is an infinite number, so the y coordinate of the middle position of the CTU is used to calculate α in the embodiment of the present invention; it can be seen from Table 1 that the stretching factors α of Latitude 0 and 16 are the same, so the CTUs with Latitude 0 and 16 are classified into the same latitude category; the stretching factors α of Latitude 1, 2, 14 and 15 are not much different, so in this embodiment, the CTUs with Latitude 1, 2, 14 and 15 are classified into the same latitude category; similarly, the CTUs with Latitude 3, 4, 12 and 13 are classified into the same latitude category; the CTUs with Latitude 5 to 11 are classified into the same latitude category;

[0049] The VTM video encoder adds more mode detection in inter-frame coding, including Merge mode, MMVD mode, CIIP mode, Affine mode, GPM mode, AMVP mode, IntraMode, etc.; Among them, Merge mode, MMVD mode and CIIP mode belong to the modes of detecting RDcost within the same function; therefore, when analyzing the complexity of each mode, this embodiment combines Merge, MMVD and CIIP to calculate the complexity; the average time spent by the 32x32CU block in detecting each mode is statistically calculated and analyzed, and the proportion of each average value is calculated, and the experimental results shown in Table 2 are obtained:

[0050] Table 2 Mode complexity ratio

[0051]

[0052] As can be seen from Table 2, the AMVP mode is the most complex, while Affine and GPM are relatively simple. The extended Merge mode is a combination of the complexity of the three modes, which is equivalent to the complexity of the Intra mode. After analyzing the complexity of the modes, the proportion of local optimal modes is further counted. Figure 2 As shown, from Figure 2 Merge / Skip indicates the combined statistics of Merge, Skip, MMVD and CIIP, and Geo indicates the geometric mode GPM. As can be seen from the figure, blocks of different sizes have their own unique distribution characteristics. Therefore, this embodiment comprehensively considers the block size and mode distribution and divides the CU into five types of CU blocks. The specific classification is as follows.

[0053] The embodiment of the present invention is aimed at inter-frame coding, so it is necessary to consider the temporal correlation to help reduce the coding complexity. Therefore, this embodiment uses the brightness pixel difference between the reference frame and the current frame, and calculates the average value of the 4x4 CU block difference. If it is less than the set threshold 2, it is considered that the current 4×4CU block is a static block, otherwise it is a motion block, and the CU is divided to generate a training set to train the CNN model. Since the 360-degree video has different degrees of stretching in the horizontal direction, different CNN models are trained according to different latitude regions of CTU in the embodiment of the present invention; the input of the CNN model is a 128×128CTU block in the 0-16 latitude region, and the output is a static prediction result of 32x32 4×4CU blocks of 2 categories. According to the prediction results of the 4×4CU blocks, different sizes are obtained by weighted summation. The prediction result of CU, for example, an 8×8 CU block is composed of 4 4×4 CUs. Assuming that 3 of the 4 4×4 CUs are predicted to be stationary (the probability of the stationary state is 0.8, and the probability of the moving state is 0.2), and 1 4×4 CU is predicted to be moving (the probability of the stationary state is 0.4, and the probability of the moving state is 0.6), then the probability of the 8×8 CU block being stationary is ((0.8×3+0.4×1)÷4=0.7), 0.7 is less than the second set threshold set by the present invention, then the 8×8 CU block is considered to be a moving state CU. Among them, some parameter settings of each CNN model are shown in Table 3, and the loss function uniformly uses the cross entropy loss function. Other parameters can refer to the schematic diagram of the CNN network structure;

[0054] Table 3 Network data parameters in different latitude areas

[0055] Latitude Kernel-size Padding 0,16 1x10 0x4 1,2,14,15 2x5 0x2 3,4,12,13 2x3 0x1 5,6,7,8,9,10,11 2x2 0x0

[0056] In Table 3, Kernel-size indicates the type of convolution kernel in the CNN network, and Padding indicates the type of padding. At the same time, this embodiment uses the trained CNN model to re-perform a statistical analysis of the mode proportion data. The data shows the mode proportion when the CU block is in a static state, such as Figure 3 As shown, from Figure 3It can be observed that the static CU almost always selects the extended Merge mode or the Affine mode, and other modes are rarely selected as the optimal mode. In the extended Merge mode, the static CU rarely selects the MMVD mode, the CIIP mode, and the Affine mode, and almost always selects the normal Merge mode and the Skip mode. Therefore, the complexity reduction optimization is performed on the predicted static CU block. The specific scheme is as follows: when the predicted probability that the motion state of the CU is a static state is greater than or equal to a first set threshold (the value is 0.95 in the embodiment of the present invention), the CU is a static state. When the predicted probability that the motion state of the CU is a stationary state is greater than or equal to the second set threshold (the value is 0.75 in the embodiment of the present invention) and less than the first set threshold (0.95), the CU is in a pseudo-stationary state, and the rate-distortion check of the MMVD mode, CIIP mode, GPM mode, AMVP mode and Intra mode is skipped; in other cases, the CU block is considered to be a motion block and no optimization is performed. The specific experimental results are shown in Table 4:

[0057] Table 4 Experimental results of motion state prediction scheme

[0058]

[0059]

[0060] It can be seen from Table 4 that since the motion state prediction scheme almost only optimizes the complexity of static blocks, it is often difficult to achieve good experimental performance for sequences with higher complexity. Therefore, this embodiment continues to optimize the motion CU blocks that are not optimized by the motion state prediction scheme;

[0061] See also Figure 5 , S4: When the prediction result of the CU is a motion state, after encoding the Merge mode and the Affine mode, the first LNN neural network is used to perform early termination prediction; if the probability of early termination is greater than the third set threshold, the rate distortion check of the remaining modes is terminated, otherwise, step S5 is executed;

[0062] By observation Figure 2It can be seen that the yellow background data indicates that the encoder will not calculate the rate-distortion cost of this CU block in this mode, and the green background data indicates that this mode is a mode with relatively low complexity and a high proportion. Therefore, this embodiment proposes to use a shallow neural network LNN to make an early termination judgment after the CU detects the mode represented by the green background to reduce the complexity of mode detection. In this embodiment, the latitude Latitude, width Width, height Height, parent node mode PMode, current CU rate-distortion cost RDcost, quantization parameter QP, whether to use Merge mode Merge_fl of the current CU block are extracted. ag, whether to use Skip mode Skip_flag, distortion dist and bits fracBits, these 10 features are used as the training features of the first LNN neural network for mode early termination prediction. These features have a greater impact on data distribution. Among them, Width, Height, RDcost, QP, Merge_flag, Skip_flag, dist and fracBits are encoder custom data. Other non-encoder custom features can be simply converted, saved and obtained. When obtaining features for prediction, the complexity is almost negligible. The specific feature introduction is shown in Table 5;

[0063] Table 5 Feature introduction

[0064]

[0065]

[0066] In order to improve the accuracy of the model, an optimization loss function is designed for the first LNN neural network, and the first LNN neural network is trained. The optimization loss function includes:

[0067] F=F1+F2

[0068]

[0069]

[0070] Among them, y i Indicates the label of sample i, the positive class is 1 and the negative class is 0; p i Represents the probability that sample i is predicted as a positive class, RPP i Indicates the predicted current CU mode RDcost, RPM i It represents the best mode RDcost of the current CU. Obviously, when the prediction is inaccurate, the optimization loss function will increase according to the difference of RDcost.

[0071] The classification of CU into five categories according to the size of CU includes:

[0072] The first category of CUs includes: CUs with sizes of 128×128, 128×64 and 64×128; the second category of CUs includes: CUs with sizes of 64×64, 32×32, 64×32, 32×64, 64×16 and 16×64; the third category of CUs includes: CUs with sizes of 64×8, 8×64, 32×16 and 16×32; the fourth category of CUs includes: CUs with sizes of 16×16, 16×8, 8×16, 8×8, 32×8 and 8×32; the fifth category of CUs includes: The early termination threshold is set to 0.75 for the first type of CU; the early termination threshold is set to 0.8 for the second type of CU; the early termination threshold is set to 0.7 for the third type of CU; the early termination threshold is set to 0.7 for the fourth type of CU; the early termination threshold is set to 0.8 for the fifth type of CU. Finally, the experimental data of this scheme to optimize the coding complexity are shown in Table 6:

[0073] Table 6. Experimental results of early termination of LNN mode

[0074]

[0075] It can be seen from Table 6 that although the mode early termination LNN can be further optimized following the motion state prediction CNN solution, the optimization degree is obviously not high enough from the experimental results. This is probably because there are still a large number of CUs that do not terminate the mode detection early. Therefore, this embodiment continues to optimize in depth.

[0076] See also Figure 5 , S5: Use the second LNN neural network to predict the optimal mode, sort all modes according to the prediction results, and obtain the optimal mode list; when the sum of the probabilities that the first few modes in the optimal mode list are the optimal modes is greater than the fourth set threshold, the rate-distortion check of the subsequent modes in the list is terminated.

[0077] This embodiment proposes that the second LNN neural network predicts the optimal possible mode for the current CU, sorts the possible results of the prediction to obtain an optimal mode list, and when the sum of the probabilities of the first few modes in the list is greater than the fourth set threshold (0.95 in this embodiment), the possibility of the remaining modes is relatively small, and the possibility of their detection is greatly reduced. When these impossible modes are skipped, the encoding complexity can be reduced. Specifically, this embodiment uses 8 features of Latitude, Width, Height, PMode, RDcost, QP, and fracBits to train the second LNN neural network; since the Merge mode and Affine mode have been checked before, when the sum of the probabilities of the first few items in the optimal mode list is greater than 0.95, the check of the last few modes in the optimal mode list is terminated. At the same time, in order to improve the accuracy of the network, the same optimization loss function as the first LNN neural network will continue to be used.

[0078] The 360-degree video inter-frame mode in the embodiment of the present invention is completed, and a complete optimization scheme is implemented for the mode detection of the inter-frame CU block to obtain the final experimental data, as shown in Table 7:

[0079] Table 7 Comprehensive experimental data results

[0080]

[0081] From the experimental results, we can see that the maximum complexity reduction effect is 67.6%, and the minimum complexity reduction effect can reach 33.4. Overall, the average complexity reduction effect can reach 50%, and the BDBR loss is only 2.07%.

[0082] The test conditions for this experimental result are: VTM14.1+360Lib13.1+Intel(R)Core(TM)i5-10500CPU@3.10GHz, and the standard used for BDBR evaluation index is Y-WSPSNR.

[0083] In summary, the inter-frame decision acceleration algorithm based on the LNN model of the present invention does not bring a great time burden to the inter-frame coding; secondly, it makes full use of the characteristics of 360-degree video and innovatively uses CNN for training according to the latitude of CTU; finally, it fully combines the time correlation of inter-frame coding to analyze the motion state of CU to perform different degrees of optimization, so as to avoid the original redundant mode detection process of the standard VTM, greatly reduce the number of modes that need to calculate RD cost, thereby greatly reducing the computational complexity in the encoding process and improving the encoding efficiency; experiments show that compared with the standard VTM encoder, the present invention reduces the encoding time by 50%, with only 2.07% BDBR coding efficiency loss.

[0084] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A 360-degree video inter-frame mode decision method based on deep learning, characterized in that: include: S1: Before encoding the coding tree unit CTU, the CTU in the video frame is predicted using the CNN convolutional neural network to obtain the motion state of the coding unit CU; The motion state of the CU includes: static, pseudo-static and motion state; The method of using the CNN convolutional neural network to predict the motion state includes: Determine the latitude region where the coding tree unit CTU is located, and use different CNN convolutional neural networks to predict the motion state of the coding unit CU according to the different latitude regions where the coding tree unit CTU is located; the motion state prediction of the coding unit CU includes: the CTU is composed of 32×32 4×4 CUs, the coding tree unit CTU is input into the CNN convolutional neural network, and the motion state prediction results of 32×32 4×4 CUs are output; for CUs of different sizes, the motion state prediction result of the CU is obtained according to the motion state prediction results of the 4×4CUs contained therein; different CNN convolutional neural networks have different convolution kernel types and filling types; Determining the latitude region where the coding tree unit CTU is located includes: calculating a stretch factor of the CTU according to the pixel coordinates of the center point of the CTU, and dividing the CTU into different latitude regions according to the stretch factor of the CTU; in, Indicates the height of the video image frame, y indicates the coordinate of the center point of CTU, represents pi, represents the stretch factor, represents trigonometric functions; Indicates the latitude of CTU; S2: When the prediction probability that the motion state of the CU is a stationary state is greater than or equal to a first set threshold, the CU is in a stationary state, and the rate-distortion check of the merge mode MMVD mode with motion vector difference, the hybrid intra-frame inter-frame prediction CIIP mode, the affine mode Affine mode, the geometric partitioning mode GPM mode, the advanced motion vector prediction AMVP mode, and the intra-frame mode Intra mode is skipped; S3: When the predicted probability that the motion state of the CU is a stationary state is greater than or equal to the second set threshold and less than the first set threshold, the CU is in a pseudo-stationary state, and the rate-distortion check of the MMVD mode, CIIP mode, GPM mode, AMVP mode, and Intra mode is skipped; S4: when the prediction result of the CU is a motion state, after encoding the merge mode and the affine mode, the first lightweight neural network LNN neural network is used to perform early termination prediction; if the probability of early termination is greater than the third set threshold, the rate distortion check of the remaining modes is terminated, otherwise, step S5 is executed; The method of using the first LNN neural network to perform early termination prediction includes: dividing the CU into five categories according to the size of the CU, setting early termination thresholds according to different categories of the CU, and terminating the rate-distortion check of the remaining modes when the early termination probability of the CU is greater than the set early termination threshold, wherein the input of the first LNN neural network is 10 features including the latitude, width, height, parent node mode, RDcost, quantization parameter, QP, whether to use the Merge mode, whether to use the Skip mode, dist, and fracBits of the CU; the output is the probability of early termination; The classification of CU into five categories according to the size of CU includes: The first type of CU includes: CUs with sizes of 128×128, 128×64 and 64×128; the second type of CU includes: CUs with sizes of 64×64, 32×32, 64×32, 32×64, 64×16 and 16×64; the third type of CU includes: CUs with sizes of 64×8, 8×64, 32×16 and 16×32; the fourth type of CU includes: 16×16, 16×8, 8×16, 8×8, 32×8 and 8×3 2; the fifth category of CUs includes: 64×4, 32×4, 16×4, 8×4, 4×64, 4×32, 4×16 and 4×8 CUs; ​​the early termination threshold for the first category of CUs is set to 0.75; the early termination threshold for the second category of CUs is set to 0.8; the early termination threshold for the third category of CUs is set to 0.7; the early termination threshold for the fourth category of CUs is set to 0.7; the early termination threshold for the fifth category of CUs is set to 0.8; S5: using the second lightweight neural network LNN neural network to predict the optimal mode, sorting all modes according to the prediction results to obtain an optimal mode list; when the sum of the probabilities of the first few modes in the optimal mode list being the optimal mode is greater than the fourth set threshold, the rate distortion check of the subsequent modes in the list is terminated; The optimal mode prediction using the second LNN neural network includes: Extract the 8 features of CU Latitude, Width, Height, PMode, RDcost, QP, and fracBits as the input of the second LNN neural network. The output of the second LNN neural network is the prediction result of the optimal mode. In order to improve the accuracy of the model, an optimized loss function is designed for the first LNN neural network and the second LNN neural network to train the network. The optimized loss function includes: in, represents the optimization loss function, Representation sample The label label of the positive class is 1 and the negative class is 0; Representation sample The probability of predicting the positive class, Indicates the predicted mode RDcost of the current CU, Represents the best mode RDcost of the current CU, and N represents the number of samples.