A fast intra-frame segmentation method for multi-scale 360-degree video

By building and training a CU division mode prediction model to predict the division mode within a 360-degree video frame, the problem of slow 360-degree video encoding is solved and fast encoding and high efficiency are achieved.

CN118400528BActive Publication Date: 2024-10-18HEFEI WELLHUI INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410224459.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2024-10-18
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

The ultra-high resolution of 360-degree video and the complexity of VVC encoding result in slow encoding speed, which hinders the widespread application of virtual reality technology.

Method used

Construct and train the division mode prediction model of CU under different sizes and different latitude categories. Use CNN to predict the division mode of CU to reduce RD cost calculation. Use multi-level threshold selection method to determine the optimal division mode and avoid the original division mode selection process of VTM. .

Benefits of technology

The encoding time is significantly reduced, the BDBR loss is only increased by 2.33%, the encoding efficiency is improved, and fast encoding of 360-degree videos is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400528B_ABST
    Figure CN118400528B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of video coding, and in particular to a multi-scale 360-degree video frame intra-fast segmentation method, comprising constructing and training a segmentation mode prediction model of a CU in different sizes and different latitude categories; obtaining a brightness component image of an image frame to be processed, and performing segmentation processing on the brightness component image to obtain 8 target CUs; ​​selecting a corresponding segmentation mode prediction model according to the size and latitude category of each target CU, and calculating a probability value of each target CU selecting each segmentation mode; based on the probability value, determining the optimal segmentation mode of each target CU by a multi-level threshold selection method; the present invention reduces the number of modes for which RD cost needs to be calculated, thereby reducing the calculation complexity in the encoding process and improving the encoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video coding, and in particular to a multi-scale 360-degree video frame intra-frame fast segmentation method. Background Art

[0002] 360-degree video is a form of video that shows a scene in an all-round view, allowing viewers to view content in all directions. Unlike traditional videos, 360-degree videos capture the entire surround scene and present it to viewers through virtual reality headsets, smartphones, computers, or other devices that support 360-degree viewing. 360-degree video allows viewers to no longer be limited to a single perspective. By using the corresponding equipment, users can freely rotate and tilt the perspective to experience a panoramic viewing experience as if they were in the actual scene. 360-degree 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. However, the wide field of view of 360-degree video requires the support of 4K or even 8K resolution, which greatly increases the amount of data in 360-degree video.

[0003] ERP (Equirectangular Projection) is a commonly used projection method for mapping 360-degree videos onto a plane, usually a rectangle, which allows 360-degree videos to be encoded, stored, and transmitted in standard 2D video formats. ERP provides a simple and intuitive way to represent 360-degree videos, but it stretches pixels during the projection process, introducing distortion, which greatly affects the encoding process of 360-degree videos.

[0004] VVC (Versatile Video Coding) is an advanced video coding standard, which was jointly developed by the International Telecommunication Union (ITU-T) and the International Organization for Standardization (ISO). VVC aims to replace the previous generation video coding standard HEVC (High Efficient Video Coding) to provide higher compression efficiency and better video quality. One of the main goals of VVC is to improve the compression efficiency of video coding, that is, to provide higher quality video at a given bit rate. To achieve this goal, VVC introduces a series of advanced coding techniques, including more complex motion estimation, transformation and prediction methods, and more efficient entropy coding methods. VVC also provides a series of new coding tools to make the encoder more flexible and scalable. This includes more prediction modes, transform size and depth options, making VVC more suitable for various video coding scenarios. In addition, VVC introduces a new coding structure called QTMT (Quad Tree with nested Multi-type Tree), which can be divided into two parts, namely QT and MT. QT stands for quadtree partitioning, which is the partitioning method adopted by HEVC, dividing the CU into 4 sub-CUs. MT includes binary tree partition (BT) and ternary tree partition (TT). BT and TT include horizontal partition (BTH, TTH) and vertical partition (BTV, TTV) respectively. They are new partitioning methods added by VVC, which enable VVC to have flexible CU size and be able to handle various complex video contents. However, the selection of the partitioning mode in VVC is to calculate the RD cost of all modes and then select the mode corresponding to the minimum value as the optimal partitioning mode. This is a very complex calculation process, which consumes a lot of time.

[0005] The ultra-high resolution of 360-degree videos and the encoding complexity of VVC itself have greatly hindered the widespread application of virtual reality technology. Therefore, how to simplify the selection process of VVC partition mode and speed up the encoding speed of 360-degree videos is an urgent problem to be solved. Summary of the invention

[0006] To solve the above problems, the present invention provides a multi-scale 360-degree video frame fast segmentation method, which is characterized by comprising the following steps:

[0007] S1. Build and train the prediction model of CU partitioning pattern in different sizes and latitude categories;

[0008] S2. Obtain a brightness component image of the image frame to be processed, and segment the brightness component image to obtain 8 target CUs;

[0009] S3. Select the corresponding partition mode prediction model for each target CU size and latitude category, and calculate the probability value of each target CU selecting each partition mode;

[0010] S4. Based on the probability value, determine the optimal partitioning mode of each target CU through a multi-level threshold selection method.

[0011] Furthermore, step S1 constructs and trains a prediction model for the partitioning pattern of CUs in different sizes and different latitude categories, including:

[0012] S11. Based on the four latitude categories and eight CU sizes, a partitioning pattern prediction model under 28 different sizes and different latitude categories is constructed;

[0013] S12. Obtain 360-degree video data, and use the standard encoder VTM-14.1 to encode the 360-degree video data to obtain training data, wherein the training data includes CUs of different sizes, and each CU carries an optimal partitioning mode label and a latitude category label;

[0014] S13. For each partitioning pattern prediction model, the training data obtained in step S12 is used for training, and the training loss is calculated using the overall loss function.

[0015] Furthermore, in step S11, the prediction model structure of the partitioning mode of different CU sizes of the same latitude category is the same:

[0016] The partitioning pattern prediction model belonging to the first latitude category includes a first convolution module, a flatten layer, and two fully connected layers cascaded in sequence; the first convolution module includes three first convolution units cascaded and one 4×4 convolution layer, and the first convolution unit includes one 8×3 convolution layer and one 3×3 convolution layer;

[0017] The partitioning pattern prediction model belonging to the second latitude category includes a second convolution module, a flatten layer, and two fully connected layers cascaded in sequence; the second convolution module includes three second convolution units cascaded and one 4×4 convolution layer, and the second convolution unit includes one 8×5 convolution layer and one 3×3 convolution layer;

[0018] The partitioning pattern prediction model belonging to the third latitude category includes a third convolution module, a flatten layer and two fully connected layers cascaded in sequence; the third convolution module includes three third convolution units cascaded, two 3×3 convolution layers and one 4×4 convolution layer, and the third convolution unit includes one 4×3 convolution layer and one 3×3 convolution layer;

[0019] The division pattern prediction model belonging to the fourth latitude category includes a fourth convolution module, a flatten layer and two fully connected layers cascaded in sequence; the fourth convolution module includes three cascaded fourth convolution units, two 3×3 convolution layers and one 4×4 convolution layer, and the first convolution unit includes one 4×4 convolution layer and one 3×3 convolution layer.

[0020] Furthermore, the overall loss function in step 13 includes two parts: a cross entropy loss function and an RDloss function, which are weighted and summed by a balance factor; the overall loss function L is expressed as:

[0021] L=L1+β·L2

[0022] Among them, L1 represents the cross entropy loss function, L2 represents the RDloss function, and β represents the balance factor.

[0023] Furthermore, the calculation formula of the cross entropy loss function is:

[0024]

[0025] γ=η×α

[0026] Among them, N represents the total number of CU samples, M represents the total number of division modes, γ represents the scale factor, and y ij Indicates the true label of the i-th CU sample selecting the j-th partitioning mode, p ij It represents the predicted probability of the i-th CU sample selecting the j-th partitioning mode, η is the balance coefficient, α represents the stretching factor, and pt represents the scaling factor.

[0027] Furthermore, the calculation formula of the RDloss function is:

[0028]

[0029] Among them, N represents the total number of CU samples, M represents the total number of partition modes, and y ij Indicates the true label of the i-th CU sample selecting the j-th partitioning mode, rd ij represents the RD cost of the i-th CU sample selecting the j-th partitioning mode, rd imax represents the maximum RD cost of the i-th CU sample, rd imin represents the minimum RD cost of the i-th CU sample, and α represents the stretching factor.

[0030] Furthermore, step S4 determines the optimal partitioning mode of any target CU by a multi-level threshold selection method, including:

[0031] S41. Obtain the probability value of the target CU selecting each partition mode, and arrange all probability values ​​in descending order according to their numerical values;

[0032] S42. Determine whether the maximum probability value is greater than the first level threshold. If so, the target CU selects the division mode corresponding to the maximum probability value for division. If not, proceed to step S43.

[0033] S43. Calculate the sum of the first n = 2, 3, ..., M probability values, and determine whether the sum is greater than the nth level threshold. If so, execute step S44. If not, set n = n + 1 and re-execute step S43; where M is the total number of division modes;

[0034] S44. Determine the m partitioning modes corresponding to the first n probability values, calculate the RD cost of each partitioning mode, and select the partitioning mode corresponding to the minimum RD cost for the target CU for partitioning.

[0035] Beneficial effects of the present invention:

[0036] The present invention provides a multi-scale 360-degree video frame fast segmentation method based on CNN. First, a CNN model that can predict the CU segmentation mode is obtained through a large amount of training. Then, based on these models, the CU segmentation mode is predicted before the encoder performs encoding, thereby avoiding the original segmentation mode selection process of VTM, greatly reducing the number of modes that need to calculate RD cost, thereby reducing the computational complexity in the encoding process and improving the encoding efficiency. Experiments show that compared with the standard encoder, the present invention only increases the BDBR loss by 2.33% while reducing the encoding time by 72.74%. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flow chart of the method of the present invention;

[0038] Figure 2 This is a distribution diagram of CU division modes under each LC in an embodiment of the present invention;

[0039] Figure 3 Schematic diagram of the network structure of 32×32 CUs in each LC in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 scope of protection of the present invention.

[0041] 360-degree video requires 4K or even 8K resolution to support its wide field of view, and the newly introduced QTMT of VVC further increases its encoding complexity. In order to reduce the encoding complexity of 360-degree video, the present invention proposes a multi-scale 360-degree video intra-frame fast segmentation method, which avoids the original segmentation selection process of VTM.

[0042] A multi-scale 360-degree video frame fast segmentation method, such as Figure 1 As shown, the following steps are included:

[0043] S1. Build and train CU partition pattern prediction models in different sizes and dimensional categories.

[0044] Specifically, step S1 includes:

[0045] S11. Based on the four latitude categories and eight CU sizes, a partitioning pattern prediction model for 28 different sizes and latitude categories is constructed.

[0046] Specifically, the present invention mainly relates to eight CU sizes, namely, 32×32, 32×16, 32×8, 32×4, 16×16, 16×8, 16×4 and 8×8.

[0047] Specifically, each frame of a 360-degree video is projected by ERP to form a 2D projection image. The pixels in the polar region of the 2D projection image are stretched from a point to a line, while the pixels in the equatorial region are hardly stretched, that is, the stretching degree of the pixels in different regions is very different, and the different stretching degrees also affect the selection of the division mode. In order to quantify the stretching degree of each region, the present invention introduces a stretching factor α. At the same time, according to the common test conditions (CTC) of 360-degree videos, the resolution of 360-degree videos includes 8192×4096 and 6144×3072, but the 360-degree video needs to be downsampled to reduce its resolution to 4432×2216 before encoding, and then the decoding end restores its resolution by upsampling. Therefore, the 2D projection image formed by each frame of the 360-degree video after downsampling contains at most 2216 / 128=17 CTU rows (each CTU row includes multiple CTUs, and the stretching factors of multiple CTUs in the same CTU row are similar), and the extra part less than 128 is not predicted by the model. Adjacent CUs within a CTU have similar stretching factors. Therefore, the CUs can be subdivided into different latitude types (LC, lat class) based on the latitude position and stretching factor for subsequent processing.

[0048] Among them, the stretch factor calculation formula can be expressed as:

[0049]

[0050]

[0051] α represents the stretching factor, lat represents the latitude of the pixel, y represents the ordinate of the pixel, and H represents the height of the 2D projection image where the pixel is located.

[0052] ERP projection will be stretched to different degrees at different latitudes. When classifying latitude types, the present invention classifies latitudes with similar stretching degrees into one category, that is, classifies latitudes with similar stretching factors into one category. Specifically, the embodiment of the present invention first calculates the stretching factor of each CTU row based on the CTU behavior as a whole, and converts CTU rows with similar stretching factors into one latitude category, and divides into 4 latitude types, as shown in Table 1:

[0053] Table 1

[0054]

[0055] The first column indicates the number of CTU rows in the 2D projection image to which it belongs, the second column indicates the stretching factor of the CTU row, and the third column is the latitude type. Since the latitude of pixels in the polar region is π / 2, and their corresponding α is infinite, the stretching factor of each CTU row is calculated using the center pixel of the CTU row. CUs are divided into latitude types according to their positions in the 2D projection image to which they belong according to the standards in Table 1. The stretching factors in Table 1 are only to assist in the division of latitude types. The stretching factors used in subsequent training do not use the fixed values ​​calculated in Table 1. CUs of different sizes and latitude types will calculate the corresponding stretching factors according to the above formula.

[0056] Specifically, the QTMT structure in VTM can be flexibly divided, and it supports up to 6 division modes, including no division, binary horizontal division (BTH), binary vertical division (BTV), ternary horizontal division (TTH), ternary vertical division (TTV) and quadrilateral division (QT). In order to study the influence of stretching and CU size on the selection of division mode, the present invention counts the distribution of division modes of CUs of different sizes under each latitude type, such as Figure 2 As shown, from Figure 2 We observed that:

[0057] 1) In different LCs, the distribution of partitioning patterns of CUs of the same size is significantly different. In the same LC, the distribution of partitioning patterns of CUs of different sizes is also different. Therefore, we design different networks for each LC and CU size.

[0058] 2) The larger the stretch factor, the higher the proportion of CU selecting horizontal partitioning (including BTH and TTH), and vice versa. This is because the larger the stretching degree, the more redundant information the CU contains in the horizontal direction. Therefore, we design different convolution kernels according to the stretch factor to predict the candidate partitioning mode.

[0059] It is worth noting that since our classifier cannot distinguish between binary tree partition (BT) and ternary tree partition (TT) well, we combine BT and TT into one category, that is, combine BTH and TTH into horizontal partition, and combine BTV and TTV into vertical partition, so the partition mode is reduced from 6 categories to 4 categories. In addition, in order to minimize the number of models, we regard the CU and its transposed CU as the same type of CU, for example, 32×16 and 16×32 CUs are predicted using the 32×16 model. In addition, the number of partition mode prediction models is not 32 because in the first latitude category, the probability of terminating the partition of CUs of sizes 32×4, 16×8, 16×4, and 8×8 exceeds 90%. Therefore, these CUs are not predicted, but the partition is terminated directly, thus reducing 4 partition mode prediction models. Experiments have shown that doing so will not introduce BDBR loss.

[0060] In an embodiment of the present invention, the CU is divided into different LCs according to the stretching factors shown in Table 1, and convolution kernels of different shapes are designed for each LC, and CNN is used to predict the division pattern of the CU. For the convolution layer with specially designed convolution kernels, we use a step size of 1 to extract enough features. However, a step size of 1 cannot effectively reduce the size of the feature map, so we use a 3×3 convolution kernel with a step size of 2 to reduce the size of the feature map. On the other hand, the input CU sizes of different models are different, so we use a step size of 1 to maintain the size of the feature map. After a series of convolution operations, we get enough feature maps, and then pass through two fully connected layers to output the probability values ​​of each category. In all networks, except for the last layer that uses SoftMax activation, the remaining layers use leaky ReLU as the activation function.

[0061] Specifically, the partitioning mode prediction model structures of different CU sizes of the same latitude category are basically the same, but the convolution step sizes used in the partitioning mode prediction models of different CU sizes of the same latitude category are different, with a step size of 2 for large sizes and a step size of 1 for small sizes. The partitioning mode prediction model structures of different latitude categories are different, and the convolution kernel sizes used are different.

[0062] Specifically, in the embodiment of the present invention, for a CU of size 32×32, the corresponding four types of latitude division mode prediction models are as follows: Figure 3The structure shown in the figure. In the figure, "3x3 conv 32" means using 32 3×3 convolution kernels, and "S(1,2)" means using a stride of 1 in the horizontal direction and a stride of 2 in the vertical direction. For LC1 and LC2, their stretching factors are the largest, so convolution kernels with larger aspect ratios are used, that is, 3 8×3 and 3 8×5 convolution kernels. For LC3 and LC4, their stretching factors are relatively small, so convolution kernels with smaller aspect ratios are used, that is, 3 4×3 and 3 4×4 convolution kernels. In addition, since the textures of LC3 and LC4 are more complex than those of LC2 and LC1, two 3×3 convolution layers are added to ensure the accuracy of the model. Finally, a 4×4 convolution kernel is used to aggregate all feature maps. It is worth noting that except for the last layer of convolution, which uses 0 padding, the padding of all other convolution operations is set to 1.

[0063] S12. Obtain 360-degree video data, and use a standard encoder VTM-14.1 to encode the 360-degree video data to obtain training data, where the training data includes CUs of different sizes, and each CU carries an optimal partitioning mode label and a latitude category label.

[0064] S13. Train different partition pattern prediction models respectively; for each partition pattern prediction model, use the training data obtained in step S12 for training, and calculate the training loss through the overall loss function.

[0065] Specifically, the loss function plays a very important role in the training process of the partitioning pattern prediction model. Assuming that the width of a CU is w, the height is h, it contains M partitioning patterns, and a training contains N CU samples, the cross entropy function can be expressed as L':

[0066]

[0067] Among them, y ij Indicates the true label of the i-th CU sample selecting the j-th partitioning mode, p ij It represents the predicted probability of selecting the jth partitioning mode for the i-th CU sample.

[0068] In 360-degree videos, as the stretch factor increases, the redundancy of CUs also increases, the homogeneity of CUs is higher, and the polar regions are usually smooth content such as the sky or land. Therefore, the higher the stretch factor, the higher the probability that CUs choose not to divide, which leads to an imbalance in the distribution of division patterns. To this end, we introduce a scale factor γ to enhance the contribution of minority class samples to the model. The larger the stretch factor, the higher the imbalance of the samples, that is, the stretch factor is positively correlated with the imbalance, so

[0069] γ=η×α

[0070] Among them, η is the balance coefficient. Experiments show that the best effect can be achieved when η is 0.5. Then the cross entropy function is modified to

[0071]

[0072] Among them, N represents the total number of CU samples, M represents the total number of division modes, γ represents the scale factor, and y ij Indicates the true label of the i-th CU sample selecting the j-th partitioning mode, p ij It represents the predicted probability of the i-th CU sample selecting the j-th partitioning mode, η is the balance coefficient; pt represents the scaling factor, and its value is equal to the probability of the correct category predicted by the model. The larger the pt value, the smaller the L1, that is, the smaller the penalty. α represents the stretching factor, which is obtained by the central pixel of the CU of the latitude category and size corresponding to the partitioning mode prediction model through the stretching factor calculation formula (the stretching factors of different partitioning mode prediction models are different when they are trained, and the stretching factors of the same partitioning mode prediction model are the same).

[0073] The choice of partitioning mode is largely affected by RD cost, so we introduce RD cost into the loss function to increase the prediction accuracy of the model. RD loss is expressed as:

[0074]

[0075] Among them, rd ij The RD cost of selecting the jth partitioning mode for the i-th CU sample, rd i max andrd i min Respectively represent the maximum RD cost and minimum RD cost of the i-th CU sample, Normalize the RD cost.

[0076] Therefore, the final overall loss function is expressed as:

[0077] L=L1+β·L2

[0078] Among them, β is the balance factor. Through experiments, it is found that the best effect is achieved when β is 1.

[0079] We use PyTorch to train the model. The initial learning rate is set to 1e-3, and then reduced by 10% every 30 epochs. A total of 150 epochs are trained. The batch size is set to 128, and Adam is selected as the optimizer.

[0080] After all the partitioning mode prediction models are trained, we import them into VTM to predict the partitioning mode of the CU. The output of each partitioning mode prediction model is the probability of the CU selecting each partitioning mode. By setting different thresholds, we can achieve different degrees of acceleration effects.

[0081] S2. Obtain a brightness component image of the image frame to be processed, and segment the brightness component image to obtain 8 target CUs.

[0082] Specifically, the luminance component image is divided into target CUs of sizes of 32×32, 32×16, 32×8, 32×4, 16×16, 16×8, 16×4 and 8×8, respectively. Each target CU selects a partitioning mode prediction model for calculation according to its own latitude type and size.

[0083] S3. Select a corresponding partitioning mode prediction model according to the size and latitude category of each target CU, and calculate the probability value of each target CU selecting each partitioning mode.

[0084] S4. Based on the probability value, determine the optimal partitioning mode of each target CU through a multi-level threshold selection method.

[0085] Specifically, step S4 determines the optimal partitioning mode of any target CU by a multi-level threshold selection method, including:

[0086] S41. Obtain the probability value of the target CU selecting each partition mode, and arrange all probability values ​​in descending order according to their numerical values;

[0087] S42. Determine whether the maximum probability value is greater than the first level threshold. If so, it means that there is enough confidence to select the partition mode corresponding to the maximum probability value as the optimal partition mode, thereby skipping the remaining partition modes. At this time, the target CU selects the partition mode corresponding to the maximum probability value for partitioning, saving a lot of time; if not, proceed to step S43;

[0088] S43. Calculate the sum of the first n = 2, 3, ..., M probability values, and determine whether the sum is greater than the nth level threshold. If so, execute step S44. If not, set n = n + 1 and re-execute step S43; where M is the total number of division modes;

[0089] S44. Determine the m partitioning modes corresponding to the first n probability values, calculate the RD cost of each partitioning mode, and the target CU selects the partitioning mode corresponding to the minimum RD cost for partitioning. Because it is mentioned in the previous text that due to the problem of the classifier, the present invention combines certain partitioning modes during prediction, and when calculating the RDcost, the combined partitioning modes need to be calculated separately, and the value of m ranges from n to n+2.

[0090] The sum of the probability values ​​of all partition modes of each target CU is 1, and the maximum level threshold is less than 1.

[0091] In the best case, the partitioning mode corresponding to the maximum probability value is greater than the first-level threshold, and there is no need to calculate the RDcost, so it is directly partitioned as the optimal mode; in the worst case, the candidate list contains 6 candidate modes, which is the same as the selection process of VTM, so no additional computational burden is introduced.

[0092] By setting different thresholds, we achieve different degrees of acceleration effects, and the results are shown in Table 2. It can be seen from the table that our invention achieves a significant acceleration effect with only a slight BDBR loss.

[0093] Table 2 Speed ​​improvement and BDBR loss

[0094]

[0095] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "rotation" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. Unless otherwise clearly defined, ordinary technicians in this field can understand the specific meanings of the above terms in the present invention according to the specific circumstances.

[0096] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multi-scale 360-degree video frame fast segmentation method, characterized in that: The following steps are involved: S1. Build and train the prediction model of CU partitioning pattern in different sizes and latitude categories; S2. Obtain a brightness component image of the image frame to be processed, and segment the brightness component image to obtain 8 target CUs; S3. Select the corresponding partition mode prediction model for each target CU size and latitude category, and calculate the probability value of each target CU selecting each partition mode; The 2D projection image formed by each frame of the downsampled 360-degree video contains 17 CTU rows; the 17 CTU rows are divided into four latitude categories, wherein the 1st and 17th CTU rows belong to the first latitude category, the 2nd-3rd, 15th-16th CTU rows belong to the second latitude category, the 4th-6th, 12th-14th CTU rows belong to the third latitude category, and the 7th-11th CTU rows belong to the fourth latitude category; S4. Based on the probability value, determine the optimal partitioning mode for each target CU by a multi-level threshold selection method; including: S41. Obtain the probability value of the target CU selecting each partition mode, and arrange all probability values ​​in descending order according to their numerical values; S42. Determine whether the maximum probability value is greater than the first level threshold. If so, the target CU selects the division mode corresponding to the maximum probability value for division. If not, proceed to step S43. S43. Calculate the sum of the first n = 2, 3, ..., M probability values, and determine whether the sum is greater than the nth level threshold. If so, execute step S44. If not, set n = n + 1 and re-execute step S43; where M is the total number of division modes; S44. Determine the m partitioning modes corresponding to the first n probability values, calculate the RD cost of each partitioning mode, and select the partitioning mode corresponding to the minimum RD cost for the target CU for partitioning.

2. The multi-scale 360-degree video frame fast segmentation method according to claim 1, characterized in that: Step S1 constructs and trains a prediction model for the partitioning patterns of CUs in different sizes and different latitude categories, including: S11. Based on the four latitude categories and eight CU sizes, a partitioning pattern prediction model under 28 different sizes and different latitude categories is constructed; S12. Obtain 360-degree video data, and use the standard encoder VTM-14.1 to encode the 360-degree video data to obtain training data, wherein the training data includes CUs of different sizes, and each CU carries an optimal partitioning mode label and a latitude category label; S13. For each partitioning pattern prediction model, the training data obtained in step S12 is used for training, and the training loss is calculated using the overall loss function.

3. The multi-scale 360-degree video frame fast segmentation method according to claim 2, characterized in that: In step S11, the prediction model structure of the partitioning mode of different CU sizes of the same latitude category is the same: The partitioning pattern prediction model belonging to the first latitude category includes a first convolution module, a flatten layer, and two fully connected layers cascaded in sequence; the first convolution module includes three first convolution units cascaded and one 4×4 convolution layer, and the first convolution unit includes one 8×3 convolution layer and one 3×3 convolution layer; The partitioning pattern prediction model belonging to the second latitude category includes a second convolution module, a flatten layer, and two fully connected layers cascaded in sequence; the second convolution module includes three second convolution units cascaded and one 4×4 convolution layer, and the second convolution unit includes one 8×5 convolution layer and one 3×3 convolution layer; The partitioning pattern prediction model belonging to the third latitude category includes a third convolution module, a flatten layer and two fully connected layers cascaded in sequence; the third convolution module includes three third convolution units cascaded, two 3×3 convolution layers and one 4×4 convolution layer, and the third convolution unit includes one 4×3 convolution layer and one 3×3 convolution layer; The division pattern prediction model belonging to the fourth latitude category includes a fourth convolution module, a flatten layer and two fully connected layers cascaded in sequence; the fourth convolution module includes three cascaded fourth convolution units, two 3×3 convolution layers and one 4×4 convolution layer, and the first convolution unit includes one 4×4 convolution layer and one 3×3 convolution layer.

4. The multi-scale 360-degree video frame fast segmentation method according to claim 2, characterized in that: The overall loss function in step 13 includes two parts: the cross entropy loss function and the RDloss function, which are weighted and summed by the balance factor; the overall loss function L is expressed as: L=L1+β·L2 Among them, L1 represents the cross entropy loss function, L2 represents the RDloss function, and β represents the balance factor.

5. The multi-scale 360-degree video frame fast segmentation method according to claim 4, characterized in that: The calculation formula of the cross entropy loss function is: γ=η×α Among them, N represents the total number of CU samples, M represents the total number of division modes, γ represents the scale factor, and y ij Indicates the true label of the i-th CU sample selecting the j-th partitioning mode, p ij It represents the predicted probability of the i-th CU sample selecting the j-th partitioning mode, η is the balance coefficient, α represents the stretching factor, and pt represents the scaling factor.

6. The multi-scale 360-degree video frame fast segmentation method according to claim 4, characterized in that: The calculation formula of the RDloss function is: Among them, N represents the total number of CU samples, M represents the total number of partition modes, and y ij Indicates the true label of the i-th CU sample selecting the j-th partitioning mode, rd ij represents the RD cost of the i-th CU sample selecting the j-th partitioning mode, rd imax represents the maximum RD cost of the i-th CU sample, rd imin represents the minimum RD cost of the i-th CU sample, and α represents the stretching factor.

Citation Information

Patent Citations

  • VVC inter-frame fast coding method based on reference block

    CN116489386A

  • Rapid CU division method for VVC of ERP panoramic video and storage medium

    CN117041736A