KR20220120436A - Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby - Google Patents

Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby Download PDF

Info

Publication number
KR20220120436A
KR20220120436A KR1020210171269A KR20210171269A KR20220120436A KR 20220120436 A KR20220120436 A KR 20220120436A KR 1020210171269 A KR1020210171269 A KR 1020210171269A KR 20210171269 A KR20210171269 A KR 20210171269A KR 20220120436 A KR20220120436 A KR 20220120436A
Authority
KR
South Korea
Prior art keywords
optical flow
current
image
feature data
previous
Prior art date
Application number
KR1020210171269A
Other languages
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
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to PCT/KR2022/002493 priority Critical patent/WO2022177383A1/en
Priority to CN202280016009.4A priority patent/CN116868566A/en
Priority to EP22756581.9A priority patent/EP4250729A4/en
Priority to US17/677,498 priority patent/US11863783B2/en
Publication of KR20220120436A publication Critical patent/KR20220120436A/en

Links

Images

Classifications

    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/002Image coding using neural networks
    • 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/186Methods 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 a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Landscapes

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

Abstract

According to one embodiment of the present disclosure is a method for restoring optical flow. The method comprises: a step of acquiring feature data on current residual optical flow from bitstream for a current image; a step of applying the feature data on the current residual optical flow to a neural network-based first decoder to acquire the current residual optical flow; a step of acquiring current prediction optical flow by using at least one of previous optical flow, feature data on the previous optical flow, and feature data on previous residual optical flow; and a step of restoring the current optical flow by using the current residual optical flow and the current prediction optical flow.

Description

AI 기반의 영상의 부호화 및 복호화 장치, 및 이에 의한 방법{ARTIFICIAL INTELLIGENCE BASED ENCODING APPARATUS AND DECODING APPARATUS OF IMAGE, AND METHOD THEREBY} AI-based video encoding and decoding apparatus, and method by the same

본 개시는 영상의 부호화 및 복호화에 관한 것이다. 보다 구체적으로, 본 개시는 영상의 인터 예측에 필요한 옵티컬 플로우를 AI(Artificial Intelligence), 예를 들어, 신경망을 이용하여 부호화 및 복호화하는 기술, 및 영상을 부호화 및 복호화하는 기술에 관한 것이다.The present disclosure relates to encoding and decoding of an image. More specifically, the present disclosure relates to a technique for encoding and decoding an optical flow required for inter prediction of an image using artificial intelligence (AI), for example, a neural network, and a technique for encoding and decoding an image.

H.264 AVC(Advanced Video Coding) 및 HEVC(High Efficiency Video Coding)와 같은 코덱에서는, 영상을 블록으로 분할하고, 각각의 블록을 인터 예측(inter prediction) 또는 인트라 예측(intraprediction)을 통해 예측 부호화 및 예측 복호화할 수 있다.In codecs such as H.264 Advanced Video Coding (AVC) and High Efficiency Video Coding (HEVC), an image is divided into blocks, and each block is subjected to predictive encoding and coding through inter prediction or intra prediction. Predictive decoding is possible.

인트라 예측은 영상 내의 공간적인 중복성을 제거하여 영상을 압축하는 방법이고, 인터 예측은 영상들 사이의 시간적인 중복성을 제거하여 영상을 압축하는 방법이다. Intra prediction is a method of compressing an image by removing spatial redundancy within an image, and inter prediction is a method of compressing an image by removing temporal redundancy between images.

인터 예측의 대표적인 예로서, 움직임 추정 부호화가 존재한다. 움직임 추정 부호화는 참조 영상을 이용해 현재 영상의 블록들을 예측한다. 소정의 평가 함수를 이용하여 현재 블록과 가장 유사한 참조 블록을 소정의 검색 범위에서 탐색할 수 있다. 현재 블록을 참조 블록에 기초하여 예측하고, 예측 결과 생성된 예측 블록을 현재 블록으로부터 감산하여 잔차 블록을 생성 및 부호화한다.As a representative example of inter prediction, motion estimation coding exists. Motion estimation coding predicts blocks of a current image using a reference image. A reference block most similar to the current block may be searched for in a predetermined search range using a predetermined evaluation function. A current block is predicted based on a reference block, and a prediction block generated as a result of prediction is subtracted from the current block to generate and encode a residual block.

참조 영상 내 참조 블록을 가리키는 움직임 벡터를 도출하기 위해, 이전에 부호화된 블록들의 움직임 벡터가 현재 블록의 예측 움직임 벡터(Prediction Motion Vector)로 이용될 수 있다. 현재 블록의 움직임 벡터와 예측 움직임 벡터 사이의 차이인 잔차 움직임 벡터(Differential Motion Vector)는 소정의 방식을 통해 디코더 측으로 시그널링된다.In order to derive a motion vector indicating a reference block in a reference image, motion vectors of previously coded blocks may be used as a prediction motion vector of the current block. A differential motion vector that is a difference between the motion vector of the current block and the predicted motion vector is signaled to the decoder side through a predetermined method.

일 실시예에 따른 영상의 부호화 및 복호화 장치, 및 이에 의한 방법은 인터 예측에 필요한 옵티컬 플로우의 시그널링을 적은 비트레이트로 가능케하는 것을 과제로 한다.An apparatus for encoding and decoding an image according to an embodiment, and a method by the same, have an object of enabling signaling of an optical flow required for inter prediction at a low bit rate.

또한, 일 실시예에 따른 영상의 부호화 및 복호화 장치, 및 이에 의한 방법은 옵티컬 플로우를 정확하게 복원하는 것을 과제로 한다.In addition, an apparatus for encoding and decoding an image according to an exemplary embodiment, and a method using the same have an object of accurately reconstructing an optical flow.

또한, 일 실시예에 따른 영상의 부호화 및 복호화 장치, 및 이에 의한 방법은 적은 비트레이트의 비트스트림으로부터 영상을 정확하게 복원하는 것을 기술적 과제로 한다.In addition, an apparatus for encoding and decoding an image, and a method therefor according to an embodiment, have a technical task of accurately reconstructing an image from a bitstream having a low bitrate.

일 실시예에 따른 AI를 이용하는 옵티컬 플로우의 복원 방법은, 현재 영상에 대한 비트스트림으로부터 현재의 잔차 옵티컬 플로우(current residual optical flow)에 대한 특징 데이터를 획득하는 단계; 신경망 기반의 제 1 디코더에 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 적용하여 상기 현재의 잔차 옵티컬 플로우를 획득하는 단계; 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터, 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득하는 단계; 및 상기 현재의 잔차 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우를 이용하여 현재 옵티컬 플로우를 복원하는 단계를 포함할 수 있다.According to an embodiment, a method of restoring an optical flow using AI includes: acquiring feature data for a current residual optical flow from a bitstream for a current image; obtaining the current residual optical flow by applying feature data for the current residual optical flow to a first decoder based on a neural network; obtaining a current predicted optical flow by using at least one of a previous optical flow, feature data for the previous optical flow, and feature data for a previous residual optical flow; and reconstructing a current optical flow using the current residual optical flow and the current predicted optical flow.

일 실시예에서, 상기 복원된 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 생성되는 현재 예측 영상과, 현재의 잔차 영상 데이터에 기반하여 상기 현재 영상이 복원될 수 있다.In an embodiment, the current image may be reconstructed based on a current prediction image generated from a previous reconstructed image based on the reconstructed current optical flow and current residual image data.

일 실시예에서, 상기 현재의 예측 옵티컬 플로우를 획득하는 단계는, 상기 이전 옵티컬 플로우를 상기 현재의 예측 옵티컬 플로우로 결정하는 단계를 포함할 수 있다.In an embodiment, obtaining the current prediction optical flow may include determining the previous optical flow as the current prediction optical flow.

일 실시예에서, 상기 현재의 예측 옵티컬 플로우를 획득하는 단계는, 상기 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 상기 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 1 예측 신경망(first prediction neural network)에 적용하여 상기 현재의 예측 옵티컬 플로우를 획득하는 단계를 포함할 수 있다.In an embodiment, the obtaining of the current prediction optical flow comprises: converting at least one of the previous optical flow, the characteristic data for the previous optical flow, and the characteristic data for the previous residual optical flow to a first prediction neural network ( first prediction neural network) to obtain the current prediction optical flow.

일 실시예에서, 상기 현재의 예측 옵티컬 플로우를 획득하는 단계는, 상기 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 상기 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 2 예측 신경망(second prediction neural network)에 적용하여 상기 현재의 예측 옵티컬 플로우와 상기 이전 옵티컬 플로우 사이의 세컨드-오더 옵티컬 플로우(second-order optical flow)를 획득하는 단계; 및 상기 이전 옵티컬 플로우를 상기 세컨드-오더 옵티컬 플로우에 따라 변경하여 상기 현재의 예측 옵티컬 플로우를 생성하는 단계를 포함할 수 있다.In an embodiment, the obtaining of the current prediction optical flow comprises: converting at least one of the previous optical flow, the characteristic data for the previous optical flow, and the characteristic data for the previous residual optical flow to a second prediction neural network ( second prediction neural network) to obtain a second-order optical flow between the current prediction optical flow and the previous optical flow; and changing the previous optical flow according to the second-order optical flow to generate the current predicted optical flow.

일 실시예에서, 상기 현재의 예측 옵티컬 플로우를 획득하는 단계는, 상기 비트스트림으로부터 상기 현재의 예측 옵티컬 플로우와 상기 이전 옵티컬 플로우 사이의 세컨드-오더 옵티컬 플로우에 대한 특징 데이터를 획득하는 단계; 상기 세컨드-오더 옵티컬 플로우에 대한 특징 데이터를 신경망 기반의 제 3 디코더에 적용하여 상기 세컨드-오더 옵티컬 플로우를 획득하는 단계; 및 상기 이전 옵티컬 플로우를 상기 세컨드-오더 옵티컬 플로우에 따라 변경하여 상기 현재의 예측 옵티컬 플로우를 생성하는 단계를 포함할 수 있다.In an embodiment, the obtaining of the current prediction optical flow includes: obtaining feature data for a second-order optical flow between the current prediction optical flow and the previous optical flow from the bitstream; obtaining the second-order optical flow by applying the feature data for the second-order optical flow to a third decoder based on a neural network; and changing the previous optical flow according to the second-order optical flow to generate the current predicted optical flow.

일 실시예에서, 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터는, 상기 비트스트림에 대한 엔트로피 복호화 및 역양자화를 통해 획득될 수 있다.In an embodiment, the feature data for the current residual optical flow may be obtained through entropy decoding and inverse quantization of the bitstream.

일 실시예에서, 상기 신경망 기반의 제 1 디코더는, 현재 훈련 영상(current training image)과 상기 현재 훈련 영상에 대응하는 현재의 복원 훈련 영상(current reconstructed training image) 사이의 차이에 대응하는 제 1 손실 정보; 및 상기 현재 훈련 영상의 현재의 잔차 옵티컬 플로우에 대한 특징 데이터의 엔트로피에 대응하는 제 2 손실 정보를 기반으로 훈련될 수 있다.In one embodiment, the first decoder based on the neural network, a first loss corresponding to a difference between a current training image and a current reconstructed training image corresponding to the current training image Information; and second loss information corresponding to entropy of feature data for the current residual optical flow of the current training image.

일 실시예에서, 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터는, 상기 현재 영상이 P(predictive) 프레임 다음의 P 프레임에 해당하는 경우에 상기 비트스트림으로부터 획득될 수 있다.In an embodiment, the feature data for the current residual optical flow may be obtained from the bitstream when the current image corresponds to a P frame following a P (predictive) frame.

일 실시예에서, 상기 현재 영상이 I(intra) 프레임 다음의 P 프레임에 해당하는 경우, 상기 옵티컬 플로우의 복원 방법은, 비트스트림으로부터 현재 옵티컬 플로우에 대한 특징 데이터를 획득하는 단계; 신경망 기반의 제 4 디코더에 상기 현재 옵티컬 플로우에 대한 특징 데이터를 적용하여 상기 현재 옵티컬 플로우를 복원하는 단계를 더 포함할 수 있다.In an embodiment, when the current image corresponds to a P frame after an I (intra) frame, the method of restoring the optical flow may include: acquiring feature data for the current optical flow from a bitstream; The method may further include applying the feature data for the current optical flow to a fourth decoder based on a neural network to restore the current optical flow.

일 실시예에 따른 AI를 이용하는 옵티컬 플로우의 복원 장치는, 현재 영상에 대한 비트스트림으로부터 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득하는 획득부; 및 신경망 기반의 제 1 디코더에 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 적용하여 상기 현재의 잔차 옵티컬 플로우를 획득하고, 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득하고, 상기 현재의 잔차 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우를 이용하여 현재 옵티컬 플로우를 복원하는 예측 복호화부를 포함할 수 있다.According to an embodiment, an apparatus for restoring an optical flow using AI includes: an acquisition unit configured to acquire feature data for a current residual optical flow from a bitstream for a current image; and applying the feature data for the current residual optical flow to the first decoder based on a neural network to obtain the current residual optical flow, and to obtain the current residual optical flow, feature data for the previous optical flow, the previous optical flow, and the previous residual optical flow and a prediction decoder that obtains a current prediction optical flow by using at least one of the feature data and reconstructs the current optical flow using the current residual optical flow and the current prediction optical flow.

일 실시예에 따른 AI를 이용하는 옵티컬 플로우의 부호화 방법은, 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나로부터 현재의 예측 옵티컬 플로우를 획득하는 단계; 현재 영상, 이전 복원 영상 및 상기 현재의 예측 옵티컬 플로우를 신경망 기반의 제 1 인코더에 적용하여 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득하는 단계; 및 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터에 대응하는 비트스트림을 생성하는 단계를 포함하되, 상기 현재의 잔차 옵티컬 플로우는, 현재 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우 사이의 차이에 대응할 수 있다.An optical flow encoding method using AI according to an embodiment includes: obtaining a current predicted optical flow from at least one of a previous optical flow, feature data for the previous optical flow, and feature data for a previous residual optical flow ; acquiring feature data for a current residual optical flow by applying a current image, a previous reconstructed image, and the current predicted optical flow to a first encoder based on a neural network; and generating a bitstream corresponding to feature data for the current residual optical flow, wherein the current residual optical flow may correspond to a difference between a current optical flow and the current prediction optical flow.

일 실시예에 따른 AI를 이용하는 옵티컬 플로우의 부호화 장치는, 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나로부터 현재의 예측 옵티컬 플로우를 획득하고, 현재 영상, 이전 복원 영상 및 상기 현재의 예측 옵티컬 플로우를 신경망 기반의 제 1 인코더에 적용하여 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득하는 예측 부호화부; 및 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터에 대응하는 비트스트림을 생성하는 생성부를 포함하되, 상기 현재의 잔차 옵티컬 플로우는, 현재 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우 사이의 차이에 대응할 수 있다.An apparatus for encoding an optical flow using AI according to an embodiment obtains a current prediction optical flow from at least one of a previous optical flow, feature data for the previous optical flow, and feature data for the previous residual optical flow, a prediction encoder for obtaining feature data for a current residual optical flow by applying a current image, a previous reconstructed image, and the current predicted optical flow to a first encoder based on a neural network; and a generator configured to generate a bitstream corresponding to feature data for the current residual optical flow, wherein the current residual optical flow may correspond to a difference between a current optical flow and the current predicted optical flow.

일 실시예에 따른 영상의 부호화 및 복호화 장치, 및 이에 의한 방법은 인터 예측에 필요한 옵티컬 플로우의 시그널링을 적은 비트레이트로 가능케할 수 있다.An apparatus for encoding and decoding an image according to an embodiment, and a method using the same, may enable signaling of an optical flow required for inter prediction at a low bit rate.

또한, 일 실시예에 따른 영상의 부호화 및 복호화 장치, 및 이에 의한 방법은 옵티컬 플로우를 정확하게 복원할 수 있다.In addition, the apparatus for encoding and decoding an image according to an embodiment, and a method using the same may accurately restore an optical flow.

또한, 일 실시예에 따른 영상의 부호화 및 복호화 장치, 및 이에 의한 방법은 적은 비트레이트의 비트스트림으로부터 영상을 정확하게 복원할 수 있다.Also, the apparatus for encoding and decoding an image according to an embodiment, and a method therefor, can accurately reconstruct an image from a bitstream having a low bitrate.

도 1은 영상에 대한 AI 기반의 인터 예측 과정을 도시하는 도면이다.
도 2는 연속하는 영상들, 및 연속하는 영상들 사이의 옵티컬 플로우를 예시하는 도면이다.
도 3은 일 실시예에 따른 영상 복호화 장치의 구성을 도시하는 도면이다.
도 4는 도 3에 도시된 획득부의 구성을 도시하는 도면이다.
도 5는 도 3에 도시된 예측 복호화부의 구성을 도시하는 도면이다.
도 6은 일 실시예에 따른 옵티컬 플로우 예측부의 구성을 도시하는 도면이다.
도 7은 다른 실시예에 따른 옵티컬 플로우 예측부의 구성을 도시하는 도면이다.
도 8은 또 다른 실시예에 따른 옵티컬 플로우 예측부의 구성을 도시하는 도면이다.
도 9는 일 실시예에 따른 옵티컬 플로우를 복원하는 방법의 순서도이다.
도 10은 예측 복호화부의 다른 구성을 도시하는 도면이다
도 11은 다른 실시예에 따른 옵티컬 플로우를 복원하는 방법의 순서도이다.
도 12는 일 실시예에 따른 영상 부호화 장치의 구성을 도시하는 도면이다.
도 13은 도 12에 도시된 예측 부호화부의 구성을 도시하는 도면이다.
도 14는 일 실시예에 따른 옵티컬 플로우 예측부의 구성을 도시하는 도면이다.
도 15는 도 12에 도시된 생성부의 구성을 도시하는 도면이다.
도 16은 일 실시예에 따른 옵티컬 플로우를 부호화하는 방법의 순서도이다.
도 17은 예측 부호화부의 다른 구성을 도시하는 도면이다.
도 18은 일 실시예에 따른 신경망의 구조를 예시하는 도면이다.
도 19는 도 18에 도시된 컨볼루션 레이어에서의 컨볼루션 연산을 설명하기 위한 도면이다.
도 20은 인터 예측 과정에서 이용되는 신경망들의 훈련 방법을 설명하기 위한 도면이다.
도 21은 인터 예측 과정에서 이용되는 신경망들에 대한 훈련 장치의 훈련 과정을 설명하기 위한 도면이다.
도 22는 인터 예측 과정에서 이용되는 신경망들에 대한 훈련 장치의 다른 훈련 과정을 설명하기 위한 도면이다.
1 is a diagram illustrating an AI-based inter prediction process for an image.
2 is a diagram illustrating successive images and an optical flow between successive images.
3 is a diagram illustrating a configuration of an image decoding apparatus according to an embodiment.
FIG. 4 is a diagram showing the configuration of the acquisition unit shown in FIG. 3 .
FIG. 5 is a diagram illustrating a configuration of a prediction decoding unit shown in FIG. 3 .
6 is a diagram illustrating a configuration of an optical flow prediction unit according to an embodiment.
7 is a diagram illustrating a configuration of an optical flow prediction unit according to another embodiment.
8 is a diagram illustrating a configuration of an optical flow prediction unit according to another embodiment.
9 is a flowchart of a method of restoring an optical flow according to an embodiment.
10 is a diagram illustrating another configuration of a predictive decoding unit.
11 is a flowchart of a method of restoring an optical flow according to another embodiment.
12 is a diagram illustrating a configuration of an image encoding apparatus according to an embodiment.
FIG. 13 is a diagram showing the configuration of the predictive encoder shown in FIG. 12 .
14 is a diagram illustrating a configuration of an optical flow prediction unit according to an embodiment.
FIG. 15 is a diagram showing the configuration of the generation unit shown in FIG. 12 .
16 is a flowchart of a method of encoding an optical flow according to an embodiment.
17 is a diagram showing another configuration of a predictive encoding unit.
18 is a diagram illustrating a structure of a neural network according to an embodiment.
FIG. 19 is a diagram for explaining a convolution operation in the convolution layer shown in FIG. 18 .
20 is a diagram for explaining a method of training neural networks used in an inter prediction process.
21 is a diagram for explaining a training process of a training apparatus for neural networks used in an inter prediction process.
22 is a diagram for explaining another training process of a training apparatus for neural networks used in an inter prediction process.

본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고, 이를 상세한 설명을 통해 상세히 설명하고자 한다. 그러나, 이는 본 개시의 실시 형태에 대해 한정하려는 것이 아니며, 본 개시는 여러 실시예들의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present disclosure can make various changes and can have various embodiments, specific embodiments are illustrated in the drawings and will be described in detail through the detailed description. However, this is not intended to limit the embodiments of the present disclosure, and it should be understood that the present disclosure includes all modifications, equivalents and substitutes included in the spirit and scope of various embodiments.

실시예를 설명함에 있어서, 관련된 공지 기술에 대한 구체적인 설명이 본 개시의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 명세서의 설명 과정에서 이용되는 숫자(예를 들어, 제 1, 제 2 등)는 하나의 구성요소를 다른 구성요소와 구분하기 위한 식별기호에 불과하다.In describing the embodiment, if it is determined that a detailed description of a related known technology may unnecessarily obscure the subject matter of the present disclosure, the detailed description thereof will be omitted. In addition, numbers (eg, first, second, etc.) used in the description process of the specification are only identifiers for distinguishing one component from other components.

또한, 본 명세서에서, 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, in this specification, when a component is referred to as "connected" or "connected" with another component, the component may be directly connected or directly connected to the other component, but in particular It should be understood that, unless there is a description to the contrary, it may be connected or connected through another element in the middle.

또한, 본 명세서에서 '~부(유닛)', '모듈' 등으로 표현되는 구성요소는 2개 이상의 구성요소가 하나의 구성요소로 합쳐지거나 또는 하나의 구성요소가 보다 세분화된 기능별로 2개 이상으로 분화될 수도 있다. 또한, 이하에서 설명할 구성요소 각각은 자신이 담당하는 주기능 이외에도 다른 구성요소가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성요소 각각이 담당하는 주기능 중 일부 기능이 다른 구성요소에 의해 전담되어 수행될 수도 있음은 물론이다.In addition, in the present specification, components expressed as '~ part (unit)', 'module', etc. are two or more components combined into one component, or two or more components for each more subdivided function. may be differentiated into In addition, each of the components to be described below may additionally perform some or all of the functions of other components in addition to the main functions they are responsible for, and some of the main functions of each component may be different It goes without saying that it may be performed exclusively by the component.

또한, 본 명세서에서, '영상(image)'은 정지영상(또는 프레임), 복수의 연속된 정지영상으로 구성된 동영상, 또는 비디오를 의미할 수 있다.Also, in this specification, an 'image' may mean a still image (or frame), a moving picture composed of a plurality of continuous still images, or a video.

또한, 본 명세서에서 '신경망(neural network)'은 뇌 신경을 모사한 인공 신경망 모델의 대표적인 예시로서, 특정 알고리즘을 사용한 인공 신경망 모델로 한정되지 않는다. 신경망은 심층 신경망(deep neural network)으로 참조될 수도 있다. Also, in the present specification, a 'neural network' is a representative example of an artificial neural network model simulating a brain nerve, and is not limited to an artificial neural network model using a specific algorithm. A neural network may also be referred to as a deep neural network.

또한, 본 명세서에서 '파라미터(parameter)'는 신경망을 이루는 각 레이어의 연산 과정에서 이용되는 값으로서 예를 들어, 입력 값을 소정 연산식에 적용할 때 이용될 수 있다. 파라미터는 훈련의 결과로 설정되는 값으로서, 필요에 따라 별도의 훈련 데이터(training data)를 통해 갱신될 수 있다.In addition, in the present specification, a 'parameter' is a value used in a calculation process of each layer constituting a neural network, and may be used, for example, when an input value is applied to a predetermined calculation expression. A parameter is a value set as a result of training, and may be updated through separate training data if necessary.

또한, 본 명세서에서 '특징 데이터'는 신경망 기반의 인코더가 입력 데이터를 처리함으로써 획득되는 데이터를 의미한다. 특징 데이터는 여러 샘플들을 포함하는 1차원 또는 2차원의 데이터일 수 있다. 특징 데이터는 잠재 표현(latent representation)으로 참조될 수도 있다. 특징 데이터는 후술하는 디코더가 출력하는 데이터에 잠재된 특징을 나타낸다.Also, in the present specification, 'feature data' refers to data obtained by processing input data by a neural network-based encoder. The feature data may be one-dimensional or two-dimensional data including several samples. Feature data may be referred to as a latent representation. The feature data represents a feature latent in data output by a decoder, which will be described later.

또한, 본 명세서에서 '현재 영상'은 현재의 처리 대상인 영상을 의미하고, '현재 옵티컬 플로우'는 현재 영상과 관련되어 획득된 옵티컬 플로우를 의미하고, '현재의 잔차 영상 데이터'는 현재 영상과 관련되어 획득된 잔차 영상 데이터를 의미한다.In addition, in this specification, 'current image' means an image that is a current processing target, 'current optical flow' means an optical flow acquired in relation to the current image, and 'current residual image data' is related to the current image It means the residual image data obtained by

또한, 본 명세서에서 '이전 영상'은 현재 영상 이전의 처리 대상인 영상을 의미하고, '이전 옵티컬 플로우'는 이전 영상과 관련되어 획득된 옵티컬 플로우를 의미하고, '이전 잔차 영상 데이터'는 이전 영상과 관련되어 획득된 잔차 영상 데이터를 의미한다.In addition, in this specification, 'previous image' refers to an image to be processed before the current image, 'previous optical flow' refers to an optical flow acquired in relation to the previous image, and 'previous residual image data' refers to the previous image and It refers to residual image data obtained in relation to each other.

또한, 본 명세서에서, '샘플'은 영상, 특징 맵 또는 특징 데이터 내 샘플링 위치에 할당된 데이터로서 처리 대상이 되는 데이터를 의미한다. 예를 들어, 샘플은 2차원의 영상 내 픽셀을 포함할 수 있다.Also, in the present specification, a 'sample' refers to data assigned to a sampling position in an image, a feature map, or feature data, and to be processed. For example, the sample may include pixels in a two-dimensional image.

도 1은 영상에 대한 AI 기반의 인터 예측 과정을 도시하는 도면이다.1 is a diagram illustrating an AI-based inter prediction process for an image.

도 1은 현재 영상(xi)의 부호화 및 복호화 과정을 도시하고 있는데, 인터 예측에서는 제 1 인코더(110), 제 2 인코더(130), 제 1 디코더(150) 및 제 2 디코더(170)가 이용된다. 제 1 인코더(110), 제 2 인코더(130), 제 1 디코더(150) 및 제 2 디코더(170)는 신경망으로 구현된다.1 illustrates a process of encoding and decoding a current image (x i ), in inter prediction, the first encoder 110 , the second encoder 130 , the first decoder 150 , and the second decoder 170 are used The first encoder 110 , the second encoder 130 , the first decoder 150 , and the second decoder 170 are implemented as a neural network.

인터 예측은 현재 영상(xi)과 이전 복원 영상(yi-1) 사이의 시간적 중복성을 이용하여 현재 영상(xi)을 부호화 및 복호화하는 과정이다. Inter prediction is a process of encoding and decoding the current image (x i ) using temporal redundancy between the current image (x i ) and the previous reconstructed image (y i-1 ).

현재 영상(xi) 내 블록들 또는 샘플들과 이전 복원 영상(yi-1) 내 참조 블록들 또는 참조 샘플들 사이의 위치 차이(또는 움직임 벡터)가 현재 영상(xi)의 부호화 및 복호화에 이용된다. 이러한 위치 차이는 옵티컬 플로우로 참조될 수 있다. 옵티컬 플로우는 영상 내 샘플들 또는 블록들에 대응하는 움직임 벡터들의 집합으로 정의될 수도 있다.A position difference (or motion vector) between blocks or samples in the current image (x i ) and reference blocks or reference samples in the previous reconstructed image (y i-1 ) is used for encoding and decoding the current image (x i ) is used for This position difference may be referred to as an optical flow. An optical flow may be defined as a set of motion vectors corresponding to samples or blocks in an image.

옵티컬 플로우는 이전 복원 영상(yi-1) 내 샘플들의 위치가 현재 영상(xi) 내에서 어떻게 변경되었는지, 또는 현재 영상(xi)의 샘플들이 이전 복원 영상(yi-1) 내 어디에 위치하는지를 나타낸다. 예를 들어, 현재 영상(xi) 내 (1, 1)에 위치한 샘플이 이전 복원 영상(yi-1) 내 (2, 1)에 위치한다면, 해당 샘플에 대한 옵티컬 플로우 또는 움직임 벡터는 (1(=2-1), 0(=1-1))으로 도출될 수 있다.The optical flow determines how the positions of samples in the previous reconstructed image (y i-1 ) are changed in the current image (x i ), or where samples of the current image (x i ) are located in the previous reconstructed image (y i-1 ). indicates where it is located. For example, if the sample located at (1, 1) in the current image (x i ) is located at (2, 1) in the previous reconstructed image (y i-1 ), the optical flow or motion vector for the sample is ( 1 (=2-1), 0 (=1-1)).

AI를 이용한 영상의 부호화 및 복호화 과정에서는 현재 영상(xi)에 대한 현재 옵티컬 플로우(gi)를 획득하기 위해 제 1 인코더(110) 및 제 1 디코더(150)를 이용한다.In the process of encoding and decoding an image using AI, the first encoder 110 and the first decoder 150 are used to obtain the current optical flow g i for the current image x i .

구체적으로, 이전 복원 영상(yi-1)과 현재 영상(xi)이 제 1 인코더(110)로 입력된다. 제 1 인코더(110)는 훈련의 결과로 설정된 파라미터에 따라 현재 영상(xi)과 이전 복원 영상(yi-1)을 처리하여 현재 옵티컬 플로우에 대한 특징 데이터(wi)를 출력한다. Specifically, the previous reconstructed image y i-1 and the current image x i are input to the first encoder 110 . The first encoder 110 processes the current image (x i ) and the previous reconstructed image (y i-1 ) according to parameters set as a result of training, and outputs feature data (w i ) for the current optical flow.

현재 옵티컬 플로우에 대한 특징 데이터(wi)는 현재 옵티컬 플로우에 잠재된 특징을 나타낸다.The feature data w i for the current optical flow represents a latent feature of the current optical flow.

현재 옵티컬 플로우에 대한 특징 데이터(wi)는 제 1 디코더(150)로 입력된다. 제 1 디코더(150)는 입력된 특징 데이터(wi)를 훈련의 결과로 설정된 파라미터에 따라 처리하여 현재 옵티컬 플로우(gi)를 출력한다.The feature data w i for the current optical flow is input to the first decoder 150 . The first decoder 150 processes the input feature data w i according to parameters set as a result of training and outputs a current optical flow g i .

이전 복원 영상(yi-1)은 현재 옵티컬 플로우(gi)에 따라 워핑(190)되고, 워핑(190)의 결과로 현재 예측 영상(x'i)이 획득된다. 워핑(190)이란, 영상 내 샘플들의 위치를 이동시키는 기하학적 변형의 한 종류이다. 이전 복원 영상(yi-1) 내 샘플들과 현재 영상(xi) 내 샘플들 사이의 상대적인 위치 관계를 나타내는 옵티컬 플로우(gi)에 따라 이전 복원 영상(yi-1)을 워핑(190)함으로써 현재 영상(xi)과 유사한 현재 예측 영상(x'i)이 획득된다. 예를 들어, 이전 복원 영상(yi-1) 내 (1, 1)에 위치한 샘플이 현재 영상(xi) 내 (2, 1)에 위치하는 샘플과 가장 유사하다면, 워핑(190)을 통해 이전 복원 영상(yi-1) 내 (1, 1)에 위치한 샘플의 위치가 (2, 1)로 변경될 수 있다.The previously reconstructed image y i-1 is warped 190 according to the current optical flow g i , and as a result of the warping 190 , the current prediction image x' i is obtained. The warping 190 is a type of geometric deformation that moves the positions of samples in an image. Warping (190) the previous reconstructed image (y i-1 ) according to the optical flow (g i ) indicating the relative positional relationship between samples in the previous reconstructed image (y i-1 ) and samples in the current image (x i ) ), a current prediction image (x' i ) similar to the current image (x i ) is obtained. For example, if the sample located at (1, 1) in the previous reconstructed image (y i-1 ) is most similar to the sample located at (2, 1) in the current image (x i ), warping 190 is performed. The position of the sample located at (1, 1) in the previous reconstructed image y i-1 may be changed to (2, 1).

이전 복원 영상(yi-1)으로부터 생성된 현재 예측 영상(x'i)은 현재 영상(xi) 자체가 아니므로, 현재 예측 영상(x'i)과 현재 영상(xi) 사이의 차이에 대응하는 현재의 잔차 영상 데이터(ri)가 획득될 수 있다. Since the current prediction image (x' i ) generated from the previously restored image (y i-1 ) is not the current image (x i ) itself, the difference between the current prediction image (x' i ) and the current image (x i ) Current residual image data r i corresponding to may be obtained.

일 예로, 현재 영상(xi) 내 샘플 값들로부터 현재 예측 영상(x'i) 내 샘플 값들을 차감함으로써 현재의 잔차 영상 데이터(ri)가 획득될 수 있다.As an example, current residual image data r i may be obtained by subtracting sample values in the current prediction image x' i from sample values in the current image x i .

현재의 잔차 영상 데이터(ri)는 제 2 인코더(130)로 입력된다. 제 2 인코더(130)는 훈련의 결과로 설정된 파라미터에 따라 현재의 잔차 영상 데이터(ri)를 처리하여 현재의 잔차 영상 데이터에 대한 특징 데이터(vi)를 출력한다.The current residual image data r i is input to the second encoder 130 . The second encoder 130 processes the current residual image data (r i ) according to parameters set as a result of training and outputs feature data ( vi ) for the current residual image data.

현재의 잔차 영상 데이터에 대한 특징 데이터(vi)는 제 2 디코더(170)로 입력된다. 제 2 디코더(170)는 입력된 특징 데이터(vi)를 훈련의 결과로 설정된 파라미터에 따라 처리하여 현재의 잔차 영상 데이터(r'i)를 출력한다.The feature data ( vi ) for the current residual image data is input to the second decoder 170 . The second decoder 170 processes the input feature data v i according to parameters set as a result of training and outputs current residual image data r' i .

이전 복원 영상(yi-1)에 대한 워핑(190)을 통해 생성된 현재 예측 영상(x'i)과 현재의 잔차 영상 데이터(r'i)의 결합을 통해 현재 복원 영상(yi)이 획득된다.The current reconstructed image (y i ) is obtained by combining the current prediction image (x' i ) generated through the warping 190 on the previous reconstructed image (y i-1 ) and the current residual image data (r' i ). is obtained

도 1에 도시된 인터 예측 과정에서는, 제 1 인코더(110)를 통해 획득된 현재 옵티컬 플로우에 대한 특징 데이터(wi)가 제 1 디코더(150)로 입력된다. In the inter prediction process shown in FIG. 1 , the feature data w i for the current optical flow obtained through the first encoder 110 is input to the first decoder 150 .

현재 영상(xi)의 부호화 및 복호화 과정을 부호화 장치의 관점에서 보면, 부호화 장치는 현재 옵티컬 플로우에 대한 특징 데이터(wi)를 복호화 장치로 시그널링하기 위해 현재 옵티컬 플로우에 대한 특징 데이터(wi)에 대응하는 비트스트림을 생성하여야 한다. 그러나, 현재 영상(xi)과 이전 영상(xi-1)에 포함된 오브젝트의 움직임이 큰 경우, 현재 옵티컬 플로우에 포함된 샘플 값들의 크기가 크므로, 현재 옵티컬 플로우에 잠재된 특성을 나타내는 특징 데이터(wi)에 기반하여 생성된 비트스트림의 비트레이트 역시 커질 수 있다.When the encoding and decoding process of the current image (x i ) is viewed from the viewpoint of the encoding apparatus, the encoding apparatus signals the characteristic data (w i ) of the current optical flow to the decoding apparatus. ) to generate the corresponding bitstream. However, when the motion of the object included in the current image (x i ) and the previous image (x i-1 ) is large, the size of the sample values included in the current optical flow is large. The bit rate of the bitstream generated based on the feature data w i may also be increased.

이하에서 설명되는 실시예들에서는, 이전 옵티컬 플로우를 이용하여, 현재 옵티컬 플로우에 대한 부호화 결과로 생성되는 비트스트림의 크기를 감소시킨다. 이전 옵티컬 플로우와 현재 옵티컬 플로우 사이의 연관성에 대해서는 도 2를 참조하여 설명한다.In the embodiments described below, the size of a bitstream generated as a result of encoding for the current optical flow is reduced by using the previous optical flow. The correlation between the previous optical flow and the current optical flow will be described with reference to FIG. 2 .

도 2를 참조하면, 현재 영상(23)과 제 1 이전 영상(22) 사이에서 제 1 옵티컬 플로우(25)가 획득되고, 제 1 이전 영상(22)과 제 2 이전 영상(21) 사이에서 제 2 옵티컬 플로우(24)가 획득된다. Referring to FIG. 2 , the first optical flow 25 is obtained between the current image 23 and the first previous image 22 , and the second optical flow 25 is obtained between the first previous image 22 and the second previous image 21 . 2 optical flows 24 are obtained.

도 2에 도시된 제 1 옵티컬 플로우(25) 및 제 2 옵티컬 플로우(24)는 옵티컬 플로우에 포함된 샘플들의 크기 또는 움직임 벡터들의 크기(magnitude)에 따라 시각화된 것이다. The first optical flow 25 and the second optical flow 24 shown in FIG. 2 are visualized according to magnitudes of samples included in the optical flow or magnitudes of motion vectors.

제 1 옵티컬 플로우(25)는 현재 옵티컬 플로우로 참조되고, 제 2 옵티컬 플로우(24)는 이전 옵티컬 플로우로 참조될 수 있다.The first optical flow 25 may be referred to as a current optical flow, and the second optical flow 24 may be referred to as a previous optical flow.

도 2를 참조하면, 제 1 옵티컬 플로우(25)와 제 2 옵티컬 플로우(24) 사이의 유사성을 확인할 수 있다. 예를 들어, 제 1 옵티컬 플로우(25) 내 A 영역과 제 2 옵티컬 플로우(24) 내 B 영역에서 샘플 값들의 유사성을 볼 수 있다.Referring to FIG. 2 , the similarity between the first optical flow 25 and the second optical flow 24 may be confirmed. For example, it is possible to see the similarity of sample values in area A in the first optical flow 25 and area B in the second optical flow 24 .

시간적으로 연속하는 영상들 내 오브젝트는 선형적으로 움직이는 경향이 있으므로, 제 1 옵티컬 플로우(25)와 제 2 옵티컬 플로우(24) 사이의 유사성을 예측할 수 있다.Since objects in temporally continuous images tend to move linearly, the similarity between the first optical flow 25 and the second optical flow 24 can be predicted.

즉, 현재 영상(23)에 대한 현재 옵티컬 플로우(제 1 옵티컬 플로우(25))를 부호화하는데 있어, 이전 옵티컬 플로우(제 2 옵티컬 플로우(24))를 이용하는 경우, 현재 옵티컬 플로우에 대한 부호화 결과로 생성되는 비트스트림의 크기가 작아질 수 있다.That is, when the previous optical flow (the second optical flow 24) is used to encode the current optical flow (the first optical flow 25) for the current image 23, the encoding result for the current optical flow is used. The size of the generated bitstream may be reduced.

도 3은 일 실시예에 따른 영상 복호화 장치(300)의 구성을 도시하는 도면이다.3 is a diagram illustrating a configuration of an image decoding apparatus 300 according to an exemplary embodiment.

도 3을 참조하면, 일 실시예에 따른 영상 복호화 장치(300)는 획득부(310) 및 예측 복호화부(330)를 포함한다.Referring to FIG. 3 , the image decoding apparatus 300 according to an embodiment includes an acquirer 310 and a prediction decoder 330 .

획득부(310) 및 예측 복호화부(330)는 프로세서로 구현될 수 있고, 획득부(310) 및 예측 복호화부(330)는 메모리(미도시)에 저장된 인스트럭션에 따라 동작할 수 있다.The acquisition unit 310 and the prediction decoding unit 330 may be implemented as a processor, and the acquisition unit 310 and the prediction decoding unit 330 may operate according to instructions stored in a memory (not shown).

도 3은 획득부(310) 및 예측 복호화부(330)를 개별적으로 도시하고 있으나, 획득부(310) 및 예측 복호화부(330)는 하나의 프로세서를 통해 구현될 수 있다. 이 경우, 획득부(310) 및 예측 복호화부(330)는 전용 프로세서로 구현될 수도 있고, AP(application processor), CPU(central processing unit) 또는 GPU(graphic processing unit)와 같은 범용 프로세서와 소프트웨어의 조합을 통해 구현될 수도 있다. 또한, 전용 프로세서의 경우, 본 개시의 실시예를 구현하기 위한 메모리를 포함하거나, 외부 메모리를 이용하기 위한 메모리 처리부를 포함할 수 있다. Although FIG. 3 shows the acquisition unit 310 and the prediction decoding unit 330 separately, the acquisition unit 310 and the prediction decoding unit 330 may be implemented through one processor. In this case, the acquisition unit 310 and the prediction decoding unit 330 may be implemented as a dedicated processor, and a general-purpose processor such as an application processor (AP), a central processing unit (CPU), or a graphic processing unit (GPU) and software. It may be implemented through a combination. In addition, the dedicated processor may include a memory for implementing an embodiment of the present disclosure or a memory processing unit for using an external memory.

획득부(310) 및 예측 복호화부(330)는 복수의 프로세서로 구성될 수도 있다. 이 경우, 전용 프로세서들의 조합으로 구현될 수도 있고, AP, CPU, 또는 GPU와 같은 다수의 범용 프로세서들과 소프트웨어의 조합을 통해 구현될 수도 있다.The acquisition unit 310 and the prediction decoding unit 330 may include a plurality of processors. In this case, it may be implemented as a combination of dedicated processors, or may be implemented through a combination of software and a plurality of general-purpose processors such as an AP, CPU, or GPU.

획득부(310)는 현재 영상에 대한 부호화 결과를 포함하는 비트스트림을 획득한다. The acquisition unit 310 acquires a bitstream including an encoding result of the current image.

획득부(310)는 후술하는 영상 부호화 장치(1200)로부터 네트워크를 통해 비트스트림을 수신할 수 있다. 일 실시예에서, 획득부(310)는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium) 등을 포함하는 데이터 저장 매체로부터 비트스트림을 획득할 수도 있다.The acquisition unit 310 may receive a bitstream from an image encoding apparatus 1200, which will be described later, through a network. In one embodiment, the acquisition unit 310 is a hard disk, a magnetic medium such as a floppy disk and magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floppy disk (floptical disk) -optical medium), etc., may be obtained from a data storage medium including a bitstream.

획득부(310)는 비트스트림을 파싱하여 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터를 획득한다. The obtainer 310 parses the bitstream to obtain feature data of the current residual optical flow and feature data of the current residual image data.

현재의 잔차 옵티컬 플로우는 이전 옵티컬 플로우로부터 예측된 현재의 예측 옵티컬 플로우와 현재 옵티컬 플로우 사이의 차이에 대응하고, 현재의 잔차 영상 데이터는 이전 복원 영상으로부터 예측된 현재 예측 영상과 현재 영상 사이의 차이에 대응한다.The current residual optical flow corresponds to the difference between the current predicted optical flow and the current optical flow predicted from the previous optical flow, and the current residual image data is based on the difference between the current predicted image and the current image predicted from the previous reconstructed image. respond

현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터는 신경망 기반의 인코더에 의한 처리 결과로 획득된 것일 수 있다.The feature data of the current residual optical flow and the feature data of the current residual image data may be obtained as a result of processing by a neural network-based encoder.

일 실시예에서, 획득부(310)는 현재의 잔차 옵티컬 플로우의 특징 데이터에 대응하는 제 1 비트스트림과 현재의 잔차 영상 데이터의 특징 데이터에 대응하는 제 2 비트스트림을 획득하고, 제 1 비트스트림 및 제 2 비트스트림을 각각 파싱하여 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 획득할 수도 있다.In an embodiment, the obtaining unit 310 obtains a first bitstream corresponding to the feature data of the current residual optical flow and a second bitstream corresponding to the feature data of the current residual image data, and the first bitstream and parsing the second bitstream, respectively, to obtain feature data of the current residual optical flow and feature data of the current residual image data.

현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터는 예측 복호화부(330)로 전달되고, 예측 복호화부(330)는 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터를 이용하여 현재 영상에 대응하는 현재 복원 영상을 획득한다.The feature data of the current residual optical flow and the feature data of the current residual image data are transmitted to the predictive decoding unit 330 , and the predictive decoding unit 330 is configured to convert the feature data of the current residual optical flow and the current residual image data. A current reconstructed image corresponding to the current image is obtained using the feature data.

구현예에 따라, 비트스트림에 현재의 잔차 영상 데이터의 특징 데이터가 포함되어 있지 않을 수도 있다. 획득부(310)는 비트스트림으로부터 현재의 잔차 옵티컬 플로우의 특징 데이터를 획득하고, 예측 복호화부(330)는 현재 옵티컬 플로우를 복원할 수 있다. 이 경우, 영상 복호화 장치(300)는 옵티컬 플로우 복호화 장치로 참조될 수 있다. Depending on the implementation, the bitstream may not include feature data of the current residual image data. The obtainer 310 may obtain feature data of the current residual optical flow from the bitstream, and the predictive decoder 330 may reconstruct the current optical flow. In this case, the image decoding apparatus 300 may be referred to as an optical flow decoding apparatus.

예측 복호화부(330)에 의해 복원된 현재 옵티컬 플로우는 다른 장치로 전달되고, 다른 장치에 의해 현재 옵티컬 플로우에 기반하여 현재 복원 영상이 생성될 수 있다. The current optical flow reconstructed by the predictive decoder 330 may be transmitted to another device, and a current reconstructed image may be generated by the other device based on the current optical flow.

구체적으로, 다른 장치는 비트스트림으로부터 획득되는 현재의 잔차 영상 데이터와, 현재 옵티컬 플로우에 따라 이전 복원 영상으로부터 생성되는 현재 예측 영상을 결합하여 현재 복원 영상을 생성할 수 있다.Specifically, the other device may generate the current reconstructed image by combining the current residual image data obtained from the bitstream and the current prediction image generated from the previous reconstructed image according to the current optical flow.

이하에서는, 도 4 및 도 5를 참조하여, 획득부(310) 및 예측 복호화부(330)의 동작에 대해 상세히 설명한다.Hereinafter, operations of the acquisition unit 310 and the prediction decoding unit 330 will be described in detail with reference to FIGS. 4 and 5 .

도 4는 도 3에 도시된 획득부(310)의 구성을 도시하는 도면이다.FIG. 4 is a diagram illustrating the configuration of the acquisition unit 310 shown in FIG. 3 .

도 4를 참조하면, 획득부(310)는 엔트로피 복호화부(311) 및 역양자화부(313)를 포함한다.Referring to FIG. 4 , the acquisition unit 310 includes an entropy decoding unit 311 and an inverse quantization unit 313 .

엔트로피 복호화부(311)는 비트스트림에 포함된 빈(bin)들을 엔트로피 코딩하여 현재의 잔차 옵티컬 플로우의 양자화된 특징 데이터 및 현재의 잔차 영상 데이터의 양자화된 특징 데이터를 획득한다.The entropy decoder 311 entropy-codes bins included in the bitstream to obtain quantized feature data of the current residual optical flow and quantized feature data of the current residual image data.

역양자화부(313)는 현재의 잔차 옵티컬 플로우의 양자화된 특징 데이터 및 현재의 잔차 영상 데이터의 양자화된 특징 데이터를 각각 역양자화하여 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 획득한다.The inverse quantizer 313 inversely quantizes the quantized feature data of the current residual optical flow and the quantized feature data of the current residual image data, respectively, to obtain the feature data of the current residual optical flow and the feature data of the current residual image data. to acquire

구현예에 따라, 획득부(310)는 역변환부를 더 포함할 수 있다. 역변환부는 역양자화부(313)로부터 출력되는 특징 데이터들을 주파수 도메인으로부터 공간 도메인으로 역변환한다. 후술하는 영상 부호화 장치(1200)가 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 공간 도메인으로부터 주파수 도메인으로 변환하는 경우, 역변환부는 역양자화부(313)로부터 출력되는 특징 데이터들을 주파수 도메인에서 공간 도메인으로 역변환할 수 있다.According to an embodiment, the obtaining unit 310 may further include an inverse transform unit. The inverse transform unit inversely transforms the feature data output from the inverse quantization unit 313 from the frequency domain to the spatial domain. When the image encoding apparatus 1200, which will be described later, transforms the feature data of the current residual optical flow and the feature data of the current residual image data from the spatial domain to the frequency domain, the inverse transform unit is the feature data output from the inverse quantizer 313 . can be inversely transformed from the frequency domain to the spatial domain.

또한, 구현예에 따라, 획득부(310)는 역양자화부(313)를 포함하지 않을 수도 있다. 즉, 엔트로피 복호화부(311)에 의한 처리를 통해 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터가 획득될 수 있다.Also, depending on the implementation, the acquisition unit 310 may not include the inverse quantization unit 313 . That is, feature data of the current residual optical flow and feature data of the current residual image data may be obtained through processing by the entropy decoder 311 .

또한, 구현예에 따라, 획득부(310)는 비트스트림에 포함된 빈들에 대한 역이진화만을 수행하여 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터를 획득할 수도 있다. 이는, 영상 부호화 장치(1200)가 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 이진화하여 비트스트림을 생성한 경우, 다시 말하면, 영상 부호화 장치(1200)가 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터에 대해 엔트로피 부호화, 변환 및 양자화를 적용하지 않는 경우를 위한 것이다.Also, according to an embodiment, the obtainer 310 may acquire feature data of the current residual optical flow and feature data of the current residual image data by performing only inverse binarization on bins included in the bitstream. This is when the image encoding apparatus 1200 generates a bitstream by binarizing the feature data of the current residual optical flow and the feature data of the current residual image data, that is, when the image encoding apparatus 1200 generates the current residual optical flow. This is for a case in which entropy encoding, transformation, and quantization are not applied to the feature data of the flow and the feature data of the current residual image data.

다음으로, 도 5는 도 3에 도시된 예측 복호화부(330)의 구성을 도시하는 도면이다.Next, FIG. 5 is a diagram illustrating the configuration of the prediction decoding unit 330 shown in FIG. 3 .

도 5를 참조하면, 예측 복호화부(330)는 제 1 디코더(331), 제 2 디코더(333), 옵티컬 플로우 예측부(334), 제 1 결합부(336), 움직임 보상부(335) 및 제 2 결합부(337)를 포함할 수 있다.Referring to FIG. 5 , the predictive decoder 330 includes a first decoder 331 , a second decoder 333 , an optical flow predictor 334 , a first combiner 336 , a motion compensator 335 and A second coupling part 337 may be included.

제 1 디코더(331) 및 제 2 디코더(333)는 메모리에 저장될 수 있다. 일 실시예에서, 제 1 디코더(331) 및 제 2 디코더(333)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The first decoder 331 and the second decoder 333 may be stored in a memory. In one embodiment, the first decoder 331 and the second decoder 333 may be implemented as at least one dedicated processor for AI.

획득부(310)에 의해 출력된 현재의 잔차 옵티컬 플로우의 특징 데이터는 제 1 디코더(331)로 입력되고, 현재의 잔차 영상 데이터의 특징 데이터는 제 2 디코더(333)로 입력된다.The feature data of the current residual optical flow output by the acquirer 310 is input to the first decoder 331 , and feature data of the current residual image data is input to the second decoder 333 .

구현예에 따라, 현재의 잔차 영상 데이터의 정확한 복원을 위해, 현재의 잔차 옵티컬 플로우의 특징 데이터 또는 현재 옵티컬 플로우의 특징 데이터가 현재의 잔차 영상 데이터의 특징 데이터에 연접(concatenation)된 후 제 2 디코더(333)로 입력될 수도 있다. 여기서, 연접(concatenation)이란, 두 개 이상의 특징 데이터를 채널 방향으로 결합하는 처리를 의미할 수 있다.According to an embodiment, in order to accurately reconstruct the current residual image data, after the feature data of the current residual optical flow or the feature data of the current optical flow is concatenated with the feature data of the current residual image data, the second decoder (333) may also be input. Here, concatenation may refer to a process of combining two or more feature data in a channel direction.

제 1 디코더(331)는 훈련을 통해 설정된 파라미터에 따라 현재의 잔차 옵티컬 플로우의 특징 데이터를 처리하여 현재의 잔차 옵티컬 플로우를 획득한다. 현재의 잔차 옵티컬 플로우는 1차원 또는 2차원의 데이터로서, 복수의 샘플들로 이루어질 수 있다.The first decoder 331 obtains the current residual optical flow by processing the feature data of the current residual optical flow according to parameters set through training. The current residual optical flow is one-dimensional or two-dimensional data, and may consist of a plurality of samples.

제 2 디코더(333)는 훈련을 통해 설정된 파라미터에 따라 현재의 잔차 영상 데이터의 특징 데이터를 처리하여 현재의 잔차 영상 데이터를 획득한다. 현재의 잔차 영상 데이터는 1차원 또는 2차원의 데이터로서, 복수의 샘플들로 이루어질 수 있다.The second decoder 333 obtains current residual image data by processing the feature data of the current residual image data according to parameters set through training. The current residual image data is one-dimensional or two-dimensional data, and may include a plurality of samples.

옵티컬 플로우 예측부(334)는 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득한다. The optical flow prediction unit 334 obtains the current predicted optical flow by using at least one of the previous optical flow, the characteristic data of the previous optical flow, and the characteristic data of the previous residual optical flow.

현재의 예측 옵티컬 플로우는 1차원 또는 2차원의 데이터로서, 복수의 샘플들로 이루어질 수 있다.The current prediction optical flow is one-dimensional or two-dimensional data, and may consist of a plurality of samples.

일 실시예에서, 옵티컬 플로우 예측부(334)는 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 결정할 수 있다. In an embodiment, the optical flow prediction unit 334 may determine the previous optical flow as the current predicted optical flow.

도 2를 참조하여 설명한 바와 같이, 연속하는 영상 내 오브젝트의 선형적인 움직임으로 인해, 이전 옵티컬 플로우가 현재 옵티컬 플로우에 매우 유사할 가능성이 높다. 따라서, 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 결정하는 경우, 현재의 잔차 옵티컬 플로우의 샘플 값들의 크기 및 현재의 잔차 옵티컬 플로우의 특징 데이터의 샘플 값들의 크기가 작아질 수 있다.As described with reference to FIG. 2 , due to the linear motion of an object in successive images, it is highly likely that the previous optical flow is very similar to the current optical flow. Accordingly, when the previous optical flow is determined as the current prediction optical flow, the sizes of the sample values of the current residual optical flow and the sample values of the feature data of the current residual optical flow may be reduced.

옵티컬 플로우 예측부(334)에 의해 획득된 현재의 예측 옵티컬 플로우 및 제 1 디코더(331)를 통해 획득된 현재의 잔차 옵티컬 플로우는 제 1 결합부(336)로 제공된다.The current prediction optical flow obtained by the optical flow prediction unit 334 and the current residual optical flow obtained through the first decoder 331 are provided to the first combining unit 336 .

제 1 결합부(336)는 현재의 예측 옵티컬 플로우와 현재의 잔차 옵티컬 플로우를 결합하여 현재 옵티컬 플로우를 복원한다. 제 1 결합부(336)는 현재의 예측 옵티컬 플로우의 샘플 값들과 현재의 잔차 옵티컬 플로우의 샘플 값들을 합하여 현재 옵티컬 플로우를 복원할 수 있다.The first combiner 336 reconstructs the current optical flow by combining the current prediction optical flow and the current residual optical flow. The first combiner 336 may reconstruct the current optical flow by summing sample values of the current prediction optical flow and sample values of the current residual optical flow.

움직임 보상부(335)는 이전 복원 영상을 현재 옵티컬 플로우에 따라 처리하여 현재 영상과 유사한 현재 예측 영상을 생성한다. 이전 복원 영상은 현재 영상의 처리 전에 처리 대상이었던 이전 영상에 대한 복호화를 통해 복원된 영상이다.The motion compensator 335 generates a current prediction image similar to the current image by processing the previously reconstructed image according to the current optical flow. The previously reconstructed image is an image reconstructed through decoding on a previous image that was a processing target before the current image is processed.

움직임 보상부(335)는 현재 예측 영상의 생성을 위해 이전 복원 영상을 현재 옵티컬 플로우에 따라 워핑할 수 있다. 현재 예측 영상의 생성을 위한 워핑은 하나의 예시이고, 움직임 보상부(335)는 현재 영상과 유사한 현재 예측 영상을 생성하기 위해, 이전 복원 영상 내 샘플들의 위치를 변경하는 다양한 영상 처리를 이전 복원 영상에 대해 적용할 수 있다.The motion compensator 335 may warp the previously reconstructed image according to the current optical flow to generate the current prediction image. Warping for generation of a current prediction image is an example, and the motion compensator 335 performs various image processing for changing positions of samples in a previously restored image in order to generate a current prediction image similar to the current image. can be applied to

움직임 보상부(335)에 의해 생성된 현재 예측 영상은 제 2 결합부(337)로 제공된다. The current prediction image generated by the motion compensator 335 is provided to the second combiner 337 .

제 2 결합부(337)는 현재 예측 영상과 현재의 잔차 영상 데이터를 결합하여 현재 복원 영상을 획득한다. 일 예에서, 제 2 결합부(337)는 현재 예측 영상의 샘플 값들과 현재의 잔차 영상 데이터의 샘플 값들을 합산 값들을 포함하는 현재 복원 영상을 획득할 수 있다. The second combiner 337 obtains a current reconstructed image by combining the current prediction image and the current residual image data. In an example, the second combiner 337 may obtain a current reconstructed image including sum values of sample values of the current prediction image and sample values of the current residual image data.

현재 복원 영상 및 현재 옵티컬 플로우는 다음 영상의 복호화 과정에서 이용될 수 있다.The current reconstructed image and the current optical flow may be used in the decoding process of the next image.

구현예에 따라, 예측 복호화부(330)는 현재의 잔차 옵티컬 플로우의 특징 데이터로부터 현재 옵티컬 플로우를 복원하고, 복원된 현재 옵티컬 플로우를 다른 장치로 제공할 수도 있다. 이 경우, 제 2 디코더(333), 움직임 보상부(335) 및 제 2 결합부(337)는 예측 복호화부(330)에 포함되지 않을 수 있다.According to an embodiment, the prediction decoding unit 330 may reconstruct the current optical flow from feature data of the current residual optical flow and provide the reconstructed current optical flow to another device. In this case, the second decoder 333 , the motion compensator 335 , and the second combiner 337 may not be included in the prediction decoder 330 .

구현예에 따라, 비트스트림로부터 현재의 잔차 영상 데이터가 획득 가능한 경우, 제 2 디코더(333)는 예측 복호화부(330)에 포함되지 않을 수도 있다. 즉, 예측 복호화부(330)는 획득부(310)가 비트스트림으로부터 획득한 현재의 잔차 영상 데이터를 현재 예측 영상에 결합하여 현재 복원 영상을 생성할 수 있다.According to an embodiment, when the current residual image data can be obtained from the bitstream, the second decoder 333 may not be included in the prediction decoder 330 . That is, the prediction decoding unit 330 may generate a current reconstructed image by combining the current residual image data obtained by the obtaining unit 310 from the bitstream with the current prediction image.

본 개시의 일 실시예에 따르면, 현재 옵티컬 플로우에 비해 작은 크기의 샘플들을 포함하는 현재의 잔차 옵티컬 플로우에 기초하여 비트스트림이 생성되므로, 현재 옵티컬 플로우로부터 비트스트림이 생성되는 경우에 비해 낮은 비트레이트의 달성이 가능하다.According to an embodiment of the present disclosure, since the bitstream is generated based on the current residual optical flow including samples having a size smaller than that of the current optical flow, the bitrate is lower than when the bitstream is generated from the current optical flow. is possible to achieve

앞서, 옵티컬 플로우 예측부(334)가 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 결정하는 실시예에 대해 설명하였는데, 이하에서는, 도 6 내지 도 8을 참조하여 옵티컬 플로우 예측부(334)의 다른 실시예에 따른 동작을 설명한다.Previously, an embodiment in which the optical flow prediction unit 334 determines the previous optical flow as the current prediction optical flow has been described. Hereinafter, another embodiment of the optical flow prediction unit 334 with reference to FIGS. 6 to 8 is described. An operation according to an example will be described.

도 6은 일 실시예에 따른 옵티컬 플로우 예측부(600)의 구성을 도시하는 도면이다.6 is a diagram illustrating a configuration of an optical flow prediction unit 600 according to an embodiment.

도 6을 참조하면, 옵티컬 플로우 예측부(600)는 제 1 예측 신경망(first prediction neural network)(610)를 포함한다. 제 1 예측 신경망(610)은 메모리에 저장될 수 있다. 일 실시예에서, 제 1 예측 신경망(610)은 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.Referring to FIG. 6 , the optical flow prediction unit 600 includes a first prediction neural network 610 . The first prediction neural network 610 may be stored in a memory. In an embodiment, the first prediction neural network 610 may be implemented as at least one dedicated processor for AI.

현재의 예측 옵티컬 플로우의 획득을 위해 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나가 제 1 예측 신경망(610)으로 입력된다. At least one of the previous optical flow, feature data of the previous optical flow, and feature data of the previous residual optical flow is input to the first prediction neural network 610 to obtain the current predicted optical flow.

이전 옵티컬 플로우의 특징 데이터는 이전 영상의 복원 과정 중에 이용되는 이전 옵티컬 플로우에 잠재된 특징을 나타낸다. The feature data of the previous optical flow represents the latent features of the previous optical flow used during the restoration process of the previous image.

일 실시예에서, 이전 옵티컬 플로우의 특징 데이터는 이전 영상이 I(intra) 프레임 다음의 P(predictive) 프레임인 경우에 이전 옵티컬 플로우의 복원 과정에서 획득될 수 있다. I 프레임 및 P 프레임에 대해서는 후술한다.In an embodiment, when the previous image is a P (predictive) frame after the I (intra) frame, the feature data of the previous optical flow may be acquired during the restoration process of the previous optical flow. The I frame and the P frame will be described later.

다른 실시예에서, 예측 복호화부(330)는 이전 옵티컬 플로우의 복원 후, 복원된 이전 옵티컬 플로우를 신경망에 적용하여 이전 옵티컬 플로우의 특징 데이터를 획득할 수도 있다.In another embodiment, the predictive decoder 330 may obtain feature data of the previous optical flow by applying the restored previous optical flow to the neural network after the previous optical flow is restored.

제 1 예측 신경망(610)은 훈련을 통해 설정된 파라미터를 통해 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나를 처리하여 현재의 예측 옵티컬 플로우를 획득한다.The first prediction neural network 610 processes at least one of the characteristic data of the previous optical flow, the characteristic data of the previous optical flow, and the characteristic data of the previous residual optical flow through the parameters set through training to obtain the current prediction optical flow.

도 5를 참조하여 설명한 것과 같이, 현재의 예측 옵티컬 플로우와 현재의 잔차 옵티컬 플로우가 결합됨으로써, 현재 예측 영상을 생성하는데 이용되는 현재 옵티컬 플로우가 획득된다. 도 20 및 도 21을 참조하여 후술하는 바와 같이, 제 1 예측 신경망(610)은 손실 정보의 공유를 통해, 다시 말하면 공통의 목적을 가지고 제 1 인코더(1211), 제 2 인코더(1215), 제 1 디코더(331) 및 제 2 디코더(333)와 함께 훈련된다. As described with reference to FIG. 5 , by combining the current prediction optical flow and the current residual optical flow, the current optical flow used to generate the current prediction image is obtained. As will be described later with reference to FIGS. 20 and 21 , the first prediction neural network 610 includes the first encoder 1211 , the second encoder 1215 , the first encoder 1211 , the second encoder 1215 , and the It is trained with a first decoder 331 and a second decoder 333 .

제 1 예측 신경망(610)에 의해 출력되는 데이터는 제 1 디코더(331)에 의해 출력되는 현재의 잔차 옵티컬 플로우에 결합된 후, 현재 예측 영상을 생성하는데 이용되므로, 제 1 예측 신경망(610)은 현재 옵티컬 플로우와 현재의 잔차 옵티컬 플로우 사이의 차이, 즉 현재의 예측 옵티컬 플로우를 출력하도록 훈련될 수 있다.Since the data output by the first prediction neural network 610 is combined with the current residual optical flow output by the first decoder 331 and used to generate the current prediction image, the first prediction neural network 610 is It can be trained to output the difference between the current optical flow and the current residual optical flow, that is, the current predicted optical flow.

도 7은 다른 실시예에 따른 옵티컬 플로우 예측부(700)의 구성을 도시하는 도면이다.7 is a diagram illustrating a configuration of an optical flow prediction unit 700 according to another embodiment.

도 7을 참조하면, 옵티컬 플로우 예측부(700)는 제 2 예측 신경망(second prediction neural network)(710) 및 변경부(720)를 포함한다.Referring to FIG. 7 , the optical flow prediction unit 700 includes a second prediction neural network 710 and a change unit 720 .

제 2 예측 신경망(710)은 메모리에 저장될 수 있다. 일 실시예에서, 제 2 예측 신경망(710)은 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The second prediction neural network 710 may be stored in a memory. In an embodiment, the second prediction neural network 710 may be implemented as at least one dedicated processor for AI.

이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나가 제 2 예측 신경망(710)으로 입력된다.At least one of the previous optical flow, feature data of the previous optical flow, and feature data of the previous residual optical flow is input to the second prediction neural network 710 .

제 2 예측 신경망(710)은 훈련을 통해 설정된 파라미터를 통해 현재의 예측 옵티컬 플로우와 이전 옵티컬 플로우 사이의 세컨드-오더 옵티컬 플로우(second-order optical flow)를 획득한다. The second prediction neural network 710 acquires a second-order optical flow between the current prediction optical flow and the previous optical flow through a parameter set through training.

세컨드-오더 옵티컬 플로우는 옵티컬 플로우들 사이의 옵티컬 플로우로서, 옵티컬 플로우 내 샘플들 또는 블록들에 대응하는 움직임 벡터들의 집합으로 정의될 수 있다.The second-order optical flow is an optical flow between optical flows, and may be defined as a set of motion vectors corresponding to samples or blocks in the optical flow.

세컨드-오더 옵티컬 플로우는 이전 옵티컬 플로우 내 샘플들의 위치가 현재의 예측 옵티컬 플로우 내에서 어떻게 변경되었는지 또는 현재의 예측 옵티컬 플로우의 샘플들의 참조 샘플들이 이전 옵티컬 플로우 내 어디에 위치하는지를 나타낸다. 예를 들어, 이전 옵티컬 플로우 내 (1, 1)에 위치한 샘플이 현재의 예측 옵티컬 플로우 내 (2, 1)에 위치한다면, 해당 샘플에 대한 세컨드-오더 옵티컬 플로우 또는 움직임 벡터는 (1(=2-1), 0(=1-1))으로 도출될 수 있다.The second-order optical flow indicates how the positions of samples in the previous optical flow have changed in the current prediction optical flow or where reference samples of the samples of the current prediction optical flow are located in the previous optical flow. For example, if the sample located in (1, 1) in the previous optical flow is located in (2, 1) in the current prediction optical flow, the second-order optical flow or motion vector for the sample is (1(=2) -1), 0 (=1-1)).

변경부(720)는 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 처리하여 현재의 예측 옵티컬 플로우를 획득한다.The change unit 720 obtains a current predicted optical flow by processing the previous optical flow according to the second-order optical flow.

변경부(720)의 동작은 도 5에 도시된 움직임 보상부(335)의 동작과 유사하다. 즉, 움직임 보상부(335)는 이전 복원 영상을 현재 옵티컬 플로우에 따라 워핑하여 현재 예측 영상을 획득할 수 있고, 변경부(720)는 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 워핑하여 현재의 예측 옵티컬 플로우를 획득할 수 있다. The operation of the changer 720 is similar to that of the motion compensator 335 illustrated in FIG. 5 . That is, the motion compensator 335 warps the previous reconstructed image according to the current optical flow to obtain a current predicted image, and the changer 720 warps the previous optical flow according to the second-order optical flow to obtain the current prediction image. A predictive optical flow can be obtained.

현재의 예측 옵티컬 플로우의 생성을 위한 워핑은 하나의 예시이고, 변경부(720)는 현재 옵티컬 플로우에 유사한 현재의 예측 옵티컬 플로우를 생성하기 위해 이전 옵티컬 플로우 내 샘플들의 위치를 변경하는 다양한 처리를 이전 옵티컬 플로우에 대해 적용할 수 있다.Warping for generation of the current prediction optical flow is an example, and the change unit 720 transfers various processes of changing the positions of samples in the previous optical flow to generate a current prediction optical flow similar to the current optical flow. It can be applied to optical flow.

제 2 예측 신경망(710)에 의해 출력되는 데이터는, 이전 옵티컬 플로우 내 샘플들의 위치를 변경하는데 이용되므로, 손실 정보에 기반한 제 2 예측 신경망(710)의 훈련을 통해 제 2 예측 신경망(710)은 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 변경하기 위한 데이터, 즉, 세컨드-오더 옵티컬 플로우를 출력할 수 있다.Since the data output by the second prediction neural network 710 is used to change the positions of samples in the previous optical flow, the second prediction neural network 710 through training of the second prediction neural network 710 based on the loss information is Data for changing the previous optical flow to the current predicted optical flow, that is, the second-order optical flow may be output.

도 8은 또 다른 실시예에 따른 옵티컬 플로우 예측부(800)의 구성을 도시하는 도면이다.8 is a diagram illustrating a configuration of an optical flow prediction unit 800 according to another embodiment.

도 8을 참조하면, 옵티컬 플로우 예측부(800)는 제 3 디코더(810) 및 변경부(720)를 포함한다. 제 3 디코더(810)은 메모리에 저장될 수 있다. 일 실시예에서, 제 3 디코더(810)은 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.Referring to FIG. 8 , the optical flow prediction unit 800 includes a third decoder 810 and a change unit 720 . The third decoder 810 may be stored in a memory. In one embodiment, the third decoder 810 may be implemented as at least one dedicated processor for AI.

제 3 디코더(810)는 훈련을 통해 설정된 파라미터에 따라 세컨드-오더 옵티컬 플로우의 특징 데이터를 처리하여 세컨드-오더 옵티컬 플로우를 획득한다.The third decoder 810 acquires the second-order optical flow by processing feature data of the second-order optical flow according to parameters set through training.

세컨드-오더 옵티컬 플로우의 특징 데이터는 비트스트림으로부터 획득될 수 있다. 획득부(310)는 비트스트림으로부터 세컨드-오더 옵티컬 플로우의 특징 데이터를 획득하여 예측 복호화부(330)로 제공할 수 있다. The feature data of the second-order optical flow may be obtained from a bitstream. The obtainer 310 may obtain feature data of the second-order optical flow from the bitstream and provide it to the prediction decoder 330 .

영상 부호화 장치(1200)는 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터를 포함하는 비트스트림을 생성할 수 있는데, 구현예에 따라, 영상 부호화 장치(1200)는 세컨드-오더 옵티컬 플로우의 특징 데이터를 더 포함하는 비트스트림을 생성할 수 있다. 이에 대해서는 도 14를 참조하여 후술한다.The image encoding apparatus 1200 may generate a bitstream including feature data of the current residual optical flow and feature data of the current residual image data. A bitstream further including optical flow feature data may be generated. This will be described later with reference to FIG. 14 .

변경부(720)는 세컨드-오더 옵티컬 플로우에 따라 이전 옵티컬 플로우를 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다. The change unit 720 may obtain a current predicted optical flow by processing a previous optical flow according to the second-order optical flow.

일 실시예에서, 변경부(720)는 현재의 예측 옵티컬 플로우의 획득을 위해 세컨드-오더 옵티컬 플로우에 따라 이전 옵티컬 플로우를 워핑할 수 있다. 현재의 예측 옵티컬 플로우의 생성을 위한 워핑은 하나의 예시이고, 변경부(720)는 현재 옵티컬 플로우에 유사한 현재의 예측 옵티컬 플로우를 생성하기 위해, 이전 옵티컬 플로우 내 샘플들의 위치를 세컨드-오더 옵티컬 플로우에 따라 변경하는 다양한 처리를 이전 옵티컬 플로우에 대해 적용할 수 있다.In an embodiment, the changer 720 may warp the previous optical flow according to the second-order optical flow to obtain the current predicted optical flow. Warping for generation of the current prediction optical flow is an example, and the change unit 720 sets the positions of samples in the previous optical flow to generate a current prediction optical flow similar to the current optical flow as a second-order optical flow. Various processing that changes according to the previous optical flow can be applied.

도 8에 도시된 실시예에서는, 영상 부호화 장치(1200)로부터 제공된 세컨드-오더 옵티컬 플로우의 특징 데이터가 제 3 디코더(810)로 입력되어 처리된다. 따라서, 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나를 입력받아 처리하는 제 1 예측 신경망(610) 및 제 2 예측 신경망(710)에 비해 제 3 디코더(810)의 복잡도가 감소될 수 있다. 왜냐하면, 제 3 디코더(810)는 세컨드-오더 옵티컬 플로우 자체의 특징을 나타내는 세컨드-오더 옵티컬 플로우의 특징 데이터를 처리하는데 반해, 제 1 예측 신경망(610)과 제 2 예측 신경망(710)은 현재의 예측 옵티컬 플로우 및 세컨드-오더 옵티컬 플로우와의 관련성이 상대적으로 낮은 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및/또는 이전의 잔차 옵티컬 플로우의 특징 데이터를 처리하기 때문이다.In the embodiment shown in FIG. 8 , the feature data of the second-order optical flow provided from the image encoding apparatus 1200 is input to the third decoder 810 and processed. Therefore, the first prediction neural network 610 and the second prediction neural network 710 that receive and process at least one of the feature data of the previous optical flow, the previous optical flow, and the feature data of the previous residual optical flow are processed by the third decoder ( 810) can be reduced. Because the third decoder 810 processes the feature data of the second-order optical flow indicating the characteristics of the second-order optical flow itself, the first prediction neural network 610 and the second prediction neural network 710 are the current This is because a previous optical flow, characteristic data of a previous optical flow, and/or characteristic data of a previous residual optical flow, which has relatively low relevance to the predicted optical flow and the second-order optical flow, is processed.

도 9는 일 실시예에 따른 옵티컬 플로우를 복원하는 방법의 순서도이다.9 is a flowchart of a method of restoring an optical flow according to an embodiment.

S910 단계에서, 영상 복호화 장치(300)는 현재 영상에 대한 비트스트림으로부터 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득한다.In operation S910 , the image decoding apparatus 300 obtains feature data for the current residual optical flow from the bitstream for the current image.

영상 복호화 장치(300)는 비트스트림에 포함된 빈들에 대해 역이진화, 엔트로피 복호화, 역양자화 및 역변환 중 적어도 하나를 적용하여 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득할 수 있다.The image decoding apparatus 300 may obtain feature data for the current residual optical flow by applying at least one of inverse binarization, entropy decoding, inverse quantization, and inverse transform to bins included in the bitstream.

S920 단계에서, 영상 복호화 장치(300)는 신경망 기반의 제 1 디코더에 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 적용하여 현재의 잔차 옵티컬 플로우를 획득한다.In operation S920, the image decoding apparatus 300 obtains the current residual optical flow by applying the feature data of the current residual optical flow to the first decoder based on the neural network.

S930 단계에서, 영상 복호화 장치(300)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득한다.In operation S930, the image decoding apparatus 300 obtains a current prediction optical flow by using at least one of the previous optical flow, feature data for the previous optical flow, and feature data for the previous residual optical flow.

일 실시예에서, 영상 복호화 장치(300)는 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 결정할 수 있다.In an embodiment, the image decoding apparatus 300 may determine a previous optical flow as a current prediction optical flow.

다른 실시예에서, 영상 복호화 장치(300)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 1 예측 신경망(610)에 적용하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In another embodiment, the image decoding apparatus 300 applies at least one of the feature data for the previous optical flow, the feature data for the previous optical flow, and the feature data for the previous residual optical flow to the first prediction neural network 610 to predict the current Optical flow can be obtained.

또 다른 실시예에서, 영상 복호화 장치(300)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 2 예측 신경망(710)에 적용하여 세컨드-오더 옵티컬 플로우를 획득하고, 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In another embodiment, the image decoding apparatus 300 applies at least one of the feature data for the previous optical flow, the feature data for the previous optical flow, and the feature data for the previous residual optical flow to the second prediction neural network 710 so that the second- An order optical flow may be obtained, and a previous optical flow may be processed according to the second-order optical flow to obtain a current predicted optical flow.

또 다른 실시예에서, 영상 복호화 장치(300)는 비트스트림으로부터 획득되는 세컨드-오더 옵티컬 플로우에 대한 특징 데이터를 제 3 디코더(810)에 적용하여 세컨드-오더 옵티컬 플로우를 획득하고, 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In another embodiment, the image decoding apparatus 300 obtains a second-order optical flow by applying feature data for a second-order optical flow obtained from a bitstream to the third decoder 810, and uses the previous optical flow The current predicted optical flow may be obtained by processing according to the second-order optical flow.

S940 단계에서, 영상 복호화 장치(300)는 현재의 잔차 옵티컬 플로우와 현재의 예측 옵티컬 플로우를 이용하여 현재 옵티컬 플로우를 복원한다. 영상 복호화 장치(300)는 현재의 잔차 옵티컬 플로우의 샘플 값들과 현재의 예측 옵티컬 플로우의 샘플 값들을 합하여 현재 옵티컬 플로우를 획득할 수 있다.In operation S940, the image decoding apparatus 300 reconstructs the current optical flow by using the current residual optical flow and the current prediction optical flow. The image decoding apparatus 300 may acquire the current optical flow by summing sample values of the current residual optical flow and sample values of the current prediction optical flow.

일 실시예에서, 영상 복호화 장치(300)는 비트스트림으로부터 현재의 잔차 영상 데이터에 대한 특징 데이터를 획득하고, 현재의 잔차 영상 데이터에 대한 특징 데이터를 제 2 디코더(333)에 적용하여 현재의 잔차 영상 데이터를 획득할 수 있다. 그리고, 영상 복호화 장치(300)는 이전 복원 영상을 현재 옵티컬 플로우에 따라 처리하여 현재 예측 영상을 획득하고, 현재 예측 영상과 현재의 잔차 영상 데이터를 결합하여 현재 복원 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 300 obtains feature data for the current residual image data from the bitstream, and applies the feature data for the current residual image data to the second decoder 333 to obtain the current residual image data. Image data can be acquired. In addition, the image decoding apparatus 300 may obtain a current predicted image by processing the previous reconstructed image according to the current optical flow, and may obtain a current reconstructed image by combining the current predicted image and current residual image data.

다른 실시예에서, 영상 복호화 장치(300)는 비트스트림으로부터 현재의 잔차 영상 데이터를 획득할 수 있다. 그리고, 영상 복호화 장치(300)는 이전 복원 영상을 현재 옵티컬 플로우에 따라 처리하여 현재 예측 영상을 획득하고, 현재 예측 영상과 현재의 잔차 영상 데이터를 결합하여 현재 복원 영상을 획득할 수 있다.In another embodiment, the image decoding apparatus 300 may obtain current residual image data from a bitstream. In addition, the image decoding apparatus 300 may obtain a current predicted image by processing the previous reconstructed image according to the current optical flow, and may obtain a current reconstructed image by combining the current predicted image and current residual image data.

또 다른 실시예에서, 영상 복호화 장치(300)는 현재 옵티컬 플로우를 다른 장치로 제공하여 다른 장치에 의해 현재 복원 영상이 획득되도록 할 수 있다.In another embodiment, the image decoding apparatus 300 may provide the current optical flow to another device so that the current reconstructed image is acquired by the other device.

한편, 도 3 내지 도 9와 관련하여 설명한 인터 예측 과정은, 이전 영상이 인터 예측을 통해 처리된 경우를 고려한 것이다. 왜냐하면, 현재 옵티컬 플로우를 복원하는데 이용되는 이전 옵티컬 플로우는 이전 영상의 인터 예측 과정에서 생성된 것이기 때문이다.Meanwhile, the inter prediction process described with reference to FIGS. 3 to 9 considers a case in which a previous image is processed through inter prediction. This is because the previous optical flow used to reconstruct the current optical flow is generated in the inter prediction process of the previous image.

즉, 도 3 내지 도 9와 관련하여 설명한 인터 예측 과정은 현재 영상이 P(predictive) 프레임 다음의 P 프레임에 해당하는 경우, 다시 말하면 이전 영상이 P 프레임이고, 현재 영상이 P 프레임인 경우에 적용될 수 있다. 여기서, P 프레임이란, 인트라 예측 또는 인터 예측을 통해 복원될 수 있는 영상 또는 프레임을 의미한다. 인트라 예측을 통해서만 복원될 수 있는 영상 또는 프레임은 I(intra) 프레임으로 참조된다.That is, the inter prediction process described with reference to FIGS. 3 to 9 is applied when the current image corresponds to a P frame following a P (predictive) frame, that is, when the previous image is a P frame and the current image is a P frame. can Here, the P frame means an image or frame that can be reconstructed through intra prediction or inter prediction. An image or frame that can be reconstructed only through intra prediction is referred to as an I (intra) frame.

따라서, 만약 이전 영상이 I 프레임이라면, 이전 옵티컬 플로우는 획득되지 않으므로, 이하에서는 현재 영상이 I 프레임 다음의 P 프레임인 경우, 다시 말하면, 이전 영상이 I 프레임이고, 현재 영상이 P 프레임인 경우를 위한 인터 예측 과정에 대해 설명한다.Therefore, if the previous image is an I frame, the previous optical flow is not obtained, so the case where the current image is the P frame after the I frame, that is, the previous image is the I frame, and the current image is the P frame The inter prediction process for

도 10은 예측 복호화부(330)의 다른 구성을 도시하는 도면이다.10 is a diagram illustrating another configuration of the predictive decoding unit 330 .

도 10을 참조하면, 예측 복호화부(330)는 제 4 디코더(1010), 제 2 디코더(333), 움직임 보상부(335) 및 제 2 결합부(337)를 포함한다.Referring to FIG. 10 , the prediction decoding unit 330 includes a fourth decoder 1010 , a second decoder 333 , a motion compensator 335 , and a second combiner 337 .

제 4 디코더(1010)는 메모리에 저장될 수 있다. 일 실시예에서, 제 4 디코더(1010)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The fourth decoder 1010 may be stored in a memory. In one embodiment, the fourth decoder 1010 may be implemented as at least one dedicated processor for AI.

제 4 디코더(1010)는 훈련을 통해 설정된 파라미터에 따라 현재 옵티컬 플로우의 특징 데이터를 처리하여 현재 옵티컬 플로우를 획득한다.The fourth decoder 1010 obtains the current optical flow by processing the feature data of the current optical flow according to parameters set through training.

현재 옵티컬 플로우의 특징 데이터는 비트스트림으로부터 획득될 수 있다. 즉, 획득부(310)는 비트스트림에 포함된 빈들에 대해 역이진화, 엔트로피 복호화, 역양자화 및 역변환 중 적어도 하나를 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득할 수 있다.The feature data of the current optical flow may be obtained from a bitstream. That is, the acquirer 310 may acquire the feature data of the current optical flow by applying at least one of inverse binarization, entropy decoding, inverse quantization, and inverse transformation to bins included in the bitstream.

제 2 디코더(333)는 훈련을 통해 설정된 파라미터에 따라 현재의 잔차 영상 데이터의 특징 데이터를 처리하여 현재의 잔차 영상 데이터를 획득한다.The second decoder 333 obtains current residual image data by processing the feature data of the current residual image data according to parameters set through training.

움직임 보상부(335)는 현재 옵티컬 플로우에 따라 이전 복원 영상을 처리하여 현재 예측 영상을 획득하고, 제 2 결합부(337)는 현재 예측 영상과 현재의 잔차 영상 데이터를 결합하여 현재 복원 영상을 획득한다.The motion compensator 335 processes the previously reconstructed image according to the current optical flow to obtain a current predicted image, and the second combiner 337 combines the current predicted image with the current residual image data to obtain the current reconstructed image. do.

구현예에 따라, 예측 복호화부(330)는 현재 옵티컬 플로우를 다른 장치로 전송하고, 다른 장치에 의해 현재 복원 영상이 획득되도록 할 수 있다. 이 경우, 제 2 디코더(333), 움직임 보상부(335) 및 제 2 결합부(337)는 예측 복호화부(330)에 포함되지 않을 수 있다.According to an embodiment, the predictive decoder 330 may transmit the current optical flow to another device and cause the current reconstructed image to be obtained by the other device. In this case, the second decoder 333 , the motion compensator 335 , and the second combiner 337 may not be included in the prediction decoder 330 .

한편, 도 5 및 도 10에는 도시되어 있지 않지만, 예측 복호화부(330)는 현재 영상이 I 프레임 다음의 P 프레임인지, 아니면 P 프레임 다음의 P 프레임인지를 판단하는 판단부를 더 포함할 수 있다.Meanwhile, although not shown in FIGS. 5 and 10 , the predictive decoding unit 330 may further include a determining unit that determines whether the current image is a P frame following the I frame or a P frame following the P frame.

예측 복호화부(330)는 현재 영상이 P 프레임 다음의 P 프레임인 경우, 도 5에 도시된 제 1 디코더(331), 옵티컬 플로우 예측부(334) 및 제 1 결합부(336)를 통해 현재 옵티컬 플로우를 복원하고, 현재 영상이 I 프레임 다음의 P 프레임인 경우, 도 10에 도시된 제 4 디코더(1010)를 통해 현재 옵티컬 플로우를 복원할 수 있다.When the current image is a P frame after the P frame, the predictive decoding unit 330 performs the current optical When the flow is restored and the current image is the P frame after the I frame, the current optical flow may be restored through the fourth decoder 1010 illustrated in FIG. 10 .

도 11은 다른 실시예에 따른 옵티컬 플로우를 복원하는 방법의 순서도이다.11 is a flowchart of a method of restoring an optical flow according to another embodiment.

S1110 단계에서, 영상 복호화 장치(300)는 현재 영상이 I 프레임 다음의 P 프레임인지를 판단한다.In step S1110 , the image decoding apparatus 300 determines whether the current image is the P frame after the I frame.

현재 영상이 I 프레임 다음의 P 프레임인 경우, S1120 단계에서, 영상 복호화 장치(300)는 비트스트림으로부터 현재 옵티컬 플로우에 대한 특징 데이터를 획득한다. When the current image is the P frame after the I frame, in operation S1120 , the image decoding apparatus 300 obtains feature data for the current optical flow from the bitstream.

영상 복호화 장치(300)는 비트스트림에 포함된 빈들에 대해 역이진화, 엔트로피 복호화, 역양자화 및 역변환 중 적어도 하나를 적용하여 현재 옵티컬 플로우에 대한 특징 데이터를 획득할 수 있다.The image decoding apparatus 300 may obtain feature data for the current optical flow by applying at least one of inverse binarization, entropy decoding, inverse quantization, and inverse transformation to bins included in the bitstream.

S1130 단계에서, 영상 복호화 장치(300)는 현재 옵티컬 플로우에 대한 특징 데이터를 제 4 디코더(1010)에 적용하여 현재 옵티컬 플로우를 획득한다.In operation S1130 , the image decoding apparatus 300 obtains the current optical flow by applying the feature data for the current optical flow to the fourth decoder 1010 .

현재 영상이 I 프레임 다음의 P 프레임이 아닌 경우, 다시 말하면, 현재 영상이 P 프레임 다음의 P 프레임인 경우, 영상 복호화 장치(300)는 도 9에 도시된 S910 단계 내지 S940 단계를 통해 현재 옵티컬 플로우를 복원할 수 있다.When the current image is not the P frame after the I frame, that is, when the current image is the P frame after the P frame, the image decoding apparatus 300 performs the current optical flow through steps S910 to S940 shown in FIG. 9 . can be restored.

이하에서는, 도 12 내지 도 15를 참조하여 영상 부호화 장치(1200)의 동작에 대해 설명한다.Hereinafter, an operation of the image encoding apparatus 1200 will be described with reference to FIGS. 12 to 15 .

도 12는 일 실시예에 따른 영상 부호화 장치(1200)의 구성을 도시하는 도면이다.12 is a diagram illustrating a configuration of an image encoding apparatus 1200 according to an embodiment.

도 12를 참조하면, 영상 부호화 장치(1200)는 예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)를 포함한다.Referring to FIG. 12 , the image encoding apparatus 1200 includes a predictive encoder 1210 , a generator 1230 , an acquirer 1250 , and a predictive decoder 1270 .

예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)는 프로세서로 구현될 수 있고, 예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)는 메모리(미도시)에 저장된 인스트럭션에 따라 동작할 수 있다.The predictive encoder 1210 , the generator 1230 , the acquirer 1250 , and the predictive decoder 1270 may be implemented as a processor, and the predictive encoder 1210 , the generator 1230 , and the acquirer 1250 . ) and the prediction decoding unit 1270 may operate according to instructions stored in a memory (not shown).

도 12는 예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)를 개별적으로 도시하고 있으나, 예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)는 하나의 프로세서를 통해 구현될 수 있다. 이 경우, 예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)는 전용 프로세서로 구현되거나, AP(application processor), CPU(central processing unit) 또는 GPU(graphic processing unit)와 같은 범용 프로세서와 소프트웨어의 조합을 통해 구현될 수도 있다. 또한, 전용 프로세서의 경우, 본 개시의 실시예를 구현하기 위한 메모리를 포함하거나, 외부 메모리를 이용하기 위한 메모리 처리부를 포함할 수 있다. 12 shows the prediction encoder 1210 , the generator 1230 , the acquirer 1250 , and the predictive decoder 1270 separately, the predictive encoder 1210 , the generator 1230 , and the acquirer 1250 and the prediction decoding unit 1270 may be implemented through one processor. In this case, the prediction encoder 1210 , the generator 1230 , the acquirer 1250 , and the prediction decoder 1270 are implemented as a dedicated processor, or an application processor (AP), central processing unit (CPU), or GPU ( It may be implemented through a combination of a general-purpose processor such as a graphic processing unit and software. In addition, the dedicated processor may include a memory for implementing an embodiment of the present disclosure or a memory processing unit for using an external memory.

예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)는 복수의 프로세서로 구성될 수도 있다. 이 경우, 전용 프로세서들의 조합으로 구현되거나, AP, CPU 또는 GPU와 같은 다수의 범용 프로세서들과 소프트웨어의 조합을 통해 구현될 수도 있다.The predictive encoder 1210 , the generator 1230 , the acquirer 1250 , and the predictive decoder 1270 may include a plurality of processors. In this case, it may be implemented as a combination of dedicated processors, or may be implemented through a combination of software and a plurality of general-purpose processors such as an AP, CPU, or GPU.

예측 부호화부(1210)는 현재 영상과 이전 복원 영상 등을 이용하여 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 획득한다.The prediction encoder 1210 obtains feature data of the current residual optical flow and feature data of the current residual image data by using the current image and the previous reconstructed image.

예측 부호화부(1210)는 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터의 획득을 위해 신경망 기반의 제 1 인코더(1211)와 신경망 기반의 제 2 인코더(1215)를 이용할 수 있다.The prediction encoder 1210 may use a neural network-based first encoder 1211 and a neural network-based second encoder 1215 to obtain feature data of the current residual optical flow and feature data of the current residual image data. have.

예측 부호화부(1210)에 의해 획득된 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터는 생성부(1230)로 전달된다. The feature data of the current residual optical flow obtained by the prediction encoder 1210 and the feature data of the current residual image data are transmitted to the generator 1230 .

생성부(1230)는 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터로부터 비트스트림을 생성한다. 일 실시예에서, 생성부(1230)는 현재의 잔차 옵티컬 플로우의 특징 데이터에 대응하는 제 1 비트스트림, 및 현재의 잔차 영상 데이터의 특징 데이터에 대응하는 제 2 비트스트림을 생성할 수도 있다.The generator 1230 generates a bitstream from feature data of the current residual optical flow and feature data of the current residual image data. In an embodiment, the generator 1230 may generate a first bitstream corresponding to the feature data of the current residual optical flow and a second bitstream corresponding to the feature data of the current residual image data.

비트스트림은 네트워크를 통해 영상 복호화 장치(300)로부터 전송될 수 있다. 또한, 일 실시예에서, 비트스트림은 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium) 등을 포함하는 데이터 저장 매체에 기록될 수도 있다.The bitstream may be transmitted from the image decoding apparatus 300 through a network. Further, in one embodiment, the bitstream is a hard disk, magnetic media such as floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floppy disks. It may be recorded on a data storage medium including an optical medium).

획득부(1250)는 생성부(1230)에 의해 생성된 비트스트림으로부터 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 획득한다. 구현예에 따라, 획득부(1250)는 예측 부호화부(1210)로부터 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 수신할 수도 있다.The acquirer 1250 acquires feature data of the current residual optical flow and feature data of the current residual image data from the bitstream generated by the generator 1230 . According to an embodiment, the obtainer 1250 may receive feature data of the current residual optical flow and feature data of the current residual image data from the prediction encoder 1210 .

현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터는 예측 복호화부(1270)로 전달되고, 예측 복호화부(1270)는 현재의 잔차 옵티컬 플로우의 특징 데이터를 이용하여 현재 옵티컬 플로우를 복원하고, 현재 옵티컬 플로우와 현재의 잔차 영상 데이터의 특징 데이터를 이용하여 현재 복원 영상을 획득한다. The feature data of the current residual optical flow and the feature data of the current residual image data are transmitted to the predictive decoder 1270, and the predictive decoder 1270 uses the feature data of the current residual optical flow to generate the current optical flow. reconstructed, and a current reconstructed image is obtained using the feature data of the current optical flow and the current residual image data.

예측 복호화부(1270)에 의해 획득된 현재 옵티컬 플로우 및 현재 복원 영상은 다음 영상의 부호화 과정에서 이용될 수 있다.The current optical flow and the current reconstructed image obtained by the prediction decoder 1270 may be used in the encoding process of the next image.

획득부(1250) 및 예측 복호화부(1270)의 구성 및 동작은 앞서 도 3 내지 도 5에 도시된 획득부(310) 및 예측 복호화부(330)의 동작과 동일하므로 상세한 설명을 생략한다. 다만, 도 13에 도시된 바와 같이, 예측 부호화부(1210)가 옵티컬 플로우 예측부(1217)를 포함하므로, 도 5에 도시된 예측 복호화부(330)와 달리 예측 복호화부(1270)는 옵티컬 플로우 예측부(334)를 포함하지 않을 수 있다. 왜냐하면, 예측 복호화부(1270)는 예측 부호화부(1210)에 포함된 옵티컬 플로우 예측부(1217)에 의해 획득되는 현재의 예측 옵티컬 플로우를 이용할 수 있기 때문이다.The configuration and operation of the acquisition unit 1250 and the prediction decoding unit 1270 are the same as the operations of the acquisition unit 310 and the prediction decoding unit 330 illustrated in FIGS. 3 to 5 , and thus a detailed description thereof will be omitted. However, as shown in FIG. 13 , since the predictive encoder 1210 includes the optical flow predictor 1217 , unlike the predictive decoder 330 illustrated in FIG. 5 , the predictive decoder 1270 uses the optical flow The prediction unit 334 may not be included. This is because the prediction decoding unit 1270 may use the current prediction optical flow obtained by the optical flow prediction unit 1217 included in the prediction encoding unit 1210 .

일 실시예에서, 예측 부호화부(1210)는 현재 영상 및 이전 복원 영상을 이용하여 현재의 잔차 옵티컬 플로우의 특징 데이터를 획득하고, 생성부(1230)는 현재의 잔차 옵티컬 플로우의 특징 데이터에 대응하는 비트스트림을 생성할 수 있다. 그리고, 획득부(1250)는 비트스트림으로부터 현재의 잔차 옵티컬 플로우의 특징 데이터를 획득하고, 예측 복호화부(1270)는 현재의 잔차 옵티컬 플로우의 특징 데이터에 기초하여 현재 옵티컬 플로우를 복원할 수 있다. In an embodiment, the prediction encoder 1210 obtains feature data of the current residual optical flow by using the current image and the previously reconstructed image, and the generator 1230 corresponds to the feature data of the current residual optical flow. You can create a bitstream. In addition, the obtainer 1250 may obtain feature data of the current residual optical flow from the bitstream, and the predictive decoder 1270 may reconstruct the current optical flow based on the feature data of the current residual optical flow.

즉, 예측 부호화부(1210), 생성부(1230), 획득부(1250) 및 예측 복호화부(1270)를 통해 현재 옵티컬 플로우가 부호화되므로, 이 경우, 영상 부호화 장치(1200)는 옵티컬 플로우 부호화 장치로 참조될 수 있다. That is, since the current optical flow is encoded through the prediction encoder 1210 , the generator 1230 , the acquirer 1250 , and the predictive decoder 1270 , in this case, the image encoding apparatus 1200 is the optical flow encoding apparatus may be referred to as

예측 복호화부(1270)에 의해 복원된 현재 옵티컬 플로우는 다른 장치로 전달되고, 다른 장치에 의해 현재의 잔차 영상 데이터가 부호화될 수 있다. 구체적으로, 다른 장치는 현재 옵티컬 플로우에 따라 이전 복원 영상으로부터 획득되는 현재 예측 영상과 현재 영상 사이의 차이에 대응하는 현재의 잔차 영상 데이터를 부호화할 수 있다.The current optical flow reconstructed by the predictive decoder 1270 may be transmitted to another device, and the current residual image data may be encoded by the other device. Specifically, the other device may encode the current residual image data corresponding to the difference between the current prediction image and the current image obtained from the previous reconstructed image according to the current optical flow.

도 13 내지 도 15를 참조하여, 예측 부호화부(1210) 및 생성부(1230)의 구성에 대해 좀더 상세히 설명한다.The configuration of the prediction encoder 1210 and the generator 1230 will be described in more detail with reference to FIGS. 13 to 15 .

도 13은 도 12에 도시된 예측 부호화부(1210)의 구성을 도시하는 도면이다.FIG. 13 is a diagram showing the configuration of the predictive encoder 1210 shown in FIG. 12 .

예측 부호화부(1210)는 옵티컬 플로우 예측부(1217), 제 1 인코더(1211), 제 2 인코더(1215) 및 차감부(1213)를 포함한다.The predictive encoder 1210 includes an optical flow predictor 1217 , a first encoder 1211 , a second encoder 1215 , and a subtractor 1213 .

제 1 인코더(1211) 및 제 2 인코더(1215)는 메모리에 저장될 수 있다. 일 실시예에서, 제 1 인코더(1211) 및 제 2 인코더(1215)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The first encoder 1211 and the second encoder 1215 may be stored in a memory. In one embodiment, the first encoder 1211 and the second encoder 1215 may be implemented as at least one dedicated processor for AI.

도 13을 참조하면, 옵티컬 플로우 예측부(1217)는 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득한다.Referring to FIG. 13 , the optical flow prediction unit 1217 obtains a current predicted optical flow by using at least one of a previous optical flow, feature data of a previous optical flow, and feature data of a previous residual optical flow.

옵티컬 플로우 예측부(1217)는 영상 복호화 장치(300)의 옵티컬 플로우 예측부(334)와 동일한 방식으로 현재의 예측 옵티컬 플로우를 획득할 수 있다. The optical flow prediction unit 1217 may acquire the current prediction optical flow in the same manner as the optical flow prediction unit 334 of the image decoding apparatus 300 .

일 예로, 옵티컬 플로우 예측부(1217)는 도 6 또는 도 7에 도시된 옵티컬 플로우 예측부(600 또는 700)와 동일한 구성을 가짐으로써 현재의 예측 옵티컬 플로우를 획득할 수 있다.As an example, the optical flow prediction unit 1217 may obtain the current prediction optical flow by having the same configuration as the optical flow prediction unit 600 or 700 illustrated in FIG. 6 or 7 .

구체적으로, 도 6과 관련하여 설명한 바와 같이, 옵티컬 플로우 예측부(1217)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 1 예측 신경망(610)에 적용하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.Specifically, as described with reference to FIG. 6 , the optical flow prediction unit 1217 converts at least one of the feature data for the previous optical flow, the previous optical flow, and the previous residual optical flow to the first prediction neural network ( 610) to obtain a current predicted optical flow.

또한, 도 7과 관련하여 설명한 바와 같이 옵티컬 플로우 예측부(1217)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 2 예측 신경망(710)에 적용하여 세컨드-오더 옵티컬 플로우를 획득하고, 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In addition, as described with reference to FIG. 7 , the optical flow prediction unit 1217 converts at least one of the feature data for the previous optical flow, the feature data for the previous optical flow, and the feature data for the previous residual optical flow to the second prediction neural network 710 . is applied to obtain a second-order optical flow, and a previous optical flow may be processed according to the second-order optical flow to obtain a current predicted optical flow.

다른 예로, 옵티컬 플로우 예측부(1217)는 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 결정할 수 있다. As another example, the optical flow prediction unit 1217 may determine the previous optical flow as the current predicted optical flow.

영상 복호화 장치(300)의 옵티컬 플로우 예측부(334)가 도 8에 도시된 바와 같이, 제 3 디코더(810) 및 변경부(720)를 포함하는 경우, 영상 부호화 장치(1200)의 옵티컬 플로우 예측부(1217)의 구성에 대해 도 14를 참조하여 후술한다.When the optical flow prediction unit 334 of the image decoding apparatus 300 includes the third decoder 810 and the changer 720 as shown in FIG. 8 , the optical flow prediction of the image encoding apparatus 1200 is The configuration of the unit 1217 will be described later with reference to FIG. 14 .

현재 영상, 이전 복원 영상 및 현재의 예측 옵티컬 플로우 중 적어도 하나가 제 1 인코더(1211)로 입력된다. 현재 영상, 이전 복원 영상 및 현재의 예측 옵티컬 플로우 중 적어도 하나는 연접된 후 제 1 인코더(1211)로 입력될 수 있다. At least one of a current image, a previous reconstructed image, and a current prediction optical flow is input to the first encoder 1211 . At least one of the current image, the previous reconstructed image, and the current prediction optical flow may be concatenated and then input to the first encoder 1211 .

현재 영상과 이전 복원 영상으로부터 현재 옵티컬 플로우에 대한 정보가 도출될 수 있으므로, 제 1 인코더(1211)는 현재 영상과 이전 복원 영상으로부터 확인되는 현재 옵티컬 플로우, 및 옵티컬 플로우 예측부(1217)에 의해 생성되는 현재의 예측 옵티컬 플로우를 이용하여 이들 사이의 차이에 대응하는 현재의 잔차 옵티컬 플로우의 특징 데이터를 출력할 수 있다.Since information on the current optical flow can be derived from the current image and the previous reconstructed image, the first encoder 1211 generates the current optical flow identified from the current image and the previous reconstructed image, and the optical flow prediction unit 1217 . It is possible to output feature data of the current residual optical flow corresponding to the difference therebetween using the current predicted optical flow.

제 1 인코더(1211)는 훈련의 결과로 설정된 파라미터에 따라 현재 영상, 이전 복원 영상 및 현재의 예측 옵티컬 플로우 중 적어도 하나를 처리하여 현재의 잔차 옵티컬 플로우의 특징 데이터를 출력한다. The first encoder 1211 processes at least one of a current image, a previous reconstructed image, and a current predicted optical flow according to a parameter set as a result of training, and outputs feature data of the current residual optical flow.

도 12에 도시된 예측 복호화부(1270)는 현재의 잔차 옵티컬 플로우의 특징 데이터에 기초하여 현재 옵티컬 플로우를 복원하고, 현재 옵티컬 플로우에 따라 이전 복원 영상으로부터 생성된 현재 예측 영상을 차감부(1213)로 제공된다. The prediction decoding unit 1270 shown in FIG. 12 reconstructs the current optical flow based on the characteristic data of the current residual optical flow, and subtracts the current prediction image generated from the previous reconstructed image according to the current optical flow. is provided as

차감부(1213)는 현재 영상과 현재 예측 영상 사이의 현재의 잔차 영상 데이터를 획득한다. 차감부(1213)는 현재 영상의 샘플 값들로부터 현재 예측 영상의 샘플 값들을 차감하여 현재의 잔차 영상 데이터를 획득할 수 있다.The subtractor 1213 obtains current residual image data between the current image and the current prediction image. The subtractor 1213 may obtain current residual image data by subtracting sample values of the current prediction image from sample values of the current image.

현재의 잔차 영상 데이터는 제 2 인코더(1215)로 입력되고, 제 2 인코더(1215)는 훈련의 결과로 설정된 파라미터에 따라 현재의 잔차 영상 데이터를 처리하여 현재의 잔차 영상 데이터의 특징 데이터를 출력한다. The current residual image data is input to the second encoder 1215, and the second encoder 1215 processes the current residual image data according to parameters set as a result of training to output feature data of the current residual image data. .

전술한 생성부(1230)는 예측 부호화부(1210)로부터 출력된 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터에 기초하여 비트스트림을 생성한다.The above-described generator 1230 generates a bitstream based on the feature data of the current residual optical flow output from the prediction encoder 1210 and the feature data of the current residual image data.

도 14는 도 8에 도시된 옵티컬 플로우 예측부(800)에 대응하는 영상 부호화 장치(1200)의 옵티컬 플로우 예측부(1217)의 구성을 도시하는 도면이다.FIG. 14 is a diagram showing the configuration of the optical flow prediction unit 1217 of the video encoding apparatus 1200 corresponding to the optical flow prediction unit 800 shown in FIG. 8 .

도 14를 참조하면, 옵티컬 플로우 예측부(1217)는 제 3 인코더(1410), 제 3 디코더(810) 및 변경부(720)를 포함한다. 도 8과 비교하면, 옵티컬 플로우 예측부(1217)는 제 3 인코더(1410)를 포함하는 것을 알 수 있다.Referring to FIG. 14 , the optical flow predictor 1217 includes a third encoder 1410 , a third decoder 810 , and a changer 720 . 8 , it can be seen that the optical flow prediction unit 1217 includes a third encoder 1410 .

제 3 인코더(1410) 및 제 3 디코더(810)는 메모리에 저장될 수 있다. 일 실시예에서, 제 3 인코더(1410) 및 제 3 디코더(810)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The third encoder 1410 and the third decoder 810 may be stored in a memory. In an embodiment, the third encoder 1410 and the third decoder 810 may be implemented as at least one dedicated processor for AI.

제 3 인코더(1410)는 훈련에 따라 설정된 파라미터에 따라 현재 영상, 이전 복원 영상, 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나를 처리하여 세컨드-오더 옵티컬 플로우의 특징 데이터를 획득한다.The third encoder 1410 processes at least one of the current image, the previous reconstructed image, the previous optical flow, the feature data of the previous optical flow, and the feature data of the previous residual optical flow according to the parameters set according to training to process the second-order optical Acquire flow characteristic data.

세컨드-오더 옵티컬 플로우의 특징 데이터에 대응하는 비트스트림이 영상 복호화 장치(300)로 제공될 수 있다.A bitstream corresponding to the feature data of the second-order optical flow may be provided to the image decoding apparatus 300 .

제 3 디코더(810)는 훈련을 통해 설정된 파라미터에 따라 세컨드-오더 옵티컬 플로우의 특징 데이터를 처리하여 세컨드-오더 옵티컬 플로우를 획득한다.The third decoder 810 acquires the second-order optical flow by processing feature data of the second-order optical flow according to parameters set through training.

변경부(720)는 세컨드-오더 옵티컬 플로우에 따라 이전 옵티컬 플로우를 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.The change unit 720 may obtain a current predicted optical flow by processing a previous optical flow according to the second-order optical flow.

일 실시예에서, 변경부(720)는 현재의 예측 옵티컬 플로우의 획득을 위해 세컨드-오더 옵티컬 플로우에 따라 이전 옵티컬 플로우를 워핑할 수 있다. 워핑은 하나의 예시이고, 변경부(720)는 현재의 예측 옵티컬 플로우를 생성하기 위해 이전 옵티컬 플로우 내 샘플들의 위치를 변경하는 다양한 처리를 이전 옵티컬 플로우에 대해 적용할 수 있다.In an embodiment, the changer 720 may warp the previous optical flow according to the second-order optical flow to obtain the current predicted optical flow. Warping is an example, and the change unit 720 may apply various processes for changing positions of samples in the previous optical flow to the previous optical flow to generate the current predicted optical flow.

도 14에 도시된 옵티컬 플로우 예측부(1217)는 영상 부호화 장치(1200)가 이용할 수 있는 여러 종류의 데이터를 이용하여 세컨드-오더 옵티컬 플로우의 특징 데이터를 획득한다. 그리고, 세컨드-오더 옵티컬 플로우의 특징 데이터는 영상 복호화 장치(300)로 시그널링된다. 영상 복호화 장치(300)의 옵티컬 플로우 예측부(800)는 영상 부호화 장치(1200)로부터 시그널링된 세컨드-오더 옵티컬 플로우의 특징 데이터를 제 3 디코더(810)로 처리하여 세컨드-오더 옵티컬 플로우를 획득한다.The optical flow prediction unit 1217 illustrated in FIG. 14 obtains feature data of the second-order optical flow by using various types of data available to the image encoding apparatus 1200 . And, the feature data of the second-order optical flow is signaled to the image decoding apparatus 300 . The optical flow prediction unit 800 of the image decoding apparatus 300 processes the feature data of the second-order optical flow signaled from the image encoding apparatus 1200 with the third decoder 810 to obtain a second-order optical flow. .

영상 복호화 장치(300)가 영상 부호화 장치(1200)로부터 시그널링된 세컨드-오더 옵티컬 플로우의 특징 데이터를 이용하여 획득한 예측 옵티컬 플로우는, 영상 복호화 장치(300)가 스스로 획득한 예측 옵티컬 플로우에 비해 정확하다. 왜냐하면, 영상 부호화 장치(1200)가 세컨드-오더 옵티컬 플로우의 특징 데이터를 획득하는데 이용할 수 있는 데이터의 종류는 영상 복호화 장치(300)에 비해 더 많기 때문이다. 일 예로, 현재 영상은 현재 영상의 복호화 전에는 영상 복호화 장치(300)가 이용할 수 없으므로, 예를 들어, 도 6 및 도 7에 도시된 옵티컬 플로우 예측부(600, 700)는 현재의 예측 옵티컬 플로우를 획득하는데 현재 영상을 이용하지 않는다.The prediction optical flow obtained by the image decoding apparatus 300 using the feature data of the second-order optical flow signaled from the image encoding apparatus 1200 is more accurate than the prediction optical flow obtained by the image decoding apparatus 300 itself. do. This is because the types of data that the image encoding apparatus 1200 can use to obtain feature data of the second-order optical flow are larger than those of the image decoding apparatus 300 . For example, since the image decoding apparatus 300 cannot use the current image before decoding the current image, for example, the optical flow prediction units 600 and 700 shown in FIGS. 6 and 7 may predict the current predicted optical flow. The current image is not used for acquisition.

도 15는 도 12에 도시된 생성부(1230)의 구성을 도시하는 도면이다.FIG. 15 is a diagram illustrating the configuration of the generator 1230 shown in FIG. 12 .

도 15를 참조하면, 생성부(1230)는 양자화부(1231) 및 엔트로피 부호화부(1233)를 포함한다.Referring to FIG. 15 , the generator 1230 includes a quantizer 1231 and an entropy encoder 1233 .

양자화부(1231)는 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 양자화한다.The quantizer 1231 quantizes the feature data of the current residual optical flow and the feature data of the current residual image data.

엔트로피 부호화부(1233)는 현재의 잔차 옵티컬 플로우의 양자화된 특징 데이터와 현재의 잔차 영상 데이터의 양자화된 특징 데이터를 엔트로피 코딩하여 비트스트림을 생성한다.The entropy encoder 1233 entropy-codes the quantized feature data of the current residual optical flow and the quantized feature data of the current residual image data to generate a bitstream.

구현예에 따라, 생성부(1230)는 변환부를 더 포함할 수 있다. 변환부는 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터를 공간 도메인에서 주파수 도메인으로 변환하여 양자화부(1231)로 제공한다.According to an embodiment, the generator 1230 may further include a converter. The transform unit transforms the feature data of the current residual optical flow and the feature data of the current residual image data from the spatial domain to the frequency domain, and provides them to the quantizer 1231 .

또한, 구현예에 따라, 생성부(1230)는 양자화부(1231)를 포함하지 않을 수도 있다. 즉, 엔트로피 부호화부(1233)에 의한 처리를 통해 현재의 잔차 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터에 대응하는 비트스트림이 획득될 수 있다.Also, depending on the implementation, the generator 1230 may not include the quantizer 1231 . That is, the bitstream corresponding to the feature data of the current residual optical flow and the feature data of the current residual image data may be obtained through processing by the entropy encoder 1233 .

또한, 구현예에 따라, 생성부(1230)는 현재의 잔차 옵티컬 플로우의 특징 데이터와 현재의 잔차 영상 데이터의 특징 데이터에 대해 이진화를 수행하여 비트스트림을 생성할 수도 있다. 즉, 생성부(1230)가 이진화만을 수행하는 경우, 양자화부(1231), 엔트로피 부호화부(1233)는 생성부(1230)에 포함되지 않을 수 있다.Also, according to an embodiment, the generator 1230 may generate a bitstream by performing binarization on the feature data of the current residual optical flow and the feature data of the current residual image data. That is, when the generator 1230 performs only binarization, the quantizer 1231 and the entropy encoder 1233 may not be included in the generator 1230 .

도 16은 일 실시예에 따른 옵티컬 플로우의 부호화 방법의 순서도이다.16 is a flowchart of a method of encoding an optical flow according to an embodiment.

S1610 단계에서, 영상 부호화 장치(1200)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나로부터 현재의 예측 옵티컬 플로우를 획득한다.In operation S1610 , the image encoding apparatus 1200 obtains a current prediction optical flow from at least one of the previous optical flow, feature data for the previous optical flow, and feature data for the previous residual optical flow.

일 실시예에서, 영상 부호화 장치(1200)는 이전 옵티컬 플로우를 현재의 예측 옵티컬 플로우로 결정할 수 있다.In an embodiment, the image encoding apparatus 1200 may determine a previous optical flow as a current prediction optical flow.

다른 실시예에서, 영상 부호화 장치(1200)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 1 예측 신경망(610)에 적용하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In another embodiment, the image encoding apparatus 1200 applies at least one of feature data for a previous optical flow, a previous optical flow, and a previous residual optical flow to the first prediction neural network 610 to predict the current Optical flow can be obtained.

또 다른 실시예에서, 영상 부호화 장치(1200)는 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 2 예측 신경망(710)에 적용하여 세컨드-오더 옵티컬 플로우를 획득하고, 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In another embodiment, the image encoding apparatus 1200 applies at least one of the feature data for the previous optical flow, the previous optical flow, and the feature data for the previous residual optical flow to the second prediction neural network 710 so that the second- An order optical flow may be obtained, and a previous optical flow may be processed according to the second-order optical flow to obtain a current predicted optical flow.

또 다른 실시예에서, 영상 부호화 장치(1200)는 현재 영상, 이전 복원 영상, 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 3 인코더(1410)에 적용하여 세컨드-오더 옵티컬 플로우의 특징 데이터를 획득하고, 세컨드-오더 옵티컬 플로우의 특징 데이터를 제 3 디코더(810)에 적용하여 세컨드-오더 옵티컬 플로우를 획득한다. 그리고, 영상 부호화 장치(1200)는 이전 옵티컬 플로우를 세컨드-오더 옵티컬 플로우에 따라 처리하여 현재의 예측 옵티컬 플로우를 획득할 수 있다.In another embodiment, the image encoding apparatus 1200 transmits at least one of feature data for the current image, the previous reconstructed image, the previous optical flow, the feature data for the previous optical flow, and the feature data for the previous residual optical flow to the third encoder 1410 ) to obtain feature data of a second-order optical flow, and apply the feature data of the second-order optical flow to the third decoder 810 to obtain a second-order optical flow. In addition, the image encoding apparatus 1200 may obtain a current predicted optical flow by processing the previous optical flow according to the second-order optical flow.

S1620 단계에서, 영상 부호화 장치(1200)는 현재 영상, 이전 복원 영상 및 현재의 예측 옵티컬 플로우 중 적어도 하나를 신경망 기반의 제 1 인코더(1211)에 적용하여 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득한다.In step S1620, the image encoding apparatus 1200 applies at least one of a current image, a previously reconstructed image, and a current prediction optical flow to the first encoder 1211 based on a neural network to obtain feature data for the current residual optical flow. do.

S1630 단계에서, 영상 부호화 장치(1200)는 현재의 잔차 옵티컬 플로우에 대한 특징 데이터에 대응하는 비트스트림을 생성한다. In operation S1630, the image encoding apparatus 1200 generates a bitstream corresponding to feature data of the current residual optical flow.

일 실시예에서, 비트스트림은 세컨드-오더 옵티컬 플로우의 특징 데이터 및/또는 현재의 잔차 영상 데이터의 특징 데이터를 더 포함할 수 있다.In an embodiment, the bitstream may further include feature data of a second-order optical flow and/or feature data of current residual image data.

일 실시예에서, 영상 부호화 장치(1200)는 현재의 잔차 옵티컬 플로우에 대한 특징 데이터로부터 현재 옵티컬 플로우를 복원하고, 복원된 현재 옵티컬 플로우를 기초로 이전 복원 영상을 처리하여 현재 예측 영상을 획득한다. 그리고, 영상 부호화 장치(1200)는 현재 예측 영상과 현재 영상 사이의 차이에 대응하는 현재의 잔차 영상 데이터를 제 2 인코더(1215)에 적용하여 현재의 잔차 영상 데이터의 특징 데이터를 획득할 수 있다. 현재의 잔차 영상 데이터의 특징 데이터는 비트스트림에 포함될 수 있다.In an embodiment, the image encoding apparatus 1200 reconstructs a current optical flow from feature data of the current residual optical flow, and processes a previously reconstructed image based on the reconstructed current optical flow to obtain a current predicted image. In addition, the image encoding apparatus 1200 may obtain feature data of the current residual image data by applying the current residual image data corresponding to the difference between the current prediction image and the current image to the second encoder 1215 . The feature data of the current residual image data may be included in the bitstream.

다른 실시예에서, 영상 부호화 장치(1200)는 현재의 잔차 옵티컬 플로우에 대한 특징 데이터로부터 현재 옵티컬 플로우를 복원하고, 복원된 현재 옵티컬 플로우를 기초로 이전 복원 영상을 처리하여 현재 예측 영상을 획득한다. 그리고, 현재 예측 영상과 현재 영상 사이의 차이에 대응하는 현재의 잔차 영상 데이터를 비트스트림에 포함시킬 수 수 있다.In another embodiment, the image encoding apparatus 1200 reconstructs a current optical flow from feature data of the current residual optical flow, and processes a previous reconstructed image based on the reconstructed current optical flow to obtain a current predicted image. In addition, current residual image data corresponding to a difference between the current prediction image and the current image may be included in the bitstream.

한편, 도 12 내지 도 16과 관련하여 설명한 부호화 과정은, 이전 영상이 인터 예측을 통해 처리된 경우를 고려한 것이다. 왜냐하면, 현재 옵티컬 플로우를 부호화하는데 이용되는 이전 옵티컬 플로우는 이전 영상의 인터 예측 과정에서 생성된 것이기 때문이다.Meanwhile, the encoding process described with reference to FIGS. 12 to 16 considers a case in which a previous image is processed through inter prediction. This is because the previous optical flow used to encode the current optical flow is generated in the inter prediction process of the previous image.

즉, 도 12 내지 도 16과 관련하여 설명한 부호화 과정은 현재 영상이 P 프레임 다음의 P 프레임에 해당하는 경우에 적용될 수 있다. 만약 이전 영상이 I 프레임이라면, 이전 옵티컬 플로우는 획득되지 않으므로, 이하에서는, 현재 영상이 I 프레임 다음의 P 프레임인 경우를 위한 부호화 과정에 대해 설명한다.That is, the encoding process described with reference to FIGS. 12 to 16 may be applied when the current image corresponds to the P frame following the P frame. If the previous image is an I frame, the previous optical flow is not obtained. Hereinafter, an encoding process for a case in which the current image is a P frame after the I frame will be described.

도 17은 예측 부호화부(1210)의 다른 구성을 도시하는 도면이다.17 is a diagram showing another configuration of the predictive encoding unit 1210 .

도 17을 참조하면, 예측 부호화부(1210)는 제 4 인코더(1710), 제 2 인코더(1215) 및 차감부(1213)를 포함한다.Referring to FIG. 17 , the prediction encoder 1210 includes a fourth encoder 1710 , a second encoder 1215 , and a subtractor 1213 .

제 4 인코더(1710) 및 제 2 인코더(1215)는 메모리에 저장될 수 있다. 일 실시예에서, 제 4 인코더(1710) 및 제 2 인코더(1215)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The fourth encoder 1710 and the second encoder 1215 may be stored in a memory. In one embodiment, the fourth encoder 1710 and the second encoder 1215 may be implemented as at least one dedicated processor for AI.

제 4 인코더(1710)는 훈련에 따라 설정된 파라미터에 따라 현재 영상 및 이전 복원 영상을 처리하여 현재 옵티컬 플로우의 특징 데이터를 획득한다.The fourth encoder 1710 obtains feature data of the current optical flow by processing the current image and the previous reconstructed image according to parameters set according to training.

도 12에 도시된 예측 복호화부(1270)는 현재 옵티컬 플로우의 특징 데이터에 기초하여 현재 옵티컬 플로우를 복원하고, 현재 옵티컬 플로우에 따라 이전 복원 영상으로부터 생성된 현재 예측 영상을 차감부(1213)로 제공된다. 예측 복호화부(1270)는 현재 옵티컬 플로우의 복원을 위해 도 10에 도시된 제 4 디코더(1010)를 이용할 수 있다.The prediction decoding unit 1270 shown in FIG. 12 reconstructs a current optical flow based on feature data of the current optical flow, and provides a current prediction image generated from a previous reconstructed image according to the current optical flow to the subtractor 1213. do. The prediction decoder 1270 may use the fourth decoder 1010 shown in FIG. 10 to restore the current optical flow.

차감부(1213)는 현재 영상과 현재 예측 영상 사이의 현재의 잔차 영상 데이터를 획득한다. 차감부(1213)는 현재 영상의 샘플 값들로부터 현재 예측 영상의 샘플 값들을 차감하여 현재의 잔차 영상 데이터를 획득할 수 있다.The subtractor 1213 obtains current residual image data between the current image and the current prediction image. The subtractor 1213 may obtain current residual image data by subtracting sample values of the current prediction image from sample values of the current image.

현재의 잔차 영상 데이터는 제 2 인코더(1215)로 입력되고, 제 2 인코더(1215)는 훈련의 결과로 설정된 파라미터에 따라 현재의 잔차 영상 데이터를 처리하여 현재의 잔차 영상 데이터의 특징 데이터를 출력한다. The current residual image data is input to the second encoder 1215, and the second encoder 1215 processes the current residual image data according to parameters set as a result of training to output feature data of the current residual image data. .

생성부(1230)는 예측 부호화부(1210)로부터 출력된 현재 옵티컬 플로우의 특징 데이터 및 현재의 잔차 영상 데이터의 특징 데이터에 기초하여 비트스트림을 생성한다.The generator 1230 generates a bitstream based on the feature data of the current optical flow output from the prediction encoder 1210 and the feature data of the current residual image data.

비트스트림은 네트워크를 통해 영상 복호화 장치(300)로부터 전송될 수 있다. 또한, 일 실시예에서, 비트스트림은 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium) 등을 포함하는 데이터 저장 매체에 기록될 수도 있다.The bitstream may be transmitted from the image decoding apparatus 300 through a network. Further, in one embodiment, the bitstream is a hard disk, magnetic media such as floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floppy disks. It may be recorded on a data storage medium including an optical medium).

도 13 및 도 17에는 도시되어 있지 않지만, 예측 부호화부(1210)는 현재 영상이 I 프레임 다음의 P 프레임인지, 아니면 P 프레임 다음의 P 프레임인지를 판단하는 판단부를 더 포함할 수 있다.Although not shown in FIGS. 13 and 17 , the prediction encoding unit 1210 may further include a determination unit determining whether the current image is a P frame following the I frame or a P frame following the P frame.

예측 부호화부(1210)는 현재 영상이 P 프레임 다음의 P 프레임인 경우, 도 13에 도시된 옵티컬 플로우 예측부(1217) 및 제 1 인코더(1211)를 통해 현재의 잔차 옵티컬 플로우의 특징 데이터를 획득하고, 현재 영상이 I 프레임 다음의 P 프레임인 경우, 도 17에 도시된 제 4 인코더(1710)를 통해 현재 옵티컬 플로우의 특징 데이터를 획득할 수 있다.The prediction encoder 1210 obtains feature data of the current residual optical flow through the optical flow predictor 1217 and the first encoder 1211 shown in FIG. 13 when the current image is a P frame after the P frame. and, when the current image is the P frame after the I frame, the feature data of the current optical flow may be obtained through the fourth encoder 1710 illustrated in FIG. 17 .

한편, 전술한, 제 1 인코더(1211), 제 2 인코더(1215), 제 3 인코더(1410), 제 4 인코더(1710), 제 1 디코더(331), 제 2 디코더(333), 제 3 디코더(810), 제 4 디코더(1010), 제 1 예측 신경망(610) 및 제 2 예측 신경망(710) 중 적어도 하나는 컨볼루션 레이어를 포함할 수 있다. Meanwhile, as described above, the first encoder 1211 , the second encoder 1215 , the third encoder 1410 , the fourth encoder 1710 , the first decoder 331 , the second decoder 333 , and the third decoder At least one of 810 , the fourth decoder 1010 , the first prediction neural network 610 , and the second prediction neural network 710 may include a convolutional layer.

제 1 인코더(1211), 제 2 인코더(1215), 제 3 인코더(1410), 제 4 인코더(1710), 제 1 디코더(331), 제 2 디코더(333), 제 3 디코더(810), 제 4 디코더(1010), 제 1 예측 신경망(610) 및 제 2 예측 신경망(710)이 가질 수 있는 구조에 대해 도 18을 참조하여 설명한다.First encoder 1211 , second encoder 1215 , third encoder 1410 , fourth encoder 1710 , first decoder 331 , second decoder 333 , third decoder 810 , 4 A structure that the decoder 1010 , the first prediction neural network 610 , and the second prediction neural network 710 may have will be described with reference to FIG. 18 .

도 18은 일 실시예에 따른 신경망(1800)의 구조를 예시하는 도면이다.18 is a diagram illustrating a structure of a neural network 1800 according to an embodiment.

도 18에 도시된 바와 같이, 입력 데이터(1805)는 제 1 컨볼루션 레이어(1810)로 입력된다. 여기서, 입력 데이터(1805)는 신경망(1800)이 제 1 인코더(1211), 제 2 인코더(1215), 제 3 인코더(1410), 제 4 인코더(1710), 제 1 디코더(331), 제 2 디코더(333), 제 3 디코더(810), 제 4 디코더(1010), 제 1 예측 신경망(610) 및 제 2 예측 신경망(710) 중 어느 것인지 따라 달라진다. 18 , input data 1805 is input to a first convolutional layer 1810 . Here, the input data 1805 is the first encoder 1211 , the second encoder 1215 , the third encoder 1410 , the fourth encoder 1710 , the first decoder 331 , and the second It depends on which one of the decoder 333 , the third decoder 810 , the fourth decoder 1010 , the first prediction neural network 610 , and the second prediction neural network 710 .

일 예로, 신경망(1800)이 제 1 인코더(1211)인 경우, 입력 데이터(1805)는 현재 영상, 이전 복원 영상 및 예측 옵티컬 플로우가 연접된(concatenated) 결과에 대응하고, 신경망(1800)이 제 2 인코더(1215)의 경우, 입력 데이터(1805)는 현재의 잔차 영상 데이터에 대응할 수 있다.For example, when the neural network 1800 is the first encoder 1211, the input data 1805 corresponds to a result in which the current image, the previous reconstructed image, and the predicted optical flow are concatenated, and the neural network 1800 is the second In the case of the second encoder 1215 , the input data 1805 may correspond to current residual image data.

도 18에 도시된 제 1 컨볼루션 레이어(1810)에 표시된 3X3X4는 3x3의 크기의 4개의 필터 커널을 이용하여 1개의 입력 데이터(1805)에 대해 컨볼루션 처리를 하는 것을 예시한다. 컨볼루션 처리 결과 4개의 필터 커널에 의해 4개의 특징 맵이 생성된다. 3X3X4 displayed in the first convolutional layer 1810 shown in FIG. 18 exemplifies convolution processing on one input data 1805 using four filter kernels having a size of 3x3. As a result of the convolution process, four feature maps are generated by four filter kernels.

제 1 컨볼루션 레이어(1810)에 의해 생성된 특징 맵들은 입력 데이터(1805)의 고유한 특성들을 나타낸다. 예를 들어, 각 특징 맵은 입력 데이터(1805)의 수직 방향 특성, 수평 방향 특성 또는 에지 특성 등을 나타낼 수 있다.The feature maps generated by the first convolutional layer 1810 represent unique properties of the input data 1805 . For example, each feature map may indicate a vertical direction characteristic, a horizontal direction characteristic, or an edge characteristic of the input data 1805 .

도 19를 참조하여, 제 1 컨볼루션 레이어(1810)에서의 컨볼루션 연산에 대해 상세히 설명한다.A convolution operation in the first convolution layer 1810 will be described in detail with reference to FIG. 19 .

제 1 컨볼루션 레이어(1810)에서 이용되는 3X3의 크기를 갖는 필터 커널(1930)의 파라미터들과 그에 대응하는 입력 데이터(1805) 내 샘플 값들 사이의 곱 연산 및 덧셈 연산을 통해 하나의 특징 맵(1950)이 생성될 수 있다. 제 1 컨볼루션 레이어(1810)에서는 4개의 필터 커널(1930)이 이용되므로, 4개의 필터 커널(1930)을 이용한 컨볼루션 연산 과정을 통해 4개의 특징 맵(1950)이 생성될 수 있다.One feature map ( 1950) can be created. Since four filter kernels 1930 are used in the first convolution layer 1810 , four feature maps 1950 may be generated through a convolution operation process using the four filter kernels 1930 .

도 19에서 입력 데이터(1805)에 표시된 I1 내지 I49는 입력 데이터(1805)의 샘플들을 나타내고, 필터 커널(1930)에 표시된 F1 내지 F9는 필터 커널(1930)의 샘플(파라미터로 참조될 수도 있다)들을 나타낸다. 또한, 특징 맵(1950)에 표시된 M1 내지 M9는 특징 맵(1950)의 샘플들을 나타낸다. In FIG. 19 , I1 to I49 indicated in the input data 1805 indicate samples of the input data 1805 , and F1 to F9 indicated in the filter kernel 1930 are samples of the filter kernel 1930 (it may be referred to as a parameter). indicate the Also, M1 to M9 displayed in the feature map 1950 represent samples of the feature map 1950 .

컨볼루션 연산 과정에서, 입력 데이터(1805)의 I1, I2, I3, I8, I9, I10, I15, I16, I17의 샘플 값들 각각과 필터 커널(1930)의 F1, F2, F3, F4, F5, F6, F7, F8 및 F9 각각의 곱 연산이 수행되고, 곱 연산의 결과 값들을 조합(예를 들어, 덧셈 연산)한 값이 특징 맵(1950)의 M1의 값으로 할당될 수 있다. 컨볼루션 연산의 스트라이드(stride)가 2라면, 입력 데이터(1805)의 I3, I4, I5, I10, I11, I12, I17, I18, I19의 샘플 값들 각각과 필터 커널(1930)의 F1, F2, F3, F4, F5, F6, F7, F8 및 F9 각각의 곱 연산이 수행되고, 곱 연산의 결과 값들을 조합한 값이 특징 맵(1950)의 M2의 값으로 할당될 수 있다.In the convolution operation process, each of the sample values of I1, I2, I3, I8, I9, I10, I15, I16, and I17 of the input data 1805 and F1, F2, F3, F4, F5, Each multiplication operation of F6, F7, F8, and F9 may be performed, and a value obtained by combining (eg, addition operation) result values of the multiplication operation may be assigned as the value of M1 of the feature map 1950 . If the stride of the convolution operation is 2, each of the sample values of I3, I4, I5, I10, I11, I12, I17, I18, I19 of the input data 1805 and F1, F2 of the filter kernel 1930, Each product operation of F3, F4, F5, F6, F7, F8, and F9 may be performed, and a value obtained by combining result values of the product operation may be assigned as the value of M2 of the feature map 1950 .

필터 커널(1930)이 입력 데이터(1805)의 마지막 샘플에 도달할 때까지 스트라이드에 따라 이동하는 동안 입력 데이터(1805) 내 샘플 값들과 필터 커널(1930)의 샘플들 사이의 컨볼루션 연산이 수행됨으로써, 소정 크기를 갖는 특징 맵(1950)이 획득될 수 있다.A convolution operation between sample values in the input data 1805 and samples of the filter kernel 1930 is performed while the filter kernel 1930 moves along the stride until the last sample of the input data 1805 is reached. , a feature map 1950 having a predetermined size may be obtained.

본 개시에 따르면, 신경망(1800)에 대한 훈련을 통해 신경망(1800)의 파라미터들, 예를 들어, 신경망(1800)의 컨볼루션 레이어들에서 이용되는 필터 커널(1930)의 샘플들(예를 들어, 필터 커널(1930)의 F1, F2, F3, F4, F5, F6, F7, F8 및 F9)의 값이 최적화될 수 있다. According to the present disclosure, through training on the neural network 1800, parameters of the neural network 1800, for example, samples of the filter kernel 1930 used in convolutional layers of the neural network 1800 (for example, , values of F1, F2, F3, F4, F5, F6, F7, F8, and F9 of the filter kernel 1930 may be optimized.

신경망(1800)에 포함된 컨볼루션 레이어들은 도 19와 관련하여 설명한 컨볼루션 연산 과정에 따른 처리를 할 수 있으나, 도 19에서 설명한 컨볼루션 연산 과정은 하나의 예시일 뿐이며, 이에 한정되는 것은 아니다.The convolution layers included in the neural network 1800 may be processed according to the convolution operation process described in relation to FIG. 19 , but the convolution operation process described in FIG. 19 is only an example, and is not limited thereto.

다시 도 18을 참조하면, 제 1 컨볼루션 레이어(1810)의 특징 맵들은 제 1 활성화 레이어(1820)로 입력된다. Referring back to FIG. 18 , the feature maps of the first convolutional layer 1810 are input to the first activation layer 1820 .

제 1 활성화 레이어(1820)는 각각의 특징 맵에 대해 비선형(Non-linear) 특성을 부여할 수 있다. 제 1 활성화 레이어(1820)는 시그모이드 함수(sigmoid function), Tanh 함수, ReLU(Rectified Linear Unit) 함수 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.The first activation layer 1820 may provide a non-linear characteristic to each feature map. The first activation layer 1820 may include, but is not limited to, a sigmoid function, a Tanh function, a Rectified Linear Unit (ReLU) function, and the like.

제 1 활성화 레이어(1820)에서 비선형 특성을 부여하는 것은, 특징 맵들의 일부 샘플 값을 변경하여 출력하는 것을 의미한다. 이때, 변경은 비선형 특성을 적용하여 수행된다.Giving the nonlinear characteristic to the first activation layer 1820 means changing and outputting some sample values of the feature maps. At this time, the change is performed by applying a non-linear characteristic.

제 1 활성화 레이어(1820)는 특징 맵의 샘플 값들을 제 2 컨볼루션 레이어(1830)로 전달할지 여부를 결정한다. 예를 들어, 특징 맵의 샘플 값들 중 어떤 샘플 값들은 제 1 활성화 레이어(1820)에 의해 활성화되어 제 2 컨볼루션 레이어(1830)로 전달되고, 어떤 샘플 값들은 제 1 활성화 레이어(1820)에 의해 비활성화되어 제 2 컨볼루션 레이어(1830)로 전달되지 않는다. 특징 맵들이 나타내는 입력 데이터(1805)의 고유 특성이 제 1 활성화 레이어(1820)에 의해 강조된다.The first activation layer 1820 determines whether to transfer the sample values of the feature map to the second convolution layer 1830 . For example, some sample values of the sample values of the feature map are activated by the first activation layer 1820 and transmitted to the second convolution layer 1830 , and some sample values are activated by the first activation layer 1820 . It is deactivated and is not transmitted to the second convolutional layer 1830 . A unique characteristic of the input data 1805 represented by the feature maps is emphasized by the first activation layer 1820 .

제 1 활성화 레이어(1820)에서 출력된 특징 맵들(1825)은 제 2 컨볼루션 레이어(1830)로 입력된다. 도 18에 도시된 특징 맵들(1825) 중 어느 하나는 도 19와 관련하여 설명한 특징 맵(1950)이 제 1 활성화 레이어(1820)에서 처리된 결과이다. The feature maps 1825 output from the first activation layer 1820 are input to the second convolution layer 1830 . Any one of the feature maps 1825 shown in FIG. 18 is a result of processing the feature map 1950 described with reference to FIG. 19 in the first activation layer 1820 .

제 2 컨볼루션 레이어(1830)에 표시된 3X3X4는 3x3의 크기의 4개의 필터 커널을 이용하여 입력된 특징 맵들(1825)에 대해 컨볼루션 처리하는 것을 예시한다. 제 2 컨볼루션 레이어(1830)의 출력은 제 2 활성화 레이어(1840)로 입력된다. 제 2 활성화 레이어(1840)는 입력된 특징 맵들에 대해 비선형 특성을 부여할 수 있다.3X3X4 displayed in the second convolution layer 1830 exemplifies convolution processing on the input feature maps 1825 using four filter kernels having a size of 3x3. The output of the second convolutional layer 1830 is input to the second activation layer 1840 . The second activation layer 1840 may provide a non-linear characteristic to the input feature maps.

제 2 활성화 레이어(1840)에서 출력된 특징 맵들(1845)은 제 3 컨볼루션 레이어(1850)로 입력된다. 제 3 컨볼루션 레이어(1850)에 표시된 3X3X1은 3x3의 크기의 1개의 필터 커널을 이용하여 1개의 출력 데이터(1855)를 만들기 위해 컨볼루션 처리를 하는 것을 예시한다. The feature maps 1845 output from the second activation layer 1840 are input to the third convolution layer 1850 . 3X3X1 displayed in the third convolution layer 1850 exemplifies convolution processing to generate one output data 1855 using one filter kernel having a size of 3x3.

출력 데이터(1855)는 신경망(1800)이 제 1 인코더(1211), 제 2 인코더(1215), 제 3 인코더(1410), 제 4 인코더(1710), 제 1 디코더(331), 제 2 디코더(333), 제 3 디코더(810), 제 4 디코더(1010), 제 1 예측 신경망(610) 및 제 2 예측 신경망(710) 중 어느 것인지 따라 달라진다. The output data 1855 is the neural network 1800 of the first encoder 1211, the second encoder 1215, the third encoder 1410, the fourth encoder 1710, the first decoder 331, the second decoder ( 333 ), the third decoder 810 , the fourth decoder 1010 , the first prediction neural network 610 , and the second prediction neural network 710 .

일 예로, 신경망(1800)이 제 1 인코더(1211)인 경우, 출력 데이터(1855)는 현재의 잔차 옵티컬 플로우에 대한 특징 데이터이고, 신경망(1800)이 제 2 인코더(1215)인 경우, 출력 데이터(1855)는 현재의 잔차 영상 데이터에 대한 특징 데이터일 수 있다.For example, when the neural network 1800 is the first encoder 1211 , the output data 1855 is feature data for the current residual optical flow, and when the neural network 1800 is the second encoder 1215 , the output data 1855 may be feature data for the current residual image data.

도 18은 신경망(1800)이 세 개의 컨볼루션 레이어와 두 개의 활성화 레이어를 포함하고 있는 것으로 도시하고 있으나, 이는 하나의 예시일 뿐이며, 구현예에 따라서, 신경망(1800)에 포함된 컨볼루션 레이어 및 활성화 레이어의 개수는 다양하게 변경될 수 있다. 18 shows that the neural network 1800 includes three convolutional layers and two activation layers, but this is only an example, and according to an embodiment, the convolutional layer included in the neural network 1800 and The number of activation layers may be variously changed.

또한, 구현예에 따라서, 신경망(1800)은 RNN(recurrent neural network)을 통해 구현될 수도 있다. 이 경우는 본 개시의 예시에 따른 신경망(1800)의 CNN 구조를 RNN 구조로 변경하는 것을 의미한다.Also, depending on the implementation, the neural network 1800 may be implemented through a recurrent neural network (RNN). In this case, it means changing the CNN structure of the neural network 1800 according to the example of the present disclosure to the RNN structure.

일 실시예에서, 영상 복호화 장치(300) 및 영상 부호화 장치(1200)는 전술한 컨볼루션 연산 및 활성화 레이어의 연산을 위한 적어도 하나의 ALU(Arithmetic logic unit)를 포함할 수 있다. In an embodiment, the image decoding apparatus 300 and the image encoding apparatus 1200 may include at least one arithmetic logic unit (ALU) for the above-described convolution operation and operation of the activation layer.

ALU는 프로세서로 구현될 수 있다. 컨볼루션 연산을 위해, ALU는 입력 데이터(1805) 또는 이전 레이어에서 출력된 특징 맵의 샘플 값들과 필터 커널의 샘플 값들 사이의 곱 연산을 수행하는 곱셈기 및 곱셈의 결과 값들을 더하는 가산기를 포함할 수 있다. The ALU may be implemented as a processor. For the convolution operation, the ALU may include a multiplier that performs a multiplication operation between the input data 1805 or the sample values of the feature map output from the previous layer and the sample values of the filter kernel, and an adder that adds the result values of the multiplication. have.

활성화 레이어의 연산을 위해, ALU는 미리 결정된 시그모이드 함수, Tanh 함수 또는 ReLU 함수 등에서 이용되는 가중치를 입력된 샘플 값에 곱하는 곱셈기, 및 곱한 결과와 소정 값을 비교하여 입력된 샘플 값을 다음 레이어로 전달할지를 판단하는 비교기를 포함할 수 있다.For the calculation of the activation layer, the ALU is a multiplier that multiplies an input sample value by a weight used in a predetermined sigmoid function, a Tanh function, or a ReLU function, and compares the multiplication result with a predetermined value to convert the input sample value to the next layer It may include a comparator that determines whether to transfer to .

이하에서는, 도 20 내지 도 22를 참조하여, 영상의 부호화 및 복호화 과정에서 이용되는 신경망들의 훈련 방법에 대해 설명한다.Hereinafter, a training method of neural networks used in an image encoding and decoding process will be described with reference to FIGS. 20 to 22 .

도 20은 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망(예를 들어, 도 6에 도시된 제 1 예측 신경망(610), 도 7에 도시된 제 2 예측 신경망(710), 또는 도 14에 도시된 제 3 디코더(810)와 제 3 인코더(1410))의 훈련 방법을 설명하기 위한 도면이다.20 is a first decoder 331 , a second decoder 333 , a first encoder 1211 , a second encoder 1215 , and a neural network used in an optical flow prediction process 2090 (eg, FIG. 6 ). To explain the training method of the first prediction neural network 610 shown in Fig. 7, the second prediction neural network 710 shown in Fig. 7, or the third decoder 810 and the third encoder 1410 shown in Fig. 14) is a drawing for

도 20에서, 현재 훈련 영상(2010), 이전의 복원 훈련 영상(2030) 및 현재의 복원 훈련 영상(2050)은 각각 전술한 현재 영상, 이전 복원 영상 및 현재 복원 영상에 대응한다.In FIG. 20 , a current training image 2010 , a previous reconstructed training image 2030 , and a current reconstructed training image 2050 correspond to the aforementioned current image, the previous reconstructed image, and the current reconstructed image, respectively.

제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망을 훈련시키는데 있어, 현재의 복원 훈련 영상(2050)이 현재 훈련 영상(2010)과 어느 정도로 유사한지, 그리고 현재 훈련 영상(2010)에 대한 부호화를 통해 생성되는 비트스트림의 비트레이트가 어느 정도로 큰지가 고려되어야 한다. 이를 위해, 일 실시예에서는 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 유사도에 대응하는 제 1 손실 정보(2060), 및 비트스트림의 크기가 어느 정도로 큰지에 대응하는 제 2 손실 정보(2070)와 제 3 손실 정보(2080)에 따라 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망이 훈련될 수 있다.In training the neural network used in the first decoder 331 , the second decoder 333 , the first encoder 1211 , the second encoder 1215 , and the optical flow prediction process 2090 , the current reconstruction training image It should be considered how similar 2050 is to the current training image 2010 and how large the bitrate of a bitstream generated through encoding of the current training image 2010 is. To this end, in one embodiment, the first loss information 2060 corresponding to the similarity between the current training image 2010 and the current reconstruction training image 2050, and the second corresponding to how large the size of the bitstream is The first decoder 331 , the second decoder 333 , the first encoder 1211 , the second encoder 1215 and the optical flow prediction process 2090 according to the loss information 2070 and the third loss information 2080 ) can be trained.

도 20을 참조하면, 옵티컬 플로우 예측 과정(2090)을 통해 현재의 예측 옵티컬 플로우가 획득된다. 현재의 예측 옵티컬 플로우는 도 6과 관련하여 설명한 실시예, 도 7과 관련하여 설명한 실시예 또는 도 14와 관련하여 설명한 실시예에 따라 획득될 수 있다. 구현예에 따라, 이전 옵티컬 플로우가 현재의 예측 옵티컬 플로우로 결정될 수도 있다.Referring to FIG. 20 , a current predicted optical flow is obtained through an optical flow prediction process 2090 . The current prediction optical flow may be obtained according to the embodiment described with reference to FIG. 6 , the embodiment described with reference to FIG. 7 , or the embodiment described with reference to FIG. 14 . Depending on the implementation, the previous optical flow may be determined as the current prediction optical flow.

현재의 예측 옵티컬 플로우, 현재 훈련 영상(2010) 및 이전의 복원 훈련 영상(2030)은 제 1 인코더(1211)로 입력된다. 제 1 인코더(1211)는 현재의 예측 옵티컬 플로우, 현재 훈련 영상(2010) 및 이전의 복원 훈련 영상(2030)을 처리하여 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)를 출력한다.The current prediction optical flow, the current training image 2010 and the previous reconstructed training image 2030 are input to the first encoder 1211 . The first encoder 1211 processes the current prediction optical flow, the current training image 2010, and the previous reconstructed training image 2030 to output feature data h i of the current residual optical flow.

현재의 잔차 옵티컬 플로우의 특징 데이터(hi)는 제 1 디코더(331)로 입력되고, 제 1 디코더(331)는 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)를 처리하여 현재의 잔차 옵티컬 플로우(di)를 출력한다.The feature data h i of the current residual optical flow is input to the first decoder 331 , and the first decoder 331 processes the feature data h i of the current residual optical flow to process the current residual optical flow. (d i ) is printed.

현재의 예측 옵티컬 플로우와 현재의 잔차 옵티컬 플로우(di)가 결합(2095)됨으로써, 현재 옵티컬 플로우(gi)가 획득된다.The current prediction optical flow and the current residual optical flow d i are combined 2095 to obtain the current optical flow g i .

이전의 복원 훈련 영상(2030)이 현재 옵티컬 플로우(gi)에 따라 워핑(190)됨으로써 현재의 예측 훈련 영상(x'i)이 생성되고, 현재의 예측 훈련 영상(x'i)과 현재 훈련 영상(2010) 사이의 차이에 대응하는 현재의 잔차 영상 데이터(ri)가 획득된다.The previous reconstruction training image 2030 is warped 190 according to the current optical flow (g i ) to generate a current prediction training image (x' i ), and the current prediction training image (x' i ) and the current training Current residual image data r i corresponding to the difference between images 2010 is obtained.

현재의 잔차 영상 데이터(ri)는 제 2 인코더(1215)로 입력되고, 제 2 인코더(1215)는 현재의 잔차 영상 데이터(ri)를 처리하여 현재의 잔차 영상 데이터의 특징 데이터(vi)를 출력한다. The current residual image data (r i ) is input to the second encoder 1215 , and the second encoder 1215 processes the current residual image data (ri ) to obtain feature data ( vi ) of the current residual image data. ) is output.

현재의 잔차 영상 데이터의 특징 데이터(vi)는 제 2 디코더(333)로 입력된다.The feature data ( vi ) of the current residual image data is input to the second decoder 333 .

제 2 디코더(333)는 현재의 잔차 영상 데이터의 특징 데이터(vi)를 처리하여 현재의 잔차 영상 데이터(r'i)를 출력하고, 현재의 예측 훈련 영상(x'i)과 현재의 잔차 영상 데이터(r'i)가 합해짐으로써 현재의 복원 훈련 영상(2050)이 획득된다.The second decoder 333 processes the feature data ( vi) of the current residual image data to output the current residual image data (r' i ) , and the current prediction training image (x' i ) and the current residual The current reconstruction training image 2050 is obtained by summing the image data r′ i .

제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망의 훈련을 위해, 제 1 손실 정보(2060), 제 2 손실 정보(2070) 및 제 3 손실 정보(2080) 중 적어도 하나가 획득될 수 있다.For training the neural network used in the first decoder 331, the second decoder 333, the first encoder 1211, the second encoder 1215, and the optical flow prediction process 2090, the first loss information ( 2060 ), at least one of the second loss information 2070 , and the third loss information 2080 may be obtained.

제 1 손실 정보(2060)는 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 차이에 대응한다. 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 차이는, 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 L1-norm 값, L2-norm 값, SSIM(Structural Similarity) 값, PSNR-HVS(Peak Signal-To-Noise Ratio-Human Vision System) 값, MS-SSIM(Multiscale SSIM) 값, VIF(Variance Inflation Factor) 값 및 VMAF(Video Multimethod Assessment Fusion) 값 중 적어도 하나를 포함할 수 있다.The first loss information 2060 corresponds to a difference between the current training image 2010 and the current reconstruction training image 2050 . The difference between the current training image 2010 and the current reconstruction training image 2050 is the L1-norm value, the L2-norm value, and the SSIM (Structural) value between the current training image 2010 and the current reconstruction training image 2050 At least one of a similarity) value, a Peak Signal-To-Noise Ratio-Human Vision System (PSNR-HVS) value, a Multiscale SSIM (MS-SSIM) value, a Variance Inflation Factor (VIF) value, and a Video Multimethod Assessment Fusion (VMAF) value. may include

제 1 손실 정보(2060)는 현재의 복원 훈련 영상(2050)의 퀄리티와 관련이 있으므로, 제 1 손실 정보(2060)는 퀄리티 손실 정보로 참조될 수도 있다.Since the first loss information 2060 is related to the quality of the current reconstruction training image 2050 , the first loss information 2060 may be referred to as quality loss information.

제 2 손실 정보(2070)는 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)의 엔트로피 또는 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)에 대응하는 비트스트림의 비트레이트에 대응한다. 또한, 제 3 손실 정보(2080)는 현재의 잔차 영상 데이터의 특징 데이터(vi)의 엔트로피 또는 현재의 잔차 영상 데이터의 특징 데이터(vi)에 대응하는 비트스트림의 비트레이트에 대응한다.The second loss information 2070 corresponds to the entropy of the feature data h i of the current residual optical flow or the bit rate of the bitstream corresponding to the feature data h i of the current residual optical flow. In addition, the third loss information 2080 corresponds to the entropy of the feature data ( vi ) of the current residual image data or the bit rate of the bitstream corresponding to the feature data ( vi ) of the current residual image data.

비트스트림이 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)와 현재의 잔차 영상 데이터의 특징 데이터(vi)를 모두 포함한다면, 해당 비트스트림의 비트레이트에 대응하는 제 4 손실 정보가 산출될 수 있다. 이 경우, 제 2 손실 정보(2070) 및 제 3 손실 정보(2080)는 훈련에 이용되지 않을 수 있다.If the bitstream includes both the feature data (h i ) of the current residual optical flow and the feature data ( vi ) of the current residual image data, fourth loss information corresponding to the bitrate of the corresponding bitstream can be calculated. have. In this case, the second loss information 2070 and the third loss information 2080 may not be used for training.

제 2 손실 정보(2070)와 제 3 손실 정보(2080)는, 현재 훈련 영상(2010)에 대한 부호화 효율에 관련되므로, 제 2 손실 정보(2070)와 제 3 손실 정보(2080)는 압축도 손실 정보로 참조될 수 있다.Since the second loss information 2070 and the third loss information 2080 are related to the encoding efficiency of the current training image 2010, the second loss information 2070 and the third loss information 2080 have compression loss. Information can be referenced.

제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망은 제 1 손실 정보(2060), 제 2 손실 정보(2070) 및 제 3 손실 정보(2080) 중 적어도 하나로부터 도출되는 최종 손실 정보가 감소 또는 최소화되도록 훈련된다. The first decoder 331 , the second decoder 333 , the first encoder 1211 , the second encoder 1215 , and the neural network used in the optical flow prediction process 2090 includes the first loss information 2060 , the first The final loss information derived from at least one of the second loss information 2070 and the third loss information 2080 is trained to be reduced or minimized.

구체적으로, 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망은 미리 설정된 파라미터의 값을 변경하면서 최종 손실 정보가 감소 또는 최소화되도록 한다.Specifically, the first decoder 331 , the second decoder 333 , the first encoder 1211 , the second encoder 1215 , and the neural network used in the optical flow prediction process 2090 determine the value of the preset parameter. Change so that the final loss information is reduced or minimized.

일 실시예에서, 최종 손실 정보는 하기 수학식 1에 따라 산출될 수 있다.In an embodiment, the final loss information may be calculated according to Equation 1 below.

[수학식 1][Equation 1]

최종 손실 정보 = a*제 1 손실 정보+b*제 2 손실 정보+c*제 3 손실 정보Final loss information = a*First loss information+b*Second loss information+c*Third loss information

수학식 1에서, a, b, c는 각각 제 1 손실 정보(2060), 제 2 손실 정보(2070) 및 제 3 손실 정보(2080) 각각에 적용되는 가중치이다.In Equation 1, a, b, and c are weights applied to each of the first loss information 2060 , the second loss information 2070 , and the third loss information 2080 , respectively.

수학식 1에 따르면, 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 과정(2090)에서 이용되는 신경망은 현재의 복원 훈련 영상(2050)이 현재 훈련 영상(2010)에 최대한 유사해지고, 제 1 인코더(1211) 및 제 2 인코더(1215)로부터 출력되는 데이터에 대응하는 비트스트림의 크기가 최소화되는 방향으로 훈련됨을 알 수 있다.According to Equation 1, the neural network used in the first decoder 331 , the second decoder 333 , the first encoder 1211 , the second encoder 1215 and the optical flow prediction process 2090 is the current reconstruction It can be seen that the training image 2050 is as similar to the current training image 2010 as possible and trained in a direction in which the size of the bitstream corresponding to the data output from the first encoder 1211 and the second encoder 1215 is minimized. have.

한편, 도 20에 도시된 훈련 과정은 P 프레임 다음의 P 프레임을 위한 훈련 과정에 해당하는데, I 프레임 다음의 P 프레임인 경우를 위해, 도 10 및 도 17에 도시된 제 4 인코더(1710) 및 제 4 디코더(1010)의 훈련이 필요하다. 이를 위해, 도 20에 도시된 제 1 인코더(1211) 및 제 1 디코더(331)가 제 4 인코더(1710) 및 제 4 디코더(1010)로 교체될 수 있다. 옵티컬 플로우의 예측 과정(2090) 및 결합 과정(2095)은 훈련 과정에서 수행되지 않을 수 있다.On the other hand, the training process shown in FIG. 20 corresponds to the training process for the P frame following the P frame. For the case of the P frame following the I frame, the fourth encoder 1710 shown in FIGS. 10 and 17 and Training of the fourth decoder 1010 is required. To this end, the first encoder 1211 and the first decoder 331 shown in FIG. 20 may be replaced with the fourth encoder 1710 and the fourth decoder 1010 . The optical flow prediction process 2090 and the combining process 2095 may not be performed during the training process.

I 프레임 다음의 P 프레임인 경우를 위한 제 2 인코더(1215), 제 2 디코더(333), 제 4 인코더(1710) 및 제 4 디코더(1010)의 훈련 과정을 설명하면, 현재 훈련 영상(2010)과 이전의 복원 훈련 영상(2030)이 제 4 인코더(1710)로 입력된다. If the training process of the second encoder 1215 , the second decoder 333 , the fourth encoder 1710 , and the fourth decoder 1010 for the case of the P frame following the I frame will be described, the current training image 2010 and the previous reconstruction training image 2030 are input to the fourth encoder 1710 .

제 4 인코더(1710)는 현재 훈련 영상(2010)과 이전의 복원 훈련 영상(2030)을 처리하여 현재 옵티컬 플로우의 특징 데이터를 출력하고, 현재 옵티컬 플로우의 특징 데이터는 제 4 디코더(1010)로 입력된다. The fourth encoder 1710 processes the current training image 2010 and the previous reconstructed training image 2030 to output feature data of the current optical flow, and the feature data of the current optical flow is input to the fourth decoder 1010 . do.

제 4 디코더(1010)는 현재 옵티컬 플로우의 특징 데이터를 처리하여 현재 옵티컬 플로우를 출력한다.The fourth decoder 1010 processes the feature data of the current optical flow and outputs the current optical flow.

이전의 복원 훈련 영상(2030)이 현재 옵티컬 플로우에 따라 워핑(190)됨으로써 현재의 예측 훈련 영상(x'i)이 생성되고, 현재의 예측 훈련 영상(x'i)과 현재 훈련 영상(2010) 사이의 차이에 대응하는 현재의 잔차 영상 데이터(ri)가 획득된다.The previous reconstruction training image 2030 is warped 190 according to the current optical flow to generate a current prediction training image (x' i ), and the current prediction training image (x' i ) and the current training image (2010) The current residual image data r i corresponding to the difference between them is obtained.

현재의 잔차 영상 데이터(ri)는 제 2 인코더(1215)로 입력되고, 제 2 인코더(1215)는 현재의 잔차 영상 데이터(ri)를 처리하여 현재의 잔차 영상 데이터의 특징 데이터(vi)를 출력한다. The current residual image data (r i ) is input to the second encoder 1215 , and the second encoder 1215 processes the current residual image data (ri ) to obtain feature data ( vi ) of the current residual image data. ) is output.

현재의 잔차 영상 데이터의 특징 데이터(vi)는 제 2 디코더(333)로 입력된다. 제 2 디코더(333)는 현재의 잔차 영상 데이터의 특징 데이터(vi)를 처리하여 현재의 잔차 영상 데이터(r'i)를 출력하고, 현재의 예측 훈련 영상(x'i)과 현재의 잔차 영상 데이터(r'i)가 합해짐으로써 현재의 복원 훈련 영상(2050)이 획득된다.The feature data ( vi ) of the current residual image data is input to the second decoder 333 . The second decoder 333 processes the feature data ( vi) of the current residual image data to output the current residual image data (r' i ) , and the current prediction training image (x' i ) and the current residual The current reconstruction training image 2050 is obtained by summing the image data r′ i .

제 2 인코더(1215), 제 2 디코더(333), 제 4 인코더(1710) 및 제 4 디코더(1010)는 제 1 손실 정보(2060), 제 2 손실 정보(2070) 및 제 3 손실 정보(2080) 중 적어도 하나로부터 산출되는 최종 손실 정보가 감소 또는 최소화되도록 훈련될 수 있다.The second encoder 1215 , the second decoder 333 , the fourth encoder 1710 and the fourth decoder 1010 include the first loss information 2060 , the second loss information 2070 , and the third loss information 2080 . ) may be trained to reduce or minimize the final loss information calculated from at least one of.

여기서, 제 1 손실 정보(2060)는 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 차이에 대응할 수 있다. 제 2 손실 정보(2070)는 현재 옵티컬 플로우의 특징 데이터의 엔트로피 또는 현재 옵티컬 플로우의 특징 데이터에 대응하는 비트스트림의 비트레이트에 대응할 수 있다. 또한, 제 3 손실 정보(2080)는 현재의 잔차 영상 데이터의 특징 데이터(vi)의 엔트로피 또는 현재의 잔차 영상 데이터의 특징 데이터(vi)에 대응하는 비트스트림의 비트레이트에 대응할 수 있다.Here, the first loss information 2060 may correspond to a difference between the current training image 2010 and the current reconstruction training image 2050 . The second loss information 2070 may correspond to the entropy of the feature data of the current optical flow or the bit rate of the bitstream corresponding to the feature data of the current optical flow. Also, the third loss information 2080 may correspond to the entropy of the feature data ( vi ) of the current residual image data or the bitrate of the bitstream corresponding to the feature data ( vi ) of the current residual image data.

P 프레임 다음의 P 프레임을 위한 훈련 과정 및 I 프레임 다음의 P 프레임을 위한 훈련 과정 모두에서 제 2 인코더(1215)와 제 2 디코더(333)가 이용되는 것을 알 수 있다. It can be seen that the second encoder 1215 and the second decoder 333 are used in both the training process for the P frame following the P frame and the training process for the P frame following the I frame.

일 실시예에서, 제 2 인코더(1215)와 제 2 디코더(333)는 P 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 훈련된 후, I 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 추가적으로 훈련될 수 있다.In one embodiment, the second encoder 1215 and the second decoder 333 are trained through the training process for the P frame following the P frame, and then are further trained through the training process for the P frame following the I frame. can

다른 실시예에서, 제 2 인코더(1215)와 제 2 디코더(333)는 I 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 훈련된 후, P 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 추가적으로 훈련될 수 있다.In another embodiment, the second encoder 1215 and the second decoder 333 are trained through the training process for the P frame following the I frame, and then are further trained through the training process for the P frame following the P frame. can

또 다른 실시예에서, 인코더(1215)와 제 2 디코더(333)는 I 프레임 다음의 P 프레임을 훈련 과정 및 P 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 별도로 훈련될 수도 있다. 예를 들어, P 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 훈련된 제 2 인코더(1215)와 제 2 디코더(333)는 P 프레임 다음의 현재 영상에 대해 적용되고, I 프레임 다음의 P 프레임을 위한 훈련 과정을 통해 훈련된 제 2 인코더(1215)와 제 2 디코더(333)는 I 프레임 다음의 현재 영상에 대해 적용될 수 있다.In another embodiment, the encoder 1215 and the second decoder 333 may be separately trained through a training process for a P frame following an I frame and a training process for a P frame following a P frame. For example, the second encoder 1215 and the second decoder 333 trained through the training process for the P frame after the P frame are applied to the current image after the P frame, and the P frame after the I frame. The second encoder 1215 and the second decoder 333 trained through the training process for

도 21은 훈련 장치(2100)에 의한 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 신경망(2200)의 훈련 과정을 설명하기 위한 도면이다.21 is a training process of the first decoder 331, the second decoder 333, the first encoder 1211, the second encoder 1215, and the optical flow prediction neural network 2200 by the training device 2100. It is a drawing for explanation.

옵티컬 플로우의 예측 신경망(2200)은 예측 옵티컬 플로우를 획득하는데 이용되는 신경망으로서, 예를 들어, 도 6에 도시된 제 1 예측 신경망(610), 도 7에 도시된 제 2 예측 신경망(710) 또는 도 14에 도시된 제 3 인코더(1410)와 제 3 디코더(810)일 수 있다.The optical flow prediction neural network 2200 is a neural network used to obtain a predicted optical flow, for example, the first prediction neural network 610 shown in FIG. 6 , the second prediction neural network 710 shown in FIG. 7 or It may be the third encoder 1410 and the third decoder 810 shown in FIG. 14 .

도 20과 관련하여 설명한 훈련 과정은 훈련 장치(2100)에 의해 수행될 수 있다. 훈련 장치(2100)는 예를 들어, 영상 부호화 장치(1200) 또는 별도의 서버일 수 있다. 훈련 결과 획득된 파라미터들은 영상 부호화 장치(1200) 및 영상 복호화 장치(300)에 저장된다.The training process described with reference to FIG. 20 may be performed by the training apparatus 2100 . The training apparatus 2100 may be, for example, the image encoding apparatus 1200 or a separate server. The parameters obtained as a result of training are stored in the image encoding apparatus 1200 and the image decoding apparatus 300 .

도 21를 참조하면, 훈련 장치(2100)는 제 1 인코더(1211), 제 1 디코더(331), 제 2 인코더(1215), 제 2 디코더(333) 및 옵티컬 플로우의 예측 신경망(2200)의 파라미터를 초기 세팅한다(S2110). 이에 의해, 제 1 인코더(1211), 제 1 디코더(331), 제 2 인코더(1215), 제 2 디코더(333) 및 옵티컬 플로우의 예측 신경망(2200)은 초기 세팅된 파라미터에 따라 동작할 수 있다.Referring to FIG. 21 , the training device 2100 includes a first encoder 1211 , a first decoder 331 , a second encoder 1215 , a second decoder 333 , and an optical flow prediction neural network 2200 . is initially set (S2110). Accordingly, the first encoder 1211 , the first decoder 331 , the second encoder 1215 , the second decoder 333 , and the optical flow prediction neural network 2200 may operate according to the initially set parameters. .

훈련 장치(2100)는 옵티컬 플로우의 예측 신경망(2200)이 현재의 예측 옵티컬 플로우를 획득하는데 필요로 하는 데이터(예를 들어, 이전 옵티컬 플로우, 이전 옵티컬 플로우의 특징 데이터 및 이전의 잔차 옵티컬 플로우의 특징 데이터 중 적어도 하나)를 옵티컬 플로우의 예측 신경망(2200)으로 입력한다(S2115).The training apparatus 2100 provides the data required for the prediction neural network 2200 of the optical flow to obtain the current prediction optical flow (eg, the previous optical flow, the characteristic data of the previous optical flow, and the characteristic of the previous residual optical flow). at least one of the data) is input to the prediction neural network 2200 of the optical flow (S2115).

옵티컬 플로우의 예측 신경망(2200)은 입력된 데이터를 처리하여 현재의 예측 옵티컬 플로우를 제 1 인코더(1211) 및 훈련 장치(2100)로 출력한다(S2120).The optical flow prediction neural network 2200 processes the input data and outputs the current prediction optical flow to the first encoder 1211 and the training apparatus 2100 (S2120).

훈련 장치(2100)는 현재 훈련 영상(2010)과 이전의 복원 훈련 영상(2030)을 제 1 인코더(1211)로 입력한다(S2125). The training apparatus 2100 inputs the current training image 2010 and the previous reconstructed training image 2030 to the first encoder 1211 ( S2125 ).

제 1 인코더(1211)는 현재의 예측 옵티컬 플로우, 현재 훈련 영상(2010) 및 이전의 복원 훈련 영상(2030)을 처리하여 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)를 훈련 장치(2100) 및 제 1 디코더(331)로 출력한다(S2130).The first encoder 1211 processes the current prediction optical flow, the current training image 2010, and the previous reconstructed training image 2030 to provide feature data (h i ) of the current residual optical flow to the training apparatus 2100 and It outputs to the first decoder 331 (S2130).

훈련 장치(2100)는 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)로부터 제 2 손실 정보(2070)를 산출한다(S2135).The training apparatus 2100 calculates the second loss information 2070 from the feature data h i of the current residual optical flow ( S2135 ).

제 1 디코더(331)는 현재의 잔차 옵티컬 플로우의 특징 데이터(hi)를 처리하여 현재의 잔차 옵티컬 플로우(di)를 훈련 장치(2100)로 출력한다(S2140).The first decoder 331 processes the feature data h i of the current residual optical flow and outputs the current residual optical flow d i to the training apparatus 2100 ( S2140 ).

훈련 장치(2100)는 현재의 예측 옵티컬 플로우와 현재의 잔차 옵티컬 플로우(di)에 기초하여 획득된 현재 옵티컬 플로우를 이용하여 현재의 예측 훈련 영상(x'i)을 생성하고, 현재의 예측 훈련 영상(x'i)과 현재 훈련 영상(2010) 사이의 차이에 대응하는 현재의 잔차 영상 데이터(ri)를 획득한다(S2145).The training apparatus 2100 generates a current prediction training image (x' i ) using the current optical flow obtained based on the current prediction optical flow and the current residual optical flow (d i ), and the current prediction training Current residual image data ri corresponding to the difference between the image x' i and the current training image 2010 is acquired ( S2145 ).

훈련 장치(2100)는 현재의 잔차 영상 데이터(ri)를 제 2 인코더(1215)로 입력하고(S2150), 제 2 인코더(1215)는 현재의 잔차 영상 데이터의 특징 데이터(vi)를 훈련 장치(2100)와 제 2 디코더(333)로 출력한다(S2155).The training apparatus 2100 inputs the current residual image data r i to the second encoder 1215 ( S2150 ), and the second encoder 1215 trains the feature data v i of the current residual image data. output to the device 2100 and the second decoder 333 (S2155).

훈련 장치(2100)는 현재의 잔차 영상 데이터의 특징 데이터(vi)로부터 제 3 손실 정보(2080)를 산출한다(S2160).The training apparatus 2100 calculates the third loss information 2080 from the feature data v i of the current residual image data ( S2160 ).

제 2 디코더(333)는 현재의 잔차 영상 데이터의 특징 데이터(vi)를 처리하여 현재의 잔차 영상 데이터(r'i)를 훈련 장치(2100)로 출력한다(S2165).The second decoder 333 processes the feature data v i of the current residual image data and outputs the current residual image data r′ i to the training apparatus 2100 ( S2165 ).

훈련 장치(2100)는 현재의 잔차 영상 데이터(r'i)와 현재의 예측 훈련 영상(x'i)으로부터 현재의 복원 훈련 영상(2050)을 생성한다(S2170).The training apparatus 2100 generates a current reconstructed training image 2050 from the current residual image data (r' i ) and the current prediction training image (x' i ) ( S2170 ).

훈련 장치(2100)는 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 차이에 대응하는 제 1 손실 정보(2060)를 산출한다(S2180).The training apparatus 2100 calculates the first loss information 2060 corresponding to the difference between the current training image 2010 and the current reconstruction training image 2050 ( S2180 ).

훈련 장치(2100)는 제 1 손실 정보(2060), 제 2 손실 정보(2070) 및 제 3 손실 정보(2080) 중 적어도 하나를 결합하여 최종 손실 정보를 산출하고, 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 신경망(2200)은 최종 손실 정보에 기초한 역전사(back propagation) 과정을 통해 초기 세팅된 파라미터를 갱신한다(S2181, S2183, S2185, S2187, S2189). The training device 2100 calculates final loss information by combining at least one of the first loss information 2060, the second loss information 2070, and the third loss information 2080, and the first decoder 331, the first The second decoder 333, the first encoder 1211, the second encoder 1215, and the optical flow prediction neural network 2200 update the initially set parameters through a back propagation process based on the final loss information ( S2181, S2183, S2185, S2187, S2189).

이후, 훈련 장치(2100), 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 신경망(2200)은 최종 손실 정보가 최소화될 때까지 S2115 내지 S2189 과정을 반복하면서 파라미터를 갱신한다. 이 때, 각 반복 과정 동안 제 1 디코더(331), 제 2 디코더(333), 제 1 인코더(1211), 제 2 인코더(1215) 및 옵티컬 플로우의 예측 신경망(2200)은 이전 과정에서 갱신된 파라미터에 따라 동작한다.Thereafter, the training apparatus 2100, the first decoder 331, the second decoder 333, the first encoder 1211, the second encoder 1215, and the optical flow prediction neural network 2200 minimize the final loss information. The parameters are updated while repeating steps S2115 to S2189 until the At this time, during each iteration process, the first decoder 331 , the second decoder 333 , the first encoder 1211 , the second encoder 1215 , and the optical flow prediction neural network 2200 have the parameters updated in the previous process. operates according to

도 22는 훈련 장치(2100)에 의한 제 4 인코더(1710), 제 4 디코더(1010), 제 2 인코더(1215) 및 제 2 디코더(333)의 훈련 과정을 설명하기 위한 도면이다.22 is a diagram for explaining a training process of the fourth encoder 1710 , the fourth decoder 1010 , the second encoder 1215 , and the second decoder 333 by the training apparatus 2100 .

도 21에 도시된 훈련 과정이 P 프레임 다음의 P 프레임을 위한 훈련 과정이라면, 도 22에 도시된 훈련 과정은 I 프레임 다음의 P 프레임을 위한 훈련 과정으로 이해될 수 있다.If the training process shown in FIG. 21 is a training process for a P frame following a P frame, the training process shown in FIG. 22 may be understood as a training process for a P frame following an I frame.

도 22를 참조하면, 훈련 장치(2100)는 제 4 인코더(1710), 제 4 디코더(1010), 제 2 인코더(1215) 및 제 2 디코더(333)의 파라미터를 초기 세팅한다(S2210). 이에 의해, 제 4 인코더(1710), 제 4 디코더(1010), 제 2 인코더(1215) 및 제 2 디코더(333)은 초기 세팅된 파라미터에 따라 동작할 수 있다. 구현예에 따라, 제 2 인코더(1215) 및 제 2 디코더(333)는 도 21에 도시된 훈련 과정을 통해 설정된 파라미터에 따라 초기 동작할 수 있다.Referring to FIG. 22 , the training apparatus 2100 initially sets parameters of the fourth encoder 1710 , the fourth decoder 1010 , the second encoder 1215 , and the second decoder 333 ( S2210 ). Accordingly, the fourth encoder 1710 , the fourth decoder 1010 , the second encoder 1215 , and the second decoder 333 may operate according to initially set parameters. According to an embodiment, the second encoder 1215 and the second decoder 333 may initially operate according to parameters set through the training process shown in FIG. 21 .

훈련 장치(2100)는 현재 훈련 영상(2010)과 이전의 복원 훈련 영상(2030)을 제 4 인코더(1710)로 입력한다(S2215). The training apparatus 2100 inputs the current training image 2010 and the previous reconstructed training image 2030 to the fourth encoder 1710 ( S2215 ).

제 4 인코더(1710)는 현재 훈련 영상(2010)과 이전의 복원 훈련 영상(2030)을 처리하여 현재 옵티컬 플로우의 특징 데이터를 훈련 장치(2100) 및 제 4 디코더(1010)로 출력한다(S2220).The fourth encoder 1710 processes the current training image 2010 and the previous reconstructed training image 2030 and outputs feature data of the current optical flow to the training apparatus 2100 and the fourth decoder 1010 (S2220). .

훈련 장치(2100)는 현재 옵티컬 플로우의 특징 데이터로부터 제 2 손실 정보(2070)를 산출한다(S2225).The training apparatus 2100 calculates the second loss information 2070 from the feature data of the current optical flow ( S2225 ).

제 4 디코더(1010)는 현재 옵티컬 플로우의 특징 데이터를 처리하여 현재 옵티컬 플로우를 훈련 장치(2100)로 출력한다(S2230).The fourth decoder 1010 processes the feature data of the current optical flow and outputs the current optical flow to the training apparatus 2100 (S2230).

훈련 장치(2100)는 현재 옵티컬 플로우를 이용하여 현재의 예측 훈련 영상(x'i)을 생성하고, 현재의 예측 훈련 영상(x'i)과 현재 훈련 영상(2010) 사이의 차이에 대응하는 현재의 잔차 영상 데이터(ri)를 획득한다(S2235).The training apparatus 2100 generates a current prediction training image (x' i ) using the current optical flow, and a current corresponding to the difference between the current prediction training image (x' i ) and the current training image 2010 . The residual image data (r i ) of is obtained ( S2235 ).

훈련 장치(2100)는 현재의 잔차 영상 데이터(ri)를 제 2 인코더(1215)로 입력하고(S2240), 제 2 인코더(1215)는 현재의 잔차 영상 데이터의 특징 데이터(vi)를 훈련 장치(2100)와 제 2 디코더(333)로 출력한다(S2245).The training apparatus 2100 inputs the current residual image data r i to the second encoder 1215 ( S2240 ), and the second encoder 1215 trains the feature data v i of the current residual image data. output to the device 2100 and the second decoder 333 (S2245).

훈련 장치(2100)는 현재의 잔차 영상 데이터의 특징 데이터(vi)로부터 제 3 손실 정보(2080)를 산출한다(S2250).The training apparatus 2100 calculates the third loss information 2080 from the feature data v i of the current residual image data ( S2250 ).

제 2 디코더(333)는 현재의 잔차 영상 데이터의 특징 데이터(vi)를 처리하여 현재의 잔차 영상 데이터(r'i)를 훈련 장치(2100)로 출력한다(S2260).The second decoder 333 processes the feature data v i of the current residual image data and outputs the current residual image data r′ i to the training apparatus 2100 ( S2260 ).

훈련 장치(2100)는 현재의 잔차 영상 데이터(r'i)와 현재의 예측 훈련 영상(x'i)으로부터 현재의 복원 훈련 영상(2050)을 생성한다(S2265).The training apparatus 2100 generates a current reconstruction training image 2050 from the current residual image data (r' i ) and the current prediction training image (x' i ) ( S2265 ).

훈련 장치(2100)는 현재 훈련 영상(2010)과 현재의 복원 훈련 영상(2050) 사이의 차이에 대응하는 제 1 손실 정보(2060)를 산출한다(S2270).The training apparatus 2100 calculates first loss information 2060 corresponding to a difference between the current training image 2010 and the current reconstruction training image 2050 ( S2270 ).

훈련 장치(2100)는 제 1 손실 정보(2060), 제 2 손실 정보(2070) 및 제 3 손실 정보(2080) 중 적어도 하나를 결합하여 최종 손실 정보를 산출하고, 제 4 인코더(1710), 제 4 디코더(1010), 제 2 인코더(1215) 및 제 2 디코더(333)는 최종 손실 정보에 기초한 역전사(back propagation) 과정을 통해 초기 세팅된 파라미터를 갱신한다(S2271, S2273, S2275, S2277). The training device 2100 calculates final loss information by combining at least one of the first loss information 2060, the second loss information 2070, and the third loss information 2080, and the fourth encoder 1710, the second 4 The decoder 1010, the second encoder 1215, and the second decoder 333 update the initially set parameters through a back propagation process based on the final loss information (S2271, S2273, S2275, S2277).

이후, 훈련 장치(2100), 제 4 인코더(1710), 제 4 디코더(1010), 제 2 인코더(1215) 및 제 2 디코더(333)는 최종 손실 정보가 최소화될 때까지 S2215 내지 S2277 과정을 반복하면서 파라미터를 갱신한다. 이 때, 각 반복 과정 동안 제 4 인코더(1710), 제 4 디코더(1010), 제 2 인코더(1215) 및 제 2 디코더(333)는 이전 과정에서 갱신된 파라미터에 따라 동작한다.Thereafter, the training apparatus 2100, the fourth encoder 1710, the fourth decoder 1010, the second encoder 1215, and the second decoder 333 repeat the processes S2215 to S2277 until the final loss information is minimized. while updating the parameters. At this time, during each iteration process, the fourth encoder 1710 , the fourth decoder 1010 , the second encoder 1215 , and the second decoder 333 operate according to the parameters updated in the previous process.

한편, 상술한 본 개시의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 작성된 프로그램은 기기로 읽을 수 있는 저장매체에 저장될 수 있다.Meanwhile, the above-described embodiments of the present disclosure can be written as a program that can be executed on a computer, and the written program can be stored in a device-readable storage medium.

기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory storage medium' is a tangible device and only means that it does not contain a signal (eg, electromagnetic wave). It does not distinguish the case where it is stored as For example, the 'non-transitory storage medium' may include a buffer in which data is temporarily stored.

일 실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments disclosed in this document may be provided in a computer program product (computer program product). Computer program products may be traded between sellers and buyers as commodities. The computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or via an application store or between two user devices (eg smartphones). It can be distributed directly or online (eg, downloaded or uploaded). In the case of online distribution, at least a portion of the computer program product (eg, a downloadable app) is stored at least in a machine-readable storage medium, such as a memory of a manufacturer's server, a server of an application store, or a relay server. It may be temporarily stored or temporarily created.

이상, 본 개시의 기술적 사상을 바람직한 실시예를 들어 상세하게 설명하였으나, 본 개시의 기술적 사상은 상기 실시예들에 한정되지 않고, 본 개시의 기술적 사상의 범위 내에서 당 분야에서 통상의 지식을 가진 자에 의하여 여러 가지 변형 및 변경이 가능하다.In the above, the technical idea of the present disclosure has been described in detail with reference to preferred embodiments, but the technical idea of the present disclosure is not limited to the above embodiments, and those of ordinary skill in the art within the scope of the technical spirit of the present disclosure Various modifications and changes are possible by the person.

Claims (14)

AI를 이용하는 옵티컬 플로우의 복원 방법에 있어서,
현재 영상에 대한 비트스트림으로부터 현재의 잔차 옵티컬 플로우(current residual optical flow)에 대한 특징 데이터를 획득하는 단계;
신경망 기반의 제 1 디코더에 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 적용하여 상기 현재의 잔차 옵티컬 플로우를 획득하는 단계;
이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터, 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득하는 단계; 및
상기 현재의 잔차 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우를 이용하여 현재 옵티컬 플로우를 복원하는 단계를 포함하는, 옵티컬 플로우의 복원 방법.
In the optical flow restoration method using AI,
obtaining feature data for a current residual optical flow from a bitstream for a current image;
obtaining the current residual optical flow by applying feature data for the current residual optical flow to a first decoder based on a neural network;
obtaining a current predicted optical flow by using at least one of a previous optical flow, feature data for the previous optical flow, and feature data for a previous residual optical flow; and
and reconstructing a current optical flow using the current residual optical flow and the current predicted optical flow.
제1항에 있어서,
상기 복원된 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 생성되는 현재 예측 영상과, 현재의 잔차 영상 데이터에 기반하여 상기 현재 영상이 복원되는, 옵티컬 플로우의 복원 방법.
According to claim 1,
A method of restoring an optical flow, wherein the current image is reconstructed based on a current prediction image generated from a previous reconstructed image based on the reconstructed current optical flow and current residual image data.
제1항에 있어서,
상기 현재의 예측 옵티컬 플로우를 획득하는 단계는,
상기 이전 옵티컬 플로우를 상기 현재의 예측 옵티컬 플로우로 결정하는 단계를 포함하는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The step of obtaining the current prediction optical flow comprises:
and determining the previous optical flow as the current predicted optical flow.
제1항에 있어서,
상기 현재의 예측 옵티컬 플로우를 획득하는 단계는,
상기 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 상기 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 1 예측 신경망(first prediction neural network)에 적용하여 상기 현재의 예측 옵티컬 플로우를 획득하는 단계를 포함하는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The step of obtaining the current prediction optical flow comprises:
Applying at least one of the previous optical flow, the feature data for the previous optical flow, and the feature data for the previous residual optical flow to a first prediction neural network to obtain the current predicted optical flow A method of restoring an optical flow, comprising the steps.
제1항에 있어서,
상기 현재의 예측 옵티컬 플로우를 획득하는 단계는,
상기 이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 상기 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 제 2 예측 신경망(second prediction neural network)에 적용하여 상기 현재의 예측 옵티컬 플로우와 상기 이전 옵티컬 플로우 사이의 세컨드-오더 옵티컬 플로우(second-order optical flow)를 획득하는 단계; 및
상기 이전 옵티컬 플로우를 상기 세컨드-오더 옵티컬 플로우에 따라 변경하여 상기 현재의 예측 옵티컬 플로우를 생성하는 단계를 포함하는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The step of obtaining the current prediction optical flow comprises:
At least one of the previous optical flow, the feature data for the previous optical flow, and the feature data for the previous residual optical flow is applied to a second prediction neural network to compare the current predicted optical flow and the previous acquiring a second-order optical flow between optical flows; and
and generating the current predicted optical flow by changing the previous optical flow according to the second-order optical flow.
제1항에 있어서,
상기 현재의 예측 옵티컬 플로우를 획득하는 단계는,
상기 비트스트림으로부터 상기 현재의 예측 옵티컬 플로우와 상기 이전 옵티컬 플로우 사이의 세컨드-오더 옵티컬 플로우에 대한 특징 데이터를 획득하는 단계;
상기 세컨드-오더 옵티컬 플로우에 대한 특징 데이터를 신경망 기반의 제 3 디코더에 적용하여 상기 세컨드-오더 옵티컬 플로우를 획득하는 단계; 및
상기 이전 옵티컬 플로우를 상기 세컨드-오더 옵티컬 플로우에 따라 변경하여 상기 현재의 예측 옵티컬 플로우를 생성하는 단계를 포함하는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The step of obtaining the current prediction optical flow comprises:
obtaining feature data for a second-order optical flow between the current prediction optical flow and the previous optical flow from the bitstream;
obtaining the second-order optical flow by applying the feature data for the second-order optical flow to a third decoder based on a neural network; and
and generating the current predicted optical flow by changing the previous optical flow according to the second-order optical flow.
제1항에 있어서,
상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터는,
상기 비트스트림에 대한 엔트로피 복호화 및 역양자화를 통해 획득되는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The feature data for the current residual optical flow is,
A method of restoring an optical flow, which is obtained through entropy decoding and inverse quantization of the bitstream.
제1항에 있어서,
상기 신경망 기반의 제 1 디코더는,
현재 훈련 영상(current training image)과 상기 현재 훈련 영상에 대응하는 현재의 복원 훈련 영상(current reconstructed training image) 사이의 차이에 대응하는 제 1 손실 정보; 및
상기 현재 훈련 영상의 현재의 잔차 옵티컬 플로우에 대한 특징 데이터의 엔트로피에 대응하는 제 2 손실 정보를 기반으로 훈련되는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The first decoder based on the neural network,
first loss information corresponding to a difference between a current training image and a current reconstructed training image corresponding to the current training image; and
The method for restoring an optical flow, which is trained based on second loss information corresponding to entropy of feature data for the current residual optical flow of the current training image.
제1항에 있어서,
상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터는,
상기 현재 영상이 P(predictive) 프레임 다음의 P 프레임에 해당하는 경우에 상기 비트스트림으로부터 획득되는, 옵티컬 플로우의 복원 방법.
According to claim 1,
The feature data for the current residual optical flow is,
The method for restoring an optical flow, obtained from the bitstream when the current image corresponds to a P frame following a P (predictive) frame.
제9항에 있어서,
상기 현재 영상이 I(intra) 프레임 다음의 P 프레임에 해당하는 경우,
상기 옵티컬 플로우의 복원 방법은,
비트스트림으로부터 현재 옵티컬 플로우에 대한 특징 데이터를 획득하는 단계;
신경망 기반의 제 4 디코더에 상기 현재 옵티컬 플로우에 대한 특징 데이터를 적용하여 상기 현재 옵티컬 플로우를 복원하는 단계를 더 포함하는, 옵티컬 플로우의 복원 방법.
10. The method of claim 9,
If the current image corresponds to the P frame after the I (intra) frame,
The method of restoring the optical flow,
obtaining feature data for a current optical flow from a bitstream;
Reconstructing the current optical flow by applying the feature data for the current optical flow to a fourth decoder based on a neural network, further comprising the step of restoring the optical flow.
제1항의 방법을 수행하기 위한 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록매체.
A computer-readable recording medium in which a program for performing the method of claim 1 is recorded.
AI를 이용하는 옵티컬 플로우의 복원 장치에 있어서,
현재 영상에 대한 비트스트림으로부터 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득하는 획득부; 및
신경망 기반의 제 1 디코더에 상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 적용하여 상기 현재의 잔차 옵티컬 플로우를 획득하고, 이전 옵티컬 플로우, 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나를 이용하여 현재의 예측 옵티컬 플로우를 획득하고, 상기 현재의 잔차 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우를 이용하여 현재 옵티컬 플로우를 복원하는 예측 복호화부를 포함하는, 옵티컬 플로우의 복원 장치.
In the optical flow restoration apparatus using AI,
an acquisition unit configured to acquire feature data for a current residual optical flow from a bitstream for a current image; and
The current residual optical flow is obtained by applying the feature data for the current residual optical flow to the first decoder based on a neural network, and the previous optical flow, feature data for the previous optical flow, and features for the previous residual optical flow An apparatus for restoring an optical flow, comprising: a predictive decoder configured to obtain a current predicted optical flow using at least one of data, and reconstruct a current optical flow using the current residual optical flow and the current predicted optical flow.
AI를 이용하는 옵티컬 플로우의 부호화 방법에 있어서,
이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나로부터 현재의 예측 옵티컬 플로우를 획득하는 단계;
현재 영상, 이전 복원 영상 및 상기 현재의 예측 옵티컬 플로우를 신경망 기반의 제 1 인코더에 적용하여 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득하는 단계; 및
상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터에 대응하는 비트스트림을 생성하는 단계를 포함하되,
상기 현재의 잔차 옵티컬 플로우는, 현재 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우 사이의 차이에 대응하는, 옵티컬 플로우의 부호화 방법.
In the optical flow encoding method using AI,
obtaining a current predicted optical flow from at least one of a previous optical flow, feature data for the previous optical flow, and feature data for a previous residual optical flow;
acquiring feature data for a current residual optical flow by applying a current image, a previous reconstructed image, and the current predicted optical flow to a first encoder based on a neural network; and
generating a bitstream corresponding to feature data for the current residual optical flow,
and the current residual optical flow corresponds to a difference between the current optical flow and the current predicted optical flow.
AI를 이용하는 옵티컬 플로우의 부호화 장치에 있어서,
이전 옵티컬 플로우, 상기 이전 옵티컬 플로우에 대한 특징 데이터 및 이전의 잔차 옵티컬 플로우에 대한 특징 데이터 중 적어도 하나로부터 현재의 예측 옵티컬 플로우를 획득하고, 현재 영상, 이전 복원 영상 및 상기 현재의 예측 옵티컬 플로우를 신경망 기반의 제 1 인코더에 적용하여 현재의 잔차 옵티컬 플로우에 대한 특징 데이터를 획득하는 예측 부호화부; 및
상기 현재의 잔차 옵티컬 플로우에 대한 특징 데이터에 대응하는 비트스트림을 생성하는 생성부를 포함하되,
상기 현재의 잔차 옵티컬 플로우는, 현재 옵티컬 플로우와 상기 현재의 예측 옵티컬 플로우 사이의 차이에 대응하는, 옵티컬 플로우의 부호화 장치.
An optical flow encoding apparatus using AI, comprising:
Obtaining a current predicted optical flow from at least one of a previous optical flow, feature data for the previous optical flow, and feature data for a previous residual optical flow, and combining the current image, the previous reconstructed image, and the current predicted optical flow with a neural network a predictive encoder to obtain feature data for a current residual optical flow by applying it to a first encoder based on the present invention; and
A generator for generating a bitstream corresponding to the feature data for the current residual optical flow,
and the current residual optical flow corresponds to a difference between the current optical flow and the current predicted optical flow.
KR1020210171269A 2021-02-22 2021-12-02 Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby KR20220120436A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/KR2022/002493 WO2022177383A1 (en) 2021-02-22 2022-02-21 Ai-based image encoding and decoding apparatus, and method by same
CN202280016009.4A CN116868566A (en) 2021-02-22 2022-02-21 AI-based image encoding and decoding apparatus and method thereof
EP22756581.9A EP4250729A4 (en) 2021-02-22 2022-02-21 Ai-based image encoding and decoding apparatus, and method by same
US17/677,498 US11863783B2 (en) 2021-02-22 2022-02-22 Artificial intelligence-based image encoding and decoding apparatus and method

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20210023695 2021-02-22
KR1020210023695 2021-02-22
KR20210123369 2021-09-15
KR1020210123369 2021-09-15

Publications (1)

Publication Number Publication Date
KR20220120436A true KR20220120436A (en) 2022-08-30

Family

ID=83114317

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020210157089A KR20220120432A (en) 2021-02-22 2021-11-15 Apparatus for encoding and decoding image using artificial intelligence and method thereby
KR1020210171269A KR20220120436A (en) 2021-02-22 2021-12-02 Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020210157089A KR20220120432A (en) 2021-02-22 2021-11-15 Apparatus for encoding and decoding image using artificial intelligence and method thereby

Country Status (1)

Country Link
KR (2) KR20220120432A (en)

Also Published As

Publication number Publication date
KR20220120432A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
KR101901355B1 (en) Method and apparatus for performing graph-based prediction using optimazation function
US20180115787A1 (en) Method for encoding and decoding video signal, and apparatus therefor
KR101456491B1 (en) Method and apparatus for encoding and decoding image based on plurality of reference pictures
KR20090098214A (en) Method and apparatus for video encoding and decoding
CN103517071A (en) Image coding apparatus and image coding method
US11863756B2 (en) Image encoding and decoding apparatus and method using artificial intelligence
KR20220120436A (en) Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby
EP4250729A1 (en) Ai-based image encoding and decoding apparatus, and method by same
JP6564315B2 (en) Encoding device, decoding device, and program
KR20160065860A (en) Method for encoding and decoding a media signal and apparatus using the same
CN116868566A (en) AI-based image encoding and decoding apparatus and method thereof
US20230247212A1 (en) Device and method for encoding and decoding image using ai
KR20230022085A (en) Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby
EP4354871A1 (en) Ai-based image encoding and decoding device, and method performed thereby
US20230145525A1 (en) Image encoding apparatus and image decoding apparatus both using artificial intelligence, and image encoding method and image decoding method performed by the image encoding apparatus and the image decoding apparatus
KR20230041601A (en) Apparatus and method for encoding and decodng image using artificial intelligence
KR20230067492A (en) Image encoding apparatus and image decoding apparatus using artificial intelligence, and method for encoding and decondg image thereby
CN118020303A (en) Apparatus and method for encoding and decoding image using AI
CN116888961A (en) Apparatus for image encoding and decoding using AI and method for image encoding and decoding using the same
US20240187581A1 (en) Image processing method and device for ai-based filtering
US20240073425A1 (en) Image encoding apparatus and image decoding apparatus both based on artificial intelligence, and image encoding method and image decoding method performed by the image encoding apparatus and the image decoding apparatus
US20240048711A1 (en) Artificial intelligence based video decoding apparatus and video decoding method and artificial intelligence based video encoding apparatus and video encoding method which perform chroma component prediction
US20240064336A1 (en) Image decoding apparatus and image encoding apparatus using ai, and methods performed thereby
KR20230022093A (en) Apparatus and method for applying artificial intelligence based filtering on image
KR20240025428A (en) Image decoding apparatus and image encoding apparatus for adaptive quantization and inverse-quantization, and methods thereby