WO2019194425A1 - Apparatus and method for applying artificial neural network to image encoding or decoding - Google Patents

Apparatus and method for applying artificial neural network to image encoding or decoding Download PDF

Info

Publication number
WO2019194425A1
WO2019194425A1 PCT/KR2019/002654 KR2019002654W WO2019194425A1 WO 2019194425 A1 WO2019194425 A1 WO 2019194425A1 KR 2019002654 W KR2019002654 W KR 2019002654W WO 2019194425 A1 WO2019194425 A1 WO 2019194425A1
Authority
WO
WIPO (PCT)
Prior art keywords
cnn
block
current block
prediction
picture
Prior art date
Application number
PCT/KR2019/002654
Other languages
French (fr)
Korean (ko)
Inventor
나태영
이선영
신재섭
손세훈
김효성
임정연
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020180072506A external-priority patent/KR20200000548A/en
Priority claimed from KR1020180072499A external-priority patent/KR102648464B1/en
Priority claimed from KR1020180081123A external-priority patent/KR102668262B1/en
Priority claimed from KR1020180099166A external-priority patent/KR20190117352A/en
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Publication of WO2019194425A1 publication Critical patent/WO2019194425A1/en
Priority to US17/064,304 priority Critical patent/US11265540B2/en
Priority to US17/576,000 priority patent/US20220141462A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Definitions

  • the present disclosure relates to image encoding or decoding, and more particularly, to an apparatus and method for applying an artificial neural network (ANN) to image encoding or decoding.
  • ANN artificial neural network
  • moving image data Since moving image data has a larger amount of data than audio data or still image data, hardware resources such as memory are consumed when the data source is stored or transmitted as it is. Therefore, in general, moving image data is stored or transmitted after being compressed using an encoder, and the compressed moving image data is reproduced after being decompressed using a decoder.
  • the in-loop filter of the conventional video encoding or decoding apparatus is replaced by a Convolutional Neural Network (CNN) filter, which is a kind of artificial neural network, and has a BBR of about 3.57% of BBR (Bjonteggrad-delta Bit Rate) It has been found that the gain can be achieved. Accordingly, an image encoding and decoding technique using an artificial neural network technology has attracted attention as a solution to the above problem.
  • CNN Convolutional Neural Network
  • Some techniques of this disclosure relate to mitigating quantization error and blocking degradation using CNN based filters.
  • a method of decoding an image using a CNN-based filter comprising: inputting at least one of a quantization parameter map and a block division map and a first picture to the CNN-based filter; Outputting two pictures, wherein the quantization parameter map indicates information about coding units constituting the first picture, and the block partition map indicates information about divided regions constituting the first picture It provides a method for decoding an image characterized by.
  • an input unit for receiving at least one of a quantization parameter map and a block division map and a first picture, the quantization parameter map input to the input unit and the A filter unit for applying coefficients of the CNN-based filter to at least one of the block division maps and the first picture, and at least one of the quantization parameter map and the block division map and the CNN-based filter to the first picture
  • An output unit configured to output a second picture by applying coefficients, wherein the quantization parameter map indicates a coding unit constituting the first picture, and the block partition map indicates information about a divided region constituting the first picture
  • an image improvement, a quantization error, and a blocking artifact may be solved using a filter learned through supervised learning.
  • Some techniques of this disclosure relate to performing CNN based intra prediction.
  • an image decoding method using a CNN-based intra prediction unit comprising: decoding transform coefficients for a current block to be decoded from a bitstream; Determining input data including a reference region decoded before the current block; Generating prediction pixels of the current block by applying a predetermined filter coefficient of a CNN to the input data; Inversely transforming the transform coefficients to generate residual signals for the current block; And reconstructing the current block by using the prediction pixels and the residual signals.
  • an image decoding apparatus using a CNN-based intra prediction unit includes: a decoder which decodes transform coefficients of a current block to be decoded from a bitstream; A CNN setting unit which determines input data including a reference region decoded before the current block; A CNN execution unit which generates prediction pixels of the current block by applying a predetermined filter coefficient of the CNN to the input data; An inverse transform unit inversely transforming the transform coefficients to generate residual signals for the current block; And an adder for reconstructing the current block by using the prediction pixels and the residual signals.
  • Some techniques of this disclosure relate to performing CNN based inter prediction.
  • the method includes: setting input data including a search region in at least one reference picture; Generating a motion vector of a current block or prediction pixels of the current block by applying a predetermined filter coefficient of a CNN to the input data; Inversely transforming transform coefficients extracted from a bitstream to generate residual signals for the current block; And reconstructing the current block by using the residual signals and the motion vector of the current block or the prediction pixels of the current block.
  • a CNN setting unit configured to set input data including a search region in at least one reference picture;
  • a CNN execution unit generating a motion vector of a current block or prediction pixels of the current block by applying a predetermined filter coefficient of the CNN to the input data;
  • an inverse transform unit which inversely transforms transform coefficients extracted from the bitstream to restore residual signals, wherein the current block is reconstructed using the residual signals and the motion vector of the current block or the prediction pixels of the current block.
  • generating a motion vector of a current block or prediction pixels of the current block by using a syntax element for an inter prediction mode extracted from a bitstream; Setting input data including a search region in at least one reference picture and a motion vector of the current block or prediction pixels of the current block; Generating a redefined motion vector of the current block or redefined prediction pixels of the current block by applying a predetermined filter coefficient of the CNN to the input data; Generating residual signals by inversely transforming transform coefficients extracted from the bitstream; And reconstructing the current block by using the residual signals and the redefined motion vector of the current block or the redefined prediction pixels of the current block.
  • a CNN setting unit for setting a motion vector of a current block generated using a syntax element for an inter prediction mode extracted from a bitstream or prediction pixels of the current block as input data;
  • a CNN execution unit which applies a predetermined filter coefficient of the CNN to the input data to generate a redefined motion vector of the current block or redefined prediction pixels of the current block;
  • an inverse transformer configured to inversely transform transform coefficients extracted from the bitstream to generate residual signals, wherein the current block includes the residual signals and a redefined motion vector of the current block or a redefined prediction pixel of the current block.
  • Some techniques of this disclosure relate to filtering a reference region used for intra prediction using a CNN based filter.
  • decoding the transform coefficients for the current block to be decoded from the bitstream Setting input data of a CNN by using a first reference region decoded before the current block; Generating a second reference region by filtering the first reference region by applying a predetermined filter coefficient of the CNN to the input data; Generating a prediction block of the current block by performing intra prediction using the second reference region; Inversely transforming the transform coefficients to generate residual signals for the current block; And reconstructing the current block by using the prediction block and the residual signals.
  • a decoding unit for decoding the transform coefficients for the current block to be decoded from the bitstream;
  • An intra predictor configured to generate a predictive block of the current block by performing intra prediction using a second reference region filtered from a first reference region selected from regions decoded before the current block;
  • An inverse transform unit inversely transforming the transform coefficients to generate residual signals for the current block;
  • an adder for reconstructing the current block by using the prediction block and the residual signals, wherein the second reference region is a preset filter coefficient of the CNN with respect to input data set by using the first reference region.
  • the image decoding apparatus is generated by filtering the first reference region by applying.
  • FIG. 1 is an exemplary block diagram of an image encoding apparatus that may implement techniques of this disclosure.
  • FIG. 2 is a diagram for explaining a method of dividing a block using a QTBTTT structure.
  • 3 is an exemplary diagram for a plurality of intra prediction modes.
  • FIG. 4 is an exemplary block diagram of an image decoding apparatus that may implement techniques of this disclosure.
  • FIG. 5 is a diagram illustrating an exemplary structure of a CNN that may be used in the techniques of this disclosure.
  • FIG. 6 illustrates a CNN-based filter according to an embodiment of the present invention.
  • FIGS. 7A to 7C are diagrams illustrating structures of a CNN having different positions of a concatenated layer according to an embodiment of the present invention.
  • 8A to 8C illustrate data to be input to an input layer of a CNN according to an embodiment of the present invention.
  • FIGS. 9A and 9B are diagrams illustrating an example of a block partitioning map according to an embodiment of the present invention.
  • FIGS. 10A to 10C are diagrams illustrating another example of a block partitioning map according to an embodiment of the present invention.
  • 11A to 11C illustrate block division maps for adjusting the strength of deblocking according to an embodiment of the present invention.
  • FIG. 12 illustrates a flowchart of decoding an image using a CNN-based filter according to an embodiment of the present invention.
  • FIG. 13 is a diagram schematically illustrating a configuration of an apparatus for decoding an image according to an embodiment of the present invention.
  • FIG. 14 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to an embodiment of the present invention.
  • 15 is an exemplary diagram of a peripheral region that can be used as input data of a CNN.
  • 16 is a diagram illustrating an example of configuring an input layer of a CNN from a plurality of neighboring blocks.
  • FIG. 17 is an exemplary diagram for describing a prediction direction suitable for a current block in view of pixel value types of neighboring blocks.
  • 18 is an exemplary diagram of a layer configuration of a CNN including hint information.
  • FIG. 19 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 20 is a flowchart illustrating an operation of a CNN prediction unit that may be included in the image encoding apparatus illustrated in FIG. 14.
  • FIG. 21 is a flowchart illustrating an operation of a CNN predictor that may be included in the image decoding apparatus illustrated in FIG. 19.
  • FIG. 22 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to an embodiment of the present invention.
  • 23 is an exemplary diagram of a layer configuration of a CNN.
  • 24 is an exemplary diagram of time-base distance information between a current picture and a reference picture.
  • 25 is an exemplary diagram of a layer configuration of a CNN including hint information.
  • FIG. 26 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention.
  • 27A and 27B are flowcharts illustrating a process of performing inter prediction by a CNN prediction unit included in an image encoding apparatus according to an embodiment of the present invention.
  • 28A and 28B are flowcharts illustrating a process of performing inter prediction by a CNN prediction unit included in an image decoding apparatus according to an embodiment of the present invention.
  • 29 is a flowchart illustrating a method of calculating filter coefficients of a CNN according to an embodiment of the present invention.
  • FIG. 30 is an exemplary diagram of a peripheral region that can be used as input data of a CNN according to an embodiment of the present invention.
  • FIG. 31 is an exemplary diagram of a layer configuration of a CNN according to an embodiment of the present invention.
  • FIG. 32 is a block diagram illustrating a configuration of a CNN-based filter unit according to an embodiment of the present invention.
  • FIG 33 is a flowchart illustrating a filtering process of a reference region according to an embodiment of the present invention.
  • 34 is a flowchart illustrating a filtering process of a reference region according to an embodiment of the present invention.
  • FIG. 1 is an exemplary block diagram of an image encoding apparatus that may implement techniques of this disclosure.
  • an image encoding apparatus and subcomponents thereof will be described with reference to FIG. 1.
  • the image encoding apparatus includes a block splitter 110, a predictor 120, a subtractor 130, a transformer 140, a quantizer 145, an encoder 150, and inverse quantization.
  • the unit 160, an inverse transform unit 165, an adder 170, a filter unit 180, and a memory 190 may be configured.
  • Each component of the image encoding apparatus may be implemented in hardware or software, or a combination of hardware and software.
  • the functions of each component may be implemented in software, and the microprocessor may be implemented in a form in which each function of each software (component) is executed.
  • One image is composed of a plurality of pictures. Each picture is divided into a plurality of regions, and encoding is performed for each region. For example, one picture is divided into one or more tiles. Here, one or more tiles may be defined as a tile group. Each tile is divided into one or more coding tree units (CTUs). Each CTU is divided into one or more coding units (CUs) by a tree structure.
  • CTUs coding tree units
  • Information applied to each CU is encoded by the syntax of the CU, and information commonly applied to CUs included in one CTU is encoded by the syntax of the CTU.
  • information commonly applied to all blocks in one tile is encoded by the syntax of the tile or the syntax of the tile group to which the tile belongs.
  • Information applied to all blocks constituting one picture may be a picture parameter. It is encoded in a set (PPS, Picture Parameter Set) or picture header.
  • SPS sequence parameter set
  • VPS video parameter set
  • the block divider 110 determines the size of a coding tree unit (CTU).
  • CTU size Information on the size of the CTU (CTU size) is encoded in the syntax of the SPS or PPS and transmitted to the image decoding apparatus.
  • the block dividing unit 110 After dividing each picture constituting an image into a plurality of coding tree units (CTUs) having a predetermined size, the block dividing unit 110 recursively divides the divided CTUs using a tree structure. Split by recursively. A leaf node in the tree structure becomes a CU (coding unit) which is a basic unit of coding.
  • CU coding unit
  • the tree structure includes a quad tree (QT) in which a parent node (or parent node) is divided into four child nodes (or child nodes) of the same size, and a binary tree in which the parent node is divided into two child nodes.
  • QT quad tree
  • BT ternary tree
  • TT ternary tree
  • a structure in which two or more of a QT structure, a BT structure, and a TT structure are mixed may be included.
  • a Quad Tree plus Binary Tree (QTBT) structure may be used, and a Quad Tree plus Binary Tree Ternary Tree (QTBTTT) structure may be used.
  • QTBT Quad Tree plus Binary Tree
  • QTBTTT Quad Tree plus Binary Tree Ternary Tree
  • FIG. 2 is a diagram for explaining a method of dividing a block using a QTBTTT structure.
  • the CTU may first be divided into a QT structure.
  • Quadtree splitting may be repeated until the size of the splitting block reaches the minimum block size (MinQTSize) of the leaf nodes allowed in QT.
  • MinQTSize minimum block size
  • the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in BT, it may be further divided into one or more of the BT structure or the TT structure. In the BT structure and / or the TT structure, there may be a plurality of division directions.
  • MaxBTSize maximum block size
  • splitting a block of a corresponding node horizontally ie, horizontal splitting
  • vertically splitting ie, vertical splitting
  • a flag indicating whether nodes are segmented a flag indicating a division direction (vertical or horizontal), and / or a flag indicating a partition type (Binary or Ternary) are decoded. May be signaled to the device.
  • the asymmetric form may include a form of dividing a block of a node into two rectangular blocks having a size ratio of 1: 3, a form of dividing a block of a node in a diagonal direction, and the like.
  • the CTU is first divided into the QT structure, and then the leaf nodes of the QT may be further divided into the BT structure.
  • the CU may have various sizes depending on the QTBT or QTBTTT splitting from the CTU.
  • a block corresponding to a CU that is, a leaf node of QTBTTT
  • a 'current block' a block corresponding to a CU (that is, a leaf node of QTBTTT) to be encoded or decoded.
  • the prediction unit 120 predicts the current block and generates a prediction block.
  • the predictor 120 may include an intra predictor 122 and an inter predictor 124.
  • current blocks within a picture may each be predictively coded. Prediction of the current block may be performed using an intra prediction technique using data of the picture including the current block or an inter prediction technique using data of a coded picture before the picture containing the current block.
  • the intra predictor 122 predicts pixels in the current block by using pixels (reference pixels) positioned around the current block in the current picture including the current block.
  • the plurality of intra prediction modes may include a non-directional mode including a planar mode and a DC mode and 65 directional modes.
  • the surrounding pixels to be used and the expressions are defined differently for each prediction mode.
  • the intra predictor 122 may predict pixels in the current block using reference pixels through a CNN-based learning and inference process.
  • the intra prediction unit 122 may operate in parallel with the CNN-based intra prediction mode (hereinafter, also referred to as a “CNN mode”) together with the plurality of intra prediction modes illustrated in FIG. 3.
  • the intra prediction unit 122 may operate only the CNN mode.
  • the intra predictor 122 may determine an intra prediction mode to use to encode the current block.
  • intra prediction unit 122 may encode the current block using several intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, intra predictor 122 calculates rate distortion values using rate-distortion analysis for several tested intra prediction modes, and has the best rate distortion characteristics among the tested modes. Intra prediction mode may be selected.
  • the intra predictor 122 selects one intra prediction mode from among the plurality of intra prediction modes, and predicts the current block by using a neighboring pixel (reference pixel) and an operation formula determined according to the selected intra prediction mode. As described later, in the CNN mode, the intra predictor 122 predicts the current block by using input data and coefficient values of the convolution kernel.
  • the intra prediction unit 122 performs intra prediction on the current block of the plurality of intra prediction modes in order to efficiently encode intra prediction mode information indicating which mode of the plurality of intra prediction modes is used as the intra prediction mode of the current block. Some of the most probable modes as prediction modes can be determined as MPM (most probable mode).
  • the MPM list may include intra prediction modes, planar mode, and DC mode of neighboring blocks of the current block.
  • the MPM list may further include a CNN mode.
  • first intra identification information indicating which mode of the MPMs is selected as the intra prediction mode of the current block is encoded by the encoder 150 and signaled to the image decoding apparatus. do.
  • the second intra identification information indicating which mode other than the MPM is selected as the intra prediction mode of the current block is transmitted to the encoder 150. Is encoded and signaled to the video decoding apparatus.
  • the inter prediction unit 124 searches for the block most similar to the current block in the reference picture encoded and decoded before the current picture through a motion estimation process, and uses the block found through the motion compensation process. Generate a predictive block for the block.
  • Inter prediction may be generally classified into uni-directional prediction and bi-directional prediction according to a prediction direction.
  • Unidirectional prediction refers to a method of predicting a current block using only pictures displayed before the current picture or only pictures displayed after the time axis.
  • Bidirectional prediction refers to a method of predicting a current block by referring to both a picture displayed before and a picture displayed after the current picture on the time axis.
  • the inter prediction unit 124 generates a motion vector corresponding to a displacement between the current block in the current picture and the prediction block in the reference picture.
  • motion estimation is performed on a luma component, and a motion vector calculated based on the luma component is used for both the luma component and the chroma component.
  • the motion information including the information about the reference picture and the motion vector used to predict the current block is encoded by the encoder 150 and transmitted to the image decoding apparatus.
  • Various methods may be used to reduce or minimize the amount of bits required to encode motion information.
  • Representative examples of these various methods include Skip mode, Merge mode, and Adaptive (Advanced) motion vector predictor (AMVP) mode.
  • the inter prediction unit 124 constructs a merge list including candidate blocks, and selects motion information to be used as motion information of the current block among motion information of candidate blocks included in the list.
  • a merge index value for identifying the selected motion information (selected candidate block) is generated.
  • the index value of the selected motion information is encoded and signaled to the image decoding apparatus.
  • index values for Skip / Merge mode are expressed through the merge_idx syntax.
  • motion vector predictor (MVP) candidates for the motion vector of the current block are derived using neighboring blocks of the current block.
  • the inter prediction unit 124 determines the prediction motion vector mvp of the motion vector of the current block, subtracts the prediction motion vector determined from the motion vector of the current block, and subtracts the differential motion vector (motion). vector difference, mvd).
  • the calculated differential motion vector is encoded and signaled to the image decoding apparatus.
  • the process of determining the predicted motion vector from the predicted motion vector candidates may be implemented through a predefined function (eg, median operation, average value operation, etc.).
  • a predefined function eg, median operation, average value operation, etc.
  • the video decoding apparatus is set to apply a predefined function.
  • the image decoding apparatus Since the neighboring blocks used to derive the predictive motion vector candidates correspond to blocks that have already been encoded and decoded, the image decoding apparatus has already recognized the motion vectors of the neighboring blocks. Therefore, since the information for identifying the predicted motion vector candidates does not need to be encoded, the apparatus for encoding an image encodes only the information about the differential motion vector and the information about the reference picture used to predict the current block.
  • the process of determining the prediction motion vector from the prediction motion vector candidates may be implemented by selecting any one of the prediction motion vector candidates.
  • the information for identifying the determined prediction motion vector is additionally coded together with the information about the differential motion vector and the reference picture used for predicting the current block.
  • the inter prediction unit 124 may predict the current block through a CNN-based inference process.
  • the filter coefficients of the CNN that is, the coefficients of the convolution kernel, may be set through the supervised learning process of the CNN.
  • the inter prediction unit 124 primarily generates motion information or prediction pixels of the current block according to an existing inter prediction method (ie, motion estimation (ME) and motion compensation (MC)). Then, the generated motion information or prediction pixels may be refined through CNN-based learning and inference processes to predict the current block.
  • an existing inter prediction method ie, motion estimation (ME) and motion compensation (MC)
  • the inter prediction unit 124 may operate in parallel with the CNN-based inter prediction method (hereinafter, referred to as a "CNN prediction mode") together with the existing inter prediction method.
  • the inter prediction unit 124 may independently operate only the CNN prediction mode by replacing the existing inter prediction method.
  • the subtractor 130 generates a residual block by subtracting the prediction block generated by the intra predictor 122 or the inter predictor 124 and the current block, and the transform unit 140 has a residual having pixel values in the spatial domain.
  • the residual signal in the block is transformed into transform coefficients in the frequency domain.
  • the transform unit 140 may convert the residual signals in the residual block using the size of the current block as a conversion unit, divide the residual block into a plurality of smaller subblocks, and convert the residual signals into a conversion unit of the subblock size. You may.
  • the residual block may be divided into sub-blocks having the same size, and may be divided by a quad tree (QT) method using the residual block as a root node.
  • QT quad tree
  • the quantization unit 145 quantizes the transform coefficients output from the transform unit 140, and outputs the quantized transform coefficients to the encoder 150.
  • the encoder 150 generates a bitstream by encoding the quantized transform coefficients by using an encoding method such as CABAC. Also, the encoder 150 encodes and signals information such as a CTU size, a QT split flag, a BTTT split flag, a split direction, and a split type associated with block division, so that the image decoding apparatus splits the block in the same manner as the image encoder. To be able.
  • the encoder 150 encodes information on a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and intra prediction information (that is, intra prediction mode) according to the prediction type.
  • Information or inter prediction information (information about a reference picture and a motion vector) is encoded.
  • the encoder 150 encodes information (flag) indicating whether to use the CNN based inter prediction scheme.
  • the encoder 150 encodes the information about the reference picture and the motion vector as the inter prediction information.
  • the encoder 150 encodes information necessary for performing CNN based inter prediction as inter prediction information.
  • the encoder 150 encodes information necessary for performing CNN based inter prediction.
  • Information necessary for performing CNN-based inter prediction may include selection information on input data or filter coefficients of the CNN, which will be described later in detail with reference to FIG. 22.
  • the inverse quantizer 160 inversely quantizes the quantized transform coefficients output from the quantizer 145 to generate transform coefficients.
  • the inverse transformer 165 restores the residual block by converting the transform coefficients output from the inverse quantizer 160 from the frequency domain to the spatial domain.
  • the adder 170 reconstructs the current block by adding the reconstructed residual block and the prediction block generated by the predictor 120.
  • the pixels in the reconstructed current block are used as reference pixels for intra prediction of the next order block.
  • the filter unit 180 may reduce the blocking artifacts, the ringing artifacts, the blurring artifacts, and the like that occur due to block-based prediction and transformation / quantization.
  • Perform filtering on The filter unit 180 may include a deblocking filter 182 and a SAO filter 184.
  • the deblocking filter 180 filters the boundaries between the reconstructed blocks to remove blocking artifacts caused by the encoding / decoding of blocks.
  • the SAO filter 184 further filters the deblocking filtered image. Do this.
  • the SAO filter 184 corresponds to a filter used to compensate for the difference between the reconstructed pixel and the original pixel caused by lossy coding.
  • the reconstructed blocks filtered through the deblocking filter 182 and the SAO filter 184 are stored in the memory 190.
  • the reconstructed picture is used as a reference picture for inter prediction of a block in a picture to be encoded later.
  • FIG. 4 is an exemplary block diagram of an image decoding apparatus that may implement techniques of this disclosure.
  • an image decoding apparatus and subcomponents thereof will be described with reference to FIG. 4.
  • the image decoding apparatus includes a decoder 410, an inverse quantizer 420, an inverse transformer 430, a predictor 440, an adder 450, a filter 460, and a memory ( 470).
  • each component may be implemented as a hardware chip, and the functions of each component may be implemented in software and the microprocessor may be configured to execute the functions of each software. have.
  • the decoder 410 decodes the bitstream received from the image encoding apparatus, extracts information related to block division (partition information of the luma block and / or partition information of the chroma block), and uses the same to decode the current block to be decoded. It extracts the prediction information and the information about the residual signal necessary to recover the current block.
  • the decoder 410 extracts information on the CTU size from a Sequence Parameter Set (SPS) or Picture Parameter Set (PPS) to determine the size of the CTU, and divides the picture into a CTU of the determined size. In addition, the decoder 410 determines the CTU as the highest layer of the tree structure, that is, the root node, extracts partition information from the bitstream, and divides or reconstructs the block using the extracted information.
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • the decoder 410 extracts information about whether a block is divided into BT and a split type (dividing direction) for a node corresponding to a leaf node of a QT split, and divides the corresponding leaf node into a BT structure.
  • the decoder 410 extracts information (flag) on whether to split the QT, divides each node into four nodes of a lower layer, and splits the QT. For nodes corresponding to leaf nodes (nodes where QT splitting no longer occurs), information about whether the split is further divided by BT or TT, information on the split direction, and split type information that distinguishes the BT or TT structure is extracted. Recursively split into BT or TT structures.
  • the decoder 410 when dividing or restoring a block using the QTBTTT structure, extracts information (eg, a flag) on whether to split or not, and splits type information when the corresponding block is divided. Extract.
  • the partition type is QT
  • the decoder 410 divides each node into four nodes corresponding to lower layers. If the splitting type indicates that the splitting node is a leaf node of the QT splitting (node where QT splitting no longer occurs), that is, split into BT or TT, the decoder 410 additionally includes information on splitting direction and whether the BT or TT structure is present. Extract the partition type information for identifying the partition and split it into a BT or TT structure.
  • the decoder 410 extracts information about a prediction type indicating whether the current block is intra predicted or inter predicted.
  • the decoder 410 extracts a syntax element for intra prediction information (intra prediction mode) of the current block.
  • intra prediction mode a syntax element for intra prediction information
  • the decoder 410 extracts a syntax element of the inter prediction information, that is, a motion vector and information indicating the reference picture to which the motion vector refers (motion information of the current block).
  • the decoder 410 extracts information about quantized transform coefficients of the current block as information on the residual signal.
  • the inverse quantizer 420 inverse quantizes the quantized transform coefficients, and the inverse transformer 430 inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to generate a residual block for the current block. .
  • the predictor 440 may include an intra predictor 442 and an inter predictor 444.
  • the intra predictor 342 is activated when the prediction type of the current block is intra prediction, and inter prediction.
  • Unit 344 is activated when the prediction type of the current block is intra prediction.
  • the intra prediction unit 442 determines the intra prediction mode of the current block among the plurality of intra prediction modes by using the syntax element for the intra prediction mode extracted from the decoder 410, and surrounds the current block according to the determined intra prediction mode. Predict the current block by using the reference pixels.
  • the intra prediction unit 442 infers the CNN by using the coefficients of the convolution kernel determined by the image encoding apparatus (ie, the filter coefficients). By predicting the current block can be predicted.
  • the inter prediction unit 444 determines a motion vector of the current block and a reference picture to which the motion vector refers by using syntax elements of the inter prediction mode extracted from the decoder 410, and then uses the motion vector and the reference picture. Predict the current block.
  • the inter prediction unit 444 may generate a motion vector of the current block or directly generate prediction pixels of the current block through a CNN-based inference process.
  • the inter prediction unit 444 first generates motion vectors or prediction pixels of the current block according to an existing inter prediction scheme (ie, motion compensation MC), and then secondly, the corresponding motion vectors or prediction pixels. By refining them through a CNN based inference process, the motion vector or the prediction pixels of the current block may be finally generated.
  • an existing inter prediction scheme ie, motion compensation MC
  • the inter prediction unit 444 may operate in parallel with the CNN-based inter prediction method together with the existing inter prediction method.
  • the decoder 410 further decodes information (eg, a flag) indicating whether the prediction type information indicates CNN based inter prediction.
  • the inter prediction unit 444 selectively performs an existing inter prediction method or CNN based inter prediction according to information indicating whether the decoder 410 is CNN based inter prediction.
  • the inter prediction unit 444 may independently operate only the CNN based inter prediction scheme. In this case, the inter prediction unit 444 performs CNN based inter prediction when the prediction type information (information indicating whether intra prediction or inter prediction) decoded by the decoder 410 indicates inter prediction.
  • the adder 450 reconstructs the current block by adding the residual block output from the inverse transformer 430 and the prediction block output from the inter predictor 444 or the intra predictor 442.
  • the pixels in the reconstructed current block are used as reference pixels for intra prediction of a block to be decoded later.
  • the filter unit 460 includes a deblocking filter 462 and a SAO filter 464.
  • the deblocking filter 462 removes blocking artifacts caused by block-by-block decoding by deblocking filtering the boundary between the reconstructed blocks.
  • the SAO filter 464 performs additional filtering on the reconstructed block after the deblocking filtering to compensate for the difference between the reconstructed pixel and the original pixel resulting from lossy coding.
  • the reconstructed block filtered through the deblocking filter 462 and the SAO filter 464 is stored in the memory 470, and when all the blocks in one picture are reconstructed, the reconstructed picture intercepts the block in the picture to be subsequently encoded. It is used as a reference picture for prediction.
  • the techniques of this disclosure generally relate to applying artificial neural network techniques to image encoding or decoding.
  • Some techniques of this disclosure relate to a CNN-based filter capable of performing the functions of a deblocking filter and a SAO filter in an image encoding apparatus and a decoding apparatus. Some other techniques of this disclosure relate to performing CNN based intra prediction. Some other techniques of this disclosure relate to performing CNN based inter prediction. Some other techniques of this disclosure relate to performing CNN based filtering on a reference region used for intra prediction of the current block.
  • FIG. 5 is a diagram illustrating an exemplary structure of a CNN that may be used in the techniques of this disclosure.
  • a convolutional neural network is a multilayer neural network having a special connection structure designed for image processing, and may include an input layer 510, a hidden layer 530, and an output layer 550.
  • the hidden layer 530 is positioned between the input layer 510 and the output layer 550 and may include a plurality of convolution layers 531 to 439.
  • the hidden layer 530 may further include an upsampling layer or a pooling layer in order to adjust the resolution of a feature map that is a result of the convolution operation.
  • the CNN may have a structure (not shown) in which ResNet is combined with VDSR (Very Deep Super Resolution) or VDSR.
  • All layers constituting the CNN each include a plurality of nodes, and each node may be interconnected with nodes of other adjacent layers so as to transfer an output value to which a predetermined connection weight is applied as an input of other nodes.
  • the convolution layers 531 to 539 may generate a feature map by performing a convolution operation on image data input to each layer using a convolution kernel (ie, a filter) in the form of a 2D matrix or a 3D matrix.
  • a convolution kernel ie, a filter
  • the feature map refers to image data in which various features of image data input to each layer are expressed.
  • the number of convolution layers 531 to 539, the size of the convolution kernel, and the like may be preset before the learning process.
  • the output layer 550 may be composed of a fully connected layer.
  • the nodes of the output layer 550 may output image data by combining various features expressed in the feature map.
  • the CNN algorithm can be divided into learning process and inference process.
  • the learning process may be classified into supervised learning, unsupervised learning, and reinforcement learning according to a learning method.
  • supervised learning refers to coefficient values (ie, filters) of the convolution kernel using an output label that is an explicit answer to data input to the input layer 510 (hereinafter referred to as 'input data'). Coefficient).
  • the filter coefficient of the CNN may be calculated through repeated supervised learning using an error backpropagation algorithm for predetermined input data. Specifically, according to the error backpropagation algorithm, the error between the output data of the CNN and the output label propagates in the reverse direction from the output layer 550 through the hidden layer 530 to the input layer 510. In the process of propagation of the corresponding error, the connection weights between the nodes are updated in the direction of reducing the corresponding error. In addition, by repeating the supervised learning process of the CNN until the corresponding error is less than a preset threshold, an optimal filter coefficient to be used in the inference process of the CNN may be calculated.
  • the CNN-based filter described below may be used in both the image encoding apparatus and the image decoding apparatus.
  • the CNN-based filter may be used in place of the deblocking filter 182 and the SAO filter 284 of the image encoding apparatus, and may be used in place of the deblocking filter 462 and the SAO filter 464 of the image decoding apparatus.
  • CNN-based filters are described using YUV as an example of information constituting pictures, but CNN-based filters may be applied to RGB, YCbCr, and the like. That is, in the following description, it should be understood that 'YUV to improve picture quality' may be 'RGB to improve picture quality' or 'YCbCr to improve picture quality'.
  • FIG. 6 illustrates a CNN-based filter according to an embodiment of the present invention.
  • a YUV difference ( 621 is output.
  • the YUV 601 to improve the image quality may be a YUV 601 reconstructed from the bit stream received from the encoder, and means a YUV in which the original YUV is artificially or unartificially damaged.
  • a hint (not shown) may also be input to the input layer.
  • the coefficients of the CNN-based filter that is, the coefficients of the convolution kernel
  • the coefficients of the CNN-based filter are trained such that the YUV difference 621 outputted to the output layer is the difference between the original YUV and the YUV to improve the image quality.
  • the convolution kernel is available in 2D and 3D forms.
  • the CNN-based filter 611 is for improving the image quality of the input YUV, and the final output of the CNN-based filter 611 is called YUV, that is, the YUV 631 with improved image quality.
  • the YUV to improve the image quality may be filtered for each channel or may be filtered at once.
  • the size of the QP map may be set to the same resolution as the input YUV to be filtered, and the value of the QP map may be filled with QP values used in coding units in the YUV plane, for example, blocks or sub-blocks.
  • the YUV is filtered for each channel, one map may be configured with the QP value of the channel to be filtered.
  • the QP values of the three channels may consist of three separate maps or one map having an average QP value.
  • block mode map information useful for the learning process may be added as hint information in addition to the QP map, the block division map, and the image to be improved in quality as an input layer.
  • the block mode map may be filled with a mode value used in a coding unit, for example, a block or a sub block.
  • the information may be information for distinguishing whether a block is encoded in an intra mode or an inter mode, and the information may be represented by a number.
  • the convolution kernel coefficient that is a result of the learning process may be set to include not only the data of the input layer but also a hint.
  • the input layer and output layer of the learning process and the inference process of the CNN technique should be configured identically.
  • the inference process generates the YUV with improved image quality from the YUV, the quantization parameter map, and the block partitioning map to improve the image quality by applying the coefficients of the CNN-based filter obtained in the learning process.
  • FIGS. 7A to 7C are diagrams illustrating structures of a CNN having different positions of a concatenated layer according to an embodiment of the present invention.
  • the YUV 701, the quantization parameter map 703, and the block partition map 705, which may improve the image quality input to the input layer 710, may be concatenated through the concatenate layer 720 during the CNN process. Can be. However, the position of the contiguous layer 720 may be changed as illustrated in FIGS. 7A, 7B, and 7C.
  • a contiguous layer 720 is positioned immediately after the input layer 710, and a YUV 701, a quantization parameter map 703, and a block partition map 705 are input to the input layer 710 to improve image quality. It shows the structure of the CNN that is immediately connected.
  • FIG. 7B illustrates the structure of the CNN in which the concatenated layer 720 is located between the convolution layers 730
  • FIG. 7C illustrates the structure of the CNN in which the concatenated layer 720 is positioned immediately before the output layer 740.
  • 8A to 8C illustrate data to be input to an input layer according to an embodiment of the present invention.
  • FIG. 8A illustrates that a Y plane (for example, a Y coding tree block (CTB)) for improving image quality is omitted in a pixel value of luminance luma for improving image quality.
  • CTB Y coding tree block
  • FIG. 8c shows a block division map of the Y plane to improve the image quality.
  • the block partitioning map indicates whether a block is divided or not, so that the processing of the partitioned boundary of the block and the inner region of the block may be differently performed during the CNN's learning process and inference process.
  • 9A and 9B show an example of a block partitioning map according to an embodiment of the present invention.
  • the block division map may be set to the same resolution as the YUV plane to be filtered and may be configured to indicate whether to block the partition.
  • the block partitioning map may represent a division boundary of the coding blocks in the coding tree block.
  • FIG. 9A illustrates a coding tree block divided by a quadtree plus binary tree (QTBT) scheme
  • FIG. 9B illustrates a block partitioning map according to the coding tree block. Referring to FIG. 9B, the boundaries of the coding blocks are indicated by '1' and the inside of the coding blocks are indicated by '0' in the block division map.
  • 10A to 10B show another example of a block partitioning map according to an embodiment of the present invention.
  • FIGS. 10A to 10B when the YUV plane consists of coding tree blocks, blocking deterioration processing on boundaries of the coding tree blocks may not be possible, and thus an extra area ⁇ may be added to the YUV plane.
  • 10A and 10B show an example in which 2 pixels are set as the extra area ⁇ , but other values may be set.
  • the boundary of the coding tree block may be indicated by the extra area, and whether or not the block is split may be displayed also in the area outside the coding tree block. If the filtering includes an extra area, an area overlapping with another adjacent coding tree block is generated after the filtering, and the overlapping area may be processed as an average value.
  • FIG. 10C when the coding tree blocks 1001 and 1003 including an extra area are adjacent to each other, an overlapping area 1005 is formed.
  • the overlapping region 1005 may be set to an average value of values of adjacent coding tree blocks 1001 and 1003.
  • 11A to 11C illustrate block division maps for adjusting the strength of deblocking according to an embodiment of the present invention.
  • the boundary of the coding block is distinguished by 1 pixel.
  • the value of the 1 pixel is 0, the inside of the coding block is represented, and the 1 is the boundary of the coding block.
  • the boundaries of the coding blocks are expressed by the number of pixels (or, pixel width, luma sample line, luma sample length, etc.) in order to control the strength of de-blocking.
  • the number of pixels may be determined by at least one of a size of a coding block, a value of a quantization parameter, and an encoding mode. For example, as shown in FIG. 11A, when the coding block is large, the number of pixels may be set to two, and when the coding block is small, the number of pixels may be set to one. In addition, if the value of the quantization parameter is large, the number of pixels may be increased. If the value of the quantization parameter is small, the number of pixels may be set. As another example, when the encoding mode is intra, the number of the pixels may be increased, and when the encoding mode is inter, the number of the pixels may be set to be small. These can all be set in reverse.
  • the number of pixels may mean the number of pixels located at a block boundary to be updated by filtering. For example, when a 3 pixel value in one block located at the block boundary line is to be updated, the boundary of the block may be indicated by 3 pixels in the block division map. As another example, the number of pixels may mean the number of pixels located at a block boundary line to be referred to for filtering. For example, when filtering is performed by referring to 4 pixel values of a block located at a block boundary line, the block boundary may be indicated by 4 pixels in the block division map.
  • the boundary value of the coding block is displayed differently in order to adjust the strength of deblocking.
  • the boundary value of the coding block may be determined by at least one of a size of a coding block, a value of a quantization parameter, an encoding mode, a number of pixels to be updated, and a number of pixels to be referred to for filtering.
  • the boundary value of the coding block can be set large, and conversely, the coding block is small, or the value of the quantization parameter is small. If the encoding mode is inter, the boundary value of the coding block may be set small. Both of these can also be set in reverse.
  • FIG. 11C shows the number of pixels at the boundary of the coding block and the boundary value of the coding block in order to control the strength of deblocking. Descriptions thereof will be omitted herein as described with reference to FIGS. 11A and 11B.
  • the configured block partitioning map is used in the learning process to help the CNN filter to operate as a strong deblocking filter.
  • FIG. 12 illustrates a flowchart of decoding an image using a CNN-based filter according to an embodiment of the present invention.
  • At least one of a quantization parameter map and a block partitioning map and a YUV for improving image quality are input to the CNN-based filter (1201).
  • the quantization parameter map may be set to the same resolution as the YUV to improve the image quality.
  • the block partitioning map may be displayed differently between the partitioned boundary of the block and the inner region of the block.
  • the number and value of pixels representing the partitioned boundary of the block in the block division map are determined by at least one of the size of the coding block, the value of the quantization parameter, the encoding mode, the number of pixels to be updated, and the number of pixels to be referred to for filtering. Can be determined.
  • a YUV having improved image quality is output using a coefficient of the CNN-based filter learned using the original YUV as a final output (1203).
  • a hint such as a block mode map is additionally input to the CNN-based filter
  • the hint of the CNN-based filter is additionally input and learned.
  • FIG. 13 is a diagram schematically illustrating a configuration of an apparatus for decoding an image according to an embodiment of the present invention.
  • the apparatus illustrated in FIG. 13 may be, for example, a component or a module corresponding to the filter unit 460 of FIG. 4.
  • the apparatus for decoding the image may include an input unit 1301, a filter unit 1303, and an output unit 1305. Other configurations may be included, but a description of components not directly related to the present disclosure will be omitted.
  • the input unit 1301 inputs at least one of a quantization parameter map and a block division map and a YUV for improving image quality.
  • the quantization parameter map may be set to the same resolution as the YUV to improve the image quality, and the block partitioning map may be displayed differently between the partitioned boundary of the block and the internal region of the block.
  • the number and value of pixels representing the divided boundary of the block in the block division map may be determined by at least one of a size of a coding block, a value of a quantization parameter, and an encoding mode.
  • the filter unit 1303 applies at least one of the quantization parameter map and the block division map input to the input unit 1301 and the coefficients of the CNN-based filter learned to the YUV to improve the image quality.
  • the output unit 1305 outputs a YUV having an improved image quality by applying at least one of the input quantization parameter map and the block division map and the coefficients of the CNN-based filter learned to the YUV to improve the image quality.
  • the input unit 1301, the filter unit 1303, and the output unit 1305 have been described, but they may be integrated into one configuration and implemented, and one configuration may be divided into several configurations. It may be.
  • Some techniques of this disclosure relate to performing CNN based intra prediction.
  • a technique of performing CNN-based intra prediction will be described with reference to FIGS. 14 to 21.
  • FIG. 14 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to an embodiment of the present invention.
  • the CNN predictor 1400 of FIG. 14 may be, for example, an intra predictor 122 of the image encoding apparatus illustrated in FIG. 1 or a module included in the intra predictor 122.
  • the CNN prediction unit 1400 may restore the encoding object image (that is, the original image) transferred from the block splitter (eg, 110 of FIG. 1) and the adder (eg, 170 of FIG. 1).
  • a prediction block may be generated by performing CNN based intra prediction on an image.
  • the CNN prediction unit 1400 may include a CNN setting unit 1410 and a CNN execution unit 1430.
  • the CNN setting unit 1410 may calculate filter coefficients, that is, coefficients of a convolution kernel, by performing supervised learning using a CNN composed of a plurality of layers.
  • the structure of the CNN is as described above with reference to FIG. 5, and the CNN may further include an upsampling layer or a pulling layer to adjust the size of the layer.
  • Image data input to the input layer may be configured as a reference region encoded before the current block.
  • the reference region includes a neighboring region adjacent to the current block, and a block of components (hereinafter, referred to as 'current blocks of other channels') that are encoded before the block of the component to be encoded among the luma blocks and chroma blocks constituting the current block. It may include at least one block (or area).
  • the peripheral area may be an area of the same channel as the current block or an area of another channel.
  • the peripheral area may be configured in block units (ie, peripheral blocks) or in pixel units (ie, peripheral pixels or peripheral lines).
  • the reference region may further include a new region (ie, an average block, an average pixel, or an average line) generated by averaging pixel values of the peripheral region.
  • FIG. 15 is an exemplary diagram of a peripheral region that can be used as input data of a CNN. Specifically, FIG. 15A illustrates a peripheral area in block units, and FIG. 15B illustrates a peripheral area in pixel units.
  • the reference area that is, the neighboring blocks in block units, includes the left block C, the upper block B, the right upper block D, and the lower left block E adjacent to the current block X.
  • original blocks ie, uncoded blocks
  • prediction blocks ie, prediction blocks
  • reconstruction blocks of neighboring blocks are denoted differently.
  • the original block is denoted by 'Ao'
  • the predictive block is denoted by 'Ap'
  • the reconstructed block is denoted by 'Ar'.
  • an average block obtained by averaging pixel values of the neighboring blocks A, B, C, D, and E is denoted by 'F'.
  • the pixel-based reference region may include pixels of '1 ⁇ 1' adjacent to the current block X, and lines of '1 ⁇ n' or 'n ⁇ 1'. .
  • the reference region in the block unit has a wider application range of the convolution kernel than the reference region in the pixel unit, the accuracy of the CNN's learning process and inference process can be improved.
  • the present embodiment will be described on the premise that the reference region is in block units.
  • chroma blocks are either used at their original size, or up-scaled using an upsampling layer to be the same size as the luma block. Can be used.
  • the right block of the current block X When neighboring blocks of a channel different from the current block are input to the input layer, the right block of the current block X, in addition to the neighboring blocks Ar, Br, Cr, Dr, Er shown in FIG.
  • One or more blocks (not shown) of the lower block and the lower right block may be further input to the input layer.
  • the accuracy of intra prediction may be improved by adding one or more blocks among the right block, the lower block, and the right lower block of the current block of the luma channel, which have already been encoded, as input data.
  • 16 is a diagram illustrating an example of configuring an input layer of a CNN from a plurality of neighboring blocks.
  • the input layer may be composed of a plurality of layers for each of the neighboring blocks Ar, Br, Cr, Dr, and Er, as shown in FIG. 16A, and as shown in FIG. 16B. Peripheral blocks of Ar and Br may be integrated into one layer.
  • the image data output from the output layer may be a prediction block of the current block.
  • the output label may be composed of original blocks (ie, unencoded blocks) of the current block for supervised learning through comparison with the output data.
  • Table 1 shows some example configurations of the CNN layer.
  • the exemplary embodiments are not intended to limit the embodiments to which the technology of the present disclosure may be applied thereto.
  • CNN layer example Input layer Output layer data data Label Example 1 Neighboring blocks of the same channel as the current block Predictive block of current block Original block of the current block
  • Example 2 -Current block of channel different from current block Predictive block of current block Original block of the current block
  • Example 3 Neighboring blocks of the same channel as the current block and their average blocks current blocks of other channels
  • Example 4 Peripheral blocks of the same channel as the current block and their average blocks current blocks of the other channels neighbor blocks of the other channels and their average blocks Predictive block of current block Original block of the current block
  • the data of the input layer may be configured in various combinations
  • the data of the output layer is the prediction block of the current block
  • the label of the output layer is the original block of the current block.
  • Input data and output data should be the same in the learning process and inference process of CNN, respectively.
  • the CNN setting unit 1410 may set the hint information to minimize the error between the output data and the output label and improve the accuracy of intra prediction.
  • the hint information may include at least one of directional information of intra prediction, a quantization parameter (QP) of the current block or reference region, and an absolute sum of transform coefficients or residual signals of the neighboring block (ie, the amount of residual). It may include.
  • the hint information may be transmitted to the image decoding apparatus through the bitstream and used to decode the current block.
  • 17 is an exemplary diagram for describing a suitable prediction direction for a current block in view of the pixel value form of neighboring blocks.
  • neighboring blocks of the current block X are composed of an upper left block A, an upper block B, and a left block C.
  • FIG. 17 neighboring blocks of the current block X are composed of an upper left block A, an upper block B, and a left block C.
  • the upper left block A is about half white, and the left block C is mostly white.
  • the upper block (B) is mostly colored other than white.
  • the upper left block A and the left block C are mostly white, but the upper block B is white. Usually color other than white. Considering that most pixel value forms of the current block X have a color other than white, it can be seen that performing intra prediction in the vertical direction (vertical direction) can maximize the prediction accuracy.
  • the CNN prediction unit 1400 intends to improve the accuracy of intra prediction by using the directional information of the intra prediction as hint information of the learning process and the inference process of the CNN.
  • the directional information of intra prediction may be an intra prediction mode number indicating 65 directional modes and non-directional modes illustrated in FIG. 3.
  • the hint information including one or more prediction directional information may be encoded by the encoder 150 of the image encoding apparatus of FIG. 1 and transmitted to the image decoding apparatus of FIG. 4.
  • the CNN setting unit 1410 selects some of the 65 prediction directions (eg, horizontal direction, vertical direction, diagonal down-right direction, diagonal up-right direction, etc.) as a representative direction, and selects one of the selected representative directions. May be set as hint information for intra prediction of the current block.
  • the CNN setting unit 1410 may transmit the hint information to the image decoding apparatus in a manner similar to that of the most probable mode (MPM).
  • MPM most probable mode
  • the hint information may include a quantization parameter (QP) indicating the strength of the quantization.
  • QP quantization parameter
  • the QP may be a QP value applied to the quantization process of the current block or reference region.
  • the hint information may include the amount of residuals.
  • the amount of residual may be the sum of the transform coefficients of the neighboring block or the absolute value of the residual signals.
  • the hint information may be composed of one or more maps and may be concatenated with a layer of the CNN.
  • the map for the hint information may be concatenated at various locations between the input layer and the output layer.
  • the map for the hint information may be concatenated immediately after the input layer as shown in FIG. 18, or may be concatenated immediately before the output layer.
  • the input data may be configured in various combinations according to the direction of intra prediction.
  • the directionality of the intra prediction is the horizontal direction (horizontal direction)
  • the input data may be composed of one or more blocks selected from the left neighboring blocks Ar, Cr, Er of the current block X and their average blocks. Can be.
  • the input data may consist of one or more blocks selected from the upper neighboring blocks Ar, Br, and Dr of the current block X and their average blocks. Can be.
  • the CNN setting unit 1410 may calculate filter coefficients through an iterative learning process using an error backpropagation algorithm in order to minimize an error between the output data and the output label.
  • the error between the output data and the output label may be propagated in the reverse direction from the output layer of the CNN to the input layer via the hidden layer.
  • the connection weights between nodes may be updated in a direction to reduce the corresponding error.
  • the CNN setting unit 1410 may calculate the filter coefficients by repeating the learning process of the CNN using the error backpropagation algorithm until the corresponding error is less than a predetermined threshold.
  • the above filter coefficient calculation process may be performed in a predetermined unit (eg, CU, CTU, slice, frame, or sequence (group of frames)).
  • the CNN setting unit 1410 may calculate filter coefficients for each current block or may calculate filter coefficients for each frame.
  • the filter coefficient When the filter coefficient is calculated in units of frames, the filter coefficient may be commonly used for intra prediction of a plurality of current blocks included in the frame.
  • the prediction direction information which is one of the hint information, may also be plural.
  • one map when the intra prediction directional information is composed of one map, one map may include a plurality of directional values.
  • the calculated information about the filter coefficients may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
  • the CNN setting unit 1410 may configure a filter coefficient set by previously calculating a plurality of filter coefficients using predetermined sample images.
  • the CNN setting unit 1410 may set one filter coefficient selected according to a predetermined criterion in the set as the filter coefficient for the current block. For example, the CNN setting unit 1410 may select one filter coefficient from the set based on the similarity of pixel values between the current block and the sample images. Alternatively, the CNN setting unit 1410 may select a filter coefficient closest to the filter coefficient calculated through one learning process from the set.
  • the selection information of the filter coefficient for example, the index information, may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
  • FIG. 14 illustrates that the CNN setting unit 1410 is included in the CNN prediction unit 1400, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 1410 may be implemented as a separate unit from the CNN prediction unit 1400, or may be integrated with the CNN execution unit 1430 and implemented as one unit.
  • the CNN execution unit 1430 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1410, that is, the coefficient values of the convolution kernel, thereby outputting the output data, that is, the current block.
  • a prediction block can be generated.
  • the generated prediction block may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
  • FIG. 19 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention.
  • the CNN predictor 1900 of FIG. 19 may be, for example, an intra predictor 442 of the image decoding apparatus illustrated in FIG. 4, or a module included in the intra predictor 442.
  • the CNN predictor 1900 of FIG. 19 differs only in a method of setting input signals and filter coefficients, that is, coefficient values of a convolution kernel, from the CNN predictor 1400 of FIG. 14. The description will be omitted or briefly described.
  • the CNN prediction unit 1900 may generate a prediction block by performing CNN-based intra prediction based on a reconstructed image.
  • the CNN prediction unit 1900 may include a CNN setting unit 1910 and a CNN execution unit 1930.
  • the structure of the CNN is as described above with reference to FIG. 5, and the CNN may further include an upsampling layer or a pulling layer to adjust the size of the layer.
  • the image data input to the input layer (hereinafter referred to as 'input data') may be configured as a reference region decoded before the current block.
  • the reference region includes a neighboring region adjacent to the current block, and a block of components decoded before the block of the component to be decoded among the luma blocks and chroma blocks constituting the current block (hereinafter, referred to as a current block of another channel). It may include at least one block (or area).
  • the peripheral area may be an area of the same channel as the current block or an area of another channel.
  • the peripheral area may be configured in block units (ie, peripheral blocks) or in pixel units (ie, peripheral pixels or peripheral lines).
  • the reference region may further include a new region (ie, an average block, an average pixel, or an average line) generated by averaging pixel values of the peripheral region.
  • the input data may be composed of neighboring blocks of the same channel as the current block and current blocks of a channel different from the average block thereof.
  • the input layer may be composed of a plurality of layers for each of the neighboring blocks, or a plurality of neighboring blocks may be integrated into one layer.
  • the image data output from the output layer (hereinafter, referred to as 'output data') may be a prediction block of the current block.
  • CNN layer Some configuration examples of the CNN layer are as described above with reference to Table 1. However, it should be noted that this is exemplary and does not limit the present embodiment.
  • the CNN setting unit 1910 may configure one or more maps using the hint information transmitted from the image encoding apparatus, and then concatenate at various positions between the input layer and the output layer.
  • the hint information is information for improving the accuracy of intra prediction.
  • the hint information includes information on prediction directionality, a quantization parameter (QP) of the current block or reference region, and an absolute sum of transform coefficients or residual signals of a neighboring block (ie, residual). It may comprise at least one of).
  • QP quantization parameter
  • residual absolute sum of transform coefficients or residual signals of a neighboring block
  • the prediction directional information included in the hint information may be an intra prediction mode number indicating 65 directional modes and a non-directional mode, or may be index information indicating any one or more representative directions selected from the 65 directional modes. have.
  • the input data may be configured in various combinations according to the direction of intra prediction.
  • the directionality of the intra prediction is the horizontal direction (horizontal direction)
  • the input data may be composed of one or more blocks selected from the left neighboring blocks of the current block and their average blocks.
  • the directionality of the intra prediction is in the vertical direction (vertical direction)
  • the input data may be composed of one or more blocks selected from upper neighboring blocks of the current block and their average blocks.
  • the CNN setting unit 1910 may set the filter coefficients transmitted from the image encoding apparatus as filter coefficients for intra prediction of the current block.
  • the filter coefficient may be a value calculated by a video encoding apparatus in a predetermined unit, for example, a CU unit or a frame unit.
  • the filter coefficient When the filter coefficient is set in units of frames, the filter coefficient may be commonly used for intra prediction of a plurality of current blocks included in the frame.
  • the prediction direction information which is one of the hint information, may also be plural.
  • the directional information of intra prediction is composed of one map, but may include a plurality of directional values in one map.
  • the CNN setting unit 1910 may set filter coefficients for intra prediction of the current block based on index information of the filter coefficients transmitted from the image encoding apparatus. have.
  • FIG. 19 illustrates that the CNN setting unit 1910 is included in the CNN prediction unit 1900, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 1910 may be implemented as a separate unit from the CNN prediction unit 1900. In addition, the CNN setting unit 1910 may be integrated with the CNN execution unit 1930 and implemented as one unit.
  • the CNN execution unit 1930 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1910, that is, the coefficient values of the convolution kernel, and thus, output data, that is, the current block, for the current block.
  • a prediction block can be generated.
  • the generated prediction block may be transferred to an adder and added to the residual block to be used to recover the current block.
  • FIG. 20 is a flowchart illustrating an operation of a CNN prediction unit that may be included in the image encoding apparatus illustrated in FIG. 14.
  • the CNN setting unit 1410 may set input data and an output label of the CNN.
  • the input data may be composed of a reference region encoded before the current block.
  • the input data may be composed of neighboring blocks of the same channel as the current block.
  • the input data may be composed of neighboring blocks of the same channel as the current block, average blocks thereof, and current blocks of channels different from the current block.
  • the data of the output layer may be a prediction block of the current block, and the label of the output layer may be composed of the original block of the current block.
  • the CNN setting unit 1410 may set the directional information of the prediction as the hint information in order to improve the accuracy of the intra prediction.
  • the set hint information may be transmitted to the image decoding apparatus through the bitstream and used to decode the current block.
  • the input data may be configured in various combinations according to the direction of intra prediction.
  • the CNN setting unit 1410 may calculate filter coefficients through a learning process.
  • the CNN setting unit 1410 may repeat the learning process using an error backpropagation algorithm to improve the accuracy of intra prediction.
  • the filter coefficient calculation process may be performed in a predetermined unit, for example, a frame unit or a block unit.
  • the CNN setting unit 1410 may configure a filter coefficient set by calculating a plurality of filter coefficients in advance by using predetermined sample images. In this case, the CNN setting unit 1410 may set one filter coefficient selected according to a predetermined criterion in the set as the filter coefficient for the current block.
  • the CNN execution unit 1430 performs the CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1410, that is, the coefficient values of the convolution kernel, thereby outputting the data.
  • a prediction block for the current block may be generated.
  • the generated prediction block may be transferred to a subtractor (eg, 130 of FIG. 1) of the image encoding apparatus and used to generate a residual block from the current block.
  • FIG. 21 is a flowchart illustrating an operation of a CNN predictor that may be included in the image decoding apparatus illustrated in FIG. 19.
  • the CNN setting unit 1910 may set filter coefficients for intra prediction of the current block based on information about filter coefficients transmitted from the image encoding apparatus.
  • the input data of the CNN may be composed of a reference region decoded before the current block, and the output data becomes a prediction block for the current block.
  • the CNN setting unit 1910 configures the hint information extracted by the decoder (eg, 410 of FIG. 4) as a map and concatenates the layer of the CNN. (concatenation) can be.
  • the input data may be configured in various combinations according to the direction of intra prediction.
  • the CNN execution unit 1930 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1910, that is, the coefficient values of the convolution kernel, thereby outputting the data.
  • a prediction block for the current block may be generated.
  • the generated prediction block may be transferred to an adder (eg, 450 of FIG. 4) and added to the residual block to be used to recover the current block.
  • Some techniques of this disclosure relate to performing CNN based inter prediction.
  • a technique of performing CNN-based inter prediction will be described with reference to FIGS. 22 to 28.
  • the CNN predictor 2200 of FIG. 22 may be, for example, an inter predictor 124 of the image encoding apparatus illustrated in FIG. 1, or one module included in the inter predictor 124.
  • the CNN prediction unit 2200 may include a CNN setting unit 2210 and a CNN execution unit 2230.
  • the CNN predictor 2200 sets image data (that is, input data) and filter coefficients (that is, coefficients of a convolution kernel) to be input to an input layer of the CNN, and uses the CNN to use the CNN. By inferring the current block can be predicted.
  • the CNN setting unit 2210 may set input data.
  • the CNN setting unit 2210 may select at least one reference picture and set a search region in the selected reference picture as input data.
  • the search area in the reference picture means a specific area in the reference picture having a size equal to or larger than the size of the current block.
  • the position of the search region in the reference picture may be determined based on the position of the current block.
  • the position may be the same position as the current block in the reference picture or a position shifted from the same position by a predefined motion vector.
  • the predefined motion vector may be a motion vector (MV) of a neighboring block adjacent to the current block, or an initial MV or a predicted motion vector shared between the video encoding apparatus and the video decoding apparatus. MV) can be used.
  • MV motion vector
  • MV global motion vector
  • the size of the search area in the reference picture may be the same size as the current block or may be an extended size than the current block.
  • the size of the search area may be a size of an area in which a block having the same size as the current block located at the location of the search area is extended left and right by the x coordinate of the above-described predefined motion vector and expanded up and down by the y coordinate. have.
  • the CNN setting unit 2210 may select a reference picture based on the inter prediction direction. For example, in the case of unidirectional prediction, a reference picture of a specific order of reference picture list 0 may be selected. In the case of bidirectional prediction, a reference picture of a particular order of reference picture list 0 and a reference picture of a particular order of reference picture list 1 may be selected.
  • the information on the reference picture to be used as the input data of the CNN may include selection information (eg, reference picture index value) for a reference picture of a specific order in a specific reference picture list.
  • the information about the reference picture may be transmitted to the image decoding apparatus through the encoder (for example, 190 of FIG. 1).
  • the information about the reference picture may be encoded as a syntax of the coding unit (CU) so that different reference pictures for each coding unit may be used as input data of the CNN.
  • the information about the reference picture is encoded as a syntax of a higher unit than the coding unit, for example, CTU, slice, PPS, or SPS, so that the same reference pictures are input data of the CNN for all the coding units included in the higher unit. It can also be used.
  • the CNN setting unit 2210 may select a reference picture that is predefined so that the image encoding apparatus and the image decoding apparatus share a reference picture to be used as input data of the CNN. For example, in the case of unidirectional prediction, a first reference picture (eg, a reference picture corresponding to reference picture index 0) and a second reference picture (eg, a reference picture corresponding to reference picture index 1) of reference picture list 0 may be selected. Can be.
  • the first reference picture of reference picture list 0 e.g., reference picture corresponding to reference picture index 0
  • the first reference picture of reference picture list 1 e.g., reference picture corresponding to reference picture index 0
  • the CNN setting unit 2210 may set the input data of the CNN by selecting the reference picture in various ways.
  • the CNN setting unit 2210 selects at least one reference picture to be used as input data of the CNN from among the plurality of reference pictures, and encodes information about the selected reference picture by the encoder (eg, 190 of FIG. 1). It can also be delivered to the image decoding apparatus through.
  • information about a reference picture to be used as an input of the CNN may be encoded as a syntax of a coding unit (CU), so that different reference pictures for each coding unit may be used as input data of the CNN.
  • CU coding unit
  • the information about the reference picture to be used as the input of the CNN is encoded as a syntax of a higher unit than the coding unit, for example, CTU, slice, PPS, or SPS, so that the same reference pictures are included for all coding units included in the higher unit. It can also be used as input data for a CNN.
  • the information on the reference picture to be used as the input of the CNN may be a picture order count (POC) value of the selected picture or a difference value between the POC value of the selected picture and the POC value of the current picture.
  • POC picture order count
  • the CNN setting unit 2210 may further set at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region as additional input data.
  • the peripheral area may be an area of the same component as the current block or may be an area of another component.
  • the peripheral area may be configured in block units (ie, peripheral blocks) or in pixel units (ie, peripheral pixels or peripheral lines).
  • the motion vectors of the plurality of peripheral regions may be set as input data individually or in combination with one or more motion vectors.
  • all input data is assumed to be a luma component.
  • the input data may consist of various combinations of three components (ie, Y, Cb, Cr).
  • the motion vector as input data may be represented using a color code.
  • the color code is a mapping of coordinate values of a motion vector to color values.
  • the motion vector represented by the color code may be input to the CNN by configuring one or more maps. For example, the colors are mapped to two-dimensional planes of the x coordinate and the y coordinate, and a color value corresponding to the value of the motion vector (x, y) is used as the color code of the motion vector.
  • the motion vector may be represented by one map composed of x coordinate values of the corresponding motion vector and the other map composed of y coordinate values of the corresponding motion vector.
  • the map for the motion vector may have the same resolution as the area corresponding to the motion vector.
  • the map of the motion vector of the reconstructed peripheral area adjacent to the current block may have the same resolution as the size of the corresponding peripheral area.
  • the map for the motion vector may mean that a color code representing coordinate values of the motion vector is mapped to each pixel of the corresponding map.
  • the map for the motion vector may mean that the same color code is mapped for each predetermined region of the map corresponding to the unit of the motion vector. For example, when a unit of a motion vector is a region obtained by dividing a peripheral region, that is, a sub block unit, the same color code may be mapped to all pixels included in one sub block of the map.
  • a map composed of x coordinate values (or y coordinate values) for the motion vector may have an x coordinate value (or all pixels included in the unit of the motion vector) for each pixel of the map. , y coordinate value) itself may be mapped.
  • the CNN setting unit 2210 may include a pooling layer or an upsampling layer. You can adjust the resolution so that they are the same.
  • image data (ie, output data) output through the output layer of the CNN corresponding to the input data may be motion vectors or prediction pixels of the current block.
  • 23 is an exemplary diagram of a layer configuration of a CNN.
  • input data is set to a search region in two reference pictures and three peripheral regions in the current picture.
  • the peripheral areas are selected from the restored three blocks located on the upper side, the left side, and the upper left side with respect to the current block, and each is composed of a separate map and is input to the input layer.
  • the output data becomes the prediction pixels of the current block.
  • CNN layer example Input layer Output layer data data Label Example 1 -Search area in a plurality of reference pictures Motion vector of current block or prediction pixels of current block The actual motion vector of the current block or the original block of the current block Example 2 -Search region in a plurality of reference pictures-motion vector of the surrounding region Motion vector of current block or prediction pixels of current block.
  • the actual motion vector of the current block or the original block of the current block Example 3 -Search region in a plurality of reference pictures-peripheral region (restored pixels)
  • Motion vector of current block or prediction pixels of current block The actual motion vector of the current block or the original block of the current block
  • the actual motion vector of the current block or the original block of the current block
  • the data of the input layer can be composed of various combinations
  • the data of the output layer is the motion vector or prediction pixels of the current block
  • the label of the output layer is the actual motion vector of the current block or the original of the current block It becomes a block.
  • the actual motion vector of the current block may mean, for example, a motion vector calculated through motion estimation (ME) using a full search method or a motion vector obtained by refining it.
  • the input data and the output data should be basically the same in the learning process and the inference process of the CNN, respectively.
  • the CNN setting unit 2210 may further set the hint information as additional input data in order to improve the accuracy of inter prediction.
  • the hint information may include time axis distance information between the current picture and the reference picture, for example, a difference value between a picture order count (POC) value of the current picture and a POC value of the reference picture.
  • POC picture order count
  • the time axis distance information exists as many as the number of reference pictures.
  • the hint information may include a quantization parameter (QP).
  • QP quantization parameter
  • the quantization parameter used as the hint information may be selected from among quantization parameter values of the current block, the surrounding area, or the search area in the reference picture, and may be a value (eg, an average value) derived from at least some of them.
  • FIG. 24 is an exemplary diagram of time-base distance information between a current picture and a reference picture. Specifically, FIG. 24A shows a case of unidirectional prediction, and FIG. 24B shows a case of bidirectional prediction.
  • time axis distance information becomes -3 and -1 from the left side. Then, by using the motion estimation result (solid line) from the search area 2411 in the t-3 picture to the search area 2413 in the t-1 picture, the current in the t picture from the search area 2411 in the t-3 picture.
  • the motion vector up to block 2415 and the motion vector from the search region 2413 in the t-1 picture to the current block 2415 in the t picture can be inferred.
  • time axis distance information becomes -1 and +2 from the left side. Then, using the motion estimation result (solid line) from the search area 2431 in the t-1 picture to the search area 2435 in the t + 2 picture, the current in the t picture from the search area 2431 in the t-1 picture is obtained.
  • the motion vector up to block 2433 and the motion vector from the search region 2435 in the t + 2 picture to the current block 2433 in the t picture can be inferred.
  • the hint information may consist of one or more maps and may be concatenated with a layer of the CNN.
  • the map for the hint information may be concatenated at various locations between the input layer and the output layer.
  • the hint information may be transmitted to the image decoding apparatus through the bitstream and used to decode the current block.
  • FIG. 25 is an exemplary diagram of a layer configuration of a CNN including hint information.
  • input data is set to hint information including a search area and a map in two reference pictures.
  • the output data becomes the prediction pixels of the current block.
  • the CNN setting unit 2210 may calculate filter coefficients through an iterative learning process in order to minimize an error between the output data and the output label.
  • the CNN setting unit 2210 may use an error backpropagation algorithm.
  • the CNN setting unit 2210 may propagate an error between the output data and the output label in a reverse direction from the output layer to the input layer through the hidden layer in the learning process of the CNN.
  • the CNN setting unit 2210 may update the connection weights between the nodes to reduce the corresponding error.
  • the CNN setting unit 2210 may calculate filter coefficients by repeating a learning process using an error backpropagation algorithm until the corresponding error is less than a predetermined threshold.
  • the above filter coefficient calculation process may be performed in a predetermined unit (eg, CU, CTU, slice, frame, or sequence (group of frames)).
  • the CNN setting unit 2210 may calculate filter coefficients for each current block or may calculate filter coefficients for each frame.
  • the filter coefficients When filter coefficients are calculated in units of frames, the filter coefficients may be commonly used for inter prediction of a plurality of current blocks included in the frame.
  • the calculated information about the filter coefficients may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
  • the CNN setting unit 2210 may configure a filter coefficient set by previously calculating a plurality of filter coefficients using predetermined sample images.
  • the CNN setting unit 2210 may set one filter coefficient selected according to a predetermined criterion in the set as the filter coefficient for the current block. For example, the CNN setting unit 2210 may select one filter coefficient from the set based on the similarity of pixel values between the current block and the sample images. Alternatively, the CNN setting unit 2210 may select a filter coefficient closest to the filter coefficient calculated through one learning process from the set.
  • the selection information of the filter coefficient for example, the index information, may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
  • FIG. 22 illustrates that the CNN setting unit 2210 is included in the CNN predicting unit 2200, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 2210 may be implemented as a separate unit from the CNN predicting unit 2200, or may be integrated with the CNN executing unit 2230 and implemented as one unit.
  • the CNN execution unit 2230 may execute the CNN using the input data and the filter coefficients set by the CNN setting unit 2210 to generate a motion vector of the current block or directly generate prediction pixels of the current block.
  • the generated prediction pixels may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
  • the CNN prediction unit 2200 primarily generates motion vectors or prediction pixels of the current block according to existing inter prediction schemes (ie, motion prediction (ME) and motion compensation (MC)). Afterwards, the motion information or the prediction pixels of the current block may be finally generated by refining the corresponding motion vector or the prediction pixels through a CNN-based inference process.
  • existing inter prediction schemes ie, motion prediction (ME) and motion compensation (MC)
  • the CNN prediction unit 2200 determines a reference picture encoded and decoded before the current picture, and searches for reference pixels most similar to the current block in the determined reference picture.
  • the CNN predictor 2200 may generate motion vectors or prediction pixels of the current block by using the found reference pixels. In this case, the generated motion vector or prediction pixels of the current block are set as input data of the CNN by the CNN setting unit 2210.
  • the CNN setting unit 2210 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN.
  • the filter coefficient may be calculated by performing a CNN learning process on input data including a search region in a reference picture.
  • the input data may further include at least one of a peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region.
  • the input data may further include at least one of hint information for improving the accuracy of inter prediction, for example, time axis distance information between a current picture and a reference picture and a quantization parameter (QP).
  • the filter coefficient may be a value selected from a preset specific value or a set consisting of a plurality of preset specific values.
  • the CNN execution unit 2230 executes the CNN by using the input data and the filter coefficients set by the CNN setting unit 2210 to refine the motion vector or the prediction pixels of the current block, thereby improving the motion vector or the current block.
  • the prediction pixels can be finally generated.
  • the generated prediction pixels may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
  • FIG. 26 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention.
  • the CNN predictor 2600 of FIG. 26 may be, for example, an inter predictor 444 of the image decoding apparatus illustrated in FIG. 4, or one module included in the inter predictor 444.
  • the CNN predictor 2600 may include a CNN setting unit 2610 and a CNN execution unit 2630.
  • the CNN prediction unit 2600 determines a reference picture based on the reference picture selection information signaled from the image encoding apparatus, and performs the inference process of the CNN using the determined reference picture to move the current block.
  • Vector or prediction pixels can be generated.
  • the CNN setting unit 2610 may set input data.
  • the CNN setting unit 2610 may select a reference picture based on the reference picture selection information signaled from the image encoding apparatus, and set a search region in the selected reference picture as input data.
  • the search area in the reference picture means a specific area in the reference picture having a size larger than or equal to the size of the current block, and the position and size of the search area are as described above with reference to FIG.
  • the CNN setting unit 2610 may select the reference picture based on the information on the inter prediction direction signaled from the image encoding apparatus. For example, in the case of unidirectional prediction, similarly to a video encoding apparatus, a reference picture of a specific order of reference picture list 0 may be selected as input data. In the case of bidirectional prediction, similarly to the image encoding apparatus, a reference picture of a particular order of reference picture list 0 and a reference picture of a particular order of reference picture list 1 may be selected.
  • the selection information of the reference picture may be a value indicating a reference picture of a specific order in the selected reference picture list, for example, a reference picture index value.
  • the selection information of the reference picture may be a picture order count (POC) value of the selected picture or a difference value between the POC value of the selected picture and the POC value of the current picture.
  • POC picture order count
  • the CNN setting unit 2610 may further set at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region as additional input data.
  • the motion vector may consist of one or more maps expressed in color code.
  • the motion vector may be represented by one map composed of color values corresponding to the values of the corresponding vector (x, y).
  • the motion vector may be represented by one map composed of x coordinate values of the vector and the other map composed of y coordinate values of the vector.
  • image data (ie, output data) output through the output layer of the CNN corresponding to the input data may be motion vectors or prediction pixels of the current block.
  • the CNN setting unit 2610 may further set the hint information as additional input data in order to improve the accuracy of the inter prediction.
  • the hint information may include time-base distance information between a current picture and a reference picture, for example, a difference value between a picture order count (POC) value of the current picture and a POC value of the reference picture.
  • POC picture order count
  • the time axis distance information exists as many as the number of reference pictures.
  • the hint information may include a quantization parameter (QP) value of a current block, a peripheral region, or a search region in a reference picture.
  • QP quantization parameter
  • the hint information may be concatenated with the input layer or the convolutional layer of the CNN to form one concatenation layer.
  • the hint information may be composed of one or more maps having the same resolution as the layer to be concatenated.
  • the hint information may be transmitted to the image decoding apparatus through the bitstream and used as input data for CNN based inter prediction.
  • image data (ie, output data) output through the output layer of the CNN corresponding to the input data may be motion vectors or prediction pixels of the current block.
  • the CNN setting unit 2610 may set the filter coefficients signaled from the image encoding apparatus as filter coefficients for inter prediction of the current block.
  • the CNN setting unit 2610 sets the filter coefficients previously stored in the image decoding apparatus as filter coefficients for inter prediction of the current block. Can be.
  • the CNN setting unit 2610 may select selection information of the filter coefficients signaled from the image encoding apparatus, for example.
  • the specific filter coefficient of the set selected according to the index information may be set as the filter coefficient for inter prediction of the current block.
  • the CNN execution unit 2630 may generate the prediction pixels by inferring the motion information of the current block by executing the CNN using the input data and the filter coefficients set by the CNN setting unit 2610. In this case, the generated prediction pixels may be transferred to an adder and added to the residual block to be used to recover the current block.
  • the CNN prediction unit 2600 primarily generates motion vectors or prediction pixels of the current block according to existing inter prediction schemes (ie, motion prediction (ME) and motion compensation (MC)). Afterwards, the motion information or the prediction pixels of the current block may be finally generated by refining the corresponding motion vector or the prediction pixels through a CNN-based inference process.
  • existing inter prediction schemes ie, motion prediction (ME) and motion compensation (MC)
  • the CNN predictor 2600 may determine a motion vector of the current block and a reference picture referenced by the motion vector by using a syntax element of the inter prediction mode extracted from the decoder.
  • the CNN predictor 2600 may generate motion information or prediction pixels of the current block by predicting the current block by using the determined motion vector and the reference picture.
  • the CNN setting unit 2610 may set the generated motion information or prediction pixels of the current block as image data (that is, input data) to be input to the input layer of the CNN.
  • the CNN setting unit 2610 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN.
  • the filter coefficient may be a value transmitted from the image encoding apparatus.
  • the filter coefficient may be a value selected by the image encoding apparatus in a set consisting of a predetermined specific value or a plurality of predetermined specific values.
  • FIG. 26 illustrates that the CNN setting unit 2610 is included in the CNN predicting unit 2600, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 2610 may be implemented as a separate unit from the CNN prediction unit 2600, or may be integrated with the CNN execution unit 2630 and implemented as a unit.
  • the CNN execution unit 2630 executes the CNN by using the input data and the filter coefficients set by the CNN setting unit 2610 to refine the motion vector or the prediction pixels of the current block to thereby refine the motion vector of the current block.
  • prediction pixels may be finally generated.
  • the generated prediction pixels may be transferred to an adder and added to the residual block to be used to recover the current block.
  • FIG. 27A and 27B are flowcharts illustrating a process of performing inter prediction by a CNN predictor included in the image encoding apparatus illustrated in FIG. 22.
  • FIG. 27A illustrates a CNN based inter prediction process according to the first embodiment
  • FIG. 27B illustrates a CNN based inter prediction process according to the second embodiment.
  • the CNN setting unit 2210 may set image data (ie, input data) to be input to an input layer of the CNN in order to perform an inference process of the CNN.
  • the input data may include a search region in the reference picture.
  • the input data may further include at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region.
  • the input data may further include hint information, such as time axis distance information between the current picture and the reference picture, in order to improve the accuracy of inter prediction.
  • the CNN setting unit 2210 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN.
  • the filter coefficient may be a value calculated by performing a learning process of the CNN on the input data set in step S2711.
  • the filter coefficient may be a value selected from a preset specific value or a set consisting of a plurality of preset specific values.
  • the CNN execution unit 2230 may execute the CNN using the input data and the filter coefficients set in operation S2711 to generate a motion vector of the current block or directly generate prediction pixels of the current block.
  • the generated prediction pixels may be transferred to a subtractor and used to generate a residual block from the current block.
  • the CNN prediction unit 2200 may generate motion vectors or prediction pixels of the current block according to existing inter prediction schemes (ie, motion estimation (ME) and motion compensation (MC)). Can be.
  • existing inter prediction schemes ie, motion estimation (ME) and motion compensation (MC)
  • the CNN prediction unit 2200 determines a reference picture encoded and decoded before the current picture, and searches for reference pixels most similar to the current block in the determined reference picture.
  • the CNN predictor 2200 may generate motion vectors or prediction pixels of the current block by using the found reference pixels.
  • the CNN setting unit 2210 may set the motion vector or the prediction pixels of the current block generated in operation S1031 as image data (that is, input data) to be input to the input layer of the CNN.
  • the CNN setting unit 2210 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN.
  • the filter coefficient may be calculated by performing a learning process of the CNN on the set input data.
  • the input data may include a predetermined search area in the reference picture.
  • the input data may further include at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region.
  • the input data may further include hint information for improving the accuracy of inter prediction, for example, at least one of time axis distance information between a current picture and a reference picture and a quantization parameter (QP).
  • the filter coefficient may be a value selected from a preset specific value or a set consisting of a plurality of preset specific values.
  • step S2735 the CNN execution unit 2230 executes the CNN using the input data and the filter coefficients set in step S2733 to refine the motion vectors or the prediction pixels of the current block generated in step S2731, thereby Finally, the motion vector or prediction pixels of the block can be generated.
  • the generated prediction pixels may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
  • FIG. 28A and 28B are flowcharts illustrating a process of performing inter prediction by a CNN predictor included in the image decoding apparatus illustrated in FIG. 26.
  • FIG. 28A illustrates a CNN based inter prediction process according to the first embodiment
  • FIG. 28B illustrates a CNN based inter prediction process according to the second embodiment.
  • the CNN setting unit 2610 may set image data (ie, input data) to be input to an input layer of the CNN to perform an inference process of the CNN.
  • the input data may include a search region in the reference picture determined based on the reference picture selection information signaled from the image encoding apparatus.
  • the input data may further include at least one of a reconstructed peripheral area of the current block in the current picture and a motion vector of the peripheral area.
  • the input data may further include hint information to improve the accuracy of inter prediction.
  • the CNN setting unit 2610 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN.
  • the filter coefficient may be a signal signaled from the image encoding apparatus.
  • the filter coefficient may be a value selected by the image encoding apparatus in a set consisting of a predetermined specific value or a plurality of predetermined specific values.
  • the CNN execution unit 2630 may generate a motion vector or prediction pixels of the current block by executing the CNN using the input data and the filter coefficients set in operation S2811.
  • the generated prediction pixels may be transferred to an adder of the image encoding apparatus and added to the residual block to be used to reconstruct the current block.
  • the CNN prediction unit 2600 performs motion vector or prediction of the current block according to existing inter prediction schemes (ie, motion estimation (ME) and motion compensation (MC)). Pixels can be generated.
  • existing inter prediction schemes ie, motion estimation (ME) and motion compensation (MC)
  • the CNN predictor 2600 may determine a motion vector of the current block and a reference picture referenced by the motion vector by using a syntax element for the inter prediction mode extracted from the decoder.
  • the CNN predictor 2600 may generate a motion vector or prediction pixels of the current block by predicting the current block by using the determined motion vector and the reference picture.
  • the CNN setting unit 2610 may set motion vector or prediction pixels of the current block generated in operation S2831 as image data (that is, input data) to be input to the input layer of the CNN.
  • the CNN setting unit 2610 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN.
  • the filter coefficient may be a signal signaled from the image encoding apparatus.
  • the filter coefficient may be a value selected by the image encoding apparatus in a set consisting of a predetermined specific value or a plurality of predetermined specific values.
  • step S2835 the CNN execution unit 2630 executes the CNN using the filter coefficient set in step S2833 to refine the motion vector or prediction pixels of the current block generated in step S2831, thereby Finally, motion vectors or prediction pixels may be generated.
  • the generated prediction pixels may be transferred to an adder of the image decoding apparatus and added to the residual block to be used to reconstruct the current block.
  • Some techniques of this disclosure relate to a technique for performing CNN based filtering on a reference region in order to minimize the quantization error of the reference region used for intra prediction of the current block.
  • the prediction region instead of directly generating the prediction block of the current block based on the CNN, the prediction region may be greatly improved without filtering the existing intra prediction structure by greatly filtering the surrounding area used for intra prediction of the current block.
  • 29 is a flowchart illustrating a process of calculating a filter coefficient of a CNN according to an embodiment of the present invention.
  • the image encoding apparatus may set input data of a CNN.
  • the input data may include a reference region encoded before the current block, which is a block to be encoded.
  • the reference region is a block of a component encoded before the block of the component to be encoded among the luma block and chroma blocks constituting the current block, and adjacent to the current block. May comprise at least one block). That is, the peripheral area may be an area of the same component as the current block or may be an area of another component. In addition, the reference region may further include a new region (ie, an average block, an average line, or an average pixel) generated by averaging pixel values of the peripheral region.
  • the peripheral area may be configured in pixel units (ie, peripheral lines or peripheral pixels) or in block units (ie, peripheral blocks).
  • 30 is an exemplary diagram of a peripheral region that may be set as input data of a CNN. Specifically, FIG. 30A illustrates a peripheral region in pixel units, and FIG. 30B illustrates a peripheral region in block units.
  • the peripheral area (ie, the peripheral pixel or the peripheral line) in units of pixels includes '1 ⁇ 1' pixels adjacent to the current block X, and '1 ⁇ n' or 'n ⁇ '. May include lines of 1 '.
  • the peripheral area (that is, the neighboring block) in units of blocks includes a left block (C), an upper block (B), a right upper block (D), and a lower left block adjacent to the current block (X).
  • E and the upper left block (A).
  • original blocks ie, uncoded blocks
  • prediction blocks ie, prediction blocks
  • reconstruction blocks of neighboring blocks will be described differently.
  • the original block is denoted by 'Ao'
  • the predictive block is denoted by 'Ap'
  • the reconstructed block is denoted by 'Ar'.
  • an average block obtained by averaging pixel values of the neighboring blocks A, B, C, D, and E is denoted by 'F'. Since the periphery area of the block unit has a wider application range of the convolution kernel than the periphery area of the pixel unit, setting the periphery area of the block unit as the input data of the CNN can improve the accuracy of the output data.
  • the right block and the lower block of the current block X in addition to the neighboring blocks Ar, Br, Cr, Dr, Er shown in FIG.
  • one or more blocks (not shown) of the lower right block may be further input to the CNN.
  • the accuracy of the output data may be further improved by further inputting one or more blocks among the right block, the lower block, and the right lower block of the current block of the luma component that have already been encoded to the CNN.
  • the present embodiment will be described on the premise that the reference area is composed of a peripheral area of a block unit, that is, one or more peripheral blocks.
  • the input data may be composed of at least one layer and input to the CNN.
  • neighboring blocks Ar, Br, Cr, Dr, and Er may be configured as separate layers and input to the CNN.
  • all or part of the neighboring blocks (Ar and Br) may be integrated into a multiplier or the like and may be configured as a single layer and input to the CNN.
  • the input data may further include additional information to improve the output accuracy of the CNN.
  • the additional information may include all encoding related information that can be referred to by the image encoding / decoding apparatus.
  • the additional information may include at least one of a quantization parameter (QP) value of the surrounding area, a quantization parameter (QP) value of the current block (in the case of an image decoding apparatus), and information about a residual of the surrounding area.
  • the information about the residual of the peripheral region may include an absolute value of each of the transform coefficients of the corresponding peripheral region or an absolute sum of all the transform coefficients in the frequency domain.
  • the information on the residual of the peripheral region may include an absolute value of each of the residual signals of the corresponding peripheral region or an absolute sum of all residual signals in the spatial domain.
  • a convolution kernel of 'n ⁇ 1 ⁇ k' or '1 ⁇ n ⁇ k' may be applied to the input layer of the CNN.
  • a convolution kernel of 'n ⁇ m ⁇ k' may be applied to the input layer of the CNN.
  • the chroma block is used at its original size or up-scaled to the same size as the luma block using an upsampling layer. Can be used.
  • the apparatus for encoding an image may set an output label to be used for supervised learning of the CNN.
  • the output label means an explicit correct answer to the input data set in step S2910 and is used to calculate a squared error through comparison with the output data of the CNN.
  • the output label may be original pixel values of the peripheral region set as input data, or of pixel values of other components of the peripheral region, which are smaller than the quantization parameter (QP) value applied to the peripheral region.
  • QP quantization parameter
  • the pixel values may be applied to the quantization parameter.
  • the output data refers to data output through the CNN's execution result output layer, and pixel values for restoring pixel values of the peripheral area set as input data to a level before quantization (hereinafter, referred to as 'restored peripheral areas'). May be).
  • the input data and output data of the CNN should be basically the same in the learning process and the inference process.
  • CNN layer example Input layer Output layer data data Label Example 1 -Peripheral area of line unit-Additional information Reconstructed Peripheral Area, or Residual Information in Restored Peripheral Area Original pixel values of the peripheral region, or pixel values of a component previously decoded using a QP smaller than the current QP among the components of the peripheral region.
  • Example 2 -Peripheral area in block unit-Additional information Reconstructed Peripheral Area, or Residual Information in Restored Peripheral Area Original pixel values of the peripheral region, or pixel values of a component previously decoded using a QP smaller than the current QP among the components of the peripheral region.
  • Example 3 Peripheral area in line or block unit-Additional information Residual information in the restored periphery or restored periphery Original pixel values of the peripheral region, or pixel values of a component previously decoded using a QP smaller than the current QP among the components of the peripheral region.
  • the data (input data) of the input layer may be composed of a peripheral area and additional information in line units and / or block units.
  • the data (output data) of the output layer may be a peripheral area reconstructed by approximating original pixel values before quantization with the peripheral area set as the input data, or residual information (pixel value) of the peripheral area. )).
  • the label of the output layer is decoded by using original pixel values of the peripheral area set as input data or a QP (Quantization Parameter) smaller than a region of a component set as input data among luma blocks and chroma blocks constituting the peripheral area.
  • QP Quality Parameter
  • the image encoding apparatus calculates the filter coefficients of the CNN by repeatedly performing CNN's supervised learning process using an error backpropagation algorithm based on the input data set in operation S2910 and the output label set in operation S2920. can do.
  • the image encoding apparatus may calculate a filter coefficient for each of the Y, Cb, and Cr components, or may calculate one filter coefficient commonly applied to all of the Y, Cb, and Cr components.
  • the CNN-based filter unit 3200 may include a CNN setting unit 3210 and a CNN execution unit 3230.
  • the structure of the CNN is as described above with reference to FIG. 5, and the CNN may further include an upsampling layer or a pooling layer to adjust the size of the layer.
  • the CNN setting unit 3210 may set input data of the CNN.
  • the input data may include a reference area reconstructed before the current block.
  • the reference region is a block of a component encoded before the block of the component to be encoded among the luma block and chroma blocks constituting the current block, and adjacent to the current block. May comprise at least one block). That is, the peripheral area may be an area of the same component as the current block or may be an area of another component.
  • the reference region may further include a new region (ie, an average block, an average line, or an average pixel) generated by averaging pixel values of the peripheral region.
  • the peripheral area may be configured in pixel units (ie, peripheral lines or peripheral pixels) or in block units (ie, peripheral blocks). Since the periphery area of the block unit is wider in the application range of the convolution kernel than the periphery area of the pixel unit, the accuracy of the output data can be improved by setting the periphery area of the block unit as input data of the CNN.
  • the input data may be composed of at least one layer and input to the CNN.
  • the input data may be composed of one layer for each neighboring block and input to the CNN.
  • the input data may be composed of one layer in which all or part of the neighboring blocks (Ar and Br) are integrated and input to the CNN.
  • the input data may further include additional information to improve the accuracy of the CNN learning process and the CNN inference process.
  • the additional information may include at least one of a quantization parameter (QP) value of the reference region, a quantization parameter value of the current block (in the case of an image decoding apparatus), and information about a residual of the reference region.
  • QP quantization parameter
  • the information about the residual of the reference region may be the absolute values or the absolute sums of the transform coefficients of the reference region in the frequency domain, and may be the respective absolute values or the absolute sum of the residual signals in the spatial domain.
  • the additional information may further include intra prediction mode information (eg, directional information of intra prediction) of the current block.
  • a convolution kernel of 'n ⁇ 1 ⁇ k' or '1 ⁇ n ⁇ k' may be applied to the input layer of the CNN.
  • a convolution kernel of 'n ⁇ m ⁇ k' may be applied to the input layer of the CNN.
  • the CNN setting unit 3210 may set the filter coefficient calculated by the image encoding apparatus as a filter coefficient for intra prediction of the current block.
  • the filter coefficient may be a value calculated by a video encoding apparatus in a predetermined unit, for example, a CU unit or a frame unit.
  • the filter coefficient When the filter coefficient is set in units of frames, the filter coefficient may be commonly used for intra prediction of a plurality of current blocks included in the frame.
  • the CNN setting unit 3210 may perform a filter for intra prediction of the current block from the filter coefficient set based on the index information of the filter coefficient transmitted from the image encoding apparatus. You can also set the factor.
  • FIG. 32 illustrates that the CNN setting unit 3210 is included in the CNN-based filter unit 3200, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 3210 may be implemented as a separate unit from the CNN-based filter unit 3200. In addition, the CNN setting unit 3210 may be integrated with the CNN execution unit 3230 and implemented as one unit.
  • the CNN execution unit 3230 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 3210, that is, the coefficient values of the convolution kernel, thereby outputting the output data, that is, the current block.
  • a prediction block can be generated.
  • the generated prediction block may be i) delivered to the subtractor in the case of the image encoding apparatus and used to generate a residual block of the current block, and ii) delivered to the adder in the case of the image decoding apparatus and transmitted to the presenter. It can be used to recover the current block by adding it to the residual block of the block.
  • FIG 33 is a flowchart illustrating a filtering process of a reference region according to an aspect of the present embodiment.
  • the intra predictor may determine an intra prediction mode to be used for encoding or decoding a current block.
  • the intra prediction mode may include a plurality of modes according to the prediction direction as described above with reference to FIG. 3.
  • the intra prediction mode may include 65 directional modes and a non-directional mode including a planar mode and a DC mode.
  • the intra prediction unit may select a reference region to be used for intra prediction of the current block according to the determined intra prediction mode. That is, the reference region may be configured differently according to the intra prediction mode of the current block.
  • the reference region may include a restored peripheral region adjacent to the current block as described above with reference to FIG. 29.
  • the reference region may further include additional information related to intra prediction of the current block.
  • the intra predictor may determine whether to perform filtering on the reference region selected in operation S3310 by determining whether the preset filtering condition is satisfied.
  • the reference region selected for intra prediction of the current block may have a quantization error with original pixel values while undergoing quantization / dequantization. Since the quantization error causes a decrease in the accuracy of intra prediction, it is necessary to filter the reference region before performing the intra prediction on the current block in order to minimize the quantization error. However, filtering the reference region does not guarantee minimization of the quantization error, and there is a problem that the complexity of the image encoding and decoding process may increase due to the filtering. Therefore, the intra prediction unit according to the present embodiment may adaptively perform filtering on the reference region to be used for intra prediction of the current block only under specific conditions.
  • the filtering condition may be set based on the size of each of the reference regions selected for intra prediction of the current block.
  • the intra predictor may perform filtering on the neighbor block only when the size of the neighbor block included in the reference region is greater than or equal to '4 ⁇ 4'.
  • the filtering condition may be set based on the intra prediction mode of the current block and the size of the current block. For example, when the intra prediction mode is the DC mode, filtering is not performed on the reference region regardless of the size of the current block, and when the intra prediction mode is the directional mode having the prediction direction of 'Vertical-Right', the size of the current block is Filtering of the reference region may be performed only when it is greater than or equal to '8 ⁇ 8'. However, it should be noted that this is exemplary and does not limit the present embodiment.
  • the intra predictor may adaptively filter the reference region selected for intra prediction of the current block, thereby minimizing the increase in the complexity of the image encoding and decoding process while improving the accuracy of the intra prediction.
  • the intra prediction unit may determine to perform filtering on the reference region selected for intra prediction of the current block, and proceed to step S3330.
  • the intra prediction unit may determine not to perform filtering on the reference region selected for intra prediction of the current block, and proceed to operation S3340.
  • the intra predictor performs filtering on the reference region selected in operation S3310 to restore pixel values of the reference region to a level before quantization (hereinafter, referred to as 'filtered reference region'). May be generated).
  • a CNN based filter may be used to filter the corresponding reference region.
  • a process of filtering the reference region by using the CNN-based filter will be described in detail.
  • the intra prediction unit may set the input data and the filter coefficient of the CNN to perform CNN-based filtering on the reference region.
  • the input data of the CNN is set as the reference region to be used for intra prediction of the current block, and is selected as the reference region selected in step S3310.
  • the filter coefficient of the CNN is set to the filter coefficient calculated through the supervised learning process of the image encoding apparatus.
  • the filter coefficients calculated by the image encoding apparatus may be signaled to the image decoding apparatus through the bitstream and used in the CNN-based filtering process of the image decoding apparatus.
  • the filter coefficient stored in each apparatus may be used in the CNN-based filtering process without additional signaling.
  • the filter coefficient when the filter coefficient is preset with a plurality of specific values to form one set and then stored in the image encoding apparatus and the image decoding apparatus, selection information of the filter coefficient selected by the image encoding apparatus (for example, a filter in the set)
  • the specific filter coefficient set in the set according to the index information of the coefficient may be used in the CNN-based filtering process of the image decoding apparatus.
  • the filter coefficient may be previously set to a plurality of specific values according to the quantization parameter value to configure one set, and a specific example thereof is shown in Table 4.
  • Table 4 since the contents of Table 4 are exemplary, it should be noted that the present embodiment is not limited thereto.
  • Group QP Filter coefficient Group 1 0 to 10 W00, W01, W02, W03 Group 2 (G02) 11 to 20 W04, W05, W06, W07 Group 3 (G03) 21-30 W08, W09, W10, W11 Group 4 (G04) 31-40 W12, W13, W14, W15 Group 5 (G05) 41- W16, W17, W18, W19
  • the filter coefficients 'W00 to W03' set to Group 1 are assigned to the reference region. It can be used for CNN based filtering process.
  • the filter coefficients 'W16 to W19' set to group 5 are included in the CNN-based filtering process for the reference region. Can be used.
  • the group index information 'G01 to G05' corresponding to the filter coefficient selected by the image encoding apparatus may be signaled to the image decoding apparatus through a bitstream and used for the CNN based filtering process of the image decoding apparatus.
  • the intra prediction unit may execute the CNN to which the filter coefficient set in operation S3332 is applied to perform the inference process on the input data to generate output data.
  • the generated output data may be a filtered reference region in which pixel values of the reference region set as input data are restored to a level before quantization.
  • the intra predictor may perform intra prediction on the current block by using the reference region.
  • the reference region used for intra prediction may be an unfiltered reference region selected in step S3310.
  • the reference region used for intra prediction may be a reference region filtered to a level before quantization in step S3330.
  • the intra predictor may perform intra prediction on the current block using the pixel values of the filtered reference region as it is. Also, in this case, the intra predictor may use pixel values (that is, weighted average values) calculated by applying preset weights to the pixel values of the filtered reference region and the pixel values before filtering of the reference region. Intra prediction may be performed on the current block.
  • the weight may be an experimentally determined value in order to improve the accuracy of the intra prediction result and the image encoding and decoding efficiency.
  • FIG. 34 is a flowchart illustrating a filtering process of a reference region according to another aspect of the present embodiment.
  • the filtering process of FIG. 34 differs from the filtering process of FIG. 33 in a specific method of filtering the reference region, and a description of overlapping portions will be omitted or briefly described below.
  • the intra predictor may determine an intra prediction mode to be used to encode or decode a current block.
  • the intra prediction unit may select a reference region to be used for intra prediction of the current block according to the determined intra prediction mode.
  • the reference region may include a restored peripheral region adjacent to the current block.
  • the reference region may further include additional information related to intra prediction of the current block.
  • the intra predictor may determine whether to perform the filtering on the reference region selected in operation S3410 by determining whether the preset filtering condition is satisfied.
  • the reference region selected for intra prediction of the current block may have a quantization error with original pixel values while undergoing quantization / dequantization. Accordingly, in order to minimize such quantization error and not to greatly increase the complexity of the image encoding / decoding process, the intra prediction unit may adaptively filter the reference region only under specific conditions.
  • the filtering condition may be set based on the size of each of the reference regions selected for intra prediction of the current block.
  • the intra predictor may perform filtering on the neighbor block only when the size of the neighbor block included in the reference region is greater than or equal to '4 ⁇ 4'.
  • the filtering condition may be set based on the intra prediction mode of the current block and the size of the current block. For example, when the intra prediction mode is the DC mode, filtering is not performed on the reference region regardless of the size of the current block, and when the intra prediction mode is the directional mode having the prediction direction of 'Vertical-Right', the size of the current block is Filtering of the reference region may be performed only when it is greater than or equal to '8 ⁇ 8'. However, it should be noted that this is exemplary and does not limit the present embodiment.
  • the intra prediction unit may determine to perform filtering on the reference region selected for intra prediction of the current block, and proceed to operation S3430.
  • the intra prediction unit may determine not to perform filtering on the reference region selected for intra prediction of the current block, and proceed to operation S3440.
  • the intra predictor performs filtering on the reference region selected in operation S3410 to restore pixel values of the reference region to a level before quantization (hereinafter, referred to as 'filtered reference region'). May be generated).
  • a low pass filter eg, a 2-tap filter, a 3-tap filter, etc.
  • a CNN-based filter may be used to filter the corresponding reference region.
  • the filtering for the reference region is performed by first filtering using a low pass filter (or a CNN based filter), and then second filtering using a CNN based filter (or a low pass filter). It can be done in a manner.
  • a process of filtering the reference region using the low pass filter and the CNN-based filter will be described in detail.
  • the intra predictor may first filter the reference region using the low pass filter. Since a method for filtering the reference region using the low pass filter is obvious to those skilled in the art, a detailed description thereof will be omitted.
  • the intra predictor may secondarily filter the reference region filtered in operation S3432 using the CNN-based filter.
  • the input data of the CNN is set as a reference region to be used for intra prediction of the current block, and is filtered as a reference region in step S3432.
  • the filter coefficient of the CNN is set to the filter coefficient calculated through the supervised learning process of the image encoding apparatus.
  • the filter coefficients calculated by the image encoding apparatus may be signaled to the image decoding apparatus through the bitstream and used in the CNN-based filtering process of the image decoding apparatus.
  • the filter coefficient stored in each apparatus may be used in the CNN-based filtering process without additional signaling.
  • the filter coefficient when the filter coefficient is preset with a plurality of specific values to form one set and then stored in the image encoding apparatus and the image decoding apparatus, selection information of the filter coefficient selected by the image encoding apparatus (for example, a filter in the set)
  • the specific filter coefficient set in the set according to the index information of the coefficient may be used in the CNN-based filtering process of the image decoding apparatus.
  • the filter coefficient may be previously set to a plurality of specific values according to the range of the quantization parameter value to configure one set, and a specific example thereof is as described above with reference to Table 4.
  • the intra predictor may generate output data by executing an inference process on input data by executing a CNN to which a specific filter coefficient is applied.
  • the generated output data may be a filtered reference region in which pixel values of the reference region set as input data are restored to a level before quantization.
  • the intra predictor may perform intra prediction on the current block by using the reference region.
  • the reference region used for intra prediction may be an unfiltered reference region selected in step S3410.
  • the reference region used for intra prediction may be a reference region filtered to a level before quantization in step S3430.
  • the intra predictor may perform intra prediction on the current block using the pixel values of the filtered reference region as it is. Also, in this case, the intra predictor may use pixel values (that is, weighted average values) calculated by applying preset weights to the pixel values of the filtered reference region and the pixel values before filtering of the reference region. Intra prediction may be performed on the current block.
  • the weight may be an experimentally determined value in order to improve the accuracy of the intra prediction result and the image encoding and decoding efficiency.
  • the computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. That is, computer-readable recording media include storage media such as magnetic storage media (eg, ROM, floppy disk, hard disk, etc.), and optical reading media (eg, CD-ROM, DVD, etc.).
  • the computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present disclosure relates to image encoding or decoding and, more specifically, to an apparatus and a method for applying an artificial neural network (ANN) to image encoding or decoding. The apparatus and the method of the present disclosure are characterized by applying a CNN-based filter coefficient to a first picture and at least one of a quantization parameter map and a block division map to output a second picture.

Description

영상 부호화 또는 복호화에 인공 신경망을 적용하는 장치 및 방법Apparatus and method for applying artificial neural network to image encoding or decoding
본 개시는 영상 부호화 또는 복호화에 관한 것으로, 보다 구체적으로는 영상 부호화 또는 복호화에 인공 신경망(artificial neural network: ANN)을 적용하는 장치 및 방법에 관한 것이다.The present disclosure relates to image encoding or decoding, and more particularly, to an apparatus and method for applying an artificial neural network (ANN) to image encoding or decoding.
이 부분에 기술된 내용은 단순히 본 실시예에 대한 배경 정보를 제공할 뿐 종래 기술을 구성하는 것은 아니다.The contents described in this section merely provide background information on the present embodiment and do not constitute a prior art.
동영상 데이터는 음성 데이터나 정지 영상 데이터 등에 비해 데이터량이 많기 때문에, 데이터 원본을 그대로 저장 또는 전송하는 경우 메모리 등의 하드웨어 자원을 많이 소모하게 된다. 따라서, 일반적으로 동영상 데이터는 부호화기를 이용하여 압축된 후 저장 또는 전송되며, 압축된 동영상 데이터는 복호화기를 이용하여 압축 해제된 후 재생된다.Since moving image data has a larger amount of data than audio data or still image data, hardware resources such as memory are consumed when the data source is stored or transmitted as it is. Therefore, in general, moving image data is stored or transmitted after being compressed using an encoder, and the compressed moving image data is reproduced after being decompressed using a decoder.
한편, 오늘날 고용량 게임이나 360도 영상 등의 비디오 콘텐츠에 대한 수요가 급증함에 따라, 영상의 크기, 해상도, 프레임율 등이 증가하고 있다. 따라서 압축해야 할 데이터량도 급격하게 증가하게 되어 새로운 고효율 압축 기술에 대한 요청이 커지고 있다.Meanwhile, as the demand for video content such as high-capacity games and 360-degree video increases rapidly, image size, resolution, frame rate, and the like increase. As a result, the amount of data to be compressed is also rapidly increasing, and the demand for new high efficiency compression technology is increasing.
최근 실험결과에 따르면, 기존 영상 부호화 또는 복호화 장치의 인-루프(in-loop) 필터를 인공 신경망의 일종인 CNN(Convolutional Neural Network) 필터로 대체함으로써 약 3.57%의 BDBR(Bjonteggrad-delta bit rate) 이득을 달성할 수 있음이 밝혀진 바 있다. 이에 따라, 인공 신경망 기술을 이용한 영상 부복호화 기술이 상술한 문제에 대한 해결책으로 주목 받고 있다.According to the recent experiment results, the in-loop filter of the conventional video encoding or decoding apparatus is replaced by a Convolutional Neural Network (CNN) filter, which is a kind of artificial neural network, and has a BBR of about 3.57% of BBR (Bjonteggrad-delta Bit Rate) It has been found that the gain can be achieved. Accordingly, an image encoding and decoding technique using an artificial neural network technology has attracted attention as a solution to the above problem.
본 개시에서는 영상 부호화 또는 복호화 프로세스에 인공 신경망 기술을 적용하는 여러 기법들이 제시된다.In this disclosure, various techniques for applying artificial neural network technology to an image encoding or decoding process are presented.
본 개시의 일부 기술들은 CNN 기반의 필터를 이용하여 양자화 에러 및 블록킹 열화를 경감시키는 것에 관련되어 있다.Some techniques of this disclosure relate to mitigating quantization error and blocking degradation using CNN based filters.
본 개시의 일 측면에 의하면, CNN 기반의 필터를 이용하여 영상을 복호화하는 방법에 있어서, 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 제1 픽처를 상기 CNN 기반의 필터로 입력하는 단계, 및 제2 픽처를 출력하는 단계를 포함하고, 상기 양자화 파라미터 맵은 상기 제1 픽처를 구성하는 부호화 단위에 대한 정보를 나타내고, 상기 블록 분할 맵은 상기 제1 픽처를 구성하는 분할된 영역에 대한 정보를 나타냄을 특징으로 하는 영상을 복호화 하는 방법을 제공한다.According to an aspect of the present disclosure, a method of decoding an image using a CNN-based filter, the method comprising: inputting at least one of a quantization parameter map and a block division map and a first picture to the CNN-based filter; Outputting two pictures, wherein the quantization parameter map indicates information about coding units constituting the first picture, and the block partition map indicates information about divided regions constituting the first picture It provides a method for decoding an image characterized by.
본 개시의 일 측면에 의하면, CNN 기반의 필터를 이용한 영상 복호화 장치에 있어서, 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 제1 픽처를 입력받는 입력부, 상기 입력부에 입력된 상기 양자화 파라미터 맵과 상기 블록 분할 맵 중 적어도 하나와 상기 제1 픽처에 상기 CNN 기반의 필터의 계수를 적용하는 필터부, 및 상기 양자화 파라미터 맵과 상기 블록 분할 맵 중 적어도 하나와 상기 제1 픽처에 상기 CNN 기반의 필터의 계수를 적용해 제2 픽처를 출력하는 출력부를 포함하고, 상기 양자화 파라미터 맵은 상기 제1 픽처를 구성하는 부호화 단위를 나타내고, 상기 블록 분할 맵은 상기 제1 픽처를 구성하는 분할된 영역에 대한 정보를 나타냄을 특징으로 하는 영상 복호화 장치를 제공한다.According to an aspect of the present disclosure, in an image decoding apparatus using a CNN-based filter, an input unit for receiving at least one of a quantization parameter map and a block division map and a first picture, the quantization parameter map input to the input unit and the A filter unit for applying coefficients of the CNN-based filter to at least one of the block division maps and the first picture, and at least one of the quantization parameter map and the block division map and the CNN-based filter to the first picture An output unit configured to output a second picture by applying coefficients, wherein the quantization parameter map indicates a coding unit constituting the first picture, and the block partition map indicates information about a divided region constituting the first picture It provides a video decoding apparatus characterized in that.
이러한 방법 및 장치에 따르면, 지도 학습을 통해 학습된 필터를 이용하여 영상 개선, 양자화 에러, 및 블록킹 열화(blocking artifact)를 해결할 수 있다.According to such a method and apparatus, an image improvement, a quantization error, and a blocking artifact may be solved using a filter learned through supervised learning.
본 개시의 일부 기술들은 CNN 기반의 인트라 예측을 수행하는 것에 관련되어 있다.Some techniques of this disclosure relate to performing CNN based intra prediction.
본 개시의 일 측면에 의하면, CNN 기반의 인트라 예측부를 이용한 영상 복호화 방법으로서, 비트스트림으로부터 복호화하고자 하는 현재 블록에 대한 변환 계수들을 복호화하는 단계; 상기 현재 블록보다 먼저 복호화된 참조 영역을 포함하는 입력 데이터를 결정하는 단계; 상기 입력 데이터에 CNN의 기설정된 필터계수를 적용하여 상기 현재 블록의 예측 픽셀들을 생성하는 단계; 상기 변환 계수들을 역변환하여 상기 현재 블록에 대한 잔차 신호들을 생성하는 단계; 및 상기 예측 픽셀들과 상기 잔차 신호들을 이용하여 상기 현재 블록을 복원하는 단계를 포함하는 영상 복호화 방법을 제공한다.According to an aspect of the present disclosure, an image decoding method using a CNN-based intra prediction unit, the method comprising: decoding transform coefficients for a current block to be decoded from a bitstream; Determining input data including a reference region decoded before the current block; Generating prediction pixels of the current block by applying a predetermined filter coefficient of a CNN to the input data; Inversely transforming the transform coefficients to generate residual signals for the current block; And reconstructing the current block by using the prediction pixels and the residual signals.
본 개시의 일 측면에 의하면, CNN 기반의 인트라 예측부를 이용한 영상 복호화 장치로서, 비트스트림으로부터 복호화하고자 하는 현재 블록에 대한 변환 계수들을 복호화하는 복호화부; 상기 현재 블록보다 먼저 복호화된 참조 영역을 포함하는 입력 데이터를 결정하는 CNN 설정부; 상기 입력 데이터에 CNN의 기설정된 필터계수를 적용하여 상기 현재 블록의 예측 픽셀들을 생성하는 CNN 실행부; 상기 변환 계수들을 역변환하여 상기 현재 블록에 대한 잔차 신호들을 생성하는 역변환부; 및 상기 예측 픽셀들과 상기 잔차 신호들을 이용하여 상기 현재 블록을 복원하는 가산기를 포함하는 영상 복호화 장치를 제공한다.According to an aspect of the present disclosure, an image decoding apparatus using a CNN-based intra prediction unit includes: a decoder which decodes transform coefficients of a current block to be decoded from a bitstream; A CNN setting unit which determines input data including a reference region decoded before the current block; A CNN execution unit which generates prediction pixels of the current block by applying a predetermined filter coefficient of the CNN to the input data; An inverse transform unit inversely transforming the transform coefficients to generate residual signals for the current block; And an adder for reconstructing the current block by using the prediction pixels and the residual signals.
이러한 방법 및 장치에 따르면, CNN 기반의 인트라 예측을 수행함으로써 예측 정확도를 향상시키면서도 복호화 프로세스의 복잡도를 유지할 수 있다.According to this method and apparatus, by performing CNN-based intra prediction, it is possible to maintain the complexity of the decoding process while improving the prediction accuracy.
본 개시의 일부 기술들은 CNN 기반의 인터 예측을 수행하는 것에 관련되어 있다.Some techniques of this disclosure relate to performing CNN based inter prediction.
본 개시의 일 측면에 의하면, 적어도 하나의 참조 픽쳐 내 탐색영역을 포함하는 입력 데이터를 설정하는 단계; 상기 입력 데이터에 CNN의 기설정된 필터 계수를 적용하여 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 생성하는 단계; 비트스트림으로부터 추출된 변환계수들을 역변환하여 상기 현재 블록에 대한 잔차신호들을 생성하는 단계; 및 상기 잔차신호들 및, 상기 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 이용하여 상기 현재블록을 복원하는 단계를 포함하는 영상 복호화 방법을 제공한다.According to an aspect of the present disclosure, the method includes: setting input data including a search region in at least one reference picture; Generating a motion vector of a current block or prediction pixels of the current block by applying a predetermined filter coefficient of a CNN to the input data; Inversely transforming transform coefficients extracted from a bitstream to generate residual signals for the current block; And reconstructing the current block by using the residual signals and the motion vector of the current block or the prediction pixels of the current block.
본 개시의 일 측면에 의하면, 적어도 하나의 참조 픽쳐 내 탐색영역을 포함하는 입력 데이터를 설정하는 CNN 설정부; 상기 입력 데이터에 CNN의 기설정된 필터 계수를 적용하여 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 생성하는 CNN 실행부; 및 상기 비트스트림으로부터 추출된 변환계수들을 역변환하여 잔차신호들을 복원하는 역변환부를 포함하되, 상기 현재 블록은 상기 잔차신호들 및, 상기 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 이용하여 복원되는 영상 복호화 장치를 제공한다.According to an aspect of the present disclosure, a CNN setting unit configured to set input data including a search region in at least one reference picture; A CNN execution unit generating a motion vector of a current block or prediction pixels of the current block by applying a predetermined filter coefficient of the CNN to the input data; And an inverse transform unit which inversely transforms transform coefficients extracted from the bitstream to restore residual signals, wherein the current block is reconstructed using the residual signals and the motion vector of the current block or the prediction pixels of the current block. Provided is an image decoding apparatus.
본 개시의 일 측면에 의하면, 비트스트림으로부터 추출된 인터예측모드에 대한 신택스 요소를 이용하여 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 생성하는 단계; 적어도 하나의 참조 픽쳐 내 탐색영역 및, 상기 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 포함하는 입력 데이터를 설정하는 단계; 상기 입력 데이터에 CNN의 기설정된 필터계수를 적용하여 상기 현재 블록의 재정의된(refined) 움직임 벡터 또는 상기 현재 블록의 재정의된 예측픽셀들을 생성하는 단계; 상기 비트스트림으로부터 추출된 변환계수들을 역변환하여 잔차 신호들을 생성하는 단계; 및 상기 잔차 신호들 및, 상기 현재 블록의 재정의된 움직임 벡터 또는 상기 현재 블록의 재정의된 예측픽셀들을 이용하여 상기 현재 블록을 복원하는 단계를 포함하는 영상 복호화 방법을 제공한다.According to an aspect of the present disclosure, generating a motion vector of a current block or prediction pixels of the current block by using a syntax element for an inter prediction mode extracted from a bitstream; Setting input data including a search region in at least one reference picture and a motion vector of the current block or prediction pixels of the current block; Generating a redefined motion vector of the current block or redefined prediction pixels of the current block by applying a predetermined filter coefficient of the CNN to the input data; Generating residual signals by inversely transforming transform coefficients extracted from the bitstream; And reconstructing the current block by using the residual signals and the redefined motion vector of the current block or the redefined prediction pixels of the current block.
본 개시의 일 측면에 의하면, 비트스트림으로부터 추출된 인터예측모드에 대한 신택스 요소를 이용하여 생성된 현재 블록의 움직임 벡터 또는 상기 현재 블록의 예측픽셀들을 입력 데이터로 설정하는 CNN 설정부; 상기 입력 데이터에 CNN의 기설정된 필터계수를 적용하여 상기 현재 블록의 재정의된(refined) 움직임 벡터 또는 상기 현재 블록의 재정의된 예측픽셀들을 생성하는 CNN 실행부; 및 상기 비트스트림으로부터 추출된 변환계수들을 역변환하여 잔차 신호들을 생성하는 역변환부를 포함하되, 상기 현재 블록은, 상기 잔차신호들 및, 상기 현재 블록의 재정의된 움직임 벡터 또는 상기 현재 블록의 재정의된 예측픽셀들을 이용하여 복원되는 영상 복호화 장치를 제공한다.According to an aspect of the present disclosure, a CNN setting unit for setting a motion vector of a current block generated using a syntax element for an inter prediction mode extracted from a bitstream or prediction pixels of the current block as input data; A CNN execution unit which applies a predetermined filter coefficient of the CNN to the input data to generate a redefined motion vector of the current block or redefined prediction pixels of the current block; And an inverse transformer configured to inversely transform transform coefficients extracted from the bitstream to generate residual signals, wherein the current block includes the residual signals and a redefined motion vector of the current block or a redefined prediction pixel of the current block. Provided is an image decoding apparatus that is reconstructed using the above.
이러한 방법들 및 장치들에 따르면, CNN 기반의 인터 예측을 수행함으로써 예측 정확도를 향상시키면서도 복호화 프로세스의 복잡도를 유지할 수 있다.According to these methods and apparatuses, by performing CNN-based inter prediction, it is possible to maintain the complexity of the decoding process while improving prediction accuracy.
본 개시의 일부 기술들은 CNN 기반의 필터를 이용하여 인트라 예측에 사용되는 참조 영역을 필터링하는 것에 관련되어 있다.Some techniques of this disclosure relate to filtering a reference region used for intra prediction using a CNN based filter.
본 개시의 일 측면에 의하면, 비트스트림으로부터 복호화하고자 하는 현재 블록에 대한 변환 계수들을 복호화하는 단계; 상기 현재 블록보다 먼저 복호화된 제1 참조 영역을 이용하여 CNN의 입력 데이터를 설정하는 단계; 상기 입력 데이터에 상기 CNN의 기 설정된 필터계수를 적용하여 상기 제1 참조 영역을 필터링함으로써 제2 참조 영역을 생성하는 단계; 상기 제2 참조 영역을 이용하여 인트라 예측을 수행함으로써 상기 현재 블록의 예측 블록을 생성하는 단계; 상기 변환 계수들을 역변환하여 상기 현재 블록에 대한 잔차 신호들을 생성하는 단계; 및 상기 예측 블록과 상기 잔차 신호들을 이용하여 상기 현재 블록을 복원하는 단계를 포함하는 영상 복호화 방법을 제공한다.According to an aspect of the present disclosure, decoding the transform coefficients for the current block to be decoded from the bitstream; Setting input data of a CNN by using a first reference region decoded before the current block; Generating a second reference region by filtering the first reference region by applying a predetermined filter coefficient of the CNN to the input data; Generating a prediction block of the current block by performing intra prediction using the second reference region; Inversely transforming the transform coefficients to generate residual signals for the current block; And reconstructing the current block by using the prediction block and the residual signals.
본 실시예의 일 측면에 의하면, 비트스트림으로부터 복호화하고자 하는 현재 블록에 대한 변환 계수들을 복호화하는 복호화부; 상기 현재 블록보다 먼저 복호화된 영역들 중에서 선택된 제1 참조 영역을 필터링한 제2 참조 영역을 이용하여, 인트라 예측을 수행함으로써, 상기 현재 블록의 예측 블록을 생성하는 인트라 예측부; 상기 변환 계수들을 역변환하여 상기 현재 블록에 대한 잔차 신호들을 생성하는 역변환부; 및 상기 예측 블록과 상기 잔차 신호들을 이용하여 상기 현재 블록을 복원하는 가산기를 포함하되, 상기 제2 참조 영역은, 상기 제1 참조 영역을 이용하여 설정된 입력 데이터에 대해, 상기 CNN의 기 설정된 필터계수를 적용하여 상기 제1 참조 영역을 필터링함으로써 생성되는 것을 특징으로 하는 영상 복호화 장치를 제공한다.According to an aspect of the present embodiment, a decoding unit for decoding the transform coefficients for the current block to be decoded from the bitstream; An intra predictor configured to generate a predictive block of the current block by performing intra prediction using a second reference region filtered from a first reference region selected from regions decoded before the current block; An inverse transform unit inversely transforming the transform coefficients to generate residual signals for the current block; And an adder for reconstructing the current block by using the prediction block and the residual signals, wherein the second reference region is a preset filter coefficient of the CNN with respect to input data set by using the first reference region. The image decoding apparatus is generated by filtering the first reference region by applying.
이러한 방법 및 장치에 따르면, CNN 기반의 필터를 이용하여 현재 블록의 인트라 예측에 이용되는 주변 영역을 필터링함으로써, 기존의 인트라 예측 구조를 크게 변경하지 않고도 예측 정확도를 크게 향상시킬 수 있다.According to such a method and apparatus, by using a CNN-based filter to filter the surrounding area used for intra prediction of the current block, prediction accuracy can be greatly improved without significantly changing the existing intra prediction structure.
도 1은 본 개시의 기술들을 구현할 수 있는 영상 부호화 장치의 예시적인 블록도이다.1 is an exemplary block diagram of an image encoding apparatus that may implement techniques of this disclosure.
도 2는 QTBTTT 구조를 이용하여 블록을 분할하는 방법을 설명하기 위한 도면이다.2 is a diagram for explaining a method of dividing a block using a QTBTTT structure.
도 3은 복수의 인트라 예측 모드들에 대한 예시도이다.3 is an exemplary diagram for a plurality of intra prediction modes.
도 4는 본 개시의 기술들을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다.4 is an exemplary block diagram of an image decoding apparatus that may implement techniques of this disclosure.
도 5는 본 개시의 기술들에 이용될 수 있는 CNN의 예시적인 구조를 도시한 도면이다.5 is a diagram illustrating an exemplary structure of a CNN that may be used in the techniques of this disclosure.
도 6은 본 발명의 일 실시예에 따른 CNN 기반의 필터를 예시한 도면이다.6 illustrates a CNN-based filter according to an embodiment of the present invention.
도 7a 내지 도 7c는 본 발명의 일 실시예에 따른, 연접 레이어의 위치가 상이한 CNN의 구조들을 예시한 도면이다.7A to 7C are diagrams illustrating structures of a CNN having different positions of a concatenated layer according to an embodiment of the present invention.
도 8a 내지 도 8c는 본 발명의 일 실시예에 따른 CNN의 입력 레이어로 입력될 데이터를 나타낸 도면이다.8A to 8C illustrate data to be input to an input layer of a CNN according to an embodiment of the present invention.
도 9a 및 도 9b는 본 발명의 일 실시예에 따른 블록 분할 맵의 일예를 나타낸 도면이다.9A and 9B are diagrams illustrating an example of a block partitioning map according to an embodiment of the present invention.
도 10a 내지 도 10c는 본 발명의 일 실시예에 따른 블록 분할 맵의 다른 일예를 나타낸 도면이다.10A to 10C are diagrams illustrating another example of a block partitioning map according to an embodiment of the present invention.
도 11a 내지 도 11c는 본 발명의 일 실시예에 따라 디블록킹의 강도를 조절하기 위한 블록 분할 맵을 예시한 도면이다.11A to 11C illustrate block division maps for adjusting the strength of deblocking according to an embodiment of the present invention.
도 12는 본 발명의 일 실시예에 따른 CNN 기반의 필터를 이용해 영상을 복호화하는 흐름도를 예시한 도면이다.12 illustrates a flowchart of decoding an image using a CNN-based filter according to an embodiment of the present invention.
도 13은 본 발명의 일 실시예에 따른 영상을 복호화하는 장치의 구성도를 개략적으로 나타낸 도면이다.FIG. 13 is a diagram schematically illustrating a configuration of an apparatus for decoding an image according to an embodiment of the present invention.
도 14는 본 발명의 일 실시예에 따른 영상 부호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다.14 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to an embodiment of the present invention.
도 15는 CNN의 입력 데이터로 이용될 수 있는 주변 영역에 대한 예시도이다.15 is an exemplary diagram of a peripheral region that can be used as input data of a CNN.
도 16은 복수의 주변 블록들로부터 CNN의 입력 레이어를 구성한 일 예를 나타내는 도면이다.16 is a diagram illustrating an example of configuring an input layer of a CNN from a plurality of neighboring blocks.
도 17은 주변 블록들의 픽셀값 형태에 비추어 볼 때, 현재 블록에 대해 적합한 예측 방향을 설명하기 위한 예시도이다.FIG. 17 is an exemplary diagram for describing a prediction direction suitable for a current block in view of pixel value types of neighboring blocks.
도 18은 힌트 정보를 포함하는 CNN의 레이어 구성에 대한 예시도이다.18 is an exemplary diagram of a layer configuration of a CNN including hint information.
도 19는 본 발명의 일 실시예에 따른 영상 복호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다.19 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention.
도 20은 도 14에 예시된 영상 부호화 장치에 포함될 수 있는 CNN 예측부의 동작을 나타내는 흐름도이다.20 is a flowchart illustrating an operation of a CNN prediction unit that may be included in the image encoding apparatus illustrated in FIG. 14.
도 21은 도 19에 예시된 영상 복호화 장치에 포함될 수 있는 CNN 예측부의 동작을 나타내는 흐름도이다.FIG. 21 is a flowchart illustrating an operation of a CNN predictor that may be included in the image decoding apparatus illustrated in FIG. 19.
도 22는 본 발명의 일 실시예에 따른 영상 부호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다.22 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to an embodiment of the present invention.
도 23은 CNN의 레이어 구성에 대한 예시도이다.23 is an exemplary diagram of a layer configuration of a CNN.
도 24는 현재 픽쳐와 참조 픽쳐 간의 시간축 거리 정보에 대한 예시도이다.24 is an exemplary diagram of time-base distance information between a current picture and a reference picture.
도 25는 힌트 정보를 포함하는 CNN의 레이어 구성에 대한 예시도이다.25 is an exemplary diagram of a layer configuration of a CNN including hint information.
도 26은 본 발명의 일 실시예에 따른 영상 복호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다.FIG. 26 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention.
도 27a 및 도 27b는 본 발명의 일 실시예에 따른 영상 부호화 장치에 포함될 수 있는 CNN 예측부가 인터 예측을 수행하는 프로세스를 나타내는 흐름도이다.27A and 27B are flowcharts illustrating a process of performing inter prediction by a CNN prediction unit included in an image encoding apparatus according to an embodiment of the present invention.
도 28a 및 도 28b는 본 발명의 일 실시예에 따른 영상 복호화 장치에 포함될 수 있는 CNN 예측부가 인터 예측을 수행하는 프로세스를 나타내는 흐름도이다.28A and 28B are flowcharts illustrating a process of performing inter prediction by a CNN prediction unit included in an image decoding apparatus according to an embodiment of the present invention.
도 29는 본 발명의 일 실시예에 따른 CNN의 필터계수 산출방법을 나타내는 흐름도이다.29 is a flowchart illustrating a method of calculating filter coefficients of a CNN according to an embodiment of the present invention.
도 30은 본 발명의 일 실시예에 따른 CNN의 입력 데이터로 이용될 수 있는 주변 영역에 대한 예시도이다.30 is an exemplary diagram of a peripheral region that can be used as input data of a CNN according to an embodiment of the present invention.
도 31은 본 발명의 일 실시예에 따른 CNN의 레이어 구성에 대한 예시도이다.31 is an exemplary diagram of a layer configuration of a CNN according to an embodiment of the present invention.
도 32는 본 발명의 일 실시예에 따른 CNN 기반 필터부의 구성을 나타내는 블록도이다.32 is a block diagram illustrating a configuration of a CNN-based filter unit according to an embodiment of the present invention.
도 33은 본 발명의 일 실시예에 따른 참조영역의 필터링 프로세스를 나타내는 흐름도이다.33 is a flowchart illustrating a filtering process of a reference region according to an embodiment of the present invention.
도 34는 본 발명의 일 실시예에 따른 참조영역의 필터링 프로세스를 나타내는 흐름도이다.34 is a flowchart illustrating a filtering process of a reference region according to an embodiment of the present invention.
이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성 요소들에 식별 부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through exemplary drawings. In adding an identification code to the components of each drawing, it should be noted that the same components as possible, even if shown on different drawings have the same reference numerals. In addition, in describing the present invention, when it is determined that the detailed description of the related well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.
또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 명세서 전체에서, 어떤 부분이 어떤 구성요소를 '포함', '구비'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 '...부', '모듈' 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. Throughout the specification, when a part is said to include, 'include' a certain component, which means that it may further include other components, except to exclude other components unless otherwise stated. . In addition, terms such as 'unit', 'module', etc. described in the specification mean a unit for processing at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software.
도 1은 본 개시의 기술들을 구현할 수 있는 영상 부호화 장치에 대한 예시적인 블록도이다. 이하에서는 도 1을 참조하여 영상 부호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.1 is an exemplary block diagram of an image encoding apparatus that may implement techniques of this disclosure. Hereinafter, an image encoding apparatus and subcomponents thereof will be described with reference to FIG. 1.
도 1에 도시된 바와 같이, 영상 부호화 장치는 블록 분할부(110), 예측부(120), 감산기(130), 변환부(140), 양자화부(145), 부호화부(150), 역양자화부(160), 역변환부(165), 가산기(170), 필터부(180) 및 메모리(190)를 포함하여 구성될 수 있다. As shown in FIG. 1, the image encoding apparatus includes a block splitter 110, a predictor 120, a subtractor 130, a transformer 140, a quantizer 145, an encoder 150, and inverse quantization. The unit 160, an inverse transform unit 165, an adder 170, a filter unit 180, and a memory 190 may be configured.
영상 부호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 소프트웨어(구성요소)의 각 기능을 실행하는 형태로 구현될 수도 있다.Each component of the image encoding apparatus may be implemented in hardware or software, or a combination of hardware and software. In addition, the functions of each component may be implemented in software, and the microprocessor may be implemented in a form in which each function of each software (component) is executed.
하나의 영상(비디오)은 복수의 픽처들로 구성된다. 각 픽처들은 복수의 영역으로 분할되고 각 영역마다 부호화가 수행된다. 예를 들어, 하나의 픽처는 하나 이상의 타일(Tile)로 분할된다. 여기서, 하나 이상의 타일을 타일 그룹(Tile Group)으로 정의할 수 있다. 각 타일은 하나 이상의 CTU(Coding Tree Unit)로 분할된다. 그리고 각 CTU는 트리 구조에 의해 하나 이상의 CU(Coding Unit)들로 분할된다. One image (video) is composed of a plurality of pictures. Each picture is divided into a plurality of regions, and encoding is performed for each region. For example, one picture is divided into one or more tiles. Here, one or more tiles may be defined as a tile group. Each tile is divided into one or more coding tree units (CTUs). Each CTU is divided into one or more coding units (CUs) by a tree structure.
각 CU에 적용되는 정보들은 CU의 신택스(Syntax)로 부호화되고, 하나의 CTU에 포함된 CU들에 공통적으로 적용되는 정보는 CTU의 신택스로 부호화된다. 또한, 하나의 타일 내의 모든 블록들에 공통적으로 적용되는 정보들은 타일의 신택스로 부호화되거나 해당 타일이 속한 타일 그룹의 신택스로 부호화되며, 하나의 픽처들을 구성하는 모든 블록들에 적용되는 정보들은 픽처 파라미터 셋(PPS, Picture Parameter Set) 또는 픽처 헤더에 부호화된다.Information applied to each CU is encoded by the syntax of the CU, and information commonly applied to CUs included in one CTU is encoded by the syntax of the CTU. In addition, information commonly applied to all blocks in one tile is encoded by the syntax of the tile or the syntax of the tile group to which the tile belongs. Information applied to all blocks constituting one picture may be a picture parameter. It is encoded in a set (PPS, Picture Parameter Set) or picture header.
나아가, 복수의 픽처가 공통으로 참조하는 정보들은 시퀀스 파라미터 셋(SPS, Sequence Parameter Set)에 부호화되며, 하나 이상의 SPS가 공통으로 참조하는 정보들은 비디오 파라미터 셋(VPS, Video Parameter Set)에 부호화된다.Furthermore, information commonly referred to by a plurality of pictures is encoded in a sequence parameter set (SPS), and information commonly referred to by one or more SPSs is encoded in a video parameter set (VPS).
블록 분할부(110)는 CTU(Coding Tree Unit)의 크기를 결정한다. CTU의 크기에 대한 정보(CTU size)는 SPS 또는 PPS의 신택스로 부호화되어 영상 복호화 장치로 전달된다. The block divider 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is encoded in the syntax of the SPS or PPS and transmitted to the image decoding apparatus.
블록 분할부(110)는 영상을 구성하는 각 픽처(picture)를 미리 결정된 크기를 가지는 복수의 CTU(Coding Tree Unit)로 분할한 이후에, 분할된 CTU를 트리 구조(tree structure)를 이용하여 반복적으로(recursively) 분할한다. 트리 구조에서의 리프 노드(leaf node)가 부호화의 기본 단위인 CU(coding unit)가 된다. After dividing each picture constituting an image into a plurality of coding tree units (CTUs) having a predetermined size, the block dividing unit 110 recursively divides the divided CTUs using a tree structure. Split by recursively. A leaf node in the tree structure becomes a CU (coding unit) which is a basic unit of coding.
트리 구조에는 상위 노드(혹은 부모 노드)가 동일한 크기를 가지는 네 개의 하위 노드(혹은 자식 노드)로 분할되는 쿼드트리(Quad Tree, QT), 상위 노드가 두 개의 하위 노드로 분할되는 바이너리트리(Binary Tree, BT), 상위 노드가 1:2:1 비율로 세 개의 하위 노드로 분할되는 터너리트리(Ternary Tree, TT) 등이 포함될 수 있다.The tree structure includes a quad tree (QT) in which a parent node (or parent node) is divided into four child nodes (or child nodes) of the same size, and a binary tree in which the parent node is divided into two child nodes. Tree, BT), and a ternary tree (TT) in which an upper node is divided into three lower nodes at a 1: 2: 1 ratio.
또한, QT 구조, BT 구조 및 TT 구조 중 둘 이상이 혼용된 구조 등이 포함될 수 있다. 예컨대, QTBT(Quad Tree plus Binary Tree) 구조가 사용될 수 있고, QTBTTT(Quad Tree plus Binary Tree Ternary Tree) 구조가 사용될 수 있다. In addition, a structure in which two or more of a QT structure, a BT structure, and a TT structure are mixed may be included. For example, a Quad Tree plus Binary Tree (QTBT) structure may be used, and a Quad Tree plus Binary Tree Ternary Tree (QTBTTT) structure may be used.
도 2는 QTBTTT 구조를 이용하여 블록을 분할하는 방법을 설명하기 위한 도면이다. 도 2에서 보는 바와 같이, CTU는 먼저 QT 구조로 분할될 수 있다. 쿼드트리 분할은 분할 블록(splitting block)의 크기가 QT에서 허용되는 리프 노드의 최소 블록 크기(MinQTSize)에 도달할 때까지 반복될 수 있다. 2 is a diagram for explaining a method of dividing a block using a QTBTTT structure. As shown in FIG. 2, the CTU may first be divided into a QT structure. Quadtree splitting may be repeated until the size of the splitting block reaches the minimum block size (MinQTSize) of the leaf nodes allowed in QT.
QT의 리프 노드가 BT에서 허용되는 루트 노드의 최대 블록 크기(MaxBTSize)보다 크지 않은 경우, BT 구조 또는 TT 구조 중 하나 이상으로 더 분할될 수 있다. BT 구조 및/또는 TT 구조에서는 복수의 분할 방향이 존재할 수 있다. If the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in BT, it may be further divided into one or more of the BT structure or the TT structure. In the BT structure and / or the TT structure, there may be a plurality of division directions.
예컨대, 일부 예시에서, 해당 노드의 블록을 가로로 분할하는 타입(즉, horizontal splitting)과 세로로 분할하는 타입(즉, vertical splitting) 두 가지가 존재할 수 있다. For example, in some examples, there may be two types of splitting a block of a corresponding node horizontally (ie, horizontal splitting) and vertically splitting (ie, vertical splitting).
도 2에 표현된 바와 같이, BTTT 분할이 수행되면, 노드들이 분할되었는지 여부를 지시하는 플래그, 분할 방향(vertical 또는 horizontal)을 나타내는 플래그 및/또는 분할 타입(Binary 또는 Ternary)을 나타내는 플래그가 영상 복호화 장치로 시그널링될 수 있다.As represented in FIG. 2, when BTTT segmentation is performed, a flag indicating whether nodes are segmented, a flag indicating a division direction (vertical or horizontal), and / or a flag indicating a partition type (Binary or Ternary) are decoded. May be signaled to the device.
한편, 해당 노드의 블록을 서로 비대칭 형태의 두 개의 블록으로 분할하는 타입이 추가로 더 존재할 수도 있다. 비대칭 형태에는 해당 노드의 블록을 1:3의 크기 비율을 가지는 두 개의 직사각형 블록으로 분할하는 형태, 해당 노드의 블록을 대각선 방향으로 분할하는 형태 등이 포함될 수 있다.Meanwhile, there may further be a type in which blocks of the corresponding node are further divided into two blocks having an asymmetric shape. The asymmetric form may include a form of dividing a block of a node into two rectangular blocks having a size ratio of 1: 3, a form of dividing a block of a node in a diagonal direction, and the like.
트리 구조의 다른 예시로서 QTBT가 사용되는 경우, CTU는 먼저 QT 구조로 분할된 이후에, QT의 리프 노드들은 BT 구조로 더 분할될 수 있다. When QTBT is used as another example of the tree structure, the CTU is first divided into the QT structure, and then the leaf nodes of the QT may be further divided into the BT structure.
CU는 CTU로부터의 QTBT 또는 QTBTTT 분할에 따라 다양한 크기를 가질 수 있다. 이하에서는, 부호화 또는 복호화하고자 하는 CU(즉, QTBTTT의 리프 노드)에 해당하는 블록을 '현재 블록'이라 지칭한다.The CU may have various sizes depending on the QTBT or QTBTTT splitting from the CTU. Hereinafter, a block corresponding to a CU (that is, a leaf node of QTBTTT) to be encoded or decoded is referred to as a 'current block'.
예측부(120)는 현재 블록을 예측하여 예측 블록을 생성한다. 예측부(120)는 인트라 예측부(122)와 인터 예측부(124)를 포함하여 구성될 수 있다. 일반적으로, 픽처 내 현재 블록들은 각각 예측적으로 코딩될 수 있다. 현재 블록의 예측은 현재 블록을 포함하는 픽처의 데이터를 사용하는 인트라 예측 기술 또는 현재 블록을 포함하는 픽처 이전에 코딩된 픽처의 데이터를 사용하는 인터 예측 기술을 사용하여 수행될 수 있다. The prediction unit 120 predicts the current block and generates a prediction block. The predictor 120 may include an intra predictor 122 and an inter predictor 124. In general, current blocks within a picture may each be predictively coded. Prediction of the current block may be performed using an intra prediction technique using data of the picture including the current block or an inter prediction technique using data of a coded picture before the picture containing the current block.
인트라 예측부(122)는 현재 블록이 포함된 현재 픽처 내에서 현재 블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재 블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재한다. 예컨대, 도 3에서 보는 바와 같이, 복수의 인트라 예측모드는 planar 모드와 DC 모드를 포함하는 비방향성 모드와 65개의 방향성 모드를 포함할 수 있다. 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다. The intra predictor 122 predicts pixels in the current block by using pixels (reference pixels) positioned around the current block in the current picture including the current block. There are a plurality of intra prediction modes according to the prediction direction. For example, as shown in FIG. 3, the plurality of intra prediction modes may include a non-directional mode including a planar mode and a DC mode and 65 directional modes. The surrounding pixels to be used and the expressions are defined differently for each prediction mode.
또한, 후술하는 바와 같이, 인트라 예측부(122)는 CNN에 기반한 학습 및 추론 과정을 통해 참조 픽셀들을 이용하여 현재 블록 내의 픽셀들을 예측할 수도 있다. 이 경우, 인트라 예측부(122)는 도 3에 예시된 복수의 인트라 예측 모드와 함께 CNN 기반의 인트라 예측 모드(이하, 'CNN 모드'라고도 지칭됨)를 병렬적으로 운용할 수 있다. 대안적으로, 인트라 예측부(122)는 오직 CNN 모드만을 독자적으로 운용할 수도 있다.In addition, as described below, the intra predictor 122 may predict pixels in the current block using reference pixels through a CNN-based learning and inference process. In this case, the intra prediction unit 122 may operate in parallel with the CNN-based intra prediction mode (hereinafter, also referred to as a “CNN mode”) together with the plurality of intra prediction modes illustrated in FIG. 3. Alternatively, the intra prediction unit 122 may operate only the CNN mode.
인트라 예측부(122)는 현재 블록을 부호화하는데 사용할 인트라 예측 모드를 결정할 수 있다. 일부 예들에서, 인트라 예측부(122)는 여러 인트라 예측 모드들을 사용하여 현재 블록을 인코딩하고, 테스트된 모드들로부터 사용할 적절한 인트라 예측 모드를 선택할 수도 있다. 예를 들어, 인트라 예측부(122)는 여러 테스트된 인트라 예측 모드들에 대한 레이트 왜곡(rate-distortion) 분석을 사용하여 레이트 왜곡 값들을 계산하고, 테스트된 모드들 중 최선의 레이트 왜곡 특징들을 갖는 인트라 예측 모드를 선택할 수도 있다. The intra predictor 122 may determine an intra prediction mode to use to encode the current block. In some examples, intra prediction unit 122 may encode the current block using several intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, intra predictor 122 calculates rate distortion values using rate-distortion analysis for several tested intra prediction modes, and has the best rate distortion characteristics among the tested modes. Intra prediction mode may be selected.
인트라 예측부(122)는 복수의 인트라 예측 모드 중에서 하나의 인트라 예측 모드를 선택하고, 선택된 인트라 예측 모드에 따라 결정되는 주변 픽셀(참조 픽셀)과 연산식을 사용하여 현재 블록을 예측한다. 후술하는 바와 같이, CNN 모드에서, 인트라 예측부(122)는 입력 데이터와 컨볼루션 커널의 계수값을 이용하여 현재 블록을 예측한다. The intra predictor 122 selects one intra prediction mode from among the plurality of intra prediction modes, and predicts the current block by using a neighboring pixel (reference pixel) and an operation formula determined according to the selected intra prediction mode. As described later, in the CNN mode, the intra predictor 122 predicts the current block by using input data and coefficient values of the convolution kernel.
선택된 인트라 예측 모드에 대한 정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다. 인트라 예측부(122)는, 복수의 인트라 예측 모드 중 어느 모드가 현재 블록의 인트라 예측 모드로 사용되었는지를 지시하는 인트라 예측 모드 정보를 효율적으로 부호화하기 위해, 복수의 인트라 예측 모드 중 현재 블록의 인트라 예측 모드로서 가능성이 높은 일부의 모드를 MPM(most probable mode)으로 결정할 수 있다.Information about the selected intra prediction mode is encoded by the encoder 150 and transmitted to the image decoding apparatus. The intra prediction unit 122 performs intra prediction on the current block of the plurality of intra prediction modes in order to efficiently encode intra prediction mode information indicating which mode of the plurality of intra prediction modes is used as the intra prediction mode of the current block. Some of the most probable modes as prediction modes can be determined as MPM (most probable mode).
MPM 리스트는 현재 블록의 주변 블록들의 인트라 예측 모드들, planar 모드, DC 모드를 포함할 수 있다. 또한, MPM 리스트는 CNN 모드를 더 포함할 수 있다.The MPM list may include intra prediction modes, planar mode, and DC mode of neighboring blocks of the current block. In addition, the MPM list may further include a CNN mode.
현재 블록의 인트라 예측 모드가 MPM 중에서 선택되는 경우, MPM 중 어느 모드가 현재 블록의 인트라 예측 모드로 선택되었는지를 지시하는 제1 인트라 식별정보가 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다.When the intra prediction mode of the current block is selected from the MPMs, first intra identification information indicating which mode of the MPMs is selected as the intra prediction mode of the current block is encoded by the encoder 150 and signaled to the image decoding apparatus. do.
반면, 현재 블록의 인트라 예측 모드가 MPM 중에서 선택되지 않은 경우, MPM이 아닌 나머지 모드들 중 어느 모드가 현재 블록의 인트라 예측 모드로 선택되었는지를 지시하는 제2 인트라 식별정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다.On the other hand, when the intra prediction mode of the current block is not selected among the MPMs, the second intra identification information indicating which mode other than the MPM is selected as the intra prediction mode of the current block is transmitted to the encoder 150. Is encoded and signaled to the video decoding apparatus.
인터 예측부(124)는 움직임 추정(motion estimation) 과정을 통해 현재 픽처보다 먼저 부호화 및 복호화된 참조 픽처 내에서 현재 블록과 가장 유사한 블록을 탐색하고, 움직임 보상 과정을 통해 탐색된 블록을 이용하여 현재 블록에 대한 예측 블록을 생성한다. 인터 예측은 일반적으로 예측 방향에 따라 단방향 예측(Uni-directional prediction)과 양방향 예측(Bi-directional prediction)으로 구별될 수 있다. 단방향 예측은 시간 축을 기준으로 현재 픽쳐보다 이전에 표시되는 픽쳐만을 이용하거나 또는 이후에 표시되는 픽쳐만을 이용하여 현재 블록을 예측하는 방식을 의미한다. 양방향 예측은 시간 축을 기준으로 현재 픽쳐보다 이전에 표시되는 픽쳐 및 이후에 표시되는 픽쳐를 모두 참조하여 현재 블록을 예측하는 방식을 의미한다.The inter prediction unit 124 searches for the block most similar to the current block in the reference picture encoded and decoded before the current picture through a motion estimation process, and uses the block found through the motion compensation process. Generate a predictive block for the block. Inter prediction may be generally classified into uni-directional prediction and bi-directional prediction according to a prediction direction. Unidirectional prediction refers to a method of predicting a current block using only pictures displayed before the current picture or only pictures displayed after the time axis. Bidirectional prediction refers to a method of predicting a current block by referring to both a picture displayed before and a picture displayed after the current picture on the time axis.
인터 예측부(124)는 현재 픽처 내의 현재 블록과 참조 픽처 내의 예측 블록 간의 변위(displacement)에 해당하는 움직임벡터(motion vector)를 생성한다. 일반적으로, 움직임 추정은 루마(luma) 성분에 대해 수행되고, 루마 성분에 기초하여 계산된 모션 벡터는 루마 성분 및 크로마 성분 모두에 대해 사용된다. The inter prediction unit 124 generates a motion vector corresponding to a displacement between the current block in the current picture and the prediction block in the reference picture. In general, motion estimation is performed on a luma component, and a motion vector calculated based on the luma component is used for both the luma component and the chroma component.
현재 블록을 예측하기 위해 사용된 참조 픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함하는 움직임 정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다. The motion information including the information about the reference picture and the motion vector used to predict the current block is encoded by the encoder 150 and transmitted to the image decoding apparatus.
움직임 정보를 부호화하는 데 소요되는 비트량을 감소 또는 최소화시키기 위해 다양한 방법이 사용될 수 있다. 이 다양한 방법들 중 대표적인 예로 Skip 모드, Merge 모드 및 AMVP(Adaptive(Advanced) motion vector predictor) 모드를 들 수 있다.Various methods may be used to reduce or minimize the amount of bits required to encode motion information. Representative examples of these various methods include Skip mode, Merge mode, and Adaptive (Advanced) motion vector predictor (AMVP) mode.
Skip 모드 및 Merge 모드에서는 먼저, 주변 블록들로부터 미리 설정된 개수의 후보 블록들이 선별된다. 후보 블록들이 선별되면, 인터 예측부(124)는 후보 블록들이 포함된 머지 리스트(merge list)를 구성하고, 리스트에 포함된 후보 블록의 움직임 정보들 중에서 현재 블록의 움직임 정보로 사용될 움직임 정보를 선택하며, 선택된 움직임 정보(선택된 후보 블록)를 식별하기 위한 merge index 값을 생성한다. In the Skip mode and the Merge mode, first, a predetermined number of candidate blocks are selected from neighboring blocks. When the candidate blocks are selected, the inter prediction unit 124 constructs a merge list including candidate blocks, and selects motion information to be used as motion information of the current block among motion information of candidate blocks included in the list. A merge index value for identifying the selected motion information (selected candidate block) is generated.
선택된 움직임 정보의 index 값 즉, merge index 값은 부호화되어 영상 복호화 장치로 시그널링된다. HEVC 표준에서, Skip/Merge 모드에 대한 index 값은 merge_idx syntax를 통해 표현된다.The index value of the selected motion information, that is, the merge index value, is encoded and signaled to the image decoding apparatus. In the HEVC standard, index values for Skip / Merge mode are expressed through the merge_idx syntax.
AMVP 모드에서는 먼저, 현재 블록의 주변 블록들을 이용하여 현재 블록의 움직임 벡터에 대한 예측 움직임 벡터(motion vector predictor, MVP) 후보들이 유도된다. 예측 움직임 벡터 후보들이 유도되면, 인터 예측부(124)는 현재 블록의 움직임 벡터에 대한 예측 움직임 벡터(mvp)를 결정하고, 현재 블록의 움직임 벡터에서 결정된 예측 움직임 벡터를 감산하여 차분 움직임 벡터(motion vector difference, mvd)를 산출한다. 산출된 차분 움직임 벡터는 부호화되어 영상 복호화 장치로 시그널링된다. In the AMVP mode, first, motion vector predictor (MVP) candidates for the motion vector of the current block are derived using neighboring blocks of the current block. When the prediction motion vector candidates are derived, the inter prediction unit 124 determines the prediction motion vector mvp of the motion vector of the current block, subtracts the prediction motion vector determined from the motion vector of the current block, and subtracts the differential motion vector (motion). vector difference, mvd). The calculated differential motion vector is encoded and signaled to the image decoding apparatus.
예측 움직임 벡터 후보들로부터 예측 움직임 벡터를 결정하는 과정은 미리 정의된 함수(예를 들어, 중앙 값 연산, 평균 값 연산 등)를 통해 구현될 수 있다. 이 경우, 영상 복호화 장치는 미리 정의된 함수를 적용하도록 설정되어 있다.The process of determining the predicted motion vector from the predicted motion vector candidates may be implemented through a predefined function (eg, median operation, average value operation, etc.). In this case, the video decoding apparatus is set to apply a predefined function.
예측 움직임 벡터 후보들을 유도하기 위해 이용되는 주변 블록들은 이미 부호화 및 복호화가 완료된 블록에 해당하므로, 영상 복호화 장치도 이 주변 블록들에 대한 움직임 벡터를 이미 인지하고 있다. 따라서, 예측 움직임 벡터 후보들을 식별하기 위한 정보들은 부호화될 필요가 없으므로, 영상 부호화 장치는 차분 움직임 벡터에 대한 정보와 현재 블록을 예측하기 위해 사용된 참조 픽처에 대한 정보만을 부호화한다. Since the neighboring blocks used to derive the predictive motion vector candidates correspond to blocks that have already been encoded and decoded, the image decoding apparatus has already recognized the motion vectors of the neighboring blocks. Therefore, since the information for identifying the predicted motion vector candidates does not need to be encoded, the apparatus for encoding an image encodes only the information about the differential motion vector and the information about the reference picture used to predict the current block.
예측 움직임 벡터 후보들로부터 예측 움직임 벡터를 결정하는 과정은 예측 움직임 벡터 후보들 중 어느 하나를 선택하는 방식으로 구현될 수도 있다. 이와 같은 경우, 차분 움직임 벡터에 대한 정보, 현재 블록을 예측하기 위해 사용된 참조 픽처에 대한 정보와 함께, 결정된 예측 움직임 벡터를 식별하기 위한 정보가 추가적으로 부호화된다. The process of determining the prediction motion vector from the prediction motion vector candidates may be implemented by selecting any one of the prediction motion vector candidates. In such a case, the information for identifying the determined prediction motion vector is additionally coded together with the information about the differential motion vector and the reference picture used for predicting the current block.
또한, 후술하는 바와 같이, 인터 예측부(124)는 CNN 기반의 추론 과정을 통해 현재 블록을 예측할 수도 있다. 이를 위해, CNN의 필터 계수 즉, 컨벌루션 커널의 계수들이 CNN의 지도 학습 과정을 통해 설정될 수 있다. In addition, as described below, the inter prediction unit 124 may predict the current block through a CNN-based inference process. To this end, the filter coefficients of the CNN, that is, the coefficients of the convolution kernel, may be set through the supervised learning process of the CNN.
또한, 인터 예측부(124)는 1차적으로 기존의 인터 예측 방식(즉, 움직임 예측(motion estimation, ME) 및 움직임 보상(motion compensation, MC)에 따라 현재 블록의 움직임 정보 또는 예측 픽셀들을 생성한 후, 생성된 움직임 정보 또는 예측 픽셀들을 2차적으로 CNN 기반의 학습 및 추론 과정을 통해 재정의(refinement)하여 현재 블록을 예측할 수도 있다.In addition, the inter prediction unit 124 primarily generates motion information or prediction pixels of the current block according to an existing inter prediction method (ie, motion estimation (ME) and motion compensation (MC)). Then, the generated motion information or prediction pixels may be refined through CNN-based learning and inference processes to predict the current block.
나아가, 인터 예측부(124)는 기존의 인터 예측 방식과 함께 CNN 기반의 인터 예측 방식(이하, 'CNN 예측 모드'라고 칭함)을 병렬적으로 운용할 수도 있다. 대안적으로, 인터 예측부(124)는 기존의 인터 예측 방식을 대체하여 CNN 예측 모드만을 독자적으로 운용할 수도 있다.In addition, the inter prediction unit 124 may operate in parallel with the CNN-based inter prediction method (hereinafter, referred to as a "CNN prediction mode") together with the existing inter prediction method. Alternatively, the inter prediction unit 124 may independently operate only the CNN prediction mode by replacing the existing inter prediction method.
감산기(130)는 인트라 예측부(122) 또는 인터 예측부(124)에 의해 생성된 예측 블록과 현재 블록을 감산하여 잔차 블록을 생성하고, 변환부(140)는 공간 영역의 픽셀 값들을 가지는 잔차 블록 내의 잔차 신호를 주파수 도메인의 변환 계수로 변환한다. The subtractor 130 generates a residual block by subtracting the prediction block generated by the intra predictor 122 or the inter predictor 124 and the current block, and the transform unit 140 has a residual having pixel values in the spatial domain. The residual signal in the block is transformed into transform coefficients in the frequency domain.
변환부(140)는 잔차 블록 내의 잔차 신호들을 현재 블록의 크기를 변환 단위로 사용하여 변환할 수 있으며, 잔차 블록을 더 작은 복수의 서브 블록으로 분할하고 서브 블록 크기의 변환 단위로 잔차 신호들을 변환할 수도 있다. The transform unit 140 may convert the residual signals in the residual block using the size of the current block as a conversion unit, divide the residual block into a plurality of smaller subblocks, and convert the residual signals into a conversion unit of the subblock size. You may.
잔차 블록을 더 작은 서브 블록으로 분할하는 방법은 다양하게 존재할 수 있다. 예컨대, 기 정의된 동일한 크기의 서브 블록으로 분할할 수도 있으며, 잔차 블록을 루트 노드로 하는 QT(Quad Tree) 방식의 분할을 사용할 수도 있다. There may be various ways of dividing the residual block into smaller sub-blocks. For example, it may be divided into sub-blocks having the same size, and may be divided by a quad tree (QT) method using the residual block as a root node.
양자화부(145)는 변환부(140)로부터 출력되는 변환 계수들을 양자화하고, 양자화된 변환 계수들을 부호화부(150)로 출력한다.The quantization unit 145 quantizes the transform coefficients output from the transform unit 140, and outputs the quantized transform coefficients to the encoder 150.
부호화부(150)는 양자화된 변환 계수들을 CABAC 등의 부호화 방식을 사용하여 부호화함으로써 비트스트림을 생성한다. 또한, 부호화부(150)는 블록 분할과 관련된 CTU size, QT 분할 플래그, BTTT 분할 플래그, 분할 방향 및 분할 타입 등의 정보를 부호화 및 시그널링하여 영상 복호화 장치가 영상 부호화 장치와 동일하게 블록을 분할할 수 있도록 한다.The encoder 150 generates a bitstream by encoding the quantized transform coefficients by using an encoding method such as CABAC. Also, the encoder 150 encodes and signals information such as a CTU size, a QT split flag, a BTTT split flag, a split direction, and a split type associated with block division, so that the image decoding apparatus splits the block in the same manner as the image encoder. To be able.
또한, 부호화부(150)는 현재 블록이 인트라 예측에 의해 부호화되었는지 아니면 인터 예측에 의해 부호화되었는지 여부를 지시하는 예측 타입에 대한 정보를 부호화하고, 예측 타입에 따라 인트라 예측정보(즉, 인트라 예측 모드에 대한 정보) 또는 인터 예측정보(참조 픽처 및 움직임벡터에 대한 정보)를 부호화한다. In addition, the encoder 150 encodes information on a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and intra prediction information (that is, intra prediction mode) according to the prediction type. Information) or inter prediction information (information about a reference picture and a motion vector) is encoded.
나아가, 기존의 인터 예측 방식 및 CNN 기반의 인터 예측 방식이 모두 사용되는 경우, 부호화부(150)는 CNN 기반의 인터 예측 방식을 사용할지 여부를 지시하는 정보(플래그)를 부호화한다. CNN 기반의 인터 예측 방식이 사용되지 않는 경우에는 통상적인 인터 예측 방식이 사용되므로, 부호화부(150)는 참조 픽쳐 및 움직임 벡터에 대한 정보를 인터 예측 정보로서 부호화한다. 반면, CNN 기반의 인터 예측 방식이 사용되는 경우, 부호화부(150)는 CNN 기반의 인터 예측을 수행하기 위해 필요한 정보를 인터 예측 정보로서 부호화한다. 다른 예로서, 기존의 인터 예측 방식을 대체하여 CNN 기반의 인터 예측 방식만이 사용되는 경우, 부호화부(150)는 CNN 기반의 인터 예측을 수행하기 위해 필요한 정보를 부호화한다. CNN 기반의 인터 예측을 수행하기 위해 필요한 정보는 CNN의 입력 데이터 또는 필터 계수에 대한 선택 정보를 포함할 수 있으며 도 22 등을 참조하여 상세하게 후술하기로 한다.Furthermore, when both the existing inter prediction scheme and the CNN based inter prediction scheme are used, the encoder 150 encodes information (flag) indicating whether to use the CNN based inter prediction scheme. When the CNN-based inter prediction scheme is not used, since the conventional inter prediction scheme is used, the encoder 150 encodes the information about the reference picture and the motion vector as the inter prediction information. On the other hand, when the CNN based inter prediction method is used, the encoder 150 encodes information necessary for performing CNN based inter prediction as inter prediction information. As another example, when only the CNN based inter prediction method is used in place of the existing inter prediction method, the encoder 150 encodes information necessary for performing CNN based inter prediction. Information necessary for performing CNN-based inter prediction may include selection information on input data or filter coefficients of the CNN, which will be described later in detail with reference to FIG. 22.
역양자화부(160)는 양자화부(145)로부터 출력되는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 생성한다. 역변환부(165)는 역양자화부(160)로부터 출력되는 변환 계수들을 주파수 도메인으로부터 공간 도메인으로 변환하여 잔차 블록을 복원한다.The inverse quantizer 160 inversely quantizes the quantized transform coefficients output from the quantizer 145 to generate transform coefficients. The inverse transformer 165 restores the residual block by converting the transform coefficients output from the inverse quantizer 160 from the frequency domain to the spatial domain.
가산부(170)는 복원된 잔차 블록과 예측부(120)에 의해 생성된 예측 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록 내의 픽셀들은 다음 순서 블록의 인트라 예측을 위한 참조 픽셀로 사용된다.The adder 170 reconstructs the current block by adding the reconstructed residual block and the prediction block generated by the predictor 120. The pixels in the reconstructed current block are used as reference pixels for intra prediction of the next order block.
필터부(180)는 블록 기반의 예측 및 변환/양자화로 인해 발생하는 블록킹 아티팩트(blocking artifacts), 링잉 아티팩트(ringing artifacts), 블러링 아티팩트(blurring artifacts) 등을 감소시키기 위해, 복원된 픽셀들에 대한 필터링을 수행한다. 필터부(180)는 디블록킹 필터(182)와 SAO 필터(184)를 포함할 수 있다.The filter unit 180 may reduce the blocking artifacts, the ringing artifacts, the blurring artifacts, and the like that occur due to block-based prediction and transformation / quantization. Perform filtering on The filter unit 180 may include a deblocking filter 182 and a SAO filter 184.
디블록킹 필터(180)는 복원된 블록 간의 경계를 필터링하여 블록 단위의 부호화/복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하고, SAO 필터(184)는 디블록킹 필터링된 영상에 대해 추가적인 필터링을 수행한다. SAO 필터(184)는 손실 부호화(lossy coding)로 인해 발생하는 복원된 픽셀과 원본 픽셀 간의 차이를 보상하기 위해 사용되는 필터에 해당한다. The deblocking filter 180 filters the boundaries between the reconstructed blocks to remove blocking artifacts caused by the encoding / decoding of blocks. The SAO filter 184 further filters the deblocking filtered image. Do this. The SAO filter 184 corresponds to a filter used to compensate for the difference between the reconstructed pixel and the original pixel caused by lossy coding.
디블록킹 필터(182) 및 SAO 필터(184)를 통해 필터링된 복원 블록은 메모리(190)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The reconstructed blocks filtered through the deblocking filter 182 and the SAO filter 184 are stored in the memory 190. When all the blocks in a picture are reconstructed, the reconstructed picture is used as a reference picture for inter prediction of a block in a picture to be encoded later.
도 4는 본 개시의 기술들을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다. 이하에서는 도 4를 참조하여 영상 복호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.4 is an exemplary block diagram of an image decoding apparatus that may implement techniques of this disclosure. Hereinafter, an image decoding apparatus and subcomponents thereof will be described with reference to FIG. 4.
도 4에 도시된 바와 같이, 영상 복호화 장치는 복호화부(410), 역양자화부(420), 역변환부(430), 예측부(440), 가산기(450), 필터부(460) 및 메모리(470)를 포함하여 구성될 수 있다.As shown in FIG. 4, the image decoding apparatus includes a decoder 410, an inverse quantizer 420, an inverse transformer 430, a predictor 440, an adder 450, a filter 460, and a memory ( 470).
영상 복호화 장치는 도 1에 예시된 영상 부호화 장치와 마찬가지로, 각 구성요소가 하드웨어 칩으로 구현될 수 있으며, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 소프트웨어의 기능을 실행하도록 구성될 수도 있다.In the image decoding apparatus, similar to the image encoding apparatus illustrated in FIG. 1, each component may be implemented as a hardware chip, and the functions of each component may be implemented in software and the microprocessor may be configured to execute the functions of each software. have.
복호화부(410)는 영상 부호화 장치로부터 수신된 비트스트림을 복호화하여 블록 분할과 관련된 정보(루마 블록의 분할정보 및/또는 크로마 블록의 분할정보)를 추출하고, 이를 이용하여 복호화하고자 하는 현재 블록을 결정하며, 현재 블록을 복원하기 위해 필요한 예측 정보와 잔차 신호에 대한 정보 등을 추출한다.The decoder 410 decodes the bitstream received from the image encoding apparatus, extracts information related to block division (partition information of the luma block and / or partition information of the chroma block), and uses the same to decode the current block to be decoded. It extracts the prediction information and the information about the residual signal necessary to recover the current block.
복호화부(410)는 SPS(Sequence Parameter Set) 또는 PPS(Picture Parameter Set)로부터 CTU size에 대한 정보를 추출하여 CTU의 크기를 결정하고, 픽처를 결정된 크기의 CTU로 분할한다. 또한, 복호화부(410)는 CTU를 트리 구조의 최상위 레이어, 즉, 루트 노드로 결정하고, 비트스트림으로부터 분할 정보를 추출한 후, 이를 이용하여 블록을 분할 또는 복원한다. The decoder 410 extracts information on the CTU size from a Sequence Parameter Set (SPS) or Picture Parameter Set (PPS) to determine the size of the CTU, and divides the picture into a CTU of the determined size. In addition, the decoder 410 determines the CTU as the highest layer of the tree structure, that is, the root node, extracts partition information from the bitstream, and divides or reconstructs the block using the extracted information.
또한, 복호화부(410)는 QT 분할의 리프 노드에 해당하는 노드에 대해서는 블록의 BT 분할 여부 및 분할 타입(분할 방향)에 대한 정보를 추출하여 해당 리프 노드를 BT 구조로 분할한다. In addition, the decoder 410 extracts information about whether a block is divided into BT and a split type (dividing direction) for a node corresponding to a leaf node of a QT split, and divides the corresponding leaf node into a BT structure.
다른 예로서, QTBTTT 구조를 사용하여 블록을 분할 또는 복원하는 경우, 복호화부(410)는 QT 분할 여부에 대한 정보(플래그)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할하고, QT 분할의 리프 노드(QT 분할이 더 이상 발생하지 않는 노드)에 해당하는 노드에 대해서는 BT 또는 TT로 더 분할되는지 여부, 분할 방향에 대한 정보 및 BT 구조인지 TT 구조인지를 구별하는 분할 타입 정보를 추출하여 BT 또는 TT 구조로 반복적으로(recursively) 분할한다.As another example, when splitting or restoring a block using the QTBTTT structure, the decoder 410 extracts information (flag) on whether to split the QT, divides each node into four nodes of a lower layer, and splits the QT. For nodes corresponding to leaf nodes (nodes where QT splitting no longer occurs), information about whether the split is further divided by BT or TT, information on the split direction, and split type information that distinguishes the BT or TT structure is extracted. Recursively split into BT or TT structures.
또 다른 예로서, QTBTTT 구조를 사용하여 블록을 분할 또는 복원하는 경우, 복호화부(410)는 분할 여부에 대한 정보(예를 들어, 플래그)를 추출하고, 해당 블록이 분할된 경우 분할 타입 정보를 추출한다. 분할 타입이 QT인 경우, 복호화부(410)는 각 노드를 하위 레이어에 해당하는 네 개의 노드들로 분할한다. 분할 타입이 QT 분할의 리프 노드(QT 분할이 더 이상 발생하지 않는 노드) 타입 즉, BT 또는 TT로 분할되었음을 나타내는 경우, 복호화부(410)는 추가적으로 분할 방향에 대한 정보 및 BT 구조인지 TT 구조인지를 구별하는 분할 타입 정보를 추출하여 BT 또는 TT 구조로 분할한다.As another example, when dividing or restoring a block using the QTBTTT structure, the decoder 410 extracts information (eg, a flag) on whether to split or not, and splits type information when the corresponding block is divided. Extract. When the partition type is QT, the decoder 410 divides each node into four nodes corresponding to lower layers. If the splitting type indicates that the splitting node is a leaf node of the QT splitting (node where QT splitting no longer occurs), that is, split into BT or TT, the decoder 410 additionally includes information on splitting direction and whether the BT or TT structure is present. Extract the partition type information for identifying the partition and split it into a BT or TT structure.
이와 같이, 분할정보를 이용하여 복호화하고자 하는 현재 블록이 결정되면, 복호화부(410)는 현재 블록이 인트라 예측되었는지 아니면, 인터 예측되었는지를 지시하는 예측 타입에 대한 정보를 추출한다. As such, when the current block to be decoded is determined using the split information, the decoder 410 extracts information about a prediction type indicating whether the current block is intra predicted or inter predicted.
예측 타입 정보가 인트라 예측을 지시하는 경우, 복호화부(410)는 현재 블록의 인트라 예측정보(인트라 예측 모드)에 대한 신택스 요소를 추출한다. 예측 타입 정보가 인터 예측을 지시하는 경우, 복호화부(410)는 인터 예측정보에 대한 신택스 요소 즉, 움직임벡터 및 그 움직임벡터가 참조하는 참조 픽처를 나타내는 정보(현재 블록의 움직임 정보)를 추출한다. When the prediction type information indicates intra prediction, the decoder 410 extracts a syntax element for intra prediction information (intra prediction mode) of the current block. When the prediction type information indicates inter prediction, the decoder 410 extracts a syntax element of the inter prediction information, that is, a motion vector and information indicating the reference picture to which the motion vector refers (motion information of the current block). .
한편, 복호화부(410)는 잔차 신호에 대한 정보로서 현재 블록의 양자화된 변환계수들에 대한 정보를 추출한다.Meanwhile, the decoder 410 extracts information about quantized transform coefficients of the current block as information on the residual signal.
역양자화부(420)는 양자화된 변환계수들을 역양자화하고, 역변환부(430)는 역양자화된 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환하여 잔차 신호들을 복원함으로써 현재 블록에 대한 잔차 블록을 생성한다.The inverse quantizer 420 inverse quantizes the quantized transform coefficients, and the inverse transformer 430 inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to generate a residual block for the current block. .
예측부(440)는 인트라 예측부(442) 및 인터 예측부(444)를 포함하여 구성될 수 있는 데, 인트라 예측부(342)는 현재 블록의 예측 타입이 인트라 예측일 때 활성화되고, 인터 예측부(344)는 현재 블록의 예측 타입이 인트라 예측일 때 활성화된다.The predictor 440 may include an intra predictor 442 and an inter predictor 444. The intra predictor 342 is activated when the prediction type of the current block is intra prediction, and inter prediction. Unit 344 is activated when the prediction type of the current block is intra prediction.
인트라 예측부(442)는 복호화부(410)로부터 추출된 인트라 예측 모드에 대한 신택스 요소를 이용하여 복수의 인트라 예측 모드 중 현재 블록의 인트라 예측 모드를 결정하고, 결정된 인트라 예측 모드에 따라 현재 블록 주변의 참조 픽셀들을 이용하여 현재 블록을 예측한다. The intra prediction unit 442 determines the intra prediction mode of the current block among the plurality of intra prediction modes by using the syntax element for the intra prediction mode extracted from the decoder 410, and surrounds the current block according to the determined intra prediction mode. Predict the current block by using the reference pixels.
후술하는 바와 같이, 현재 블록에 대한 인트라 예측 모드가 CNN 모드로 결정된 경우, 인트라 예측부(442)는 영상 부호화 장치에 의해 결정된 컨볼루션 커널의 계수(즉, 필터 계수)를 이용하여 CNN의 추론 과정을 수행함으로써 현재 블록을 예측할 수 있다.As described below, when the intra prediction mode for the current block is determined as the CNN mode, the intra prediction unit 442 infers the CNN by using the coefficients of the convolution kernel determined by the image encoding apparatus (ie, the filter coefficients). By predicting the current block can be predicted.
인터 예측부(444)는 복호화부(410)로부터 추출된 인터 예측 모드에 대한 신택스 요소를 이용하여 현재 블록의 움직임 벡터와 이 움직임 벡터가 참조하는 참조 픽처를 결정하고, 움직임 벡터와 참조 픽처를 통해 현재 블록을 예측한다. The inter prediction unit 444 determines a motion vector of the current block and a reference picture to which the motion vector refers by using syntax elements of the inter prediction mode extracted from the decoder 410, and then uses the motion vector and the reference picture. Predict the current block.
후술하는 바와 같이, 인터 예측부(444)는, CNN 기반의 추론 과정을 통해, 현재 블록의 움직임 벡터를 생성하거나 또는 직접적으로 현재 블록의 예측 픽셀들을 생성할 수도 있다.As described below, the inter prediction unit 444 may generate a motion vector of the current block or directly generate prediction pixels of the current block through a CNN-based inference process.
또한, 인터 예측부(444)는 1차적으로 기존의 인터 예측 방식(즉, 움직임 보상(MC))에 따라 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성한 후, 2차적으로 해당 움직임 벡터 또는 예측 픽셀들을 CNN 기반의 추론 과정을 통해 재정의(refinement)함으로써 현재 블록의 움직임 벡터 또는 예측 픽셀들을 최종적으로 생성할 수도 있다.In addition, the inter prediction unit 444 first generates motion vectors or prediction pixels of the current block according to an existing inter prediction scheme (ie, motion compensation MC), and then secondly, the corresponding motion vectors or prediction pixels. By refining them through a CNN based inference process, the motion vector or the prediction pixels of the current block may be finally generated.
인터 예측부(444)는 기존의 인터 예측 방식과 함께 CNN 기반의 인터 예측 방식을 병렬적으로 운용할 수도 있다. 이 경우, 복호화부(410)에서는 예측 타입 정보가 인터 예측을 나타낼 때 CNN 기반의 인터 예측인지 여부를 지시하는 정보(예컨대, 플래그)를 추가로 복호화한다. 인터 예측부(444)는 복호화부(410)가 복호화한 CNN 기반의 인터 예측인지 여부를 지시하는 정보에 따라 기존 인터 예측 방식 또는 CNN 기반의 인터 예측을 선택적으로 수행한다. 대안적으로, 인터 예측부(444)는 CNN 기반의 인터 예측 방식만을 독자적으로 운용할 수도 있다. 이 경우, 인터 예측부(444)는 복호화부(410)에 의해 복호화된 예측 타입 정보(인트라 예측인지 인터 예측인지 여부를 나타내는 정보)가 인터 예측을 지시할 때 CNN 기반의 인터 예측을 수행한다.The inter prediction unit 444 may operate in parallel with the CNN-based inter prediction method together with the existing inter prediction method. In this case, the decoder 410 further decodes information (eg, a flag) indicating whether the prediction type information indicates CNN based inter prediction. The inter prediction unit 444 selectively performs an existing inter prediction method or CNN based inter prediction according to information indicating whether the decoder 410 is CNN based inter prediction. Alternatively, the inter prediction unit 444 may independently operate only the CNN based inter prediction scheme. In this case, the inter prediction unit 444 performs CNN based inter prediction when the prediction type information (information indicating whether intra prediction or inter prediction) decoded by the decoder 410 indicates inter prediction.
가산기(450)는 역변환부(430)로부터 출력되는 잔차 블록과 인터 예측부(444) 또는 인트라 예측부(442)로부터 출력되는 예측 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록 내의 픽셀들은 이후에 복호화할 블록의 인트라 예측을 위한 참조 픽셀로 활용된다.The adder 450 reconstructs the current block by adding the residual block output from the inverse transformer 430 and the prediction block output from the inter predictor 444 or the intra predictor 442. The pixels in the reconstructed current block are used as reference pixels for intra prediction of a block to be decoded later.
필터부(460)는 디블록킹 필터(462) 및 SAO 필터(464)를 포함한다. 디블록킹 필터(462)는 복원된 블록 간의 경계를 디블록킹 필터링하여 블록 단위의 복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거한다. SAO 필터(464)는, 손실 부호화(lossy coding)으로 인해 발생하는 복원된 픽셀과 원본 픽셀 간의 차이를 보상하기 위해, 디블록킹 필터링 이후의 복원된 블록에 대해 추가적인 필터링을 수행한다. The filter unit 460 includes a deblocking filter 462 and a SAO filter 464. The deblocking filter 462 removes blocking artifacts caused by block-by-block decoding by deblocking filtering the boundary between the reconstructed blocks. The SAO filter 464 performs additional filtering on the reconstructed block after the deblocking filtering to compensate for the difference between the reconstructed pixel and the original pixel resulting from lossy coding.
디블록킹 필터(462) 및 SAO 필터(464)를 통해 필터링된 복원 블록은 메모리(470)에 저장되고, 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The reconstructed block filtered through the deblocking filter 462 and the SAO filter 464 is stored in the memory 470, and when all the blocks in one picture are reconstructed, the reconstructed picture intercepts the block in the picture to be subsequently encoded. It is used as a reference picture for prediction.
본 개시의 기술들은, 일반적으로, 영상 부호화 또는 복호화에 인공 신경망 기술을 적용하는 것과 관련되어 있다. The techniques of this disclosure generally relate to applying artificial neural network techniques to image encoding or decoding.
본 개시의 일부 기술들은, 영상 부호화 장치 및 복호화 장치에서 디블록킹 필터와 SAO 필터의 기능을 수행할 수 있는 CNN 기반의 필터와 관련되어 있다. 본 개시의 다른 일부 기술들은, CNN 기반의 인트라 예측을 수행하는 것과 관련되어 있다. 본 개시의 또 다른 일부 기술들은, CNN 기반의 인터 예측을 수행하는 것과 관련되어 있다. 본 개시의 또 다른 일부 기술들은 현재 블록의 인트라 예측에 이용되는 참조 영역에 대해 CNN 기반의 필터링을 수행하는 것과 관련되어 있다. Some techniques of this disclosure relate to a CNN-based filter capable of performing the functions of a deblocking filter and a SAO filter in an image encoding apparatus and a decoding apparatus. Some other techniques of this disclosure relate to performing CNN based intra prediction. Some other techniques of this disclosure relate to performing CNN based inter prediction. Some other techniques of this disclosure relate to performing CNN based filtering on a reference region used for intra prediction of the current block.
도 5는 본 개시의 기술들에 이용될 수 있는 CNN의 예시적인 구조를 도시한 도면이다.5 is a diagram illustrating an exemplary structure of a CNN that may be used in the techniques of this disclosure.
도 5를 참조하면, CNN(Convolutional Neural Network)은 영상처리를 위해 고안된 특수한 연결구조를 갖는 다층신경망으로서, 입력 레이어(510), 히든 레이어(530) 및 출력 레이어(550)를 포함할 수 있다. 히든 레이어(530)는 입력 레이어(510)와 출력 레이어(550) 사이에 위치하며, 복수의 컨볼루션 레이어(531 내지 439)를 포함할 수 있다. 히든 레이어(530)는 컨볼루션 연산의 결과인 특징 맵(feature map)의 해상도(resolution)를 조절하기 위하여, 업샘플링(upsampling) 레이어 또는 풀링(pooling) 레이어를 더 포함할 수 있다. 또한, CNN은 VDSR(Very Deep Super Resolution) 또는 VDSR에 ResNet을 조합한 구조(미도시)를 가질 수도 있다.Referring to FIG. 5, a convolutional neural network (CNN) is a multilayer neural network having a special connection structure designed for image processing, and may include an input layer 510, a hidden layer 530, and an output layer 550. The hidden layer 530 is positioned between the input layer 510 and the output layer 550 and may include a plurality of convolution layers 531 to 439. The hidden layer 530 may further include an upsampling layer or a pooling layer in order to adjust the resolution of a feature map that is a result of the convolution operation. In addition, the CNN may have a structure (not shown) in which ResNet is combined with VDSR (Very Deep Super Resolution) or VDSR.
CNN을 구성하는 모든 레이어들은 각각 복수의 노드들을 포함하며, 각 노드는 인접한 다른 레이어의 노드들과 상호 연결되어 소정의 연결 가중치가 적용된 출력 값을 다른 노드들의 입력으로 전달할 수 있다.All layers constituting the CNN each include a plurality of nodes, and each node may be interconnected with nodes of other adjacent layers so as to transfer an output value to which a predetermined connection weight is applied as an input of other nodes.
컨볼루션 레이어(531 내지 539)는 2차원 행렬 또는 3차원 행렬 형태의 컨볼루션 커널(즉, 필터)을 이용하여 각 레이어에 입력된 영상 데이터에 대해 컨볼루션 연산을 수행함으로써 특징 맵을 생성할 수 있다. 여기서, 특징 맵은 각 레이어에 입력된 영상 데이터의 다양한 특징들이 표현된 영상 데이터를 의미한다. 컨볼루션 레이어(531 내지 539)의 개수, 컨볼루션 커널의 크기 등은 학습 과정 이전에 미리 설정될 수 있다.The convolution layers 531 to 539 may generate a feature map by performing a convolution operation on image data input to each layer using a convolution kernel (ie, a filter) in the form of a 2D matrix or a 3D matrix. have. Here, the feature map refers to image data in which various features of image data input to each layer are expressed. The number of convolution layers 531 to 539, the size of the convolution kernel, and the like may be preset before the learning process.
출력 레이어(550)는 완전 연결 레이어(fully connected layer)로 구성될 수 있다. 출력 레이어(550)의 노드들은 특징 맵에 표현된 다양한 특징들을 조합하여 영상 데이터를 출력할 수 있다.The output layer 550 may be composed of a fully connected layer. The nodes of the output layer 550 may output image data by combining various features expressed in the feature map.
CNN 알고리즘은 학습 과정과 추론 과정으로 구분될 수 있다. 학습 과정은 학습 방식에 따라 지도 학습(supervised learning), 비지도 학습(unsupervised learning) 및 강화 학습(reinforcement learning)으로 구분될 수 있다. 이 중, 지도 학습이란 입력 레이어(510)로 입력되는 데이터(이하, '입력 데이터'라고 칭함)에 대한 명시적인 정답인 출력 레이블(label)을 이용하여 컨볼루션 커널의 계수값들(즉, 필터계수)을 산출하는 과정을 의미한다.The CNN algorithm can be divided into learning process and inference process. The learning process may be classified into supervised learning, unsupervised learning, and reinforcement learning according to a learning method. Among these, supervised learning refers to coefficient values (ie, filters) of the convolution kernel using an output label that is an explicit answer to data input to the input layer 510 (hereinafter referred to as 'input data'). Coefficient).
CNN의 필터계수는 소정의 입력 데이터에 대해 오류 역전파(error backpropagation) 알고리즘을 이용한 반복된 지도 학습을 통해 산출될 수 있다. 구체적으로, 오류 역전파 알고리즘에 따르면, CNN의 출력 데이터와 출력 레이블 사이의 오차가 출력 레이어(550)로부터 히든 레이어(530)를 거쳐 입력 레이어(510)로 향하는 역방향으로 전파된다. 해당 오차의 전파 과정에서, 노드들 사이의 연결 가중치들은 해당 오차를 감소시키는 방향으로 업데이트된다. 그리고, 해당 오차가 미리 설정된 임계치 미만이 될 때까지 CNN의 지도 학습 과정을 반복함으로써, CNN의 추론 과정에 이용될 최적의 필터계수가 산출될 수 있다.The filter coefficient of the CNN may be calculated through repeated supervised learning using an error backpropagation algorithm for predetermined input data. Specifically, according to the error backpropagation algorithm, the error between the output data of the CNN and the output label propagates in the reverse direction from the output layer 550 through the hidden layer 530 to the input layer 510. In the process of propagation of the corresponding error, the connection weights between the nodes are updated in the direction of reducing the corresponding error. In addition, by repeating the supervised learning process of the CNN until the corresponding error is less than a preset threshold, an optimal filter coefficient to be used in the inference process of the CNN may be calculated.
이제, 영상 부호화 또는 복호화 프로세스의 일부에 CNN을 이용하는 본 개시의 기술들을 상세히 설명한다.Now, the techniques of this disclosure using CNN as part of the video encoding or decoding process will be described in detail.
1. CNN 기반의 필터를 이용한 화질 개선1. Image quality improvement using CNN based filter
이하, 도 6 내지 도 13을 참조하여, CNN 기반의 필터를 이용한 화질 개선 기법에 관해 기술한다. 이하에서 설명되는 CNN 기반의 필터는 영상 부호화 장치 및 영상 복호화 장치 모두에서 사용될 수 있다. 예컨대, CNN 기반의 필터는 영상 부호화 장치의 디블록킹 필터(182)와 SAO 필터(284)에 대용하여 사용될 수 있으며, 영상 복호화 장치의 디블록킹 필터(462)와 SAO 필터(464)에 대용하여 사용될 수 있다. 또한, 이하의 설명에서, 픽처를 구성하는 정보로 YUV를 예로 들어 CNN 기반의 필터를 설명하고 있으나, RGB, YCbCr 등에도 CNN 기반의 필터가 적용될 수 있다. 즉, 이하의 설명에서 '화질을 개선시킬 YUV'는 '화질을 개선시킬 RGB' 혹은 '화질을 개선시킬 YCbCr' 등이 될 수도 있다고 이해하여야 한다.Hereinafter, the image quality improvement technique using the CNN-based filter will be described with reference to FIGS. 6 to 13. The CNN-based filter described below may be used in both the image encoding apparatus and the image decoding apparatus. For example, the CNN-based filter may be used in place of the deblocking filter 182 and the SAO filter 284 of the image encoding apparatus, and may be used in place of the deblocking filter 462 and the SAO filter 464 of the image decoding apparatus. Can be. In the following description, CNN-based filters are described using YUV as an example of information constituting pictures, but CNN-based filters may be applied to RGB, YCbCr, and the like. That is, in the following description, it should be understood that 'YUV to improve picture quality' may be 'RGB to improve picture quality' or 'YCbCr to improve picture quality'.
도 6은 본 발명의 일 실시예에 따른 CNN 기반의 필터를 예시한 도면이다.6 illustrates a CNN-based filter according to an embodiment of the present invention.
입력 레이어에 양자화 파라미터(QP: quantization parameter) 맵(603)과 블록 분할(block partition) 맵(605) 중 적어도 하나와 화질을 개선시킬 YUV(601)가 입력되면 출력 레이어로 YUV 차(difference)(621)가 출력된다. 여기서 화질을 개선시킬 YUV(601)는 부호화기로부터 수신된 비트 스트림으로부터 복원된 YUV(601)일 수 있으며, 원본 YUV가 인위적 또는 비인위적으로 손상된 YUV를 의미한다. 추가적으로 입력 레이어에 힌트(미도시)도 함께 입력될 수 있다. If at least one of a quantization parameter (QP) map 603 and a block partition map 605 and a YUV 601 for improving image quality are input to the input layer, a YUV difference ( 621 is output. Here, the YUV 601 to improve the image quality may be a YUV 601 reconstructed from the bit stream received from the encoder, and means a YUV in which the original YUV is artificially or unartificially damaged. In addition, a hint (not shown) may also be input to the input layer.
먼저, 학습 과정에서는 상기 출력 레이어로 출력된 YUV 차(621)가 원본 YUV와 화질을 개선시킬 YUV의 차가 되도록 CNN 기반의 필터의 계수 즉, 컨볼루션 커널의 계수가 학습된다. 여기서 컨볼루션 커널은 2D(dimension), 3D 형태 모두 가능하다. CNN 기반의 필터(611)는 입력된 YUV의 화질을 개선시키기 위한 것으로 CNN 기반의 필터(611)의 최종 출력은 YUV 즉, 화질이 개선된 YUV(631)로 칭한다.First, in the learning process, the coefficients of the CNN-based filter, that is, the coefficients of the convolution kernel, are trained such that the YUV difference 621 outputted to the output layer is the difference between the original YUV and the YUV to improve the image quality. The convolution kernel is available in 2D and 3D forms. The CNN-based filter 611 is for improving the image quality of the input YUV, and the final output of the CNN-based filter 611 is called YUV, that is, the YUV 631 with improved image quality.
여기서, 화질을 개선시킬 YUV는 각 채널별로 필터링되거나 한꺼번에 필터링 될 수 있다. Here, the YUV to improve the image quality may be filtered for each channel or may be filtered at once.
QP 맵의 크기는 필터링하고자 하는 입력되는 YUV와 동일한 해상도(resolution)로 설정되고, QP 맵의 값은 YUV plane 내 부호화 단위 예를 들어, 블록 혹은 서브 블록에서 사용한 QP 값으로 채워질 수 있다. 이때 YUV가 각 채널별로 필터링된다면, 필터링하고자 하는 채널의 QP 값으로 하나의 맵이 구성될 수 있다. YUV가 한번에 필터링된다면 세 채널의 QP 값이 별도의 3개 맵으로 구성되거나 평균 QP값을 갖는 하나의 맵으로 구성될 수 있다. The size of the QP map may be set to the same resolution as the input YUV to be filtered, and the value of the QP map may be filled with QP values used in coding units in the YUV plane, for example, blocks or sub-blocks. At this time, if the YUV is filtered for each channel, one map may be configured with the QP value of the channel to be filtered. If the YUV is filtered at one time, the QP values of the three channels may consist of three separate maps or one map having an average QP value.
CNN 기법의 정확도를 높이기 위한 방법으로, 입력 레이어로 QP 맵, 블록 분할 맵, 화질 개선 대상 영상 외에 학습 과정에 유용한 블록 모드 맵 정보가 힌트 정보로 추가될 수 있다. 여기서, 블록 모드 맵이란 부호화 단위 예를 들어, 블록 혹은 서브 블록에서 사용한 모드 값으로 채워질 수 있다. 예컨대, 블록이 인트라 모드로 부호화 되었는지 또는 인터 모드로 부호화 되었는지를 구별할 수 있는 정보일 수 있으며 상기 정보는 숫자로 표현될 수 있다. 이때, 학습 과정의 결과물인 컨볼루션 커널 계수는 입력 레이어의 데이터뿐만 아니라 힌트까지 포함하여 설정될 수 있다. 기본적으로 CNN 기법의 학습 과정과 추론 과정의 입력 레이어 및 출력 레이어는 동일하게 구성되어야 한다.As a method for improving the accuracy of the CNN technique, block mode map information useful for the learning process may be added as hint information in addition to the QP map, the block division map, and the image to be improved in quality as an input layer. Here, the block mode map may be filled with a mode value used in a coding unit, for example, a block or a sub block. For example, the information may be information for distinguishing whether a block is encoded in an intra mode or an inter mode, and the information may be represented by a number. In this case, the convolution kernel coefficient that is a result of the learning process may be set to include not only the data of the input layer but also a hint. Basically, the input layer and output layer of the learning process and the inference process of the CNN technique should be configured identically.
이후, 추론 과정에서는 학습 과정에서 구한 상기 CNN 기반의 필터의 계수를 적용해 화질을 개선시킬 YUV, 양자화 파라미터 맵, 및 블록 분할 맵으로부터 화질이 개선된 YUV를 생성한다.Subsequently, the inference process generates the YUV with improved image quality from the YUV, the quantization parameter map, and the block partitioning map to improve the image quality by applying the coefficients of the CNN-based filter obtained in the learning process.
도 7a 내지 도 7c는 본 발명의 일 실시예에 따른, 연접 레이어의 위치가 상이한 CNN의 구조들을 예시한 도면이다.7A to 7C are diagrams illustrating structures of a CNN having different positions of a concatenated layer according to an embodiment of the present invention.
구체적으로, 입력 레이어(710)로 입력되는 화질을 개선시킬 YUV(701), 양자화 파라미터 맵(703), 및 블록 분할 맵(705)은 CNN 과정 중 연접(concatenate) 레이어(720)를 통해 연접될 수 있다. 다만 연접 레이어(720)의 위치는 도 7a, 도 7b, 및 도 7c에 예시된 바와 같이 변경될 수 있다.In detail, the YUV 701, the quantization parameter map 703, and the block partition map 705, which may improve the image quality input to the input layer 710, may be concatenated through the concatenate layer 720 during the CNN process. Can be. However, the position of the contiguous layer 720 may be changed as illustrated in FIGS. 7A, 7B, and 7C.
도 7a는 입력 레이어(710) 뒤에 바로 연접 레이어(720)가 위치해, 화질을 개선시킬 YUV(701), 양자화 파라미터 맵(703), 및 블록 분할 맵(705)이 입력 레이어(710)로 입력된 후 바로 연접되는 CNN의 구조를 나타낸 것이다. 도 7b는 연접 레이어(720)가 컨볼루션 레이어(730) 사이에 위치한 CNN의 구조를 나타낸 것이며, 도 7c는 연접 레이어(720)가 출력 레이어(740)의 바로 앞에 위치한 CNN의 구조를 나타낸 것이다.In FIG. 7A, a contiguous layer 720 is positioned immediately after the input layer 710, and a YUV 701, a quantization parameter map 703, and a block partition map 705 are input to the input layer 710 to improve image quality. It shows the structure of the CNN that is immediately connected. FIG. 7B illustrates the structure of the CNN in which the concatenated layer 720 is located between the convolution layers 730, and FIG. 7C illustrates the structure of the CNN in which the concatenated layer 720 is positioned immediately before the output layer 740.
도 8a 내지 도 8c는 본 발명의 일 실시예에 따른 입력 레이어로 입력될 데이터를 나타낸 도면이다.8A to 8C illustrate data to be input to an input layer according to an embodiment of the present invention.
구체적으로 도 8a는 화질을 개선시킬 Y plane (예를 들어, Y 코딩 트리 블록(coding tree block, CTB))으로써 화질을 개선시킬 휘도(luma)의 픽셀값이 생략된 것을 나타낸 것이며, 도 8b는 화질을 개선시킬 Y plane에 적용된 QP 맵, 도 8c는 화질을 개선시킬 Y plane의 블록 분할 맵을 나타낸 것이다. Specifically, FIG. 8A illustrates that a Y plane (for example, a Y coding tree block (CTB)) for improving image quality is omitted in a pixel value of luminance luma for improving image quality. QP map applied to the Y plane to improve the image quality, Figure 8c shows a block division map of the Y plane to improve the image quality.
이하에서는 본 발명의 일 실시예에 따른 블록 분할 맵의 다양한 구조에 대해 설명한다. 블록 분할 맵은 블록의 분할 여부를 표시한 것으로, CNN의 학습 과정과 추론 과정에서 블록의 분할된 경계와 블록의 내부 영역에 대한 처리를 다르게 할 수 있도록 돕는다.Hereinafter, various structures of a block division map according to an embodiment of the present invention will be described. The block partitioning map indicates whether a block is divided or not, so that the processing of the partitioned boundary of the block and the inner region of the block may be differently performed during the CNN's learning process and inference process.
도 9a 및 도 9b는 본 발명의 일 실시예에 따른 블록 분할 맵의 일예를 보인다.9A and 9B show an example of a block partitioning map according to an embodiment of the present invention.
블록 분할 맵은 필터링 하고자 하는 YUV plane과 동일한 해상도로 설정되며, 블록 분할 여부를 나타내는 값으로 구성될 수 있다. 예를 들어 YUV plane이 다수 개의 부호화 블록 즉, 코딩 블록(coding block, CB)을 포함하는 코딩 트리 블록으로 구성되는 경우, 블록 분할 맵은 코딩 트리 블록 내의 부호화 블록의 분할 경계선을 나타낼 수 있다. 도 9a는 QTBT(quadtree plus binary tree) 방식으로 분할된 코딩 트리 블록을 나타낸 것이며, 도 9b는 상기 코딩 트리 블록에 따른 블록 분할 맵을 나타낸 것이다. 도 9b를 참조하면, 블록 분할 맵에서 부호화 블록의 경계는 '1'로 표시되고 상기 부호화 블록의 내부는 '0'으로 표시되어 있다. The block division map may be set to the same resolution as the YUV plane to be filtered and may be configured to indicate whether to block the partition. For example, when the YUV plane is composed of a coding tree block including a plurality of coding blocks, that is, coding blocks (CBs), the block partitioning map may represent a division boundary of the coding blocks in the coding tree block. FIG. 9A illustrates a coding tree block divided by a quadtree plus binary tree (QTBT) scheme, and FIG. 9B illustrates a block partitioning map according to the coding tree block. Referring to FIG. 9B, the boundaries of the coding blocks are indicated by '1' and the inside of the coding blocks are indicated by '0' in the block division map.
도 10a 내지 도 10b는 본 발명의 일 실시예에 따른 블록 분할 맵의 다른 일예를 보인다.10A to 10B show another example of a block partitioning map according to an embodiment of the present invention.
도 10a 내지 도 10b에서는 YUV plane이 코딩 트리 블록으로 구성되는 경우 상기 코딩 트리 블록의 경계에 대한 블로킹 열화 처리가 불가할 수 있어 YUV plane에 여분의 영역(α)을 더할 수 있다. 도 10a 및 도 10b에서는 여분의 영역(α)으로 2픽셀이 설정된 일 예를 나타내고 있으나 다른 값이 설정될 수도 있다. 또한 상기 여분의 영역으로 코딩 트리 블록의 경계를 표시할 수 있으며, 코딩 트리 블록 밖의 영역에 대해서도 블록 분할 여부가 표시될 수 있다. 만약 여분의 영역을 포함하여 필터링되는 경우 상기 필터링 이후 인접하는 다른 코딩 트리 블록과 겹치는 영역이 생기게 되고 상기 겹치는 영역에 대해서는 평균값으로 처리될 수 있다. 구체적으로 도 10c를 참조하면 여분의 영역을 포함하는 코딩 트리 블록(1001, 1003)이 인접하는 경우 서로 겹치는 영역(1005)이 생긴다. 상기 겹치는 영역(1005)에 대해서는 인접하는 코딩 트리 블록(1001, 1003)의 값들의 평균값으로 설정될 수 있다. In FIGS. 10A to 10B, when the YUV plane consists of coding tree blocks, blocking deterioration processing on boundaries of the coding tree blocks may not be possible, and thus an extra area α may be added to the YUV plane. 10A and 10B show an example in which 2 pixels are set as the extra area α, but other values may be set. In addition, the boundary of the coding tree block may be indicated by the extra area, and whether or not the block is split may be displayed also in the area outside the coding tree block. If the filtering includes an extra area, an area overlapping with another adjacent coding tree block is generated after the filtering, and the overlapping area may be processed as an average value. Specifically, referring to FIG. 10C, when the coding tree blocks 1001 and 1003 including an extra area are adjacent to each other, an overlapping area 1005 is formed. The overlapping region 1005 may be set to an average value of values of adjacent coding tree blocks 1001 and 1003.
도 11a 내지 도 11c는 본 발명의 일 실시예에 따른 디블록킹의 강도를 조절하기 위한 블록 분할 맵을 예시한 도면이다. 11A to 11C illustrate block division maps for adjusting the strength of deblocking according to an embodiment of the present invention.
이전의 실시예에서는 부호화 블록의 경계를 1픽셀로 구별하였으며, 상기 1픽셀의 값이 0이면 부호화 블록의 내부를 나타내고 1이면 부호화 블록의 경계를 나타냈다. In the previous embodiment, the boundary of the coding block is distinguished by 1 pixel. When the value of the 1 pixel is 0, the inside of the coding block is represented, and the 1 is the boundary of the coding block.
도 11a에서는 디블록킹(de-blocking)의 강도를 조절하기 위해 부호화 블록의 경계를 픽셀의 개수 (혹은, 픽셀의 너비, 루마 샘플 라인, 루마 샘플 길이 등)로 표시한 것이다. 상기 픽셀의 개수는 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드 중 적어도 하나에 의해 정해질 수 있다. 예를 들면 도 11a와 같이 부호화 블록이 클 경우 상기 픽셀의 개수를 2개로 설정할 수 있고 부호화 블록이 작을 경우 상기 픽셀의 개수를 1개로 설정할 수 있다. 또한 양자화 파라미터의 값이 크면 상기 픽셀의 개수를 많이, 양자화 파라미터의 값이 작으면 상기 픽셀의 개수를 적게 설정할 수 있다. 다른 예로 부호화 모드가 인트라(intra)이면 상기 픽셀의 개수를 많이, 인터(inter)이면 상기 픽셀의 개수를 적게 설정할 수 있다. 이들은 모두 역으로도 설정 가능하다. In FIG. 11A, the boundaries of the coding blocks are expressed by the number of pixels (or, pixel width, luma sample line, luma sample length, etc.) in order to control the strength of de-blocking. The number of pixels may be determined by at least one of a size of a coding block, a value of a quantization parameter, and an encoding mode. For example, as shown in FIG. 11A, when the coding block is large, the number of pixels may be set to two, and when the coding block is small, the number of pixels may be set to one. In addition, if the value of the quantization parameter is large, the number of pixels may be increased. If the value of the quantization parameter is small, the number of pixels may be set. As another example, when the encoding mode is intra, the number of the pixels may be increased, and when the encoding mode is inter, the number of the pixels may be set to be small. These can all be set in reverse.
상기 픽셀의 개수는 필터링을 통해 업데이트 하고자 하는 블록 경계선에 위치하는 픽셀의 개수를 의미할 수 있다. 예컨대, 블록 경계선에 위치하는 한 블록 내 3 픽셀값을 업데이트 하고자 할 때는, 블록 분할 맵에서 3픽셀로 블록의 경계를 표시할 수 있다. 다른 예로, 상기 픽셀의 개수는 필터링에 참조하려는 블록 경계선에 위치하는 픽셀의 개수를 의미할 수 있다. 예컨대, 블록 경계선에 위치하는 한 블록 내 4 픽셀값을 참고하여 필터링을 진행하고자 할 때는 블록 분할 맵에서 4픽셀로 블록의 경계를 표시할 수 있다.The number of pixels may mean the number of pixels located at a block boundary to be updated by filtering. For example, when a 3 pixel value in one block located at the block boundary line is to be updated, the boundary of the block may be indicated by 3 pixels in the block division map. As another example, the number of pixels may mean the number of pixels located at a block boundary line to be referred to for filtering. For example, when filtering is performed by referring to 4 pixel values of a block located at a block boundary line, the block boundary may be indicated by 4 pixels in the block division map.
도 11b에서는 디블록킹의 강도를 조절하기 위해 부호화 블록의 경계값을 달리 표시한 것이다. 상기 부호화 블록의 경계값은 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드, 업데이트 할 픽셀의 개수, 및 필터링에 참조하려는 픽셀의 개수 중 적어도 하나에 의해 정해질 수 있다. 도 7a와 마찬가지로 부호화 블록이 크거나, 양자화 파라미터의 값이 크거나 부호화 모드가 인트라(intra)이면 상기 부호화 블록의 경계값을 크게 설정할 수 있고 반대로 부호화 블록이 작거나, 양자화 파라미터의 값이 작거나 부호화 모드가 인터(inter)이면 상기 부호화 블록의 경계값을 작게 설정할 수 있다. 이들 또한 모두 역으로도 설정 가능하다.In FIG. 11B, the boundary value of the coding block is displayed differently in order to adjust the strength of deblocking. The boundary value of the coding block may be determined by at least one of a size of a coding block, a value of a quantization parameter, an encoding mode, a number of pixels to be updated, and a number of pixels to be referred to for filtering. As shown in FIG. 7A, when the coding block is large, the value of the quantization parameter is large, or the coding mode is intra, the boundary value of the coding block can be set large, and conversely, the coding block is small, or the value of the quantization parameter is small. If the encoding mode is inter, the boundary value of the coding block may be set small. Both of these can also be set in reverse.
도 11c는 디블록킹의 강도를 조절하기 위해 부호화 블록 경계의 픽셀의 개수 및 부호화 블록의 경계값으로 표시한 것이다. 이에 대한 설명은 도 11a 및 도 11b에서 설명한 바와 같아 여기서는 생략한다. FIG. 11C shows the number of pixels at the boundary of the coding block and the boundary value of the coding block in order to control the strength of deblocking. Descriptions thereof will be omitted herein as described with reference to FIGS. 11A and 11B.
이상에서 설명한 바와 같이 설정된 블록 분할 맵은 학습과정에 이용되어 CNN 필터가 강한 강도의 디블록킹 필터로써 동작하도록 돕는다. As described above, the configured block partitioning map is used in the learning process to help the CNN filter to operate as a strong deblocking filter.
도 12는 본 발명의 일 실시예에 따른 CNN 기반의 필터를 이용해 영상을 복호화하는 흐름도를 예시한 도면이다.12 illustrates a flowchart of decoding an image using a CNN-based filter according to an embodiment of the present invention.
상기 CNN 기반의 필터에 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 화질을 개선시킬 YUV가 입력된다(1201). 상기 양자화 파라미터 맵은 상기 화질을 개선시킬 YUV와 동일한 해상도로 설정될 수 있다. 상기 블록 분할 맵은 블록의 분할된 경계와 상기 블록의 내부 영역을 값을 달리 표시될 수 있다. 상기 블록 분할 맵에서 블록의 분할된 경계를 나타내는 픽셀의 개수와 값은 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드, 업데이트 할 픽셀의 개수, 및 필터링에 참조하려는 픽셀의 개수 중 적어도 하나에 의해 결정될 수 있다.At least one of a quantization parameter map and a block partitioning map and a YUV for improving image quality are input to the CNN-based filter (1201). The quantization parameter map may be set to the same resolution as the YUV to improve the image quality. The block partitioning map may be displayed differently between the partitioned boundary of the block and the inner region of the block. The number and value of pixels representing the partitioned boundary of the block in the block division map are determined by at least one of the size of the coding block, the value of the quantization parameter, the encoding mode, the number of pixels to be updated, and the number of pixels to be referred to for filtering. Can be determined.
화질을 개선시킬 YUV, 양자화 파라미터 맵, 및 블록 분할 맵을 입력으로, 원본의 YUV를 최종 출력으로 하여 학습된 상기 CNN 기반의 필터의 계수를 이용해 화질이 개선된 YUV가 출력된다(1203). 상기 CNN 기반의 필터로 블록 모드 맵과 같은 힌트가 추가로 입력되는 경우, 상기 CNN 기반의 필터의 계수도 힌트가 추가로 입력되어 학습된다. As an input of a YUV, a quantization parameter map, and a block partitioning map for improving image quality, a YUV having improved image quality is output using a coefficient of the CNN-based filter learned using the original YUV as a final output (1203). When a hint such as a block mode map is additionally input to the CNN-based filter, the hint of the CNN-based filter is additionally input and learned.
도 13은 본 발명의 일 실시예에 따른 영상을 복호화하는 장치의 구성도를 개략적으로 나타낸 도면이다. 도 13에 예시된 장치는, 예컨대, 도 4의 필터부(460)에 상응하는 구성요소 혹은 모듈일 수 있다. FIG. 13 is a diagram schematically illustrating a configuration of an apparatus for decoding an image according to an embodiment of the present invention. The apparatus illustrated in FIG. 13 may be, for example, a component or a module corresponding to the filter unit 460 of FIG. 4.
상기 영상을 복호화하는 장치는 입력부(1301), 필터부(1303), 및 출력부(1305)를 포함할 수 있다. 그 외의 다른 구성을 포함할 수 있으나 본 개시와 직접적 관련이 없는 구성에 대한 설명은 생략하기로 한다. The apparatus for decoding the image may include an input unit 1301, a filter unit 1303, and an output unit 1305. Other configurations may be included, but a description of components not directly related to the present disclosure will be omitted.
입력부(1301)는 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 화질을 개선시킬 YUV가 입력된다. 상기 양자화 파라미터 맵은 상기 화질을 개선시킬 YUV와 동일한 해상도로 설정될 수 있으며, 상기 블록 분할 맵은 블록의 분할된 경계와 상기 블록의 내부 영역의 값을 달리 표시될 수 있다. 상기 블록 분할 맵에서 블록의 분할된 경계를 나타내는 픽셀의 개수와 값은 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드 중 적어도 하나에 의해 결정될 수 있다.The input unit 1301 inputs at least one of a quantization parameter map and a block division map and a YUV for improving image quality. The quantization parameter map may be set to the same resolution as the YUV to improve the image quality, and the block partitioning map may be displayed differently between the partitioned boundary of the block and the internal region of the block. The number and value of pixels representing the divided boundary of the block in the block division map may be determined by at least one of a size of a coding block, a value of a quantization parameter, and an encoding mode.
필터부(1303)는 입력부(1301)로 입력된 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 화질을 개선시킬 YUV에 학습된 상기 CNN 기반의 필터의 계수를 적용한다.The filter unit 1303 applies at least one of the quantization parameter map and the block division map input to the input unit 1301 and the coefficients of the CNN-based filter learned to the YUV to improve the image quality.
출력부(1305)는 입력된 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 화질을 개선시킬 YUV에 학습된 상기 CNN 기반의 필터의 계수를 적용해 생성한 화질이 개선된 YUV를 출력한다. The output unit 1305 outputs a YUV having an improved image quality by applying at least one of the input quantization parameter map and the block division map and the coefficients of the CNN-based filter learned to the YUV to improve the image quality.
본 예시에서는 입력부(1301), 필터부(1303), 및 출력부(1305)로 나누어 설명하였으나, 이들은 하나의 구성으로 통합되어 구현될 수도 있으며, 또한, 하나의 구성이 여러 개의 구성으로 나누어 구현될 수도 있다.In the present example, the input unit 1301, the filter unit 1303, and the output unit 1305 have been described, but they may be integrated into one configuration and implemented, and one configuration may be divided into several configurations. It may be.
2. CNN 기반의 인트라 예측(1) - CNN 기반의 예측 블록 생성2. CNN based intra prediction (1)-CNN based prediction block generation
본 개시의 일부 기술들은 CNN 기반의 인트라 예측을 수행하는 것과 관련되어 있다. 이하, 도 14 내지 도 21을 참조하여, CNN 기반의 인트라 예측을 수행하는 기법을 설명한다.Some techniques of this disclosure relate to performing CNN based intra prediction. Hereinafter, a technique of performing CNN-based intra prediction will be described with reference to FIGS. 14 to 21.
도 14는 본 발명의 일 실시예에 따른 영상 부호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다. 도 14의 CNN 예측부(1400)는, 예컨대, 도 1에 예시된 영상 부호화 장치의 인트라 예측부(122)이거나 인트라 예측부(122)에 포함되는 일 모듈일 수 있다.14 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to an embodiment of the present invention. The CNN predictor 1400 of FIG. 14 may be, for example, an intra predictor 122 of the image encoding apparatus illustrated in FIG. 1 or a module included in the intra predictor 122.
도 14를 참조하면, CNN 예측부(1400)는 블록 분할부(예컨대, 도 1의 110)로부터 전달된 부호화 대상 영상(즉, 원본 영상) 및 가산기(예컨대, 도 1의 170)로부터 전달된 복원 영상에 대해 CNN 기반의 인트라 예측을 수행하여 예측 블록을 생성할 수 있다. 이를 위해, CNN 예측부(1400)는 CNN 설정부(1410) 및 CNN 실행부(1430)를 포함할 수 있다.Referring to FIG. 14, the CNN prediction unit 1400 may restore the encoding object image (that is, the original image) transferred from the block splitter (eg, 110 of FIG. 1) and the adder (eg, 170 of FIG. 1). A prediction block may be generated by performing CNN based intra prediction on an image. To this end, the CNN prediction unit 1400 may include a CNN setting unit 1410 and a CNN execution unit 1430.
CNN 설정부(1410)는 복수의 레이어로 구성된 CNN을 이용하여 지도 학습(supervised learning)을 수행함으로써 필터 계수 즉, 컨볼루션 커널의 계수들을 산출할 수 있다. 여기서, CNN의 구조는 도 5를 참조하여 전술한 바와 같으며, CNN은 레이어의 크기를 조절하기 위해 업샘플링 레이어 또는 풀링 레이어를 더 포함하여 구성될 수 있다.The CNN setting unit 1410 may calculate filter coefficients, that is, coefficients of a convolution kernel, by performing supervised learning using a CNN composed of a plurality of layers. Herein, the structure of the CNN is as described above with reference to FIG. 5, and the CNN may further include an upsampling layer or a pulling layer to adjust the size of the layer.
입력 레이어로 입력되는 영상 데이터(이하, '입력 데이터'라 칭함)는 현재 블록보다 먼저 부호화된 참조 영역으로 구성될 수 있다.Image data input to the input layer (hereinafter, referred to as “input data”) may be configured as a reference region encoded before the current block.
참조 영역은 현재 블록에 인접한 주변 영역, 및 현재 블록을 구성하는 루마 블록 및 크로마 블록들 중 부호화하고자 하는 성분의 블록보다 먼저 부호화된 성분의 블록(이하, '다른 채널의 현재 블록'이라 칭함) 중 적어도 하나의 블록(또는, 영역)을 포함할 수 있다. 여기서, 주변 영역은 현재 블록과 동일 채널의 영역일 수도 있고 다른 채널의 영역일 수도 있다. 또한, 주변 영역은 블록 단위(즉, 주변 블록)로 구성될 수도 있고 픽셀 단위(즉, 주변 픽셀 또는 주변 라인)로 구성될 수 있다. 참조 영역은 주변 영역의 픽셀값들을 평균 연산하여 생성된 새로운 영역(즉, 평균 블록, 평균 픽셀 또는 평균 라인)을 더 포함할 수 있다.The reference region includes a neighboring region adjacent to the current block, and a block of components (hereinafter, referred to as 'current blocks of other channels') that are encoded before the block of the component to be encoded among the luma blocks and chroma blocks constituting the current block. It may include at least one block (or area). Here, the peripheral area may be an area of the same channel as the current block or an area of another channel. In addition, the peripheral area may be configured in block units (ie, peripheral blocks) or in pixel units (ie, peripheral pixels or peripheral lines). The reference region may further include a new region (ie, an average block, an average pixel, or an average line) generated by averaging pixel values of the peripheral region.
도 15는 CNN의 입력 데이터로 이용될 수 있는 주변 영역에 대한 예시도이다. 구체적으로, 도 15의 (a)는 블록 단위의 주변 영역을 나타내고, 도 15의 (b)는 픽셀 단위의 주변 영역을 나타낸다.15 is an exemplary diagram of a peripheral region that can be used as input data of a CNN. Specifically, FIG. 15A illustrates a peripheral area in block units, and FIG. 15B illustrates a peripheral area in pixel units.
도 15의 (a)를 참조하면, 블록 단위의 참조 영역 즉, 주변 블록들은 현재 블록(X)에 인접한 좌측블록(C), 상단블록(B), 우상단블록(D), 좌하단블록(E), 좌상단블록(A)을 포함할 수 있다. 본 명세서에서, 주변 블록들의 원본 블록(즉, 부호화 되지 않은 블록), 예측 블록 및 복원 블록은 서로 다르게 표기한다. 예컨대, 좌상단 블록(A)에 대하여, 그 원본 블록은 'Ao'로 표기하고, 예측 블록은 'Ap'로 표기하며, 복원 블록은 'Ar'로 표기한다. 또한, 주변 블록들(A,B,C,D,E)의 픽셀값들을 평균 연산한 평균 블록은 'F'로 표기한다.Referring to FIG. 15A, the reference area, that is, the neighboring blocks in block units, includes the left block C, the upper block B, the right upper block D, and the lower left block E adjacent to the current block X. ), The upper left block (A). In this specification, original blocks (ie, uncoded blocks), prediction blocks, and reconstruction blocks of neighboring blocks are denoted differently. For example, for the upper left block A, the original block is denoted by 'Ao', the predictive block is denoted by 'Ap', and the reconstructed block is denoted by 'Ar'. In addition, an average block obtained by averaging pixel values of the neighboring blocks A, B, C, D, and E is denoted by 'F'.
도 15의 (b)를 참조하면, 픽셀 단위의 참조 영역은 현재 블록(X)에 인접한 '1×1'의 픽셀, 및 '1×n' 또는 'n×1'의 라인들을 포함할 수 있다. 참고로, 블록 단위의 참조 영역은 픽셀 단위의 참조 영역보다 컨볼루션 커널의 적용 범위가 넓으므로, CNN의 학습 과정 및 추론 과정의 정확도를 향상시킬 수 있다. 이하, 설명의 편의를 위해 참조 영역은 블록 단위인 것을 전제로 본 실시예를 설명하기로 한다.Referring to FIG. 15B, the pixel-based reference region may include pixels of '1 × 1' adjacent to the current block X, and lines of '1 × n' or 'n × 1'. . For reference, since the reference region in the block unit has a wider application range of the convolution kernel than the reference region in the pixel unit, the accuracy of the CNN's learning process and inference process can be improved. Hereinafter, for convenience of description, the present embodiment will be described on the premise that the reference region is in block units.
한편, YCbCr 4:2:0 또는 4:2:2 형식에서, 크로마 블록은 원래의 크기대로 사용되거나, 또는 루마 블록과 크기가 같아지도록 업샘플링 레이어를 이용하여 업스케일(up-scaled)된 후 사용될 수 있다.On the other hand, in the YCbCr 4: 2: 0 or 4: 2: 2 format, chroma blocks are either used at their original size, or up-scaled using an upsampling layer to be the same size as the luma block. Can be used.
현재 블록과는 다른 채널의 주변 블록들이 입력 레이어로 입력되는 경우, 도 15의 (a)에 도시된 주변 블록들(Ar, Br, Cr, Dr, Er) 이외에 현재 블록(X)의 우측블록, 하측블록 및 우하측블록 중 하나 이상의 블록들(미도시)이 입력 레이어로 더 입력될 수 있다. 예컨대, 현재 블록이 크로마 블록인 경우, 이미 부호화가 완료된 루마 채널의 현재 블록의 우측블록, 하측블록 및 우하측블록 중 하나 이상의 블록들을 입력 데이터로 추가함으로써 인트라 예측의 정확도를 향상시킬 수 있다.When neighboring blocks of a channel different from the current block are input to the input layer, the right block of the current block X, in addition to the neighboring blocks Ar, Br, Cr, Dr, Er shown in FIG. One or more blocks (not shown) of the lower block and the lower right block may be further input to the input layer. For example, when the current block is a chroma block, the accuracy of intra prediction may be improved by adding one or more blocks among the right block, the lower block, and the right lower block of the current block of the luma channel, which have already been encoded, as input data.
도 16은 복수의 주변 블록들로부터 CNN의 입력 레이어를 구성하는 일 예를 나타내는 도면이다.16 is a diagram illustrating an example of configuring an input layer of a CNN from a plurality of neighboring blocks.
입력 레이어는 도 16의 (a)에 도시된 바와 같이 주변 블록들(Ar, Br, Cr, Dr, Er)별 복수의 레이어로 구성될 수도 있고, 도 16의 (b)에 도시된 바와 같이 복수의 주변 블록들(Ar, Br)이 통합되어 하나의 레이어로 구성될 수도 있다.The input layer may be composed of a plurality of layers for each of the neighboring blocks Ar, Br, Cr, Dr, and Er, as shown in FIG. 16A, and as shown in FIG. 16B. Peripheral blocks of Ar and Br may be integrated into one layer.
다시 도 14로 돌아와, 출력 레이어에서 출력되는 영상 데이터(이하, '출력 데이터'라 칭함)는 현재 블록의 예측 블록일 수 있다. 이 경우, 출력 레이블(label)은 출력 데이터와의 비교를 통한 지도 학습을 위해 현재 블록의 원본 블록(즉, 부호화 되지 않은 블록)으로 구성될 수 있다.Referring back to FIG. 14, the image data output from the output layer (hereinafter, referred to as “output data”) may be a prediction block of the current block. In this case, the output label may be composed of original blocks (ie, unencoded blocks) of the current block for supervised learning through comparison with the output data.
표 1은 CNN 레이어의 몇몇 예시적인 구성들을 보인다. 다만, 이는 예시적인 것일 뿐, 본 개시의 기술이 적용될 수 있는 실시예를 이에 한정하려는 것은 아니라는 점에 유의하여야 한다.Table 1 shows some example configurations of the CNN layer. However, it should be noted that the exemplary embodiments are not intended to limit the embodiments to which the technology of the present disclosure may be applied thereto.
CNN 레이어 예시#CNN layer example 입력 레이어Input layer 출력 레이어Output layer
데이터data 데이터data 레이블(label)Label
예시 1Example 1 - 현재 블록과 동일 채널의 주변 블록들Neighboring blocks of the same channel as the current block 현재 블록의 예측 블록Predictive block of current block 현재 블록의 원본 블록Original block of the current block
예시 2Example 2 - 현재 블록과 다른 채널의 현재 블록-Current block of channel different from current block 현재 블록의 예측 블록Predictive block of current block 현재 블록의 원본 블록Original block of the current block
예시 3Example 3 - 현재 블록과 동일 채널의 주변 블록들 및 이들의 평균 블록- 다른 채널의 현재 블록Neighboring blocks of the same channel as the current block and their average blocks current blocks of other channels 현재 블록의 예측 블록Predictive block of current block 현재 블록의 원본 블록Original block of the current block
예시 4Example 4 - 현재 블록과 동일 채널의 주변 블록들 및 이들의 평균 블록- 다른 채널의 현재 블록- 다른 채널의 주변 블록들 및 이들의 평균 블록Peripheral blocks of the same channel as the current block and their average blocks current blocks of the other channels neighbor blocks of the other channels and their average blocks 현재 블록의 예측 블록Predictive block of current block 현재 블록의 원본 블록Original block of the current block
표 1을 참조하면, CNN 레이어의 구성예에서, 입력 레이어의 데이터는 다양한 조합으로 구성될 수 있으며, 출력 레이어의 데이터는 현재 블록의 예측 블록이고, 출력 레이어의 레이블은 현재 블록의 원본 블록이다. 입력 데이터 및 출력 데이터는 각각 CNN의 학습 과정 및 추론 과정에서 동일하여야 한다.Referring to Table 1, in the configuration example of the CNN layer, the data of the input layer may be configured in various combinations, the data of the output layer is the prediction block of the current block, and the label of the output layer is the original block of the current block. Input data and output data should be the same in the learning process and inference process of CNN, respectively.
한편, CNN 설정부(1410)는 출력 데이터와 출력 레이블 사이의 오차를 최소화하고 인트라 예측의 정확도를 향상시키기 위해 힌트 정보를 설정할 수 있다. 여기서, 힌트 정보는 인트라 예측의 방향성 정보, 현재 블록 또는 참조 영역의 양자화 파라미터(quantization parameter, QP), 및 주변 블록의 변환 계수들 또는 잔차 신호들의 절대 합(즉, 잔차의 양) 중 적어도 하나를 포함할 수 있다. 그리고, 힌트 정보는 비트스트림을 통해 영상 복호화 장치에 전달되어 현재 블록을 복호화하는 데 이용될 수 있다.On the other hand, the CNN setting unit 1410 may set the hint information to minimize the error between the output data and the output label and improve the accuracy of intra prediction. Here, the hint information may include at least one of directional information of intra prediction, a quantization parameter (QP) of the current block or reference region, and an absolute sum of transform coefficients or residual signals of the neighboring block (ie, the amount of residual). It may include. The hint information may be transmitted to the image decoding apparatus through the bitstream and used to decode the current block.
도 17은 주변 블록들의 픽셀값 형태에 비추어 볼 때, 현재 블록에 대한 적합한 예측 방향을 설명하기 위한 예시도이다.17 is an exemplary diagram for describing a suitable prediction direction for a current block in view of the pixel value form of neighboring blocks.
도 17에서, 현재 블록(X)의 주변 블록들은 좌상단블록(A), 상단블록(B) 및 좌측블록(C)로 구성된다.In FIG. 17, neighboring blocks of the current block X are composed of an upper left block A, an upper block B, and a left block C. In FIG.
도 17의 (a)를 참조하면, 주변 블록(A,B,C)들의 픽셀값 형태를 살펴보면, 좌상단블록(A)은 절반 가량이 하얀색을 띄고, 좌측블록(C)은 대부분이 하얀색을 띄지만, 상단블록(B)은 대부분이 하얀색 이외의 색을 띈다. 현재 블록(X)의 픽셀값 형태가 대부분 하얀색을 띄는 점을 고려할 때, 가로 방향(수평 방향)의 인트라 예측을 수행하는 것이 예측 정확도를 가장 높일 수 있음을 알 수 있다.Referring to (a) of FIG. 17, when looking at the pixel values of the neighboring blocks A, B, and C, the upper left block A is about half white, and the left block C is mostly white. However, the upper block (B) is mostly colored other than white. Considering that the pixel value form of the current block X is mostly white, it can be seen that performing intra prediction in the horizontal direction (horizontal direction) can maximize the prediction accuracy.
도 17의 (b)를 참조하면, 주변 블록(A,B,C)들의 픽셀값 형태를 살펴보면, 좌상단블록(A) 및 좌측블록(C)은 대부분이 하얀색을 띄지만, 상단블록(B)은 대부분이 하얀색 이외의 색을 띈다. 현재 블록(X)의 픽셀값 형태가 대부분 하얀색 이외의 색을 띄는 점을 고려할 때, 세로 방향(수직 방향)의 인트라 예측을 수행하는 것이 예측 정확도를 가장 높일 수 있음을 알 수 있다.Referring to (b) of FIG. 17, when looking at the pixel values of the neighboring blocks A, B, and C, the upper left block A and the left block C are mostly white, but the upper block B is white. Mostly color other than white. Considering that most pixel value forms of the current block X have a color other than white, it can be seen that performing intra prediction in the vertical direction (vertical direction) can maximize the prediction accuracy.
따라서, 본 실시예에 따른 CNN 예측부(1400)는 인트라 예측의 방향성 정보를 CNN의 학습 과정 및 추론 과정의 힌트 정보로서 이용함으로써 인트라 예측의 정확도를 향상시키고자 한다.Accordingly, the CNN prediction unit 1400 according to the present embodiment intends to improve the accuracy of intra prediction by using the directional information of the intra prediction as hint information of the learning process and the inference process of the CNN.
인트라 예측의 방향성 정보는 도 3에 예시된 65 개의 방향성 모드 및 비방향성 모드를 지시하는 인트라 예측 모드 번호일 수 있다. 그리고, 하나 이상의 예측 방향성 정보를 포함하는 힌트 정보는, 예컨대 도 1의 영상 부호화 장치의 부호화부(150)에 의해 부호화되어 도 4의 영상 복호화 장치로 전달될 수 있다.The directional information of intra prediction may be an intra prediction mode number indicating 65 directional modes and non-directional modes illustrated in FIG. 3. The hint information including one or more prediction directional information may be encoded by the encoder 150 of the image encoding apparatus of FIG. 1 and transmitted to the image decoding apparatus of FIG. 4.
이 때, 힌트 정보를 부호화하는 데 소요되는 비트량을 최소화하기 위해 다양한 방법이 사용될 수 있다. 예컨대, CNN 설정부(1410)는 65 개의 예측 방향 중 일부(예: horizontal 방향, vertical 방향, diagonal down-right 방향, diagonal up-right 방향 등)를 대표 방향으로 선택하고, 선택된 대표 방향 중 어느 하나를 현재 블록의 인트라 예측을 위한 힌트 정보로 설정할 수 있다. 그리고, CNN 설정부(1410)는 MPM(most probable mode)과 유사한 방식으로 힌트 정보를 영상 복호화 장치로 전달할 수 있다.In this case, various methods may be used to minimize the amount of bits required to encode the hint information. For example, the CNN setting unit 1410 selects some of the 65 prediction directions (eg, horizontal direction, vertical direction, diagonal down-right direction, diagonal up-right direction, etc.) as a representative direction, and selects one of the selected representative directions. May be set as hint information for intra prediction of the current block. The CNN setting unit 1410 may transmit the hint information to the image decoding apparatus in a manner similar to that of the most probable mode (MPM).
힌트 정보는 양자화의 세기를 나타내는 양자화 파라미터(quantization parameter, QP)를 포함할 수 있다. 여기서, QP는 현재 블록 또는 참조 영역의 양자화 과정에 적용된 QP 값일 수 있다.The hint information may include a quantization parameter (QP) indicating the strength of the quantization. Here, the QP may be a QP value applied to the quantization process of the current block or reference region.
힌트 정보는 잔차의 양을 포함할 수 있다. 여기서, 잔차의 양은 주변 블록의 변환 계수들 또는 잔차 신호들의 절대값의 합일 수 있다.The hint information may include the amount of residuals. Here, the amount of residual may be the sum of the transform coefficients of the neighboring block or the absolute value of the residual signals.
힌트 정보는 하나 이상의 맵으로 구성되어 CNN의 레이어에 연접(concatenation)될 수 있다. 힌트 정보에 대한 맵은 입력 레이어와 출력 레이어 사이의 다양한 위치에서 연접될 수 있다. 예컨대, 힌트 정보에 대한 맵은 도 18에 도시된 바와 같이 입력 레이어의 직후에 연접될 수도 있고, 또는 출력 레이어의 직전에 연접될 수도 있다.The hint information may be composed of one or more maps and may be concatenated with a layer of the CNN. The map for the hint information may be concatenated at various locations between the input layer and the output layer. For example, the map for the hint information may be concatenated immediately after the input layer as shown in FIG. 18, or may be concatenated immediately before the output layer.
한편, 입력 데이터는 인트라 예측의 방향성에 따라 다양한 조합으로 구성될 수 있다. 예컨대, 인트라 예측의 방향성이 가로 방향(수평 방향)인 경우, 입력 데이터는 현재 블록(X)의 좌측 주변 블록들(Ar, Cr, Er) 중에서 선택된 하나 이상의 블록들 및 이들의 평균 블록으로 구성될 수 있다. 반대로, 인트라 예측의 방향성이 세로 방향(수직 방향)인 경우, 입력 데이터는 현재 블록(X)의 상측 주변 블록들(Ar, Br, Dr) 중에서 선택된 하나 이상의 블록들 및 이들의 평균 블록으로 구성될 수 있다.Meanwhile, the input data may be configured in various combinations according to the direction of intra prediction. For example, when the directionality of the intra prediction is the horizontal direction (horizontal direction), the input data may be composed of one or more blocks selected from the left neighboring blocks Ar, Cr, Er of the current block X and their average blocks. Can be. Conversely, if the directionality of the intra prediction is in the vertical direction (vertical direction), the input data may consist of one or more blocks selected from the upper neighboring blocks Ar, Br, and Dr of the current block X and their average blocks. Can be.
CNN 설정부(1410)는 출력 데이터와 출력 레이블 사이의 오차를 최소화하기 위해 오류 역전파(error backpropagation) 알고리즘을 이용한 반복된 학습 과정을 통해 필터 계수를 산출할 수 있다. 구체적으로, 출력 데이터와 출력 레이블 사이의 오차는 CNN의 출력 레이어로부터 히든 레이어를 거쳐 입력 레이어로 향하는 역방향으로 전파될 수 있다. 오차의 전파 과정에서, 노드들 사이의 연결 가중치들은 해당 오차를 감소시키는 방향으로 업데이트될 수 있다. 그리고, 해당 오차가 소정의 임계치 미만이 될 때까지 CNN 설정부(1410)는 오류 역전파 알고리즘을 이용하여 CNN의 학습 과정을 반복함으로써 필터 계수를 산출할 수 있다.The CNN setting unit 1410 may calculate filter coefficients through an iterative learning process using an error backpropagation algorithm in order to minimize an error between the output data and the output label. In detail, the error between the output data and the output label may be propagated in the reverse direction from the output layer of the CNN to the input layer via the hidden layer. In the process of propagation of an error, the connection weights between nodes may be updated in a direction to reduce the corresponding error. The CNN setting unit 1410 may calculate the filter coefficients by repeating the learning process of the CNN using the error backpropagation algorithm until the corresponding error is less than a predetermined threshold.
이상의 필터 계수 산출 과정은 소정의 단위(예: CU, CTU, 슬라이스, 프레임, 또는 시퀀스(프레임들의 그룹) 단위)로 수행될 수 있다. 예컨대, CNN 설정부(1410)는 현재 블록마다 필터 계수를 산출할 수도 있고, 프레임마다 필터 계수를 산출할 수도 있다.The above filter coefficient calculation process may be performed in a predetermined unit (eg, CU, CTU, slice, frame, or sequence (group of frames)). For example, the CNN setting unit 1410 may calculate filter coefficients for each current block or may calculate filter coefficients for each frame.
필터 계수가 프레임 단위로 산출되는 경우, 해당 필터 계수는 해당 프레임에 포함된 복수의 현재 블록들의 인트라 예측에 공통적으로 이용될 수 있다. 이 때, 힌트 정보 중 하나인 예측 방향성 정보도 복수 개일 수 있다. 예컨대, 인트라 예측 방향성 정보가 하나의 맵으로 구성되는 경우, 하나의 맵은 복수 개의 방향성 값을 포함할 수 있다.When the filter coefficient is calculated in units of frames, the filter coefficient may be commonly used for intra prediction of a plurality of current blocks included in the frame. In this case, the prediction direction information, which is one of the hint information, may also be plural. For example, when the intra prediction directional information is composed of one map, one map may include a plurality of directional values.
산출된 필터 계수에 대한 정보는 비트스트림을 통해 영상 복호화 장치로 전달되어 영상 복호화 과정에 이용될 수 있다.The calculated information about the filter coefficients may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
또한, CNN 설정부(1410)는 소정의 샘플 영상들을 이용하여 복수의 필터 계수를 미리 산출하여 필터 계수 세트를 구성할 수도 있다. 이 경우, CNN 설정부(1410)는 해당 세트에서 소정의 기준에 따라 선택된 하나의 필터 계수를 현재 블록을 위한 필터 계수로 설정할 수 있다. 예컨대, CNN 설정부(1410)는 현재 블록과 샘플 영상들 간의 픽셀값의 유사성에 기초하여 해당 세트에서 하나의 필터 계수를 선택할 수 있다. 또는, CNN 설정부(1410)는 1회의 학습 과정을 통해 산출된 필터 계수와 가장 근사한 필터 계수를 해당 세트에서 선택할 수도 있다. 필터 계수의 선택 정보, 예컨대 인덱스 정보는 비트스트림을 통해 영상 복호화 장치로 전달되어 영상 복호화 과정에 이용될 수 있다.In addition, the CNN setting unit 1410 may configure a filter coefficient set by previously calculating a plurality of filter coefficients using predetermined sample images. In this case, the CNN setting unit 1410 may set one filter coefficient selected according to a predetermined criterion in the set as the filter coefficient for the current block. For example, the CNN setting unit 1410 may select one filter coefficient from the set based on the similarity of pixel values between the current block and the sample images. Alternatively, the CNN setting unit 1410 may select a filter coefficient closest to the filter coefficient calculated through one learning process from the set. The selection information of the filter coefficient, for example, the index information, may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
한편, 도 14에서는 CNN 설정부(1410)가 CNN 예측부(1400)에 포함되는 것으로 도시하고 있으나, 이는 예시적인 것이고, 본 실시예가 이에 한정되는 것은 아니라는 점에 유의하여야 한다. 즉, CNN 설정부(1410)는 CNN 예측부(1400)와는 별도의 유닛으로 구현될 수도 있고, CNN 실행부(1430)와 통합되어 하나의 유닛으로 구현될 수도 있다.Meanwhile, although FIG. 14 illustrates that the CNN setting unit 1410 is included in the CNN prediction unit 1400, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 1410 may be implemented as a separate unit from the CNN prediction unit 1400, or may be integrated with the CNN execution unit 1430 and implemented as one unit.
CNN 실행부(1430)는 CNN 설정부(1410)에 의해 설정된 필터 계수 즉, 컨볼루션 커널의 계수값들을 이용하여 입력 데이터에 대해 CNN 기반의 추론 과정을 수행함으로써, 출력 데이터 즉, 현재 블록에 대한 예측 블록을 생성할 수 있다. 이 때, 생성된 예측 블록은 영상 부호화 장치의 감산기로 전달되어, 현재 블록으로부터 잔차 블록을 생성하는 데 이용될 수 있다.The CNN execution unit 1430 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1410, that is, the coefficient values of the convolution kernel, thereby outputting the output data, that is, the current block. A prediction block can be generated. In this case, the generated prediction block may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
도 19는 본 발명의 일 실시예에 따른 영상 복호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다. 도 19의 CNN 예측부(1900)는, 예컨대, 도 4에 예시된 영상 복호화 장치의 인트라 예측부(442)이거나 인트라 예측부(442)에 포함되는 일 모듈일 수 있다.19 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention. The CNN predictor 1900 of FIG. 19 may be, for example, an intra predictor 442 of the image decoding apparatus illustrated in FIG. 4, or a module included in the intra predictor 442.
도 19의 CNN 예측부(1900)는 도 14의 CNN 예측부(1400)와 입력되는 신호 및 필터 계수 즉, 컨볼루션 커널의 계수값들을 설정하는 방법에 있어서만 차이가 있으며, 서로 중복되는 내용에 대한 설명은 생략하거나 간략히 하기로 한다.The CNN predictor 1900 of FIG. 19 differs only in a method of setting input signals and filter coefficients, that is, coefficient values of a convolution kernel, from the CNN predictor 1400 of FIG. 14. The description will be omitted or briefly described.
도 19를 참조하면, CNN 예측부(1900)는 복원 영상을 기초로 CNN 기반의 인트라 예측을 수행하여 예측 블록을 생성할 수 있다. 이를 위해, CNN 예측부(1900)는 CNN 설정부(1910) 및 CNN 실행부(1930)를 포함할 수 있다.Referring to FIG. 19, the CNN prediction unit 1900 may generate a prediction block by performing CNN-based intra prediction based on a reconstructed image. To this end, the CNN prediction unit 1900 may include a CNN setting unit 1910 and a CNN execution unit 1930.
CNN의 구조는 도 5를 참조하여 전술한 바와 같으며, CNN은 레이어의 크기를 조절하기 위해 업샘플링 레이어 또는 풀링 레이어를 더 포함하여 구성될 수 있다.The structure of the CNN is as described above with reference to FIG. 5, and the CNN may further include an upsampling layer or a pulling layer to adjust the size of the layer.
입력 레이어로 입력되는 영상 데이터(이하, '입력 데이터'라 칭함)는 현재 블록보다 먼저 복호화된 참조 영역으로 구성될 수 있다.The image data input to the input layer (hereinafter referred to as 'input data') may be configured as a reference region decoded before the current block.
참조 영역은 현재 블록에 인접한 주변 영역, 및 현재 블록을 구성하는 루마 블록 및 크로마 블록들 중 복호화하고자 하는 성분의 블록보다 먼저 복호화된 성분의 블록(이하, '다른 채널의 현재 블록'이라 칭함) 중 적어도 하나의 블록(또는, 영역)을 포함할 수 있다. 여기서, 주변 영역은 현재 블록과 동일 채널의 영역일 수도 있고 다른 채널의 영역일 수도 있다. 또한, 주변 영역은 블록 단위(즉, 주변 블록)로 구성될 수도 있고 픽셀 단위(즉, 주변 픽셀 또는 주변 라인)로 구성될 수 있다.The reference region includes a neighboring region adjacent to the current block, and a block of components decoded before the block of the component to be decoded among the luma blocks and chroma blocks constituting the current block (hereinafter, referred to as a current block of another channel). It may include at least one block (or area). Here, the peripheral area may be an area of the same channel as the current block or an area of another channel. In addition, the peripheral area may be configured in block units (ie, peripheral blocks) or in pixel units (ie, peripheral pixels or peripheral lines).
참조 영역은 주변 영역의 픽셀값들을 평균 연산하여 생성된 새로운 영역(즉, 평균 블록, 평균 픽셀 또는 평균 라인)을 더 포함할 수 있다. 예컨대, 입력 데이터는 현재 블록과 동일 채널의 주변 블록들 및 이들의 평균 블록과 다른 채널의 현재 블록으로 구성될 수 있다.The reference region may further include a new region (ie, an average block, an average pixel, or an average line) generated by averaging pixel values of the peripheral region. For example, the input data may be composed of neighboring blocks of the same channel as the current block and current blocks of a channel different from the average block thereof.
이하, 설명의 편의를 위해 참조 영역은 블록 단위인 것을 전제로 본 실시예를 설명하기로 한다.Hereinafter, for convenience of description, the present embodiment will be described on the premise that the reference region is in block units.
도 16을 참조하여 전술한 바와 같이, 입력 레이어는 주변 블록들 별로 복수의 레이어로 구성될 수도 있고, 복수의 주변 블록들이 통합되어 하나의 레이어로 구성될 수도 있다.As described above with reference to FIG. 16, the input layer may be composed of a plurality of layers for each of the neighboring blocks, or a plurality of neighboring blocks may be integrated into one layer.
출력 레이어에서 출력되는 영상 데이터(이하, '출력 데이터'라 칭함)는 현재 블록의 예측 블록일 수 있다.The image data output from the output layer (hereinafter, referred to as 'output data') may be a prediction block of the current block.
CNN 레이어의 몇가지 구성예는 표 1을 참조하여 전술한 바와 같다. 다만, 이는 예시적인 것이고 본 실시예를 한정하는 것은 아니라는 점에 유의하여야 한다.Some configuration examples of the CNN layer are as described above with reference to Table 1. However, it should be noted that this is exemplary and does not limit the present embodiment.
CNN 설정부(1910)는 영상 부호화 장치로부터 전달된 힌트 정보를 이용하여 하나 이상의 맵을 구성한 후, 입력 레이어와 출력 레이어 사이의 다양한 위치에 연접(concatenation)시킬 수 있다.The CNN setting unit 1910 may configure one or more maps using the hint information transmitted from the image encoding apparatus, and then concatenate at various positions between the input layer and the output layer.
힌트 정보는 인트라 예측의 정확도를 향상시키기 위한 정보로서, 예측 방향성 정보, 현재 블록 또는 참조 영역의 양자화 파라미터(quantization parameter, QP), 및 주변 블록의 변환 계수들 또는 잔차 신호들의 절대 합(즉, 잔차의 양) 중 적어도 하나를 포함할 수 있다.The hint information is information for improving the accuracy of intra prediction. The hint information includes information on prediction directionality, a quantization parameter (QP) of the current block or reference region, and an absolute sum of transform coefficients or residual signals of a neighboring block (ie, residual). It may comprise at least one of).
힌트 정보에 포함되는 예측 방향성 정보는, 65 개의 방향성 모드 및 비방향성 모드를 지시하는 인트라 예측 모드 번호일 수도 있고, 65 개의 방향성 모드에서 선택된 하나 이상의 대표 방향들 중 어느 하나를 지시하는 인덱스 정보일 수도 있다.The prediction directional information included in the hint information may be an intra prediction mode number indicating 65 directional modes and a non-directional mode, or may be index information indicating any one or more representative directions selected from the 65 directional modes. have.
한편, 입력 데이터는 인트라 예측의 방향성에 따라 다양한 조합으로 구성될 수 있다. 예컨대, 인트라 예측의 방향성이 가로 방향(수평 방향)인 경우, 입력 데이터는 현재 블록의 좌측 주변 블록들 중에서 선택된 하나 이상의 블록들 및 이들의 평균 블록으로 구성될 수 있다. 반대로, 인트라 예측의 방향성이 세로 방향(수직 방향)인 경우, 입력 데이터는 현재 블록의 상측 주변 블록들 중에서 선택된 하나 이상의 블록들 및 이들의 평균 블록으로 구성될 수 있다.Meanwhile, the input data may be configured in various combinations according to the direction of intra prediction. For example, when the directionality of the intra prediction is the horizontal direction (horizontal direction), the input data may be composed of one or more blocks selected from the left neighboring blocks of the current block and their average blocks. Conversely, when the directionality of the intra prediction is in the vertical direction (vertical direction), the input data may be composed of one or more blocks selected from upper neighboring blocks of the current block and their average blocks.
CNN 설정부(1910)는 영상 부호화 장치로부터 전달된 필터 계수를 현재 블록의 인트라 예측을 위한 필터 계수로 설정할 수 있다. 이 때, 필터 계수는 영상 부호화 장치에 의해 소정의 단위, 예컨대 CU 단위 또는 프레임 단위로 산출된 값일 수 있다.The CNN setting unit 1910 may set the filter coefficients transmitted from the image encoding apparatus as filter coefficients for intra prediction of the current block. In this case, the filter coefficient may be a value calculated by a video encoding apparatus in a predetermined unit, for example, a CU unit or a frame unit.
필터 계수가 프레임 단위로 설정되는 경우, 해당 필터 계수는 해당 프레임에 포함된 복수의 현재 블록들의 인트라 예측에 공통적으로 이용될 수 있다. 이 때, 힌트 정보 중 하나인 예측 방향성 정보도 복수 개일 수 있다. 예컨대, 인트라 예측의 방향성 정보는 하나의 맵으로 구성되나, 하나의 맵 안에는 복수 개의 방향성 값을 포함할 수 있다.When the filter coefficient is set in units of frames, the filter coefficient may be commonly used for intra prediction of a plurality of current blocks included in the frame. In this case, the prediction direction information, which is one of the hint information, may also be plural. For example, the directional information of intra prediction is composed of one map, but may include a plurality of directional values in one map.
영상 부호화 장치 및 영상 복호화 장치가 동일한 필터 계수 세트를 운용하는 경우, CNN 설정부(1910)는 영상 부호화 장치로부터 전달된 필터 계수의 인덱스 정보에 기초하여 현재 블록의 인트라 예측을 위한 필터 계수를 설정할 수도 있다.When the image encoding apparatus and the image decoding apparatus operate the same set of filter coefficients, the CNN setting unit 1910 may set filter coefficients for intra prediction of the current block based on index information of the filter coefficients transmitted from the image encoding apparatus. have.
한편, 도 19에서는 CNN 설정부(1910)가 CNN 예측부(1900)에 포함되는 것으로 도시하고 있으나, 이는 예시적인 것이고, 본 실시예가 이에 한정되는 것은 아니라는 점에 유의하여야 한다. 즉, CNN 설정부(1910)는 CNN 예측부(1900)와는 별도의 유닛으로 구현될 수 있다. 또한, CNN 설정부(1910)는 CNN 실행부(1930)와 통합되어 하나의 유닛으로 구현될 수도 있다.Meanwhile, although FIG. 19 illustrates that the CNN setting unit 1910 is included in the CNN prediction unit 1900, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 1910 may be implemented as a separate unit from the CNN prediction unit 1900. In addition, the CNN setting unit 1910 may be integrated with the CNN execution unit 1930 and implemented as one unit.
CNN 실행부(1930)는 CNN 설정부(1910)에 의해 설정된 필터 계수 즉, 컨볼루션 커널의 계수값들을 이용하여 입력 데이터에 대해 CNN 기반의 추론 과정을 수행함으로써, 출력 데이터 즉, 현재 블록에 대한 예측 블록을 생성할 수 있다.The CNN execution unit 1930 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1910, that is, the coefficient values of the convolution kernel, and thus, output data, that is, the current block, for the current block. A prediction block can be generated.
그리고, 생성된 예측 블록은 가산기로 전달되어 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.The generated prediction block may be transferred to an adder and added to the residual block to be used to recover the current block.
이하, 도 20 및 도 21을 참조하여, 본 실시예에 따른 CNN 기반의 인트라 예측을 수행하는 예시적인 방법을 설명하기로 한다.Hereinafter, an exemplary method of performing CNN based intra prediction according to the present embodiment will be described with reference to FIGS. 20 and 21.
도 20은 도 14에 예시된 영상 부호화 장치에 포함될 수 있는 CNN 예측부의 동작을 나타내는 흐름도이다.20 is a flowchart illustrating an operation of a CNN prediction unit that may be included in the image encoding apparatus illustrated in FIG. 14.
도 20을 참조하면, 단계 S2010에서, CNN 설정부(1410)는 CNN의 입력 데이터 및 출력 레이블(label)을 설정할 수 있다.Referring to FIG. 20, in step S2010, the CNN setting unit 1410 may set input data and an output label of the CNN.
입력 데이터는 현재 블록보다 먼저 부호화된 참조 영역으로 구성될 수 있다. 예컨대, 입력 데이터는 현재 블록과 동일 채널의 주변 블록들로 구성될 수 있다. 또는, 입력 데이터는 현재 블록과 동일 채널의 주변 블록들 및 이들의 평균 블록과, 현재 블록과 다른 채널의 현재 블록으로 구성될 수 있다.The input data may be composed of a reference region encoded before the current block. For example, the input data may be composed of neighboring blocks of the same channel as the current block. Alternatively, the input data may be composed of neighboring blocks of the same channel as the current block, average blocks thereof, and current blocks of channels different from the current block.
출력 레이어의 데이터는 현재 블록의 예측 블록이고, 출력 레이어의 레이블은 현재 블록의 원본 블록으로 구성될 수 있다.The data of the output layer may be a prediction block of the current block, and the label of the output layer may be composed of the original block of the current block.
CNN 설정부(1410)는 인트라 예측의 정확도를 향상시키기 위하여 예측의 방향성 정보 등을 힌트 정보로 설정할 수 있다. 설정된 힌트 정보는 비트스트림을 통해 영상 복호화 장치에 전달되어 현재 블록을 복호화하는 데 이용될 수 있다. 이 경우, 인트라 예측의 방향성에 따라 입력 데이터가 다양한 조합으로 구성될 수 있다.The CNN setting unit 1410 may set the directional information of the prediction as the hint information in order to improve the accuracy of the intra prediction. The set hint information may be transmitted to the image decoding apparatus through the bitstream and used to decode the current block. In this case, the input data may be configured in various combinations according to the direction of intra prediction.
단계 S2020에서, CNN 설정부(1410)는 학습 과정을 통해 필터 계수를 산출할 수 있다. CNN 설정부(1410)는 인트라 예측의 정확도를 향상시키기 위해 오류 역전파(error backpropagation) 알고리즘을 이용하여 학습 과정을 반복할 수 있다.In operation S2020, the CNN setting unit 1410 may calculate filter coefficients through a learning process. The CNN setting unit 1410 may repeat the learning process using an error backpropagation algorithm to improve the accuracy of intra prediction.
필터 계수 산출 과정은 소정의 단위, 예컨대 프레임 단위 또는 블록 단위로 수행될 수 있다. CNN 설정부(1410)는 소정의 샘플 영상들을 이용하여 복수의 필터 계수를 미리 산출하여 필터 계수 세트를 구성할 수도 있다. 이 경우, CNN 설정부(1410)는 해당 세트에서 소정의 기준에 따라 선택된 하나의 필터 계수를 현재 블록을 위한 필터 계수로 설정할 수 있다.The filter coefficient calculation process may be performed in a predetermined unit, for example, a frame unit or a block unit. The CNN setting unit 1410 may configure a filter coefficient set by calculating a plurality of filter coefficients in advance by using predetermined sample images. In this case, the CNN setting unit 1410 may set one filter coefficient selected according to a predetermined criterion in the set as the filter coefficient for the current block.
단계 S2030에서, CNN 실행부(1430)는 CNN 설정부(1410)에 의해 설정된 필터 계수 즉, 컨볼루션 커널의 계수값들을 이용하여 입력 데이터에 대해 CNN 기반의 추론 과정을 수행함으로써, 출력 데이터 즉, 현재 블록에 대한 예측 블록을 생성할 수 있다. 이 때, 생성된 예측 블록은 영상 부호화 장치의 감산기(예컨대, 도 1의 130)로 전달되어, 현재 블록으로부터 잔차 블록을 생성하는 데 이용될 수 있다.In operation S2030, the CNN execution unit 1430 performs the CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1410, that is, the coefficient values of the convolution kernel, thereby outputting the data. A prediction block for the current block may be generated. In this case, the generated prediction block may be transferred to a subtractor (eg, 130 of FIG. 1) of the image encoding apparatus and used to generate a residual block from the current block.
도 21은 도 19에 예시된 영상 복호화 장치에 포함될 수 있는 CNN 예측부의 동작을 나타내는 흐름도이다.FIG. 21 is a flowchart illustrating an operation of a CNN predictor that may be included in the image decoding apparatus illustrated in FIG. 19.
도 21을 참조하면, 단계 S2110에서, CNN 설정부(1910)는 영상 부호화 장치로부터 전달된 필터 계수에 대한 정보에 기초하여 현재 블록의 인트라 예측을 위한 필터 계수를 설정할 수 있다.Referring to FIG. 21, in operation S2110, the CNN setting unit 1910 may set filter coefficients for intra prediction of the current block based on information about filter coefficients transmitted from the image encoding apparatus.
CNN의 입력 데이터는 현재 블록보다 먼저 복호화된 참조 영역으로 구성될 수 있으며, 출력 데이터는 현재 블록에 대한 예측 블록이 된다.The input data of the CNN may be composed of a reference region decoded before the current block, and the output data becomes a prediction block for the current block.
영상 부호화 장치로부터 인트라 예측을 위한 힌트 정보가 전달된 경우, CNN 설정부(1910)는 복호화부(예컨대, 도 4의 410)에 의해 추출된 힌트 정보를 하나의 맵으로 구성하여 CNN의 레이어에 연접(concatenation)시킬 수 있다.When the hint information for intra prediction is transmitted from the image encoding apparatus, the CNN setting unit 1910 configures the hint information extracted by the decoder (eg, 410 of FIG. 4) as a map and concatenates the layer of the CNN. (concatenation) can be.
한편, 입력 데이터는 인트라 예측의 방향성에 따라 다양한 조합으로 구성될 수 있다.Meanwhile, the input data may be configured in various combinations according to the direction of intra prediction.
단계 S2120에서, CNN 실행부(1930)는 CNN 설정부(1910)에 의해 설정된 필터 계수 즉, 컨볼루션 커널의 계수값들을 이용하여 입력 데이터에 대해 CNN 기반의 추론 과정을 수행함으로써, 출력 데이터 즉, 현재 블록에 대한 예측 블록을 생성할 수 있다. 이 때, 생성된 예측 블록은 가산기(예컨대, 도 4의 450)로 전달되어 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.In operation S2120, the CNN execution unit 1930 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 1910, that is, the coefficient values of the convolution kernel, thereby outputting the data. A prediction block for the current block may be generated. In this case, the generated prediction block may be transferred to an adder (eg, 450 of FIG. 4) and added to the residual block to be used to recover the current block.
3. CNN 기반의 인터 예측3. CNN based inter prediction
본 개시의 일부 기술들은 CNN 기반의 인터 예측을 수행하는 것과 관련되어 있다. 이하, 도 22 내지 도 28을 참조하여, CNN 기반의 인터 예측을 수행하는 기법을 설명한다.Some techniques of this disclosure relate to performing CNN based inter prediction. Hereinafter, a technique of performing CNN-based inter prediction will be described with reference to FIGS. 22 to 28.
도 22는 본 실시예에 따른 영상 부호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다. 도 22의 CNN 예측부(2200)은, 예컨대, 도 1에 예시된 영상 부호화 장치의 인터 예측부(124)이거나 인터 예측부(124)에 포함되는 하나의 모듈일 수 있다. 도 22를 참조하면, CNN 예측부(2200)는 CNN 설정부(2210) 및 CNN 실행부(2230)를 포함할 수 있다.22 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image encoding apparatus according to the present embodiment. The CNN predictor 2200 of FIG. 22 may be, for example, an inter predictor 124 of the image encoding apparatus illustrated in FIG. 1, or one module included in the inter predictor 124. Referring to FIG. 22, the CNN prediction unit 2200 may include a CNN setting unit 2210 and a CNN execution unit 2230.
제1 실시예First embodiment
제1 실시예에 따르면, CNN 예측부(2200)는 CNN의 입력 레이어에 입력될 영상 데이터(즉, 입력 데이터) 및 필터 계수(즉, 컨볼루션 커널의 계수들)를 설정하고, 이를 이용하여 CNN의 추론 과정을 수행함으로써 현재 블록을 예측할 수 있다.According to the first embodiment, the CNN predictor 2200 sets image data (that is, input data) and filter coefficients (that is, coefficients of a convolution kernel) to be input to an input layer of the CNN, and uses the CNN to use the CNN. By inferring the current block can be predicted.
이하, 제1 실시예에 따른 CNN 예측부(2200)의 각 구성 및 동작 내용에 대해 상세하게 설명하기로 한다.Hereinafter, each configuration and operation of the CNN predictor 2200 according to the first embodiment will be described in detail.
CNN 설정부(2210)는 입력 데이터를 설정할 수 있다. 구체적으로, CNN 설정부(2210)는 적어도 하나의 참조 픽쳐를 선택하고, 선택된 참조 픽쳐 내 탐색영역을 입력 데이터로 설정할 수 있다. 여기서, 참조 픽쳐 내 탐색영역은 현재 블록의 크기 이상의 크기를 갖는 참조 픽쳐 내 특정 영역을 의미한다.The CNN setting unit 2210 may set input data. In detail, the CNN setting unit 2210 may select at least one reference picture and set a search region in the selected reference picture as input data. Here, the search area in the reference picture means a specific area in the reference picture having a size equal to or larger than the size of the current block.
참조 픽쳐 내 탐색영역의 위치는 현재 블록의 위치에 기초하여 결정될 수 있다. 예컨대, 참조 픽쳐 내에서 현재 블록과 동일한 위치, 또는 그 동일한 위치로부터 기정의된 움직임 벡터만큼 이동시킨 위치일 수 있다. 여기서, 기정의된 움직임 벡터로는 현재 블록에 인접한 주변 블록의 움직임 벡터(motion vector, MV) 또는 영상 부호화 장치와 영상 복호화 장치가 서로 공유하는 초기 움직임 벡터(initial MV), 또는 예측 움직임 벡터(predicted MV)가 이용될 수 있다. 또는, 기정의된 움직임 벡터로는 현재 블록이 속한 슬라이스(혹은 픽쳐) 단위의 전역 움직임 벡터(global MV)가 이용될 수도 있다.The position of the search region in the reference picture may be determined based on the position of the current block. For example, the position may be the same position as the current block in the reference picture or a position shifted from the same position by a predefined motion vector. Here, the predefined motion vector may be a motion vector (MV) of a neighboring block adjacent to the current block, or an initial MV or a predicted motion vector shared between the video encoding apparatus and the video decoding apparatus. MV) can be used. Alternatively, a global motion vector (global MV) in units of slices (or pictures) to which the current block belongs may be used as the predefined motion vector.
한편, 참조 픽쳐 내 탐색영역의 크기는 현재 블록과 동일한 크기이거나 또는, 현재 블록보다 확장된 크기일 수 있다. 예컨대, 탐색영역의 크기는 전술한 탐색영역의 위치에 있는 현재 블록과 동일한 크기의 블록을 전술한 기정의된 움직임 벡터의 x 좌표만큼 좌우로 확장하고 y 좌표만큼 상하로 확장한 영역의 크기일 수 있다.Meanwhile, the size of the search area in the reference picture may be the same size as the current block or may be an extended size than the current block. For example, the size of the search area may be a size of an area in which a block having the same size as the current block located at the location of the search area is extended left and right by the x coordinate of the above-described predefined motion vector and expanded up and down by the y coordinate. have.
CNN 설정부(2210)는 인터 예측 방향에 기초하여 참조 픽쳐를 선택할 수 있다. 예컨대, 단방향 예측의 경우, 참조 픽쳐 리스트 0의 특정 순번의 참조 픽쳐가 선택될 수 있다. 양방향 예측의 경우, 참조 픽쳐 리스트 0의 특정 순번의 참조 픽쳐와 참조 픽쳐 리스트 1의 특정 순번의 참조 픽쳐가 선택될 수 있다. 여기서, CNN의 입력 데이터로 사용될 참조 픽쳐에 대한 정보는 특정 참조 픽쳐 리스트 내 특정 순번의 참조 픽쳐에 대한 선택정보(예컨대, 참조 픽쳐 인덱스값)를 포함할 수 있다. 그리고, 해당 참조 픽쳐에 대한 정보는 부호화부(예컨대 도 1의 190)를 통해 영상 복호화 장치로 전달될 수 있다. 이 경우, 해당 참조 픽쳐에 대한 정보는 코딩 단위(CU)의 신택스로서 부호화되어, 코딩 단위마다 서로 다른 참조 픽쳐들이 CNN의 입력 데이터로 사용되도록 할 수 있다. 또한, 해당 참조 픽쳐에 대한 정보는 코딩 단위보다 상위 단위, 예컨대, CTU, 슬라이스, PPS 또는 SPS의 신택스로서 부호화되어, 해당 상위 단위에 포함되는 모든 코딩 단위들에 대해 동일한 참조 픽쳐들이 CNN의 입력 데이터로 사용되도록 할 수도 있다.The CNN setting unit 2210 may select a reference picture based on the inter prediction direction. For example, in the case of unidirectional prediction, a reference picture of a specific order of reference picture list 0 may be selected. In the case of bidirectional prediction, a reference picture of a particular order of reference picture list 0 and a reference picture of a particular order of reference picture list 1 may be selected. Here, the information on the reference picture to be used as the input data of the CNN may include selection information (eg, reference picture index value) for a reference picture of a specific order in a specific reference picture list. The information about the reference picture may be transmitted to the image decoding apparatus through the encoder (for example, 190 of FIG. 1). In this case, the information about the reference picture may be encoded as a syntax of the coding unit (CU) so that different reference pictures for each coding unit may be used as input data of the CNN. In addition, the information about the reference picture is encoded as a syntax of a higher unit than the coding unit, for example, CTU, slice, PPS, or SPS, so that the same reference pictures are input data of the CNN for all the coding units included in the higher unit. It can also be used.
또한, CNN 설정부(2210)는 영상 부호화 장치와 영상 복호화 장치가 CNN의 입력 데이터로 사용될 참조 픽쳐를 공유하도록 기정의된 참조 픽쳐를 선택할 수 있다. 예컨대, 단방향 예측의 경우, 참조 픽쳐 리스트 0의 첫 번째 참조 픽쳐(예: 참조픽쳐 인덱스 0에 해당하는 참조픽쳐)와 두 번째 참조 픽쳐(예: 참조픽쳐 인덱스 1에 해당하는 참조픽쳐)가 선택될 수 있다. 양방향 예측의 경우, 참조 픽쳐 리스트 0의 첫 번째 참조 픽쳐(예: 참조픽쳐 인덱스 0에 해당하는 참조픽쳐)와 참조 픽쳐 리스트 1의 첫 번째 참조 픽쳐(예: 참조픽쳐 인덱스 0에 해당하는 참조픽쳐)가 선택될 수 있다. 다만, 이는 예시적인 것이고, 본 실시예가 이에 한정되는 것은 아님에 유의하여야 한다. 즉, CNN 설정부(2210)는 다양한 방식으로 참조 픽쳐를 선택하여 CNN의 입력 데이터를 설정할 수 있다.In addition, the CNN setting unit 2210 may select a reference picture that is predefined so that the image encoding apparatus and the image decoding apparatus share a reference picture to be used as input data of the CNN. For example, in the case of unidirectional prediction, a first reference picture (eg, a reference picture corresponding to reference picture index 0) and a second reference picture (eg, a reference picture corresponding to reference picture index 1) of reference picture list 0 may be selected. Can be. For bidirectional prediction, the first reference picture of reference picture list 0 (e.g., reference picture corresponding to reference picture index 0) and the first reference picture of reference picture list 1 (e.g., reference picture corresponding to reference picture index 0) Can be selected. However, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 2210 may set the input data of the CNN by selecting the reference picture in various ways.
대안적으로, CNN 설정부(2210)는 복수의 참조 픽쳐들 중에서 CNN의 입력 데이터로 사용될 적어도 하나의 참조 픽쳐를 선택하고, 선택된 참조 픽쳐에 대한 정보를 부호화부(예컨대, 도 1의 190)를 통해 영상 복호화 장치로 전달할 수도 있다. 이 경우, CNN의 입력으로 사용될 참조 픽쳐에 대한 정보는 코딩 단위(CU)의 신택스로서 부호화되어, 코딩 단위마다 서로 다른 참조 픽쳐들이 CNN의 입력 데이터로 사용되도록 할 수 있다. 또는, CNN의 입력으로 사용될 참조 픽쳐에 대한 정보는 코딩 단위보다 상위 단위, 예컨대, CTU, 슬라이스, PPS 또는 SPS의 신택스로서 부호화되어, 해당 상위 단위에 포함되는 모든 코딩 단위들에 대해 동일한 참조 픽쳐들이 CNN의 입력 데이터로 사용되도록 할 수도 있다. 여기서, CNN의 입력으로 사용될 참조 픽쳐에 대한 정보는 선택된 픽쳐의 POC(Picture Order Count) 값 또는 선택된 픽쳐의 POC 값과 현재 픽쳐의 POC 값 간의 차이값일 수 있다.Alternatively, the CNN setting unit 2210 selects at least one reference picture to be used as input data of the CNN from among the plurality of reference pictures, and encodes information about the selected reference picture by the encoder (eg, 190 of FIG. 1). It can also be delivered to the image decoding apparatus through. In this case, information about a reference picture to be used as an input of the CNN may be encoded as a syntax of a coding unit (CU), so that different reference pictures for each coding unit may be used as input data of the CNN. Alternatively, the information about the reference picture to be used as the input of the CNN is encoded as a syntax of a higher unit than the coding unit, for example, CTU, slice, PPS, or SPS, so that the same reference pictures are included for all coding units included in the higher unit. It can also be used as input data for a CNN. Here, the information on the reference picture to be used as the input of the CNN may be a picture order count (POC) value of the selected picture or a difference value between the POC value of the selected picture and the POC value of the current picture.
또한, CNN 설정부(2210)는 현재 픽쳐 내 현재 블록에 인접한 복원된 주변영역 및 해당 주변영역의 움직임 벡터 중 적어도 하나를 추가적인 입력 데이터로 더 설정할 수 있다. 여기서, 주변영역은 현재 블록과 동일 성분의 영역일 수도 있고, 다른 성분의 영역일 수도 있다. 또한, 주변영역은 블록 단위(즉, 주변 블록)로 구성될 수도 있고, 픽셀 단위(즉, 주변 픽셀 또는 주변 라인)로 구성될 수도 있다. 복수의 주변영역들의 움직임 벡터들은 개별적으로 또는 하나 이상의 움직임 벡터들이 통합되어 입력 데이터로 설정될 수 있다.In addition, the CNN setting unit 2210 may further set at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region as additional input data. Here, the peripheral area may be an area of the same component as the current block or may be an area of another component. In addition, the peripheral area may be configured in block units (ie, peripheral blocks) or in pixel units (ie, peripheral pixels or peripheral lines). The motion vectors of the plurality of peripheral regions may be set as input data individually or in combination with one or more motion vectors.
본 실시예에서 모든 입력 데이터는 루마(luma) 성분(component)인 것을 전제로 한다. 다만, 이는 설명의 편의를 위한 것일 뿐 본 실시예를 한정하는 것은 아니라는 점을 유의하여야 한다. 즉, 입력 데이터는 세 가지 성분(즉, Y,Cb,Cr)의 다양한 조합으로 구성될 수도 있다.In this embodiment, all input data is assumed to be a luma component. However, it should be noted that this is for convenience of description only and does not limit the present embodiment. That is, the input data may consist of various combinations of three components (ie, Y, Cb, Cr).
입력 데이터로서 움직임 벡터는 컬러코드를 이용하여 표현될 수 있다. 여기서, 컬러코드는 움직임 벡터의 좌표값들을 컬러값에 매핑한 것이다. 컬러코드로 표현된 움직임 벡터는 하나 이상의 맵들을 구성하여 CNN에 입력될 수 있다. 예컨대, x 좌표 및 y 좌표의 2차원 평면에 컬러들을 매핑시키고 움직임 벡터 (x, y)의 값에 대응하는 컬러값을 해당 움직임 벡터의 컬러코드로 사용한다. 또한, 움직임 벡터는 해당 움직임 벡터의 x 좌표값으로 구성된 하나의 맵과 해당 움직임 벡터의 y 좌표값으로 구성된 다른 하나의 맵으로 표현될 수 있다.The motion vector as input data may be represented using a color code. Here, the color code is a mapping of coordinate values of a motion vector to color values. The motion vector represented by the color code may be input to the CNN by configuring one or more maps. For example, the colors are mapped to two-dimensional planes of the x coordinate and the y coordinate, and a color value corresponding to the value of the motion vector (x, y) is used as the color code of the motion vector. In addition, the motion vector may be represented by one map composed of x coordinate values of the corresponding motion vector and the other map composed of y coordinate values of the corresponding motion vector.
움직임 벡터에 대한 맵은 해당 움직임 벡터에 대응하는 영역과 동일한 해상도를 가질 수 있다. 예컨대, 현재 블록에 인접한 복원된 주변영역의 움직임 벡터에 대한 맵은 해당 주변영역의 크기와 동일한 해상도를 가질 수 있다.The map for the motion vector may have the same resolution as the area corresponding to the motion vector. For example, the map of the motion vector of the reconstructed peripheral area adjacent to the current block may have the same resolution as the size of the corresponding peripheral area.
움직임 벡터에 대한 맵은 해당 맵의 각 픽셀에 움직임 벡터의 좌표값들을 나타내는 컬러코드를 매핑한 것을 의미할 수 있다. 또한, 움직임 벡터에 대한 맵은 해당 움직임 벡터의 단위에 대응하는 해당 맵의 소정 영역 별로 동일한 컬러코드를 매핑한 것을 의미할 수도 있다. 예컨대, 움직임 벡터의 단위가 주변영역을 분할한 영역 즉, 서브 블록 단위인 경우, 상기 맵의 하나의 서브 블록에 포함되는 모든 픽셀들에는 동일한 컬러코드가 매핑될 수 있다. 또한, 움직임 벡터에 대한 x 좌표값(또는, y 좌표값)으로 구성된 맵은, 해당 맵의 각 픽셀(또는, 움직임 벡터의 단위에 포함되는 모든 픽셀들)에 해당 움직임 벡터의 x 좌표값(또는, y 좌표값) 자체가 매핑될 수도 있다.The map for the motion vector may mean that a color code representing coordinate values of the motion vector is mapped to each pixel of the corresponding map. In addition, the map for the motion vector may mean that the same color code is mapped for each predetermined region of the map corresponding to the unit of the motion vector. For example, when a unit of a motion vector is a region obtained by dividing a peripheral region, that is, a sub block unit, the same color code may be mapped to all pixels included in one sub block of the map. In addition, a map composed of x coordinate values (or y coordinate values) for the motion vector may have an x coordinate value (or all pixels included in the unit of the motion vector) for each pixel of the map. , y coordinate value) itself may be mapped.
CNN의 입력 레이어로 입력되는 참조 픽쳐 내의 탐색영역 및 현재 픽쳐 내의 복원된 주변영역의 해상도(resolution)가 서로 다른 경우, CNN 설정부(2210)는 풀링(pooling) 레이어 또는 업샘플링(upsampling) 레이어를 이용하여 해상도가 서로 같아지도록 조절할 수 있다.If the resolution of the search region in the reference picture input to the CNN input layer and the reconstructed peripheral region in the current picture are different from each other, the CNN setting unit 2210 may include a pooling layer or an upsampling layer. You can adjust the resolution so that they are the same.
한편, 이와 같은 입력 데이터에 대응하여 CNN의 출력 레이어를 통해 출력되는 영상 데이터(즉, 출력 데이터)는 현재 블록의 움직임 벡터 또는 예측 픽셀들일 수 있다.Meanwhile, image data (ie, output data) output through the output layer of the CNN corresponding to the input data may be motion vectors or prediction pixels of the current block.
도 23은 CNN의 레이어 구성에 대한 예시도이다.23 is an exemplary diagram of a layer configuration of a CNN.
도 23을 참조하면, 입력 데이터는 두 개의 참조 픽쳐들 내 탐색영역과 현재 픽쳐 내 세 개의 주변영역들로 설정된다. 여기서, 주변영역들은 현재 블록을 기준으로 상측, 좌측 및 좌상측에 위치한 복원된 3개의 블록들로 선택되고, 각각은 별개의 맵으로 구성되어 입력 레이어로 입력된다. 그리고 이 경우, 출력 데이터는 현재 블록의 예측 픽셀들이 된다.Referring to FIG. 23, input data is set to a search region in two reference pictures and three peripheral regions in the current picture. Here, the peripheral areas are selected from the restored three blocks located on the upper side, the left side, and the upper left side with respect to the current block, and each is composed of a separate map and is input to the input layer. In this case, the output data becomes the prediction pixels of the current block.
CNN의 레이어 구성의 구체적인 예는 표 2와 같이 정리할 수 있다. 다만, 이는 예시적인 것일 뿐, 본 실시예를 한정하는 것은 아니라는 점에 유의하여야 한다.Specific examples of the layer configuration of the CNN can be summarized as shown in Table 2. However, it should be noted that this is merely exemplary and does not limit the present embodiment.
CNN 레이어 예시#CNN layer example 입력 레이어Input layer 출력 레이어Output layer
데이터data 데이터data 레이블(label)Label
예시 1Example 1 - 복수의 참조 픽쳐 내 탐색영역-Search area in a plurality of reference pictures 현재 블록의 움직임 벡터또는현재 블록의 예측 픽셀들Motion vector of current block or prediction pixels of current block 현재 블록의 실제 움직임 벡터또는 현재 블록의 원본 블록The actual motion vector of the current block or the original block of the current block
예시 2Example 2 - 복수의 참조 픽쳐 내 탐색영역- 주변영역의 움직임 벡터-Search region in a plurality of reference pictures-motion vector of the surrounding region 현재 블록의 움직임 벡터또는현재 블록의 예측 픽셀들Motion vector of current block or prediction pixels of current block 현재 블록의 실제 움직임 벡터또는현재 블록의 원본 블록The actual motion vector of the current block or the original block of the current block
예시 3Example 3 - 복수의 참조 픽쳐 내 탐색영역- 주변영역(복원 픽셀들)-Search region in a plurality of reference pictures-peripheral region (restored pixels) 현재 블록의 움직임 벡터또는현재 블록의 예측 픽셀들Motion vector of current block or prediction pixels of current block 현재 블록의 실제 움직임 벡터또는현재 블록의 원본 블록The actual motion vector of the current block or the original block of the current block
예시 4Example 4 - 복수의 참조 픽쳐 내 탐색영역- 주변영역(복원 픽셀들)- 주변영역의 움직임 벡터-Search region in a plurality of reference pictures-peripheral region (restored pixels)-motion vector of the peripheral region 현재 블록의 움직임 벡터또는현재 블록의 예측 픽셀들Motion vector of current block or prediction pixels of current block 현재 블록의 실제 움직임 벡터또는현재 블록의 원본 블록The actual motion vector of the current block or the original block of the current block
표 2를 참조하면, 입력 레이어의 데이터는 다양한 조합으로 구성될 수 있으며, 출력 레이어의 데이터는 현재 블록의 움직임 벡터 또는 예측 픽셀들이고, 출력 레이어의 레이블은 현재 블록의 실제 움직임 벡터 또는 현재 블록의 원본 블록이 된다. 여기서, 현재 블록의 실제 움직임 벡터란 예컨대, 풀 서치(full search) 방식을 이용한 움직임 추정(motion estimation, ME)을 통해 산출된 움직임 벡터 또는 이를 재정의(refinement)한 움직임 벡터를 의미할 수 있다. 본 실시예에서, 입력 데이터 및 출력 데이터는 각각 CNN의 학습 과정 및 추론 과정에서 기본적으로 동일하여야 한다.Referring to Table 2, the data of the input layer can be composed of various combinations, the data of the output layer is the motion vector or prediction pixels of the current block, and the label of the output layer is the actual motion vector of the current block or the original of the current block It becomes a block. Here, the actual motion vector of the current block may mean, for example, a motion vector calculated through motion estimation (ME) using a full search method or a motion vector obtained by refining it. In this embodiment, the input data and the output data should be basically the same in the learning process and the inference process of the CNN, respectively.
한편, CNN 설정부(2210)는 인터 예측의 정확도를 향상시키기 위해 힌트 정보를 추가적인 입력 데이터로 더 설정할 수 있다. 여기서, 힌트 정보는 현재 픽쳐와 참조 픽쳐 사이의 시간축 거리 정보, 예컨대 현재 픽쳐의 POC(picture order count) 값과 참조 픽쳐의 POC 값 간의 차이값을 포함할 수 있다. 이 경우, 시간축 거리 정보는 참조 픽쳐들의 개수만큼 존재하게 된다. 또한, 힌트 정보는 양자화 파라미터(quantization parameter, QP)를 포함할 수 있다. 힌트 정보로 사용되는 양자화 파라미터는 현재 블록, 주변영역 또는 참조 픽쳐 내 탐색영역의 양자화 파라미터 값 중에서 선택될 수도 있고, 이들 중 적어도 일부로부터 유도되는 값(예: 평균값)일 수 있다.Meanwhile, the CNN setting unit 2210 may further set the hint information as additional input data in order to improve the accuracy of inter prediction. Here, the hint information may include time axis distance information between the current picture and the reference picture, for example, a difference value between a picture order count (POC) value of the current picture and a POC value of the reference picture. In this case, the time axis distance information exists as many as the number of reference pictures. In addition, the hint information may include a quantization parameter (QP). The quantization parameter used as the hint information may be selected from among quantization parameter values of the current block, the surrounding area, or the search area in the reference picture, and may be a value (eg, an average value) derived from at least some of them.
도 24는 현재 픽쳐와 참조 픽쳐 간의 시간축 거리 정보에 대한 예시도이다. 구체적으로, 도 24의 (a)는 단방향 예측의 경우를 나타내고, 도 24의 (b)는 양방향 예측의 경우를 나타낸다.24 is an exemplary diagram of time-base distance information between a current picture and a reference picture. Specifically, FIG. 24A shows a case of unidirectional prediction, and FIG. 24B shows a case of bidirectional prediction.
도 24의 (a)를 참조하면, 단방향 예측시, 시간축 거리 정보는 좌측부터 -3, -1이 된다. 그리고, t-3 픽쳐 내의 탐색영역(2411)으로부터 t-1 픽쳐 내의 탐색영역(2413)까지의 움직임 추정 결과(실선)를 이용하여, t-3 픽쳐 내의 탐색영역(2411)으로부터 t 픽쳐 내의 현재 블록(2415)까지의 움직임 벡터 및 t-1 픽쳐 내의 탐색영역(2413)으로부터 t 픽쳐 내의 현재 블록(2415)까지의 움직임 벡터가 추론될 수 있다.Referring to FIG. 24A, in unidirectional prediction, time axis distance information becomes -3 and -1 from the left side. Then, by using the motion estimation result (solid line) from the search area 2411 in the t-3 picture to the search area 2413 in the t-1 picture, the current in the t picture from the search area 2411 in the t-3 picture. The motion vector up to block 2415 and the motion vector from the search region 2413 in the t-1 picture to the current block 2415 in the t picture can be inferred.
도 24의 (b)를 참조하면, 양방향 예측시, 시간축 거리 정보는 좌측부터 -1, +2가 된다. 그리고, t-1 픽쳐 내의 탐색영역(2431)으로부터 t+2 픽쳐 내의 탐색영역(2435)까지의 움직임 추정 결과(실선)를 이용하여, t-1 픽쳐 내의 탐색영역(2431)로부터 t 픽쳐 내의 현재 블록(2433)까지의 움직임 벡터 및 t+2 픽쳐 내의 탐색영역(2435)으로부터 t 픽쳐 내의 현재 블록(2433)까지의 움직임 벡터가 추론될 수 있다. Referring to FIG. 24B, in bidirectional prediction, time axis distance information becomes -1 and +2 from the left side. Then, using the motion estimation result (solid line) from the search area 2431 in the t-1 picture to the search area 2435 in the t + 2 picture, the current in the t picture from the search area 2431 in the t-1 picture is obtained. The motion vector up to block 2433 and the motion vector from the search region 2435 in the t + 2 picture to the current block 2433 in the t picture can be inferred.
힌트 정보는 하나 이상의 맵들로 구성되어 CNN의 레이어에 연접(concatenation)될 수 있다. 힌트 정보에 대한 맵은 입력 레이어와 출력 레이어 사이의 다양한 위치에서 연접될 수 있다. 그리고, 힌트 정보는 비트스트림을 통해 영상 복호화 장치에 전달되어 현재 블록을 복호화하는 데 이용될 수 있다. The hint information may consist of one or more maps and may be concatenated with a layer of the CNN. The map for the hint information may be concatenated at various locations between the input layer and the output layer. The hint information may be transmitted to the image decoding apparatus through the bitstream and used to decode the current block.
도 25는 힌트 정보를 포함하는 CNN의 레이어 구성에 대한 예시도이다. 도 25를 참조하면, 입력 데이터는 두 개의 참조 픽쳐들 내 탐색영역과 한 개의 맵으로 구성된 힌트 정보로 설정된다. 그리고 이 경우, 출력 데이터는 현재 블록의 예측 픽셀들이 된다.25 is an exemplary diagram of a layer configuration of a CNN including hint information. Referring to FIG. 25, input data is set to hint information including a search area and a map in two reference pictures. In this case, the output data becomes the prediction pixels of the current block.
CNN 설정부(2210)는 출력 데이터와 출력 레이블 사이의 오차를 최소화하기 위해 반복된 학습 과정을 통해 필터 계수를 산출할 수 있다. 이를 위해, CNN 설정부(2210)는 오류 역전파(error backpropagation) 알고리즘을 이용할 수 있다. 구체적으로, CNN 설정부(2210)는 CNN의 학습 과정에서 출력 레이어로부터 히든 레이어를 거쳐 입력 레이어로 향하는 역방향으로 출력 데이터와 출력 레이블 사이의 오차를 전파시킬 수 있다. 그리고, 해당 오차의 전파과정에서, CNN 설정부(2210)는 해당 오차를 감소시키기 위해 노드들 사이의 연결 가중치들을 업데이트할 수 있다. 그리고, CNN 설정부(2210)는 해당 오차가 소정의 임계치 미만이 될 때까지 오류 역전파 알고리즘을 이용한 학습 과정을 반복함으로써 필터 계수를 산출할 수 있다.The CNN setting unit 2210 may calculate filter coefficients through an iterative learning process in order to minimize an error between the output data and the output label. To this end, the CNN setting unit 2210 may use an error backpropagation algorithm. In detail, the CNN setting unit 2210 may propagate an error between the output data and the output label in a reverse direction from the output layer to the input layer through the hidden layer in the learning process of the CNN. In the process of propagating the corresponding error, the CNN setting unit 2210 may update the connection weights between the nodes to reduce the corresponding error. The CNN setting unit 2210 may calculate filter coefficients by repeating a learning process using an error backpropagation algorithm until the corresponding error is less than a predetermined threshold.
이상의 필터 계수 산출 과정은 소정의 단위(예: CU, CTU, 슬라이스, 프레임, 또는 시퀀스(프레임들의 그룹) 단위)로 수행될 수 있다. 예컨대, CNN 설정부(2210)는 현재 블록마다 필터 계수를 산출할 수도 있고, 프레임마다 필터 계수를 산출할 수도 있다.The above filter coefficient calculation process may be performed in a predetermined unit (eg, CU, CTU, slice, frame, or sequence (group of frames)). For example, the CNN setting unit 2210 may calculate filter coefficients for each current block or may calculate filter coefficients for each frame.
필터 계수가 프레임 단위로 산출되는 경우, 해당 필터 계수는 해당 프레임에 포함된 복수의 현재 블록들의 인터 예측에 공통적으로 이용될 수 있다.When filter coefficients are calculated in units of frames, the filter coefficients may be commonly used for inter prediction of a plurality of current blocks included in the frame.
산출된 필터 계수에 대한 정보는 비트스트림을 통해 영상 복호화 장치로 전달되어 영상 복호화 과정에 이용될 수 있다.The calculated information about the filter coefficients may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
또한, CNN 설정부(2210)는 소정의 샘플 영상들을 이용하여 복수의 필터 계수를 미리 산출하여 필터 계수 세트를 구성할 수도 있다. 이 경우, CNN 설정부(2210)는 해당 세트에서 소정의 기준에 따라 선택된 하나의 필터 계수를 현재 블록을 위한 필터 계수로 설정할 수 있다. 예컨대, CNN 설정부(2210)는 현재 블록과 샘플 영상들 간의 픽셀값의 유사성에 기초하여 해당 세트에서 하나의 필터 계수를 선택할 수 있다. 또는, CNN 설정부(2210)는 1회의 학습 과정을 통해 산출된 필터 계수와 가장 근사한 필터 계수를 해당 세트에서 선택할 수도 있다. 필터 계수의 선택 정보, 예컨대 인덱스 정보는 비트스트림을 통해 영상 복호화 장치로 전달되어 영상 복호화 과정에 이용될 수 있다.In addition, the CNN setting unit 2210 may configure a filter coefficient set by previously calculating a plurality of filter coefficients using predetermined sample images. In this case, the CNN setting unit 2210 may set one filter coefficient selected according to a predetermined criterion in the set as the filter coefficient for the current block. For example, the CNN setting unit 2210 may select one filter coefficient from the set based on the similarity of pixel values between the current block and the sample images. Alternatively, the CNN setting unit 2210 may select a filter coefficient closest to the filter coefficient calculated through one learning process from the set. The selection information of the filter coefficient, for example, the index information, may be transmitted to the image decoding apparatus through the bitstream and used for the image decoding process.
한편, 도 22에서는 CNN 설정부(2210)가 CNN 예측부(2200)에 포함되는 것으로 도시하고 있으나, 이는 예시적인 것이고, 본 실시예가 이에 한정되는 것은 아니라는 점에 유의하여야 한다. 즉, CNN 설정부(2210)는 CNN 예측부(2200)와는 별도의 유닛으로 구현될 수도 있고, CNN 실행부(2230)와 통합되어 하나의 유닛으로 구현될 수도 있다.Meanwhile, although FIG. 22 illustrates that the CNN setting unit 2210 is included in the CNN predicting unit 2200, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 2210 may be implemented as a separate unit from the CNN predicting unit 2200, or may be integrated with the CNN executing unit 2230 and implemented as one unit.
CNN 실행부(2230)는 CNN 설정부(2210)에 의해 설정된 입력 데이터 및 필터 계수를 이용하여 CNN을 실행시켜, 현재 블록의 움직임 벡터를 생성하거나, 직접적으로 현재 블록의 예측 픽셀들을 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 영상 부호화 장치의 감산기로 전달되어, 현재 블록으로부터 잔차 블록을 생성하는 데 이용될 수 있다.The CNN execution unit 2230 may execute the CNN using the input data and the filter coefficients set by the CNN setting unit 2210 to generate a motion vector of the current block or directly generate prediction pixels of the current block. . In this case, the generated prediction pixels may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
제2 실시예Second embodiment
제2 실시예에 따르면, CNN 예측부(2200)는 1차적으로 기존의 인터 예측 방식(즉, 움직임 예측(ME) 및 움직임 보상(MC))에 따라 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성한 후, 2차적으로 해당 움직임 벡터 또는 예측 픽셀들을 CNN 기반의 추론 과정을 통해 재정의(refinement)함으로써 현재 블록의 움직임 정보 또는 예측 픽셀들을 최종적으로 생성할 수 있다.According to the second embodiment, the CNN prediction unit 2200 primarily generates motion vectors or prediction pixels of the current block according to existing inter prediction schemes (ie, motion prediction (ME) and motion compensation (MC)). Afterwards, the motion information or the prediction pixels of the current block may be finally generated by refining the corresponding motion vector or the prediction pixels through a CNN-based inference process.
이하, 제2 실시예에 따른 CNN 예측부(2200)의 각 구성 및 동작 내용에 대해 상세하게 설명하기로 한다. 단, 제1 실시예와 중복되는 내용에 대한 설명은 생략하거나 간략히 하기로 한다.Hereinafter, each configuration and operation of the CNN predictor 2200 according to the second embodiment will be described in detail. However, description of the content overlapping with the first embodiment will be omitted or briefly described.
CNN 예측부(2200)는 현재 픽쳐보다 먼저 부호화 및 복호화된 참조 픽쳐를 결정하고, 결정된 참조 픽쳐 내에서 현재 블록과 가장 유사한 참조 픽셀들을 탐색한다. 그리고, CNN 예측부(2200)는 탐색된 참조 픽셀들을 이용하여 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다. 이 때, 생성된 현재 블록의 움직임 벡터 또는 예측 픽셀들은 CNN 설정부(2210)에 의해 CNN의 입력 데이터로 설정된다.The CNN prediction unit 2200 determines a reference picture encoded and decoded before the current picture, and searches for reference pixels most similar to the current block in the determined reference picture. The CNN predictor 2200 may generate motion vectors or prediction pixels of the current block by using the found reference pixels. In this case, the generated motion vector or prediction pixels of the current block are set as input data of the CNN by the CNN setting unit 2210.
CNN 설정부(2210)는 CNN에 적용될 필터 계수(즉, 컨볼루션 커널의 계수값들)를 설정할 수 있다. 필터 계수는 참조 픽쳐 내 탐색영역을 포함하는 입력 데이터에 대해 CNN의 학습 과정을 수행하여 산출될 수 있다. 여기서, 입력 데이터는 현재 픽쳐 내 현재 블록에 인접한 주변영역 및 해당 주변영역의 움직임 벡터 중 적어도 하나를 더 포함할 수 있다. 또한, 입력 데이터는 인터 예측의 정확도를 향상시키기 위한 힌트 정보, 예컨대 현재 픽쳐와 참조 픽쳐 사이의 시간축 거리 정보 및 양자화 파라미터(quantization parameter, QP) 중 적어도 하나를 더 포함할 수 있다. 또한, 필터 계수는 미리 설정된 특정값 또는 미리 설정된 복수의 특정값들로 구성된 세트에서 선택된 값일 수 있다.The CNN setting unit 2210 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN. The filter coefficient may be calculated by performing a CNN learning process on input data including a search region in a reference picture. The input data may further include at least one of a peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region. In addition, the input data may further include at least one of hint information for improving the accuracy of inter prediction, for example, time axis distance information between a current picture and a reference picture and a quantization parameter (QP). In addition, the filter coefficient may be a value selected from a preset specific value or a set consisting of a plurality of preset specific values.
CNN 실행부(2230)는 CNN 설정부(2210)에 의해 설정된 입력 데이터 및 필터 계수를 이용하여 CNN을 실행시켜 현재 블록의 움직임 벡터 또는 예측 픽셀들을 재정의(refinement)함으로써, 현재 블록의 움직임 벡터 또는 예측 픽셀들을 최종적으로 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 영상 부호화 장치의 감산기로 전달되어, 현재 블록으로부터 잔차 블록을 생성하는 데 이용될 수 있다.The CNN execution unit 2230 executes the CNN by using the input data and the filter coefficients set by the CNN setting unit 2210 to refine the motion vector or the prediction pixels of the current block, thereby improving the motion vector or the current block. The prediction pixels can be finally generated. In this case, the generated prediction pixels may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
도 26은 본 발명의 일 실시예에 따른 영상 복호화 장치에 포함될 수 있는 CNN 예측부의 구성을 나타내는 블록도이다. 도 26의 CNN 예측부(2600)는, 예컨대, 도 4에 예시된 영상 복호화 장치의 인터 예측부(444)이거나 인터 예측부(444)에 포함되는 하나의 모듈일 수 있다. 도 26을 참조하면, CNN 예측부(2600)는 CNN 설정부(2610) 및 CNN 실행부(2630)를 포함할 수 있다.FIG. 26 is a block diagram illustrating a configuration of a CNN prediction unit that may be included in an image decoding apparatus according to an embodiment of the present invention. The CNN predictor 2600 of FIG. 26 may be, for example, an inter predictor 444 of the image decoding apparatus illustrated in FIG. 4, or one module included in the inter predictor 444. Referring to FIG. 26, the CNN predictor 2600 may include a CNN setting unit 2610 and a CNN execution unit 2630.
제1 실시예First embodiment
제1 실시예에 따르면, CNN 예측부(2600)는 영상 부호화 장치로부터 시그널링된 참조 픽쳐 선택 정보에 기초하여 참조 픽쳐를 결정하고, 결정된 참조 픽쳐를 이용하여 CNN의 추론 과정을 수행함으로써 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다.According to the first embodiment, the CNN prediction unit 2600 determines a reference picture based on the reference picture selection information signaled from the image encoding apparatus, and performs the inference process of the CNN using the determined reference picture to move the current block. Vector or prediction pixels can be generated.
이하, 제1 실시예에 따른 CNN 예측부(2600)의 각 구성 및 동작 내용에 대해 상세하게 설명하기로 한다. 단, 도 22를 참조하여 전술한 영상 부호화 장치에 포함될 수 있는 CNN 예측부(2200)와 중복되는 내용에 대한 설명은 생략하거나 간략히 하기로 한다.Hereinafter, each configuration and operation of the CNN predictor 2600 according to the first embodiment will be described in detail. However, a description of overlapping contents with the CNN prediction unit 2200 that may be included in the image encoding apparatus described above with reference to FIG. 22 will be omitted or briefly described.
CNN 설정부(2610)는 입력 데이터를 설정할 수 있다. CNN 설정부(2610)는 영상 부호화 장치로부터 시그널링된 참조 픽쳐 선택 정보에 기초하여 참조 픽쳐를 선택하고, 선택된 참조 픽쳐 내 탐색영역을 입력 데이터로 설정할 수 있다. 여기서, 참조 픽쳐 내 탐색영역은 현재 블록의 크기 이상의 크기를 갖는 참조 픽쳐 내 특정 영역을 의미하며, 탐색영역의 위치 및 크기는 도 22를 참조하여 전술한 바와 같다.The CNN setting unit 2610 may set input data. The CNN setting unit 2610 may select a reference picture based on the reference picture selection information signaled from the image encoding apparatus, and set a search region in the selected reference picture as input data. Here, the search area in the reference picture means a specific area in the reference picture having a size larger than or equal to the size of the current block, and the position and size of the search area are as described above with reference to FIG.
한편, 영상 부호화 과정에서 참조 픽쳐가 인터 예측 방향에 기초하여 선택된 경우, CNN 설정부(2610)는 영상 부호화 장치로부터 시그널링된 인터 예측 방향에 대한 정보에 기초하여 참조 픽쳐를 선택할 수 있다. 예컨대, 단방향 예측의 경우, 영상 부호화 장치와 동일하게, 참조 픽쳐 리스트 0의 특정 순번의 참조 픽쳐가 입력 데이터로 선택될 수 있다. 양방향 예측의 경우, 영상 부호화 장치와 동일하게, 참조 픽쳐 리스트 0의 특정 순번의 참조 픽쳐와 참조 픽쳐 리스트 1의 특정 순번의 참조 픽쳐가 선택될 수 있다. 여기서, 참조 픽쳐의 선택 정보는 선택된 참조 픽쳐 리스트 내 특정 순번의 참조 픽쳐를 지시하는 값, 예컨대 참조 픽쳐 인덱스값일 수 있다. 또한, 참조 픽쳐의 선택 정보는 선택된 픽쳐의 POC(Picture Order Count) 값, 또는 선택된 픽쳐의 POC 값과 현재 픽쳐의 POC 값 사이의 차이값일 수 있다.Meanwhile, when the reference picture is selected based on the inter prediction direction in the image encoding process, the CNN setting unit 2610 may select the reference picture based on the information on the inter prediction direction signaled from the image encoding apparatus. For example, in the case of unidirectional prediction, similarly to a video encoding apparatus, a reference picture of a specific order of reference picture list 0 may be selected as input data. In the case of bidirectional prediction, similarly to the image encoding apparatus, a reference picture of a particular order of reference picture list 0 and a reference picture of a particular order of reference picture list 1 may be selected. Here, the selection information of the reference picture may be a value indicating a reference picture of a specific order in the selected reference picture list, for example, a reference picture index value. In addition, the selection information of the reference picture may be a picture order count (POC) value of the selected picture or a difference value between the POC value of the selected picture and the POC value of the current picture.
또한, CNN 설정부(2610)는 현재 픽쳐 내 현재 블록에 인접한 복원된 주변영역 및 해당 주변영역의 움직임 벡터 중 적어도 하나를 추가적인 입력 데이터로 더 설정할 수 있다. 여기서, 움직임 벡터는 컬러코드로 표현된 하나 이상의 맵들로 구성될 수 있다. 예컨대, 움직임 벡터는 해당 벡터 (x, y)의 값에 대응하는 컬러값으로 구성된 하나의 맵으로 표현될 수 있다. 또한, 움직임 벡터는 해당 벡터의 x 좌표값으로 구성된 하나의 맵과 해당 벡터의 y 좌표값으로 구성된 다른 하나의 맵으로 표현될 수도 있다.The CNN setting unit 2610 may further set at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region as additional input data. Here, the motion vector may consist of one or more maps expressed in color code. For example, the motion vector may be represented by one map composed of color values corresponding to the values of the corresponding vector (x, y). In addition, the motion vector may be represented by one map composed of x coordinate values of the vector and the other map composed of y coordinate values of the vector.
한편, 이와 같은 입력 데이터에 대응하여 CNN의 출력 레이어를 통해 출력되는 영상 데이터(즉, 출력 데이터)는 현재 블록의 움직임 벡터 또는 예측 픽셀들일 수 있다.Meanwhile, image data (ie, output data) output through the output layer of the CNN corresponding to the input data may be motion vectors or prediction pixels of the current block.
CNN의 레이어 구성의 구체적인 예는 표 2를 참조하여 전술한 바와 같다. 다만, 이는 예시적인 것일 뿐, 본 실시예를 한정하는 것은 아니라는 점에 유의하여야 한다.Specific examples of the layer configuration of the CNN are as described above with reference to Table 2. However, it should be noted that this is merely exemplary and does not limit the present embodiment.
한편, CNN 설정부(2610)는 인터 예측의 정확도를 향상시키기 위해 힌트 정보를 추가적인 입력 데이터로 더 설정할 수 있다. 여기서, 힌트 정보는 현재 픽쳐와 참조 픽쳐 사이의 시간축 거리 정보, 예컨대 현재 픽쳐의 POC(picture order count) 값과 참조 픽쳐의 POC 값의 차이값을 포함할 수 있다. 이 경우, 시간축 거리 정보는 참조 픽쳐들의 개수만큼 존재하게 된다. 또한, 힌트 정보는 현재 블록, 주변영역 또는 참조 픽쳐 내 탐색영역의 양자화 파라미터(quantization parameter, QP) 값을 포함할 수도 있다.On the other hand, the CNN setting unit 2610 may further set the hint information as additional input data in order to improve the accuracy of the inter prediction. Here, the hint information may include time-base distance information between a current picture and a reference picture, for example, a difference value between a picture order count (POC) value of the current picture and a POC value of the reference picture. In this case, the time axis distance information exists as many as the number of reference pictures. In addition, the hint information may include a quantization parameter (QP) value of a current block, a peripheral region, or a search region in a reference picture.
힌트 정보는 CNN의 입력 레이어 또는 컨볼루션 레이어에 연접(concatenation)되어 하나의 연접 레이어를 구성할 수 있다. 이 경우, 힌트 정보는 연접 대상이 되는 레이어와 동일한 해상도(resolution)를 갖는 하나 이상의 맵들로 구성될 수 있다. 그리고, 힌트 정보는 비트스트림을 통해 영상 복호화 장치에 전달되어 CNN 기반 인터 예측을 위한 입력 데이터로서 이용될 수 있다.The hint information may be concatenated with the input layer or the convolutional layer of the CNN to form one concatenation layer. In this case, the hint information may be composed of one or more maps having the same resolution as the layer to be concatenated. The hint information may be transmitted to the image decoding apparatus through the bitstream and used as input data for CNN based inter prediction.
한편, 이와 같은 입력 데이터에 대응하여 CNN의 출력 레이어를 통해 출력되는 영상 데이터(즉, 출력 데이터)는 현재 블록의 움직임 벡터 또는 예측 픽셀들일 수 있다.Meanwhile, image data (ie, output data) output through the output layer of the CNN corresponding to the input data may be motion vectors or prediction pixels of the current block.
CNN 설정부(2610)는 영상 부호화 장치로부터 시그널링된 필터 계수를 현재 블록의 인터 예측을 위한 필터 계수로 설정할 수 있다.The CNN setting unit 2610 may set the filter coefficients signaled from the image encoding apparatus as filter coefficients for inter prediction of the current block.
또한, 필터 계수가 특정값으로 미리 설정된 후 영상 부호화 장치와 영상 복호화 장치에 각각 저장된 경우, CNN 설정부(2610)는 영상 복호화 장치에 기 저장된 필터 계수를 현재 블록의 인터 예측을 위한 필터 계수로 설정할 수 있다.In addition, when the filter coefficients are preset to a specific value and stored in the image encoding apparatus and the image decoding apparatus, respectively, the CNN setting unit 2610 sets the filter coefficients previously stored in the image decoding apparatus as filter coefficients for inter prediction of the current block. Can be.
또한, 필터 계수가 복수의 특정값들로 미리 설정되어 세트를 구성한 후 영상 부호화 장치와 영상 복호화 장치에 각각 저장된 경우, CNN 설정부(2610)는 영상 부호화 장치로부터 시그널링된 필터 계수의 선택 정보, 예컨대 인덱스 정보에 따라 선택된 해당 세트의 특정 필터 계수를 현재 블록의 인터 예측을 위한 필터 계수로 설정할 수 있다.In addition, when the filter coefficients are previously set to a plurality of specific values to form a set and stored in the image encoding apparatus and the image decoding apparatus, respectively, the CNN setting unit 2610 may select selection information of the filter coefficients signaled from the image encoding apparatus, for example. The specific filter coefficient of the set selected according to the index information may be set as the filter coefficient for inter prediction of the current block.
CNN 실행부(2630)는 CNN 설정부(2610)에 의해 설정된 입력 데이터와 필터 계수를 이용하여 CNN을 실행시켜 현재 블록의 움직임 정보를 추론함으로써 예측 픽셀들을 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 가산기로 전달되어 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.The CNN execution unit 2630 may generate the prediction pixels by inferring the motion information of the current block by executing the CNN using the input data and the filter coefficients set by the CNN setting unit 2610. In this case, the generated prediction pixels may be transferred to an adder and added to the residual block to be used to recover the current block.
제2 실시예Second embodiment
제2 실시예에 따르면, CNN 예측부(2600)는 1차적으로 기존의 인터 예측 방식(즉, 움직임 예측(ME) 및 움직임 보상(MC))에 따라 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성한 후, 2차적으로 해당 움직임 벡터 또는 예측 픽셀들을 CNN 기반의 추론 과정을 통해 재정의(refinement)함으로써 현재 블록의 움직임 정보 또는 예측 픽셀들을 최종적으로 생성할 수 있다.According to the second embodiment, the CNN prediction unit 2600 primarily generates motion vectors or prediction pixels of the current block according to existing inter prediction schemes (ie, motion prediction (ME) and motion compensation (MC)). Afterwards, the motion information or the prediction pixels of the current block may be finally generated by refining the corresponding motion vector or the prediction pixels through a CNN-based inference process.
이하, 제2 실시예에 따른 CNN 예측부(2600)의 각 구성 및 동작 내용에 대해 상세하게 설명하기로 한다. 단, 제1 실시예의 CNN 예측부(2600) 및 도 22를 참조하여 전술한 영상 부호화 장치에 포함될 수 있는 CNN 예측부(2200)와 중복되는 내용에 대한 설명은 생략하거나 간략히 하기로 한다.Hereinafter, each configuration and operation of the CNN predictor 2600 according to the second embodiment will be described in detail. However, a description of overlapping contents with the CNN predictor 2600 of the first embodiment and the CNN predictor 2200 that may be included in the image encoding apparatus described above with reference to FIG. 22 will be omitted or briefly described.
CNN 예측부(2600)는 복호화부로부터 추출된 인터 예측 모드에 대한 신택스 요소를 이용하여 현재 블록의 움직임 벡터와 그 움직임 벡터가 참조하는 참조 픽쳐를 결정할 수 있다. 그리고, CNN 예측부(2600)는 결정된 움직임 벡터와 참조 픽쳐를 이용하여 현재 블록을 예측하여 현재 블록의 움직임 정보 또는 예측 픽셀들을 생성할 수 있다.The CNN predictor 2600 may determine a motion vector of the current block and a reference picture referenced by the motion vector by using a syntax element of the inter prediction mode extracted from the decoder. The CNN predictor 2600 may generate motion information or prediction pixels of the current block by predicting the current block by using the determined motion vector and the reference picture.
CNN 설정부(2610)는 생성된 현재 블록의 움직임 정보 또는 예측 픽셀들을 CNN의 입력 레이어로 입력될 영상 데이터(즉, 입력 데이터)로 설정할 수 있다.The CNN setting unit 2610 may set the generated motion information or prediction pixels of the current block as image data (that is, input data) to be input to the input layer of the CNN.
또한, CNN 설정부(2610)는 CNN에 적용될 필터 계수(즉, 컨볼루션 커널의 계수값들)를 설정할 수 있다. 여기서, 필터 계수는 영상 부호화 장치로부터 전달된 값일 수 있다. 또한, 필터 계수는 미리 설정된 특정값 또는 미리 설정된 복수의 특정값들로 구성된 세트에서 영상 부호화 장치에 의해 선택된 값일 수 있다.In addition, the CNN setting unit 2610 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN. Here, the filter coefficient may be a value transmitted from the image encoding apparatus. In addition, the filter coefficient may be a value selected by the image encoding apparatus in a set consisting of a predetermined specific value or a plurality of predetermined specific values.
한편, 도 26에서는 CNN 설정부(2610)가 CNN 예측부(2600)에 포함되는 것으로 도시하고 있으나, 이는 예시적인 것이고, 본 실시예가 이에 한정되는 것은 아니라는 점에 유의하여야 한다. 즉, CNN 설정부(2610)는 CNN 예측부(2600)와는 별도의 유닛으로 구현될 수도 있고, CNN 실행부(2630)와 통합되어 하나의 유닛으로 구현될 수도 있다.Meanwhile, although FIG. 26 illustrates that the CNN setting unit 2610 is included in the CNN predicting unit 2600, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 2610 may be implemented as a separate unit from the CNN prediction unit 2600, or may be integrated with the CNN execution unit 2630 and implemented as a unit.
CNN 실행부(2630)는, CNN 설정부(2610)에 의해 설정된 입력 데이터 및 필터 계수를 이용하여 CNN을 실행시켜 현재 블록의 움직임 벡터 또는 예측 픽셀들을 재정의(refinement)함으로써, 현재 블록의 움직임 벡터 또는 예측 픽셀들을 최종적으로 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 가산기로 전달되어 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.The CNN execution unit 2630 executes the CNN by using the input data and the filter coefficients set by the CNN setting unit 2610 to refine the motion vector or the prediction pixels of the current block to thereby refine the motion vector of the current block. Alternatively, prediction pixels may be finally generated. In this case, the generated prediction pixels may be transferred to an adder and added to the residual block to be used to recover the current block.
이하, 도 27 및 도 28을 참조하여, 본 실시예에 따른 CNN 기반의 인터 예측을 수행하는 예시적인 방법을 설명하기로 한다.Hereinafter, an exemplary method of performing CNN based inter prediction according to the present embodiment will be described with reference to FIGS. 27 and 28.
도 27a 및 27b는 도 22에 예시된 영상 부호화 장치에 포함될 수 있는 CNN 예측부가 인터 예측을 수행하는 과정을 나타내는 흐름도이다. 구체적으로, 도 27a는 제1 실시예에 따른 CNN 기반의 인터 예측 과정을 나타내고, 도 27b는 제2 실시예에 따른 CNN 기반의 인터 예측 과정을 나타낸다.27A and 27B are flowcharts illustrating a process of performing inter prediction by a CNN predictor included in the image encoding apparatus illustrated in FIG. 22. In detail, FIG. 27A illustrates a CNN based inter prediction process according to the first embodiment, and FIG. 27B illustrates a CNN based inter prediction process according to the second embodiment.
제1 실시예First embodiment
도 27a를 참조하면, 단계 S2711에서, CNN 설정부(2210)는 CNN의 추론 과정을 수행하기 위해 CNN의 입력 레이어로 입력될 영상 데이터(즉, 입력 데이터)를 설정할 수 있다. 여기서, 입력 데이터는 참조 픽쳐 내 탐색영역을 포함할 수 있다. 또한, 입력 데이터는 현재 픽쳐 내 현재 블록에 인접한 복원된 주변영역 및 해당 주변영역의 움직임 벡터 중 적어도 하나를 더 포함할 수 있다. 그리고 각각의 경우에 있어, 입력 데이터는 인터 예측의 정확도를 향상시키기 위해 힌트 정보, 예컨대 현재 픽쳐와 참조 픽쳐 사이의 시간축 거리 정보를 더 포함할 수 있다.Referring to FIG. 27A, in operation S2711, the CNN setting unit 2210 may set image data (ie, input data) to be input to an input layer of the CNN in order to perform an inference process of the CNN. Here, the input data may include a search region in the reference picture. The input data may further include at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region. In each case, the input data may further include hint information, such as time axis distance information between the current picture and the reference picture, in order to improve the accuracy of inter prediction.
또한, CNN 설정부(2210)는 CNN에 적용될 필터 계수(즉, 컨볼루션 커널의 계수값들)를 설정할 수 있다. 여기서, 필터 계수는 단계 S2711에서 설정된 입력 데이터에 대해 CNN의 학습 과정을 수행하여 산출된 값일 수 있다. 또한, 필터 계수는 미리 설정된 특정값 또는 미리 설정된 복수의 특정값들로 구성된 세트에서 선택된 값일 수 있다.In addition, the CNN setting unit 2210 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN. Here, the filter coefficient may be a value calculated by performing a learning process of the CNN on the input data set in step S2711. In addition, the filter coefficient may be a value selected from a preset specific value or a set consisting of a plurality of preset specific values.
단계 S2713에서, CNN 실행부(2230)는, 단계 S2711에서 설정된 입력 데이터 및 필터 계수를 이용하여 CNN을 실행시켜, 현재 블록의 움직임 벡터를 생성하거나, 직접적으로 현재 블록의 예측 픽셀들을 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 감산기로 전달되어, 현재 블록으로부터 잔차 블록을 생성하는 데 이용될 수 있다.In operation S2713, the CNN execution unit 2230 may execute the CNN using the input data and the filter coefficients set in operation S2711 to generate a motion vector of the current block or directly generate prediction pixels of the current block. . In this case, the generated prediction pixels may be transferred to a subtractor and used to generate a residual block from the current block.
제2 실시예Second embodiment
도 27b를 참조하면, 단계 S2731에서, CNN 예측부(2200)는 기존의 인터 예측 방식(즉, 움직임 추정(ME) 및 움직임 보상(MC))에 따라 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다.Referring to FIG. 27B, in operation S2731, the CNN prediction unit 2200 may generate motion vectors or prediction pixels of the current block according to existing inter prediction schemes (ie, motion estimation (ME) and motion compensation (MC)). Can be.
구체적으로, CNN 예측부(2200)는 현재 픽쳐보다 먼저 부호화 및 복호화된 참조 픽쳐를 결정하고, 결정된 참조 픽쳐 내에서 현재 블록과 가장 유사한 참조 픽셀들을 탐색한다. 그리고, CNN 예측부(2200)는 탐색된 참조 픽셀들을 이용하여 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다.In detail, the CNN prediction unit 2200 determines a reference picture encoded and decoded before the current picture, and searches for reference pixels most similar to the current block in the determined reference picture. The CNN predictor 2200 may generate motion vectors or prediction pixels of the current block by using the found reference pixels.
단계 S2733에서, CNN 설정부(2210)는 단계 S1031에서 생성된 현재 블록의 움직임 벡터 또는 예측 픽셀들을 CNN의 입력 레이어로 입력될 영상 데이터(즉, 입력 데이터)로 설정할 수 있다.In operation S2733, the CNN setting unit 2210 may set the motion vector or the prediction pixels of the current block generated in operation S1031 as image data (that is, input data) to be input to the input layer of the CNN.
또한, CNN 설정부(2210)는 CNN에 적용될 필터 계수(즉, 컨볼루션 커널의 계수값들)를 설정할 수 있다. 필터 계수는 설정된 입력 데이터에 대해 CNN의 학습 과정을 수행하여 산출될 수 있다. 여기서, 입력 데이터는 참조 픽쳐 내 소정의 탐색영역을 포함할 수 있다. 또한, 입력 데이터는 현재 픽쳐 내 현재 블록에 인접한 복원된 주변영역 및 해당 주변영역의 움직임 벡터 중 적어도 하나를 더 포함할 수 있다. 그리고 각각의 경우에 있어, 입력 데이터는 인터 예측의 정확도를 향상시키기 위한 힌트 정보, 예컨대 현재 픽쳐와 참조 픽쳐 사이의 시간축 거리 정보 및 양자화 파라미터(quantization parameter, QP) 중 적어도 하나를 더 포함할 수 있다. 또한, 필터 계수는 미리 설정된 특정값 또는 미리 설정된 복수의 특정값들로 구성된 세트에서 선택된 값일 수 있다.In addition, the CNN setting unit 2210 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN. The filter coefficient may be calculated by performing a learning process of the CNN on the set input data. The input data may include a predetermined search area in the reference picture. The input data may further include at least one of a reconstructed peripheral region adjacent to the current block in the current picture and a motion vector of the peripheral region. In each case, the input data may further include hint information for improving the accuracy of inter prediction, for example, at least one of time axis distance information between a current picture and a reference picture and a quantization parameter (QP). . In addition, the filter coefficient may be a value selected from a preset specific value or a set consisting of a plurality of preset specific values.
단계 S2735에서, CNN 실행부(2230)는 단계 S2733에서 설정된 입력 데이터 및 필터 계수를 이용하여 CNN을 실행시켜, 단계 S2731에서 생성된 현재 블록의 움직임 벡터 또는 예측 픽셀들을 재정의(refinement)함으로써, 현재 블록의 움직임 벡터 또는 예측 픽셀들을 최종적으로 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 영상 부호화 장치의 감산기로 전달되어, 현재 블록으로부터 잔차 블록을 생성하는 데 이용될 수 있다.In step S2735, the CNN execution unit 2230 executes the CNN using the input data and the filter coefficients set in step S2733 to refine the motion vectors or the prediction pixels of the current block generated in step S2731, thereby Finally, the motion vector or prediction pixels of the block can be generated. In this case, the generated prediction pixels may be transferred to a subtractor of the image encoding apparatus and used to generate a residual block from the current block.
도 28a 및 도 28b는 도 26에 예시된 영상 복호화 장치에 포함될 수 있는 CNN 예측부가 인터 예측을 수행하는 프로세스를 나타내는 흐름도이다. 구체적으로, 도 28a는 제1 실시예에 따른 CNN 기반의 인터 예측 프로세스를 나타내고, 도 28b는 제2 실시예에 따른 CNN 기반의 인터 예측 프로세스를 나타낸다.28A and 28B are flowcharts illustrating a process of performing inter prediction by a CNN predictor included in the image decoding apparatus illustrated in FIG. 26. In detail, FIG. 28A illustrates a CNN based inter prediction process according to the first embodiment, and FIG. 28B illustrates a CNN based inter prediction process according to the second embodiment.
제1 실시예First embodiment
도 28a를 참조하면, 단계 S2811에서, CNN 설정부(2610)는 CNN의 추론 과정을 수행하기 위해 CNN의 입력 레이어로 입력될 영상 데이터(즉, 입력 데이터)를 설정할 수 있다. 여기서, 입력 데이터는 영상 부호화 장치로부터 시그널링된 참조 픽쳐 선택 정보에 기초하여 결정된 참조 픽쳐 내 탐색영역을 포함할 수 있다. 또한, 입력 데이터는 현재 픽쳐 내 현재 블록의 복원된 주변영역 및 해당 주변영역의 움직임 벡터 중 적어도 하나를 더 포함할 수 있다. 그리고 각각의 경우에 있어, 입력 데이터는 인터 예측의 정확도를 향상시키기 위해 힌트 정보를 더 포함할 수 있다.Referring to FIG. 28A, in operation S2811, the CNN setting unit 2610 may set image data (ie, input data) to be input to an input layer of the CNN to perform an inference process of the CNN. Here, the input data may include a search region in the reference picture determined based on the reference picture selection information signaled from the image encoding apparatus. The input data may further include at least one of a reconstructed peripheral area of the current block in the current picture and a motion vector of the peripheral area. And in each case, the input data may further include hint information to improve the accuracy of inter prediction.
또한, CNN 설정부(2610)는 CNN에 적용될 필터 계수(즉, 컨볼루션 커널의 계수값들)를 설정할 수 있다. 여기서, 필터 계수는 영상 부호화 장치로부터 시그널링된 값일 수 있다. 또한, 필터 계수는 미리 설정된 특정값 또는 미리 설정된 복수의 특정값들로 구성된 세트에서 영상 부호화 장치에 의해 선택된 값일 수 있다.In addition, the CNN setting unit 2610 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN. Here, the filter coefficient may be a signal signaled from the image encoding apparatus. In addition, the filter coefficient may be a value selected by the image encoding apparatus in a set consisting of a predetermined specific value or a plurality of predetermined specific values.
단계 S2813에서, CNN 실행부(2630)는 단계 S2811에서 설정된 입력 데이터 및 필터 계수를 이용하여 CNN을 실행시켜 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 영상 부호화 장치의 가산기로 전달되어 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.In operation S2813, the CNN execution unit 2630 may generate a motion vector or prediction pixels of the current block by executing the CNN using the input data and the filter coefficients set in operation S2811. In this case, the generated prediction pixels may be transferred to an adder of the image encoding apparatus and added to the residual block to be used to reconstruct the current block.
제2 실시예Second embodiment
도 28의 (b)를 참조하면, 단계 S2831에서, CNN 예측부(2600)는 기존의 인터 예측 방식(즉, 움직임 추정(ME) 및 움직임 보상(MC))에 따라 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다.Referring to FIG. 28B, in step S2831, the CNN prediction unit 2600 performs motion vector or prediction of the current block according to existing inter prediction schemes (ie, motion estimation (ME) and motion compensation (MC)). Pixels can be generated.
구체적으로, CNN 예측부(2600)는 복호화부로부터 추출된 인터 예측 모드에 대한 신택스 요소를 이용하여 현재 블록의 움직임 벡터와 그 움직임 벡터가 참조하는 참조 픽쳐를 결정할 수 있다. 그리고, CNN 예측부(2600)는 결정된 움직임 벡터와 참조 픽쳐를 이용하여 현재 블록을 예측하여 현재 블록의 움직임 벡터 또는 예측 픽셀들을 생성할 수 있다.In detail, the CNN predictor 2600 may determine a motion vector of the current block and a reference picture referenced by the motion vector by using a syntax element for the inter prediction mode extracted from the decoder. The CNN predictor 2600 may generate a motion vector or prediction pixels of the current block by predicting the current block by using the determined motion vector and the reference picture.
단계 S2833에서, CNN 설정부(2610)는 단계 S2831에서 생성된 현재 블록의 움직임 벡터 또는 예측 픽셀들을 CNN의 입력 레이어로 입력될 영상 데이터(즉, 입력 데이터)로 설정할 수 있다.In operation S2833, the CNN setting unit 2610 may set motion vector or prediction pixels of the current block generated in operation S2831 as image data (that is, input data) to be input to the input layer of the CNN.
또한, CNN 설정부(2610)는 CNN에 적용될 필터 계수(즉, 컨볼루션 커널의 계수값들)를 설정할 수 있다. 여기서, 필터 계수는 영상 부호화 장치로부터 시그널링된 값일 수 있다. 또한, 필터 계수는 미리 설정된 특정값 또는 미리 설정된 복수의 특정값들로 구성된 세트에서 영상 부호화 장치에 의해 선택된 값일 수 있다.In addition, the CNN setting unit 2610 may set filter coefficients (that is, coefficient values of a convolution kernel) to be applied to the CNN. Here, the filter coefficient may be a signal signaled from the image encoding apparatus. In addition, the filter coefficient may be a value selected by the image encoding apparatus in a set consisting of a predetermined specific value or a plurality of predetermined specific values.
단계 S2835에서, CNN 실행부(2630)는, 단계 S2833에서 설정된 필터 계수를 이용하여 CNN을 실행시켜, 단계 S2831에서 생성된 현재 블록의 움직임 벡터 또는 예측 픽셀들을 재정의(refinement)함으로써, 현재 블록의 움직임 벡터 또는 예측 픽셀들을 최종적으로 생성할 수 있다. 이 때, 생성된 예측 픽셀들은 영상 복호화 장치의 가산기로 전달되어 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.In step S2835, the CNN execution unit 2630 executes the CNN using the filter coefficient set in step S2833 to refine the motion vector or prediction pixels of the current block generated in step S2831, thereby Finally, motion vectors or prediction pixels may be generated. In this case, the generated prediction pixels may be transferred to an adder of the image decoding apparatus and added to the residual block to be used to reconstruct the current block.
4. CNN 기반의 인트라 예측(2) - CNN 기반의 참조 영역 필터링4. CNN-based intra prediction (2)-CNN-based reference region filtering
본 개시의 일부 기술들은 현재 블록의 인트라 예측에 이용되는 참조 영역의 양자화 오차를 최소화하기 위하여, 해당 참조 영역에 대해 CNN 기반의 필터링을 수행하는 기법과 관련되어 있다. 즉, 현재 블록의 예측 블록을 CNN 기반으로 직접 생성하는 것이 아니라 현재 블록의 인트라 예측에 이용되는 주변 영역을 필터링함으로써, 기존의 인트라 예측 구조를 크게 변경하지 않고도 예측 정확도를 크게 향상시킬 수 있다. Some techniques of this disclosure relate to a technique for performing CNN based filtering on a reference region in order to minimize the quantization error of the reference region used for intra prediction of the current block. In other words, instead of directly generating the prediction block of the current block based on the CNN, the prediction region may be greatly improved without filtering the existing intra prediction structure by greatly filtering the surrounding area used for intra prediction of the current block.
먼저, 참조 영역의 필터링에 사용하기 위한 CNN의 필터계수를 산출하는 방법을 설명한다.First, a method of calculating a filter coefficient of the CNN for use in filtering the reference region will be described.
도 29는 본 발명의 일 실시예에 따른 CNN의 필터계수를 산출하는 프로세스를 나타내는 흐름도이다.29 is a flowchart illustrating a process of calculating a filter coefficient of a CNN according to an embodiment of the present invention.
도 29를 참조하면, 단계 S2910에서, 영상 부호화 장치는 CNN의 입력 데이터를 설정할 수 있다. 입력 데이터는 부호화하고자 하는 블록인 현재 블록보다 먼저 부호화된 참조 영역을 포함할 수 있다.Referring to FIG. 29, in operation S2910, the image encoding apparatus may set input data of a CNN. The input data may include a reference region encoded before the current block, which is a block to be encoded.
참조 영역은 현재 블록에 인접한 주변 영역 및, 현재 블록을 구성하는 루마(luma) 블록 및 크로마(chroma) 블록들 중에서 부호화하고자 하는 성분(component)의 블록보다 먼저 부호화된 성분의 블록(즉, 현재 블록의 다른 성분) 중 적어도 하나의 블록을 포함할 수 있다. 즉, 주변 영역은 현재 블록과 동일 성분의 영역일 수도 있고 다른 성분의 영역일 수도 있다. 또한, 참조 영역은 주변 영역의 픽셀값들을 평균 연산하여 생성된 새로운 영역(즉, 평균 블록, 평균 라인 또는 평균 픽셀)을 더 포함할 수 있다.The reference region is a block of a component encoded before the block of the component to be encoded among the luma block and chroma blocks constituting the current block, and adjacent to the current block. May comprise at least one block). That is, the peripheral area may be an area of the same component as the current block or may be an area of another component. In addition, the reference region may further include a new region (ie, an average block, an average line, or an average pixel) generated by averaging pixel values of the peripheral region.
주변 영역은 픽셀 단위(즉, 주변 라인 또는 주변 픽셀)로 구성될 수도 있고, 블록 단위(즉, 주변 블록)로 구성될 수도 있다. 도 30은 CNN의 입력 데이터로 설정될 수 있는 주변 영역에 대한 예시도이다. 구체적으로, 도 30의 (a)는 픽셀 단위의 주변 영역을 나타내고, 도 30의 (b)는 블록 단위의 주변 영역을 나타낸다.The peripheral area may be configured in pixel units (ie, peripheral lines or peripheral pixels) or in block units (ie, peripheral blocks). 30 is an exemplary diagram of a peripheral region that may be set as input data of a CNN. Specifically, FIG. 30A illustrates a peripheral region in pixel units, and FIG. 30B illustrates a peripheral region in block units.
도 30의 (a)를 참조하면, 픽셀 단위의 주변 영역(즉, 주변 픽셀 또는 주변 라인)은 현재 블록(X)에 인접한 '1×1'의 픽셀, 및 '1×n' 또는 'n×1'의 라인들을 포함할 수 있다.Referring to FIG. 30A, the peripheral area (ie, the peripheral pixel or the peripheral line) in units of pixels includes '1 × 1' pixels adjacent to the current block X, and '1 × n' or 'n ×'. May include lines of 1 '.
도 30의 (b)를 참조하면, 블록 단위의 주변 영역(즉, 주변 블록)은 현재 블록(X)에 인접한 좌측블록(C), 상단블록(B), 우상단블록(D), 좌하단블록(E) 및 좌상단블록(A)을 포함할 수 있다. 본 명세서에서, 주변 블록들의 원본 블록(즉, 부호화 되지 않은 블록), 예측 블록 및 복원 블록은 서로 다르게 표기하기로 한다. 예컨대, 좌상단 블록(A)에 대하여, 그 원본 블록은 'Ao'로 표기하고, 예측 블록은 'Ap'로 표기하며, 복원 블록은 'Ar'로 표기한다. 또한, 주변 블록들(A,B,C,D,E)의 픽셀값들을 평균 연산한 평균 블록은 'F'로 표기한다. 블록 단위의 주변 영역은 픽셀 단위의 주변 영역보다 컨볼루션 커널의 적용 범위가 넓으므로, 블록 단위의 주변 영역을 CNN의 입력 데이터로 설정하게 되면 출력 데이터의 정확도를 향상시킬 수 있다.Referring to (b) of FIG. 30, the peripheral area (that is, the neighboring block) in units of blocks includes a left block (C), an upper block (B), a right upper block (D), and a lower left block adjacent to the current block (X). (E) and the upper left block (A). In this specification, original blocks (ie, uncoded blocks), prediction blocks, and reconstruction blocks of neighboring blocks will be described differently. For example, for the upper left block A, the original block is denoted by 'Ao', the predictive block is denoted by 'Ap', and the reconstructed block is denoted by 'Ar'. In addition, an average block obtained by averaging pixel values of the neighboring blocks A, B, C, D, and E is denoted by 'F'. Since the periphery area of the block unit has a wider application range of the convolution kernel than the periphery area of the pixel unit, setting the periphery area of the block unit as the input data of the CNN can improve the accuracy of the output data.
현재 블록과 다른 성분의 주변 블록들이 CNN에 입력되는 경우, 도 30의 (b)에 도시된 주변 블록들(Ar, Br, Cr, Dr, Er) 이외에 현재 블록(X)의 우측블록, 하측블록 및 우하측블록 중 하나 이상의 블록들(미도시)이 CNN에 더 입력될 수 있다. 예컨대, 현재 블록이 크로마 블록인 경우, 이미 부호화가 완료된 루마 성분의 현재 블록의 우측블록, 하측블록 및 우하측블록 중 하나 이상의 블록들을 CNN에 더 입력시킴으로써 출력 데이터의 정확도를 보다 향상시킬 수 있다. 이하, 설명의 편의를 위하여, 참조 영역은 블록 단위의 주변 영역 즉, 하나 이상의 주변 블록들로 구성됨을 전제로 본 실시예를 설명하기로 한다.When neighboring blocks of components different from the current block are input to the CNN, the right block and the lower block of the current block X, in addition to the neighboring blocks Ar, Br, Cr, Dr, Er shown in FIG. And one or more blocks (not shown) of the lower right block may be further input to the CNN. For example, when the current block is a chroma block, the accuracy of the output data may be further improved by further inputting one or more blocks among the right block, the lower block, and the right lower block of the current block of the luma component that have already been encoded to the CNN. Hereinafter, for convenience of description, the present embodiment will be described on the premise that the reference area is composed of a peripheral area of a block unit, that is, one or more peripheral blocks.
입력 데이터는 적어도 하나의 레이어로 구성되어 CNN에 입력될 수 있다. 예컨대, 도 31의 (a)에 도시된 바와 같이, 주변 블록들(Ar, Br, Cr, Dr 및 Er)은 각각 별개의 레이어로 구성되어 CNN에 입력될 수 있다. 또한, 도 31의 (b)에 도시된 바와 같이, 주변 블록들 중 전부 또는 일부(Ar 및 Br)는 곱셈기 등에 의해 통합된 후 단일 레이어로 구성되어 CNN에 입력될 수 있다.The input data may be composed of at least one layer and input to the CNN. For example, as illustrated in (a) of FIG. 31, neighboring blocks Ar, Br, Cr, Dr, and Er may be configured as separate layers and input to the CNN. In addition, as shown in (b) of FIG. 31, all or part of the neighboring blocks (Ar and Br) may be integrated into a multiplier or the like and may be configured as a single layer and input to the CNN.
입력 데이터는 CNN의 출력 정확도를 향상시키기 위하여 부가 정보를 더 포함할 수 있다. 부가 정보는 영상 부복호화 장치에서 참조할 수 있는 부호화 관련 모든 정보를 포함할 수 있다. 예컨대, 부가 정보는 주변 영역의 양자화 파라미터(quantization parameter, QP) 값, 현재 블록(영상 복호화 장치의 경우)의 양자화 파라미터(quantization parameter, QP) 값 및 주변 영역의 잔차에 대한 정보 중 적어도 하나를 포함할 수 있다. 여기서, 주변 영역의 잔차에 대한 정보는, 주파수 영역(frequency domain)에서, 해당 주변 영역의 변환 계수들 각각의 절대값 또는 모든 변환 계수들의 절대합을 포함할 수 있다. 또한, 주변 영역의 잔차에 대한 정보는, 공간 영역(spatial domain)에서, 해당 주변 영역의 잔차 신호들 각각의 절대값 또는 모든 잔차 신호들의 절대합을 포함할 수 있다.The input data may further include additional information to improve the output accuracy of the CNN. The additional information may include all encoding related information that can be referred to by the image encoding / decoding apparatus. For example, the additional information may include at least one of a quantization parameter (QP) value of the surrounding area, a quantization parameter (QP) value of the current block (in the case of an image decoding apparatus), and information about a residual of the surrounding area. can do. Here, the information about the residual of the peripheral region may include an absolute value of each of the transform coefficients of the corresponding peripheral region or an absolute sum of all the transform coefficients in the frequency domain. In addition, the information on the residual of the peripheral region may include an absolute value of each of the residual signals of the corresponding peripheral region or an absolute sum of all residual signals in the spatial domain.
입력 데이터가 라인단위의 참조 영역 및 k개의 부가 정보를 포함하는 경우, CNN의 입력 레이어에는 'n×1×k' 또는 '1×n×k'의 컨볼루션 커널이 적용될 수 있다. 또는, 입력 데이터가 블록단위의 참조 영역 및 k개의 부가 정보를 포함하는 경우, CNN의 입력 레이어에는 'n×m×k'의 컨볼루션 커널이 적용될 수 있다. When the input data includes a reference area in units of lines and k additional information, a convolution kernel of 'n × 1 × k' or '1 × n × k' may be applied to the input layer of the CNN. Alternatively, when the input data includes a reference area in units of blocks and k additional information, a convolution kernel of 'n × m × k' may be applied to the input layer of the CNN.
한편, YCbCr 4:2:0 또는 4:2:2 형식에서, 크로마 블록은 원래의 크기대로 사용되거나, 또는 업샘플링(upsampling) 레이어를 이용하여 루마 블록과 같은 크기로 업스케일(up-scaled)된 후 사용될 수 있다.On the other hand, in the YCbCr 4: 2: 0 or 4: 2: 2 format, the chroma block is used at its original size or up-scaled to the same size as the luma block using an upsampling layer. Can be used.
단계 S2920에서, 영상 부호화 장치는 CNN의 지도 학습(supervised learning)에 이용될 출력 레이블(label)을 설정할 수 있다.In operation S2920, the apparatus for encoding an image may set an output label to be used for supervised learning of the CNN.
출력 레이블이란 단계 S2910에서 설정된 입력 데이터에 대한 명시적인 정답을 의미하며, CNN의 출력 데이터와의 비교를 통해 자승 오차(Squared Error)를 산출하는데 이용된다. 출력 레이블은 입력 데이터로 설정된 주변 영역의 원본 픽셀값들일 수 있고, 또는 해당 주변 영역의 다른 성분(component)의 픽셀값들 중에서 해당 주변 영역에 적용된 양자화 파라미터(quantization parameter: QP) 값보다 작은 값의 양자화 파라미터가 적용된 픽셀값들일 수도 있다.The output label means an explicit correct answer to the input data set in step S2910 and is used to calculate a squared error through comparison with the output data of the CNN. The output label may be original pixel values of the peripheral region set as input data, or of pixel values of other components of the peripheral region, which are smaller than the quantization parameter (QP) value applied to the peripheral region. The pixel values may be applied to the quantization parameter.
출력 데이터는 CNN의 실행결과 출력 레이어를 통해 출력되는 데이터를 말하며, 입력 데이터로 설정된 주변 영역의 픽셀값들을 양자화(quantization) 이전 수준으로 복원시킨 픽셀값들(이하, '복원된 주변 영역'이라고 칭함)일 수 있다. CNN의 입력 데이터 및 출력 데이터는 학습 과정 및 추론 과정에서 기본적으로 동일하여야 한다.The output data refers to data output through the CNN's execution result output layer, and pixel values for restoring pixel values of the peripheral area set as input data to a level before quantization (hereinafter, referred to as 'restored peripheral areas'). May be). The input data and output data of the CNN should be basically the same in the learning process and the inference process.
CNN의 레이어 구성의 구체적인 예는 표 3과 같다.Specific examples of the layer configuration of the CNN are shown in Table 3.
CNN 레이어 예시#CNN layer example 입력 레이어Input layer 출력 레이어Output layer
데이터data 데이터data 레이블(label)Label
예시 1Example 1 - 라인단위의 주변 영역 - 부가정보-Peripheral area of line unit-Additional information 복원된 주변 영역, 또는 복원된 주변 영역의 잔차 정보Reconstructed Peripheral Area, or Residual Information in Restored Peripheral Area 주변 영역의 원본 픽셀값들,또는 주변 영역의 성분들 중에서 현재 QP보다 작은 QP를 이용하여 이전에 복호화된 성분의 픽셀값들Original pixel values of the peripheral region, or pixel values of a component previously decoded using a QP smaller than the current QP among the components of the peripheral region.
예시 2Example 2 - 블록단위의 주변 영역- 부가정보-Peripheral area in block unit-Additional information 복원된 주변 영역, 또는 복원된 주변 영역의 잔차 정보Reconstructed Peripheral Area, or Residual Information in Restored Peripheral Area 주변 영역의 원본 픽셀값들,또는 주변 영역의 성분들 중에서 현재 QP보다 작은 QP를 이용하여 이전에 복호화된 성분의 픽셀값들Original pixel values of the peripheral region, or pixel values of a component previously decoded using a QP smaller than the current QP among the components of the peripheral region.
예시 3Example 3 - 라인단위 또는 블록단위의 주변 영역- 부가정보-Peripheral area in line or block unit-Additional information 복원된 주변 영역,또는복원된 주변 영역의 잔차 정보Residual information in the restored periphery or restored periphery 주변 영역의 원본 픽셀값들,또는 주변 영역의 성분들 중에서 현재 QP보다 작은 QP를 이용하여 이전에 복호화된 성분의 픽셀값들Original pixel values of the peripheral region, or pixel values of a component previously decoded using a QP smaller than the current QP among the components of the peripheral region.
표 3을 참조하면, 입력 레이어의 데이터(입력 데이터)는 라인단위 및/또는 블록단위의 주변 영역과 부가정보로 구성될 수 있다. 이 경우, 출력 레이어의 데이터(출력 데이터)는 입력 데이터로 설정된 주변 영역을 양자화(quantization) 이전의 원본 픽셀값들에 근사화시켜 복원한 주변 영역일 수 있고, 또는 해당 주변 영역의 잔차 정보(픽셀값들)일 수 있다. 또한, 출력 레이어의 레이블은 입력 데이터로 설정된 주변 영역의 원본 픽셀값들, 또는 주변 영역을 구성하는 루마 블록 및 크로마 블록들 중에서 입력 데이터로 설정된 성분의 영역보다 작은 QP(Quantization Parameter)를 이용하여 복호화된 성분의 픽셀값들일 수 있다. 이와 같은 입력 데이터와 출력 데이터는 기본적으로 CNN의 학습 과정 및 추론 과정에서 동일하여야 한다. 다만, 이는 예시적인 것일 뿐, 본 실시예를 한정하는 것은 아니라는 점에 유의하여야 한다.Referring to Table 3, the data (input data) of the input layer may be composed of a peripheral area and additional information in line units and / or block units. In this case, the data (output data) of the output layer may be a peripheral area reconstructed by approximating original pixel values before quantization with the peripheral area set as the input data, or residual information (pixel value) of the peripheral area. )). In addition, the label of the output layer is decoded by using original pixel values of the peripheral area set as input data or a QP (Quantization Parameter) smaller than a region of a component set as input data among luma blocks and chroma blocks constituting the peripheral area. The pixel values of the component. Such input data and output data should basically be the same in the learning process and inference process of CNN. However, it should be noted that this is merely exemplary and does not limit the present embodiment.
단계 S2930에서, 영상 부호화 장치는 단계 S2910에서 설정된 입력 데이터 및 단계 S2920에서 설정된 출력 레이블을 기초로 오류 역전파 알고리즘(error backpropagation algorithm)을 이용한 CNN의 지도 학습 과정을 반복 수행함으로써 CNN의 필터계수를 산출할 수 있다. 영상 부호화 장치는 Y, Cb, Cr 성분별로 각각 필터계수를 산출할 수도 있고, Y, Cb, Cr 모든 성분에 공통적으로 적용되는 하나의 필터계수를 산출할 수도 있다.In operation S2930, the image encoding apparatus calculates the filter coefficients of the CNN by repeatedly performing CNN's supervised learning process using an error backpropagation algorithm based on the input data set in operation S2910 and the output label set in operation S2920. can do. The image encoding apparatus may calculate a filter coefficient for each of the Y, Cb, and Cr components, or may calculate one filter coefficient commonly applied to all of the Y, Cb, and Cr components.
이하, 첨부된 도면을 참조하여, 인트라 예측에 이용되는 참조 영역을 CNN에 기반하여 필터링하기 위한 구성 및 방법에 대해 상세하게 설명하기로 한다.Hereinafter, a configuration and method for filtering a reference region used for intra prediction based on CNN will be described in detail with reference to the accompanying drawings.
도 32는 본 발명의 일 실시예에 따른 CNN 기반 필터부의 구성을 나타내는 블록도이다. 도 32를 참조하면, CNN 기반 필터부(3200)는 CNN 설정부(3210) 및 CNN 실행부(3230)를 포함할 수 있다.32 is a block diagram illustrating a configuration of a CNN-based filter unit according to an embodiment of the present invention. Referring to FIG. 32, the CNN-based filter unit 3200 may include a CNN setting unit 3210 and a CNN execution unit 3230.
CNN의 구조는 도 5를 참조하여 전술한 바와 같으며, CNN은 레이어의 크기를 조절하기 위해 업샘플링(upsampling) 레이어 또는 풀링(pooling) 레이어를 더 포함하여 구성될 수 있다.The structure of the CNN is as described above with reference to FIG. 5, and the CNN may further include an upsampling layer or a pooling layer to adjust the size of the layer.
CNN 설정부(3210)는 CNN의 입력 데이터를 설정할 수 있다. 입력 데이터는 도 29를 참조하여 전술한 바와 같이 현재 블록보다 먼저 복원된 참조 영역으로 구성될 수 있다. 참조 영역은 현재 블록에 인접한 주변 영역 및, 현재 블록을 구성하는 루마(luma) 블록 및 크로마(chroma) 블록들 중에서 부호화하고자 하는 성분(component)의 블록보다 먼저 부호화된 성분의 블록(즉, 현재 블록의 다른 성분) 중 적어도 하나의 블록을 포함할 수 있다. 즉, 주변 영역은 현재 블록과 동일 성분의 영역일 수도 있고 다른 성분의 영역일 수도 있다. 또한, 참조 영역은 주변 영역의 픽셀값들을 평균 연산하여 생성된 새로운 영역(즉, 평균 블록, 평균 라인 또는 평균 픽셀)을 더 포함할 수 있다.The CNN setting unit 3210 may set input data of the CNN. As described above with reference to FIG. 29, the input data may include a reference area reconstructed before the current block. The reference region is a block of a component encoded before the block of the component to be encoded among the luma block and chroma blocks constituting the current block, and adjacent to the current block. May comprise at least one block). That is, the peripheral area may be an area of the same component as the current block or may be an area of another component. In addition, the reference region may further include a new region (ie, an average block, an average line, or an average pixel) generated by averaging pixel values of the peripheral region.
주변 영역은 픽셀 단위(즉, 주변 라인 또는 주변 픽셀)로 구성될 수도 있고, 블록 단위(즉, 주변 블록)로 구성될 수도 있다. 블록 단위의 주변 영역은 픽셀 단위의 주변 영역보다 컨볼루션 커널의 적용 범위가 넓으므로, 블록 단위의 주변 영역을 CNN의 입력 데이터로 설정함으로써 출력 데이터의 정확도를 향상시킬 수 있다.The peripheral area may be configured in pixel units (ie, peripheral lines or peripheral pixels) or in block units (ie, peripheral blocks). Since the periphery area of the block unit is wider in the application range of the convolution kernel than the periphery area of the pixel unit, the accuracy of the output data can be improved by setting the periphery area of the block unit as input data of the CNN.
입력 데이터는 적어도 하나의 레이어로 구성되어 CNN에 입력될 수 있다. 예컨대, 입력 데이터는 주변 블록들 별로 각각 하나의 레이어로 구성되어 CNN에 입력될 수 있다. 또한, 입력 데이터는 주변 블록들 전부 또는 일부(Ar 및 Br)가 통합된 하나의 레이어로 구성되어 CNN에 입력될 수도 있다.The input data may be composed of at least one layer and input to the CNN. For example, the input data may be composed of one layer for each neighboring block and input to the CNN. In addition, the input data may be composed of one layer in which all or part of the neighboring blocks (Ar and Br) are integrated and input to the CNN.
입력 데이터는 CNN 학습 과정 및 CNN 추론 과정의 정확도를 향상시키기 위하여 부가 정보를 더 포함할 수 있다. 부가 정보는 참조 영역의 양자화 파라미터(quantization parameter, QP) 값, 현재 블록(영상 복호화 장치의 경우)의 양자화 파라미터 값 및 참조 영역의 잔차에 대한 정보 중 적어도 하나를 포함할 수 있다. 여기서, 참조 영역의 잔차에 대한 정보는 주파수 영역(frequency domain)에서는 참조 영역의 변환 계수들의 각 절대값들 또는 절대합일 수 있고, 공간 영역(spatial domain)에서는 잔차 신호들의 각 절대값 또는 절대합일 수 있다. 또한, 부가 정보는 현재 블록의 인트라 예측 모드 정보(예: 인트라 예측의 방향성 정보 등)를 더 포함할 수도 있다.The input data may further include additional information to improve the accuracy of the CNN learning process and the CNN inference process. The additional information may include at least one of a quantization parameter (QP) value of the reference region, a quantization parameter value of the current block (in the case of an image decoding apparatus), and information about a residual of the reference region. Here, the information about the residual of the reference region may be the absolute values or the absolute sums of the transform coefficients of the reference region in the frequency domain, and may be the respective absolute values or the absolute sum of the residual signals in the spatial domain. have. In addition, the additional information may further include intra prediction mode information (eg, directional information of intra prediction) of the current block.
입력 데이터가 라인 단위의 주변 영역 및 k개의 부가 정보를 포함하는 경우, CNN의 입력 레이어에는 'n×1×k' 또는 '1×n×k'의 컨볼루션 커널이 적용될 수 있다. 또한, 입력 데이터가 블록 단위의 주변 영역 및 k개의 부가 정보를 포함하는 경우, CNN의 입력 레이어에는 'n×m×k'의 컨볼루션 커널이 적용될 수 있다.When the input data includes a periphery area in line units and k additional information, a convolution kernel of 'n × 1 × k' or '1 × n × k' may be applied to the input layer of the CNN. In addition, when the input data includes a peripheral area of block unit and k additional information, a convolution kernel of 'n × m × k' may be applied to the input layer of the CNN.
CNN 설정부(3210)는 영상 부호화 장치에 의해 산출된 필터계수를 현재 블록의 인트라 예측을 위한 필터계수로 설정할 수 있다. 이 때, 필터계수는 영상 부호화 장치에 의해 소정의 단위, 예컨대 CU 단위 또는 프레임 단위로 산출된 값일 수 있다.The CNN setting unit 3210 may set the filter coefficient calculated by the image encoding apparatus as a filter coefficient for intra prediction of the current block. In this case, the filter coefficient may be a value calculated by a video encoding apparatus in a predetermined unit, for example, a CU unit or a frame unit.
필터계수가 프레임 단위로 설정되는 경우, 해당 필터계수는 해당 프레임에 포함된 복수의 현재 블록들의 인트라 예측에 공통적으로 이용될 수 있다.When the filter coefficient is set in units of frames, the filter coefficient may be commonly used for intra prediction of a plurality of current blocks included in the frame.
영상 부호화 장치 및 영상 복호화 장치가 필터계수 세트를 운용하는 경우, CNN 설정부(3210)는 영상 부호화 장치로부터 전달된 필터계수의 인덱스 정보에 기초하여 해당 필터계수 세트로부터 현재 블록의 인트라 예측을 위한 필터계수를 설정할 수도 있다.When the image encoding apparatus and the image decoding apparatus operate the filter coefficient set, the CNN setting unit 3210 may perform a filter for intra prediction of the current block from the filter coefficient set based on the index information of the filter coefficient transmitted from the image encoding apparatus. You can also set the factor.
한편, 도 32에서는 CNN 설정부(3210)가 CNN 기반 필터부(3200)에 포함되는 것으로 도시하고 있으나, 이는 예시적인 것이고, 본 실시예가 이에 한정되는 것은 아니라는 점에 유의하여야 한다. 즉, CNN 설정부(3210)는 CNN 기반 필터부(3200)와는 별도의 유닛으로 구현될 수 있다. 또한, CNN 설정부(3210)는 CNN 실행부(3230)와 통합되어 하나의 유닛으로 구현될 수도 있다.Meanwhile, although FIG. 32 illustrates that the CNN setting unit 3210 is included in the CNN-based filter unit 3200, it should be noted that this is exemplary and the present embodiment is not limited thereto. That is, the CNN setting unit 3210 may be implemented as a separate unit from the CNN-based filter unit 3200. In addition, the CNN setting unit 3210 may be integrated with the CNN execution unit 3230 and implemented as one unit.
CNN 실행부(3230)는 CNN 설정부(3210)에 의해 설정된 필터계수 즉, 컨볼루션 커널의 계수값들을 이용하여 입력 데이터에 대해 CNN 기반의 추론 과정을 수행함으로써, 출력 데이터 즉, 현재 블록에 대한 예측 블록을 생성할 수 있다.The CNN execution unit 3230 performs a CNN-based inference process on the input data using the filter coefficients set by the CNN setting unit 3210, that is, the coefficient values of the convolution kernel, thereby outputting the output data, that is, the current block. A prediction block can be generated.
이 때, 생성된 예측 블록은, i) 영상 부호화 장치 측의 경우, 감산기로 전달되어 현재 블록의 잔차 블록을 생성하는 데 이용될 수 있고, ii) 영상 복호화 장치 측의 경우, 가산기로 전달되어 현재 블록의 잔차 블록에 가산됨으로써 현재 블록을 복원하는 데 이용될 수 있다.In this case, the generated prediction block may be i) delivered to the subtractor in the case of the image encoding apparatus and used to generate a residual block of the current block, and ii) delivered to the adder in the case of the image decoding apparatus and transmitted to the presenter. It can be used to recover the current block by adding it to the residual block of the block.
도 33은 본 실시예의 일 측면에 따른 참조영역의 필터링 프로세스를 나타내는 흐름도이다.33 is a flowchart illustrating a filtering process of a reference region according to an aspect of the present embodiment.
도 33을 참조하면, 단계 S3310에서, 인트라 예측부는 현재 블록을 부호화 또는 복호화하는데 이용될 인트라 예측 모드를 결정할 수 있다. 인트라 예측 모드는 도 3을 참조하여 전술한 바와 같이 예측 방향에 따라 복수의 모드를 포함할 수 있다. 예컨대, 인트라 예측 모드는 planar 모드 및 DC 모드를 포함하는 비방향성 모드와 65개의 방향성 모드를 포함할 수 있다.Referring to FIG. 33, in operation S3310, the intra predictor may determine an intra prediction mode to be used for encoding or decoding a current block. The intra prediction mode may include a plurality of modes according to the prediction direction as described above with reference to FIG. 3. For example, the intra prediction mode may include 65 directional modes and a non-directional mode including a planar mode and a DC mode.
인트라 예측부는 결정된 인트라 예측 모드에 따라 현재 블록의 인트라 예측에 이용될 참조 영역을 선택할 수 있다. 즉, 참조 영역은 현재 블록의 인트라 예측 모드에 따라 달리 구성될 수 있다. 참조 영역은 도 29를 참조하여 전술한 바와 같이 현재 블록에 인접한 기복원된 주변 영역을 포함할 수 있다. 또한, 참조 영역은 현재 블록의 인트라 예측과 관련된 부가 정보를 더 포함할 수 있다.The intra prediction unit may select a reference region to be used for intra prediction of the current block according to the determined intra prediction mode. That is, the reference region may be configured differently according to the intra prediction mode of the current block. The reference region may include a restored peripheral region adjacent to the current block as described above with reference to FIG. 29. In addition, the reference region may further include additional information related to intra prediction of the current block.
단계 S3320에서, 인트라 예측부는 미리 설정된 필터링 조건의 충족여부를 판단하여 단계 S3310에서 선택된 참조 영역에 대한 필터링 수행 여부를 결정할 수 있다.In operation S3320, the intra predictor may determine whether to perform filtering on the reference region selected in operation S3310 by determining whether the preset filtering condition is satisfied.
현재 블록의 인트라 예측을 위해 선택된 참조 영역은 양자화/역양자화 과정을 거치면서 원본 픽셀값들과의 양자화 오차가 발생할 수 있다. 이러한 양자화 오차는 인트라 예측의 정확도를 저하시키는 원인이 되므로, 양자화 오차를 최소화하기 위해 현재 블록에 대한 인트라 예측을 수행하기 전에 해당 참조 영역을 필터링할 필요가 있다. 그러나, 참조 영역을 필터링하는 것이 양자화 오차의 최소화를 담보하는 것은 아니며, 필터링 수행으로 인해 영상 부복호화 과정의 복잡도가 증가할 수 있다는 문제가 있다. 따라서, 본 실시예에 따른 인트라 예측부는, 특정 조건 하에서만 적응적으로(adaptively), 현재 블록의 인트라 예측에 이용될 참조 영역에 대한 필터링을 수행할 수 있다.The reference region selected for intra prediction of the current block may have a quantization error with original pixel values while undergoing quantization / dequantization. Since the quantization error causes a decrease in the accuracy of intra prediction, it is necessary to filter the reference region before performing the intra prediction on the current block in order to minimize the quantization error. However, filtering the reference region does not guarantee minimization of the quantization error, and there is a problem that the complexity of the image encoding and decoding process may increase due to the filtering. Therefore, the intra prediction unit according to the present embodiment may adaptively perform filtering on the reference region to be used for intra prediction of the current block only under specific conditions.
필터링 조건은 현재 블록의 인트라 예측을 위해 선택된 참조 영역 각각의 사이즈에 기초하여 설정될 수 있다. 예컨대, 인트라 예측부는 참조 영역에 포함되는 주변 블록의 사이즈가 '4×4'이상인 경우에만 해당 주변 블록에 대한 필터링을 수행할 수 있다. 또한, 필터링 조건은 현재 블록의 인트라 예측 모드 및 현재 블록의 사이즈에 기초하여 설정될 수도 있다. 예컨대, 인트라 예측 모드가 DC 모드인 경우 현재 블록의 사이즈와 관계없이 참조 영역에 대한 필터링이 수행되지 않고, 인트라 예측 모드가 'Vertical-Right'의 예측 방향을 갖는 방향성 모드인 경우 현재 블록의 사이즈가 '8×8'이상인 경우에만 참조 영역에 대한 필터링이 수행될 수 있다. 다만, 이는 예시적인 것이고 본 실시예를 한정하는 것은 아니라는 점에 유의하여야 한다.The filtering condition may be set based on the size of each of the reference regions selected for intra prediction of the current block. For example, the intra predictor may perform filtering on the neighbor block only when the size of the neighbor block included in the reference region is greater than or equal to '4 × 4'. In addition, the filtering condition may be set based on the intra prediction mode of the current block and the size of the current block. For example, when the intra prediction mode is the DC mode, filtering is not performed on the reference region regardless of the size of the current block, and when the intra prediction mode is the directional mode having the prediction direction of 'Vertical-Right', the size of the current block is Filtering of the reference region may be performed only when it is greater than or equal to '8 × 8'. However, it should be noted that this is exemplary and does not limit the present embodiment.
이와 같이, 인트라 예측부는 현재 블록의 인트라 예측을 위해 선택된 참조 영역을 적응적으로 필터링함으로써, 인트라 예측의 정확도를 향상시키면서도 영상 부복호화 과정의 복잡도의 증가를 최소화할 수 있다.As such, the intra predictor may adaptively filter the reference region selected for intra prediction of the current block, thereby minimizing the increase in the complexity of the image encoding and decoding process while improving the accuracy of the intra prediction.
단계 S3320에서 판단한 결과 미리 설정된 필터링 조건을 충족하는 경우('예'), 인트라 예측부는 현재 블록의 인트라 예측을 위해 선택된 참조 영역에 대한 필터링을 수행할 것을 결정하고 단계 S3330으로 진행할 수 있다.If the result of the determination in step S3320 satisfies the preset filtering condition (Yes), the intra prediction unit may determine to perform filtering on the reference region selected for intra prediction of the current block, and proceed to step S3330.
단계 S3320에서 판단한 결과 미리 설정된 필터링 조건을 충족하지 못하는 경우('아니오'), 인트라 예측부는 현재 블록의 인트라 예측을 위해 선택된 참조 영역에 대한 필터링을 수행하지 않을 것을 결정하고 단계 S3340으로 진행할 수 있다.If it is determined in operation S3320 that the preset filtering condition is not satisfied (No), the intra prediction unit may determine not to perform filtering on the reference region selected for intra prediction of the current block, and proceed to operation S3340.
단계 S3330에서, 인트라 예측부는 단계 S3310에서 선택된 참조 영역에 대해 필터링을 수행하여, 해당 참조 영역의 픽셀값들을 양자화(quantization) 이전의 수준으로 복원시킨 픽셀값들(이하, '필터링된 참조 영역'이라고 칭함)을 생성할 수 있다. 여기서, 해당 참조 영역을 필터링하기 위해 CNN 기반의 필터가 이용될 수 있다. 이하 CNN 기반의 필터를 이용하여 참조 영역을 필터링하는 과정을 상세하게 설명하기로 한다.In operation S3330, the intra predictor performs filtering on the reference region selected in operation S3310 to restore pixel values of the reference region to a level before quantization (hereinafter, referred to as 'filtered reference region'). May be generated). Here, a CNN based filter may be used to filter the corresponding reference region. Hereinafter, a process of filtering the reference region by using the CNN-based filter will be described in detail.
단계 S3332에서, 인트라 예측부는 참조 영역에 대해 CNN 기반의 필터링을 수행하기 위하여, CNN의 입력 데이터 및 필터계수를 설정할 수 있다.In operation S3332, the intra prediction unit may set the input data and the filter coefficient of the CNN to perform CNN-based filtering on the reference region.
구체적으로, CNN의 입력 데이터는 현재 블록의 인트라 예측에 이용될 참조 영역으로서, 단계 S3310에서 선택된 참조 영역으로 설정된다.Specifically, the input data of the CNN is set as the reference region to be used for intra prediction of the current block, and is selected as the reference region selected in step S3310.
CNN의 필터계수는 영상 부호화 장치의 지도학습 과정을 통해 산출된 필터계수로 설정된다. 영상 부호화 장치에 의해 산출된 필터계수는 비트스트림을 통해 영상 복호화 장치로 시그널링되어, 영상 복호화 장치의 CNN 기반 필터링 과정에 이용될 수 있다. 또한, 필터계수가 특정값으로 미리 설정된 후 영상 부호화 장치와 영상 복호화 장치에 각각 저장된 경우, 별도의 시그널링 없이 각 장치에 저장된 필터계수가 CNN 기반 필터링 과정에 이용될 수 있다. 또한, 필터계수가 복수의 특정값들로 미리 설정되어 하나의 세트를 구성한 후 영상 부호화 장치와 영상 복호화 장치에 각각 저장된 경우, 영상 부호화 장치에 의해 선택된 필터계수의 선택 정보(예: 해당 세트 내 필터계수의 인덱스 정보)에 따라 설정된 해당 세트 내 특정 필터계수가 영상 복호화 장치의 CNN 기반 필터링 과정에 이용될 수 있다. 이 경우, 필터계수는 양자화 파라미터 값에 따라 복수의 특정값들로 미리 설정되어 하나의 세트를 구성할 수 있으며, 그 구체적인 일 예는 표 4와 같다. 다만, 표 4의 내용은 예시적인 것이므로, 본 실시예가 이에 한정되는 것은 아님에 유의하여야 한다.The filter coefficient of the CNN is set to the filter coefficient calculated through the supervised learning process of the image encoding apparatus. The filter coefficients calculated by the image encoding apparatus may be signaled to the image decoding apparatus through the bitstream and used in the CNN-based filtering process of the image decoding apparatus. In addition, when the filter coefficient is previously set to a specific value and stored in the image encoding apparatus and the image decoding apparatus, respectively, the filter coefficient stored in each apparatus may be used in the CNN-based filtering process without additional signaling. In addition, when the filter coefficient is preset with a plurality of specific values to form one set and then stored in the image encoding apparatus and the image decoding apparatus, selection information of the filter coefficient selected by the image encoding apparatus (for example, a filter in the set) The specific filter coefficient set in the set according to the index information of the coefficient may be used in the CNN-based filtering process of the image decoding apparatus. In this case, the filter coefficient may be previously set to a plurality of specific values according to the quantization parameter value to configure one set, and a specific example thereof is shown in Table 4. However, since the contents of Table 4 are exemplary, it should be noted that the present embodiment is not limited thereto.
그룹(index)Group QPQP 필터계수Filter coefficient
그룹 1 (G01)Group 1 (G01) 0 ~ 100 to 10 W00, W01, W02, W03W00, W01, W02, W03
그룹 2 (G02)Group 2 (G02) 11 ~ 2011 to 20 W04, W05, W06, W07W04, W05, W06, W07
그룹 3 (G03)Group 3 (G03) 21 ~ 3021-30 W08, W09, W10, W11W08, W09, W10, W11
그룹 4 (G04)Group 4 (G04) 31 ~ 4031-40 W12, W13, W14, W15W12, W13, W14, W15
그룹 5 (G05)Group 5 (G05) 41 ~41- W16, W17, W18, W19W16, W17, W18, W19
표 4를 참조하면, 현재 블록의 인트라 예측을 위해 선택된 참조 영역의 양자화 파라미터가 '0 내지 10'의 값을 갖는 경우, 그룹 1(G01)로 설정된 필터계수 'W00 내지 W03'이 해당 참조 영역에 대한 CNN 기반 필터링 과정에 이용될 수 있다. 마찬가지로, 현재 블록의 인트라 예측을 위해 선택된 참조 영역의 양자화 파라미터가 '41' 이상의 값을 갖는 경우, 그룹 5(G05)로 설정된 필터계수 'W16 내지 W19'가 해당 참조 영역에 대한 CNN 기반 필터링 과정에 이용될 수 있다. 각각의 경우, 영상 부호화 장치에 의해 선택된 필터계수에 대응하는 그룹 인덱스 정보('G01 내지 G05')는 비트스트림을 통해 영상 복호화 장치로 시그널링되어, 영상 복호화 장치의 CNN 기반 필터링 과정에 이용될 수 있다.Referring to Table 4, when the quantization parameter of the reference region selected for intra prediction of the current block has a value of '0 to 10', the filter coefficients 'W00 to W03' set to Group 1 (G01) are assigned to the reference region. It can be used for CNN based filtering process. Similarly, when the quantization parameter of the reference region selected for intra prediction of the current block has a value of '41' or more, the filter coefficients 'W16 to W19' set to group 5 (G05) are included in the CNN-based filtering process for the reference region. Can be used. In each case, the group index information 'G01 to G05' corresponding to the filter coefficient selected by the image encoding apparatus may be signaled to the image decoding apparatus through a bitstream and used for the CNN based filtering process of the image decoding apparatus. .
단계 S3334에서, 인트라 예측부는 단계 S3332에서 설정된 필터계수가 적용된 CNN을 실행시켜 입력 데이터에 대한 추론 과정을 수행함으로써 출력 데이터를 생성할 수 있다. 이 때, 생성된 출력 데이터는 입력 데이터로 설정된 참조 영역의 픽셀값들을 양자화(quantization) 이전 수준으로 복원시킨 필터링된 참조 영역일 수 있다.In operation S3334, the intra prediction unit may execute the CNN to which the filter coefficient set in operation S3332 is applied to perform the inference process on the input data to generate output data. In this case, the generated output data may be a filtered reference region in which pixel values of the reference region set as input data are restored to a level before quantization.
단계 S3340에서, 인트라 예측부는 참조 영역을 이용하여 현재 블록에 대한 인트라 예측을 수행할 수 있다.In operation S3340, the intra predictor may perform intra prediction on the current block by using the reference region.
이 때, 인트라 예측에 이용되는 참조 영역은 단계 S3310에서 선택된 필터링되지 않은 참조 영역일 수 있다. 또한, 인트라 예측에 이용되는 참조 영역은 단계 S3330에서 양자화 이전 수준으로 필터링된 참조 영역일 수도 있다.In this case, the reference region used for intra prediction may be an unfiltered reference region selected in step S3310. In addition, the reference region used for intra prediction may be a reference region filtered to a level before quantization in step S3330.
필터링된 참조 영역을 이용하여 현재 블록에 대한 인트라 예측을 수행하는 경우, 인트라 예측부는 필터링된 참조 영역의 픽셀값들을 그대로 이용하여 현재 블록에 대한 인트라 예측을 수행할 수 있다. 또한 이 경우, 인트라 예측부는 필터링된 참조 영역의 픽셀값들과 해당 참조 영역의 필터링되기 전 픽셀값들에 대해 미리 설정된 가중치(weight)를 적용하여 산출한 픽셀값들(즉, 가중 평균값)을 이용하여 현재 블록에 대한 인트라 예측을 수행할 수도 있다. 여기서, 가중치는 인트라 예측 결과의 정확도 및 영상 부복호화 효율을 향상시키기 위해 실험적으로 결정된 값일 수 있다.When intra prediction is performed on the current block by using the filtered reference region, the intra predictor may perform intra prediction on the current block using the pixel values of the filtered reference region as it is. Also, in this case, the intra predictor may use pixel values (that is, weighted average values) calculated by applying preset weights to the pixel values of the filtered reference region and the pixel values before filtering of the reference region. Intra prediction may be performed on the current block. Here, the weight may be an experimentally determined value in order to improve the accuracy of the intra prediction result and the image encoding and decoding efficiency.
도 34는 본 실시예의 다른 측면에 따른 참조영역의 필터링 프로세스를 나타내는 흐름도이다. 도 34의 필터링 과정은 도 33의 필터링 과정과 참조 영역을 필터링하는 구체적인 방법에 있어서 차이가 있으며, 이하 중복되는 부분에 대한 설명은 생략하거나 간략히 하기로 한다.34 is a flowchart illustrating a filtering process of a reference region according to another aspect of the present embodiment. The filtering process of FIG. 34 differs from the filtering process of FIG. 33 in a specific method of filtering the reference region, and a description of overlapping portions will be omitted or briefly described below.
도 34를 참조하면, 단계 S3410에서, 인트라 예측부는 현재 블록을 부호화 또는 복호화하는데 이용될 인트라 예측 모드를 결정할 수 있다. 또한, 인트라 예측부는 결정된 인트라 예측 모드에 따라 현재 블록의 인트라 예측에 이용될 참조 영역을 선택할 수 있다. 참조 영역은 현재 블록에 인접한 기복원된 주변 영역을 포함할 수 있다. 또한, 참조 영역은 현재 블록의 인트라 예측과 관련된 부가 정보를 더 포함할 수 있다.Referring to FIG. 34, in operation S3410, the intra predictor may determine an intra prediction mode to be used to encode or decode a current block. The intra prediction unit may select a reference region to be used for intra prediction of the current block according to the determined intra prediction mode. The reference region may include a restored peripheral region adjacent to the current block. In addition, the reference region may further include additional information related to intra prediction of the current block.
단계 S3420에서, 인트라 예측부는 미리 설정된 필터링 조건의 충족여부를 판단하여 단계 S3410에서 선택된 참조 영역에 대한 필터링 수행 여부를 결정할 수 있다.In operation S3420, the intra predictor may determine whether to perform the filtering on the reference region selected in operation S3410 by determining whether the preset filtering condition is satisfied.
현재 블록의 인트라 예측을 위해 선택된 참조 영역은 양자화/역양자화 과정을 거치면서 원본 픽셀값들과의 양자화 오차가 발생할 수 있다. 따라서, 이러한 양자화 오차를 최소화하면서도 영상 부복호화 과정의 복잡도를 크게 증가시키지 않도록 하기 위하여, 인트라 예측부는 특정 조건 하에서만 적응적으로(adaptively) 참조 영역에 대한 필터링을 수행할 수 있다.The reference region selected for intra prediction of the current block may have a quantization error with original pixel values while undergoing quantization / dequantization. Accordingly, in order to minimize such quantization error and not to greatly increase the complexity of the image encoding / decoding process, the intra prediction unit may adaptively filter the reference region only under specific conditions.
필터링 조건은 현재 블록의 인트라 예측을 위해 선택된 참조 영역 각각의 사이즈에 기초하여 설정될 수 있다. 예컨대, 인트라 예측부는 참조 영역에 포함되는 주변 블록의 사이즈가 '4×4'이상인 경우에만 해당 주변 블록에 대한 필터링을 수행할 수 있다. 또한, 필터링 조건은 현재 블록의 인트라 예측 모드 및 현재 블록의 사이즈에 기초하여 설정될 수도 있다. 예컨대, 인트라 예측 모드가 DC 모드인 경우 현재 블록의 사이즈와 관계없이 참조 영역에 대한 필터링이 수행되지 않고, 인트라 예측 모드가 'Vertical-Right'의 예측 방향을 갖는 방향성 모드인 경우 현재 블록의 사이즈가 '8×8'이상인 경우에만 참조 영역에 대한 필터링이 수행될 수 있다. 다만, 이는 예시적인 것이고 본 실시예를 한정하는 것은 아니라는 점에 유의하여야 한다.The filtering condition may be set based on the size of each of the reference regions selected for intra prediction of the current block. For example, the intra predictor may perform filtering on the neighbor block only when the size of the neighbor block included in the reference region is greater than or equal to '4 × 4'. In addition, the filtering condition may be set based on the intra prediction mode of the current block and the size of the current block. For example, when the intra prediction mode is the DC mode, filtering is not performed on the reference region regardless of the size of the current block, and when the intra prediction mode is the directional mode having the prediction direction of 'Vertical-Right', the size of the current block is Filtering of the reference region may be performed only when it is greater than or equal to '8 × 8'. However, it should be noted that this is exemplary and does not limit the present embodiment.
단계 S3420에서 판단한 결과 미리 설정된 필터링 조건을 충족하는 경우('예'), 인트라 예측부는 현재 블록의 인트라 예측을 위해 선택된 참조 영역에 대한 필터링을 수행할 것을 결정하고 단계 S3430으로 진행할 수 있다.If it is determined in operation S3420 that the predetermined filtering condition is satisfied (Yes), the intra prediction unit may determine to perform filtering on the reference region selected for intra prediction of the current block, and proceed to operation S3430.
단계 S3420에서 판단한 결과 미리 설정된 필터링 조건을 충족하지 못하는 경우('아니오'), 인트라 예측부는 현재 블록의 인트라 예측을 위해 선택된 참조 영역에 대한 필터링을 수행하지 않을 것을 결정하고 단계 S3440으로 진행할 수 있다.If it is determined in operation S3420 that the preset filtering condition is not satisfied (No), the intra prediction unit may determine not to perform filtering on the reference region selected for intra prediction of the current block, and proceed to operation S3440.
단계 S3430에서, 인트라 예측부는 단계 S3410에서 선택된 참조 영역에 대해 필터링을 수행하여, 해당 참조 영역의 픽셀값들을 양자화(quantization) 이전의 수준으로 복원시킨 픽셀값들(이하, '필터링된 참조 영역'이라고 칭함)을 생성할 수 있다. 여기서, 해당 참조 영역을 필터링하기 위해 저대역 통과 필터(예: 2-tap 필터, 3-tap 필터 등) 및 CNN 기반의 필터가 모두 이용될 수 있다.In operation S3430, the intra predictor performs filtering on the reference region selected in operation S3410 to restore pixel values of the reference region to a level before quantization (hereinafter, referred to as 'filtered reference region'). May be generated). In this case, both a low pass filter (eg, a 2-tap filter, a 3-tap filter, etc.) and a CNN-based filter may be used to filter the corresponding reference region.
이 경우, 해당 참조 영역에 대한 필터링은 저대역 통과 필터(또는, CNN 기반의 필터)를 이용하여 1차 필터링한 후, CNN 기반의 필터(또는, 저대역 통과 필터)를 이용하여 2차 필터링하는 방식으로 수행될 수 있다. 이하, 저대역 통과 필터 및 CNN 기반의 필터를 이용하여 참조 영역을 필터링하는 과정을 상세하게 설명하기로 한다.In this case, the filtering for the reference region is performed by first filtering using a low pass filter (or a CNN based filter), and then second filtering using a CNN based filter (or a low pass filter). It can be done in a manner. Hereinafter, a process of filtering the reference region using the low pass filter and the CNN-based filter will be described in detail.
단계 S3432에서, 인트라 예측부는 1차적으로 저대역 통과 필터를 이용하여 참조 영역을 필터링할 수 있다. 저대역 통과 필터를 이용하여 참조 영역을 필터링하는 방법은 통상의 기술자에게 자명하므로 별도의 설명은 생략하기로 한다.In operation S3432, the intra predictor may first filter the reference region using the low pass filter. Since a method for filtering the reference region using the low pass filter is obvious to those skilled in the art, a detailed description thereof will be omitted.
단계 S3434에서, 인트라 예측부는 2차적으로 CNN 기반의 필터를 이용하여 단계 S3432에서 필터링된 참조 영역을 다시 필터링할 수 있다. In operation S3434, the intra predictor may secondarily filter the reference region filtered in operation S3432 using the CNN-based filter.
구체적으로, CNN의 입력 데이터는 현재 블록의 인트라 예측에 이용될 참조 영역으로서, 단계 S3432에서 필터링된 참조 영역으로 설정된다.Specifically, the input data of the CNN is set as a reference region to be used for intra prediction of the current block, and is filtered as a reference region in step S3432.
CNN의 필터계수는 영상 부호화 장치의 지도학습 과정을 통해 산출된 필터계수로 설정된다. 영상 부호화 장치에 의해 산출된 필터계수는 비트스트림을 통해 영상 복호화 장치로 시그널링되어, 영상 복호화 장치의 CNN 기반 필터링 과정에 이용될 수 있다. 또한, 필터계수가 특정값으로 미리 설정된 후 영상 부호화 장치와 영상 복호화 장치에 각각 저장된 경우, 별도의 시그널링 없이 각 장치에 저장된 필터계수가 CNN 기반 필터링 과정에 이용될 수 있다. 또한, 필터계수가 복수의 특정값들로 미리 설정되어 하나의 세트를 구성한 후 영상 부호화 장치와 영상 복호화 장치에 각각 저장된 경우, 영상 부호화 장치에 의해 선택된 필터계수의 선택 정보(예: 해당 세트 내 필터계수의 인덱스 정보)에 따라 설정된 해당 세트 내 특정 필터계수가 영상 복호화 장치의 CNN 기반 필터링 과정에 이용될 수 있다. 이 경우, 필터계수는 양자화 파라미터 값의 범위에 따른 복수의 특정값들로 미리 설정되어 하나의 세트를 구성할 수 있으며, 그 구체적인 일 예는 표 4를 참조하여 전술한 바와 같다.The filter coefficient of the CNN is set to the filter coefficient calculated through the supervised learning process of the image encoding apparatus. The filter coefficients calculated by the image encoding apparatus may be signaled to the image decoding apparatus through the bitstream and used in the CNN-based filtering process of the image decoding apparatus. In addition, when the filter coefficient is previously set to a specific value and stored in the image encoding apparatus and the image decoding apparatus, respectively, the filter coefficient stored in each apparatus may be used in the CNN-based filtering process without additional signaling. In addition, when the filter coefficient is preset with a plurality of specific values to form one set and then stored in the image encoding apparatus and the image decoding apparatus, selection information of the filter coefficient selected by the image encoding apparatus (for example, a filter in the set) The specific filter coefficient set in the set according to the index information of the coefficient may be used in the CNN-based filtering process of the image decoding apparatus. In this case, the filter coefficient may be previously set to a plurality of specific values according to the range of the quantization parameter value to configure one set, and a specific example thereof is as described above with reference to Table 4.
인트라 예측부는 특정 필터계수가 적용된 CNN을 실행시켜 입력 데이터에 대한 추론 과정을 수행함으로써 출력 데이터를 생성할 수 있다. 이 때, 생성된 출력 데이터는 입력 데이터로 설정된 참조 영역의 픽셀값들을 양자화(quantization) 이전 수준으로 복원시킨 필터링된 참조 영역일 수 있다.The intra predictor may generate output data by executing an inference process on input data by executing a CNN to which a specific filter coefficient is applied. In this case, the generated output data may be a filtered reference region in which pixel values of the reference region set as input data are restored to a level before quantization.
단계 S3440에서, 인트라 예측부는 참조 영역을 이용하여 현재 블록에 대한 인트라 예측을 수행할 수 있다.In operation S3440, the intra predictor may perform intra prediction on the current block by using the reference region.
이 때, 인트라 예측에 이용되는 참조 영역은 단계 S3410에서 선택된 필터링되지 않은 참조 영역일 수 있다. 또는, 인트라 예측에 이용되는 참조 영역은 단계 S3430에서 양자화 이전 수준으로 필터링된 참조 영역일 수 있다.In this case, the reference region used for intra prediction may be an unfiltered reference region selected in step S3410. Alternatively, the reference region used for intra prediction may be a reference region filtered to a level before quantization in step S3430.
필터링된 참조 영역을 이용하여 현재 블록에 대한 인트라 예측을 수행하는 경우, 인트라 예측부는 필터링된 참조 영역의 픽셀값들을 그대로 이용하여 현재 블록에 대한 인트라 예측을 수행할 수 있다. 또한 이 경우, 인트라 예측부는 필터링된 참조 영역의 픽셀값들과 해당 참조 영역의 필터링되기 전 픽셀값들에 대해 미리 설정된 가중치(weight)를 적용하여 산출한 픽셀값들(즉, 가중 평균값)을 이용하여 현재 블록에 대한 인트라 예측을 수행할 수도 있다. 여기서, 가중치는 인트라 예측 결과의 정확도 및 영상 부복호화 효율을 향상시키기 위해 실험적으로 결정된 값일 수 있다.When intra prediction is performed on the current block by using the filtered reference region, the intra predictor may perform intra prediction on the current block using the pixel values of the filtered reference region as it is. Also, in this case, the intra predictor may use pixel values (that is, weighted average values) calculated by applying preset weights to the pixel values of the filtered reference region and the pixel values before filtering of the reference region. Intra prediction may be performed on the current block. Here, the weight may be an experimentally determined value in order to improve the accuracy of the intra prediction result and the image encoding and decoding efficiency.
본 개시의 기술들을 예시한 여러 흐름도 및 관련 설명에서는, 복수의 단계가 순차적으로 수행되는 것으로 기재되어 있으나, 이는 본 발명의 실시예들의 기술 사상을 예시적으로 설명한 것에 불과한 것이다. 다시 말해, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면, 본 발명의 실시예들의 본질적인 특성에서 벗어나지 않는 범위에서, 예시된 순서를 변경하여 수행하거나 상기 복수의 단계 중 일부를 병렬적으로 수행하는 것으로 다양하게 수정 및 변경하여 적용 가능할 것이므로, 도면들에 도시된 흐름도가 반드시 시계열적인 순서로 한정되는 것은 아니다.In various flow diagrams and related descriptions illustrating techniques of this disclosure, a plurality of steps are described as being performed sequentially, but this is merely illustrative of the technical spirit of embodiments of the present invention. In other words, a person of ordinary skill in the art to which the present invention pertains may perform the altered order or perform some of the steps in parallel without departing from the essential characteristics of the embodiments of the present invention. As various modifications and changes may be made to be carried out, the flowcharts illustrated in the drawings are not necessarily limited to time-series order.
전술한 장치들의 기능이나 동작들, 및 방법들의 각 단계들은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 즉, 컴퓨터가 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 및 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같은 저장매체를 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.Each of the functions, operations, and methods of the aforementioned devices can be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. That is, computer-readable recording media include storage media such as magnetic storage media (eg, ROM, floppy disk, hard disk, etc.), and optical reading media (eg, CD-ROM, DVD, etc.). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those skilled in the art to which the present invention pertains may make various modifications and changes without departing from the essential characteristics of the present embodiment. Accordingly, the embodiments are not intended to limit the technical spirit of the present invention but to describe the present invention, and the scope of the technical spirit of the present invention is not limited by these embodiments. The protection scope of the present invention should be interpreted by the following claims, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of the present invention.
CROSS-REFERENCE TO RELATED APPLICATIONCROSS-REFERENCE TO RELATED APPLICATION
본 특허출원은, 본 명세서에 그 전체가 참고로서 포함되는, (1) 2018년 04월 06일자로 한국에 출원한 특허출원번호 제10-2018-0040588호, (2) 2018년 06월 25일자로 한국에 출원한 특허출원번호 제10-2018-0072499호, (3) 2018년 06월 25일자로 한국에 출원한 특허출원번호 제10-2018-0072506호, (4) 2018년 07월 12일자로 한국에 출원한 특허출원번호 제10-2018-0081123호, 그리고 (5) 2018년 08월 24일자로 한국에 출원한 특허출원번호 제10-2018-0099166호에 대해 우선권을 주장한다.This patent application is incorporated by reference in its entirety herein (1) Patent Application No. 10-2018-0040588, filed in Korea on April 06, 2018, and (2) June 25, 2018. Patent Application No. 10-2018-0072499, filed in Korea, (3) Patent Application No. 10-2018-0072506, filed in Korea on June 25, 2018, and (4) July 12, 2018 Claim for priority on Korean Patent Application No. 10-2018-0081123 filed in Korea, and (5) Patent Application No. 10-2018-0099166 filed in Korea on August 24, 2018.

Claims (16)

  1. CNN(Convolutional Neural Network) 기반의 필터를 이용한 영상 복호화 방법에 있어서,In the video decoding method using a CNN (Convolutional Neural Network) based filter,
    양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 제1 픽처를 상기 CNN 기반의 필터로 입력하는 단계; 및Inputting at least one of a quantization parameter map and a block division map and a first picture to the CNN-based filter; And
    제2 픽처를 출력하는 단계를 포함하고,Outputting a second picture,
    상기 양자화 파라미터 맵은 상기 제1 픽처를 구성하는 부호화 단위에 대한 정보를 나타내고, 상기 블록 분할 맵은 상기 제1 픽처를 구성하는 분할된 영역에 대한 정보를 나타냄을 특징으로 하는 영상 복호화 방법.The quantization parameter map indicates information about coding units constituting the first picture, and the block division map indicates information about divided regions constituting the first picture.
  2. 제1항에 있어서,The method of claim 1,
    상기 CNN 기반의 필터의 계수는 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 제3 픽처, 및 원본 픽처를 이용해 학습된 것임을 특징으로 하는 영상 복호화 방법.And a coefficient of the CNN-based filter is trained using at least one of a quantization parameter map and a block division map, a third picture, and an original picture.
  3. 제1항에 있어서,The method of claim 1,
    상기 양자화 파라미터 맵은 상기 제1 픽처와 동일한 해상도로 설정됨을 특징으로 하는 영상 복호화 방법.The quantization parameter map is set to the same resolution as the first picture.
  4. 제1항에 있어서,The method of claim 1,
    상기 CNN 기반의 필터로 부호화 모드를 나타내는 블록 모드 맵을 입력하는 단계를 더 포함함을 특징으로 하는 영상 복호화 방법.And inputting a block mode map indicating an encoding mode to the CNN-based filter.
  5. 제1항에 있어서,The method of claim 1,
    상기 블록 분할 맵은 블록의 분할된 경계와 상기 블록의 내부 영역을 값을 달리 표시함을 특징으로 하는 영상 복호화 방법.And the block division map displays different values of the divided boundary of the block and the internal region of the block.
  6. 제1항에 있어서,The method of claim 1,
    상기 블록 분할 맵에서 블록의 분할된 경계를 나타내는 픽셀의 개수는 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드, 업데이트 할 픽셀의 개수, 및 필터링에 참조하려는 픽셀의 개수 중 적어도 하나에 의해 결정됨을 특징으로 하는 영상 복호화 방법.The number of pixels representing the divided boundary of the block in the block division map is determined by at least one of the size of the coding block, the value of the quantization parameter, the encoding mode, the number of pixels to be updated, and the number of pixels to be referred to for filtering. An image decoding method characterized by.
  7. 제1항에 있어서,The method of claim 1,
    상기 블록 분할 맵에서 블록의 분할된 경계를 나타내는 픽셀의 값은 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드, 업데이트 할 픽셀의 개수, 및 필터링에 참조하려는 픽셀의 개수 중 적어도 하나에 의해 결정됨을 특징으로 하는 영상 복호화 방법.In the block division map, a value of a pixel representing a partitioned boundary of a block is determined by at least one of a size of a coding block, a value of a quantization parameter, an encoding mode, a number of pixels to be updated, and a number of pixels to be referred to for filtering. An image decoding method characterized by.
  8. 제1항에 있어서,The method of claim 1,
    상기 CNN 기반의 필터의 계수는 영상을 부호화하는 장치로부터 수신한 것임을 특징으로 하는 영상 복호화 방법.The coefficient of the CNN-based filter is an image decoding method, characterized in that received from the device for encoding the image.
  9. CNN(Convolutional Neural Network) 기반의 필터를 이용한 영상 복호화 장치에 있어서,In the image decoding apparatus using a CNN (Convolutional Neural Network) based filter,
    양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 제1 픽처를 입력받는 입력부;An input unit configured to receive at least one of a quantization parameter map and a block division map and a first picture;
    상기 입력부에 입력된 상기 양자화 파라미터 맵과 상기 블록 분할 맵 중 적어도 하나와 상기 제1 픽처에 상기 CNN 기반의 필터의 계수를 적용하는 필터부; 및A filter unit which applies coefficients of the CNN-based filter to at least one of the quantization parameter map and the block division map and the first picture input to the input unit; And
    상기 양자화 파라미터 맵과 상기 블록 분할 맵 중 적어도 하나와 상기 제1 픽처에 상기 CNN 기반의 필터의 계수를 적용해 제2 픽처를 출력하는 출력부를 포함하고,An output unit for outputting a second picture by applying at least one of the quantization parameter map and the block division map and coefficients of the CNN-based filter to the first picture,
    상기 양자화 파라미터 맵은 상기 제1 픽처를 구성하는 부호화 단위에 대한 정보를 나타내고, 상기 블록 분할 맵은 상기 제1 픽처를 구성하는 분할된 영역에 대한 정보를 나타냄을 특징으로 하는 영상 복호화 장치.And wherein the quantization parameter map indicates information about coding units constituting the first picture, and the block partition map indicates information about divided regions constituting the first picture.
  10. 제9항에 있어서,The method of claim 9,
    상기 CNN 기반의 필터의 계수는 양자화 파라미터 맵과 블록 분할 맵 중 적어도 하나와 제3 픽처, 및 원본 픽처를 이용해 학습된 것임을 특징으로 하는 영상 복호화 장치.The coefficient of the CNN-based filter is trained using at least one of a quantization parameter map, a block division map, a third picture, and an original picture.
  11. 제9항에 있어서,The method of claim 9,
    상기 양자화 파라미터 맵은 상기 제1 픽처와 동일한 해상도로 설정됨을 특징으로 하는 영상 복호화 장치.And the quantization parameter map is set to the same resolution as the first picture.
  12. 제9항에 있어서,The method of claim 9,
    상기 입력부는 부호화 모드를 나타내는 블록 모드 맵을 더 입력받고,The input unit further receives a block mode map indicating an encoding mode,
    상기 CNN 기반의 필터의 계수도 상기 블록 모드 맵을 추가로 입력하여 학습된 것임을 특징으로 하는 영상 복호화 장치.And a coefficient of the CNN-based filter is additionally learned by further inputting the block mode map.
  13. 제9항에 있어서,The method of claim 9,
    상기 블록 분할 맵은 블록의 분할된 경계와 상기 블록의 내부 영역의 값을 달리 표시함을 특징으로 하는 영상 복호화 장치.And the block partitioning map differently displays the divided boundary of the block and the value of the inner region of the block.
  14. 제9항에 있어서,The method of claim 9,
    상기 블록 분할 맵에서 블록의 분할된 경계를 나타내는 픽셀의 개수는 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드, 업데이트 할 픽셀의 개수, 및 필터링에 참조하려는 픽셀의 개수 중 적어도 하나에 의해 결정됨을 특징으로 하는 영상 복호화 장치.The number of pixels representing the divided boundary of the block in the block division map is determined by at least one of the size of the coding block, the value of the quantization parameter, the encoding mode, the number of pixels to be updated, and the number of pixels to be referred to for filtering. An image decoding device.
  15. 제9항에 있어서,The method of claim 9,
    상기 블록 분할 맵에서 블록의 분할된 경계를 나타내는 픽셀의 값은 부호화 블록의 크기, 양자화 파라미터의 값, 부호화 모드, 업데이트 할 픽셀의 개수, 및 필터링에 참조하려는 픽셀의 개수 중 적어도 하나에 의해 결정됨을 특징으로 하는 영상 복호화 장치.In the block division map, a value of a pixel representing a partitioned boundary of a block is determined by at least one of a size of a coding block, a value of a quantization parameter, an encoding mode, a number of pixels to be updated, and a number of pixels to be referred to for filtering. An image decoding device.
  16. 제9항에 있어서,The method of claim 9,
    상기 CNN 기반의 필터의 계수는 영상을 부호화하는 장치로부터 수신한 것임을 특징으로 하는 영상 복호화 장치.And a coefficient of the CNN-based filter is received from an apparatus for encoding an image.
PCT/KR2019/002654 2018-02-23 2019-03-07 Apparatus and method for applying artificial neural network to image encoding or decoding WO2019194425A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/064,304 US11265540B2 (en) 2018-02-23 2020-10-06 Apparatus and method for applying artificial neural network to image encoding or decoding
US17/576,000 US20220141462A1 (en) 2018-02-23 2022-01-14 Apparatus and method for applying artificial neural network to image encoding or decoding

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
KR10-2018-0040588 2018-04-06
KR20180040588 2018-04-06
KR1020180072506A KR20200000548A (en) 2018-06-25 2018-06-25 Apparatus and method for cnn-based video encoding or decoding
KR10-2018-0072499 2018-06-25
KR10-2018-0072506 2018-06-25
KR1020180072499A KR102648464B1 (en) 2018-06-25 2018-06-25 Method and apparatus for image enhancement using supervised learning
KR1020180081123A KR102668262B1 (en) 2018-07-12 Apparatus and method for cnn-based video encoding or decoding
KR10-2018-0081123 2018-07-12
KR1020180099166A KR20190117352A (en) 2018-04-06 2018-08-24 Apparatus and method for video encoding or decoding
KR10-2018-0099166 2018-08-24

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/064,304 Continuation US11265540B2 (en) 2018-02-23 2020-10-06 Apparatus and method for applying artificial neural network to image encoding or decoding

Publications (1)

Publication Number Publication Date
WO2019194425A1 true WO2019194425A1 (en) 2019-10-10

Family

ID=68101048

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/002654 WO2019194425A1 (en) 2018-02-23 2019-03-07 Apparatus and method for applying artificial neural network to image encoding or decoding

Country Status (1)

Country Link
WO (1) WO2019194425A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432208A (en) * 2020-04-01 2020-07-17 济南浪潮高新科技投资发展有限公司 Method for determining intra-frame prediction mode by using neural network
CN113052924A (en) * 2019-12-27 2021-06-29 无锡祥生医疗科技股份有限公司 Image quality compensation method for ultrasonic image coding and decoding and convolution neural network thereof
CN113259671A (en) * 2020-02-10 2021-08-13 腾讯科技(深圳)有限公司 Loop filtering method, device and equipment in video coding and decoding and storage medium
US20210329286A1 (en) * 2020-04-18 2021-10-21 Alibaba Group Holding Limited Convolutional-neutral-network based filter for video coding
WO2022067806A1 (en) * 2020-09-30 2022-04-07 Oppo广东移动通信有限公司 Video encoding and decoding methods, encoder, decoder, and storage medium
WO2022132277A1 (en) * 2020-12-16 2022-06-23 Tencent America LLC Method and apparatus for video coding
WO2023051222A1 (en) * 2021-09-28 2023-04-06 腾讯科技(深圳)有限公司 Filtering method and apparatus, encoding method and apparatus, decoding method and apparatus, computer-readable medium, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130124517A (en) * 2010-12-21 2013-11-14 인텔 코포레이션 Content adaptive impairments compensation filtering for high efficiency video coding
WO2017036370A1 (en) * 2015-09-03 2017-03-09 Mediatek Inc. Method and apparatus of neural network based processing in video coding
WO2017178827A1 (en) * 2016-04-15 2017-10-19 Magic Pony Technology Limited In-loop post filtering for video encoding and decoding
KR20180001428A (en) * 2016-06-24 2018-01-04 한국과학기술원 Encoding method and apparatus comprising convolutional neural network(cnn) based in-loop filter, and decoding method and apparatus comprising convolutional neural network(cnn) based in-loop filter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130124517A (en) * 2010-12-21 2013-11-14 인텔 코포레이션 Content adaptive impairments compensation filtering for high efficiency video coding
WO2017036370A1 (en) * 2015-09-03 2017-03-09 Mediatek Inc. Method and apparatus of neural network based processing in video coding
WO2017178827A1 (en) * 2016-04-15 2017-10-19 Magic Pony Technology Limited In-loop post filtering for video encoding and decoding
KR20180001428A (en) * 2016-06-24 2018-01-04 한국과학기술원 Encoding method and apparatus comprising convolutional neural network(cnn) based in-loop filter, and decoding method and apparatus comprising convolutional neural network(cnn) based in-loop filter

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LULU ZHOU: "Convolutional Neural Network Filter (CNNF) for intra frame", JVET-I0022 (VERSION 4), JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3, 24 January 2018 (2018-01-24), Gwangju, Korea, pages 1 - 9, XP030151131 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113052924A (en) * 2019-12-27 2021-06-29 无锡祥生医疗科技股份有限公司 Image quality compensation method for ultrasonic image coding and decoding and convolution neural network thereof
CN113259671A (en) * 2020-02-10 2021-08-13 腾讯科技(深圳)有限公司 Loop filtering method, device and equipment in video coding and decoding and storage medium
CN111432208B (en) * 2020-04-01 2022-10-04 山东浪潮科学研究院有限公司 Method for determining intra-frame prediction mode by using neural network
CN111432208A (en) * 2020-04-01 2020-07-17 济南浪潮高新科技投资发展有限公司 Method for determining intra-frame prediction mode by using neural network
US20210329286A1 (en) * 2020-04-18 2021-10-21 Alibaba Group Holding Limited Convolutional-neutral-network based filter for video coding
US11902561B2 (en) * 2020-04-18 2024-02-13 Alibaba Group Holding Limited Convolutional-neutral-network based filter for video coding
WO2022067806A1 (en) * 2020-09-30 2022-04-07 Oppo广东移动通信有限公司 Video encoding and decoding methods, encoder, decoder, and storage medium
KR20220123102A (en) * 2020-12-16 2022-09-05 텐센트 아메리카 엘엘씨 Method and apparatus for video coding
US11483591B2 (en) 2020-12-16 2022-10-25 Tencent America LLC Method and apparatus for video coding
WO2022132277A1 (en) * 2020-12-16 2022-06-23 Tencent America LLC Method and apparatus for video coding
JP7449402B2 (en) 2020-12-16 2024-03-13 テンセント・アメリカ・エルエルシー Method and apparatus for video coding
KR102647645B1 (en) * 2020-12-16 2024-03-15 텐센트 아메리카 엘엘씨 Method and apparatus for video coding
WO2023051222A1 (en) * 2021-09-28 2023-04-06 腾讯科技(深圳)有限公司 Filtering method and apparatus, encoding method and apparatus, decoding method and apparatus, computer-readable medium, and electronic device

Similar Documents

Publication Publication Date Title
WO2018097693A2 (en) Image encoding/decoding method and device, and recording medium having bitstream stored thereon
WO2018012886A1 (en) Image encoding/decoding method and recording medium therefor
WO2020076036A1 (en) Method and device for processing video signal using mpm configuration method for multiple reference lines
WO2018066867A1 (en) Method and apparatus for encoding and decoding image, and recording medium for storing bitstream
WO2018030773A1 (en) Method and apparatus for image encoding/decoding
WO2019194425A1 (en) Apparatus and method for applying artificial neural network to image encoding or decoding
WO2019182385A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
WO2017043816A1 (en) Joint inter-intra prediction mode-based image processing method and apparatus therefor
WO2019172705A1 (en) Image encoding/decoding method and apparatus using sample filtering
WO2017176030A1 (en) Method and apparatus for processing video signal
WO2019083334A1 (en) Method and device for image encoding/decoding on basis of asymmetric sub-block
WO2020111785A1 (en) Method for encoding/decoding video signal and apparatus therefor
WO2017018664A1 (en) Intra prediction mode-based image processing method and apparatus therefor
WO2018097692A2 (en) Method and apparatus for encoding/decoding image, and recording medium in which bit stream is stored
WO2017039117A1 (en) Method for encoding/decoding image and device therefor
WO2019182292A1 (en) Method and apparatus for video signal processing
WO2018135885A1 (en) Image decoding and encoding method providing transformation processing
WO2013141596A1 (en) Method and device for coding scalable video on basis of coding unit of tree structure, and method and device for decoding scalable video on basis of coding unit of tree structure
WO2017183751A1 (en) Inter prediction mode-based image processing method and device therefor
WO2020111843A1 (en) Video signal processing method and device using intra prediction filtering
WO2021015524A1 (en) Method and device for processing video signal
WO2015133838A1 (en) Method for encoding/decoding image on basis of polygon unit and apparatus therefor
WO2020139061A1 (en) Inter prediction encoding and decoding method and device
WO2020032531A1 (en) Image encoding/decoding method and device, and recording medium storing bitstream
WO2021015586A1 (en) Video signal processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19781638

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19781638

Country of ref document: EP

Kind code of ref document: A1