DIVISION PATTERN DECISION DECISION DEVICE, DIVISION PATTERN DECISION METHOD, LEARNING DEVICE, LEARNING METHOD, AND PROGRAM
The division pattern determining device uses a neural network to generate hierarchical maps for image blocks, addressing the computational inefficiencies in HEVC video coding by reducing calculation loads and improving encoding efficiency.
Patent Information
- Application Number
- JP2020079325
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-04-28
- Publication Date
- 2024-10-28
- Estimated Expiration
- 2040-04-28
AI Technical Summary
The existing methods for determining CU division patterns in HEVC video coding require significant computational resources and large amounts of training data, particularly when using machine learning models.
A division pattern determining device that uses a machine-learned neural network to generate a hierarchical map for image blocks, reducing computational load by expressing division patterns in a hierarchical structure and correcting mismatches in intermediate feature maps.
This approach significantly reduces the computational requirements for determining image division patterns while maintaining accuracy, allowing for efficient video encoding.
Smart Images

Figure 0007573986000001 
Figure 0007573986000002 
Figure 0007573986000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a division pattern determination device, a division pattern determination method, a learning device, a learning method, and a program. [Background technology]
[0002] H.265 / HEVC (High Efficiency Video Coding) (hereinafter referred to as "HEVC") was standardized in 2013 as a standard for video coding. In HEVC, an image to be coded is divided into coding tree units (CTUs), which are blocks of 64 pixels x 64 pixels in size. Then, coding processing is performed for each CTU. In HEVC, a CTU is recursively divided into coding units (CUs), which are coding units. Here, the amount of calculation required to determine the division pattern of CUs in a CTU is enormous.
[0003] Therefore, in order to determine the division pattern of CUs in a CTU, it is conceivable to infer the division pattern of CUs by using a learning model such as a machine-learned neural network. However, when covering all the division patterns of CUs in a CTU, there is a problem that the number of output patterns becomes huge. In addition, there is also a problem that a huge amount of training data needs to be prepared in advance when performing machine learning.
[0004] As a related technique, the technique of Patent Document 1 has been proposed. In the technique of Patent Document 1, the learning parameters of the learning model are updated during learning so that 21 output labels in a quadtree data structure approach the correct label. Then, it is determined to divide a CU associated with a node that has a split probability exceeding a threshold of the split probability. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2018-182531 A Summary of the Invention [Problem to be solved by the invention]
[0006] In the technology of the above-mentioned Patent Document 1, machine learning is performed so that the 21 output labels approach the correct label. Therefore, there is still a problem that the amount of calculation required to determine the division pattern is large.
[0007] An object of the present invention is to reduce the amount of calculation required when determining a division pattern for an image. [Means for solving the problem]
[0008] In order to achieve the above object, a division pattern determination device of the present invention includes: a generation means for receiving an image in which a division pattern is represented in a hierarchical structure for each predetermined region; and a determination means for determining a division pattern for the image based on the generated hierarchical map for each predetermined region, the division pattern being represented in a hierarchical structure ... The generating means generates the hierarchical map using a machine-learned learning model. It is characterized by the above. Effect of the Invention
[0009] According to the present invention, it is possible to reduce the amount of calculation required when determining a division pattern for an image. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 illustrates an example of an image encoding device. [Diagram 2] FIG. 13 illustrates an example of a division pattern determination unit. [Diagram 3] FIG. 2 is a diagram illustrating an example of a hierarchical map according to the first embodiment. [Figure 4] FIG. 11 is a diagram illustrating an example of inconsistency correction of an intermediate feature map in the first embodiment. [Diagram 5] 5 is a flowchart showing a process flow of a mismatch correction unit according to the first embodiment. [Figure 6] FIG. 2 is a diagram illustrating an example of a learning device according to the first embodiment. [Figure 7] 13 is a flowchart showing a process flow of a mismatch correction unit according to the second embodiment. [Figure 8] FIG. 11 is a diagram illustrating a method for correcting inconsistencies in intermediate feature maps in the second embodiment. [Figure 9] FIG. 13 illustrates an example of a division pattern determination unit according to the third embodiment. [Figure 10] FIG. 13 is a diagram showing an example of an intermediate feature map for each layer for a CTU of interest. [Figure 11] 13A to 13C are diagrams illustrating mismatch correction according to a third embodiment. [Figure 12] FIG. 13 illustrates an example of correcting mismatch. [Figure 13] FIG. 13 is a diagram illustrating an example of a specific hierarchical feature map. [Figure 14] FIG. 13 is a diagram showing an example of a specific hierarchical feature map that is excluded from the calculation target. [Figure 15] FIG. 13 shows an example of a data string of a corrected specific hierarchical feature map. [Figure 16] FIG. 13 is a diagram illustrating an example of a learning device according to a fifth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, each embodiment of the present invention will be described in detail with reference to the drawings. However, the configurations described in each of the following embodiments are merely examples, and the scope of the present invention is not limited to the configurations described in each of the embodiments.
[0012] First Embodiment FIG. 1 is a diagram showing an example of an image coding device 100. The image coding device 100 is a device that codes an image. In each embodiment, the image coding device 100 codes an image that constitutes a moving image. The image coding device 100 may be a predetermined server or computer, or may be built into an imaging device, a smartphone, a tablet terminal, or the like. The image coding device 100 has a CPU, a RAM, and a ROM. A control program stored in the ROM is expanded in the RAM, and the CPU executes the control program expanded in the RAM, thereby realizing the processing of each embodiment. The image coding device 100 may also be realized by a predetermined programming circuit.
[0013] The image coding device 100 codes an image to be coded (target image) in block units of CTUs (coding tree units) each having a size of 64 pixels by 64 pixels. A CTU corresponds to a predetermined area. A division pattern determination unit 101 determines a division pattern for the target image to be coded stored in a frame memory unit 108, and generates a coding unit (CU) for each CTU, which is determined recursively in a hierarchical structure.
[0014] The image encoding device 100 performs video encoding in accordance with the H.265 standard (HEVC standard). In HEVC, a CU is configured with any of 64 pixels x 64 pixels, 32 pixels x 32 pixels, 16 pixels x 16 pixels, or 8 pixels x 8 pixels. For example, a CU is adjusted to be small in a complex area of an image, and is adjusted to be large in a flat area. This improves encoding efficiency. In the case of HEVC, a CU is further divided into PUs (Prediction Units) that are prediction units and TUs (Transform Units) that are transformation units. The encoding efficiency improves by adjusting the CU size and the TU size. In each embodiment, the PU size and the TU size are assumed to be uniquely determined according to the CU size. The PU size and the TU size may be determined based on a brute-force cost calculation for the PU and the TU. Note that the image to be encoded is not limited to an image encoded by video encoding in accordance with the HEVC standard.
[0015] The division pattern determination unit 101 determines a division pattern by using coefficient parameters that have been learned in advance. Hereinafter, parameters updated by machine learning of a neural network are collectively referred to as coefficient parameters. The division pattern determination unit 101 may be incorporated in the image encoding device 100, or may be configured as a standalone device. The division pattern determination unit 101 corresponds to a division pattern determination device. The processing by the division pattern determination unit 101 may be realized by, for example, a GPU (graphics processing unit), or may be realized by a cooperative operation of a CPU and a GPU. In each embodiment, the division pattern determination unit 101 determines a division pattern of CUs in a CTU. The division pattern determination unit 101 may determine a division pattern for PUs and TUs in the same way as for CUs.
[0016] The subtractor 102 calculates the difference between the image block output by the division pattern determination unit 101 and the predicted image output by the switching unit 111, and generates differential image data based on the calculated difference. The orthogonal transformation and quantization unit 103 performs orthogonal transformation on the generated differential image data, and performs quantization processing on the transformation coefficients, which are data after the orthogonal transformation, to generate quantized transformation coefficients. The entropy coding unit 104 performs entropy coding such as CAVLC (Conte×t-based Adaptive Variable Length Coding) on the quantized transformation coefficients, and outputs them as coded data. The entropy coding unit 104 may perform entropy coding such as CABAC (Conte×t-based Adaptive Binary Arithmetic Coding). The entropy coding unit 104 also outputs the motion vector and intra prediction mode notified by the switching unit 111 as coded data.
[0017] The inverse quantization and inverse orthogonal transform unit 105 inverse quantizes the quantized transform coefficients notified from the orthogonal transform and quantization unit 103, performs inverse orthogonal transform, and generates inverse transformed data. The adder 106 generates a reconstructed image by adding the inverse transformed data and a predicted image notified from the switching unit. The loop filter unit 107 reduces coding distortion by filtering the reconstructed image data, and generates a filtered reconstructed image. The frame memory unit 108 stores the filtered reconstructed image data. The frame memory unit 108 also stores the image to be coded, as described above. The filtered reconstructed image is notified to the intra prediction unit 109 and is used for intra prediction.
[0018] The intra prediction unit 109 selects an intra prediction method based on the correlation between a plurality of intra prediction image data generated from pixel data around the encoding target block that has already been encoded and stored in the frame memory unit 108 and the encoding target block. The intra prediction unit 109 notifies the switching unit 111 of the selected intra prediction method. The inter prediction unit 110 searches for a motion vector that minimizes the inter-screen difference between the original image of the encoding target image stored in the frame memory unit 108 and the reference image, and notifies the switching unit 111 of the searched motion vector. The switching unit 111 selects a prediction method that has the smallest differential image data based on the prediction results of the inter prediction unit 110 and the intra prediction unit 109. In this manner, encoded data is generated.
[0019] Next, the division pattern determination unit 101 will be described. FIG. 2 is a diagram showing an example of the division pattern determination unit 101. The feature extraction unit 200 performs a filter process based on machine learning using coefficient parameters that have been learned in advance. The feature extraction unit 200 corresponds to a generating means. The feature extraction unit 200 may be a neural network such as a convolution neural network including a structure in which convolution units and pooling units are alternately stacked. The convolution unit performs a convolution operation on an input image (image to be encoded) or image feature data that has been subjected to convolution processing, using coefficient parameters that have been determined by learning in advance, to generate image feature data. The pooling unit performs a pooling process on the image feature data output by the convolution unit.
[0020] In the example of FIG. 2, the feature extraction unit 200 is composed of convolution units 201, 203, 205, and 207 and pooling units 202, 204, 206, and 208. However, the number of convolution units and pooling units is not limited to the example of FIG. 2. Each convolution unit may have multiple filters or multiple convolution layers. Each pooling unit is a maximum pooling layer that obtains the maximum value in units of 2 pixels x 2 pixels, but is not limited to a maximum pooling layer. In addition, the feature extraction unit 200 may not include a pooling unit. The intermediate feature map memory 209 stores the intermediate feature map generated by the feature extraction unit 200. The intermediate feature map is a hierarchical map before mismatch correction. The mismatch correction unit 210, which serves as a correction means, corrects the mismatch data of the intermediate feature map for each CTU so that a hierarchical structure of the block division is established, and generates a hierarchical map related to the block division.
[0021] The above-described division pattern determination unit 101 generates a division pattern of a CU. The resolution of an image input to the division pattern determination unit 101 may be any resolution as long as it is equal to or greater than the CTU within the memory constraints. However, it is preferable to convolute the peripheral pixels corresponding to the receptive field of the convolution unit of the feature extraction unit 200 together with the CTU of interest (target CTU). In this case, since not only the target CTU but also information on its peripheral pixels can be used, the accuracy of determining the division pattern is improved. The entire surface of the image to be encoded is input to the feature extraction unit 200. Then, the processing by each convolution unit and the processing by each pooling unit are performed in raster order. As a result, the feature extraction unit 200 generates a hierarchical map corresponding to the entire surface of the image to be encoded.
[0022] The intermediate feature map stored in the intermediate feature map memory 209 is subjected to mismatch correction processing by a mismatch correction unit 210 for each block corresponding to a CTU of the encoding target image. In addition, local memories for storing input / output data of each convolution unit and each pooling unit are provided inside each convolution unit and pooling unit. However, the input / output data of each convolution unit and each pooling unit may be stored in any storage unit. A determination unit 211 as a determination means determines a division pattern of CUs in a CTU based on the generated hierarchical map.
[0023] FIG. 3 is a diagram showing an example of a hierarchical map of the first embodiment. FIG. 3(a) shows a hierarchical map for one CTU. Hereinafter, a region of interest in a CTU of interest is referred to as a region of interest. The feature extraction unit 200 extracts features of the division pattern of each region in order to determine a division pattern of CUs in the CTU. Specifically, the feature extraction unit 200 extracts whether the region of interest in the CTU of interest is a block of 64 pixels x 64 pixels, a block of 32 pixels x 32 pixels, a block of 16 pixels x 16 pixels, or a block of 8 pixels x 8 pixels. A hierarchical map value is associated with any of the above blocks. A hierarchical map value is a value indicating at which hierarchical level division is performed, and is a value indicating the size of the divided block (block size). "0" indicates that the region of interest is 64 pixels x 64 pixels. A hierarchical map value is associated with a region of interest of. "1" indicates that the region of interest is 32 pixels x 32 pixels. "2" indicates that the region of interest is 16 pixels x 16 pixels. "3" indicates that the region of interest is 8 pixels x 8 pixels.
[0024] The feature extraction unit 200 determines the indexes "0" to "3" as described above. The division pattern determination unit 101 then calculates the layer map value by treating 16 pixels x 16 pixels of the image to be coded as one element of the layer map (hereinafter, one pixel of the layer map will be referred to as one element in order to distinguish it from pixels of the image to be coded). This makes it possible to express all division patterns with 2 bits. Therefore, when converted into CTU units, the division pattern of one CTU can be expressed with a total of 16 elements, that is, 4 elements x 4 elements. Each element corresponds to a block.
[0025] 3(b) to (f) show examples of the correspondence between the layer map per CTU and the division pattern. In FIG. 3(b) to (f), examples of division images of CTUs corresponding to layer map values are shown. In FIG. 3(b), all layer map values are "0", so "CTU = CU = 64 pixels x 64 pixels", and the CTU is not divided. In FIG. 3(c), all layer map values are "1", so the CTU is divided into "CU = 32 pixels x 32 pixels x 4 pieces". In FIG. 3(d), all layer map values are "2", so the CTU is divided into "CU = 16 pixels x 16 pixels x 16 pieces". In FIG. 3(e), all layer map values are "3", so the CTU is divided into "CU = 8 pixels x 8 pixels x 64 pieces". FIG. 3(f) shows an example of a division pattern in which different layer map values are combined within one CTU. A layer map is map data obtained by converting an intermediate feature map. The training data used for machine learning has the same specifications as the hierarchical map.
[0026] The splitting pattern determination unit 101 generates a 4 element by 4 element hierarchical map for a CTU, so the feature extraction unit 200 employs a configuration having four pooling units. However, the configuration of the feature extraction unit 200 is not limited to the example of Fig. 2. The splitting pattern determination unit 101 may input a previously reduced encoding target image to the feature extraction unit 200, or may generate a hierarchical map by, for example, calculating an average of peripheral elements from an intermediate feature map in which the number of elements per CTU exceeds 4 elements by 4 elements.
[0027] Next, the mismatch correction will be described. The feature extraction unit 200 is composed of a neural network such as a convolutional neural network. The intermediate feature map is the result of the filter process itself based on coefficient parameters obtained in advance by machine learning such as deep learning. Therefore, the intermediate feature map has a floating-point decimal precision and does not necessarily match the integer values of the hierarchical map. The calculation precision in the feature extraction unit 200 may be integer precision. In this case, unlike floating-point calculation, the circuit scale is reduced. These points are common to each of the following embodiments. The mismatch correction unit 210 converts the output data of the feature extraction unit 200 into a value expressed by "0", "1", "2" or "3". Specifically, the mismatch correction unit 210 converts the value of each intermediate feature map based on the following formula (1). "y=0 (x<0.5) y=1 (0.5≦x<1.5) y=2 (1.5≦x<2.5) y=3 (2.5≦x)」 (1) x is the value output by the intermediate feature map, and y is the value of the intermediate feature map after conversion to the index value of the hierarchical map. Note that in the above formula, the threshold value for x to determine y is not limited to the above value.
[0028] FIG. 4 is a diagram showing an example of inconsistency correction of an intermediate feature map in the first embodiment. The feature extraction unit 200 generates one element of a hierarchical map for each 16 pixels×16 pixels of an image to be encoded. For this reason, as shown before correction in FIG. 4, an intermediate feature map in which a hierarchical structure does not hold may be generated. For example, in FIG. 4, in the intermediate feature map before correction, there are only two elements in the CTU whose hierarchical map value (hereinafter, sometimes referred to as map value) is "0". However, in order to make the CTU a CU of 64 pixels×64 pixels, the map values of the 4 elements×4 elements before correction must all be "0".
[0029] Also, in the hierarchical map of Fig. 4, among 2 elements x 2 elements (32 pixels x 32 pixels of the image to be encoded), an element with a map value of "1" and an element with a map value of "2" or more coexist (2 elements x 2 elements in the upper left corner before correction in Fig. 4). In this case, it is unclear whether the 2 elements x 2 elements area in the upper left corner before correction should be divided into CUs of 32 pixels x 32 pixels, or further divided into CUs of 16 pixels x 16 pixels or less. Therefore, as shown in Fig. 4 after correction, the division pattern determination unit 101 compares the number of map values of each intermediate feature map in order from the top layer, and generates a hierarchical map in which the inconsistency has been corrected based on a majority vote.
[0030] Next, the process of the mismatch correction unit 210 will be described. FIG. 5 is a flowchart showing the process flow of the mismatch correction unit 210. In S501, the mismatch correction unit 210 converts the output data output by the feature extraction unit 200 from decimal precision to integer precision, and performs a process (indexing process) of converting the data into an index value indicating a hierarchical map value. The mismatch correction unit 210 performs the indexing process using the above-mentioned formula (1). In S502, the mismatch correction unit 210 determines whether the total number of index values "0" in the 4 elements x 4 elements in the intermediate feature map corresponding to the CTU of interest is equal to or greater than the total number of the index values "1", "2", and "3". If the determination in S502 is YES, the mismatch correction unit 210 advances the process to S503.
[0031] In S503, the inconsistency correction unit 210 converts all index values in the 4 elements×4 elements of the intermediate feature map corresponding to the CTU of interest to 0. This is because it is assumed that the index values do not divide the CTU. If the inconsistency correction unit 210 determines NO in S502, the process proceeds to S504. In S504, the inconsistency correction unit 210 assigns "0" to a variable i (i is an integer) to initialize it. Next, in S505, the inconsistency correction unit 210 determines the value of the variable i. Then, the inconsistency correction unit 210 proceeds to any one of S506, S507, S508, or S509 depending on the value of the variable i. Hereinafter, the 2 elements×2 elements of the intermediate feature map corresponding to the 32 pixels×32 pixels in the CTU of interest will be referred to as an element region of interest, and the element region of interest is set depending on the value of the variable i.
[0032] If "i=0", the mismatch correction unit 210 advances the process to S506. In S506, the mismatch correction unit 210 sets the element region of interest to 2 elements x 2 elements with (x, y)=(0, 0) as the top left element. If "i=1", the mismatch correction unit 210 advances the process to S507. In S507, the mismatch correction unit 210 sets the element region of interest to 2 elements x 2 elements with (x, y)=(2, 0) as the top left element. If "i=2", the mismatch correction unit 210 advances the process to S508. If "i=3", the mismatch correction unit 210 advances the process to S509. In S509, the mismatch correction unit 210 sets the target element region to 2 elements x 2 elements with (x, y) = (2, 2) as the top left element. Note that the above (x, y) is the coordinate system of 4 elements x 4 elements in Figure 4, with the x axis corresponding to the left-right direction and the y axis corresponding to the up-down direction.
[0033] At S510, the mismatch correction unit 210 judges whether the total number of index values "1" in the target element region is equal to or greater than the sum of index values "2" and "3" (S510). If the mismatch correction unit 210 judges YES at S510, it proceeds to S511. At S511, the mismatch correction unit 210 converts the index values of all elements in the target element region (2 elements x 2 elements) to "1". If the mismatch correction unit 210 judges NO at S510, it proceeds to S512 without executing the process of S512. At S512, the mismatch correction unit 210 judges whether "i=3".
[0034] When the inconsistency correction unit 210 judges YES in S512, it ends the process of FIG. 5. On the other hand, when the inconsistency correction unit 210 judges NO in S512, it advances the process to S513. In S513, the inconsistency correction unit 210 increments the value of the variable i. Here, as described above, 16 pixels x 16 pixels is one element of the hierarchical map. Therefore, when the value of the intermediate feature map is "2" or "3", no inconsistency occurs. Therefore, the inconsistency correction unit 210 only needs to correct the inconsistency within a predetermined element area when the value of the intermediate feature map includes "0" or "1". The inconsistency correction unit 210 executes each process of FIG. 5, and a hierarchical map indicating a division pattern is generated from the intermediate feature map.
[0035] In the above example, the focus is on CU, but this embodiment can also be applied to cases where division is performed at a deeper level. The inconsistency correction unit 210 can correct the inconsistency by appropriately setting the element region of interest in FIG. 5 according to the pixel position to be divided and performing a majority vote. As described above, when there is an element in which inconsistency occurs between levels of the generated hierarchical map, the inconsistency correction unit 210 corrects the inconsistency by taking into account the elements surrounding the element in which inconsistency occurs. This makes it possible to establish a hierarchical structure even if an intermediate feature map in which a hierarchical structure is not established is generated.
[0036] Next, machine learning of a neural network will be described. As described above, the feature extraction unit 200 is configured by a neural network such as a convolutional neural network. Parameters such as weights and biases used in the filter calculation of the neural network are adjusted by inputting a large number of learning images and performing machine learning.
[0037] FIG. 6 is a diagram illustrating an example of a learning device 600 of the first embodiment. The learning device 600 is a device for learning coefficient parameters for determining a division pattern. In the learning device 600, the feature extraction unit 200, the intermediate feature map memory 209, and the inconsistency correction unit 210 are the same as those in FIG. 2, and therefore description thereof will be omitted. The learning device 600 has an Mse calculation unit 601 in addition to the feature extraction unit 200, the intermediate feature map memory 209, and the inconsistency correction unit 210. The learning device 600 receives training data from a training data set. The learning device 600 also receives training images from an input image set. The training data and the training input image are configured as a pair.
[0038] In each embodiment, the teacher data is a CU partition pattern used for encoding, calculated on software when using HEVCTestModel (HM) created by JCT-VC. JCT-VC is an abbreviation for Joint Collaborative Team on Video Coding. The teacher data is not limited to data calculated using HM. The teacher data is in a map format similar to the hierarchical map shown in FIG. 3, and is hereinafter referred to as a teacher hierarchical map. The MSE calculation unit 601 calculates the mean squared error (MSE) between the teacher hierarchical map and the hierarchical map output by the inconsistency correction unit 210 to obtain the loss when machine learning is performed.
[0039] Here, an example of calculating the loss during machine learning for data after mismatch correction will be described, but the loss during machine learning may be calculated for an intermediate feature map before mismatch correction. This allows calculations to be performed with floating-point accuracy. In addition, the learning device 600 uses MSE as a loss function, obtains a gradient, which is the amount of change in the coefficient parameters, by the backpropagation method, and updates the coefficient parameters by the stochastic gradient descent method as a parameter optimization method. Other methods may be applied for the method of obtaining the gradient in machine learning and the parameter optimization method. By repeatedly performing the above-mentioned machine learning using many images, the coefficient parameters of the neural network are corrected to approach the division pattern of the teacher data.
[0040] Therefore, in the first embodiment, the splitting pattern determination unit 101 can acquire the splitting pattern of the CTUs in the image (image to be encoded) as a hierarchical map indicating whether or not splitting is required for each element region. This can reduce the amount of calculation required to determine the splitting pattern, compared to when classifying for each hierarchy. Furthermore, the splitting pattern determination unit 101 performs convolution by taking into account information about surrounding pixels for classifying for each CTU. This can improve the accuracy of splitting pattern determination, compared to when information about surrounding pixels is not taken into account.
[0041] Here, the learning device 600 performs machine learning of the neural network, and the generated trained neural network is supplied to the division pattern determination unit 101 of the image encoding device 100. For example, when the learning device 600 and the image encoding device 100 are different devices, the image encoding device 100 acquires the trained neural network from the learning device 600 via wired communication or wireless communication. This allows the division pattern determination unit 101 to determine the division pattern using the trained neural network. When the division pattern determination unit 101 is a standalone device, the division pattern determination unit 101 may acquire the trained neural network from the learning device 600.
[0042] When an unknown encoding target image is input, the trained neural network outputs an inferred hierarchical map. In the above example, the feature extraction unit 200 uses a neural network as a learning model, but a model other than a neural network may be used as the learning model. For example, a support vector machine or the like may be used as the learning model. In the above example, an example of video encoding conforming to HEVC has been described, but each embodiment can be applied to any method of encoding based on block division of an image constituting a hierarchical structure.
[0043] <Second embodiment> Next, the second embodiment will be described. In the second embodiment, the correction method by the mismatch correction unit 210 is different from that of the first embodiment. Explanation of parts that overlap with the first embodiment will be omitted. In dividing a CU, the smaller the size of the divided blocks, the greater the impact on image quality. Therefore, as the size of the divided blocks becomes smaller, finer control becomes possible. Therefore, the division pattern determination unit 101 of the second embodiment corrects the intermediate feature map by prioritizing the index value based on the intermediate feature map to a value for dividing into small blocks. Specifically, the division pattern determination unit 101 of the second embodiment corrects the index value to be larger (corrects to deepen the hierarchy) when the index value of each element is equal to or greater than a predetermined value (when the hierarchy is shallower than the predetermined hierarchy).
[0044] FIG. 7 is a flowchart showing a process flow of the inconsistency correction unit 210 of the second embodiment. In S701, the inconsistency correction unit 210 performs indexing process similar to S501 in FIG. 5. In S702, the inconsistency correction unit 210 judges whether all values of index values in the intermediate feature map 4 elements×4 elements corresponding to the CTU of interest are “0”. When the inconsistency correction unit 210 judges YES in S702, it ends the process of FIG. 7. On the other hand, when the inconsistency correction unit 210 judges NO in S702, it advances the process to S703. The processes of S703 to S708 are the same as S504 to S509 in FIG. 5. In S709, the inconsistency correction unit 210 judges whether all values of index values in the element region of interest are 1 or less. When the inconsistency correction unit 210 judges NO in S709, it advances the process to S710.
[0045] In S710, the inconsistency correction unit 210 converts the index value in the focused element region (2 elements × 2 elements) that is less than or equal to "1" to "2". Then, the inconsistency correction unit 210 advances the process to S711. If the result of the determination in S709 is NO, the inconsistency correction unit 210 also advances the process to S711. S711 and S712 are the same as S512 and S513 in FIG. 5.
[0046] Fig. 8 is a diagram showing a method of correcting inconsistency of an intermediate feature map in the second embodiment. The state before correction in Fig. 8 is the same as that before correction in Fig. 4. In the second embodiment, the inconsistency correction unit 210 can reduce the size of the block division by performing the process of S710. This allows finer control, and therefore the image quality of the image when encoding the images constituting a moving image can be improved.
[0047] <Third embodiment> Next, the third embodiment will be described. The third embodiment differs from the first embodiment in that a plurality of intermediate feature maps are generated for each block size. FIG. 9 is a diagram showing an example of the division pattern determination unit 101 of the third embodiment. The feature extraction unit 900 of the third embodiment has convolution units 901, 903, 905, 907, 909, 911, 913, 914, and 915, and pooling units 902, 904, 906, 908, 910, and 912. The convolution units and the pooling units are alternately stacked. Each convolution unit may have a plurality of filters or convolution layers. The configuration of the feature extraction unit 900 is not limited to the example of FIG. 9, as in the first embodiment. The feature extraction unit 900 corresponds to a generating means.
[0048] The intermediate feature map memory 916 stores a plurality of different intermediate feature maps, which will be described later. A mismatch correction unit 917, which serves as a correction means, corrects mismatch data in the intermediate feature map for each CTU so that a hierarchical structure is established, and generates a hierarchical map. A determination unit 918, which serves as a determination means, determines a division pattern of CUs in a CTU based on the intermediate feature map for each generated hierarchy. In this manner, the division pattern determination unit 101 generates CUs. The mismatch correction process by the mismatch correction unit 917 is the same as in the first embodiment.
[0049] FIG. 10 is a diagram showing an example of an intermediate feature map for each layer for a CTU of interest. Hereinafter, the intermediate feature map for each layer is referred to as a specific layer feature map (feature map). FIG. 10(a) shows one element indicating whether or not a CTU needs to be divided into 64 pixels x 64 pixels. FIG. 10(b) shows a total of four elements indicating whether or not a CTU needs to be divided into 32 pixels x 32 pixels. FIG. 10(c) shows a total of 16 elements indicating whether or not a CTU needs to be divided into 16 pixels x 16 pixels. Each element is expressed by a value of "0" or "1", an element with a value of "0" indicates that the CTU is not to be divided, and an element with a value of "1" indicates that the CTU is to be divided. That is, in the third embodiment, in each specific layer feature map, the necessity of division is expressed by 1 bit for the CU of interest. In the third embodiment, the feature extraction unit 900 performs pooling so that the three specific layer feature maps have the number of elements shown in FIG. 10.
[0050] Here, the output of the pooling unit 908 is associated with a specific layer feature map indicating whether or not division into 16 pixels x 16 pixels is required. The output of the pooling unit 910 is associated with a specific layer feature map indicating whether or not division into 32 pixels x 32 pixels is required. The output of the pooling unit 912 is associated with a specific layer feature map indicating whether or not division into 64 pixels x 64 pixels is required. In the third embodiment, a configuration is adopted in which a specific layer feature map of the minimum pixels in each layer is calculated for the CTU by pooling processing, but the method of pooling processing is not limited to the above example. In addition, the division pattern determination unit 101 of the third embodiment may reduce the encoding target image in advance and then input it to the feature extraction unit 200. In addition, the division pattern determination unit 101 may not treat one element of the specific layer feature map as a unit of whether or not division is required, and may treat, for example, the average value of four elements of the specific layer feature map as one result of whether or not division is required. In other words, a specific hierarchical feature map indicating whether or not division into 64 pixels x 64 pixels is necessary may be output at the resolution of FIG. 10(b) or at a higher resolution.
[0051] The inconsistency corrector 917 converts the output data from the feature extractor 900 into a binary value of "0" or "1." Specifically, the inconsistency corrector 917 converts each specific hierarchical feature map value based on the following formula (2).
[0052] y=0 (x<0.5) (2) where x is the map value of the specific hierarchical feature before conversion to an index, and y is the map value of the specific hierarchical feature after conversion to an index. Note that in the above formula, the threshold value for x to determine y is not limited to the above value. Also, although formula (2) is described as being applied to specific hierarchical feature maps of all hierarchical levels, the inconsistency correction unit 917 may change the threshold value for each hierarchical level.
[0053] Next, the inconsistency correction process will be described. In the third embodiment, the splitting pattern determination unit 101 calculates an intermediate feature map for each layer based on the specific layer feature map. Therefore, a block that is determined not to be split in a higher layer may be determined to be split in a lower layer, causing inconsistency between layers. Therefore, the inconsistency correction unit 917 corrects inconsistencies that occur between layers. FIG. 11 is a diagram for explaining the inconsistency correction of the third embodiment. In FIG. 11, "split" indicates that the value of the specific layer feature map after indexing is "1," and "non-split" indicates that the value of the specific layer feature map is "0."
[0054] Here, in order to improve the coding efficiency, it is preferable to code the images constituting the video and determine a block division pattern that provides a high image quality for the decoded image. For this reason, although it depends on each image constituting the video and the bit rate, in many cases, the necessity of dividing a small-sized block is greatly related to the image quality. Therefore, the mismatch correction unit 917 of the third embodiment corrects the mismatch by prioritizing the necessity of dividing a small-sized block over the necessity of dividing a large-sized block. The example of FIG. 11 shows the result of mismatch correction when the necessity of dividing a small-sized block (a block in a lower hierarchy) is prioritized over the necessity of dividing a large-sized block (a block in a higher hierarchy). That is, the mismatch correction unit 917 determines the necessity of dividing a large-sized block based on the necessity of dividing a small-sized block.
[0055] Specifically, when a block in a higher layer is "non-split" but a block in a lower layer is "split", the inconsistency correction unit 917 determines that there is a mismatch. In this case, the inconsistency correction unit 917 corrects the "non-split" block corresponding to the higher layer of the lower layer that is "split" to "split". This corrects the mismatch. For example, in FIG. 11, when a 32 pixel x 32 pixel block indicates "non-split" and a 16 pixel x 16 pixel block indicates "split", the inconsistency correction unit 917 determines that there is a mismatch. In this case, the inconsistency correction unit 917 corrects the 32 pixel x 32 pixel block to "split".
[0056] FIG. 12 is a diagram showing an example of inconsistency correction. Of the four elements of a specific hierarchical layer feature map of 32 pixels x 32 pixels among the three hierarchical layers, the upper left element before correction is "0", indicating "non-split". Meanwhile, one element of a corresponding specific hierarchical layer feature map of 16 pixels x 16 pixels in the lower layer is "1", indicating "split". In this case, since an inconsistency has occurred, the inconsistency correction unit 917 corrects the upper left element of the specific hierarchical layer feature map of 32 pixels x 32 pixels to "1". This eliminates the inconsistency.
[0057] The mismatch correction unit 917 prioritizes whether or not to divide a block having a small size over whether or not to divide a block having a large size, but the method of correcting the mismatch is not limited to the above example. For example, the mismatch correction unit 917 may determine the mismatch correction method based on the degree of improvement in image quality when machine learning is performed. The mismatch correction unit 917 may also use PSNR (Peak signal-to-noise ratio) as an index of the degree of improvement in image quality. In this case, the mismatch correction unit 917 may determine the mismatch correction method that provides the highest image quality by comparing the image quality of the decoded image using PSNR using HM or the like after performing various mismatch corrections.
[0058] The mismatch correction unit 917 may also correct the mismatch using a learning model such as a machine-learned neural network. The learning model here is different from the learning models of the first and second embodiments. For example, the mismatch correction unit 917 may input three specific hierarchical feature maps and an image to be encoded, select which division pattern to use to correct the mismatch by class classification, and output the selection result. Since the accuracy of whether or not to divide varies depending on the contents of the image group for which the necessity of division is to be determined, it is effective to determine the mismatch correction method based on a machine-learned learning model. The learning model used in the above mismatch correction unit 917 may be machine-learned using teacher data indicating which division pattern to use to correct the mismatch by inputting three specific hierarchical feature maps for learning and an image to be encoded.
[0059] Next, the aggregation of the corrected specific hierarchical feature map will be described. Fig. 13 is a diagram showing an example of a specific hierarchical feature map. The inconsistency corrector 917 converts the specific hierarchical feature map corrected by the inconsistency correction process into the feature map format as shown in Fig. 3(b) to Fig. 3(f) described in the first embodiment, thereby determining a division pattern.
[0060] As described above, in the third embodiment, the division pattern determination unit 101 calculates a 1-bit specific layer feature map for each layer to determine whether or not division is necessary. As a result, when the feature extraction unit 900 of the third embodiment is configured with a learning model such as a neural network, the learning model only needs to infer one of the two values of whether or not division is necessary. This makes it possible to improve the accuracy of determining whether or not a block needs to be divided.
[0061] <Fourth embodiment> Next, the fourth embodiment will be described. The configuration of the division pattern determination unit 101 of the fourth embodiment is the same as that of FIG. 9 of the third embodiment. The fourth embodiment differs from the third embodiment in the mismatch correction method. In general, the inference accuracy of a learning model such as a neural network decreases as the amount of information of the data to be inferred increases. Therefore, the inference accuracy of a learning model such as a neural network is lower for an image with a high resolution than for an image with a low resolution. In other words, the inference accuracy of a learning model such as a neural network is higher for a specific layer feature map indicating whether or not a higher layer needs to be divided than for a specific layer feature map indicating whether or not a lower layer needs to be divided. Therefore, since it is easier to improve the inference accuracy for a block with a large size, the amount of calculation of the convolution unit 913 in FIG. 9 is less than that of the convolution units 914 and 915.
[0062] Therefore, the splitting pattern determination unit 101 of the fourth embodiment performs inconsistency correction by prioritizing specific hierarchical feature maps of large-sized blocks over specific hierarchical feature maps of small-sized blocks.The splitting pattern determination unit 101 of the fourth embodiment also excludes specific hierarchical feature maps of lower hierarchical layers at the same pixel positions as blocks of higher hierarchical layers determined to be "non-split" from the calculation targets.
[0063] Fig. 14 is a diagram showing an example of a specific hierarchical feature map that is excluded from the calculation target. As shown in the example of Fig. 14, the specific hierarchical feature map of 64 pixels x 64 pixels, which is the top hierarchical level, has three "non-split" pixel regions. The pixel regions of the two specific hierarchical feature maps of the lower hierarchical levels that correspond to the "non-split" pixels are excluded from the calculation target. In addition, the pixel regions of the specific hierarchical feature map of the lower hierarchical level that correspond to the "non-split" pixels of the 32 pixel x 32 pixel specific feature map are excluded from the calculation target.
[0064] FIG. 15 shows an example of a data string of a corrected specific hierarchical feature map. For convenience, FIG. 15 shows specific hierarchical feature maps of three consecutive CTUs (CTU0, CTU1, and CTU2). As described above, when an element of a higher hierarchical level is "non-split", the splitting pattern determination unit 101 excludes each element of the corresponding lower hierarchical level from the calculation target (processing target). As a result, calculation (processing) is not performed for each element excluded from the calculation target. There is no need to hold the value of each element excluded from the calculation target.
[0065] Therefore, as shown in FIG. 15, the splitting pattern determination unit 101 generates a data string in which the elements excluded from the calculation target are omitted from the specific hierarchical feature map for each hierarchical layer. In the data string of the specific hierarchical feature map in FIG. 15, the data of the pixel positions of the omitted parts are filled. For example, no values are set in the specific hierarchical feature map of 32 pixels x 32 pixels and the specific hierarchical feature map of 16 pixels x 16 pixels corresponding to CTU1. Therefore, the splitting pattern determination unit 101 generates a data string in which elements of the specific hierarchical feature map for which no values are set are skipped. This reduces the amount of data in the specific hierarchical feature map. In addition, the position of the skipped element can be identified by tracing the hierarchical structure.
[0066] As described above, in the third embodiment, the calculation of the specific hierarchical feature map of the lower hierarchical layer corresponding to the region of the element of the upper hierarchical layer that is "non-split" is not performed. This makes it possible to reduce the amount of calculation compared to the case where calculation is performed for all elements of the specific hierarchical feature map of each layer. For example, when the region of the corresponding element of the upper hierarchical layer is "non-split", the processing of the convolution units 914 and 915 in FIG. 9 can be omitted. Since the amount of calculation can be reduced, it is also possible to reduce power consumption. Note that the splitting pattern determination unit 101 may adopt a configuration in which the feature extraction unit 900 that generates each specific hierarchical feature map is independent for each layer. This makes it possible to further reduce the amount of calculation.
[0067] <Fifth embodiment> Next, the fifth embodiment will be described. The configuration of the division pattern determination unit 101 of the fifth embodiment is the same as that of FIG. 9 of the third embodiment. The fifth embodiment differs from the fourth embodiment in the method of machine learning. FIG. 16 is a diagram showing an example of a learning device 1600 of the fifth embodiment. The configuration of the feature extraction unit 900 is the same as that of FIG. 9. As shown in FIG. 16, the division pattern determination unit 101 of the fifth embodiment has a first Mse calculation unit 1601, a second Mse calculation unit 1602, and a third Mse calculation unit 1603 in addition to the above-mentioned feature extraction unit 900. Data output by each Mse calculation unit is input to a TotalMse calculation unit 1604. The TotalMse calculation unit 1604 may be included in the learning device 1600. The teacher data is a specific hierarchical feature map indicating a correct answer in which the value indicating "division" is "1" and the value indicating "non-division" is "0" for each hierarchy, and the format is the same as that of FIG. 10. The first Mse calculation unit 1601 corresponds to the first teacher data, the second Mse calculation unit 1602 corresponds to the second teacher data, and the third Mse calculation unit 1603 corresponds to the third teacher data. Each teacher data corresponds to a learning input image in a pair.
[0068] The first Mse calculation unit 1601 calculates a mean square error (loss64) between a specific layer feature map of 64 pixels x 64 pixels and the first teacher data. The second Mse calculation unit 1602 calculates a mean square error (loss32) between a specific layer feature map of 32 pixels x 32 pixels and the second teacher data. The third Mse calculation unit 1603 calculates a mean square error (loss16) between a specific layer feature map of 16 pixels x 16 pixels and the third teacher data. The TotalMse calculation unit 1604 calculates a total loss (loss_sum) using the following formula (3) based on the average feature map of each layer. Note that in the following formula (3), "α≦β≦γ" is assumed to hold. loss_sum=α×loss64+β×loss32+γ×loss16···(3) The loss_sum may be a simple sum of the mean squared errors. In the above formula (3), the mean squared error of the specific layer feature map in the lower layer is weighted with a high weight, and the mean squared error of the specific layer feature map in the higher layer is weighted with a low weight. The TotalMse calculation unit 1604 calculates the total loss loss_sum using formula (3).
[0069] As described above, the division accuracy of small-sized blocks has a greater effect on the image quality than the division accuracy of large-sized blocks. Therefore, the TotalMse calculation unit 1604 weights the image with a higher value as the layer of the specific layer feature map becomes deeper. Then, the learning device 1100 performs machine learning of a neural network that brings the weighted total loss_sum closer to zero. This allows the machine learning related to the division of small-sized blocks, whose division accuracy is difficult to improve, to be focused on. Therefore, the division accuracy of the blocks can be improved. Note that the learning device 1100 may search for block sizes whose division accuracy is difficult to improve as a result of the above machine learning, and determine the relationship between the weights α, β, and γ based on the search result. In this case, "α≦β≦γ" may not be satisfied.
[0070] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the above-mentioned embodiments, and various modifications and changes are possible within the scope of the gist of the present invention. The present invention can also be realized by supplying a program that realizes one or more functions of the above-mentioned embodiments to a system or device via a network or storage medium, and having one or more processors of a computer in the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that realizes one or more functions. [Explanation of symbols]
[0071] 100 Image encoding device 101 Division pattern determination unit 200 Feature Extraction Unit 210 Mismatch correction section 600 Learning Device
Claims
1. a generating means for receiving an image in which a division pattern is expressed in a hierarchical structure for each predetermined region, and generating a hierarchical map in which a value indicating a block size is associated with each of a plurality of blocks in the predetermined region based on the input image; A determination means for determining a division pattern of the image based on the generated hierarchical map; Equipped with A splitting pattern determination device characterized in that the generation means generates the hierarchical map using a machine-learned learning model.
2. 2. The splitting pattern determination device according to claim 1, further comprising a correction means for, when a block in the hierarchical map has an inconsistency between hierarchical levels of the hierarchical structure, correcting the inconsistency based on the block and a plurality of blocks surrounding the block.
3. 3. The splitting pattern determination device according to claim 2, wherein said correction means performs a correction for dividing a block whose hierarchical structure has a hierarchy shallower than a predetermined hierarchy by deepening the hierarchy.
4. the learning model is a neural network; 2. The division pattern determination device according to claim 1, wherein the neural network is machine-trained using a backpropagation algorithm.
5. 5. The division pattern determination device according to claim 4, wherein the neural network has a plurality of convolution sections and a plurality of pooling sections, and the convolution sections convolute peripheral pixels of the predetermined region together.
6. 6. The division pattern determination device according to claim 4, wherein, when an output of the neural network is a floating point, the generating means converts the floating point into an integer value indicating the size of the block.
7. 7. The division pattern determination device according to claim 1, wherein the image is an image that constitutes a moving image encoded according to the HEVC standard.
8. an image in which a division pattern is expressed in a hierarchical structure for each predetermined region is input, and a hierarchical map is generated for each of the predetermined regions based on the input image, in which a value indicating a block size is associated with each of a plurality of blocks in the predetermined region; determining a division pattern for the image based on the generated hierarchical map; Equipped with A method for determining a division pattern, characterized in that in the generating step, the hierarchical map is generated using a machine-learned learning model.
9. a generation means for receiving an input of a learning image in which a division pattern for each predetermined region is expressed in a hierarchical structure, and for generating, based on the input image, a hierarchical map in which a value indicating a block size is associated with each of a plurality of blocks in the predetermined region, for each of the predetermined regions, using a machine-learned learning model; A learning device that performs machine learning so as to reduce the mean square error between the training data corresponding to the learning image and the hierarchical map.
10. a step of inputting a learning image in which a division pattern for each predetermined region is expressed in a hierarchical structure, and generating, based on the input image, a hierarchical map in which a value indicating a block size is associated with each of a plurality of blocks in the predetermined region, for each of the predetermined regions, using a machine-learned learning model; performing machine learning so as to reduce the mean square error between training data corresponding to the learning image and the hierarchical map; A learning method comprising:
11. A computer-readable program for causing a computer to function as each of the means of the division pattern determination device described in any one of claims 1 to 7.
12. A computer-readable program for causing a computer to function as each of the means of the learning device described in claim 9.
Citation Information
Patent Citations
Division shape determining apparatus, learning apparatus, division shape determining method, and division shape determining program
JP2018182531A
Receptive-field-conforming convolution models for video coding
WO2020061008A1
